Skip to content

Commit bc7c8a3

Browse files
billsacksbjandre
authored andcommitted
clm4_5_18_r270
Always use multiple elevation classes for glacier, even with stub glc
1 parent 164fd23 commit bc7c8a3

File tree

95 files changed

+1048
-1413
lines changed

Some content is hidden

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

95 files changed

+1048
-1413
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
cime https://github.com/CESM-Development/cime/tags/cime5.4.0-alpha.03
2-
components/clm/tools/gen_domain https://github.com/CESM-Development/cime/tags/cime5.4.0-alpha.03/tools/mapping/gen_domain_files
1+
cime https://github.com/CESM-Development/cime/tags/billsacks/always_glcmec_n01
2+
components/clm/tools/gen_domain https://github.com/CESM-Development/cime/tags/billsacks/always_glcmec_n01/tools/mapping/gen_domain_files
33
components/cism https://svn-ccsm-models.cgd.ucar.edu/glc/trunk_tags/cism2_1_40
44
components/rtm https://github.com/ESCOMP/rtm/tags/rtm1_0_63
55
components/mosart https://github.com/ESCOMP/mosart/tags/mosart1_0_28

bld/CLMBuildNamelist.pm

Lines changed: 27 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,6 @@ OPTIONS
164164
-fire_emis Produce a fire_emis_nl namelist that will go into the
165165
"drv_flds_in" file for the driver to pass fire emissions to the atm.
166166
(Note: buildnml copies the file for use by the driver)
167-
-glc_present Set to true if the glc model is present (not sglc).
168-
This is used for error-checking, to make sure other options are
169-
set appropriately.
170167
-glc_nec <name> Glacier number of elevation classes [0 | 3 | 5 | 10 | 36]
171168
(default is 0) (standard option with land-ice model is 10)
172169
-help [or -h] Print usage to STDOUT.
@@ -256,7 +253,6 @@ sub process_commandline {
256253
clm_demand => "null",
257254
help => 0,
258255
glc_nec => "default",
259-
glc_present => 0,
260256
light_res => "default",
261257
l_ncpl => undef,
262258
lnd_tuning_mode => "default",
@@ -300,7 +296,6 @@ sub process_commandline {
300296
"note!" => \$opts{'note'},
301297
"megan!" => \$opts{'megan'},
302298
"glc_nec=i" => \$opts{'glc_nec'},
303-
"glc_present!" => \$opts{'glc_present'},
304299
"light_res=s" => \$opts{'light_res'},
305300
"irrig=s" => \$opts{'irrig'},
306301
"d:s" => \$opts{'dir'},
@@ -1978,57 +1973,42 @@ sub setup_logic_glacier {
19781973
if ( $val != $nl_flags->{'glc_nec'} ) {
19791974
$log->fatal_error("$var set to $val does NOT agree with -glc_nec argument of $nl_flags->{'glc_nec'} (set with GLC_NEC env variable)");
19801975
}
1981-
if ( $nl_flags->{'glc_nec'} > 0 ) {
1982-
if (! $opts->{'glc_present'}) {
1983-
$log->fatal_error("glc_nec is non-zero, but glc_present is not set (probably due to trying to use a stub glc model)");
1984-
}
19851976

1986-
if ( $physv->as_long() < $physv->as_long("clm4_5")) {
1987-
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'flndtopo' , 'hgrid'=>$nl_flags->{'res'}, 'mask'=>$nl_flags->{'mask'} );
1988-
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'fglcmask' , 'hgrid'=>$nl_flags->{'res'});
1989-
}
1977+
if ( $physv->as_long >= $physv->as_long("clm4_5") ) {
1978+
if ( $nl_flags->{'glc_nec'} < 1 ) {
1979+
$log->fatal_error("For clm4_5 and later, GLC_NEC must be at least 1.");
1980+
}
19901981

1991-
if ( $physv->as_long() >= $physv->as_long("clm4_5") ) {
1992-
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'glc_snow_persistence_max_days');
1993-
}
1982+
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'glc_snow_persistence_max_days');
19941983

19951984
} else {
1996-
if ($opts->{'glc_present'}) {
1997-
$log->fatal_error("glc_present is set (e.g., due to use of CISM), but glc_nec is zero");
1998-
}
1999-
2000-
# Error checking for glacier multiple elevation class options when glc_mec off
2001-
# Make sure various glc_mec-specific logicals are not true, and fglcmask is not set
2002-
my $create_glcmec = $nl->get_value('create_glacier_mec_landunit');
2003-
if ( defined($create_glcmec) ) {
2004-
if ( &value_is_true($create_glcmec) ) {
2005-
$log->fatal_error("create_glacer_mec_landunit is true, but glc_nec is equal to zero");
2006-
}
2007-
}
2008-
my $glc_dyntopo= $nl->get_value('glc_dyntopo');
2009-
if ( defined($glc_dyntopo) ) {
2010-
if ( &value_is_true($glc_dyntopo) ) {
2011-
$log->fatal_error("glc_dyntopo is true, but glc_nec is equal to zero");
2012-
}
2013-
}
2014-
my $glc_do_dynglacier= $nl->get_value('glc_do_dynglacier');
2015-
if ( defined($glc_do_dynglacier) ) {
2016-
if ( &value_is_true($glc_do_dynglacier) ) {
2017-
$log->fatal_error("glc_do_dynglacier (set from GLC_TWO_WAY_COUPLING env variable) is true, but glc_nec is equal to zero");
2018-
}
2019-
}
2020-
my $fglcmask = $nl->get_value('fglcmask');
2021-
if ( defined($fglcmask) ) {
2022-
$log->fatal_error("fglcmask is set, but glc_nec is equal to zero");
2023-
}
1985+
# clm4_0
1986+
if ( $nl_flags->{'glc_nec'} > 0 ) {
1987+
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'flndtopo' , 'hgrid'=>$nl_flags->{'res'}, 'mask'=>$nl_flags->{'mask'} );
1988+
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'fglcmask' , 'hgrid'=>$nl_flags->{'res'});
1989+
1990+
} else {
1991+
# glc_nec == 0
1992+
1993+
# Error checking for glacier multiple elevation class options when glc_mec off
1994+
# Make sure various glc_mec-specific logicals are not true, and fglcmask is not set
1995+
my $glc_dyntopo= $nl->get_value('glc_dyntopo');
1996+
if ( defined($glc_dyntopo) ) {
1997+
if ( &value_is_true($glc_dyntopo) ) {
1998+
$log->fatal_error("glc_dyntopo is true, but glc_nec is equal to zero");
1999+
}
2000+
}
2001+
my $fglcmask = $nl->get_value('fglcmask');
2002+
if ( defined($fglcmask) ) {
2003+
$log->fatal_error("fglcmask is set, but glc_nec is equal to zero");
2004+
}
2005+
}
20242006
}
20252007

