Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
028cc60
initial implementation sfc_data
uturuncoglu Jan 25, 2024
792b639
add diagnostics
uturuncoglu Feb 23, 2024
a969802
update sst
uturuncoglu Feb 26, 2024
c61a6c5
more work for inline data
uturuncoglu Jul 12, 2024
5606f6f
Merge remote-tracking branch 'upstream/ufs/dev' into feature/cdeps_data
uturuncoglu Jul 12, 2024
2f3d5ff
move sfc_data file to subdirectory
uturuncoglu Jul 12, 2024
e8d9b89
fix surface data
uturuncoglu Jul 15, 2024
0ec1a5f
update scheme
uturuncoglu Oct 18, 2024
6d76b01
Merge remote-tracking branch 'upstream/ufs/dev' into feature/inline_sync
uturuncoglu Jul 9, 2025
41f6532
clean code
uturuncoglu Jul 13, 2025
56acc97
convert to F90
uturuncoglu Jul 28, 2025
1f02953
Merge remote-tracking branch 'upstream/ufs/dev' into feature/inline_sync
uturuncoglu Jul 28, 2025
9942a2b
minor change in metadata
uturuncoglu Jul 29, 2025
e980b16
Merge remote-tracking branch 'origin/ufs/dev' into feature/inline_sync
uturuncoglu Sep 18, 2025
c5313a8
Merge remote-tracking branch 'upstream/ufs/dev' into feature/inline_sync
uturuncoglu Oct 15, 2025
1105017
try different method using CDEPS inline surface data
grantfirl Nov 4, 2025
a158fe8
add declarations in GFS_surface_composites_post.F90
grantfirl Nov 5, 2025
0fc46df
Merge branch 'ufs/dev' into feature/inline_sync_gjf
grantfirl Nov 14, 2025
f469324
remove sfc_data
grantfirl Nov 14, 2025
34cd6bd
fix bug in GFS_surface_composites_pre.F90
grantfirl Nov 19, 2025
c61da12
add after_iteration variables to those set from FVCOM in GFS_surface_…
grantfirl Nov 21, 2025
51a3643
protect after_iteration variables in clm_lake.f90
grantfirl Dec 1, 2025
997cf11
add Ananyo's changes to GFS_surface_composites_pre.F90
grantfirl Dec 12, 2025
1ebfcc5
Merge branch 'ufs/dev' into feature/inline_sync_gjf
grantfirl Dec 12, 2025
3576382
Merge pull request #2 from grantfirl/feature/inline_sync_gjf
uturuncoglu Dec 27, 2025
6cf9170
Merge remote-tracking branch 'upstream/ufs/dev' into feature/inline_sync
uturuncoglu Dec 27, 2025
e407042
Merge remote-tracking branch 'upstream/ufs/dev' into feature/inline_sync
uturuncoglu Jan 8, 2026
efaae48
fix bug in GFS_surface_composites_pre.F90
grantfirl Jan 12, 2026
f3f47d2
Merge pull request #3 from grantfirl/feature/inline_sync_gjf2
uturuncoglu Jan 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ module GFS_surface_composites_post
!! \htmlinclude GFS_surface_composites_post_run.html
!!
subroutine GFS_surface_composites_post_run ( &
im, kice, km, rd, rvrdm1, cplflx, cplwav2atm, cpl_fire, frac_grid, flag_cice, thsfc_loc, islmsk, dry, wet, icy, wind, t1, q1, prsl1, &
landfrac, lakefrac, oceanfrac, zorl, zorlo, zorll, zorli, garea, frac_ice, &
im, kice, km, rd, rvrdm1, cplflx, cplwav2atm, cpl_fire, frac_grid, flag_cice, thsfc_loc, islmsk, dry, wet, icy, &
use_cdeps_data, mask_dat, wind, t1, q1, prsl1, landfrac, lakefrac, oceanfrac, zorl, zorlo, zorll, zorli, garea, frac_ice, &
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, &
stress_ice, ffmm, ffmm_wat, ffmm_lnd, ffmm_ice, ffhh, ffhh_wat, ffhh_lnd, ffhh_ice, uustar, uustar_wat, uustar_lnd, &
uustar_ice, fm10, fm10_wat, fm10_lnd, fm10_ice, fh2, fh2_wat, fh2_lnd, fh2_ice, tsurf_wat, tsurf_lnd, tsurf_ice, &
Expand All @@ -39,7 +39,7 @@ subroutine GFS_surface_composites_post_run (

integer, intent(in) :: im, kice, km, lkm, iopt_lake, iopt_lake_clm
logical, intent(in) :: cplflx, frac_grid, cplwav2atm, frac_ice, cpl_fire
logical, intent(in) :: lheatstrg
logical, intent(in) :: lheatstrg, use_cdeps_data
logical, dimension(:), intent(in) :: flag_cice, dry, icy
logical, dimension(:), intent(in) :: wet
integer, dimension(:), intent(in) :: islmsk, use_lake_model
Expand All @@ -51,7 +51,7 @@ subroutine GFS_surface_composites_post_run (
snowd_lnd, snowd_ice, tprcp_wat, tprcp_lnd, tprcp_ice, evap_wat, evap_lnd, evap_ice, hflx_wat, hflx_lnd, &
hflx_ice, qss_wat, qss_lnd, qss_ice, tsfc_wat, zorlo, zorll, zorli, garea

real(kind=kind_phys), dimension(:), intent(in), optional :: hflx_fire, evap_fire
real(kind=kind_phys), dimension(:), intent(in), optional :: hflx_fire, evap_fire, mask_dat
real(kind=kind_phys), dimension(:), intent(inout) :: zorl, cd, cdq, rb, stress, ffmm, ffhh, uustar, fm10, &
fh2, cmm, chh, gflx, ep1d, weasd, snowd, tprcp, evap, hflx, qss, tsfc, tsfco, tsfcl, tisfc

Expand Down Expand Up @@ -240,7 +240,14 @@ subroutine GFS_surface_composites_post_run (
if (icy(i)) then
!tisfc(i) = tisfc(i) ! over lake or ocean ice when uncoupled
elseif (wet(i)) then
tisfc(i) = tsfc_wat(i) ! over lake or ocean when uncoupled
!don't overwrite surface skin temperature over ice when using CDEPS inline over the mask
if (use_cdeps_data) then
if (mask_dat(i) <= 0.0) then
tisfc(i) = tsfc_wat(i) ! over lake or ocean when uncoupled
endif
else
tisfc(i) = tsfc_wat(i) ! over lake or ocean when uncoupled
endif
else
tisfc(i) = tsfcl(i) ! over land
endif
Expand All @@ -256,9 +263,18 @@ subroutine GFS_surface_composites_post_run (
! tisfc(i) = tsfc(i)
! endif
! endif

if (.not. icy(i)) then
hice(i) = zero
cice(i) = zero
!don't overwrite sea ice thickness/fraction when using CDEPS inline over the mask
if (use_cdeps_data) then
if (mask_dat(i) <= 0.0) then
hice(i) = zero
cice(i) = zero
endif
else
hice(i) = zero
cice(i) = zero
endif
endif
enddo

Expand Down Expand Up @@ -339,7 +355,14 @@ subroutine composite_wet
tsfco(i) = tsfc_wat(i) ! over lake (and ocean when uncoupled)
tsfc(i) = tsfco(i)
tsfcl(i) = tsfc(i)
tisfc(i) = tsfc(i)
!don't overwrite surface skin temperature over ice when using CDEPS inline over the mask
if (use_cdeps_data) then
if (mask_dat(i) <= 0.0) then
tisfc(i) = tsfc(i)
endif
else
tisfc(i) = tsfc(i)
endif
cmm(i) = cmm_wat(i)
chh(i) = chh_wat(i)
gflx(i) = gflx_wat(i)
Expand All @@ -349,8 +372,16 @@ subroutine composite_wet
evap(i) = evap_wat(i)
hflx(i) = hflx_wat(i)
qss(i) = qss_wat(i)
hice(i) = zero
cice(i) = zero
!don't overwrite sea ice thickness/fraction when using CDEPS inline over the mask
if (use_cdeps_data) then
if (mask_dat(i) <= 0.0) then
hice(i) = zero
cice(i) = zero
endif
else
hice(i) = zero
cice(i) = zero
endif
end subroutine composite_wet

subroutine composite_icy(is_clm)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,22 @@
dimensions = (horizontal_loop_extent)
type = logical
intent = in
[use_cdeps_data]
standard_name = do_cdeps_inline
long_name = flag for using data provided by CDEPS inline (default false)
units = flag
dimensions = ()
type = logical
intent = in
[mask_dat]
standard_name = land_sea_mask_from_data
long_name = landmask
units = flag
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
optional = True
[wind]
standard_name = wind_speed_at_lowest_model_layer
long_name = wind speed at lowest model level
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ module GFS_surface_composites_pre
!! \htmlinclude GFS_surface_composites_pre_run.html
!!
subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, iopt_lake, iopt_lake_clm, &
flag_cice, cplflx, cplice, cplwav2atm, lsm, lsm_ruc, &
flag_cice, cplflx, cplice, cplwav2atm, lsm, lsm_ruc, use_cdeps_data, mask_dat, &
tsfco_dat, tice_dat, hice_dat, fice_dat, &
landfrac, lakefrac, lakedepth, oceanfrac, frland, &
dry, icy, lake, use_lake_model, wet, hice, cice, zorlo, zorll, zorli, &
snowd, snowd_lnd, snowd_ice, tprcp, tprcp_wat, tgrs1, &
Expand All @@ -35,15 +36,17 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, iopt_lake, iopt_l

! Interface variables
integer, intent(in ) :: im, lkm, kdt, lsm, lsm_ruc, iopt_lake, iopt_lake_clm
logical, intent(in ) :: cplflx, cplice, cplwav2atm, frac_grid
logical, intent(in ) :: cplflx, cplice, cplwav2atm, frac_grid, use_cdeps_data
logical, dimension(:), intent(inout) :: flag_cice
logical, dimension(:), intent(inout) :: dry, icy, lake, wet
integer, dimension(:), intent(in ) :: use_lake_model
real(kind=kind_phys), dimension(:), intent(in ) :: landfrac, lakefrac, lakedepth, oceanfrac
real(kind=kind_phys), dimension(:), intent(in ), optional :: mask_dat
real(kind=kind_phys), dimension(:), intent(in ), optional :: fice_dat, hice_dat, tsfco_dat, tice_dat
real(kind=kind_phys), dimension(:), intent(inout) :: cice, hice
real(kind=kind_phys), dimension(:), intent( out) :: frland
real(kind=kind_phys), dimension(:), intent(in ) :: snowd, tprcp, uustar, weasd, qss, tisfc

real(kind=kind_phys), dimension(:), intent(in ) :: snowd, tprcp, uustar, weasd, qss
real(kind=kind_phys), dimension(:), intent(inout) :: tisfc
real(kind=kind_phys), dimension(:), intent(inout) :: tsfc, tsfco, tsfcl
real(kind=kind_phys), dimension(:), intent(inout) :: tgrs1
real(kind=kind_phys), dimension(:), intent(inout) :: snowd_lnd, snowd_ice, tprcp_wat, &
Expand Down Expand Up @@ -72,6 +75,19 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, iopt_lake, iopt_l
! Initialize CCPP error handling variables
errmsg = ''
errflg = 0

if (use_cdeps_data) then
do i=1,im
if (mask_dat(i) > 0.0) then
tisfc(i) = tice_dat(i)
tsurf_ice(i) = tice_dat(i)
hice(i) = hice_dat(i)
cice(i) = fice_dat(i)
tsfc_wat(i) = tsfco_dat(i)
tsurf_wat(i) = tsfco_dat(i)
endif
enddo
endif

do i=1,im
if(use_lake_model(i) > 0) then
Expand Down Expand Up @@ -188,6 +204,20 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, iopt_lake, iopt_l
write(0,1013) i,tsfco(i),slmsk(i),cice(i),islmsk(i),islmsk_cice(i),oceanfrac(i),cplice,icy(i),cplflx
tsfco(i) = tgrs1(i)
endif
!Set icy conditions according to CDEPS GL (Oceanfrac > 0)
if (use_cdeps_data) then
if (mask_dat(i) > 0.0) then
if (cice(i) >= min_lakeice) then
icy(i) = .true.
islmsk(i) = 2
else
icy(i) = .false.
cice(i) = zero
hice(i) = zero
islmsk(i) = 0
endif
endif
endif
else ! Not ocean and not land
is_clm = lkm>0 .and. iopt_lake==iopt_lake_clm .and. use_lake_model(i)>0
if (cice(i) >= min_lakeice) then
Expand Down Expand Up @@ -224,9 +254,16 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, iopt_lake, iopt_l

if (wet(i)) then ! Water
uustar_wat(i) = uustar(i)
if (use_cdeps_data) then
if (mask_dat(i) <= 0.0) then
tsfc_wat(i) = tsfco(i)
tsurf_wat(i) = tsfco(i)
endif
else
tsfc_wat(i) = tsfco(i)
tsurf_wat(i) = tsfco(i)
zorlo(i) = max(1.0e-5, min(one, zorlo(i)))
tsurf_wat(i) = tsfco(i)
endif
zorlo(i) = max(1.0e-5, min(one, zorlo(i)))
! DH*
else
zorlo(i) = huge
Expand All @@ -251,10 +288,10 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, iopt_lake, iopt_l
if(lsm /= lsm_ruc .and. .not.is_clm) then
weasd_ice(i) = weasd(i)
endif
tsurf_ice(i) = tisfc(i)
ep1d_ice(i) = zero
gflx_ice(i) = zero
zorli(i) = max(1.0e-5, min(one, zorli(i)))
tsurf_ice(i) = tisfc(i)
ep1d_ice(i) = zero
gflx_ice(i) = zero
zorli(i) = max(1.0e-5, min(one, zorli(i)))
! DH*
else
zorli(i) = huge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,58 @@
dimensions = ()
type = integer
intent = in
[use_cdeps_data]
standard_name = do_cdeps_inline
long_name = flag for using data provided by CDEPS inline (default false)
units = flag
dimensions = ()
type = logical
intent = in
[mask_dat]
standard_name = land_sea_mask_from_data
long_name = landmask
units = flag
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
optional = True
[tsfco_dat]
standard_name = sea_surface_temperature_from_data
long_name = sfc temperature
units = K
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
optional = True
[tice_dat]
standard_name = surface_skin_temperature_over_ice_from_data
long_name = surface skin temperature over ice
units = K
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
optional = True
[hice_dat]
standard_name = sea_ice_thickness_from_data
long_name = sea-ice thickness
units = m
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
optional = True
[fice_dat]
standard_name = sea_ice_area_fraction_of_sea_area_fraction_from_data
long_name = sea-ice concentration [0,1]
units = frac
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
optional = True
[landfrac]
standard_name = land_area_fraction
long_name = fraction of horizontal grid area occupied by land
Expand Down Expand Up @@ -366,7 +418,7 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
intent = inout
[tsurf_wat]
standard_name = surface_skin_temperature_after_iteration_over_water
long_name = surface skin temperature after iteration over water
Expand Down
Loading