Skip to content

Commit

Permalink
clm4_5_14_r215
Browse files Browse the repository at this point in the history
Use new rawdatasets from Peter Lawrence that have crop landunit changing in size as well as specific crop
and natural vegetation types. Modify mksurfdata_map to use new fields for fertilizer for each crop type.
Add in harvest fields to both surface dataset as well as landuse.timeseries dataset. Also add in two
new fields: UNREPRESENTED_PFT_LULCC, UNREPRESENTED_CFT_LULCC for the impact of landuse changes for
natural and crop vegetation types. Currently these two fields are zeroed out. But, they will be added in
with a new update to the datasets.

Implement crop fertilizer for each crop type into CLM. The fertilizer is also moved from one crop
type to another by the mapping system between the different crop types (to handle unrepresented crop
types by mapping them to one that is represented). The new datasets also have harvest fields in units by
mass rather than area. This requires new surface and landuse.timeseries datasets. We have hand-edited
versions from Peter Lawrence for f09 and f19. The older datasets for other resolutions still work, but
they don't have the new fertilizer field so anthropogenic fertilizer is zeroed out.

NOTE: Capability to create rcp scenarios for landuse.timeseries was removed from mksurfdata_map.
  • Loading branch information
ekluzek authored and bjandre committed Dec 19, 2017
1 parent dc96a5e commit 0123b55
Show file tree
Hide file tree
Showing 238 changed files with 3,393 additions and 29,222 deletions.
2 changes: 1 addition & 1 deletion SVN_EXTERNAL_DIRECTORIES.standalone
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cime https://github.com/CESM-Development/cime/tags/cime5.2.0-alpha.9
components/clm/tools/shared/gen_domain https://github.com/CESM-Development/cime/tags/cime5.2.0-alpha.9/tools/mapping/gen_domain_files
components/clm/tools/gen_domain https://github.com/CESM-Development/cime/tags/cime5.2.0-alpha.9/tools/mapping/gen_domain_files
components/cism https://svn-ccsm-models.cgd.ucar.edu/glc/trunk_tags/cism2_1_24
components/rtm https://svn-ccsm-models.cgd.ucar.edu/rivrtm/trunk_tags/rtm1_0_59
components/mosart https://svn-ccsm-models.cgd.ucar.edu/mosart/trunk_tags/mosart1_0_19
1 change: 0 additions & 1 deletion bld/README
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ unit_testers --- Directory of scripts to test scipts in this directory

