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

Running simulations for 2020 to 2030

mmills

CSEG and Liaisons
Staff member
You should do your own control runs. You may end up making some significant changes to the code when you add BC emissions, however, so you might want to just do a year or so of control run now as a test. That way, if you decide you want to make sure you are using the same code for both runs, you won't have to do the entire control run twice.
 
Hi Mike,I've another question regarding adding emissions. I want to add emission for a gaeous species (e.g. CO) in the stratosphere, from my understanding, what I should do is: 1) create the nc data files for the emission 2) change the namelist ext_frc_specifier to the directory of my new data 3) compile and run. Am I right?  For the step of creating nc data, horizontal resolutions will follow the model resolution I've picked, but how about the altitude? I want to add emission from 20km to 40km, how should I set the vertical coordinate? and how about timestep then?
Thank youRegardsTianyang
 

mmills

CSEG and Liaisons
Staff member
You are correct about steps 1 and 2. In step 3, you do not need to recompile if you are only changing the namelist.
  • In CESM1.2, you can just run the preview_namelists script to see the changes in your user_nl_cam propagate to your atm_in. This will happen at run time even if you don't preview namlelists. 
  • For earlier releases, you would do “configure -cleannamelist” followed by “configure -case”. If you want to preview the changes, you do have to rebuild, but the changes should happen at run time if you do not. 
The altitudes and dates for your emissions are arbitrary. The model will interpolate at times between those given, and from the altitudes given to the model's vertical levels. So pick whatever works best for you. 
 
Hi Mike, Does that mean that, if I have the same emission profile everyday for 10 years, I can simply create the data for the first day (e.g. Jan 1 2021) and the last day (Dec 31 2030). The model will interpolate between these days and give the same profile everyday for these ten years?RegardsTianyang
 
And, what is the difference between namelists aircraft_specifier, airpl_emis_file, ipcc_aircraft_emis, and ext_frc_specifier? I want to add emission profiles for CH4, CO2, CO, H, H2, H2O, OH, and I added them to ext_frc_specifier, but got errors like : (shr_sys_abort) ERROR: extfrc_inti: CH4 does not have an external source(shr_sys_abort) WARNING: calling shr_mpi_abort() and stoppingI guess this means by default external forcing here doesn't include/recognize CH4. So in this case, which namelist shall I add the abovementioned species to? RegardsTianyang
 

mmills

CSEG and Liaisons
Staff member
Yes, if you want constant emissions over a time period, you just use the same emissions profiles for a days marking the beginning and the end of that period. If you want the emissions constant over your whole run, you can set the first day to a year long before the start of your run (i.e. 00010101), and the last day to a year long after the end of your run (i.e. 22000101).I am not familiar with the aircraft_specifier, airpl_emis_file, and ipcc_aircraft_emis. Species that have external forcing specified in ext_frc_specifier must be further specified in the chemistry preprocessor input file used to create the chemistry subroutines. If you want to add additional species, you will have to create a custome chemistry preprocessor input file based on the one you are using, following these steps:
  1. Determine which chemistry you are using. Look in your case directory at the file "env_build.xml" (CESM1.1 or 1.2) or "env_conf.xml" (CESM1.0). Search for "CAM_CONFIG_OPTS". On that line, you will see the chemistry package specified, i.e. "-chem waccm_mozart"
  2. Find and copy the appropriate chemistry preprocessor input file. The preprocessor input file for your chemistry package is located in the source code, in subdirectories of $srcdir/models/atm/cam/src/chemistry/. For example, the waccm_mozart chemistry input file is there under pp_waccm_mozart/chem_mech.in. Copy this file to a directory outside the source directory where you can modify it.
  3. Add external forcing for your species. Near the end of the input file, you will see a section for "Ext Forcing" with a list of species, i.e. "NO
 
I've made the necessary modifications and run the model. but I got the following error in the cesm.log file: Opened existing file  /home/students/atmod/cesm_inputdata/new_emissions/spaceplane_emission_CH4_2021- 2030.nc      655360 pio_support::pio_die:: myrank=          -1 : ERROR: nf_mod.F90:        1046 :  NetCDF: Invalid argumentapplication called MPI_Abort(MPI_COMM_WORLD, 1) - process 1 ====================================================================================   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES=   EXIT CODE: 1=   CLEANING UP REMAINING PROCESSES=   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES Does this have something to do with the emission file I've created?I was wondering, if this is because external forcing can only be two-dimensional here, but my emission profile is 3D. I've attached my emission data here for your reference.  Thank you.
RegardsTianyang 
 

mmills

CSEG and Liaisons
Staff member
External forcing files are generally 3D spatially (4D counting time), so that is not the issue. 
 

mmills

