GEOS-Chem restart files

From Geos-chem
Revision as of 18:52, 9 April 2021 by Lizzie Lundgren (Talk | contribs) (Overview)

Jump to: navigation, search

Previous | Next | Getting Started with GEOS-Chem

  1. Minimum system requirements
  2. Installing required software
  3. Configuring your computational environment
  4. Downloading source code
  5. Downloading data directories
  6. Creating run directories
  7. Configuring runs
  8. Compiling
  9. Running
  10. Output files
  11. Python tools for use with GEOS-Chem
  12. Coding and debugging
  13. Further reading


Overview

In this section, we provide some basic information about GEOS-Chem Classic restart files and how they are used.

What is a restart file?

GEOS-Chem restart files contain the initial conditions for a GEOS-Chem simulation. There are two restart files for GEOS-Chem:

File(s) Format Description
GEOSChem.Restart.YYYYMMDD_hhmmz.nc4 netCDF The GEOS-Chem restart file. Contains species concentrations that are read in at simulation startup.

GEOS-Chem writes a restart file at the end of each simulation. This allows a long simulation to be split into several individal run stages..

For example, the restart file that was created at 00:00 UTC on August 1, 2016 is named: GEOSChem.Restart.20160801_0000z.nc4. The z indicates "Zulu" or "Z" time, which is another name for UTC.

GEOS-Chem restart files are created in the top-level of your GEOS-Chem run directory (and NOT in the OutputDir/ folder, which is where History diagnostic output files are created).

HEMCO_restart.YYYYMMDDhhmm.nc netCDF The HEMCO restart file. The HEMCO emissions component will save out certain quantities (mostly pertaining to soil NOx and biogenic emissions) in order to facilitate long GEOS-Chem simulations with several run stages.

HEMCO restart files are created in the top-level of your GEOS-Chem run directory (and NOT in the OutputDir/ folder, which is where HEMCO diagnostic putput files are created).

When you run a GEOS-Chem simulation, it will write new GEOS-Chem restart files at the intervals you specify in HISTORY.rc. New HEMCO restart files are written with frequency configured in HEMCO_Config.rc if HEMCO is used in your simulation.

How can I determine the date of a restart file?

To determine the date of a netCDF restart file, you may use ncdump For example:

ncdump -v time -t initial_GEOSChem_rst.4x5_standard.nc

The -t option will return the time value in human-readable date-time strings rather than numerical values in unit such as "hours since 1985-1-1 00:00:0.0." The date of a binary punch restart file can be determined by opening the file in GAMAP.

Where can I get a restart file for my simulation?

GEOS-Chem run directories are configured to use sample GEOS-Chem restart files in netCDF format. These files are available for download at:

http://ftp.as.harvard.edu/gcgrid/data/ExtData/GEOSCHEM_RESTARTS/

When you generate a new GEOS-Chem run directory, a a sample restart file will be copied to your run directory.

Monthly restart files from the GEOS-Chem 13.0.0 10-year full-chemistry benchmark (2010-2019) can be found at:

http://ftp.as.harvard.edu/gcgrid/geos-chem/10yr_benchmarks/13.0.0-rc.0/GCClassic/restarts/

CAVEAT: The sample restart files do not reflect the actual atmospheric state and should only be used to "spin up" the model. In other words, they should be used as initial values in an initialization simulation to generate more accurate initial conditions for your production runs.

For how long should I spin up before starting a production simulation?

Doing a one year spin up is usually sufficient; however, we recommend ten years for ozone, carbon dioxide, and methane simulations, and four years for radon-lead-beryllium simulations. If you are in doubt about how long your spin up should be for your simulation, we recommend contacting the GEOS-Chem Working Group that specializes in your area of research.

