Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

How can I create Pre-industry surface data for CLM?

liliyao

Xinamai
Member
Hi Dr. Oleson, we have fixed our SSP1-2.6 problem by modifying a line in mksurfdata.pl :
Replace: "hgrid=$hgrid,lmask=$lmask,mergeGIS=$merge_gis$mkcrop,sim_year=$sim_yr0 -var $filnm";
With: "hgrid=$hgrid,lmask=$lmask,mergeGIS=$merge_gis$mkcrop,ssp_rcp=${ssp_rcp}${mkcrop},sim_year=$sim_yr0 -var $filnm";
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Thanks, great, interesting that this appears to behave differently on your system...
 

Dong Peng

Dong Peng
Member
There's actually a simple fix to this. We limited the years you can run mksurfdata.pl for with the thinking that it would help eliminate typo's or mistakes in the files being made.

What you need to do is edit the file namelist_definition_ctsm.xml under bld/namelist_files for the sim_year entry which looks like...


Code:
<entry id="sim_year" type="char*4" category="default_settings"
       group="default_settings" valid_values=
"PtVg,1000,850,1100,1350,1600,1850,1855,1865,1875,1885,1895,1905,1915,1925,1935,1945,1955,1965,1975,1979,1980,1982,1985,1995,2000,2005,2010,2013,2015,2018,2025,2035,2045,2055,2065,2075,2085,2095,2105">
Year to simulate and to provide datasets for (such as surface datasets, initial conditions, aerosol-deposition, Nitrogen deposition rates etc.)
A sim_year of 1000 corresponds to data used for testing only, NOT corresponding to any real datasets.
A sim_year greater than 2015 corresponds to ssp_rcp scenario data
A sim_year of PtVg refers to the Potential Vegetation dataset, that doesn't include human influences
Most years are only used for clm_tools and there aren't CLM datasets that correspond to them.
CLM datasets exist for years: 1000 (for testing), 1850, and 2000

</entry>

As you can see 1750 isn't in the list, so you just need to add it to the above list.

We decided to go away from these types of restrictions in the newest version of the mksurfdata tool which will come out with CTSM5.2.

We also did make the above kind of change for the TRENDY datasets which start in 1700.
Hi Erik @erik and Keith Oleson @oleson . I meet something unusual. When I type "perl mksurfdata.pl -y 2030 -inlandwet -r 0.25x0.25 -ssp_rcp SSP2-4.5" in the mksurfdata path. The created namelist can't point to the right mksrf_fvegtyp path.

Here is the log:

perl mksurfdata.pl -y 2030 -inlandwet -r 0.9x1.25 -ssp_rcp SSP2-4.5
CSMDATA is /data4/home/dpeng/CESM/cesm2.1.3/inputdata
resolution: 0.9x1.25 ssp_rcp=SSP2-4.5 sim_year = 2030
namelist: surfdata_0.9x1.25_SSP2-4.5_78pfts_CMIP6_simyr2030_c240419.namelist
&clmexp
...
mksrf_fvegtyp = '/data4/home/dpeng/CESM/cesm2.1.3/inputdata/lnd/clm2/rawdata/pftcftdynharv.0.25x0.25.SSP1-2.6.simyr2016-2100.c181217/mksrf_landuse_SSP1RCP26_clm5_2030.c181217.nc'
mksrf_fhrvtyp = '/data4/home/dpeng/CESM/cesm2.1.3/inputdata/lnd/clm2/rawdata/pftcftdynharv.0.25x0.25.SSP1-2.6.simyr2016-2100.c181217/mksrf_landuse_SSP1RCP26_clm5_2030.c181217.nc'

...

fsurdat = 'surfdata_0.9x1.25_SSP2-4.5_78pfts_CMIP6_simyr2030_c240419.nc'
fsurlog = 'surfdata_0.9x1.25_SSP2-4.5_78pfts_CMIP6_simyr2030_c240419.log'
mksrf_fdynuse = ''
fdyndat = ''
numpft = 78


!----------------------------------------
And I checked the mksurfdata.pl, it seems this file can read the ssp_rcp option, but I dont know why it can't point to the right path of the raw files.

The setting of namelist_defaults_clm4_5_tools.xml is correct, and the SSP file paths both write like this:

