Skip to content

Commit 85b9d5b

Browse files
bandre-ucarbjandre
authored andcommitted
clm4_5_12_r192
tag clm4_5_12_r192, NGEE-T ED bugfixes and initial refactoring for a standalone library
1 parent d2b97f5 commit 85b9d5b

74 files changed

Lines changed: 10288 additions & 4509 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎bld/CLMBuildNamelist.pm‎

Lines changed: 140 additions & 77 deletions
Large diffs are not rendered by default.

‎bld/namelist_files/namelist_defaults_clm4_5.xml‎

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
8585

8686
<!-- Supplmental Nitrogen mode -->
8787
<suplnitro use_cn=".true." >NONE</suplnitro>
88+
<suplnitro use_ed=".true." >NONE</suplnitro>
8889

8990
<!-- Albedo for glaciers -->
9091
<albice glc_nec="0" >0.60,0.40</albice>
@@ -241,7 +242,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
241242
<!-- Plant function types (relative to {csmdata}) -->
242243
<paramfile phys="clm5_0" use_ed=".false.">lnd/clm2/paramdata/clm5_params.c160713.nc</paramfile>
243244
<paramfile phys="clm4_5" use_ed=".false.">lnd/clm2/paramdata/clm_params.c160713.nc</paramfile>
244-
<paramfile use_ed=".true." >lnd/clm2/paramdata/clm_params.ED.c151023.nc</paramfile>
245+
<paramfile phys="clm4_5" use_ed=".true." >lnd/clm2/paramdata/clm_params_ed.c160808.nc</paramfile>
245246

246247
<!-- ======================================================================================== -->
247248
<!-- clm 5.0 BGC nitrogen model -->
@@ -1942,8 +1943,36 @@ lnd/clm2/surfdata_map/surfdata_ne120np4_78pfts_simyr1850_c160216.nc</fsurdat>
19421943
<!-- Defaults for ch4par_in namelist -->
19431944
<!-- ========================================= -->
19441945

1945-
<fin_use_fsat use_cn=".true.">.false.</fin_use_fsat>
1946-
1946+
<fin_use_fsat use_cn=".true.">.false.</fin_use_fsat>
19471947
<use_aereoxid_prog use_cn=".true.">.true.</use_aereoxid_prog>
19481948

1949+
<fin_use_fsat use_ed=".true.">.false.</fin_use_fsat>
1950+
<use_aereoxid_prog use_ed=".true.">.true.</use_aereoxid_prog>
1951+
1952+
<!-- ========================================= -->
1953+
<!-- Defaults for different BGC modes -->
1954+
<!-- ========================================= -->
1955+
1956+
<use_vertsoilc bgc_mode="sp" >.false.</use_vertsoilc>
1957+
<use_century_decomp bgc_mode="sp" >.false.</use_century_decomp>
1958+
<use_lch4 bgc_mode="sp" >.false.</use_lch4>
1959+
<use_nitrif_denitrif bgc_mode="sp" >.false.</use_nitrif_denitrif>
1960+
1961+
<use_vertsoilc bgc_mode="cn" >.false.</use_vertsoilc>
1962+
<use_century_decomp bgc_mode="cn" >.false.</use_century_decomp>
1963+
<use_lch4 bgc_mode="cn" >.false.</use_lch4>
1964+
<use_nitrif_denitrif bgc_mode="cn" >.false.</use_nitrif_denitrif>
1965+
1966+
<use_vertsoilc bgc_mode="bgc" >.true.</use_vertsoilc>
1967+
<use_century_decomp bgc_mode="bgc" >.true.</use_century_decomp>
1968+
<use_lch4 bgc_mode="bgc" >.true.</use_lch4>
1969+
<use_nitrif_denitrif bgc_mode="bgc" >.true.</use_nitrif_denitrif>
1970+
1971+
<use_vertsoilc bgc_mode="ed" >.true.</use_vertsoilc>
1972+
<use_century_decomp bgc_mode="ed" >.true.</use_century_decomp>
1973+
<use_lch4 bgc_mode="ed" >.false.</use_lch4>
1974+
<use_nitrif_denitrif bgc_mode="ed" >.false.</use_nitrif_denitrif>
1975+
1976+
<use_ed_spit_fire use_ed=".true.">.true.</use_ed_spit_fire>
1977+
19491978
</namelist_defaults>

‎bld/namelist_files/namelist_definition_clm4_5.xml‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -764,13 +764,13 @@ Maximum nitrification rate constant (1/s)
764764
<entry id="use_vertsoilc" type="logical" category="bgc"
765765
group="clm_inparm" valid_values="" value=".false.">
766766
Turn on vertical soil carbon.
767-
Requires the CN model to work (either CN or CNDV).
767+
Requires the CN or ED model to work (either CN or CNDV).
768768
</entry>
769769

770770
<entry id="use_century_decomp" type="logical" category="bgc"
771771
group="clm_inparm" valid_values="" value=".false.">
772772
Use parameters for decomposition from the CENTURY Carbon model
773-
Requires the CN model to work (either CN or CNDV).
773+
Requires the CN or ED model to work (either CN or CNDV).
774774
</entry>
775775

776776
<entry id="use_extralakelayers" type="logical" category="physics"
@@ -1490,15 +1490,16 @@ NOTE: THIS CORRESPONDS DIRECTLY TO THE env_run.xml VARIABLE OF THE SAME NAME.
14901490
</entry>
14911491

