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

Trouble using mksurfdata in cesm1_0_3

aberg

New Member
I am using mksurfdata to create an fsurdat file with modified PFTs and LAIs for use in running CESM1_0_3.

The program successfully creates most or all variables, but I get this message after it successfully creates the LAIs/SAIs/heights:

"
land model surface data set successfully created for 2.5 by 1.9 grid
(OPNFIL): Successfully opened file pftdyn_hist_simyr1997-1997_1.txt on unit= 98
input pft dynamic dataset is /blhome/aberg/surfdata/PFT0.5_mod_mksrf_landuse_rc2000_c090630.nc 1997 year is 0
Attempting to make PFTs .....
Creating surface datasets with the standard # of PFTs = 16

netcdf error from read_domain rcode = 2 error = No such file or directory
"

It says there is no such file, but I have double checked my spelling and the location of my files and they are all there. I am not sure what the problem is. If anyone could help me out or knows where I'm in error, that would be great! If more info is needed let me know.

Here is the namelist I used:

&clmexp
mksrf_fgrid = '/fs/cgd/csm/inputdata/lnd/clm2/griddata/griddata_1.9x2.5_060404.nc'
mksrf_fsoitex = '/fs/cgd/csm/inputdata/lnd/clm2/rawdata/mksrf_soitex.10level.c010119.nc'
mksrf_forganic = '/fs/cgd/csm/inputdata/lnd/clm2/rawdata/mksrf_organic.10level.0.5deg.081112.nc'
mksrf_flanwat = '/fs/cgd/csm/inputdata/lnd/clm2/rawdata/mksrf_lanwat.050425.nc'
mksrf_fmax = '/fs/cgd/csm/inputdata/lnd/clm2/rawdata/mksrf_fmax.070406.nc'
mksrf_fglacier = '/fs/cgd/csm/inputdata/lnd/clm2/rawdata/mksrf_glacier.060929.nc'
mksrf_furban = '/fs/cgd/csm/inputdata/lnd/clm2/rawdata/mksrf_urban_3den_0.5x0.5_simyr2000.c090223_v1.nc'
mksrf_fvegtyp = '/blhome/aberg/surfdata/PFT0.5_mod_mksrf_landuse_rc2000_c090630.nc'
mksrf_fsoicol = '/fs/cgd/csm/inputdata/lnd/clm2/rawdata/pftlandusedyn.0.5x0.5.simyr1850-2005.c090630/mksrf_soilcol_global_c090324.nc'
mksrf_flai = '/blhome/aberg/surfdata/mod_mksrf_lai_global_c090506.nc'
mksrf_ftopo = '/fs/cgd/csm/inputdata/lnd/clm2/rawdata/mksrf_topo.10min.c080912.nc'
mksrf_ffrac = '/fs/cgd/csm/inputdata/lnd/clm2/griddata/fracdata_10min_USGS_071205.nc'
mksrf_fvocef = '/fs/cgd/csm/inputdata/lnd/clm2/rawdata/mksrf_vocef.c060502.nc'
mksrf_firrig = ' '
mksrf_fdynuse = 'pftdyn_hist_simyr1997-1997_1.txt'
outnc_double = .true.
/
 

slevis

Moderator
Staff member
Hi,

I don't know why the code complains about not finding the file, so my first suggestion is to try running mksurfdata with the default namelist (ie pointing to all the default files). Then you'll know whether the tool still works. If you've done that already, I'm not sure what else to suggest... Is it possible that your new files have the wrong permissions or something?

Sam
 

aberg

New Member
Thanks for the suggestions. I successfully ran mksurfdata with the default namelist, and had a successful test run of the model using that output surface data as my fsurdat file.

However, I also tried to run mksurfdata with the same default namelist, except with the mksrf_fvegtyp file in my home directory. When I tried this, mksurfdata gave me the same error I listed in my previous post:

"
land model surface data set successfully created for 2.5 by 1.9 grid
(OPNFIL): Successfully opened file pftdyn_hist_simyr1997-1997_1.txt on unit= 98
input pft dynamic dataset is /blhome/aberg/mksrf_landuse_rc2000_c090630.nc 1997 year is 0
Attempting to make PFTs .....
Creating surface datasets with the standard # of PFTs = 16

netcdf error from read_domain rcode = 2 error = No such file or directory
"

I get the same error when I have the file in my /ptmp directory. It's the exact same landuse file as the default, no modifications. So, my problem seems to be with mksurfdata reading from my directory. I also checked the permissions on all my files involved, and they look fine.

