Skip to content

Commit c7121e5

Browse files
Merge pull request mom-ocean#87 from gustavo-marques/update_mct_fluxes
Introduces additional fluxes used in the CESM framework
2 parents dd6cb7f + 4b81577 commit c7121e5

7 files changed

Lines changed: 231 additions & 94 deletions

File tree

config_src/mct_driver/MOM_surface_forcing.F90

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,13 @@ module MOM_surface_forcing
152152
! MOM-based coupled models.
153153
type, public :: ice_ocean_boundary_type
154154
real, pointer, dimension(:,:) :: latent_flux =>NULL() !< latent flux (W/m2)
155-
real, pointer, dimension(:,:) :: rofl_flux =>NULL() !< liquid runoff (W/m2)
156-
real, pointer, dimension(:,:) :: rofi_flux =>NULL() !< ice runoff (W/m2)
155+
real, pointer, dimension(:,:) :: rofl_flux =>NULL() !< liquid runoff (kg/m2/s)
156+
real, pointer, dimension(:,:) :: rofi_flux =>NULL() !< ice runoff (kg/m2/s)
157157
real, pointer, dimension(:,:) :: u_flux =>NULL() !< i-direction wind stress (Pa)
158158
real, pointer, dimension(:,:) :: v_flux =>NULL() !< j-direction wind stress (Pa)
159159
real, pointer, dimension(:,:) :: t_flux =>NULL() !< sensible heat flux (W/m2)
160+
real, pointer, dimension(:,:) :: melth =>NULL() !< sea ice and snow melt heat flux (W/m2)
161+
real, pointer, dimension(:,:) :: meltw =>NULL() !< water flux due to sea ice and snow melting (kg/m2/s)
160162
real, pointer, dimension(:,:) :: q_flux =>NULL() !< specific humidity flux (kg/m2/s)
161163
real, pointer, dimension(:,:) :: salt_flux =>NULL() !< salt flux (kg/m2/s)
162164
real, pointer, dimension(:,:) :: lw_flux =>NULL() !< long wave radiation (W/m2)
@@ -166,7 +168,6 @@ module MOM_surface_forcing
166168
real, pointer, dimension(:,:) :: sw_flux_nir_dif =>NULL() !< diffuse Near InfraRed sw radiation (W/m2)
167169
real, pointer, dimension(:,:) :: lprec =>NULL() !< mass flux of liquid precip (kg/m2/s)
168170
real, pointer, dimension(:,:) :: fprec =>NULL() !< mass flux of frozen precip (kg/m2/s)
169-
real, pointer, dimension(:,:) :: runoff =>NULL() !< mass flux of liquid runoff (kg/m2/s)
170171
real, pointer, dimension(:,:) :: calving =>NULL() !< mass flux of frozen runoff (kg/m2/s)
171172
real, pointer, dimension(:,:) :: ustar_berg =>NULL() !< frictional velocity beneath icebergs (m/s)
172173
real, pointer, dimension(:,:) :: area_berg =>NULL() !< area covered by icebergs(m2/m2)
@@ -443,6 +444,14 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, Time, G, CS, &
443444
if (associated(fluxes%sens)) &
444445
fluxes%sens(i,j) = G%mask2dT(i,j) * IOB%t_flux(i-i0,j-j0)
445446

