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
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