Skip to content

Commit 56d8109

Browse files
authored
Merge pull request #2155 from olyson/PLUMBERcsv
PLUMBER2 plumbing (csv file, wrapper script, usermods, and scripts).
2 parents 4e898b4 + b078a1b commit 56d8109

File tree

355 files changed

+10731
-18
lines changed

Some content is hidden

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

355 files changed

+10731
-18
lines changed

.git-blame-ignore-revs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Ran python directory through black python formatter
2+
b429b63824e09f82e95d2982f14311cbbd8e4a37
23
d229b5c6689efc4c2a6cef077515c4ccd5c18ff6
34
4cd83cb3ee6d85eb909403487abf5eeaf4d98911
45
0aa2957c1f8603c63fa30b11295c06cfddff44a5

bld/namelist_files/namelist_definition_ctsm.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1971,6 +1971,12 @@ Filename of input stream data for LAI
19711971
Filename of input stream data for LAI
19721972
</entry>
19731973

1974+
<entry id="lai_dtlimit" type="real" category="datasets"
1975+
group="lai_streams" valid_values="" >
1976+
dtlimit (ratio of max/min stream delta times) for LAI streams, which allows for cycling over a year of data
1977+
</entry>
1978+
1979+
19741980
<entry id="lai_tintalgo" type="char*80" category="datasets"
19751981
group="lai_streams" valid_values="linear,nearest,lower,upper" >
19761982
Time interpolation method to use with LAI streams
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../defaults
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
./xmlchange PTS_LON=-66.459808
2+
./xmlchange PTS_LAT=-33.464802
3+
./xmlchange DATM_YR_END=2010
4+
./xmlchange START_TOD=10800
5+
./xmlchange ATM_NCPL=48
6+
7+
echo "fsurdat='/glade/u/home/wwieder/CTSM/tools/site_and_regional/subset_data_single_point/surfdata_1x1_PLUMBER2_AR-SLu_hist_16pfts_Irrig_CMIP6_simyr2000_c231005.nc ' " >> user_nl_clm
8+
echo "CLM_USRDAT.PLUMBER2:datafiles= \$DIN_LOC_ROOT/atm/datm7/CLM1PT_data/PLUMBER2/AR-SLu/CLM1PT_data/CTSM_DATM_AR-SLu_2010-2010.nc " >> user_nl_datm_streams
9+
echo "presaero.SSP3-7.0:year_first=2010" >> user_nl_datm_streams
10+
echo "presaero.SSP3-7.0:year_last=2010" >> user_nl_datm_streams
11+
echo "presaero.SSP3-7.0:year_align=2010" >> user_nl_datm_streams
12+
13+
echo "presndep.SSP3-7.0:year_first=2010" >> user_nl_datm_streams
14+
echo "presndep.SSP3-7.0:year_last=2010" >> user_nl_datm_streams
15+
echo "presndep.SSP3-7.0:year_align=2010" >> user_nl_datm_streams
16+
17+
echo "co2tseries.SSP3-7.0:year_first=2010" >> user_nl_datm_streams
18+
echo "co2tseries.SSP3-7.0:year_last=2010" >> user_nl_datm_streams
19+
echo "co2tseries.SSP3-7.0:year_align=2010" >> user_nl_datm_streams
20+
21+
compset=`./xmlquery COMPSET --value`
22+
CLM_USRDAT_NAME=`./xmlquery CLM_USRDAT_NAME --value`
23+
TEST=`./xmlquery TEST --value`
24+
25+
# For a transient case run the whole length and do not cycle
26+
if [[ $compset =~ ^HIST ]]; then
27+
# Number of years that can be run for the full transient case
28+
if [[ $TEST != "TRUE" ]]; then
29+
./xmlchange STOP_N=1
30+
fi
31+
# set start date for transient case with historical compset
32+
./xmlchange RUN_STARTDATE=2010-01-01
33+
./xmlchange DATM_YR_ALIGN=2010
34+
./xmlchange DATM_YR_START=2010
35+
else
36+
# for spinup case with I2000 compset
37+
./xmlchange RUN_STARTDATE=0001-01-01
38+
./xmlchange DATM_YR_ALIGN=1
39+
./xmlchange DATM_YR_START=2010
40+
fi
41+
42+
# Turn on LAI streams for a SP case
43+
if [[ $compset =~ .*CLM[0-9]+%[^_]*SP.* ]]; then
44+
echo "stream_fldfilename_lai='\$DIN_LOC_ROOT/lnd/clm2/lai_streams/PLUMBER2/AR-SLu/LAI_stream_AR-SLu_2010-2010.nc'" >> user_nl_clm
45+
echo "stream_year_last_lai=2010" >> user_nl_clm
46+
if [[ $compset =~ ^HIST ]]; then
47+
# for transient case with a historical compset
48+
echo "model_year_align_lai=2010" >> user_nl_clm
49+
echo "stream_year_first_lai=2010" >> user_nl_clm
50+
else
51+
# for a spinup case with a i2000 compset
52+
echo "model_year_align_lai=1" >> user_nl_clm
53+
echo "stream_year_first_lai=2010" >> user_nl_clm
54+
fi
55+
fi
56+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../defaults
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
./xmlchange PTS_LON=11.3175
2+
./xmlchange PTS_LAT=47.116669
3+
./xmlchange DATM_YR_END=2012
4+
./xmlchange START_TOD=82800
5+
./xmlchange ATM_NCPL=48
6+
7+
echo "fsurdat='/glade/u/home/wwieder/CTSM/tools/site_and_regional/subset_data_single_point/surfdata_1x1_PLUMBER2_AT-Neu_hist_16pfts_Irrig_CMIP6_simyr2000_c231005.nc ' " >> user_nl_clm
8+
echo "CLM_USRDAT.PLUMBER2:datafiles= \$DIN_LOC_ROOT/atm/datm7/CLM1PT_data/PLUMBER2/AT-Neu/CLM1PT_data/CTSM_DATM_AT-Neu_2002-2012.nc " >> user_nl_datm_streams
9+
echo "presaero.SSP3-7.0:year_first=2002" >> user_nl_datm_streams
10+
echo "presaero.SSP3-7.0:year_last=2012" >> user_nl_datm_streams
11+
echo "presaero.SSP3-7.0:year_align=2002" >> user_nl_datm_streams
12+
13+
echo "presndep.SSP3-7.0:year_first=2002" >> user_nl_datm_streams
14+
echo "presndep.SSP3-7.0:year_last=2012" >> user_nl_datm_streams
15+
echo "presndep.SSP3-7.0:year_align=2002" >> user_nl_datm_streams
16+
17+
echo "co2tseries.SSP3-7.0:year_first=2002" >> user_nl_datm_streams
18+
echo "co2tseries.SSP3-7.0:year_last=2012" >> user_nl_datm_streams
19+
echo "co2tseries.SSP3-7.0:year_align=2002" >> user_nl_datm_streams
20+
21+
compset=`./xmlquery COMPSET --value`
22+
CLM_USRDAT_NAME=`./xmlquery CLM_USRDAT_NAME --value`
23+
TEST=`./xmlquery TEST --value`
24+
25+
# For a transient case run the whole length and do not cycle
26+
if [[ $compset =~ ^HIST ]]; then
27+
# Number of years that can be run for the full transient case
28+
if [[ $TEST != "TRUE" ]]; then
29+
./xmlchange STOP_N=11
30+
fi
31+
# set start date for transient case with historical compset
32+
./xmlchange RUN_STARTDATE=2001-12-31
33+
./xmlchange DATM_YR_ALIGN=2001
34+
./xmlchange DATM_YR_START=2001
35+
else
36+
# for spinup case with I2000 compset
37+
./xmlchange RUN_STARTDATE=0001-01-01
38+
./xmlchange DATM_YR_ALIGN=1
39+
./xmlchange DATM_YR_START=2002
40+
fi
41+
42+
# Turn on LAI streams for a SP case
43+
if [[ $compset =~ .*CLM[0-9]+%[^_]*SP.* ]]; then
44+
echo "stream_fldfilename_lai='\$DIN_LOC_ROOT/lnd/clm2/lai_streams/PLUMBER2/AT-Neu/LAI_stream_AT-Neu_2002-2012.nc'" >> user_nl_clm
45+
echo "stream_year_last_lai=2012" >> user_nl_clm
46+
if [[ $compset =~ ^HIST ]]; then
47+
# for transient case with a historical compset
48+
echo "model_year_align_lai=2001" >> user_nl_clm
49+
echo "stream_year_first_lai=2001" >> user_nl_clm
50+
else
51+
# for a spinup case with a i2000 compset
52+
echo "model_year_align_lai=1" >> user_nl_clm
53+
echo "stream_year_first_lai=2002" >> user_nl_clm
54+
fi
55+
fi
56+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../defaults
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
./xmlchange PTS_LON=133.24899299999998
2+
./xmlchange PTS_LAT=-22.283001000000002
3+
./xmlchange DATM_YR_END=2017
4+
./xmlchange START_TOD=54000
5+
./xmlchange ATM_NCPL=48
6+
7+
echo "fsurdat='/glade/u/home/wwieder/CTSM/tools/site_and_regional/subset_data_single_point/surfdata_1x1_PLUMBER2_AU-ASM_hist_16pfts_Irrig_CMIP6_simyr2000_c231005.nc ' " >> user_nl_clm
8+
echo "CLM_USRDAT.PLUMBER2:datafiles= \$DIN_LOC_ROOT/atm/datm7/CLM1PT_data/PLUMBER2/AU-ASM/CLM1PT_data/CTSM_DATM_AU-ASM_2011-2017.nc " >> user_nl_datm_streams
9+
echo "presaero.SSP3-7.0:year_first=2011" >> user_nl_datm_streams
10+
echo "presaero.SSP3-7.0:year_last=2017" >> user_nl_datm_streams
11+
echo "presaero.SSP3-7.0:year_align=2011" >> user_nl_datm_streams
12+
13+
echo "presndep.SSP3-7.0:year_first=2011" >> user_nl_datm_streams
14+
echo "presndep.SSP3-7.0:year_last=2017" >> user_nl_datm_streams
15+
echo "presndep.SSP3-7.0:year_align=2011" >> user_nl_datm_streams
16+
17+
echo "co2tseries.SSP3-7.0:year_first=2011" >> user_nl_datm_streams
18+
echo "co2tseries.SSP3-7.0:year_last=2017" >> user_nl_datm_streams
19+
echo "co2tseries.SSP3-7.0:year_align=2011" >> user_nl_datm_streams
20+
21+
compset=`./xmlquery COMPSET --value`
22+
CLM_USRDAT_NAME=`./xmlquery CLM_USRDAT_NAME --value`
23+
TEST=`./xmlquery TEST --value`
24+
25+
# For a transient case run the whole length and do not cycle
26+
if [[ $compset =~ ^HIST ]]; then
27+
# Number of years that can be run for the full transient case
28+
if [[ $TEST != "TRUE" ]]; then
29+
./xmlchange STOP_N=7
30+
fi
31+
# set start date for transient case with historical compset
32+
./xmlchange RUN_STARTDATE=2010-12-31
33+
./xmlchange DATM_YR_ALIGN=2010
34+
./xmlchange DATM_YR_START=2010
35+
else
36+
# for spinup case with I2000 compset
37+
./xmlchange RUN_STARTDATE=0001-01-01
38+
./xmlchange DATM_YR_ALIGN=1
39+
./xmlchange DATM_YR_START=2011
40+
fi
41+
42+
# Turn on LAI streams for a SP case
43+
if [[ $compset =~ .*CLM[0-9]+%[^_]*SP.* ]]; then
44+
echo "stream_fldfilename_lai='\$DIN_LOC_ROOT/lnd/clm2/lai_streams/PLUMBER2/AU-ASM/LAI_stream_AU-ASM_2011-2017.nc'" >> user_nl_clm
45+
echo "stream_year_last_lai=2017" >> user_nl_clm
46+
if [[ $compset =~ ^HIST ]]; then
47+
# for transient case with a historical compset
48+
echo "model_year_align_lai=2010" >> user_nl_clm
49+
echo "stream_year_first_lai=2010" >> user_nl_clm
50+
else
51+
# for a spinup case with a i2000 compset
52+
echo "model_year_align_lai=1" >> user_nl_clm
53+
echo "stream_year_first_lai=2011" >> user_nl_clm
54+
fi
55+
fi
56+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../defaults
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
./xmlchange PTS_LON=145.427155
2+
./xmlchange PTS_LAT=-16.23819
3+
./xmlchange DATM_YR_END=2015
4+
./xmlchange START_TOD=50400
5+
./xmlchange ATM_NCPL=48
6+
7+
echo "fsurdat='/glade/u/home/wwieder/CTSM/tools/site_and_regional/subset_data_single_point/surfdata_1x1_PLUMBER2_AU-Cow_hist_16pfts_Irrig_CMIP6_simyr2000_c231005.nc ' " >> user_nl_clm
8+
echo "CLM_USRDAT.PLUMBER2:datafiles= \$DIN_LOC_ROOT/atm/datm7/CLM1PT_data/PLUMBER2/AU-Cow/CLM1PT_data/CTSM_DATM_AU-Cow_2010-2015.nc " >> user_nl_datm_streams
9+
echo "presaero.SSP3-7.0:year_first=2010" >> user_nl_datm_streams
10+
echo "presaero.SSP3-7.0:year_last=2015" >> user_nl_datm_streams
11+
echo "presaero.SSP3-7.0:year_align=2010" >> user_nl_datm_streams
12+
13+
echo "presndep.SSP3-7.0:year_first=2010" >> user_nl_datm_streams
14+
echo "presndep.SSP3-7.0:year_last=2015" >> user_nl_datm_streams
15+
echo "presndep.SSP3-7.0:year_align=2010" >> user_nl_datm_streams
16+
17+
echo "co2tseries.SSP3-7.0:year_first=2010" >> user_nl_datm_streams
18+
echo "co2tseries.SSP3-7.0:year_last=2015" >> user_nl_datm_streams
19+
echo "co2tseries.SSP3-7.0:year_align=2010" >> user_nl_datm_streams
20+
21+
compset=`./xmlquery COMPSET --value`
22+
CLM_USRDAT_NAME=`./xmlquery CLM_USRDAT_NAME --value`
23+
TEST=`./xmlquery TEST --value`
24+
25+
# For a transient case run the whole length and do not cycle
26+
if [[ $compset =~ ^HIST ]]; then
27+
# Number of years that can be run for the full transient case
28+
if [[ $TEST != "TRUE" ]]; then
29+
./xmlchange STOP_N=6
30+
fi
31+
# set start date for transient case with historical compset
32+
./xmlchange RUN_STARTDATE=2009-12-31
33+
./xmlchange DATM_YR_ALIGN=2009
34+
./xmlchange DATM_YR_START=2009
35+
else
36+
# for spinup case with I2000 compset
37+
./xmlchange RUN_STARTDATE=0001-01-01
38+
./xmlchange DATM_YR_ALIGN=1
39+
./xmlchange DATM_YR_START=2010
40+
fi
41+
42+
# Turn on LAI streams for a SP case
43+
if [[ $compset =~ .*CLM[0-9]+%[^_]*SP.* ]]; then
44+
echo "stream_fldfilename_lai='\$DIN_LOC_ROOT/lnd/clm2/lai_streams/PLUMBER2/AU-Cow/LAI_stream_AU-Cow_2010-2015.nc'" >> user_nl_clm
45+
echo "stream_year_last_lai=2015" >> user_nl_clm
46+
if [[ $compset =~ ^HIST ]]; then
47+
# for transient case with a historical compset
48+
echo "model_year_align_lai=2009" >> user_nl_clm
49+
echo "stream_year_first_lai=2009" >> user_nl_clm
50+
else
51+
# for a spinup case with a i2000 compset
52+
echo "model_year_align_lai=1" >> user_nl_clm
53+
echo "stream_year_first_lai=2010" >> user_nl_clm
54+
fi
55+
fi
56+

0 commit comments

Comments
 (0)