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

Error when initializing CLM5 with specialized surface dataset

michelle_dvorak

Michelle Dvorak
New Member
Hi there,

I am encountering an issue initializing CLM5 in CESM2.1 using the B1850.f09_g17 compset, but which I have modified to model changes in the Antarctic ice sheet. This required a grid change in the ocean model but the land surface dataset is still 192x288; however, the land mask, soil properties and ice sheet extent south of 60°S have been changed.

The model reads in GLACIER_REGION, urban input data and PFT physiological data fine, but throws the following error when reading the surface boundary data:

Screenshot 2025-02-10 at 4.54.19 PM.png

I believe a similar issue was presented here: Customized surfdata does not work , but in my case I am sure that the domain file and the surface dataset match in dimensions. After reading the code in ncdio_pio.F90.in, I am still unsure how vsizes are calculated.

Also, this is a startup run in which CLM5 is initializing from: b.e20.B1850.f09_g17.pi_control.all.299_merge_v3.clm2.r.0134-01-01-00000.nc. I had assumed that the interpolation scheme (INIT_INTERP_METHOD = "use_finidat_areas") would be able to interpolate from this initial dataset to the land surface dataset I've provided, with its customized landmask, but perhaps I need to do this myself and also provide a customized finidat file too?

Thank you for your help.

Michelle
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
I'm not sure what the problem is, there seems to be a problem with the dimensions in the surface dataset. Can you attach an ncdump -h of the file?
For your second question, I think the interpolation scheme should work fine.
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
I see you are running on Derecho. I can take a look at your case when the machines are back up.
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
I think that one problem is that there are a couple of glacier fields whose dimensions are in the wrong order. I see:

double PCT_GLC_MEC(lsmlat, lsmlon, nglcec) ;
PCT_GLC_MEC:_FillValue = NaN ;
double TOPO_GLC_MEC(lsmlat, lsmlon, nglcec) ;
TOPO_GLC_MEC:_FillValue = NaN ;

but I think they should be ordered (nglcec,lsmlat,lsmlon).
There could be other variables out of order, I didn't check everything.
 

michelle_dvorak

Michelle Dvorak
New Member
Hi Keith,

Thank you for your quick response and help with this. Great eye. I found that two other variables also had a similar problem. Flipping them has solved the issue.

The next error I'm seeing is related to the PFTs expected: 17 instead of 78. It seems to be expecting crop PFTs. How do I turn the crop model off? Is this something that needs to be done in the build stage? Irrigation is off in the user_nl_clm.
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Setting use_crop = .false. in user_nl_clm might work. If not, since you are using compset B1850, you might have to turn crops off when you create the case, by using a compset longname that has %BGC instead of %BGC-CROP
 

michelle_dvorak

Michelle Dvorak
New Member
Hi Keith,

I was able to turn the crop model off only by removing the -crop flag in the env_run.xml file such that "CLM_BLDNML_OPTS" = "-bgc bgc" rather than "-bgc bgc -crop". This was so that I did not have to create a new case.

However now with the crop model turned off the land units do not sum to one, so I added : " init_interp_fill_missing_with_natveg = .true. " to user_nl_clm. Now I get the message that I cannot have this True flag and also have "use_finidat_areas" as the interpolation scheme. Is there a solution for this? Do I need to specify a restart file from which I can interpolate values using the "interpinic" method?

Thank you,
Michelle
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Good call on the CLM_BLDNML_OPTS, I had forgotten that.
I don't think the current error is due to the initialization scheme. I think you have several gridcells on the surface dataset where the landunits don't add up to 1 (or 100%). For instance, at i=169, j=6:

(0) PCT_NATVEG: 68
(0) PCT_LAKE: 5.660377358490566
(0) PCT_GLACIER: 32
(0) PCT_WETLAND: 0
(0) PCT_CROP: 0
(0) PCT_URBAN: 0

which is more than 100%
 

michelle_dvorak

Michelle Dvorak
New Member
Thank you very much for finding that error for me! I made the surface dataset by stitching together two different land surface datasets, but you showed me that I must have retained the percent lake fraction from one dataset while replacing the other land types. Replacing the lake fraction along with the others fixed the error and the model is now running. Thanks again!
 
Top