@@ -107,6 +107,7 @@ module MOM_surface_forcing_nuopc
107107 ! ! sea-ice viscosity becomes effective, in kg m-2,
108108 ! ! typically of order 1000 [kg m-2].
109109 logical :: allow_flux_adjustments ! < If true, use data_override to obtain flux adjustments
110+ logical :: liquid_runoff_from_data ! < If true, use data_override to obtain liquid runoff
110111
111112 real :: Flux_const ! < piston velocity for surface restoring [m/s]
112113 logical :: salt_restore_as_sflux ! < If true, SSS restore as salt flux instead of water flux
@@ -152,8 +153,8 @@ module MOM_surface_forcing_nuopc
152153! > Structure corresponding to forcing, but with the elements, units, and conventions
153154! ! that exactly conform to the use for MOM-based coupled models.
154155type, public :: ice_ocean_boundary_type
155- real , pointer , dimension (:,:) :: rofl_flux = >NULL () ! < liquid runoff [kg/m2/s]
156- real , pointer , dimension (:,:) :: rofi_flux = >NULL () ! < ice runoff [kg/m2/s]
156+ real , pointer , dimension (:,:) :: lrunoff = >NULL () ! < liquid runoff [kg/m2/s]
157+ real , pointer , dimension (:,:) :: frunoff = >NULL () ! < ice runoff [kg/m2/s]
157158 real , pointer , dimension (:,:) :: u_flux = >NULL () ! < i-direction wind stress [Pa]
158159 real , pointer , dimension (:,:) :: v_flux = >NULL () ! < j-direction wind stress [Pa]
159160 real , pointer , dimension (:,:) :: t_flux = >NULL () ! < sensible heat flux [W/m2]
@@ -168,13 +169,11 @@ module MOM_surface_forcing_nuopc
168169 real , pointer , dimension (:,:) :: sw_flux_nir_dif = >NULL () ! < diffuse Near InfraRed sw radiation [W/m2]
169170 real , pointer , dimension (:,:) :: lprec = >NULL () ! < mass flux of liquid precip [kg/m2/s]
170171 real , pointer , dimension (:,:) :: fprec = >NULL () ! < mass flux of frozen precip [kg/m2/s]
171- real , pointer , dimension (:,:) :: runoff = >NULL () ! < mass flux of liquid runoff [kg/m2/s]
172- real , pointer , dimension (:,:) :: calving = >NULL () ! < mass flux of frozen runoff [kg/m2/s]
173172 real , pointer , dimension (:,:) :: ustar_berg = >NULL () ! < frictional velocity beneath icebergs [m/s]
174173 real , pointer , dimension (:,:) :: area_berg = >NULL () ! < area covered by icebergs[m2/m2]
175174 real , pointer , dimension (:,:) :: mass_berg = >NULL () ! < mass of icebergs(kg/m2)
176- real , pointer , dimension (:,:) :: runoff_hflx = >NULL () ! < heat content of liquid runoff [W/m2]
177- real , pointer , dimension (:,:) :: calving_hflx = >NULL () ! < heat content of frozen runoff [W/m2]
175+ real , pointer , dimension (:,:) :: lrunoff_hflx = >NULL () ! < heat content of liquid runoff [W/m2]
176+ real , pointer , dimension (:,:) :: frunoff_hflx = >NULL () ! < heat content of frozen runoff [W/m2]
178177 real , pointer , dimension (:,:) :: p = >NULL () ! < pressure of overlying ice and atmosphere
179178 ! < on ocean surface [Pa]
180179 real , pointer , dimension (:,:) :: mi = >NULL () ! < mass of ice [kg/m2]
@@ -411,6 +410,13 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, G, US, CS, &
411410 enddo ; enddo
412411 endif
413412
413+ ! Check that liquid runoff has a place to go
414+ if (CS% liquid_runoff_from_data .and. .not. associated (IOB% lrunoff)) then
415+ call MOM_error(FATAL, " liquid runoff is being added via data_override but " // &
416+ " there is no associated runoff in the IOB" )
417+ return
418+ end if
419+
414420 ! obtain fluxes from IOB; note the staggering of indices
415421 i0 = is - isc_bnd ; j0 = js - jsc_bnd
416422 do j= js,je ; do i= is,ie
@@ -425,17 +431,14 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, G, US, CS, &
425431 fluxes% evap(i,j) = IOB% q_flux(i- i0,j- j0) * G% mask2dT(i,j)
426432
427433 ! liquid runoff flux
428- if (associated (IOB% rofl_flux)) then
429- fluxes% lrunoff(i,j) = IOB% rofl_flux(i- i0,j- j0) * G% mask2dT(i,j)
430- else if (associated (IOB% runoff)) then
431- fluxes% lrunoff(i,j) = IOB% runoff(i- i0,j- j0) * G% mask2dT(i,j)
434+ if (associated (IOB% lrunoff)) then
435+ if (CS% liquid_runoff_from_data)call data_override(' OCN' , ' runoff' , IOB% lrunoff, Time)
436+ fluxes% lrunoff(i,j) = IOB% lrunoff(i- i0,j- j0) * G% mask2dT(i,j)
432437 endif
433438
434439 ! ice runoff flux
435- if (associated (IOB% rofi_flux)) then
436- fluxes% frunoff(i,j) = IOB% rofi_flux(i- i0,j- j0) * G% mask2dT(i,j)
437- elseif (associated (IOB% calving)) then
438- fluxes% frunoff(i,j) = IOB% calving(i- i0,j- j0) * G% mask2dT(i,j)
440+ if (associated (IOB% frunoff)) then
441+ fluxes% frunoff(i,j) = IOB% frunoff(i- i0,j- j0) * G% mask2dT(i,j)
439442 endif
440443
441444 if (associated (IOB% ustar_berg)) &
@@ -447,11 +450,11 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, G, US, CS, &
447450 if (associated (IOB% mass_berg)) &
448451 fluxes% mass_berg(i,j) = IOB% mass_berg(i- i0,j- j0) * G% mask2dT(i,j)
449452
450- if (associated (IOB% runoff_hflx )) &
451- fluxes% heat_content_lrunoff(i,j) = IOB% runoff_hflx (i- i0,j- j0) * G% mask2dT(i,j)
453+ if (associated (IOB% lrunoff_hflx )) &
454+ fluxes% heat_content_lrunoff(i,j) = IOB% lrunoff_hflx (i- i0,j- j0) * G% mask2dT(i,j)
452455
453- if (associated (IOB% calving_hflx )) &
454- fluxes% heat_content_frunoff(i,j) = IOB% calving_hflx (i- i0,j- j0) * G% mask2dT(i,j)
456+ if (associated (IOB% frunoff_hflx )) &
457+ fluxes% heat_content_frunoff(i,j) = IOB% frunoff_hflx (i- i0,j- j0) * G% mask2dT(i,j)
455458
456459 if (associated (IOB% lw_flux)) &
457460 fluxes% LW(i,j) = IOB% lw_flux(i- i0,j- j0) * G% mask2dT(i,j)
@@ -472,9 +475,9 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, G, US, CS, &
472475 fluxes% latent(i,j) = fluxes% latent(i,j) + IOB% fprec(i- i0,j- j0)* CS% latent_heat_fusion
473476 fluxes% latent_fprec_diag(i,j) = G% mask2dT(i,j) * IOB% fprec(i- i0,j- j0)* CS% latent_heat_fusion
474477 endif
475- if (associated (IOB% calving )) then
476- fluxes% latent(i,j) = fluxes% latent(i,j) + IOB% calving (i- i0,j- j0)* CS% latent_heat_fusion
477- fluxes% latent_frunoff_diag(i,j) = G% mask2dT(i,j) * IOB% calving (i- i0,j- j0)* CS% latent_heat_fusion
478+ if (associated (IOB% frunoff )) then
479+ fluxes% latent(i,j) = fluxes% latent(i,j) + IOB% frunoff (i- i0,j- j0)* CS% latent_heat_fusion
480+ fluxes% latent_frunoff_diag(i,j) = G% mask2dT(i,j) * IOB% frunoff (i- i0,j- j0)* CS% latent_heat_fusion
478481 endif
479482 if (associated (IOB% q_flux)) then
480483 fluxes% latent(i,j) = fluxes% latent(i,j) + IOB% q_flux(i- i0,j- j0)* CS% latent_heat_vapor
@@ -1262,7 +1265,12 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,
12621265 call get_param(param_file, mdl, " ALLOW_FLUX_ADJUSTMENTS" , CS% allow_flux_adjustments, &
12631266 " If true, allows flux adjustments to specified via the " // &
12641267 " data_table using the component name 'OCN'." , default= .false. )
1265- if (CS% allow_flux_adjustments) then
1268+
1269+ call get_param(param_file, mdl, " LIQUID_RUNOFF_FROM_DATA" , CS% liquid_runoff_from_data, &
1270+ " If true, allows liquid river runoff to be specified via the " // &
1271+ " data_table using the component name 'OCN'." , default= .false. )
1272+
1273+ if (CS% allow_flux_adjustments .or. CS% liquid_runoff_from_data) then
12661274 call data_override_init(Ocean_domain_in= G% Domain% mpp_domain)
12671275 endif
12681276
@@ -1352,8 +1360,8 @@ subroutine ice_ocn_bnd_type_chksum(id, timestep, iobt)
13521360 write (outunit,100 ) ' iobt%sw_flux_nir_dif' , mpp_chksum( iobt% sw_flux_nir_dif)
13531361 write (outunit,100 ) ' iobt%lprec ' , mpp_chksum( iobt% lprec )
13541362 write (outunit,100 ) ' iobt%fprec ' , mpp_chksum( iobt% fprec )
1355- write (outunit,100 ) ' iobt%runoff ' , mpp_chksum( iobt% runoff )
1356- write (outunit,100 ) ' iobt%calving ' , mpp_chksum( iobt% calving )
1363+ write (outunit,100 ) ' iobt%lrunoff ' , mpp_chksum( iobt% lrunoff )
1364+ write (outunit,100 ) ' iobt%frunoff ' , mpp_chksum( iobt% frunoff )
13571365 write (outunit,100 ) ' iobt%p ' , mpp_chksum( iobt% p )
13581366 if (associated (iobt% ustar_berg)) &
13591367 write (outunit,100 ) ' iobt%ustar_berg ' , mpp_chksum( iobt% ustar_berg )
0 commit comments