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

Accessing new data file from CAM?

jrvb

Rob von Behren
New Member
Greetings!

I'm using the contrail module in CAM to explore some different contrail forcing scenarios. I would like to augment the simulation runs with a file that contains additional metadata about each (time, lat, lon, lev) atmosphere tuple so I can tweak the behavior of the simulation for particular times and locations. I have a metadata file that uses the same grid as the running simulation (at least the time, lat, lon and lev coords in my input netcdf are identical to the coords in the CESM output). My hope is to simply read these in somewhere and access them from CAM/src/physics/cam/ssatcontrail.F90 so I can select the desired behavior at runtime.

I've looked at the routines the contrail module relies on for reading it's data (in CAM/src/chemistry/utils/aircraft_emit.F90) but these don't seem appropriate since they assume real-valued data and perform interpolation even when the input and runtime grids match. Also, from what I can tell there is no way to use these routines to read multiple data fields from the same file.

I'm not sure where else to look for good examples of reading input files in CESM. Does anyone know of good examples or existing documentation on adding and accessing new types of input files?

Thanks much!

-Rob
 
Top