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

Prescribed CO2 Only in B compset?

Hi,

Is there a way configure the cam namelist such that it will read a file with prescribed annual co2 but maintain the other ghg's invariant at their default values in a B_2000 compset?

If it is possible, what is the required format for the file with co2 values? If you could point me to a relevant sample co2 input dataset available in jaguar, bluefire or svn, I'd appreciate it.

Thanks,
Kendra
 

eaton

CSEG and Liaisons
There is no functionality to read just CO2 from an input dataset while leaving the other GHG values fixed. The easiest way to do this is to create a dataset that contains all the GHGs and to let the non-CO2 GHGs just have the desired constant values while CO2 varies in time. An easy way to create the dataset is to start from the existing dataset for the 20th century runs ($CSMDATA/atm/cam/ggas/ghg_hist_1765-2005_c091218.nc), do an ncdump into a file, edit that file to contain the values you want, then use ncgen to convert it back to binary NetCDF. The CAM namelist will need to contain

scenario_ghg='RAMPED'
bndtvghg='new_ghg_dataset'
 
Thanks! Would I have to edit the calendar dates as well in the ghg dataset? For example, if I'm doing a startup run from year 1 or starting at year 2000 to 2100, would the time and/or calendar date stamps in the file have to match the years of my run or there is a way to align, say, year 1 of the run with the value written in for year 1760, as with the datm model?
 

eaton

CSEG and Liaisons
The code that reads the ghg dataset is not as flexible as the datm code. It assumes that the ghg dataset contains dates that bound the simulation date. Also note that the code in the chem_surfvals module which is responsible for reading the bndtvghg file assumes that there is one value for each year (annual mean) and that the data value is associated with Jan 1 of the year, that is, the month and day part of the "date" variable in the file are ignored and just the year part is used.
 
How sensitive is the code to the format of the year being yyyy (it's not too clear to me from reading the chem_surfvals module)? I am trying to edit the date to start from 01010701 but since it is in integer format, it keeps on dropping the first "0". My spin-up ends at year 100 and I would prefer to have a smooth branch run from there rather than a startup run at 1765 to match the ghg file. Thanks!
 

eaton

CSEG and Liaisons
The date format is encoded as an integer, so as you noticed the leading zero is not significant.
 
Dear Eaton,

I am trying to run a simlation with a ghg dataset with time varying co2 and all the other ghg set to fixed values. I have also included in the namelistscenario_ghg='RAMPED'
bndtvghg='new_ghg_dataset'
However the output values of co2 are not matching with the input values in my file. I think they are interpolated values. Is there a way to avoid this interpolation and make the model take only the values specified in the file.ThanksRohi
 

eaton

CSEG and Liaisons
The module that reads data from the file specified by bndtvghg assumes one data point per year and interpolates in time by assuming that the input data is valid at Jan 01 0Z of the year.  You would need to modify the code in chem_surfvals.F90 to disable the interpolation (just look for the string "time interpolation" in the comments).  This should result in the specified value being held constant for the entire year, and then a step to the value for the next year, and so on for each year. 
 
Dear Eaton, Thank you for your reply. I checked the the code in chem_surfvals.F90 and tried to comment the interpolation part in the ramping section but i get a segmentation fault error. Could please tell me the exact changes to made in the chem_surfvals.F90 code to stop the interpolation of the co2 data.ThanksRohi
 

eaton

CSEG and Liaisons
In chem_surfvals_set_all you could replace the line
Code:
co2vmr = (co2(nyrm)*fact1 + co2(nyrp)*fact2)*1.e-06_r8
by
Code:
co2vmr = co2(nyrm)*1.e-06_r8
 
 
Top