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

Errors with input dataset for CLM3.5-DGVM and -CN

I'm new to CLM. I have been able to get CLM3.5 running offline on our system. My problem is in turning on the flags for the DGVM and CN. I've been trying to run CLM3.5-DGVM and CLM3.5-CN just using the input datasets packaged with the CLM3.5 download but am encountering these errors:

For CLM-DGVM -
CHECK_DIM error: mismatch of input dimension 11300 with expected value 12182 for variable pft


For CLM-CN -
reading restart file
/inputdata/lnd/clm2/inidata_3.1/offline/clmi_0000-01-01_064x128_c070403.nc
Reading restart dataset
CHECK_VAR: variable t_ref2m is not on initial dataset


I have not changed the namelist from what was originally in the sample jobscript run-pc.csh. The maxpft is still 4.

The DGVM manual says that there are no special datasets required for the DGVM so I was wondering why the ones that came with CLM3.5 don't seem to match the expected DGVM and CN input in my model setup and what I can do about it.

I'd appreciate anyone's suggestions. Thanks!
 

slevis

Moderator
Staff member
Hi. Although there are no special datasets needed to run with the DGVM or CN, the initial dataset provided for the standard CLM is incompatible with the DGVM or CN. For this reason start both simulations with arbitrary initial conditions, which means finidat=' ' (a blank string).

For the DGVM, "arbitrary initial conditions" means starting from bare ground everywhere, so reaching equilibrium may take a simulation of about 250 yrs. For CN it's a bit worse because you're also starting with no carbon and no nitrogen in the soils. With CN you'll need to define AD_SPINUP for the first 600 yrs. Then restart or branch for 1 yr with the cpp option EXIT_SPINUP defined instead. Finally restart or branch for 50 yrs with neither cpp option defined. The model should be close to spun up at this point.

Unfortunately, we do not provide spun up datasets for the DGVM or for CN.

I hope this helps!

Sam Levis
CLM community liaison
 

slevis

Moderator
Staff member
Your suggestion should work. Or you could try (in the same area where you set bgc=cn):
set ad_spinup=on
and later
set exit_spinup=on
if your jobscript looks like this. If not, go with your original suggestion.

Also, if the DGVM fails with maxpft=4, pls change to 10.

Sam
 
Thanks, the DGVM seems to work with both maxpft=4 and maxpft=10, with all other namelist parameters unchanged from the sample jobscript.

Will a 250-year spinup require 250 years x 12 months of atmospheric forcing data in the yyyy-mm.nc format, or is there a way to read in a 12-month climatology instead? I tried running CLM3.5-DGVM with a start date outside of the provided NCEP files and got an error that the atmospheric forcing .nc file could not be found.

Thanks again for your help.
 

slevis

Moderator
Staff member
For a long run, I make links to the existing atm. forcing. For example, if I have 1949-01.nc to 1949-12.nc, then I type:
ln -s 1949-01.nc 1950-01.nc for each month for as many years as I would like. This tricks the model into thinking that the data exists.

Not sure for how long the dgvm will work with maxpft set to 4. If it tries at some point to put a 5th pft in a gridcell, it will fail.

Sam
 
I followed your suggestions, Dr. Levis, in making a 300-yr run (250 spinup + 50 control). All went well until the end of year 255 when I got this error:


Opening netcdf htape ./clmdgvm10.spinup.clm2.h0.0255-12.nc
HTAPE_CREATE: Successfully defined netcdf history file 1
Error in Establishment: fpc_total is 1.19492589410703 at gridcell
3413
ENDRUN: called without a message string
[cli_29]: aborting job:
application called MPI_Abort(MPI_COMM_WORLD, 1) - process 29


Simply restarting the run didn't work, generating a restart error instead:

(OPNFIL): Successfully opened file clmdgvm10.spinup.clm2.i.0256-01-01-00000
on unit= 1
RESTART_HISTORY error: read/write error 1 -1 on i/o unit =
1
ENDRUN: called without a message string
[cli_0]: aborting job:
application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0


I just wanted to ask how it is possible for the FPC to go over 1, and how to avoid/remedy the situation. If, say, I began another control run using the spun-up initial dataset from after the first 250 years, is it likely to end up with this error again?

Thank you very much for your assistance!
 

slevis

Moderator
Staff member
Here's what I wrote to a different user who encountered the same issue. He decided to follow my advice and change the "abort" to a warning. He has been happy with the outcome. This will require a one or two line change in the code, followed by rebuilding the executable:

"This happens in the model every now and then because the original LPJ did *not* make sure to keep the sum of trees and grasses to no more than 1 at the end of establishment. You could increase the tolerance or, better yet, leave it as a warning rather than killing the run. This way you could look in the log file to see how often it occurs. I would worry if the numbers exceeded 1 by more and more as the run progressed."

Sam
 
