Skip to content

Commit e6ee5ea

Browse files
authored
Merge pull request #986 from ekluzek/rel2300ext
Fix issues with no-anthro surface dataset creation
2 parents 82bbd1f + 27ed276 commit e6ee5ea

File tree

9 files changed

+128
-22
lines changed

9 files changed

+128
-22
lines changed

bld/namelist_files/namelist_defaults_clm4_5_tools.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,9 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
257257
<mksrf_furban hgrid="3x3min" lmask="LandScan2004"
258258
>lnd/clm2/rawdata/mksrf_urban_0.05x0.05_simyr2000.c120621.nc</mksrf_furban>
259259

260+
<mksrf_furban hgrid="3x3min" lmask="LandScan2004" sim_year="PtVg"
261+
>lnd/clm2/rawdata/mksrf_urban_0.05x0.05_zerourbanpct.c181014.nc</mksrf_furban>
262+
260263
<!-- mksrf_fglacier % glacier land-unit -->
261264
<!-- WJS (9-26-12):
262265
There are two versions of this dataset: the "standard" version uses
@@ -286,6 +289,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
286289
<!-- fire-related datasets -->
287290
<mksrf_fgdp hgrid="0.5x0.5" lmask="AVHRR"
288291
>lnd/clm2/rawdata/mksrf_gdp_0.5x0.5_AVHRR_simyr2000.c130228.nc</mksrf_fgdp>
292+
<mksrf_fgdp hgrid="0.5x0.5" lmask="AVHRR" sim_year="PtVg"
293+
>lnd/clm2/rawdata/mksrf_gdp_0.5x0_zerogdp.c200413.nc</mksrf_fgdp>
289294

290295
<mksrf_fpeat hgrid="0.5x0.5" lmask="AVHRR"
291296
>lnd/clm2/rawdata/mksrf_peatf_0.5x0.5_AVHRR_simyr2000.c130228.nc</mksrf_fpeat>
@@ -295,6 +300,9 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
295300

296301
<mksrf_fabm hgrid="0.5x0.5" lmask="AVHRR"
297302
>lnd/clm2/rawdata/mksrf_abm_0.5x0.5_AVHRR_simyr2000.c130201.nc</mksrf_fabm>
303+
<mksrf_fabm hgrid="0.5x0.5" lmask="AVHRR" sim_year="PtVg"
304+
>lnd/clm2/rawdata/mksrf_abm_0.5x0.5_missingabm.c200413.nc</mksrf_fabm>
305+
298306

299307
<mksrf_ftopostats hgrid="1km-merge-10min" lmask="HYDRO1K-merge-nomask"
300308
>lnd/clm2/rawdata/mksrf_topostats_1km-merge-10min_HYDRO1K-merge-nomask_simyr2000.c130402.nc</mksrf_ftopostats>

cime_config/SystemTests/ssp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def run_phase(self):
4141

4242
# determine run lengths needed below
4343
stop_nf = self._case.get_value("STOP_N")
44-
stop_n1 = stop_nf / 2
44+
stop_n1 = int(stop_nf / 2)
4545
stop_n2 = stop_nf - stop_n1
4646

4747
#-------------------------------------------------------------------

doc/ChangeSum

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Tag Who Date Summary
22
============================================================================================================================
3+
release-clm5.0.34 erik 04/20/2020 Update documentation for release-clm5.0 branch, and fix issues with no-anthro surface dataset creation
34
release-clm5.0.33 erik 04/07/2020 Turn irrigation on for 2300 SSP extensions
45
release-clm5.0.32 erik 04/02/2020 Extensions to 2300 for SSP5-8.5,SSP5-3.4, and SSP1-2.6
56
release-clm5.0.31 erik 03/29/2020 Bring in raw datasets for 2100-2300 extension for SSP5-8.5/3.5 and SSP1-2.6, some other misc. changes

