@@ -23,8 +23,8 @@ module GFS_surface_composites_post
2323! ! \htmlinclude GFS_surface_composites_post_run.html
2424! !
2525 subroutine GFS_surface_composites_post_run ( &
26- im , kice , km , rd , rvrdm1 , cplflx , cplwav2atm , cpl_fire , frac_grid , flag_cice , thsfc_loc , islmsk , dry , wet , icy , wind , t1 , q1 , prsl1 , &
27- landfrac , lakefrac , oceanfrac , zorl , zorlo , zorll , zorli , garea , frac_ice , &
26+ im , kice , km , rd , rvrdm1 , cplflx , cplwav2atm , cpl_fire , frac_grid , flag_cice , thsfc_loc , islmsk , dry , wet , icy , &
27+ use_cdeps_data , mask_dat , wind , t1 , q1 , prsl1 , landfrac , lakefrac , oceanfrac , zorl , zorlo , zorll , zorli , garea , frac_ice , &
2828 cd , cd_wat , cd_lnd , cd_ice , cdq , cdq_wat , cdq_lnd , cdq_ice , rb , rb_wat , rb_lnd , rb_ice , stress , stress_wat , stress_lnd , &
2929 stress_ice , ffmm , ffmm_wat , ffmm_lnd , ffmm_ice , ffhh , ffhh_wat , ffhh_lnd , ffhh_ice , uustar , uustar_wat , uustar_lnd , &
3030 uustar_ice , fm10 , fm10_wat , fm10_lnd , fm10_ice , fh2 , fh2_wat , fh2_lnd , fh2_ice , tsurf_wat , tsurf_lnd , tsurf_ice , &
@@ -39,7 +39,7 @@ subroutine GFS_surface_composites_post_run (
3939
4040 integer , intent (in ) :: im, kice, km, lkm, iopt_lake, iopt_lake_clm
4141 logical , intent (in ) :: cplflx, frac_grid, cplwav2atm, frac_ice, cpl_fire
42- logical , intent (in ) :: lheatstrg
42+ logical , intent (in ) :: lheatstrg, use_cdeps_data
4343 logical , dimension (:), intent (in ) :: flag_cice, dry, icy
4444 logical , dimension (:), intent (in ) :: wet
4545 integer , dimension (:), intent (in ) :: islmsk, use_lake_model
@@ -51,7 +51,7 @@ subroutine GFS_surface_composites_post_run (
5151 snowd_lnd, snowd_ice, tprcp_wat, tprcp_lnd, tprcp_ice, evap_wat, evap_lnd, evap_ice, hflx_wat, hflx_lnd, &
5252 hflx_ice, qss_wat, qss_lnd, qss_ice, tsfc_wat, zorlo, zorll, zorli, garea
5353
54- real (kind= kind_phys), dimension (:), intent (in ), optional :: hflx_fire, evap_fire
54+ real (kind= kind_phys), dimension (:), intent (in ), optional :: hflx_fire, evap_fire, mask_dat
5555 real (kind= kind_phys), dimension (:), intent (inout ) :: zorl, cd, cdq, rb, stress, ffmm, ffhh, uustar, fm10, &
5656 fh2, cmm, chh, gflx, ep1d, weasd, snowd, tprcp, evap, hflx, qss, tsfc, tsfco, tsfcl, tisfc
5757
@@ -240,7 +240,14 @@ subroutine GFS_surface_composites_post_run (
240240 if (icy(i)) then
241241 ! tisfc(i) = tisfc(i) ! over lake or ocean ice when uncoupled
242242 elseif (wet(i)) then
243- tisfc(i) = tsfc_wat(i) ! over lake or ocean when uncoupled
243+ ! don't overwrite surface skin temperature over ice when using CDEPS inline over the mask
244+ if (use_cdeps_data) then
245+ if (mask_dat(i) <= 0.0 ) then
246+ tisfc(i) = tsfc_wat(i) ! over lake or ocean when uncoupled
247+ endif
248+ else
249+ tisfc(i) = tsfc_wat(i) ! over lake or ocean when uncoupled
250+ endif
244251 else
245252 tisfc(i) = tsfcl(i) ! over land
246253 endif
@@ -256,9 +263,18 @@ subroutine GFS_surface_composites_post_run (
256263! tisfc(i) = tsfc(i)
257264! endif
258265! endif
266+
259267 if (.not. icy(i)) then
260- hice(i) = zero
261- cice(i) = zero
268+ ! don't overwrite sea ice thickness/fraction when using CDEPS inline over the mask
269+ if (use_cdeps_data) then
270+ if (mask_dat(i) <= 0.0 ) then
271+ hice(i) = zero
272+ cice(i) = zero
273+ endif
274+ else
275+ hice(i) = zero
276+ cice(i) = zero
277+ endif
262278 endif
263279 enddo
264280
@@ -339,7 +355,14 @@ subroutine composite_wet
339355 tsfco(i) = tsfc_wat(i) ! over lake (and ocean when uncoupled)
340356 tsfc(i) = tsfco(i)
341357 tsfcl(i) = tsfc(i)
342- tisfc(i) = tsfc(i)
358+ ! don't overwrite surface skin temperature over ice when using CDEPS inline over the mask
359+ if (use_cdeps_data) then
360+ if (mask_dat(i) <= 0.0 ) then
361+ tisfc(i) = tsfc(i)
362+ endif
363+ else
364+ tisfc(i) = tsfc(i)
365+ endif
343366 cmm(i) = cmm_wat(i)
344367 chh(i) = chh_wat(i)
345368 gflx(i) = gflx_wat(i)
@@ -349,8 +372,16 @@ subroutine composite_wet
349372 evap(i) = evap_wat(i)
350373 hflx(i) = hflx_wat(i)
351374 qss(i) = qss_wat(i)
352- hice(i) = zero
353- cice(i) = zero
375+ ! don't overwrite sea ice thickness/fraction when using CDEPS inline over the mask
376+ if (use_cdeps_data) then
377+ if (mask_dat(i) <= 0.0 ) then
378+ hice(i) = zero
379+ cice(i) = zero
380+ endif
381+ else
382+ hice(i) = zero
383+ cice(i) = zero
384+ endif
354385 end subroutine composite_wet
355386
356387 subroutine composite_icy (is_clm )
0 commit comments