Skip to content

Commit

Permalink
Merge pull request #986 from ekluzek/rel2300ext
Browse files Browse the repository at this point in the history
Fix issues with no-anthro surface dataset creation
  • Loading branch information
ekluzek authored Apr 21, 2020
2 parents 82bbd1f + 27ed276 commit e6ee5ea
Show file tree
Hide file tree
Showing 9 changed files with 128 additions and 22 deletions.
8 changes: 8 additions & 0 deletions bld/namelist_files/namelist_defaults_clm4_5_tools.xml
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<mksrf_furban hgrid="3x3min" lmask="LandScan2004"
>lnd/clm2/rawdata/mksrf_urban_0.05x0.05_simyr2000.c120621.nc</mksrf_furban>

<mksrf_furban hgrid="3x3min" lmask="LandScan2004" sim_year="PtVg"
>lnd/clm2/rawdata/mksrf_urban_0.05x0.05_zerourbanpct.c181014.nc</mksrf_furban>

<!-- mksrf_fglacier % glacier land-unit -->
<!-- WJS (9-26-12):
There are two versions of this dataset: the "standard" version uses
Expand Down Expand Up @@ -286,6 +289,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<!-- fire-related datasets -->
<mksrf_fgdp hgrid="0.5x0.5" lmask="AVHRR"
>lnd/clm2/rawdata/mksrf_gdp_0.5x0.5_AVHRR_simyr2000.c130228.nc</mksrf_fgdp>
<mksrf_fgdp hgrid="0.5x0.5" lmask="AVHRR" sim_year="PtVg"
>lnd/clm2/rawdata/mksrf_gdp_0.5x0_zerogdp.c200413.nc</mksrf_fgdp>

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

<mksrf_fabm hgrid="0.5x0.5" lmask="AVHRR"
>lnd/clm2/rawdata/mksrf_abm_0.5x0.5_AVHRR_simyr2000.c130201.nc</mksrf_fabm>
<mksrf_fabm hgrid="0.5x0.5" lmask="AVHRR" sim_year="PtVg"
>lnd/clm2/rawdata/mksrf_abm_0.5x0.5_missingabm.c200413.nc</mksrf_fabm>


<mksrf_ftopostats hgrid="1km-merge-10min" lmask="HYDRO1K-merge-nomask"
>lnd/clm2/rawdata/mksrf_topostats_1km-merge-10min_HYDRO1K-merge-nomask_simyr2000.c130402.nc</mksrf_ftopostats>
Expand Down
2 changes: 1 addition & 1 deletion cime_config/SystemTests/ssp.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def run_phase(self):

# determine run lengths needed below
stop_nf = self._case.get_value("STOP_N")
stop_n1 = stop_nf / 2
stop_n1 = int(stop_nf / 2)
stop_n2 = stop_nf - stop_n1

#-------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions doc/ChangeSum
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Tag Who Date Summary
============================================================================================================================
release-clm5.0.34 erik 04/20/2020 Update documentation for release-clm5.0 branch, and fix issues with no-anthro surface dataset creation
release-clm5.0.33 erik 04/07/2020 Turn irrigation on for 2300 SSP extensions
release-clm5.0.32 erik 04/02/2020 Extensions to 2300 for SSP5-8.5,SSP5-3.4, and SSP1-2.6
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
Expand Down
81 changes: 81 additions & 0 deletions doc/release-clm5.0.ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,85 @@
===============================================================
Tag name: release-clm5.0.34
Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326)
Date: Mon Apr 20 22:08:42 MDT 2020
One-line Summary: Update documentation for release-clm5.0 branch, and fix issues with no-anthro surface dataset creation

Purpose of this version:
------------------------

Fix the issues with the no-anthro surface dataset creation (the PtVg simulation year). This
makes sure GDP and urban is set to zero and abm to missing for this case. Also bring in the python3
fix that was intended for the last release tag.

CTSM Master Tag This Corresponds To: ctsm1.0.dev025 (with many other changes)

Summary of changes:
-------------------