Any ideas on why this problem exists, or how to fix it?

Thanks!
 

slevis

Moderator
Staff member
Instead of /blhome, try /gpfs/blhome. NCAR's CISL has been moving everyone's bluefire home directories to /gpfs, and I wonder if this causes the problem.

The same may be true for /ptmp, but I'm not sure if it will be /gpfs/ptmp or something else.

Pls respond whether this worked or not. If not, I recommend asking a CISL consultant for help...

Sam
 

aberg

New Member
I did not see a blhome directory in /gpfs, but there is a /gpfs/ptmp. However, my username is not in this ptmp folder. My home directory still appears to be located in /blhome, at least for now. I did try running mksurfdata with the file from my /glade/home directory, but that also did not work. So as my next step, I will contact a CISL consultant and see what they can do.
 

aberg

New Member
So in mksurfdata, I misunderstood the purpose of the pftdyn file and realized I did not need the dynamic pfts after all. So when I ran mksurfdata, I left the pftdyn file pointing to the original namelist PFTs, but still changed the landuse file to point to my modified PFTs. So the output 'surfdata_0096x0144.nc' file contained my modified PFTs, but the output 'surfdata.pftdyn_0096x0144.nc' contained the original PFTs. I'm using the former file for my fsurdat file.

So, I actually did not find a solution for my original problem, which was that mksurfdata couldn't find my modified PFT file when it was making the surfdata.pftdyn file. This problem still exists, it just didn't interfere with creating the surfdata file without the dynamic PFTs, which is what I really needed. However, I did contact CISL about this problem and they are still looking into it, so if they are able to find a solution, I will post it here. It could be useful for someone else who wants to point to a file in their home directory when creating the dynamic PFTs dataset (assuming anyone else has this same problem).

Thanks again for the help! I'll update when I hear back from CISL.
 
I have the exact same problem and was wondering if anybody knows the solution. The code runs fine if I leave pftdyn_hist_simyr2000_2000.txt as the original file and change all the other files in the name list to newly created raw files. But if I want dynamic pft and change it to a new raw file, I'll get the same error as previously mentioned. Any ideas how to overcome this problem?
Thanks, Nadja
 

slevis

Moderator
Staff member
I have a vague recollection that the pftdyn_...txt file must have the exact same number of characters in every line. Since you get it to work with pftdyn_hist_simyr2000_2000.txt, check whether the file that you use for transient pfts has the same number of characters per line as the file that works.

Just an idea... If this has nothing to do with your problem, then I don't know what else to suggest at this point.

Sam Levis
 
Hi Sam, I am having the same issue here. I could run mksurfdata.pl for year 1850 or year 2000, 2005. But not the year range 1850-2000, the error message is the same as the others' message under this topic.In the pftdyn.txt file, every line have exact the same number of characters, such as/data/carbon2/yangz/inputdata/lnd/clm2/rawdata/pftlandusedyn.0.5x0.5.simyr1850-2005.c090630/mksrf_landuse_rc1850_c090630.nc           1850
/data/carbon2/yangz/inputdata/lnd/clm2/rawdata/pftlandusedyn.0.5x0.5.simyr1850-2005.c090630/mksrf_landuse_rc1851_c090630.nc           1851
/data/carbon2/yangz/inputdata/lnd/clm2/rawdata/pftlandusedyn.0.5x0.5.simyr1850-2005.c090630/mksrf_landuse_rc1852_c090630.nc           1852
/data/carbon2/yangz/inputdata/lnd/clm2/rawdata/pftlandusedyn.0.5x0.5.simyr1850-2005.c090630/mksrf_landuse_rc1853_c090630.nc           1853
/data/carbon2/yangz/inputdata/lnd/clm2/rawdata/pftlandusedyn.0.5x0.5.simyr1850-2005.c090630/mksrf_landuse_rc1854_c090630.nc           1854
/data/carbon2/yangz/inputdata/lnd/clm2/rawdata/pftlandusedyn.0.5x0.5.simyr1850-2005.c090630/mksrf_landuse_rc1855_c090630.nc           1855
/data/carbon2/yangz/inputdata/lnd/clm2/rawdata/pftlandusedyn.0.5x0.5.simyr1850-2005.c090630/mksrf_landuse_rc1856_c090630.nc           1856
/data/carbon2/yangz/inputdata/lnd/clm2/rawdata/pftlandusedyn.0.5x0.5.simyr1850-2005.c090630/mksrf_landuse_rc1857_c090630.nc           1857 do you know what is the problem behind?
 
Top