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

How can you read in a completely new variable to CTSM/CLM?

tswater

Tyler Waterman
New Member
What version of the code are you using?
ctsm5.3.021 on Derecho

Describe your problem or question:
I am developing/testing a modification to the surface layer scheme in CLM (the FrictionVelocityMod script) to see how a new theoretical model performs. This parameterization requires time series information of a variable that is not currently defined within CESM that cannot be computed on the fly from existing variables.

So my question is, what is the best way to load a timeseries of a completely new variable (say from a netCDF file) into memory that persists throughout the model run and is accessible by FrictionVelocityMod at each timestep? I could only find information on adding constants or on modifying existing variables. If relevant, I am currently working with only single point runs of CTSM.

Thank you in advance
 

slevis

Moderator
Staff member
The CLM has a "streams" infrastructure for reading things like lightning data for the fire module, nitrogen deposition for the bgc model, and a few other things. You will find reference to such streams in bld/namelist_files/namelist_definition_ctsm.xml
We do not support adding new streams to the model for you, but use the existing infrastructure as a template.

Having said that, for single point simulations you may find it easier to use simple fortran commands to read the timeseries (possibly easiest in text format) directly to the section of code where they are used.
 
Vote Upvote 0 Downvote
Top