Issues fixed (include CTSM Issue #): #980 #974
Fixes #980 -- PtVg option to mksurfdata should also set urban, and GDP to zero, as well as abm to missing
Fixes #974 -- Python 3 problem in SSP test

Science changes since: release-clm5.0.33
For Potential vegetation sim_year set urban to zero, GDP to zero and abm to missing with mksurfdata.pl

Software changes since: release-clm5.0.33
Fix python3 issue for testing in ssp.py

Changes to User Interface since: release-clm5.0.33

Testing:
--------

[PASS means all tests PASS and OK means tests PASS other than expected fails.]

build-namelist tests:

cheyenne - PASS

unit-tests (components/clm/src):

cheyenne - PASS
izumi ---- PASS

tools-tests (components/clm/test/tools):

cheyenne - OK
izumi ---- OK

PTCLM testing (components/clm/tools/shared/PTCLM/test): None

regular tests (aux_clm): None

Summary of Answer changes:
-------------------------

If the tag used for baseline comparisons was NOT the previous tag, note that here: previous

Changes answers relative to baseline: No bit-for-bit (other than PtVg surface dataset creation)

Detailed list of changes:
------------------------

Externals being used: No updates

cism: cism-release-cesm2.1.2_04
rtm: release-cesm2.0.04
mosart: release-cesm2.0.04
cime: cim5.6.33
FATES: sci.1.30.0_api.8.0.0
PTCLM: PTCLM2_20200121

CTSM Tag versions pulled over from master development branch: None

Pull Requests that document the changes (include PR ids): #976 #986
(https://github.com/ESCOMP/ctsm/pull)

#976 -- bring documentation to release branch
#986 -- Fix issues with no-atnthro surface dataset creation

===============================================================
===============================================================
Tag name: release-clm5.0.33
Originator(s): erik (Erik Kluzek)
Date: Tue Apr 7 13:21:28 MDT 2020
Expand Down
15 changes: 8 additions & 7 deletions test/tools/README.testnames
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@ n is the configuration type:
0 -- unused
a -- unused
b -- unused
c -- mkprocdata_map clm4.5
d -- mkmapgrids clm4.5
e -- gen_domain clm4.5
f -- PTCLM clm4.5
g -- mksurfdata_map clm4.5
h -- interpinic clm4.5
i -- tools scripts clm4.5
c -- mkprocdata_map clm5.0
d -- mkmapgrids clm5.0
e -- gen_domain clm5.0
f -- PTCLM clm5.0
g -- mksurfdata_map clm5.0
h -- interpinic clm5.0
i -- tools scripts clm5.0

m is the resolution

0 -- 0.9x1.25
1 -- 48x96
5 -- 10x15
6 -- 5x5_amazon
Expand Down
3 changes: 3 additions & 0 deletions test/tools/input_tests_master
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ blg54 TBLtools.sh mksurfdata_map tools__s namelist
smi24 TSMscript_tools.sh mksurfdata_map mksurfdata.pl mksrfdt_T31_crpglc_2000^tools__ds
bli24 TBLscript_tools.sh mksurfdata_map mksurfdata.pl mksrfdt_T31_crpglc_2000^tools__ds

smi04 TSMscript_tools.sh mksurfdata_map mksurfdata.pl mksrfdt_f09_PtVg^tools__ds
bli04 TBLscript_tools.sh mksurfdata_map mksurfdata.pl mksrfdt_f09_PtVg^tools__ds

smi53 TSMscript_tools.sh mksurfdata_map mksurfdata.pl mksrfdt_10x15_1850^tools__o
bli53 TBLscript_tools.sh mksurfdata_map mksurfdata.pl mksrfdt_10x15_1850^tools__o
smi54 TSMscript_tools.sh mksurfdata_map mksurfdata.pl mksrfdt_10x15_1850^tools__ds
Expand Down
1 change: 1 addition & 0 deletions test/tools/nl_files/mksrfdt_f09_PtVg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-l CSMDATA -r 0.9x1.25 -no-crop -y PtVg -exedir EXEDIR
1 change: 1 addition & 0 deletions test/tools/tests_pretag_cheyenne_nompi
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ smc#4 blc#4
sme14 ble14
sme@4 ble@4
smg54 blg54
smi04 bli04
smi24 bli24
smi53 bli53
smi64 bli64
Expand Down
38 changes: 24 additions & 14 deletions tools/mksurfdata_map/mksurfdata.pl
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ sub write_namelist_file {
my $mkcrop_on = ",crop='on'";

#
# Loop over all resolutions listed
# Loop over all resolutions and sim-years listed
#
foreach my $res ( @hresols ) {
#
Expand All @@ -628,7 +628,7 @@ sub write_namelist_file {
#
# Mapping files
#
my %map; my %hgrd; my %lmsk; my %datfil;
my %map; my %hgrd; my %lmsk; my %datfil; my %filnm;
my $hirespft = "off";
if ( defined($opts{'hirespft'}) ) {
$hirespft = "on";
Expand Down Expand Up @@ -659,8 +659,9 @@ sub write_namelist_file {
$hgrid = trim($hgrid);
my $filnm = `$scrdir/../../bld/queryDefaultNamelist.pl $mopts -options type=$typ -var mksrf_filename`;
$filnm = trim($filnm);
$hgrd{$typ} = $hgrid;
$lmsk{$typ} = $lmask;
$filnm{$typ} = $filnm;
$hgrd{$typ} = $hgrid;
$lmsk{$typ} = $lmask;
if ( $opts{'hgrid'} eq "usrspec" ) {
$map{$typ} = $opts{'usr_mapdir'}."/map_${hgrid}_${lmask}_to_${res}_nomask_aave_da_c${mapdate}\.nc";
} else {
Expand All @@ -672,15 +673,6 @@ sub write_namelist_file {
}
if ( ! defined($opts{'allownofile'}) && ! -f $map{$typ} ) {
die "ERROR: mapping file for this resolution does NOT exist ($map{$typ}).\n";
}
my $typ_cmd = "$scrdir/../../bld/queryDefaultNamelist.pl $mkopts -options hgrid=$hgrid,lmask=$lmask,mergeGIS=$merge_gis$mkcrop -var $filnm";
$datfil{$typ} = `$typ_cmd`;
$datfil{$typ} = trim($datfil{$typ});
if ( $datfil{$typ} !~ /[^ ]+/ ) {
die "ERROR: could NOT find a $filnm data file for this resolution: $hgrid and type: $typ and $lmask.\n$typ_cmd\n\n";
}
if ( ! defined($opts{'allownofile'}) && ! -f $datfil{$typ} ) {
die "ERROR: data file for this resolution does NOT exist ($datfil{$typ}).\n";
}
}
#
Expand Down Expand Up @@ -712,7 +704,7 @@ sub write_namelist_file {
#
my $double = ".true.";
#
# Loop over each sim_year
# Loop over each SSP-RCP scenario
#
RCP: foreach my $ssp_rcp ( @rcpaths ) {
#
Expand Down Expand Up @@ -745,6 +737,24 @@ sub write_namelist_file {
$sim_yrn = $2;
$transient = 1;
}
#
# Find the file for each of the types
#
foreach my $typ ( @typlist ) {
my $hgrid = $hgrd{$typ};
my $lmask = $lmsk{$typ};
my $filnm = $filnm{$typ};
my $typ_cmd = "$scrdir/../../bld/queryDefaultNamelist.pl $mkopts -options " .
"hgrid=$hgrid,lmask=$lmask,mergeGIS=$merge_gis$mkcrop,sim_year=$sim_yr0 -var $filnm";
$datfil{$typ} = `$typ_cmd`;
$datfil{$typ} = trim($datfil{$typ});
if ( $datfil{$typ} !~ /[^ ]+/ ) {
die "ERROR: could NOT find a $filnm data file for this resolution: $hgrid and type: $typ and $lmask.\n$typ_cmd\n\n";
}
if ( ! defined($opts{'allownofile'}) && ! -f $datfil{$typ} ) {
die "ERROR: data file for this resolution does NOT exist ($datfil{$typ}).\n";
}
}
# determine simulation year to use for the surface dataset:
my $sim_yr_surfdat = "$sim_yr0";

Expand Down

0 comments on commit e6ee5ea

Please sign in to comment.