CSEG and Liaisons
Staff member
Your file does not follow the structure of other external forcing files. Your vertical coordinate is called "vert", instead of "altitude", and you are lacking the interfaces of the vertical levels, which should be in a variable called "altitude_int". "altitude_int" should have one level more than "altitude", as it defines the interfaces and "altitude" defines the midpoints. Also, the order of the dimensions of the emissions variables in other files is (time, altitude, lat, lon), wheras you have (vert, time, lat, lon). Take a closer look at other external forcing files and try following the same structure.
 
Dear Mike, Yes, proper structure of the files did solve the problem.But there seems to be other problems which again result in termination of the run. (shr_sys_abort) WARNING: calling shr_mpi_abort() and stoppingapplication called MPI_Abort(MPI_COMM_WORLD, 1001) - process 14 FIND_TIMES: ALL data times are after    5845.02083333333      FIND_TIMES: data times:    5854.00000000000        9473.00000000000      FIND_TIMES: time:    5845.02083333333     (shr_sys_abort) ERROR: find_times: all(all_data_times(:) > time) /home/students/atmod/cesm_inputdata/new_emissions/spaceplane_emission_CH4_2021-2030.nc(shr_sys_abort) WARNING: calling shr_mpi_abort() and stoppingapplication called MPI_Abort(MPI_COMM_WORLD, 1001) - process 15application called MPI_Abort(MPI_COMM_WORLD, 1001) - process 54 This is actually a restart run from previous run.  The restart date is 20210106 and running for 10 years (i.e. till 20310105). Previous run did not have added emissions. For the restart run, I want to add constant emissions throughout the run (i.e. from 2021 to 2030). I added data for 20210101 and 20310101, supposing the model will interpolate dates inbetween.where do you suggest I should check on the cause of the error? Are the dates/time I'm setting in the emission file having some problem?I've attached my env_run file, log file and edited CH4 emission file. RegardsTianyang
 

santos

Member
Did you set the date on the file by hand? The run starts at day 5845, but the data on the file starts at 5854, so it looks like there's just a typo here.
 

mmills

CSEG and Liaisons
Staff member
The model will crash if you attempt to run on any date that is not between the first and last date in your emission file. The first date in your emission file is January 15, 2021. The RUN_STARTDATE in your env_run.xml is January 1, 2005. It seems that you want to change your RUN_STARTDATE to 20210101, and change the first date in your emissions file so that it is before that date. If you want to run past December 15, 2030, you will need to change the last date in your emissions file as well.
 
Now I'm quite confused about the date settings.  How do RUN_STARTDATE, RUN_REFDATE and CONTINUE_RUN work?If RUN_STARTDATE=2005-01-01, RUN_REFDATE=2005-01-01, CONTINUE_RUN= TRUE, prestaged restart files are for 2021-01-01, on which day the run will start? (ignoring the added emissions)And how about RUN_STARTDATE=2021-01-01, RUN_REFDATE=2005-01-01, CONTINUE_RUN= TRUE, prestaged restart files are for 2021-01-01?Will the date settings take effect differently for initialization run and restart run?RegardsTianyang  
 

mmills

CSEG and Liaisons
Staff member
The RUN_REFDATE should be the same as the date in the prestaged restart files. The RUN_STARTDATE is the date used at the start of your new model run, which can be different from the date of the reference run you are branching from. CONTINUE_RUN should be FALSE if you are starting a new case using restarts from another case. It should only be set to TRUE after your first run of a case is finished, and you want to continue running from where the previous run from the same case ended.
 
What will happen if  RUN_REFDATE is not the same as the date in the prestaged restart files?  I guess it could still run, but maybe not giving the correct results? cos I did that for my control run and the model ran without generating any error. what i did for my simulation was:stage 1: (initialization run, from 2005 to 2020)  RUN_TYPE= Hybrid, RUN_STARTDATE=2005-01-01, RUN_REFDATE=2005-01-01, CONTINUE_RUN= FALSE (I obtained restart files for 20210101 after the run)stage 2: (restart run, control run, from 2021 to 2030, prestaged the restart files in run_dir) RUN_TYPE= Hybrid, RUN_STARTDATE=2005-01-01, RUN_REFDATE=2005-01-01, CONTINUE_RUN= TRUEstage 3: (restart run, experimental run, from 2021 to 2030, with added emissions, prestaged the restart files in run_dir) RUN_TYPE= Hybrid, RUN_STARTDATE=2021-01-01, RUN_REFDATE=2005-01-01, CONTINUE_RUN= TRUE,I guess some parts are wrong. Could you please correct me? Thank you. And in external forcing files, the units are set as 'mol/cm2/s'. Does 'mol' here mean 'mole' or 'molecule'? RegardsTianyang
 

mmills

CSEG and Liaisons
Staff member
Apparently the RUN_REFDATE is only used by the build script to prestage the restart files (when GET_REFCASE is TRUE), and to set the atmosphere IC file, ncdata, in your namelist, atm_in. If you are prestaging the restart files and setting ncdata manually, it should not matter what you set RUN_REFDATE to."mol/cm2/s" means "molecules/cm2/s".
 
Top