doc/release-clm5.0.ChangeLog

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,85 @@
11
===============================================================
2+
Tag name: release-clm5.0.34
3+
Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326)
4+
Date: Mon Apr 20 22:08:42 MDT 2020
5+
One-line Summary: Update documentation for release-clm5.0 branch, and fix issues with no-anthro surface dataset creation
6+
7+
Purpose of this version:
8+
------------------------
9+
10+
Fix the issues with the no-anthro surface dataset creation (the PtVg simulation year). This
11+
makes sure GDP and urban is set to zero and abm to missing for this case. Also bring in the python3
12+
fix that was intended for the last release tag.
13+
14+
CTSM Master Tag This Corresponds To: ctsm1.0.dev025 (with many other changes)
15+
16+
Summary of changes:
17+
-------------------
18+
19+
Issues fixed (include CTSM Issue #): #980 #974
20+
Fixes #980 -- PtVg option to mksurfdata should also set urban, and GDP to zero, as well as abm to missing
21+
Fixes #974 -- Python 3 problem in SSP test
22+
23+
Science changes since: release-clm5.0.33
24+
For Potential vegetation sim_year set urban to zero, GDP to zero and abm to missing with mksurfdata.pl
25+
26+
Software changes since: release-clm5.0.33
27+
Fix python3 issue for testing in ssp.py
28+
29+
Changes to User Interface since: release-clm5.0.33
30+
31+
Testing:
32+
--------
33+
34+
[PASS means all tests PASS and OK means tests PASS other than expected fails.]
35+
36+
build-namelist tests:
37+
38+
cheyenne - PASS
39+
40+
unit-tests (components/clm/src):
41+
42+
cheyenne - PASS
43+
izumi ---- PASS
44+
45+
tools-tests (components/clm/test/tools):
46+
47+
cheyenne - OK
48+
izumi ---- OK
49+
50+
PTCLM testing (components/clm/tools/shared/PTCLM/test): None
51+
52+
regular tests (aux_clm): None
53+
54+
Summary of Answer changes:
55+
-------------------------
56+
57+
If the tag used for baseline comparisons was NOT the previous tag, note that here: previous
58+
59+
Changes answers relative to baseline: No bit-for-bit (other than PtVg surface dataset creation)
60+
61+
Detailed list of changes:
62+
------------------------
63+
64+
Externals being used: No updates
65+
66+
cism: cism-release-cesm2.1.2_04
67+
rtm: release-cesm2.0.04
68+
mosart: release-cesm2.0.04
69+
cime: cim5.6.33
70+
FATES: sci.1.30.0_api.8.0.0
71+
PTCLM: PTCLM2_20200121
72+
73+
CTSM Tag versions pulled over from master development branch: None
74+
75+
Pull Requests that document the changes (include PR ids): #976 #986
76+
(https://github.com/ESCOMP/ctsm/pull)
77+
78+
#976 -- bring documentation to release branch
79+
#986 -- Fix issues with no-atnthro surface dataset creation
80+
81+
===============================================================
82+
===============================================================
283
Tag name: release-clm5.0.33
384
Originator(s): erik (Erik Kluzek)
485
Date: Tue Apr 7 13:21:28 MDT 2020

test/tools/README.testnames

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,17 @@ n is the configuration type:
2424
0 -- unused
2525
a -- unused
2626
b -- unused
27-
c -- mkprocdata_map clm4.5
28-
d -- mkmapgrids clm4.5
29-
e -- gen_domain clm4.5
30-
f -- PTCLM clm4.5
31-
g -- mksurfdata_map clm4.5
32-
h -- interpinic clm4.5
33-
i -- tools scripts clm4.5
27+
c -- mkprocdata_map clm5.0
28+
d -- mkmapgrids clm5.0
29+
e -- gen_domain clm5.0
30+
f -- PTCLM clm5.0
31+
g -- mksurfdata_map clm5.0
32+
h -- interpinic clm5.0
33+
i -- tools scripts clm5.0
3434

3535
m is the resolution
3636

37+
0 -- 0.9x1.25
3738
1 -- 48x96
3839
5 -- 10x15
3940
6 -- 5x5_amazon

test/tools/input_tests_master

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ blg54 TBLtools.sh mksurfdata_map tools__s namelist
1414
smi24 TSMscript_tools.sh mksurfdata_map mksurfdata.pl mksrfdt_T31_crpglc_2000^tools__ds
1515
bli24 TBLscript_tools.sh mksurfdata_map mksurfdata.pl mksrfdt_T31_crpglc_2000^tools__ds
1616

17+
smi04 TSMscript_tools.sh mksurfdata_map mksurfdata.pl mksrfdt_f09_PtVg^tools__ds
18+
bli04 TBLscript_tools.sh mksurfdata_map mksurfdata.pl mksrfdt_f09_PtVg^tools__ds
19+
1720
smi53 TSMscript_tools.sh mksurfdata_map mksurfdata.pl mksrfdt_10x15_1850^tools__o
1821
bli53 TBLscript_tools.sh mksurfdata_map mksurfdata.pl mksrfdt_10x15_1850^tools__o
1922
smi54 TSMscript_tools.sh mksurfdata_map mksurfdata.pl mksrfdt_10x15_1850^tools__ds
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-l CSMDATA -r 0.9x1.25 -no-crop -y PtVg -exedir EXEDIR

test/tools/tests_pretag_cheyenne_nompi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ smc#4 blc#4
22
sme14 ble14
33
sme@4 ble@4
44
smg54 blg54
5+
smi04 bli04
56
smi24 bli24
67
smi53 bli53
78
smi64 bli64

tools/mksurfdata_map/mksurfdata.pl

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ sub write_namelist_file {
604604
my $mkcrop_on = ",crop='on'";
605605

606606
#
607-
# Loop over all resolutions listed
607+
# Loop over all resolutions and sim-years listed
608608
#
609609
foreach my $res ( @hresols ) {
610610
#
@@ -628,7 +628,7 @@ sub write_namelist_file {
628628
#
629629
# Mapping files
630630
#
631-
my %map; my %hgrd; my %lmsk; my %datfil;
631+
my %map; my %hgrd; my %lmsk; my %datfil; my %filnm;
632632
my $hirespft = "off";
633633
if ( defined($opts{'hirespft'}) ) {
634634
$hirespft = "on";
@@ -659,8 +659,9 @@ sub write_namelist_file {
659659
$hgrid = trim($hgrid);
660660
my $filnm = `$scrdir/../../bld/queryDefaultNamelist.pl $mopts -options type=$typ -var mksrf_filename`;
661661
$filnm = trim($filnm);
662-
$hgrd{$typ} = $hgrid;
663-
$lmsk{$typ} = $lmask;
662+
$filnm{$typ} = $filnm;
663+
$hgrd{$typ} = $hgrid;
664+
$lmsk{$typ} = $lmask;
664665
if ( $opts{'hgrid'} eq "usrspec" ) {
665666
$map{$typ} = $opts{'usr_mapdir'}."/map_${hgrid}_${lmask}_to_${res}_nomask_aave_da_c${mapdate}\.nc";
666667
} else {
@@ -672,15 +673,6 @@ sub write_namelist_file {
672673
}
673674
if ( ! defined($opts{'allownofile'}) && ! -f $map{$typ} ) {
674675
die "ERROR: mapping file for this resolution does NOT exist ($map{$typ}).\n";
675-
}
676-
my $typ_cmd = "$scrdir/../../bld/queryDefaultNamelist.pl $mkopts -options hgrid=$hgrid,lmask=$lmask,mergeGIS=$merge_gis$mkcrop -var $filnm";
677-
$datfil{$typ} = `$typ_cmd`;
678-
$datfil{$typ} = trim($datfil{$typ});
679-
if ( $datfil{$typ} !~ /[^ ]+/ ) {
680-
die "ERROR: could NOT find a $filnm data file for this resolution: $hgrid and type: $typ and $lmask.\n$typ_cmd\n\n";
681-
}
682-
if ( ! defined($opts{'allownofile'}) && ! -f $datfil{$typ} ) {
683-
die "ERROR: data file for this resolution does NOT exist ($datfil{$typ}).\n";
684676
}
685677
}
686678
#
@@ -712,7 +704,7 @@ sub write_namelist_file {
712704
#
713705
my $double = ".true.";
714706
#
715-
# Loop over each sim_year
707+
# Loop over each SSP-RCP scenario
716708
#
717709
RCP: foreach my $ssp_rcp ( @rcpaths ) {
718710
#
@@ -745,6 +737,24 @@ sub write_namelist_file {
745737
$sim_yrn = $2;
746738
$transient = 1;
747739
}
740+
#
741+
# Find the file for each of the types
742+
#
743+
foreach my $typ ( @typlist ) {
744+
my $hgrid = $hgrd{$typ};
745+
my $lmask = $lmsk{$typ};
746+
my $filnm = $filnm{$typ};
747+
my $typ_cmd = "$scrdir/../../bld/queryDefaultNamelist.pl $mkopts -options " .
748+
"hgrid=$hgrid,lmask=$lmask,mergeGIS=$merge_gis$mkcrop,sim_year=$sim_yr0 -var $filnm";
749+
$datfil{$typ} = `$typ_cmd`;
750+
$datfil{$typ} = trim($datfil{$typ});
751+
if ( $datfil{$typ} !~ /[^ ]+/ ) {
752+
die "ERROR: could NOT find a $filnm data file for this resolution: $hgrid and type: $typ and $lmask.\n$typ_cmd\n\n";
753+
}
754+
if ( ! defined($opts{'allownofile'}) && ! -f $datfil{$typ} ) {
755+
die "ERROR: data file for this resolution does NOT exist ($datfil{$typ}).\n";
756+
}
757+
}
748758
# determine simulation year to use for the surface dataset:
749759
my $sim_yr_surfdat = "$sim_yr0";
750760

0 commit comments

Comments
 (0)