NGEET / fates

repository for the Functionally Assembled Terrestrial Ecosystem Simulator (FATES)
Other
105 stars 92 forks source link

FATES inventory pft error #1240

Open sugerWu-2822 opened 3 months ago

sugerWu-2822 commented 3 months ago

Dear all,

I tried using the forest control initialization file to run the FATES model by using the following command.

echo "use_fates_inventory_init = .true.">> user_nl_clm echo "fates_inventory_ctrl_filename = '/global/homes/x/Mydata/single-point/1x1pt-mysite/1x1pt-tmysite_inv_info.txt'" >> user_nl_clm

I got the following ERROR:

inventory pft: 20 An inventory cohort file specified a pft index greater than the maximum specified pfts numpft ENDRUN: ERROR in FatesInventoryInitMod.F90 at line 874

Then I edited the PFT numbers, set all of them to 0 in the .css file. The ERROR changed.

inventory pft: 18 An inventory cohort file specified a pft index greater than the maximum specified pfts numpft ENDRUN: ERROR in FatesInventoryInitMod.F90 at line 874

The code of line 874 in FatesInventoryInitMod.F90 file is attached.

I cannot find the value of c_pft and numpft. Could someone give some suggestions about this kind of question. Many thanks!

Sincerely, Xiuyi 1724269173673

rgknox commented 2 months ago

Hi Xiuyi,

Sorry for the late reply!

"numpft" is determined by the PFTs that you define the fates parameter file, see here: https://github.com/NGEET/fates/blob/sci.1.78.2_api.36.0.0/parameter_files/fates_params_default.cdl#L14

So, each cohort that is defined in that css file needs to be associated with one of the pfts defined in your parameter file. If you are using the default file, like the one I link above, than each cohort needs to be assigned a pft between and including 1 through 12.

Here is some documentation on inventory intialization: https://fates-users-guide.readthedocs.io/en/latest/user/Model-Initialization-Modes.html

I just updated the documentation. Note that previously the documentation did not include the plant height field in the css specification.

If you like, you could show us the inventory files you are using. That would help us trouble shoot this. If they are proprietary, you could also just send us the first half of patch files for instance, or modify some of the values.

suger-WU commented 2 months ago

Hi Ryan,

Thank you for your reply. I uploaded the inventory files (including txt, css and pss files) in the attachment. For the privacy of the data, I made some modifications. Actually this problem has been bothering me for a long time. Hope you could help me some suggetions.

Best, Xiuyi

inventory files.zip

suger-WU commented 2 months ago

Follow up on this. The fates parameter file of my case's default is: fates_params_api.32.0.0_12pft_c231215.nc. It comes from the this link: https://svn-ccsm-inputdata.cgd.ucar.edu/trunk/inputdata/lnd/clm2/paramdata/

When I used the fates_params_default.cdl as my fates_paramfile in namelist. I got the following ERROR: WechatIMG93