You may spin up the model starting at any year for which there is met data, but you should always start your simulations at the month and day corresponding to the restart file to more accurately capture seasonal variation. If you want to start your production run at a specific date, we recommend doing a spin up for the appropriate number of years plus the number of days needed to reach your ultimate start date. For example, if you want to do a production simulation starting on 12/1/13, you could spin up the model for one year using the initial GEOS-FP restart file dated 7/1/13 and then use the new restart file to spin up the model for five additional months, from 7/1/13 to 12/1/13.

Does the date of my restart file matter?

Starting in GEOS-Chem 13.0.1, HEMCO will automatically expect the date in the restart file to match the simulation date. This is done by enforcing the `EFY` time cycle flag in HEMCO_Config.rc:

* SPC_           ./GEOSChem.Restart.$YYYY$MM$DD_$HH$MNz.nc4 SpeciesRst_?ALL?    $YYYY/$MM/$DD/$HH EFY xyz 1 * - 1 1

If HEMCO does not find the restart file for the correct date, it will crash. Users may always change the time cycle flag to use a restart file for a different date. For example, changing from `EFY` to `C` tells HEMCO to use the closest date available.

* SPC_           ./GEOSChem.Restart.$YYYY$MM$DD_$HH$MNz.nc4 SpeciesRst_?ALL?    $YYYY/$MM/$DD/$HH C   xyz 1 * - 1 1

Using `CYS` tells HEMCO to use the closest date available and skip a variable if it is not found. This is especially useful when using a restart file that does not contain all the species in your simulation.

* SPC_           ./GEOSChem.Restart.$YYYY$MM$DD_$HH$MNz.nc4 SpeciesRst_?ALL?    $YYYY/$MM/$DD/$HH CYS xyz 1 * - 1 1

What happens if a species is missing from my restart file?

If a species is not found in the restart file, it will be initialized to the default background concentrations specified by the Background_VV field in the species_database.yml file. If no value is specified for Background_VV then 1e-20 will be used.

How do I check my initial conditions?

To ensure you are using the expected initial conditions for your simulation, please check the GEOS-Chem log file. You should see something like:

HEMCO: Opening ./GEOSChem.Restart.20190701_0000z.nc4
     - Found all CN     met fields for 2011/01/01 00:00
     - Found all A1     met fields for 2019/07/01 00:30
     - Found all A3cld  met fields for 2019/07/01 01:30
     - Found all A3dyn  met fields for 2019/07/01 01:30
     - Found all A3mstC met fields for 2019/07/01 01:30
     - Found all A3mstE met fields for 2019/07/01 01:30
     - Found all I3     met fields for 2019/07/01 00:00
 Initialize TMPU1    from restart file
 Initialize SPHU1    from restart file
 Initialize PS1_WET  from restart file
 Initialize PS1_DRY  from restart file
 Initialize DELP_DRY from restart file
     - Found all I3     met fields for 2019/07/01 03:00
===============================================================================
R E S T A R T   F I L E   I N P U T

Min and Max of each species in restart file [mol/mol]:
Species   1,     ACET: Min = 1.000458833E-22  Max = 6.680149323E-09
Species   2,     ACTA: Min = 6.574137699E-23  Max = 6.108235029E-10
Species   3,     AERI: Min = 4.122849756E-16  Max = 1.213838925E-11
Species   4,     ALD2: Min = 4.186668786E-23  Max = 4.571487633E-09
...

If a species is not found in the restart file, you may see something like:

Species 178,       pFe: Use background = 9.999999683E-21

Do I need a HEMCO restart file for my initial spin-up run?

Using a HEMCO restart file for your initial spin up run is optional. The HEMCO restart file contains fields for initializing variables required for Soil NOx emissions, MEGAN biogenic emissions, and the UCX chemistry mechanism. The HEMCO restart file that comes with a run directory may only be used for the date and time indicated in the filename. HEMCO will automatically recognize when a restart file is not available for the date and time required, and in that case HEMCO will use default values to initialize those fields. You can also force HEMCO to use the default initialization values by setting "HEMCO_RESTART" to false in HEMCO_Config.rc. For more information, see the HEMCO User's Guide.