I see. Would it be within the support policy to share with me (if you don't mind) which file needs to be edited and how, or perhaps which user it was who did the edits before? I'm new to using Fortran as well and am learning as I go along. Thank you very much!

When the changes have been made, will it be necessary to repeat the 250-year spinup (the error occurred at the end of year 255) or is it sufficient to just start a new control run using the initial dataset beginning, say, year 251?

Just wondering, what valid solution is there if we do find that the run exceeds 1 more and more? Is this something that can be remedied by re-installation or transferring the model to a different system?
 

slevis

Moderator
Staff member
As stated in the error message, the abort happens in subroutine establishment. I think I would simply comment out the line that aborts. The user who tried this successfully was Michael Notaro at the University of Wisconsin if you find that you need further help.

You need not repeat the spinup because your change will only affect the run when this threshold is crossed, which clearly did not happen until year 255.

Let's assume for now that this will solve the problem. Michael did not find fpc_total exceeding 1 more and more.

Sam
 
Unfortunately, it seems that fpc_total exceeded 1 more as my run progressed. After 101 years, fpc_total exceeded 1 nine times, at a minimum of 1.1587 and a maximum of 1.3263. The value went over 1.2 five times.

I did not, however, get any error messages for fpc_total_new. Since, in DGVMEstablishmentMod.F90, I merely commented out the call to endrun should fpc_total > 1.15 then the program should have gone on with the subsequent adjustments and updating of fpc_total_new, as well as the error-checking if abs(fpc_total_new-1)>1e-6. I had similarly commented out the call to endrun for this error while still allowing the error message to be written out. Since I did not get error messages for fpc_total_new in the log files, I assume that despite fpc_total>1, fpc_total_new was always adjusted to be ~1 in the end.

Is this a correct assumption or should I still be worried about fpc_total? If it is not acceptable for fpc_total to be exceeding 1 by as much as it has despite fpc_total_new seeming to be ok, what remedy would you suggest?

Thanks!
 
Dear Sam,

I also get simliar error with input dataset for the improved CLM3. I was running DGVM with offline on my system for more than 400 years. And now I'm trying to run DGVM with the improved CLM3 is implemented into CCSM3 with hybrid run, I am using restart and initial files for atm, ice, and ocn from my last simulation, and I am using initial file for the land from my DGVM with the improved CLM3 (offline). But, then I got an error :
-----------------------------------------------------------
Successfully initialized variables for accumulation

Attempting to initialize time variant variables
Reading initial data from initial dataset
(GETFIL): attempting to find local file bld.clm2.i.2677-01-01-00000.nc
(GETFIL): using bld.clm2.i.2677-01-01-00000.nc in current working directory
CHECK_DIM error: mismatch of input dimension 1950 with expected value
2010 for variable gridcell
ENDRUN: called without a message string
-----------------------------------------------------
Is it possible for me to use the initial file from the offline for the fully coupled? Are they have different structures of files?

Thank you.
Best regards,
Rima
 

slevis

Moderator
Staff member
If the offline and coupled runs have different resolution and/or different land/ocean masks, then your initial/restart files will not work from one to the other. You have two options:
1) Run offline again using the surface dataset from the coupled run. If you do this, I suggest testing early (just to be sure) whether the coupled run works with an initial/restart file from the offline. Or...
2) Start the coupled run without an initial/restart file (arbitrary initial conditions) and run until you get an initial/restart file. Then write a script that will map the initial conditions from the initial/restart file of your original offline run into the initial/restart file generated by this coupled run. If you do this correctly, then you can use this initial/restart file for the coupled run.

Good luck!

Sam

climatevegetation said:
Dear Sam,

I also get simliar error with input dataset for the improved CLM3. I was running DGVM with offline on my system for more than 400 years. And now I'm trying to run DGVM with the improved CLM3 is implemented into CCSM3 with hybrid run, I am using restart and initial files for atm, ice, and ocn from my last simulation, and I am using initial file for the land from my DGVM with the improved CLM3 (offline). But, then I got an error :
-----------------------------------------------------------
Successfully initialized variables for accumulation

Attempting to initialize time variant variables
Reading initial data from initial dataset
(GETFIL): attempting to find local file bld.clm2.i.2677-01-01-00000.nc
(GETFIL): using bld.clm2.i.2677-01-01-00000.nc in current working directory
CHECK_DIM error: mismatch of input dimension 1950 with expected value
2010 for variable gridcell
ENDRUN: called without a message string
-----------------------------------------------------
Is it possible for me to use the initial file from the offline for the fully coupled? Are they have different structures of files?

Thank you.
Best regards,
Rima
 
Just wondering, how do people typically check if an initial file produced after a few hundred years of spinning-up already contains "reasonable" results (i.e. a "correct" pft distribution) if there is no "standard" dataset to compare to?
 

slevis

Moderator
Staff member
If it's a present-day simulation, then one can compare the dgvm output against observations (eg satellite data).
 
Dear Sam,

I tried your first options, since I use a new system, I should porting my uncoupled model to the new system, currently I am still working on it, but then I want to try your second options which mapping the initial conditions from the initial file of my original offline run into the initial/restart file generated by my coupled run. I tried to make a few lines script in iobinary.F90 to read my original initial file, but then it seem doesn't work yet. Is it correct i should modify in iobinary.F90 to map the initial file? Would you mind to give me some clue to write a script. Thank you.
Best,
Rima

------------------------------------------------------------------------------------------------
If the offline and coupled runs have different resolution and/or different land/ocean masks, then your initial/restart files will not work from one to the other. You have two options:
1) Run offline again using the surface dataset from the coupled run. If you do this, I suggest testing early (just to be sure) whether the coupled run works with an initial/restart file from the offline. Or...
2) Start the coupled run without an initial/restart file (arbitrary initial conditions) and run until you get an initial/restart file. Then write a script that will map the initial conditions from the initial/restart file of your original offline run into the initial/restart file generated by this coupled run. If you do this correctly, then you can use this initial/restart file for the coupled run.

Good luck!

Sam
----------------------------------------------------------------------------------------
 

slevis

Moderator
Staff member
The most straightforward thing to do is look in the /tools/interpinic directory of clm3.5 (available with the clm3.5 release). The interpinic script is supposed to do what you are asking, but I will not be able to help you with it.

Sam
 
Dear Sam,

Thank you for your guidance, the mapping is working. Currently, I am running the new initial land model which I mapped into the fully coupled run. Now, I nervous to see the vegetation results :) .Thank you.

Best regards,
Rima
 
Top