447+
! sea ice and snow melt heat flux (W/m2)
448+
if (associated(fluxes%melth)) &
449+
fluxes%melth(i,j) = G%mask2dT(i,j) * IOB%melth(i-i0,j-j0)
450+
451+
! water flux due to sea ice and snow melt (kg/m2/s)
452+
if (associated(fluxes%meltw)) &
453+
fluxes%meltw(i,j) = G%mask2dT(i,j) * IOB%meltw(i-i0,j-j0)
454+
446455
! latent heat flux (W/m^2)
447456
if (associated(fluxes%latent)) &
448457
fluxes%latent(i,j) = G%mask2dT(i,j) * IOB%latent_flux(i-i0,j-j0)
@@ -474,7 +483,7 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, Time, G, CS, &
474483
sign_for_net_FW_bug = 1.
475484
if (CS%use_net_FW_adjustment_sign_bug) sign_for_net_FW_bug = -1.
476485
do j=js,je ; do i=is,ie
477-
net_FW(i,j) = (((fluxes%lprec(i,j) + fluxes%fprec(i,j)) + &
486+
net_FW(i,j) = (((fluxes%lprec(i,j) + fluxes%fprec(i,j) + fluxes%meltw(i,j)) + &
478487
(fluxes%lrunoff(i,j) + fluxes%frunoff(i,j))) + &
479488
(fluxes%evap(i,j) + fluxes%vprec(i,j)) ) * G%areaT(i,j)
480489
! The following contribution appears to be calculating the volume flux of sea-ice
@@ -483,9 +492,12 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, Time, G, CS, &
483492
! Bob thinks this is trying ensure the net fresh-water of the ocean + sea-ice system
484493
! is constant.
485494
! To do this correctly we will need a sea-ice melt field added to IOB. -AJA
486-
if (associated(IOB%salt_flux) .and. (CS%ice_salt_concentration>0.0)) &
487-
net_FW(i,j) = net_FW(i,j) + sign_for_net_FW_bug * G%areaT(i,j) * &
488-
(IOB%salt_flux(i-i0,j-j0) / CS%ice_salt_concentration)
495+
! GMM: as stated above, the following is wrong. CIME deals with volume/mass and
496+
! heat from sea ice/snow via meltw and melth, respectively.
497+
if (associated(fluxes%salt_flux) .and. (CS%ice_salt_concentration>0.0)) &
498+
net_FW(i,j) = net_FW(i,j) + G%areaT(i,j) * &
499+
(fluxes%salt_flux(i,j) / CS%ice_salt_concentration)
500+
489501
net_FW2(i,j) = net_FW(i,j)/G%areaT(i,j)
490502
enddo; enddo
491503

@@ -775,6 +787,8 @@ subroutine IOB_allocate(IOB, isc, iec, jsc, jec)
775787
IOB% u_flux (isc:iec,jsc:jec), &
776788
IOB% v_flux (isc:iec,jsc:jec), &
777789
IOB% t_flux (isc:iec,jsc:jec), &
790+
IOB% melth (isc:iec,jsc:jec), &
791+
IOB% meltw (isc:iec,jsc:jec), &
778792
IOB% q_flux (isc:iec,jsc:jec), &
779793
IOB% salt_flux (isc:iec,jsc:jec), &
780794
IOB% lw_flux (isc:iec,jsc:jec), &
@@ -784,7 +798,6 @@ subroutine IOB_allocate(IOB, isc, iec, jsc, jec)
784798
IOB% sw_flux_nir_dif (isc:iec,jsc:jec), &
785799
IOB% lprec (isc:iec,jsc:jec), &
786800
IOB% fprec (isc:iec,jsc:jec), &
787-
IOB% runoff (isc:iec,jsc:jec), &
788801
IOB% ustar_berg (isc:iec,jsc:jec), &
789802
IOB% area_berg (isc:iec,jsc:jec), &
790803
IOB% mass_berg (isc:iec,jsc:jec), &
@@ -800,6 +813,8 @@ subroutine IOB_allocate(IOB, isc, iec, jsc, jec)
800813
IOB%u_flux = 0.0
801814
IOB%v_flux = 0.0
802815
IOB%t_flux = 0.0
816+
IOB%melth = 0.0
817+
IOB%meltw = 0.0
803818
IOB%q_flux = 0.0
804819
IOB%salt_flux = 0.0
805820
IOB%lw_flux = 0.0
@@ -809,7 +824,6 @@ subroutine IOB_allocate(IOB, isc, iec, jsc, jec)
809824
IOB%sw_flux_nir_dif = 0.0
810825
IOB%lprec = 0.0
811826
IOB%fprec = 0.0
812-
IOB%runoff = 0.0
813827
IOB%ustar_berg = 0.0
814828
IOB%area_berg = 0.0
815829
IOB%mass_berg = 0.0
@@ -1320,7 +1334,11 @@ subroutine ice_ocn_bnd_type_chksum(id, timestep, iobt)
13201334
write(outunit,100) 'iobt%u_flux ', mpp_chksum( iobt%u_flux )
13211335
write(outunit,100) 'iobt%v_flux ', mpp_chksum( iobt%v_flux )
13221336
write(outunit,100) 'iobt%t_flux ', mpp_chksum( iobt%t_flux )
1337+
write(outunit,100) 'iobt%melth ', mpp_chksum( iobt%melth )
1338+
write(outunit,100) 'iobt%meltw ', mpp_chksum( iobt%meltw )
13231339
write(outunit,100) 'iobt%q_flux ', mpp_chksum( iobt%q_flux )
1340+
write(outunit,100) 'iobt%rofl_flux ', mpp_chksum( iobt%rofl_flux )
1341+
write(outunit,100) 'iobt%rofi_flux ', mpp_chksum( iobt%rofi_flux )
13241342
write(outunit,100) 'iobt%salt_flux ', mpp_chksum( iobt%salt_flux )
13251343
write(outunit,100) 'iobt%lw_flux ', mpp_chksum( iobt%lw_flux )
13261344
write(outunit,100) 'iobt%sw_flux_vis_dir', mpp_chksum( iobt%sw_flux_vis_dir)
@@ -1329,7 +1347,6 @@ subroutine ice_ocn_bnd_type_chksum(id, timestep, iobt)
13291347
write(outunit,100) 'iobt%sw_flux_nir_dif', mpp_chksum( iobt%sw_flux_nir_dif)
13301348
write(outunit,100) 'iobt%lprec ', mpp_chksum( iobt%lprec )
13311349
write(outunit,100) 'iobt%fprec ', mpp_chksum( iobt%fprec )
1332-
write(outunit,100) 'iobt%runoff ', mpp_chksum( iobt%runoff )
13331350
write(outunit,100) 'iobt%calving ', mpp_chksum( iobt%calving )
13341351
write(outunit,100) 'iobt%p ', mpp_chksum( iobt%p )
13351352
if (associated(iobt%ustar_berg)) &

config_src/mct_driver/ocn_cap_methods.F90

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ subroutine ocn_import(x2o, ind, grid, ice_ocean_boundary, ocean_public, logunit,
3333
real(kind=8), optional , intent(in) :: c1, c2, c3, c4 !< Coeffs. used in the shortwave decomposition
3434

3535
! Local variables
36-
integer :: i, j, ig, jg, isc, iec, jsc, jec ! Grid indices
36+
integer :: i, j, isc, iec, jsc, jec ! Grid indices
3737
integer :: k
3838
integer :: day, secs, rc
3939
type(ESMF_time) :: currTime
@@ -44,9 +44,7 @@ subroutine ocn_import(x2o, ind, grid, ice_ocean_boundary, ocean_public, logunit,
4444

4545
k = 0
4646
do j = jsc, jec
47-
jg = j + grid%jsc - jsc
4847
do i = isc, iec
49-
ig = i + grid%jsc - isc
5048
k = k + 1 ! Increment position within gindex
5149

5250
! taux
@@ -65,41 +63,47 @@ subroutine ocn_import(x2o, ind, grid, ice_ocean_boundary, ocean_public, logunit,
6563
ice_ocean_boundary%lw_flux(i,j) = (x2o(ind%x2o_Faxa_lwdn,k) + x2o(ind%x2o_Foxx_lwup,k))
6664

6765
! specific humitidy flux
68-
ice_ocean_boundary%q_flux(i,j) = x2o(ind%x2o_Foxx_evap,k) !???TODO: should this be a minus sign
66+
ice_ocean_boundary%q_flux(i,j) = x2o(ind%x2o_Foxx_evap,k)
6967

7068
! sensible heat flux (W/m2)
71-
ice_ocean_boundary%t_flux(i,j) = x2o(ind%x2o_Foxx_sen,k) !???TODO: should this be a minus sign
69+
ice_ocean_boundary%t_flux(i,j) = x2o(ind%x2o_Foxx_sen,k)
7270

7371
! latent heat flux (W/m^2)
74-
ice_ocean_boundary%latent_flux(i,j) = x2o(ind%x2o_Foxx_lat,k) !???TODO: should this be a minus sign
72+
ice_ocean_boundary%latent_flux(i,j) = x2o(ind%x2o_Foxx_lat,k)
73+
74+
! snow&ice melt heat flux (W/m^2)
75+
ice_ocean_boundary%melth(i,j) = x2o(ind%x2o_Fioi_melth,k)
76+
77+
! water flux from snow&ice melt (kg/m2/s)
78+
ice_ocean_boundary%meltw(i,j) = x2o(ind%x2o_Fioi_meltw,k)
7579

7680
! liquid runoff
77-
ice_ocean_boundary%rofl_flux(i,j) = x2o(ind%x2o_Foxx_rofl,k) * GRID%mask2dT(ig,jg)
81+
ice_ocean_boundary%rofl_flux(i,j) = x2o(ind%x2o_Foxx_rofl,k) * GRID%mask2dT(i,j)
7882

7983
! ice runoff
80-
ice_ocean_boundary%rofi_flux(i,j) = x2o(ind%x2o_Foxx_rofi,k) * GRID%mask2dT(ig,jg)
84+
ice_ocean_boundary%rofi_flux(i,j) = x2o(ind%x2o_Foxx_rofi,k) * GRID%mask2dT(i,j)
8185

8286
! surface pressure
83-
ice_ocean_boundary%p(i,j) = x2o(ind%x2o_Sa_pslv,k) * GRID%mask2dT(ig,jg)
87+
ice_ocean_boundary%p(i,j) = x2o(ind%x2o_Sa_pslv,k) * GRID%mask2dT(i,j)
8488

8589
! salt flux (minus sign needed here -GMM)
86-
ice_ocean_boundary%salt_flux(i,j) = -x2o(ind%x2o_Fioi_salt,k) * GRID%mask2dT(ig,jg)
90+
ice_ocean_boundary%salt_flux(i,j) = -x2o(ind%x2o_Fioi_salt,k) * GRID%mask2dT(i,j)
8791

8892
! 1) visible, direct shortwave (W/m2)
8993
! 2) visible, diffuse shortwave (W/m2)
9094
! 3) near-IR, direct shortwave (W/m2)
9195
! 4) near-IR, diffuse shortwave (W/m2)
9296
if (present(c1) .and. present(c2) .and. present(c3) .and. present(c4)) then
9397
! Use runtime coefficients to decompose net short-wave heat flux into 4 components
94-
ice_ocean_boundary%sw_flux_vis_dir(i,j) = x2o(ind%x2o_Foxx_swnet,k) * c1 * GRID%mask2dT(ig,jg)
95-
ice_ocean_boundary%sw_flux_vis_dif(i,j) = x2o(ind%x2o_Foxx_swnet,k) * c2 * GRID%mask2dT(ig,jg)
96-
ice_ocean_boundary%sw_flux_nir_dir(i,j) = x2o(ind%x2o_Foxx_swnet,k) * c3 * GRID%mask2dT(ig,jg)
97-
ice_ocean_boundary%sw_flux_nir_dif(i,j) = x2o(ind%x2o_Foxx_swnet,k) * c4 * GRID%mask2dT(ig,jg)
98+
ice_ocean_boundary%sw_flux_vis_dir(i,j) = x2o(ind%x2o_Foxx_swnet,k) * c1 * GRID%mask2dT(i,j)
99+
ice_ocean_boundary%sw_flux_vis_dif(i,j) = x2o(ind%x2o_Foxx_swnet,k) * c2 * GRID%mask2dT(i,j)
100+
ice_ocean_boundary%sw_flux_nir_dir(i,j) = x2o(ind%x2o_Foxx_swnet,k) * c3 * GRID%mask2dT(i,j)
101+
ice_ocean_boundary%sw_flux_nir_dif(i,j) = x2o(ind%x2o_Foxx_swnet,k) * c4 * GRID%mask2dT(i,j)
98102
else
99-
ice_ocean_boundary%sw_flux_vis_dir(i,j) = x2o(ind%x2o_Faxa_swvdr,k) * GRID%mask2dT(ig,jg)
100-
ice_ocean_boundary%sw_flux_vis_dif(i,j) = x2o(ind%x2o_Faxa_swvdf,k) * GRID%mask2dT(ig,jg)
101-
ice_ocean_boundary%sw_flux_nir_dir(i,j) = x2o(ind%x2o_Faxa_swndr,k) * GRID%mask2dT(ig,jg)
102-
ice_ocean_boundary%sw_flux_nir_dif(i,j) = x2o(ind%x2o_Faxa_swndf,k) * GRID%mask2dT(ig,jg)
103+
ice_ocean_boundary%sw_flux_vis_dir(i,j) = x2o(ind%x2o_Faxa_swvdr,k) * GRID%mask2dT(i,j)
104+
ice_ocean_boundary%sw_flux_vis_dif(i,j) = x2o(ind%x2o_Faxa_swvdf,k) * GRID%mask2dT(i,j)
105+
ice_ocean_boundary%sw_flux_nir_dir(i,j) = x2o(ind%x2o_Faxa_swndr,k) * GRID%mask2dT(i,j)
106+
ice_ocean_boundary%sw_flux_nir_dif(i,j) = x2o(ind%x2o_Faxa_swndf,k) * GRID%mask2dT(i,j)
103107
endif
104108
enddo
105109
enddo
@@ -116,6 +120,8 @@ subroutine ocn_import(x2o, ind, grid, ice_ocean_boundary, ocean_public, logunit,
116120
write(logunit,F01)'import: day, secs, j, i, lwrad = ',day,secs,j,i,ice_ocean_boundary%lw_flux(i,j)
117121
write(logunit,F01)'import: day, secs, j, i, q_flux = ',day,secs,j,i,ice_ocean_boundary%q_flux(i,j)
118122
write(logunit,F01)'import: day, secs, j, i, t_flux = ',day,secs,j,i,ice_ocean_boundary%t_flux(i,j)
123+
write(logunit,F01)'import: day, secs, j, i, melth = ',day,secs,j,i,ice_ocean_boundary%melth(i,j)
124+
write(logunit,F01)'import: day, secs, j, i, meltw = ',day,secs,j,i,ice_ocean_boundary%meltw(i,j)
119125
write(logunit,F01)'import: day, secs, j, i, latent_flux = ',&
120126
day,secs,j,i,ice_ocean_boundary%latent_flux(i,j)
121127
write(logunit,F01)'import: day, secs, j, i, runoff = ',&

config_src/mct_driver/ocn_comp_mct.F90

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,8 +773,6 @@ end subroutine ocean_model_init_sfc
773773
!! mi, mass of ice (kg/m2)
774774
!!
775775
!! Variables in the coupler that are **NOT** used in MOM6 (i.e., no corresponding field in fluxes):
776-
!! x2o_Fioi_melth, heat flux from snow & ice melt (W/m2)
777-
!! x2o_Fioi_meltw, snow melt flux (kg/m2/s)
778776
!! x2o_Si_ifrac, fractional ice wrt ocean
779777
!! x2o_So_duu10n, 10m wind speed squared (m^2/s^2)
780778
!! x2o_Sa_co2prog, bottom atm level prognostic CO2

config_src/mct_driver/ocn_cpl_indices.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module ocn_cpl_indices
4141
integer :: x2o_Faxa_swndr !< near-IR, direct shortwave (W/m2)
4242
integer :: x2o_Faxa_swndf !< near-IR, direct shortwave (W/m2)
4343
integer :: x2o_Fioi_melth !< Heat flux from snow & ice melt (W/m2)
44-
integer :: x2o_Fioi_meltw !< Snow melt flux (kg/m2/s)
44+
integer :: x2o_Fioi_meltw !< Water flux from sea ice and snow melt (kg/m2/s)
4545
integer :: x2o_Fioi_bcpho !< Black Carbon hydrophobic release from sea ice component
4646
integer :: x2o_Fioi_bcphi !< Black Carbon hydrophilic release from sea ice component
4747
integer :: x2o_Fioi_flxdst !< Dust release from sea ice component

0 commit comments

Comments
 (0)