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

ESMF error when generating mapping data

Status
Not open for further replies.

James King

James King
Member
Hi all,

I'm trying to regrid some land use data onto a regionally-refined SE grid. Previously I did this on Cheyenne but it now doesn't seem to work on Derecho. Following the instructions in the readme in

<CESM root>/components/clm/tools/mksurfdata_map

I start by doing the following to generate the required mapping data:

cd ../mkmapdata
./mkmapdata.sh -f /glade/work/jamesking/MUSICA_REPO/ne0np4.UK_JAK_ne30x16/grids/UK_JAK_ne30x16_np4_SCRIP.nc --res UK_JAK_ne30x16

Which returns the error:
Using user specified scrip grid file: /glade/work/jamesking/MUSICA_REPO/ne0np4.UK_JAK_ne30x16/grids/UK_JAK_ne30x16_np4_SCRIP.nc
Output grid resolution is UK_JAK_ne30x16
Hostname = derecho4
Machine derecho4 NOT recognized
Path to ESMF binary directory does NOT exist:
Set the environment variable: ESMFBIN_PATH


What should I set ESMFBIN_PATH to?

Thanks,

James
 

James King

James King
Member
I do already have some mapping files I previously generated, in

/glade/work/jamesking/MUSICA_REPO/ne0np4.UK_JAK_ne30x16/maps


But I don't know if these are the right ones for the task I'm trying to do (regridding SSP data) or how to specify these options in mksurfdata.pl.

./mksurfdata.pl -usr_mapdir /glade/work/jamesking/MUSICA_REPO/ne0np4.UK_JAK_ne30x16/maps -res usrspec ne0np4.UK_JAK_ne30x16

Returns

ERROR: unrecognized arguments: ne0np4.UK_JAK_ne30x16
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Those tools have not been ported to Derecho, we are using the new tool, mksurfdata_esmf, which doesn't require mapping files. I did go down the rabbit hole a bit though and found the following worked on Derecho using release-cesm2.1.4, at least it finished creating mapping files, I didn't try to create surface datasets with them.

Change #PBS -q regular to #PBS -q main in regridbatch.sh
setenv ESMFBIN_PATH /glade/u/apps/derecho/23.09/spack/opt/spack/esmf/8.6.0/cray-mpich/8.1.27/oneapi/2023.2.1/7haa/bin/
setenv CSMDATA /glade/campaign/cesm/cesmdata/inputdata/
setenv MPIEXEC /opt/cray/pe/pals/1.2.12/bin/mpiexec

setenv RES UK_JAK_ne30x16
setenv GRIDFILE /glade/work/jamesking/MUSICA_REPO/ne0np4.UK_JAK_ne30x16/grids/UK_JAK_ne30x16_np4_SCRIP.nc

module load nco
qsub -A PXXXXXXXX ./regridbatch.sh
 

James King

James King
Member
Thanks Keith, I realise these hadn't been ported but wondered if anyone had a workaround. Will give this a try. In the meantime, which version of CESM would I need to get the new tool? If I need to install a new model to do this that's fine, as long as the files produced are still compatible with CESM2.1/2.2.

Thanks,

James
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
You would need ctsm5.2.0 at a minimum. Although I don't think the new files would be compatible with CESM2.1/2.2. It might be possible to make them compatible, not sure.
 

James King

James King
Member
Hi Keith,

As an update to this, I successfully ran mkmapdata.sh following your instructions and created a load of mapping files. Before I ran mksurfdata_map to try generating CLM input data, I checked the namelist files I have used to do this previously (on Derecho) and noticed that mkmapdata.sh has not generated a number of mapping files that the surfdata script appears to need. The relevant part of the namelist file is below with the missing files highlighted.

