Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surface roughness modifications (cont'd) #2045

Merged
merged 72 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
7e5d438
Adapted model to machine and added soil column separation and local t…
Mar 25, 2021
db0b16f
Saving current state
Apr 27, 2021
492c158
Saving state
May 7, 2021
def8ee3
Saving state
May 17, 2021
4018d56
Saving state
May 26, 2021
4a52aa7
Saving state
Jun 14, 2021
e78b02f
Saving state
Jun 16, 2021
37d7d0c
Saving state
Jun 24, 2021
d218ff5
Saving state
Jul 28, 2021
fc20d00
State at first submission
Aug 25, 2021
2e7b2c3
For PR
Jan 6, 2022
864f336
Removing statements of sensitivity experiments. Add more comments fol…
Jan 12, 2022
8318cad
Small correction to proposed statement in CanopyFluxes
Jan 12, 2022
c611d6e
Add user-mod directories for the surface roughness changes from Ronny…
ekluzek Jan 13, 2022
9ae6e30
Remove use_z0v_forest because it's not connected to anything in the F…
ekluzek Jan 13, 2022
0ee8c69
Handle very small values of htop and snowmelt_accum with new Meier202…
ekluzek Jan 13, 2022
02be2d8
Don't set z0mg and displa on first step of run for RonnyMeier2022 rou…
ekluzek Jan 14, 2022
0b7fd39
Skip first few steps as htop isn't set until after first do_alb step
ekluzek Feb 19, 2022
0e71cb2
Correct subscript
ekluzek Feb 20, 2022
84396e6
Add write of rh if negative or over 100 when DEBUG on
ekluzek Feb 22, 2022
23601a7
Write out warning if ustar*thvstar is positive to prevent a cube root…
ekluzek Feb 22, 2022
4eabfbb
Set human stress indices to calculate NONE when Meier surface roughne…
ekluzek Feb 22, 2022
f644624
Fix subscript
ekluzek Feb 22, 2022
32dbda8
Rename test mods to highlight these are non-crop cases
ekluzek Feb 22, 2022
b9d402a
Add tests with Meier surface roughness
ekluzek Feb 23, 2022
8789ca2
Add a bit to not die if htop is zero and it's crop and beginning of t…
ekluzek Feb 23, 2022
821df3c
Correct new testname, and add two tests to the expected fails
ekluzek Feb 23, 2022
d3dee39
Change MeierXXXX namelist to Meier2022
ekluzek Feb 23, 2022
95fb900
Remove commented out line
ekluzek Feb 23, 2022
b0f2856
Remove local time history changes as they are treated seperately in #…
ekluzek Feb 23, 2022
c7ade8d
Remove soil columns on a seperate soil column as handled in #1249
ekluzek Feb 23, 2022
684d61b
Merge tag 'ctsm5.1.dev077'
ekluzek Feb 23, 2022
7916475
Add more compilers for the surf roughness changes
ekluzek Feb 23, 2022
b531f92
Changes to get the updated code to compile on cheyenne_gnu
ekluzek Feb 24, 2022
6e31171
Changes needed to work with nag compiler on izumi, negative sign need…
ekluzek Feb 25, 2022
f0fe877
Update paramsfile for Meier surface roughness changes to latest version
ekluzek Mar 4, 2022
cf0934b
Some updates from @olyson that get more tests to work
ekluzek Mar 8, 2022
7570395
Merge branch 'main' of github.com:RonnyMeier/CTSM into main
ekluzek Mar 8, 2022
1f1cce9
Update forcing height variables and rename/move snomelt_accum to Wate…
olyson Mar 14, 2022
546f615
Merge branch 'main' of https://www.github.com/RonnyMeier/ctsm
olyson Mar 14, 2022
382441c
Add forcing height change back into CanopyFluxesMod after rebase.
olyson Mar 14, 2022
e7579c9
Encapsulated forcing height update in Meier2022 to maintain bfb with …
olyson Mar 15, 2022
902f1cb
Update forcing heights and restrict zeta to less than 20 for now
olyson Mar 21, 2022
46e2dad
Revert restriction on zeta in FrictionVelocityMod
olyson May 17, 2022
189f9f9
Remove restriction on calc_human_stress_indices
olyson Jun 10, 2022
c08d09d
Change zetamaxstable for z0param_method == 'Meier2022' to 2.0
olyson Jun 10, 2022
6be9820
Make zeta a global variable and fix zetamaxstable namelist
olyson Jun 13, 2022
ed9610b
Remove use_z0mg_2d code to read in roughness from surface dataset tha…
ekluzek Oct 18, 2022
0badb30
Remove more use_z0mg_2d
ekluzek Oct 18, 2022
357fea5
Correct so will compile
ekluzek Oct 19, 2022
a924de8
Merge branch 'main' of github.com:RonnyMeier/CTSM into main
ekluzek Oct 19, 2022
e5cd7b0
Use parenthesis to clarify statement as required by the nag compiler …
ekluzek Oct 19, 2022
e9e7d52
Merge tag 'ctsm5.1.dev129'
slevis-lmwg Jun 28, 2023
180206c
Removing use_z0mg_2d from the Meier2022_surf_rough testmods
slevis-lmwg Jun 28, 2023
f2767b5
Follow-up to conflict resolutions in order for the code to build
slevis-lmwg Jun 28, 2023
b1a46db
BFB refactor: replace magic numbers with parameters
slevis-lmwg Jul 14, 2023
09e0012
Answer-changing refactor: repl. some divisions w multiplications
slevis-lmwg Jul 14, 2023
548e8be
Change if statement back to what we have in main
slevis-lmwg Jul 14, 2023
a57f188
Eliminate repetitive code in LakeFluxesMod
slevis-lmwg Jul 18, 2023
0f263e7
Rm if(use_biomass_heat_storage) and return to original code here
slevis-lmwg Jul 21, 2023
c21e88f
Replace more divisions with multiplications in Meier2022 code
slevis-lmwg Jul 21, 2023
d8ba6c7
Change zetamaxstable in namelist_defaults_ctsm to get BFB with baseline
slevis-lmwg Jul 24, 2023
6774f45
Merge remote-tracking branch 'escomp/master' into meier_main_pr1596
slevis-lmwg Jul 27, 2023
1432e20
First draft of ChangeLog/Sum
slevis-lmwg Jul 28, 2023
53722d2
Merge remote-tracking branch 'escomp/master' into meier_main_pr1596
slevis-lmwg Aug 17, 2023
1d962dd
Revisions part 1 in response to Erik's review
slevis-lmwg Aug 21, 2023
59745d0
Revisions part 2: add missing comment
slevis-lmwg Aug 21, 2023
fea92f2
Revert delt_threshold param back to hardwired values
slevis-lmwg Aug 21, 2023
7a39c65
Ensure that ZengWang2007 and use_z0m_snowmelt NOT true simultaneously
slevis-lmwg Aug 21, 2023
9e54cd5
Merge remote-tracking branch 'escomp/master' into meier_main_pr1596
slevis-lmwg Aug 21, 2023
0875c51
Removed white space that appears red in git diff
slevis-lmwg Aug 22, 2023
f206914
Merge remote-tracking branch 'escomp/master' into meier_main_pr1596
slevis-lmwg Aug 22, 2023
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
23 changes: 23 additions & 0 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1580,6 +1580,7 @@ sub process_namelist_inline_logic {
setup_logic_supplemental_nitrogen($opts, $nl_flags, $definition, $defaults, $nl);
setup_logic_snowpack($opts, $nl_flags, $definition, $defaults, $nl);
setup_logic_fates($opts, $nl_flags, $definition, $defaults, $nl);
setup_logic_z0param($opts, $nl_flags, $definition, $defaults, $nl);
setup_logic_misc($opts, $nl_flags, $definition, $defaults, $nl);

#########################################
Expand Down Expand Up @@ -4369,6 +4370,28 @@ sub setup_logic_exice {

#-------------------------------------------------------------------------------

sub setup_logic_z0param {
#
# Set default z0 paramterization
#
my ($opts, $nl_flags, $definition, $defaults, $nl) = @_;

add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'z0param_method');

my $z0param_method = remove_leading_and_trailing_quotes($nl->get_value('z0param_method' ));
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_z0m_snowmelt',
'z0param_method'=>$z0param_method );

my $use_z0m_snowmelt = $nl->get_value( 'use_z0m_snowmelt' );

if ( $z0param_method eq "ZengWang2007" && defined($use_z0m_snowmelt) && value_is_true($use_z0m_snowmelt)) {
$log->fatal_error("use_z0m_snowmelt must be .false. when z0param_method = $z0param_method.\n $@");
}

}

#-------------------------------------------------------------------------------

sub setup_logic_misc {
#
# Set some misc options
Expand Down
15 changes: 14 additions & 1 deletion bld/namelist_files/namelist_defaults_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<zetamaxstable use_biomass_heat_storage=".true." >2.0d00</zetamaxstable>
<zetamaxstable phys="clm4_5" >2.0d00</zetamaxstable>
<zetamaxstable phys="clm5_0" >0.5d00</zetamaxstable>
<zetamaxstable phys="clm5_1" >0.5d00</zetamaxstable>
<zetamaxstable phys="clm5_1" z0param_method="ZengWang2007" >0.5d00</zetamaxstable>
<zetamaxstable phys="clm5_1" z0param_method="Meier2022" >2.0d00</zetamaxstable>

<!-- atm2lnd defaults -->
<repartition_rain_snow phys="clm5_1" >.true.</repartition_rain_snow>
Expand Down Expand Up @@ -324,6 +325,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<itmax_canopy_fluxes structure="standard">40</itmax_canopy_fluxes>
<itmax_canopy_fluxes structure="fast" >3</itmax_canopy_fluxes>


<!-- Canopy hydrology namelist defaults -->
<use_clm5_fpi phys="clm5_1" >.true.</use_clm5_fpi>
<interception_fraction phys="clm5_1" >1.0</interception_fraction>
Expand Down Expand Up @@ -495,6 +497,15 @@ attributes from the config_cache.xml file (with keys converted to upper-case).

<fates_paramfile>lnd/clm2/paramdata/fates_params_api.25.5.0_12pft_c230628.nc</fates_paramfile>

<!-- ================================================================== -->
<!-- Default surface roughness parameterization -->
<!-- ================================================================== -->

<z0param_method>ZengWang2007</z0param_method>

<use_z0m_snowmelt z0param_method="Meier2022" >.true.</use_z0m_snowmelt>
<use_z0m_snowmelt >.false.</use_z0m_snowmelt>

<!-- ======================================================================================== -->
<!-- clm 5.0 BGC nitrogen model -->
<!-- ======================================================================================== -->
Expand Down Expand Up @@ -1129,6 +1140,8 @@ lnd/clm2/surfdata_map/release-clm5.0.30/surfdata_C24_hist_78pfts_CMIP6_simyr2000
lnd/clm2/surfdata_map/release-clm5.0.18/surfdata_0.9x1.25_hist_78pfts_CMIP6_simyr2000_c190214.nc</fsurdat>
<fsurdat hgrid="1.9x2.5" sim_year="2000" use_crop=".true." use_vichydro=".false.">
lnd/clm2/surfdata_map/release-clm5.0.18/surfdata_1.9x2.5_hist_78pfts_CMIP6_simyr2000_c190304.nc</fsurdat>
<fsurdat hgrid="hcru_hcru" sim_year="2000">
lnd/clm2/surfdata_map/release-clm5.0.18/surfdata_360x720cru_78pfts_CMIP6_simyr2000_c170824.nc</fsurdat>
<fsurdat hgrid="0.125x0.125" sim_year="2000" use_crop=".true." >
lnd/clm2/surfdata_map/release-clm5.0.24/surfdata_0.125x0.125_hist_78pfts_CMIP6_simyr2005_c190624.nc</fsurdat>
<fsurdat hgrid="10x15" sim_year="2000" use_crop=".true." use_vichydro=".false.">
Expand Down
18 changes: 18 additions & 0 deletions bld/namelist_files/namelist_definition_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2794,6 +2794,24 @@ the related bulk quantities.
If .true., run with water isotopes
</entry>

<!-- ======================================================================================== -->
<!-- Namelist options related to surface roughness -->
<!-- ======================================================================================== -->

<entry id="z0param_method" type="char*64" category="clm_physics"
group="clm_inparm" valid_values="ZengWang2007,Meier2022" >
Parameterization/parameters to use for surface roughness
ZengWang2007: Zeng and Wang 2007
Meier2022: Meier et al. in prep. 2022
</entry>

<entry id="use_z0m_snowmelt" type="logical" category="clm_physics"
group="clm_inparm" valid_values="" >
If FALSE use constant snow z0m
If TRUE use parameterization of snow z0m as a function of accumulated
snow melt of Brock et al. (2006)
</entry>

<!-- ======================================================================================== -->
<!-- Namelist options related to initInterp -->
<!-- ======================================================================================== -->
Expand Down
40 changes: 40 additions & 0 deletions cime_config/testdefs/testlist_clm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@
<option name="wallclock">00:20:00</option>
</options>
</test>
<test name="SMS_D_Ln6" grid="f09_g17" compset="I1850Clm50BgcNoAnthro" testmods="clm/Meier2022_surf_rough">
ekluzek marked this conversation as resolved.
Show resolved Hide resolved
<machines>
<machine name="cheyenne" compiler="intel" category="aux_clm"/>
</machines>
<options>
<option name="wallclock">00:20:00</option>
<option name="comment" >Meier Surface roughness with no-anthro compset</option>
</options>
</test>
<test name="SMS_Ld5" grid="f09_g17" compset="I1850Clm45BgcCru" testmods="clm/default">
<machines>
<machine name="cheyenne" compiler="intel" category="ctsm_sci"/>
Expand Down Expand Up @@ -1154,6 +1163,37 @@
<option name="comment" >include a long Clm45 test, and include a production intel test of Clm45</option>
</options>
</test>
<test name="ERS_Ly3" grid="f10_f10_mg37" compset="I2000Clm51BgcCrop" testmods="clm/Meier2022_surf_rough">
<machines>
<machine name="cheyenne" compiler="intel" category="aux_clm"/>
</machines>
<options>
<option name="wallclock">01:40:00</option>
<option name="comment" >include a long exact restart test with Meier surface roughness</option>
</options>
</test>
<test name="SMS_D" grid="f10_f10_mg37" compset="I2000Clm51Bgc" testmods="clm/Meier2022_surf_rough">
<machines>
<machine name="cheyenne" compiler="intel" category="aux_clm"/>
<machine name="cheyenne" compiler="gnu" category="aux_clm"/>
<machine name="izumi" compiler="nag" category="aux_clm"/>
<machine name="izumi" compiler="intel" category="aux_clm"/>
<machine name="izumi" compiler="gnu" category="aux_clm"/>
</machines>
<options>
<option name="wallclock">00:20:00</option>
<option name="comment" >include a short DEBUG test with Meier surface roughness without crop</option>
</options>
</test>
<test name="ERS_D" grid="f10_f10_mg37" compset="I1850Clm51Sp" testmods="clm/Meier2022_surf_rough">
<machines>
<machine name="cheyenne" compiler="intel" category="aux_clm"/>
</machines>
<options>
<option name="wallclock">00:20:00</option>
<option name="comment" >Exact restart short DEBUG SP test with Meier surface roughness</option>
</options>
</test>
<test name="ERS_Ly6_Mmpi-serial" grid="1x1_smallvilleIA" compset="IHistClm50BgcCropQianRs" testmods="clm/cropMonthOutput">
<machines>
<machine name="izumi" compiler="intel" category="aux_clm"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../default
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
z0param_method = 'Meier2022'
use_z0m_snowmelt = .true.
paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/ctsm51_params.RMz0.c220304.nc'

101 changes: 101 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,105 @@
===============================================================
Tag name: ctsm5.1.dev137
Originator(s): Ronny Meier, slevis (Samuel Levis,UCAR/TSS,303-665-1310)
Date: Tue Aug 22 14:34:53 MDT 2023
One-line Summary: Surface roughness modifications

Purpose and description of changes
----------------------------------

Surface roughness (z0) modifications that appear in this publication:
https://doi.org/10.5194/gmd-15-2365-2022

When changing the namelist input z0param_method from ZengWang2007 (default)
to Meier2022 the following modifications are activated:

- A new parameterization of the vegetation surface roughness based on
Raupach (1992) with optimized parameters to match the data collected in
Hu et al. (2020) for different types of vegetation. This requires several new
PFT-specific input parameters in the parameter file.
- A spatially explicit z0m input field for bare soil based on the data of
Prigent et al. (2005). This may be activated specifically by the user through
the namelist input use_z0mg_2d. This requires a new input variable in the
fsurdat file.
- The parameterization of z0m for snow based on accumulated snow melt as
proposed in Brock et al. (2006). This may be activated specifically by the
user through the namelist input use_z0m_snowmelt.
- The parameterization of Yang et al. (2008) for z0h and z0q over bare soil,
snow, and glaciers.
- The study in GMD also proposes new globally constant values for the
z0m of bare soil, snow, and ice. To "activate" those the parameter file needs
to be changed at the moment. The original and modified parameter files and
fsurdat files will be shared by ftp.

Open issues/questions (discussed with @ekluzek, @dlawrenncar, @olyson):

- How to incorporate the data of Prigent et al. (2005) in the surfdata
generation. I will write an email about this to Catherine Prigent.
- One statement marked in CanopyFluxesMod should probably be changed when
using Meier2022 (i.e., Yang et al. (2008) formulation should be used instead
of Zeng and Dickinson (1998)).
- At the moment one needs to change the parameter file to switch between the
original and proposed globally constant z0m values for bare soil, snow, and
ice. This is obviously not very user friendly and prone to mistakes.
- The introduction of Yang et al. (2008) frequently results in z0h and z0q
larger than z0m. This is only rarely observed in the field and in contradiction
to the theory that z0h and z0q should be smaller because heat and water vapor
need to be transported through molecular diffusion in the surface sublayer.


Significant changes to scientifically-supported configurations
--------------------------------------------------------------

Does this tag change answers significantly for any of the following physics configurations?
(Details of any changes will be given in the "Answer changes" section below.)

[Put an [X] in the box for any configuration with significant answer changes.]

[ ] clm5_1

[ ] clm5_0

[ ] ctsm5_0-nwp

[ ] clm4_5


Bugs fixed or introduced
------------------------
CTSM issues fixed (include CTSM Issue #):
Fixes #1316
Fixes #1596

Notes of particular relevance for users
---------------------------------------
Details already discussed in the description above.

Notes of particular relevance for developers:
---------------------------------------------
Changes to tests or testing:
New tests are in place for this new code.

Testing summary:
----------------
[PASS means all tests PASS; OK means tests PASS other than expected fails.]

regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):

cheyenne ---- OK
izumi ------- OK

Answer changes
--------------
Changes answers relative to baseline:
No, unless user chooses to run in non-default Meier2022 mode.

Other details
-------------
Pull Requests that document the changes (include PR ids):
https://github.com/ESCOMP/ctsm/pull/2045

===============================================================
===============================================================
Tag name: ctsm5.1.dev136
Originator(s): jedwards (Jim Edwards), sacks (Bill Sacks)
Date: Tue Aug 22 13:10:28 MDT 2023
Expand Down
1 change: 1 addition & 0 deletions doc/ChangeSum
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Tag Who Date Summary
============================================================================================================================
ctsm5.1.dev137 slevis 08/23/2023 Surface roughness modifications
ctsm5.1.dev136 multiple 08/22/2023 Change order of history fields to improve performance on derecho
ctsm5.1.dev135 slevis 08/21/2023 Rename hist fields to track them down more easily
ctsm5.1.dev134 rgknox 08/16/2023 Migration of FATES to share normal soil BGC call sequence and functionality
Expand Down
Loading