---------- XML Files describing namelists in namelist_files
namelist_files/namelist_defaults_clm4_0.xml ------- List of default values for the clm4_0 namelist
namelist_files/namelist_defaults_clm4_0_tools.xml - List of default values for the clm4_0 tools.
namelist_files/namelist_defaults_clm4_5.xml ------- List of default values for the clm4_5 namelist
namelist_files/namelist_defaults_clm4_5_tools.xml - List of default values for the clm4_5 tools.
namelist_files/namelist_defaults_overall.xml ------ List of default values for overall settings
Expand Down
10 changes: 2 additions & 8 deletions bld/listDefaultNamelist.pl
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ sub usage {
OPTIONS
-help [or -h] Display this help.
-csmdata [or -d] Path to CSMDATA.
-phys "name" Model physics (either clm4_0 or clm4_5) (default clm4_0)
-res "resolution1,resolution2,..." List of resolution to use for files.
(At least one resolution is required)
(If res is "all" will run over all resolutions)
Expand Down Expand Up @@ -157,7 +156,7 @@ sub GetListofNeededFiles {
list => $list,
usrdat => undef,
help => undef,
phys => "clm4_0",
phys => "clm4_5",
);

my $cmdline = "@ARGV";
Expand All @@ -167,7 +166,6 @@ sub GetListofNeededFiles {
"s|silent" => \$opts{'silent'},
"u|usrdat=s" => \$opts{'usrdat'},
"h|elp" => \$opts{'help'},
"phys=s" => \$opts{'phys'},
) or usage();

# Check for unparsed arguments
Expand Down Expand Up @@ -290,11 +288,7 @@ sub GetListofNeededFiles {
foreach my $crop ( @crop_vals ) {
$settings{'crop'} = $crop;
if ( $crop eq "on" ) {
if ($phys eq "clm4_0") {
$settings{'maxpft'} = 21;
} else {
$settings{'maxpft'} = 25;
}
$settings{'maxpft'} = 78;
} else {
$settings{'maxpft'} = 17;
}
Expand Down
3,753 changes: 1 addition & 3,752 deletions bld/namelist_files/namelist_defaults_clm4_0_tools.xml

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions bld/namelist_files/namelist_defaults_clm4_5.xml
Original file line number Diff line number Diff line change
Expand Up @@ -540,9 +540,9 @@ lnd/clm2/surfdata_map/surfdata_ne30np4_16pfts_simyr1850_c160127.nc</fsurdat>

<!-- pre-industrial with crop -->
<fsurdat hgrid="0.9x1.25" sim_year="1850" use_crop=".true." >
lnd/clm2/surfdata_map/surfdata_0.9x1.25_78pfts_simyr1850_c160127.nc</fsurdat>
lnd/clm2/surfdata_map/surfdata_0.9x1.25_78pfts_simyr1850_c161128.nc</fsurdat>
<fsurdat hgrid="1.9x2.5" sim_year="1850" use_crop=".true." >
lnd/clm2/surfdata_map/surfdata_1.9x2.5_78pfts_simyr1850_c160127.nc</fsurdat>
lnd/clm2/surfdata_map/surfdata_1.9x2.5_78pfts_simyr1850_c161128.nc</fsurdat>
<fsurdat hgrid="10x15" sim_year="1850" use_crop=".true." >
lnd/clm2/surfdata_map/surfdata_10x15_78pfts_simyr1850_c160127.nc</fsurdat>
<fsurdat hgrid="4x5" sim_year="1850" use_crop=".true." >
Expand Down Expand Up @@ -584,6 +584,10 @@ lnd/clm2/surfdata_map/surfdata_ne120np4_78pfts_simyr1850_c160216.nc</fsurdat>

<!-- Dynamic PFT surface datasets for crop -->

<flanduse_timeseries hgrid="0.9x1.25" sim_year_range="1850-2000"
use_crop=".true." >lnd/clm2/surfdata_map/landuse.timeseries_0.9x1.25_hist_78pfts_simyr1850-2015_c161128.nc</flanduse_timeseries>
<flanduse_timeseries hgrid="1.9x2.5" sim_year_range="1850-2000"
use_crop=".true." >lnd/clm2/surfdata_map/landuse.timeseries_1.9x2.5_hist_78pfts_simyr1850-2015_c161216.nc</flanduse_timeseries>
<flanduse_timeseries hgrid="10x15" sim_year_range="1850-2000"
use_crop=".true." >lnd/clm2/surfdata_map/landuse.timeseries_10x15_hist_78pfts_simyr1850-2005_c160127.nc</flanduse_timeseries>

Expand Down
3,434 changes: 505 additions & 2,929 deletions bld/namelist_files/namelist_defaults_clm4_5_tools.xml

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion bld/namelist_files/namelist_definition_clm4_5.xml
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ in its attributes. (Only used if scripgriddata_src_type = UGRID.)
<!-- -->
<entry id="mksrf_filename" type="char*256" category="mksurfdata"
group="default_settings"
valid_values="mksrf_fsoitex,mksrf_forganic,mksrf_flakwat,mksrf_fwetlnd,mksrf_fmax,mksrf_fmax,mksrf_fglacier,mksrf_fglacierregion,mksrf_fvocef,mksrf_furbtopo,firrig,mksrf_furban,mksrf_fvegtyp,mksrf_fsoicol,mksrf_flai,mksrf_fgdp,mksrf_fpeat,mksrf_fsoildepth,mksrf_fabm,mksrf_ftopostats,mksrf_fvic,mksrf_fch4" >
valid_values="mksrf_fsoitex,mksrf_forganic,mksrf_flakwat,mksrf_fwetlnd,mksrf_fmax,mksrf_fmax,mksrf_fglacier,mksrf_fglacierregion,mksrf_fvocef,mksrf_furbtopo,firrig,mksrf_furban,mksrf_fvegtyp,mksrf_fhrvtyp,mksrf_fsoicol,mksrf_flai,mksrf_fgdp,mksrf_fpeat,mksrf_fsoildepth,mksrf_fabm,mksrf_ftopostats,mksrf_fvic,mksrf_fch4" >
Filename for mksurfdata_map to remap raw data into the output surface dataset
</entry>

Expand All @@ -970,6 +970,11 @@ Filename for mksurfdata_map to remap raw data into the output surface dataset
Plant Function Type dataset for mksurfdata
</entry>

<entry id="mksrf_fhrvtyp" type="char*256" category="mksurfdata"
input_pathname="abs" group="clmexp" valid_values="" >
Harvest dataset for mksurfdata
</entry>

<entry id="mksrf_fglacier" type="char*256" category="mksurfdata"
input_pathname="abs" group="clmexp" valid_values="" >
Dataset for percent glacier land-unit for mksurfdata
Expand Down
20 changes: 10 additions & 10 deletions bld/unit_testers/NMLTest/CompFiles.pm
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ sub comparefiles {
my $compdir = shift;
my $nm = ref($self)."\:\:comparefiles";

$type =~ s#[ '&/]#+#g;
$comp_mode =~ s#[ '&/]#+#g;
$type =~ s#[ '"&/]#+#g;
$comp_mode =~ s#[ '"&/]#+#g;
my $confdir = $self->{'dir'};
my $diffref = $self->{'diffref'};
if ( ! defined($type) ) {
Expand Down Expand Up @@ -126,8 +126,8 @@ sub copyfiles {
my $mode = shift;
my $nm = ref($self)."\:\:copyfiles";

$type =~ s#[ '&/]#+#g;
$mode =~ s#[ '&/]#+#g;
$type =~ s#[ '"&/]#+#g;
$mode =~ s#[ '"&/]#+#g;
my $diffref = $self->{'diffref'};
my $filesref = $self->{'files'};
my $confdir = $self->{'dir'};
Expand All @@ -151,8 +151,8 @@ sub shownmldiff {
my $comp_mode = shift;
my $nm = ref($self)."\:\:shownmldiff";

$type =~ s#[ '&/]#+#g;
$comp_mode =~ s#[ '&/]#+#g;
$type =~ s#[ '"&/]#+#g;
$comp_mode =~ s#[ '"&/]#+#g;
my $filesref = $self->{'files'};
my $confdir = $self->{'dir'};
foreach my $file ( @$filesref ) {
Expand Down Expand Up @@ -184,8 +184,8 @@ sub dodiffonfile {
my $mode = shift;
my $nm = ref($self)."\:\:dodiffonfile";

$type =~ s#[ '&/]#+#g;
$mode =~ s#[ '&/]#+#g;
$type =~ s#[ '"&/]#+#g;
$mode =~ s#[ '"&/]#+#g;
my $diffref = $self->{'diffref'};
if ( ! defined($type) ) {
$type = "default";
Expand All @@ -204,8 +204,8 @@ sub doNOTdodiffonfile {
my $mode = shift;
my $nm = ref($self)."\:\:doNOTdodiffonfile";

$type =~ s#[ '&/]#+#g;
$mode =~ s#[ '&/]#+#g;
$type =~ s#[ '"&/]#+#g;
$mode =~ s#[ '"&/]#+#g;
my $diffref = $self->{'diffref'};
if ( ! defined($type) ) {
$type = "default";
Expand Down
16 changes: 9 additions & 7 deletions bld/unit_testers/build-namelist_test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ sub make_env_run {
# Compare to baseline
if ( defined($opts{'compare'}) ) {
$cfiles->dodiffonfile( "lnd_in", "most_options", $mode );
$cfiles->doNOTdodiffonfile( "$real_par_file", "most_options", $mode );
$cfiles->dodiffonfile( "$real_par_file", "most_options", $mode );
$cfiles->doNOTdodiffonfile( "$tempfile", "most_options", $mode );
$cfiles->comparefiles( "most_options", $mode, $opts{'compare'} );
}
Expand Down Expand Up @@ -295,7 +295,7 @@ sub make_env_run {
}
if ( defined($opts{'compare'}) ) {
$cfiles->doNOTdodiffonfile( "$tempfile", "$options", $mode );
$cfiles->doNOTdodiffonfile( "$real_par_file", "$options", $mode );
$cfiles->dodiffonfile( "$real_par_file", "$options", $mode );
$cfiles->comparefiles( "$options", $mode, $opts{'compare'} );
}
if ( defined($opts{'generate'}) ) {
Expand Down Expand Up @@ -324,6 +324,8 @@ sub make_env_run {
$cfiles->shownmldiff( "default", $mode );
if ( defined($opts{'compare'}) ) {
$cfiles->doNOTdodiffonfile( "$tempfile", "$options", $mode );
$cfiles->dodiffonfile( "lnd_in", "$options", $mode );
$cfiles->dodiffonfile( "$real_par_file", "$options", $mode );
$cfiles->comparefiles( "$options", $mode, $opts{'compare'} );
}
if ( defined($opts{'generate'}) ) {
Expand Down Expand Up @@ -909,7 +911,7 @@ sub make_env_run {
$cfiles->shownmldiff( "default", "standard" );
if ( defined($opts{'compare'}) ) {
$cfiles->doNOTdodiffonfile( "$tempfile", "$options", $mode );
$cfiles->doNOTdodiffonfile( "$real_par_file", "$options", $mode );
$cfiles->dodiffonfile( "$real_par_file", "$options", $mode );
$cfiles->comparefiles( "$options", $mode, $opts{'compare'} );
}

Expand Down Expand Up @@ -996,7 +998,7 @@ sub make_env_run {
$cfiles->shownmldiff( "default", "standard" );
if ( defined($opts{'compare'}) ) {
$cfiles->doNOTdodiffonfile( "$tempfile", "$res", $mode );
$cfiles->doNOTdodiffonfile( "$real_par_file", "$res", $mode );
$cfiles->dodiffonfile( "$real_par_file", "$res", $mode );
$cfiles->comparefiles( "$res", $mode, $opts{'compare'} );
}
if ( defined($opts{'generate'}) ) {
Expand All @@ -1022,7 +1024,7 @@ sub make_env_run {
$cfiles->shownmldiff( "default", "standard" );
if ( defined($opts{'compare'}) ) {
$cfiles->doNOTdodiffonfile( "$tempfile", "$options", $mode );
$cfiles->doNOTdodiffonfile( "$real_par_file", "$options", $mode );
$cfiles->dodiffonfile( "$real_par_file", "$options", $mode );
$cfiles->comparefiles( "$options", $mode, $opts{'compare'} );
}
if ( defined($opts{'generate'}) ) {
Expand Down Expand Up @@ -1080,7 +1082,7 @@ sub make_env_run {
$cfiles->shownmldiff( "default", "standard" );
if ( defined($opts{'compare'}) ) {
$cfiles->doNOTdodiffonfile( "$tempfile", "$options", $mode );
$cfiles->doNOTdodiffonfile( "$real_par_file", "$options", $mode );
$cfiles->dodiffonfile( "$real_par_file", "$options", $mode );
$cfiles->comparefiles( "$options", $mode, $opts{'compare'} );
}
if ( defined($opts{'generate'}) ) {
Expand All @@ -1102,7 +1104,7 @@ sub make_env_run {
$cfiles->shownmldiff( "default", "standard" );
if ( defined($opts{'compare'}) ) {
$cfiles->doNOTdodiffonfile( "$tempfile", "$options", $mode );
$cfiles->doNOTdodiffonfile( "$real_par_file", "$options", $mode );
$cfiles->dodiffonfile( "$real_par_file", "$options", $mode );
$cfiles->comparefiles( "$options", $mode, $opts{'compare'} );
}
if ( defined($opts{'generate'}) ) {
Expand Down
5 changes: 5 additions & 0 deletions cime_config/config_compsets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,11 @@
<lname>1850_DATM%CRU_CLM50%BGC-CROP_SICE_SOCN_MOSART_CISM2_SWAV</lname>
</compset>

<compset grid="g%gland">
<alias>IGMHISTCRUCLM50BGCCROP</alias>
<lname>HIST_DATM%CRU_CLM50%BGC-CROP_SICE_SOCN_MOSART_CISM2_SWAV</lname>
</compset>

<compset grid="g%gland">
<alias>IGM1850CRUCLM50BGC</alias>
<lname>1850_DATM%CRU_CLM50%BGC_SICE_SOCN_MOSART_CISM2_SWAV</lname>
Expand Down
Loading

0 comments on commit 0123b55

Please sign in to comment.