Skip to content

Commit eae1ca6

Browse files
committed
changes to GFS_typedefs for CDEPS inline (ufs-dev PR#298)
1 parent 5b72914 commit eae1ca6

File tree

4 files changed

+83
-3
lines changed

4 files changed

+83
-3
lines changed

.gitmodules

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
branch = develop
55
[submodule "ccpp-physics"]
66
path = ccpp/physics
7-
url = https://github.com/NCAR/ccpp-physics
8-
branch = main
7+
#url = https://github.com/NCAR/ccpp-physics
8+
#branch = main
9+
url = https://github.com/grantfirl/ccpp-physics
10+
branch = ufs-dev-PR298
911
[submodule "CMakeModules"]
1012
path = CMakeModules
1113
url = https://github.com/noaa-emc/CMakeModules

scm/src/GFS_typedefs.F90

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,13 @@ module GFS_typedefs
678678
!-- prognostic updraft area fraction coupling in convection
679679
real (kind=kind_phys), pointer :: dqdt_qmicro(:,:) => null() !< instantanious microphysics tendency to be passed from MP to convection
680680

681+
!-- lake surface temperature from cdeps inline
682+
real (kind=kind_phys), pointer :: mask_dat (:) => null() !< land-sea mask from cdeps inline
683+
real (kind=kind_phys), pointer :: tsfco_dat (:) => null() !< sfc temperature from cdeps inline
684+
real (kind=kind_phys), pointer :: tice_dat (:) => null() !< sfc temperature over ice from cdeps inline
685+
real (kind=kind_phys), pointer :: hice_dat (:) => null() !< sfc ice thickness from cdeps inline
686+
real (kind=kind_phys), pointer :: fice_dat (:) => null() !< sfc ice fraction from cdeps inline
687+
681688
contains
682689
procedure :: create => coupling_create !< allocate array data
683690
end type GFS_coupling_type
@@ -795,6 +802,9 @@ module GFS_typedefs
795802
logical :: cpl_imp_dbg !< default no write import data to file post merge
796803
logical :: use_med_flux !< default .false. - i.e. don't use atmosphere-ocean fluxes imported from mediator
797804

805+
!--- cdeps inline parameters
806+
logical :: use_cdeps_inline !< default .false. - i.e. don't use data provided by CDEPS inline
807+
798808
!--- integrated dynamics through earth's atmosphere
799809
logical :: lsidea
800810

@@ -3395,6 +3405,19 @@ subroutine coupling_create (Coupling, Model)
33953405
Coupling%qci_conv = clear_val
33963406
endif
33973407

3408+
if (Model%use_cdeps_inline) then
3409+
allocate (Coupling%tsfco_dat(IM))
3410+
Coupling%tsfco_dat = clear_val
3411+
allocate (Coupling%mask_dat(IM))
3412+
Coupling%mask_dat = clear_val
3413+
allocate (Coupling%tice_dat(IM))
3414+
Coupling%tice_dat = clear_val
3415+
allocate (Coupling%hice_dat(IM))
3416+
Coupling%hice_dat = clear_val
3417+
allocate (Coupling%fice_dat(IM))
3418+
Coupling%fice_dat = clear_val
3419+
end if
3420+
33983421
end subroutine coupling_create
33993422

34003423

@@ -3498,6 +3521,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, &
34983521
logical :: cpl_imp_dbg = .false. !< default no write import data to file post merge
34993522
logical :: use_med_flux = .false. !< default no atmosphere-ocean fluxes from mediator
35003523

3524+
!--- cdeps inline parameters
3525+
logical :: use_cdeps_inline = .false. !< default no data from cdeps inline
3526+
35013527
!--- integrated dynamics through earth's atmosphere
35023528
logical :: lsidea = .false.
35033529

@@ -4195,6 +4221,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, &
41954221
#else
41964222
lsidea, use_med_flux, &
41974223
#endif
4224+
!--- cdeps inline parameters
4225+
use_cdeps_inline, &
41984226
!--- radiation parameters
41994227
fhswr, fhlwr, levr, nfxr, iaerclm, iflip, isol, ico2, ialb, &
42004228
isot, iems, iaer, icliq_sw, iovr, ictm, isubc_sw, &
@@ -4679,6 +4707,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, &
46794707
Model%cpl_imp_dbg = cpl_imp_dbg
46804708
Model%use_med_flux = use_med_flux
46814709

4710+
!--- cdeps inline parameters
4711+
Model%use_cdeps_inline = use_cdeps_inline
4712+
46824713
!--- RRFS-SD
46834714
Model%rrfs_sd = rrfs_sd
46844715
Model%cpl_fire = cpl_fire
@@ -6917,6 +6948,7 @@ subroutine control_print(Model)
69176948
print *, ' cpl_imp_mrg : ', Model%cpl_imp_mrg
69186949
print *, ' cpl_imp_dbg : ', Model%cpl_imp_dbg
69196950
print *, ' use_med_flux : ', Model%use_med_flux
6951+
print *, ' use_cdeps_inline : ', Model%use_cdeps_inline
69206952
if(Model%imfdeepcnv == Model%imfdeepcnv_gf .or.Model%imfdeepcnv == Model%imfdeepcnv_c3) then
69216953
print*,'ichoice_s : ', Model%ichoice_s
69226954
print*,'ichoicem : ', Model%ichoicem

scm/src/GFS_typedefs.meta

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3434,6 +3434,46 @@
34343434
type = real
34353435
kind = kind_phys
34363436
active = (flag_for_rrtmgp_radiation_scheme)
3437+
[tsfco_dat]
3438+
standard_name = sea_surface_temperature_from_data
3439+
long_name = sfc temperature
3440+
units = K
3441+
dimensions = (horizontal_dimension)
3442+
type = real
3443+
kind = kind_phys
3444+
active = (do_cdeps_inline)
3445+
[mask_dat]
3446+
standard_name = land_sea_mask_from_data
3447+
long_name = landmask
3448+
units = flag
3449+
dimensions = (horizontal_dimension)
3450+
type = real
3451+
kind = kind_phys
3452+
active = (do_cdeps_inline)
3453+
[tice_dat]
3454+
standard_name = surface_skin_temperature_over_ice_from_data
3455+
long_name = surface skin temperature over ice
3456+
units = K
3457+
dimensions = (horizontal_dimension)
3458+
type = real
3459+
kind = kind_phys
3460+
active = (do_cdeps_inline)
3461+
[hice_dat]
3462+
standard_name = sea_ice_thickness_from_data
3463+
long_name = sea-ice thickness
3464+
units = m
3465+
dimensions = (horizontal_dimension)
3466+
type = real
3467+
kind = kind_phys
3468+
active = (do_cdeps_inline)
3469+
[fice_dat]
3470+
standard_name = sea_ice_area_fraction_of_sea_area_fraction_from_data
3471+
long_name = sea-ice concentration [0,1]
3472+
units = frac
3473+
dimensions = (horizontal_dimension)
3474+
type = real
3475+
kind = kind_phys
3476+
active = (do_cdeps_inline)
34373477

34383478
########################################################################
34393479
[ccpp-table-properties]
@@ -3837,6 +3877,12 @@
38373877
units = flag
38383878
dimensions = ()
38393879
type = logical
3880+
[use_cdeps_inline]
3881+
standard_name = do_cdeps_inline
3882+
long_name = flag for using data provided by CDEPS inline (default false)
3883+
units = flag
3884+
dimensions = ()
3885+
type = logical
38403886
[fhcyc]
38413887
standard_name = frequency_for_surface_cycling_calls
38423888
long_name = frequency for surface cycling calls

0 commit comments

Comments
 (0)