20262008
# Dependence of albice on glc_nec has gone away starting in CLM4_5. Thus, we
20272009
# can remove glc_nec from the following call once we ditch CLM4_0.
20282010
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'albice', 'glc_nec'=>$nl_flags->{'glc_nec'});
20292011
if ( $physv->as_long() >= $physv->as_long("clm4_5") ) {
2030-
# These controls over glacier region behavior are needed even when running without glc_mec in order to satisfy some error checks in the code
2031-
# (And since we'll eventually move to always having glc_mec, it's not worth adding some complex logic to determine when they're really needed.)
20322012
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'glacier_region_behavior');
20332013
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'glacier_region_melt_behavior');
20342014
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'glacier_region_ice_runoff_behavior');
@@ -2410,7 +2390,7 @@ sub setup_logic_initial_conditions {
24102390
if ( &value_is_true($nl->get_value($useinitvar) ) ) {
24112391

24122392
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, "init_interp_attributes",
2413-
'sim_year'=>$settings{'sim_year'}, 'use_cndv'=>$nl_flags->{'use_cndv'}, 'glc_nec'=>$nl_flags->{'glc_nec'},
2393+
'sim_year'=>$settings{'sim_year'}, 'use_cndv'=>$nl_flags->{'use_cndv'},
24142394
'use_cn'=>$nl_flags->{'use_cn'}, 'nofail'=>1 );
24152395
my $attributes_string = remove_leading_and_trailing_quotes($nl->get_value("init_interp_attributes"));
24162396
foreach my $pair ( split( /\s/, $attributes_string) ) {

bld/namelist_files/checkmapfiles.ncl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
;
1010

1111
print( "Check that datm mapping files are consistent" );
12-
resolutions = (/ "128x256", "64x128", "48x96", "32x64", "8x16", "94x192", "0.23x0.31", "0.47x0.63", "0.9x1.25", "1.9x2.5", "2.5x3.33", "4x5", "10x15", "5x5_amazon", "1x1_tropicAtl", "1x1_camdenNJ", "1x1_vancouverCAN", "1x1_mexicocityMEX", "1x1_asphaltjungleNJ", "1x1_brazil", "1x1_urbanc_alpha", "1x1_numaIA", "1x1_smallvilleIA", "ne4np4", "ne16np4", "ne30np4", "ne60np4", "ne120np4", "ne240np4" /);
12+
resolutions = (/ "128x256", "64x128", "48x96", "32x64", "8x16", "94x192", "0.23x0.31", "0.47x0.63", "0.9x1.25", "1.9x2.5", "2.5x3.33", "4x5", "10x15", "5x5_amazon", "1x1_camdenNJ", "1x1_vancouverCAN", "1x1_mexicocityMEX", "1x1_asphaltjungleNJ", "1x1_brazil", "1x1_urbanc_alpha", "1x1_numaIA", "1x1_smallvilleIA", "ne4np4", "ne16np4", "ne30np4", "ne60np4", "ne120np4", "ne240np4" /);
1313

1414
space = " ";
1515
badres = 0

bld/namelist_files/namelist_defaults_clm4_0.xml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,6 @@ ic_tod="0" sim_year="2000" glc_nec="0" irrig=".false." crop="off" >lnd/clm2/init
202202
<!-- Surface datasets that belong with dynamic land-use change datasets (relative to {csmdata}) -->
203203
<fsurdat hgrid="10x15" sim_year="1000" irrig=".false." crop="off">lnd/clm2/surfdata/surfdata_10x15_USGS_070307.nc
204204
</fsurdat>
205-
<fsurdat hgrid="1x1_tropicAtl" sim_year="1000" irrig=".false." crop="off">lnd/clm2/surfdata/surfdata_1x1_tropicAtl_testyr1000_c100527.nc
206-
</fsurdat>
207205

208206
<!-- Datasets to use with glacier model (when we can accept answers changing these should move to the main version) -->
209207
<!-- WJS (9-28-12): Actually, we may want to remake glc_nec=10 surface datasets with
@@ -292,8 +290,6 @@ lnd/clm2/surfdata/surfdata_1x1_smallvilleIA_mp20_simyr2000_c110427.nc</fsurdat>
292290
lnd/clm2/surfdata/surfdata_5x5_amazon_simyr2000_c091026.nc</fsurdat>
293291
<fsurdat hgrid="1x1_brazil" sim_year="2000" irrig=".false." crop="off">
294292
lnd/clm2/surfdata/surfdata_1x1_brazil_simyr2000_c090928.nc</fsurdat>
295-
<fsurdat hgrid="1x1_tropicAtl" sim_year="2000" irrig=".false." crop="off">
296-
lnd/clm2/surfdata/surfdata_1x1_tropicAtl_simyr2000_c090923.nc</fsurdat>
297293

298294
<!-- 100% Urban single-point datasets (only for sim-year=2000) -->
299295
<fsurdat hgrid="1x1_camdenNJ" sim_year="2000" irrig=".false." crop="off">
@@ -359,10 +355,6 @@ lnd/clm2/surfdata_map/surfdata_ne120np4_simyr1850_c130311.nc</fsurdat>
359355
<fsurdat hgrid="ne240np4" sim_year="1850" irrig=".false.">
360356
lnd/clm2/surfdata_map/surfdata_ne240np4_simyr1850_c130313.nc</fsurdat>
361357

362-
<!-- Single point data for year 1850 -->
363-
<fsurdat hgrid="1x1_tropicAtl" sim_year="1850" irrig=".false." crop="off">
364-
lnd/clm2/surfdata/surfdata_1x1_tropicAtl_simyr1850_c090923.nc</fsurdat>
365-
366358
<!-- Dynamic PFT surface datasets (relative to {csmdata}) -->
367359

368360
<!-- Datasets to use with glacier model (when we can accept answers changing these should move to the main version) -->
@@ -381,8 +373,6 @@ lnd/clm2/surfdata/surfdata_1x1_tropicAtl_simyr1850_c090923.nc</fsurdat>
381373
<flanduse_timeseries hgrid="1.9x2.5" sim_year_range="1850-2000" irrig=".false." crop="off">lnd/clm2/surfdata/surfdata.pftdyn_1.9x2.5_simyr1850-2005_c091108.nc</flanduse_timeseries>
382374
<flanduse_timeseries hgrid="2.5x3.33" sim_year_range="1850-2000" irrig=".false." crop="off">lnd/clm2/surfdata/surfdata.pftdyn_2.5x3.33_simyr1850-2005_c091109.nc</flanduse_timeseries>
383375
<flanduse_timeseries hgrid="10x15" sim_year_range="1850-2000" irrig=".false." crop="off">lnd/clm2/surfdata/surfdata.pftdyn_10x15_simyr1850-2005_c100205.nc</flanduse_timeseries>
384-
<flanduse_timeseries hgrid="1x1_tropicAtl" sim_year_range="1850-2000" irrig=".false." crop="off">lnd/clm2/surfdata/surfdata.pftdyn_1x1_tropicAtl_simyr1850-2005_c091026.nc</flanduse_timeseries>
385-
<flanduse_timeseries hgrid="1x1_tropicAtl" sim_year_range="1000-1004" irrig=".false." crop="off">lnd/clm2/surfdata/surfdata.pftdyn_1x1_tropicAtl_testyr1000-1004_c100527.nc</flanduse_timeseries>
386376
<flanduse_timeseries hgrid="48x96" sim_year_range="1850-2000" irrig=".false." crop="off">lnd/clm2/surfdata_map/surfdata.pftdyn_48x96_hist_simyr1850-2005_c120127.nc</flanduse_timeseries>
387377

388378
<flanduse_timeseries hgrid="ne30np4" sim_year_range="1850-2000" irrig=".false." crop="off">lnd/clm2/surfdata_map/surfdata.pftdyn_ne30np4_hist_simyr1850-2005_c120907.nc</flanduse_timeseries>
@@ -519,15 +509,13 @@ lnd/clm2/surfdata/surfdata_1x1_tropicAtl_simyr1850_c090923.nc</fsurdat>
519509
<ndepmapalgo bgc="cn" hgrid="1x1_urbanc_alpha">nn</ndepmapalgo>
520510
<ndepmapalgo bgc="cn" hgrid="1x1_camdenNJ">nn</ndepmapalgo>
521511
<ndepmapalgo bgc="cn" hgrid="1x1_asphaltjungleNJ">nn</ndepmapalgo>
522-
<ndepmapalgo bgc="cn" hgrid="1x1_tropicAtl">nn</ndepmapalgo>
523512
<ndepmapalgo bgc="cn" hgrid="5x5_amazon">nn</ndepmapalgo>
524513
<ndepmapalgo bgc="cndv" hgrid="1x1_brazil">nn</ndepmapalgo>
525514
<ndepmapalgo bgc="cndv" hgrid="1x1_mexicocityMEX">nn</ndepmapalgo>
526515
<ndepmapalgo bgc="cndv" hgrid="1x1_vancouverCAN">nn</ndepmapalgo>
527516
<ndepmapalgo bgc="cndv" hgrid="1x1_urbanc_alpha">nn</ndepmapalgo>
528517
<ndepmapalgo bgc="cndv" hgrid="1x1_camdenNJ">nn</ndepmapalgo>
529518
<ndepmapalgo bgc="cndv" hgrid="1x1_asphaltjungleNJ">nn</ndepmapalgo>
530-
<ndepmapalgo bgc="cndv" hgrid="1x1_tropicAtl">nn</ndepmapalgo>
531519
<ndepmapalgo bgc="cndv" hgrid="5x5_amazon">nn</ndepmapalgo>
532520

533521
<!-- Create crop on a separate land-unit -->
@@ -544,15 +532,13 @@ lnd/clm2/surfdata/surfdata_1x1_tropicAtl_simyr1850_c090923.nc</fsurdat>
544532
<ndepmapalgo bgc="cn" hgrid="1x1_urbanc_alpha">nn</ndepmapalgo>
545533
<ndepmapalgo bgc="cn" hgrid="1x1_camdenNJ">nn</ndepmapalgo>
546534
<ndepmapalgo bgc="cn" hgrid="1x1_asphaltjungleNJ">nn</ndepmapalgo>
547-
<ndepmapalgo bgc="cn" hgrid="1x1_tropicAtl">nn</ndepmapalgo>
548535
<ndepmapalgo bgc="cn" hgrid="5x5_amazon">nn</ndepmapalgo>
549536
<ndepmapalgo bgc="cndv" hgrid="1x1_brazil">nn</ndepmapalgo>
550537
<ndepmapalgo bgc="cndv" hgrid="1x1_mexicocityMEX">nn</ndepmapalgo>
551538
<ndepmapalgo bgc="cndv" hgrid="1x1_vancouverCAN">nn</ndepmapalgo>
552539
<ndepmapalgo bgc="cndv" hgrid="1x1_urbanc_alpha">nn</ndepmapalgo>
553540
<ndepmapalgo bgc="cndv" hgrid="1x1_camdenNJ">nn</ndepmapalgo>
554541
<ndepmapalgo bgc="cndv" hgrid="1x1_asphaltjungleNJ">nn</ndepmapalgo>
555-
<ndepmapalgo bgc="cndv" hgrid="1x1_tropicAtl">nn</ndepmapalgo>
556542
<ndepmapalgo bgc="cndv" hgrid="5x5_amazon">nn</ndepmapalgo>
557543

558544
<!-- ========================================= -->
@@ -686,23 +672,6 @@ lnd/clm2/surfdata/surfdata_1x1_tropicAtl_simyr1850_c090923.nc</fsurdat>
686672

687673
<!-- mapping files for 1x1_smallvilleIA END -->
688674

689-
<!-- mapping files for 1x1_tropicAtl START added on Thu Jul 19 13:06:19 2012-->
690-
691-
<map frm_hgrid="0.5x0.5" frm_lmask="AVHRR" to_hgrid="1x1_tropicAtl" to_lmask="nomask">lnd/clm2/mappingdata/maps/1x1_tropicAtl/map_0.5x0.5_AVHRR_to_1x1_tropicAtl_nomask_aave_da_c120718.nc</map>
692-
<map frm_hgrid="0.5x0.5" frm_lmask="MODIS" to_hgrid="1x1_tropicAtl" to_lmask="nomask">lnd/clm2/mappingdata/maps/1x1_tropicAtl/map_0.5x0.5_MODIS_to_1x1_tropicAtl_nomask_aave_da_c120718.nc</map>
693-
<map frm_hgrid="0.5x0.5" frm_lmask="USGS" to_hgrid="1x1_tropicAtl" to_lmask="nomask">lnd/clm2/mappingdata/maps/1x1_tropicAtl/map_0.5x0.5_USGS_to_1x1_tropicAtl_nomask_aave_da_c120718.nc</map>
694-
<map frm_hgrid="0.5x0.5" frm_lmask="nomask" to_hgrid="1x1_tropicAtl" to_lmask="nomask">lnd/clm2/mappingdata/maps/1x1_tropicAtl/map_0.5x0.5_nomask_to_1x1_tropicAtl_nomask_aave_da_c120718.nc</map>
695-
<map frm_hgrid="10x10min" frm_lmask="nomask" to_hgrid="1x1_tropicAtl" to_lmask="nomask">lnd/clm2/mappingdata/maps/1x1_tropicAtl/map_10x10min_nomask_to_1x1_tropicAtl_nomask_aave_da_c120718.nc</map>
696-
<map frm_hgrid="3x3min" frm_lmask="MODIS" to_hgrid="1x1_tropicAtl" to_lmask="nomask">lnd/clm2/mappingdata/maps/1x1_tropicAtl/map_3x3min_MODIS_to_1x1_tropicAtl_nomask_aave_da_c120718.nc</map>
697-
<map frm_hgrid="3x3min" frm_lmask="USGS" to_hgrid="1x1_tropicAtl" to_lmask="nomask">lnd/clm2/mappingdata/maps/1x1_tropicAtl/map_3x3min_USGS_to_1x1_tropicAtl_nomask_aave_da_c120927.nc</map>
698-
<map frm_hgrid="5x5min" frm_lmask="IGBP-GSDP" to_hgrid="1x1_tropicAtl" to_lmask="nomask">lnd/clm2/mappingdata/maps/1x1_tropicAtl/map_5x5min_IGBP-GSDP_to_1x1_tropicAtl_nomask_aave_da_c120718.nc</map>
699-
<map frm_hgrid="5x5min" frm_lmask="ISRIC-WISE" to_hgrid="1x1_tropicAtl" to_lmask="nomask">lnd/clm2/mappingdata/maps/1x1_tropicAtl/map_5x5min_ISRIC-WISE_to_1x1_tropicAtl_nomask_aave_da_c120718.nc</map>
700-
<map frm_hgrid="5x5min" frm_lmask="nomask" to_hgrid="1x1_tropicAtl" to_lmask="nomask">lnd/clm2/mappingdata/maps/1x1_tropicAtl/map_5x5min_nomask_to_1x1_tropicAtl_nomask_aave_da_c120718.nc</map>
701-
<map frm_hgrid="3x3min" frm_lmask="GLOBE-Gardner" to_hgrid="1x1_tropicAtl" to_lmask="nomask">lnd/clm2/mappingdata/maps/1x1_tropicAtl/map_3x3min_GLOBE-Gardner_to_1x1_tropicAtl_nomask_aave_da_c120927.nc</map>
702-
<map frm_hgrid="3x3min" frm_lmask="GLOBE-Gardner-mergeGIS" to_hgrid="1x1_tropicAtl" to_lmask="nomask">lnd/clm2/mappingdata/maps/1x1_tropicAtl/map_3x3min_GLOBE-Gardner-mergeGIS_to_1x1_tropicAtl_nomask_aave_da_c120927.nc</map>
703-
704-
<!-- mapping files for 1x1_tropicAtl END -->
705-
706675
<!-- mapping files for 1x1_urbanc_alpha START added on Thu Jul 19 13:06:19 2012-->
707676

708677
<map frm_hgrid="0.5x0.5" frm_lmask="AVHRR" to_hgrid="1x1_urbanc_alpha" to_lmask="nomask">lnd/clm2/mappingdata/maps/1x1_urbanc_alpha/map_0.5x0.5_AVHRR_to_1x1_urbanc_alpha_nomask_aave_da_c120717.nc</map>

0 commit comments

Comments
 (0)