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

Best practice for adding new variables to netcdf input file

domwoolf

Dominic Woolf
New Member
I'm writing a new soil biogeochemistry module and it requires some different input variables than the standard modules.

E.g. the `ReadParams` function in the existing modules reads a bunch of constants such as, say, `bgc_cn_s1`. I would like some different constants such as e.g. `somic_cue_0`.

I'm wondering if there is a best or "recommended" way to read the new variables in during development? There are a few options I can think of, such as 1) editing the netcdf input file after building a new case, 2) reading my new variables from a different file entirely, 3) hard coding the constants into the module. But ideally I would like the input files to already come with the correct variables in. Is there an xml file or similar anywhere that contains the values of constants in the netcdf files, so that they can be generated automatically by the existing build tools?
 

domwoolf

Dominic Woolf
New Member
To add context - I am running the model on cheyenne, so I am not sure if I have permissions or it would be appropriate to edit the input parameter files in the /glade/p/cesmdata/cseg/inputdata/lnd/clm2/paramdata folder. Perhaps I need to make a local copy of the params file and edit that?
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
This link may be helpful here:


You would want to make a local copy of the params file and edit it and then point to the new file using your user_nl_clm in your case directory.
 
Top