Restart files in GEOS-Chem 12 and later versions

In GEOS-Chem 12.1.0 (release data 26 Nov 2018), several restart file updates were introduced. These include:

Restart collection in HISTORY.rc

GEOS-Chem restart files are now saved out via the History component. A new Restart collection has been defined in HISTORY.rc and fields saved out to the restart file can be modified in that file.

New restart file names

Because we are now using the History component to archive restart files in GEOS-Chem 12.1.0 and later versions, GEOS-Chem restart file names now use this nomenclature: GEOSChem.Restart.YYYYMMDD_hhmmz.nc4.

For example, the restart file that was created at 00:00 UTC on August 1, 2016 is named: GEOSChem.Restart.20160801_0000z.nc4. The z indicates "Zulu" or "Z" time, which is another name for UTC.

New variable names

Prior to GEOS-Chem 12.1.0, species names in restart files began with the SPC_ prefix:

 SPC_NO           # Initial concentration of NO
 SPC_O3           # Initial concentration of O3
 SPC_CO           # Initial concentration of CO
 SPC_CH4          # Initial concentration of CH4
 ...etc...

In GEOS-Chem 12.1.0 and later versions, the species names now begin with the prefix SpeciesRst_ prefix:

 SpeciesRst_NO    # Initial concentration of NO
 SpeciesRst_O3    # Initial concentration of O3
 SpeciesRst_CO    # Initial concentration of CO
 SpeciesRst_CH4   # Initial concentration of CH4
 ...etc...

--Bob Yantosca (talk) 15:16, 30 November 2018 (UTC)

New fields added to the GEOS-Chem restart file

Several new fields have been added to the GEOS-Chem output restart file in an attempt to remove differences between single and multi-segmented GEOS-Chem simulations.

Item Description
1 Module-level variables H2O2s and SO2s from wetscav_mod.F have been added to State_Chm (as State_Chm%H2O2AfterChem, StateChm%SO2AfterChem). These fields will be output to the GEOS-Chem restart file and then initialized to the values saved in the restart file at the start of the next simulation. Prior to this update, both H2O2s and SO2s were initialized to the H2O2 and SO2 tracer concentrations at the start of every simulation. This change will impact multi-segmented runs only.
2 Module-level variables DRY_TOTN and WET_TOTN from get_ndep_mod.F have been added to State_Chm (as State_Chm%DryDepNitrogen, StateChm%WetDepNitrogen). These fields will be output to the GEOS-Chem restart file and then initialized to the values saved in the restart file at the start of the next simulation. Prior to this update, both variables were initialized to zero at the start of every simulation. Storing them in the restart file may improve accuracy of soil NOx emissions over multi-segmented runs. This change will impact multi-segmented runs only.
3 Move State_PSC from the HEMCO restart file to the GEOS-Chem restart file.
4 Save out instantaneous met fields TMPU1, SPHU1, PS1DRY, PS1WET, DELPDRY to the GEOS-Chem restart file. These will be used to initialize the met fields at the start of the timestep, otherwise they will be set to the values of those fields at the end of the timestep.

While this update was added to GEOS-Chem Classic in 12.1.0, it will be added to GCHP in 12.2.0.

Read restart file via HEMCO