mksrf_fgrid = '/glade/work/jamesking/cesm2_2_derecho/components/clm/tools/mkmapdata/map_0.25x0.25_MODIS_to_UK_JAK_ne30x16_nomask_aave_da_c240607.nc'
map_fpft = '/glade/work/jamesking/cesm2_2_derecho/components/clm/tools/mkmapdata/map_0.25x0.25_MODIS_to_UK_JAK_ne30x16_nomask_aave_da_c240607.nc'
map_fglacier = '/glade/work/jamesking/cesm2_2_derecho/components/clm/tools/mkmapdata/map_3x3min_GLOBE-Gardner_to_UK_JAK_ne30x16_nomask_aave_da_c240607.nc'
map_fglacierregion = '/glade/work/jamesking/cesm2_2_derecho/components/clm/tools/mkmapdata/map_10x10min_nomask_to_UK_JAK_ne30x16_nomask_aave_da_c240607.nc'
map_fsoicol = '/glade/work/jamesking/cesm2_2_derecho/components/clm/tools/mkmapdata/map_0.25x0.25_MODIS_to_UK_JAK_ne30x16_nomask_aave_da_c240607.nc'
map_furban = '/glade/work/jamesking/cesm2_2_derecho/components/clm/tools/mkmapdata/map_3x3min_LandScan2004_to_UK_JAK_ne30x16_nomask_aave_da_c240607.nc'
map_fmax = '/glade/work/jamesking/cesm2_2_derecho/components/clm/tools/mkmapdata/map_3x3min_USGS_to_UK_JAK_ne30x16_nomask_aave_da_c240607.nc'
map_forganic = '/glade/work/jamesking/cesm2_2_derecho/components/clm/tools/mkmapdata/map_5x5min_ISRIC-WISE_to_UK_JAK_ne30x16_nomask_aave_da_c240607.nc'
map_flai = '/glade/work/jamesking/cesm2_2_derecho/components/clm/tools/mkmapdata/map_0.25x0.25_MODIS_to_UK_JAK_ne30x16_nomask_aave_da_c240607.nc'
map_fharvest = '/glade/work/jamesking/cesm2_2_derecho/components/clm/tools/mkmapdata/map_0.25x0.25_MODIS_to_UK_JAK_ne30x16_nomask_aave_da_c240607.nc'
map_flakwat = '/glade/work/jamesking/cesm2_2_derecho/components/clm/tools/mkmapdata/map_3x3min_MODIS-wCsp_to_UK_JAK_ne30x16_nomask_aave_da_c240607.nc'
map_fwetlnd = '/glade/work/jamesking/cesm2_2_derecho/components/clm/tools/mkmapdata/map_0.5x0.5_lanwat_to_0.9x1.25_aave_da_110307.nc'
map_fvocef = '/glade/work/jamesking/cesm2_2_derecho/components/clm/tools/mkmapdata/map_0.5x0.5_lanwat_to_0.9x1.25_aave_da_110307.nc'
map_fsoitex = '/glade/work/jamesking/cesm2_2_derecho/components/clm/tools/mkmapdata/map_5minx5min_soitex_to_0.9x1.25_aave_da_110722.nc'
map_furbtopo = '/glade/work/jamesking/cesm2_2_derecho/components/clm/tools/mkmapdata/map_10minx10min_topo_to_0.9x1.25_aave_da_110630.nc'
map_fgdp = '/glade/work/jamesking/cesm2_2_derecho/components/clm/tools/mkmapdata/map_0.5x0.5_lanwat_to_0.9x1.25_aave_da_110307.nc'
map_fpeat = '/glade/work/jamesking/cesm2_2_derecho/components/clm/tools/mkmapdata/map_0.5x0.5_lanwat_to_0.9x1.25_aave_da_110307.nc'

map_fsoildepth = '/glade/work/jamesking/cesm2_2_derecho/components/clm/tools/mkmapdata/map_5x5min_ORNL-Soil_to_UK_JAK_ne30x16_nomask_aave_da_c240607.nc'
map_fabm = '/glade/work/jamesking/cesm2_2_derecho/components/clm/tools/mkmapdata/map_0.5x0.5_lanwat_to_0.9x1.25_aave_da_110307.nc'
map_ftopostats = '/glade/work/jamesking/cesm2_2_derecho/components/clm/tools/mkmapdata/map_1km-merge-10min_HYDRO1K-merge-nomask_to_UK_JAK_ne30x16_nomask_aave_da_c240607.nc'
map_fvic = '/glade/work/jamesking/cesm2_2_derecho/components/clm/tools/mkmapdata/map_0.9x1.25_GRDC_to_UK_JAK_ne30x16_nomask_aave_da_c240607.nc'
map_fch4 = '/glade/work/jamesking/cesm2_2_derecho/components/clm/tools/mkmapdata/map_360x720cru_cruncep_to_UK_JAK_ne30x16_nomask_aave_da_c240607.nc'

I see that these are all really old files (2011 timestamp = generated when I was still in high school) so I wonder if they are still necessary or if I could swap in any of the new files I have? For example, I have mapping files to my new grid from 0.5x0.5, 5minx5min, and 10minx10min grids:

map_0.5x0.5_MODIS_to_UK_JAK_ne30x16_nomask_aave_da_c240607.nc
map_5x5min_nomask_to_UK_JAK_ne30x16_nomask_aave_da_c240607.nc
map_10x10min_nomask_to_UK_JAK_ne30x16_nomask_aave_da_c240607.nc

Thanks again,

James
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Hmm. I was able to create a surface dataset using the mapping files and release-cesm2.1.4 on Derecho:

/glade/work/oleson/release-cesm2.1.4/components/clm/tools/mksurfdata_map/surfdata_UK_JAK_ne30x16_hist_78pfts_CMIP6_simyr2005_c240606.nc

You can look at the namelist there also:

/glade/work/oleson/release-cesm2.1.4/components/clm/tools/mksurfdata_map/surfdata_UK_JAK_ne30x16_hist_78pfts_CMIP6_simyr2005_c240606.namelist

I did have to change the path to pft files and file names to pftcftdynharv.0.25x0.25.LUH2.histsimyr1850-2015.cdf5.c170629 in bld/namelist_files/namelist_defaults_clm4_5_tools.xml

I'm not sure why release-cesm2.1.4 is apparently requiring fewer mapping files than the model version you are using.
 

James King

James King
Member
I'm having a play around with the settings to try and create these mapping files, but that's good to know that you could create a surfdata file in the older model version, as these are interoperable between model versions. If this doesn't work in CESM2.2.0 I'll try with the older code. What I'm after is a surfdata file for the year 2019 on my new grid, using SSP2 land use data for that year.
 
Status
Not open for further replies.
Top