Skip to content

Commit

Permalink
Add more scheme-specific blocks and statespecs
Browse files Browse the repository at this point in the history
  • Loading branch information
mathomp4 committed Aug 6, 2021
1 parent ae6ae43 commit 58af774
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
26 changes: 16 additions & 10 deletions ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridCompMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,6 @@ subroutine SetServices (GC, RC)
call ESMF_ConfigGetAttribute (cfg, self%Ch_DU_res, label='Ch_DU:', __RC__)
call ESMF_ConfigGetAttribute (cfg, self%rlow, label='radius_lower:', __RC__)
call ESMF_ConfigGetAttribute (cfg, self%rup, label='radius_upper:', __RC__)
call ESMF_ConfigGetAttribute (cfg, self%clayFlag, label='clayFlag:', __RC__)
call ESMF_ConfigGetAttribute (cfg, self%f_swc, label='soil_moisture_factor:', __RC__)
call ESMF_ConfigGetAttribute (cfg, self%f_scl, label='soil_clay_factor:', __RC__)
call ESMF_ConfigGetAttribute (cfg, self%uts_gamma, label='uts_gamma:', __RC__)

call ESMF_ConfigGetAttribute (cfg, emission_scheme, label='emission_scheme:', default='ginoux', __RC__)
self%emission_scheme = ESMF_UtilStringLowerCase(trim(emission_scheme), __RC__)
Expand All @@ -169,13 +165,23 @@ subroutine SetServices (GC, RC)
self%doing_point_emissions = .true. ! we are good to go
end if

! read FENGSHA-specific parameters
! read scheme-specific parameters
! --------------------------------
if (self%emission_scheme == 'fengsha') then
call ESMF_ConfigGetAttribute (cfg, self%alpha, label='alpha:', __RC__)
call ESMF_ConfigGetAttribute (cfg, self%gamma, label='gamma:', __RC__)
call ESMF_ConfigGetAttribute (cfg, self%kvhmax, label='vertical_to_horizontal_flux_ratio_limit:', __RC__)
end if
select case (self%emission_scheme)
case ('fengsha')
call ESMF_ConfigGetAttribute (cfg, self%alpha, label='alpha:', __RC__)
call ESMF_ConfigGetAttribute (cfg, self%gamma, label='gamma:', __RC__)
call ESMF_ConfigGetAttribute (cfg, self%kvhmax, label='vertical_to_horizontal_flux_ratio_limit:', __RC__)
case ('k14')
call ESMF_ConfigGetAttribute (cfg, self%clayFlag, label='clayFlag:', __RC__)
call ESMF_ConfigGetAttribute (cfg, self%f_swc, label='soil_moisture_factor:', __RC__)
call ESMF_ConfigGetAttribute (cfg, self%f_scl, label='soil_clay_factor:', __RC__)
call ESMF_ConfigGetAttribute (cfg, self%uts_gamma, label='uts_gamma:', __RC__)
case ('ginoux')
! nothing to do
case default
_ASSERT_RC(.false., "Unallowed emission scheme: "//trim(self%emission_scheme)//". Allowed: ginoux, k14, fengsha", ESMF_RC_NOT_IMPL)
end select

! Is DU data driven?
! ------------------
Expand Down
8 changes: 4 additions & 4 deletions ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_StateSpecs.rc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ category: IMPORT
DU_TEXTURE | 1 | xy | N | scheme == 'k14' | soil_texture
DU_VEG | 1 | xy | N | scheme == 'k14' | vegetation_type
FRLAKE | 1 | xy | N | | fraction_of_lake
FRLAND | 1 | xy | N | | fraction_of_land
ASNOW | 1 | xy | N | | snow_covered_fraction_of_land
FRLAND | 1 | xy | N | scheme == 'k14' | fraction_of_land
ASNOW | 1 | xy | N | scheme == 'k14' | snow_covered_fraction_of_land
WET1 | 1 | xy | N | | surface_soil_wetness
LWI | 1 | xy | N | | land-ocean-ice_mask
TROPP | Pa | xy | N | | tropopause_pressure_based_on_blended_estimate
Expand All @@ -38,8 +38,8 @@ category: IMPORT
SH | w m-2 | xy | N | | sensible_heat_flux_from_turbulence
Z0H | m | xy | N | | surface_roughness_for_heat
WCSF | m3 m-3 | xy | N | scheme == 'k14' | water_surface_layer
TSOIL1 | K | xy | N | | soil_temperatures_layer_1
RHOS | kg m-3 | xy | N | | air_density_at_surface
TSOIL1 | K | xy | N | scheme == 'k14' | soil_temperatures_layer_1
RHOS | kg m-3 | xy | N | scheme == 'k14' | air_density_at_surface
#........................................................................................
AIRDENS | kg/m^3 | xyz | C | | moist_air_density
DELP | Pa | xyz | C | | pressure_thickness
Expand Down

0 comments on commit 58af774

Please sign in to comment.