<!-- SSP2-RCP 4.5 -->
<mksrf_fvegtyp hgrid="0.25x0.25" ssp_rcp="SSP2-4.5" sim_year="2016" crop="on"
>lnd/clm2/rawdata/pftcftdynharv.0.25x0.25.SSP2-4.5.simyr2016-2100.c181217/mksrf_landuse_SSP2RCP45_clm5_2016.c181217.nc
</mksrf_fvegtyp>

!---------------------


Thanks.
Dong Peng
 

Dong Peng

Dong Peng
Member
Hi Erik @erik and Keith Oleson @oleson . I meet something unusual. When I type "perl mksurfdata.pl -y 2030 -inlandwet -r 0.25x0.25 -ssp_rcp SSP2-4.5" in the mksurfdata path. The created namelist can't point to the right mksrf_fvegtyp path.

Here is the log:

perl mksurfdata.pl -y 2030 -inlandwet -r 0.9x1.25 -ssp_rcp SSP2-4.5
CSMDATA is /data4/home/dpeng/CESM/cesm2.1.3/inputdata
resolution: 0.9x1.25 ssp_rcp=SSP2-4.5 sim_year = 2030
namelist: surfdata_0.9x1.25_SSP2-4.5_78pfts_CMIP6_simyr2030_c240419.namelist
&clmexp
...
mksrf_fvegtyp = '/data4/home/dpeng/CESM/cesm2.1.3/inputdata/lnd/clm2/rawdata/pftcftdynharv.0.25x0.25.SSP1-2.6.simyr2016-2100.c181217/mksrf_landuse_SSP1RCP26_clm5_2030.c181217.nc'
mksrf_fhrvtyp = '/data4/home/dpeng/CESM/cesm2.1.3/inputdata/lnd/clm2/rawdata/pftcftdynharv.0.25x0.25.SSP1-2.6.simyr2016-2100.c181217/mksrf_landuse_SSP1RCP26_clm5_2030.c181217.nc'

...

fsurdat = 'surfdata_0.9x1.25_SSP2-4.5_78pfts_CMIP6_simyr2030_c240419.nc'
fsurlog = 'surfdata_0.9x1.25_SSP2-4.5_78pfts_CMIP6_simyr2030_c240419.log'
mksrf_fdynuse = ''
fdyndat = ''
numpft = 78


!----------------------------------------
And I checked the mksurfdata.pl, it seems this file can read the ssp_rcp option, but I dont know why it can't point to the right path of the raw files.

The setting of namelist_defaults_clm4_5_tools.xml is correct, and the SSP file paths both write like this:

<!-- SSP2-RCP 4.5 -->
<mksrf_fvegtyp hgrid="0.25x0.25" ssp_rcp="SSP2-4.5" sim_year="2016" crop="on"
>lnd/clm2/rawdata/pftcftdynharv.0.25x0.25.SSP2-4.5.simyr2016-2100.c181217/mksrf_landuse_SSP2RCP45_clm5_2016.c181217.nc
</mksrf_fvegtyp>

!---------------------


Thanks.
Dong Peng
OK . I know where to fix it. There was something wrong in the mksurfdata.pl in

!------------------------------------------------------------
my $sim_yr_surfdat = "$sim_yr0";

my $cmd = "$scrdir/../../bld/queryDefaultNamelist.pl $queryfilopts $resol -options sim_year='${sim_yr_surfdat}'$mkcrop,ssp_rcp=${ssp_rcp}${mkcrop} -var mksrf_fvegtyp -namelist clmexp";
my $vegtyp = `$cmd`;
chomp( $vegtyp );
if ( $vegtyp eq "" ) {
die "** trouble getting vegtyp file with: $cmd\n";
}
my $cmd = "$scrdir/../../bld/queryDefaultNamelist.pl $queryfilopts $resolhrv -options sim_year='${sim_yr_surfdat}'$mkcrop,ssp_rcp=${ssp_rcp}${mkcrop} -var mksrf_fvegtyp -namelist clmexp";
my $hrvtyp = `$cmd`;
chomp( $hrvtyp );
if ( $hrvtyp eq "" ) {
die "** trouble getting hrvtyp file with: $cmd\n";
}
...

!---------------------------------------------
The highlighted text should be added to the old version of clm tools. Lovely, it seems has been fixed in the newest version of CTSM.

Good job. @erik @oleson

Thanks. Have a good day.
 
Top