14921492
<entry id="bgc_mode" type="char*4" category="default_settings"
1493-
group="default_settings" valid_values="sp,cn,bgc" >
1494-
Command line argument for biogeochemistry mode for CLM4.5
1495-
sp = Satellite Phenology
1493+
group="default_settings" valid_values="sp,cn,bgc,ed" >
1494+
Command line arguement for biogeochemistry mode for CLM4.5
1495+
sp = Satellitte Phenology
14961496
cn = Carbon Nitrogen model
14971497
bgc = CLM4.5 BGC model with:
14981498
CENTURY model pools
14991499
Nitrification/De-nitrification
15001500
Methane model
15011501
Vertically resolved Carbon
1502+
ed = ED (Ecosystem Demography) model with below ground BGC:
15021503
</entry>
15031504

15041505
<!-- ======================================================================================== -->

‎bld/test_build_namelist/t/input/namelist_defaults_clm4_5_test.xml‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,18 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
7575
<!-- Plant function types (relative to {csmdata}) -->
7676
<paramfile >lnd/clm2/paramdata/clm_params.c130821.nc</paramfile>
7777

78+
79+
<!--- ======================================== -->
80+
<!--- Defaults for use_ed = .true. -->
81+
<!-- ======================================== -->
82+
83+
<use_vertsoilc use_ed=".true.">.true.</use_vertsoilc>
84+
<use_century_decomp use_ed=".true." >.true.</use_century_decomp>
85+
<use_ed_spit_fire use_ed=".true.">.true.</use_ed_spit_fire>
86+
<use_lch4 use_ed=".true.">.false.</use_lch4>
87+
<use_nitrif_denitrif use_ed=".true.">.false.</use_nitrif_denitrif>
88+
89+
7890
<!--
7991
8092
Original initial condition file at 1 degree resolution
@@ -319,6 +331,8 @@ lnd/clm2/surfdata_map/surfdata_ne30np4_simyr1850_c130927.nc</fsurdat>
319331
<flanduse_timeseries hgrid="ne30np4" rcp="2.6" sim_year_range="1850-2100"
320332
use_crop=".false." >lnd/clm2/surfdata_map/surfdata.pftdyn_ne30np4_rcp2.6_simyr1850-2100_c130524.nc</flanduse_timeseries>
321333

334+
<use_fun >.false.</use_fun>
335+
322336
<!-- GLC mask datasets (relative to {csmdata}) -->
323337
<fglcmask hgrid="48x96" >glc/cism/griddata/glcmaskdata_48x96_gland_c141105.nc</fglcmask>
324338
<fglcmask hgrid="0.9x1.25" >glc/cism/griddata/glcmaskdata_0.9x1.25_gland_c141105.nc</fglcmask>
@@ -1473,4 +1487,5 @@ lnd/clm2/surfdata_map/surfdata_ne30np4_simyr1850_c130927.nc</fsurdat>
14731487

14741488
<use_aereoxid_prog use_cn=".true.">.true.</use_aereoxid_prog>
14751489

1490+
14761491
</namelist_defaults>

‎bld/test_build_namelist/t/input/namelist_definition_clm4_5_test.xml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,12 @@ CLM Biogeochemistry mode : Carbon Nitrogen with Dynamic Global Vegetation Model
391391
(or CLM45BGCDV if phys=clm4_5, vsoilc_centbgc='on', and clm4me='on')
392392
</entry>
393393

394+
<entry id="use_fun" type="logical" category="bgc"
395+
group="clm_inparm" valid_values="" value=".false.">
396+
Turn the Fixation and Uptate of Nitrogen model version 2 (FUN2.0)
397+
Requires the CN model to work (either CN or CNDV).
398+
</entry>
399+
394400
<entry id="use_nitrif_denitrif" type="logical" category="bgc"
395401
group="clm_inparm" valid_values="" value=".false.">
396402
Nitrification/denitrification splits the prognostic mineral N pool into two
@@ -1005,7 +1011,7 @@ Command line arguement for turning on CN spinup mode.
10051011
</entry>
10061012

10071013
<entry id="bgc_mode" type="char*4" category="default_settings"
1008-
group="default_settings" valid_values="sp,cn,bgc" >
1014+
group="default_settings" valid_values="sp,cn,bgc,ed" >
10091015
Command line arguement for biogeochemistry mode for CLM4.5
10101016
sp = Satellitte Phenology
10111017
cn = Carbon Nitrogen model

‎bld/test_build_namelist/t/template_test_XXX.pm‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use parent qw(Test::Class);
1313
# Common test fixture for all tests:
1414
#
1515
#-------------------------------------------------------------------------------
16-
sub startup : Test(startup => 3) {
16+
sub startup : Test(startup => 4) {
1717
my $self = shift;
1818
# provide common fixture for all tests, only created once at the
1919
# start of the tests.
@@ -23,8 +23,14 @@ sub startup : Test(startup => 3) {
2323
$self->{definition} = Build::NamelistDefinition->new("t/input/namelist_definition_clm4_5_test.xml");
2424
isnt($self->{definition}, undef, (caller(0))[3] . " : namelist_definition object created.");
2525

26-
$self->{defaults} = Build::NamelistDefaults->new("t/input/namelist_defaults_clm4_5_test.xml");
26+
$self->{defaults} = Build::NamelistDefaults->new("t/input/namelist_defaults_clm4_5_test.xml",$self->{cfg});
2727
isnt($self->{defaults}, undef, (caller(0))[3] . " : namelist_defaults object created.");
28+
29+
# The next line may be usefull (set startup => 4) in arg call above:
30+
$self->{physv} = config_files::clm_phys_vers->new( $self->{cfg}->get('phys') );
31+
isnt($self->{physv}, undef, (caller(0))[3] . " : phys_vers object created.");
32+
33+
2834
}
2935

3036
sub shutdown : Test(shutdown) {

0 commit comments

Comments
 (0)