GEOS-Chem restart files are now read in via HEMCO. The entries listed below have been added to HEMCO_Config.rc (and may vary slightly for different simulation types). These fields are obtained from HEMCO and copied to the appropriate State_Chm and State_Met fields in the new routine Get_GC_Restart (found in GeosCore/hcoi_gc_main_mod.F90).

  #==============================================================================
  # --- GEOS-Chem restart file ---
  #
  # PSC state only needed for UCX
  #==============================================================================
  (((GC_RESTART
  * SPC_           ./GEOSChem.Restart.$YYYY$MM$DD_$HH$MNz.nc4 SpeciesRst_?ALL?    $YYYY/$MM/$DD/$HH CS xyz 1 * - 1 1
  * TMPU1          ./GEOSChem.Restart.$YYYY$MM$DD_$HH$MNz.nc4 Met_TMPU1           $YYYY/$MM/$DD/$HH E  xyz 1 * - 1 1
  * SPHU1          ./GEOSChem.Restart.$YYYY$MM$DD_$HH$MNz.nc4 Met_SPHU1           $YYYY/$MM/$DD/$HH E  xyz 1 * - 1 1
  * PS1DRY         ./GEOSChem.Restart.$YYYY$MM$DD_$HH$MNz.nc4 Met_PS1DRY          $YYYY/$MM/$DD/$HH E  xy  1 * - 1 1
  * PS1WET         ./GEOSChem.Restart.$YYYY$MM$DD_$HH$MNz.nc4 Met_PS1WET          $YYYY/$MM/$DD/$HH E  xy  1 * - 1 1
  * DELPDRY        ./GEOSChem.Restart.$YYYY$MM$DD_$HH$MNz.nc4 Met_DELPDRY         $YYYY/$MM/$DD/$HH E  xyz 1 * - 1 1
  * KPP_HVALUE     ./GEOSChem.Restart.$YYYY$MM$DD_$HH$MNz.nc4 Chem_KPPHvalue      $YYYY/$MM/$DD/$HH E  xyz 1 * - 1 1
  * WETDEP_N       ./GEOSChem.Restart.$YYYY$MM$DD_$HH$MNz.nc4 Chem_WetDepNitrogen $YYYY/$MM/$DD/$HH E  xy  1 * - 1 1
  * DRYDEP_N       ./GEOSChem.Restart.$YYYY$MM$DD_$HH$MNz.nc4 Chem_DryDepNitrogen $YYYY/$MM/$DD/$HH E  xy  1 * - 1 1
  * SO2_AFTERCHEM  ./GEOSChem.Restart.$YYYY$MM$DD_$HH$MNz.nc4 Chem_SO2AfterChem   $YYYY/$MM/$DD/$HH E  xyz 1 * - 1 1
  * H2O2_AFTERCHEM ./GEOSChem.Restart.$YYYY$MM$DD_$HH$MNz.nc4 Chem_H2O2AfterChem  $YYYY/$MM/$DD/$HH E  xyz 1 * - 1 1
  (((+STATE_PSC+
  * STATE_PSC      ./GEOSChem.Restart.$YYYY$MM$DD_$HH$MNz.nc4 Chem_StatePSC       $YYYY/$MM/$DD/$HH E  xyz count       * - 1 1
  )))+STATE_PSC+
  )))GC_RESTART

The CS cycle flag was added as an option to HEMCO in GEOS-Chem 12.1.0 to tell HEMCO to skip fields that aren't found in the provided file. This is useful when certain species aren't found in the restart file and, in that case, GEOS-Chem will initialize that species to the background concentrations specified in the species database.

--Melissa Sulprizio (talk) 16:30, 7 November 2018 (UTC)
--Bob Yantosca (talk) 22:12, 12 December 2019 (UTC)

HEMCO restart files

Please see the Restart variables section of The HEMCO User's Guide for more information.

--Bob Yantosca (talk) 17:08, 30 November 2018 (UTC)

Viewing and manipulating restart files

For information on viewing and manipulating GEOS-Chem restart files in netCDF format, please see the following sections of our Working with netCDF data files wiki page:

  1. Resources for viewing and manipulating netCDF files
  2. Regridding netCDF files
  3. Adding a new species to a restart file
  4. Cropping restart files to a subset of the globe
  5. Chunking and deflating restart files

--Bob Yantosca (talk) 15:19, 30 November 2018 (UTC)



Previous | Next | Getting Started with GEOS-Chem