EAMxx EAMxx is almost completely different in all ways from the atmosphere model used for E3SM versions 1-3.
EAMxx was built from the ground up using C++ in order to embrace modern software practices and to allow \"performance portability\" across various supercomputers. The latter goal is achieved by using the Kokkos library. EAMxx is a \"clean-start\" model with almost no similarity to the E3SM atmosphere model used in versions 1-3. Currently only the km-scale explicit-convection version called SCREAM (the Simple Cloud-Resolving E3SM Atmosphere Model) is available, but a low-resolution version is in the works.
Like the documentation for other component models, EAMxx documentation is divided into:
The User Guide - info about running EAMxx and all options for modifying a simulation
The Developer Guide - information needed to contribute to EAMxx development
The Technical Guide - equations and numerical methods used in EAMxx
Put another way, all information about how to customize runs without changing code is included in the User Guide, general information about software design which is needed for intelligently modifying code goes in the Developer Guide, and details about the specific process implementations in the current model version are included in the Technical Guide.
description: List of fields to be nudged. Note, syntax of 'A:B' represents nudging field A with data from field B in files, syntax of 'A' assumes that nudging file has the same variables name as EAMxx
type: array(string)
nudging::nudging_timescale:
description: Timescale to apply nudging tendencies, 0: full replacement, >0: actual timescale
type: integer
nudging::use_nudging_weights:
description: Flag for nudging weights option
type: logical
nudging::nudging_weights_file:
description: weights that relax the nudging fields update
type: string
nudging::skip_vert_interpolation:
description: Flag for skipping vertical interpolation
type: logical
nudging::source_pressure_type:
description: Flag for how source pressure levels are handled in the nudging dataset. TIME_DEPENDENT_3D_PROFILE: The dataset contains a time-varying pressure profile, variable name 'p_mid' with dimensions (time,ncol,nlev). STATIC_1D_VERTICAL_PROFILE: The dataset uses a fixed in time single pressure profile, variable name 'p_lev' with dimension (nlev).
description: If STATIC_1D_VERTICAL_PROFILE, this is an optional arg to point to a file with the source pressure levels defined. Default is to look for p_levs in the first nudging_filenames_patterns file
type: string
nudging::nudging_refine_remap_mapfile:
description: Refine-remapping mapfile from the source nudging dataset to the physics grid
type: string
nudging::nudging_refine_remap_vert_cutoff:
description: A vertical cutoff to go with refine-remap logic (in units of p_mid) where the nudging is turned off above it (closer to the surface)
type: real
nudging::number_of_subcycles:
description: how many times to subcycle this atm process
type: MISSING
constraints: gt 0
nudging::enable_precondition_checks:
description: MISSING
type: logical
nudging::enable_postcondition_checks:
description: MISSING
type: logical
nudging::repair_log_level:
description: MISSING
type: string
valid values: trace,debug,info,warn
nudging::internal_diagnostics_level:
description: MISSING
type: integer
nudging::compute_tendencies:
description: list of computed fields for which this process will back out tendencies
Follow these simple instructions to build and test EAMxx's standalone configuration for yourself. This document makes use of the following paths:
${RUN_ROOT_DIR}: the root directory where EAMxx is built and run
${EAMXX_SRC_DIR}: the directory into which you've cloned the scream repo
EAMxx's configuration and build system is based on CMake. CMake has been around a while and has gained a lot of traction in recent years, especially in the HPC community. It has good reference documentation, but it can be tricky to use if you've never encountered it. Ask a EAMxx team member for help if you're stuck on something CMake-related.
If you see a CMakeLists.txt files or a file with a .cmake suffix, that's just part of the build system. You might also see files with CTest as part of their name. These files are related to CTest, CMake's testing tool.
First, make sure you're on one of the machines supported by EAMxx, or that you have the following software installed:
A working MPI installation (typically MPICH or Open-MPI)
CMake and GNU Make
A working set of C, C++, and Fortran compilers
A recent version of Git
A working installation of NetCDF, including both C and Fortran libraries.
"},{"location":"common/installation/#setting-up-your-environment","title":"Setting Up Your Environment","text":""},{"location":"common/installation/#configuring-and-building-scream","title":"Configuring and Building Scream","text":""},{"location":"common/installation/#1-start-from-a-trustworthy-commit","title":"1. Start From a Trustworthy Commit","text":"
First, make sure you've cloned the EAMxx repo (including all submodules) to EAMXX_SRC_DIR using the following command:
If you have already cloned the project and forgot to type --recurse-submodules, you can change to $EAMXX_SRC_DIR and using the following command to initialize, fetch and checkout all submodules:
git submodule update --init --recursive\n
If you're running a branch that's not master, check out this branch with
git checkout <branch>\n
"},{"location":"common/installation/#2-configure-your-eamxx-build","title":"2. Configure Your EAMxx Build","text":"
Change to your $RUN_ROOT_DIR directory and use CMake to configure your build.
If you're building SCREAM on one of our supported platforms, you can tell CMake to use the appropriate machine file using the -C flag. Machine files are located in $EAMXX_SRC_DIR/components/eamxx/cmake/machine-files. Take a look and see whether your favorite machine has one.
For example, to configure SCREAM on the Quartz machine at LLNL:
If you're building on a machine that doesn't have a ready-made machine file, you can try configuring your build by manually passing options to CMake. This usually looks something like the following, which configures EAMxx to compile CPU code using Kokkos's OpenMP backend:
In either case, EAMxx requires MPI-aware compilers. Let's examine these options (only some of which are required on any given machine) to make sure we know what they do:
CMAKE_BUILD_TYPE: specifies whether you are building EAMxx in a developer-friendly configuration (Debug), for a production run (Release) or for performance profiling or some other specialized purpose. Typically, you'll set this option to Debug or Release.
CMAKE_{C,CXX,Fortran}_COMPILER: the name of the command used to invoke an MPI-enabled C, C++, or Fortran compiler to build EAMxx
MPIEXEC_EXECUTABLE: the name of the command used to run EAMxx using MPI, typically mpiexec or mpirun, but possibly different depending on your desired machine
EKAT_MPI_NP_FLAG: the flag passed to MPIEXEC_EXECUTABLE that you use to specify the number of desired MPI processes. This is typically -n for mpiexec and -np for mpirun.
SCREAM_DYNAMICS_DYCORE: specifies the dycore used for configuring EAMxx, which is NONE if you are not configuring EAMxx to run its dycore-related tests, or HOMME if you want to use HOMMExx
SCREAM_DOUBLE_PRECISION: indicates whether EAMxx's Real type is a double-precision (ON) or single-precision (OFF) floating point type
SCREAM_INPUT_ROOT: specifies the location of the top-level folder that stores input data files for EAMxx. This folder is populated with input files which are downloaded automatically during EAMxx's build process.
The Kokkos-related build options (most of which begin with Kokkos_) are described in the Kokkos Wiki
NetCDF_C_PATHS: specifies one or more folders in which the NetCDF C library and headers are installed. In the simplest configuration, the headers should be located in ${NetCDF_C_PATHS}/include and the library should live in ${NetCDF_C_PATHS}/lib.
NetCDF_Fortran_PATHS: specifies one or more folders in which the NetCDF Fortran library and modules are installed. Analogous to ${NetCDF_C_PATHS}, .mod files should be in ${NetCDF_Fortran_PATHS}/include, and the library should be installed in ${NetCDF_Fortran_PATHS}/lib.
PnetCDF_C_PATHS: specifies one or more folders in which the pNetCDF C library and headers are installed, analogous to NetCDF_C_PATHS.
PnetCDF_Fortran_PATHS: specifies one or more folders in which the pNetCDF Fortran library and modules are installed, analogous to NetCDF_Fortran_PATHS.
Above, we've configured Debug builds to make it easier to find and fix errors. For performance testing, you should configure a Release build and make use of other options, depending on your architecture.
Now you can build SCREAM from that same directory:
make -j\n
The -j flag tells Make to use threads to compile in parallel. If you like, you can set the number of threads by passing it as an argument to -j (e.g. make -j8).
In EAMxx, a Field is a data structure holding two things: pointers to the data and pointers to metadata. Both the data and metadata are stored in std::shared_ptr instances, to ensure consistency across all copies of the field. This allows for fast shallow copy semantic for this class.
The data is stored on both CPU and device memory (these may be the same, depending on the Kokkos backend). In EAMxx, we always assume and guarantee that the device data is up to date. That implies that the data be explicitly synced to host before using it on host, and explicitly synced to device after host manipulation, in order to ensure correctness. In order to access the data, users must use the get_view method, which takes two template arguments: the data type, and an enum specifying whether CPU or device data is needed. The data type is used to reinterpret the generic pointer stored inside to a view of the correct scalar type and layout. It is a possibly const-qualified type, and if the field was marked as \"read-only\", the method ensures that the provided data type is const. A read-only field can be created via the getConst method, which returns an identical copy of the field, but marked as read-only. The enum specifying host or device data is optional, with device being the default.
The metadata is a collection of information on the field, such as name, layout, units, allocation size, and more. Part of the metadata is immutable after creation (e.g., name, units, or layout), while some metadata can be partially or completely modified. The metadata is contained in the FieldHeader data structure, which contains four parts:
FieldIdentifier: stores the field's name, layout, units, data type, and name of the grid where it's defined. These information are condensed in a single string, that can be used to uniquely identify a field, allowing to distinguish between different version of the same field. The layout is stored in the FieldLayout data structure, which includes:
the field tags: stored as a std::vector<FieldTag>, they give context to the field's extents.
the field dims: stored both as a std::vector<int>, as well as a 1d Kokkos::View.
FieldTracking: stores information on the usage of the field, as well as its possible connections to other fields. In particular, the tracked items are:
the field time stamp: the time stamp when the field was last updated.
the field accumulation start time: used for fields that are accumulated over several time steps (or time step subcycles). For instance, it allows to reconstruct fluxes from raw accumulations.
the providers/customers: lists of atmosphere processes (see below) that respectively require/compute the field in their calculations.
the field groups: a list of field groups that this field belongs too. Field groups are used to access a group of fields without explicit prior knowledge about the number and/or names of the fields.
FieldAllocProp: stores information about the allocation. While the field is not yet allocated, users can request special allocations for the field, for instance to accommodate packing (for SIMD), which may require padding. Upon allocation, this information is then used by the Field structure to extract the actual data, wrapped in a properly shaped Kokkos::View. The alloc props are also responsible of tracking additional information in case the field is a \"slice\" of a higher-dimensional one, a fact that can affect how the data is accessed.
Extra data: stored as a std::map<std::string,ekat::any>, allows to catch any metadata that does not fit in the above structures. This is a last resort structure, intended to accommodate the most peculiar corner cases, and should be used sparingly.
"},{"location":"developer/grid/","title":"Grids and Remappers","text":""},{"location":"developer/grid/#grids-and-remappers","title":"Grids and Remappers","text":"
In EAMxx, the AbstractGrid is an interface used to access information regarding the horizontal and vertical discretization. The most important information that the grid stores is:
the number of local/global DOFs: these are the degrees of freedom of the horizontal grid only. Here, local/global refers to the MPI partitioning.
the DOFs global IDs (GIDs): a list of GIDs of the DOFs on the current MPI rank, stored as a Field
the local IDs (LIDs) to index list: this list maps the LID of a DOF (that is, the position of the DOF in the GID list) to a \"native\" indexing system for that DOF. For instance, a PointGrid (a class derived from AbstractGrid) is a simple collection of points, so the \"native\" indexing system coincides with the LIDs. However, for a SEGrid (a derived class, for spectral element grids), the \"native\" indexing is a triplet (ielem,igp,jgp), specifying the element index, and the two indices of the Gauss point within the element.
geometry data: stored as a std::map<std::string,Field>, this represent any data that is intrinsically linked to the grid (either along the horizontal or vertical direction), such as lat/lon coordinates, vertical coordinates, area associated with the DOF.
Grids can also be used to retrieve the layout of a 2d/3d scalar/vector field, which allows certain downstream classes to perform certain operations without assuming anything on the horizontal grid.
In general, grid objects are passed around the different parts of EAMxx as const objects (read-only). The internal data can only be modified during construction, which usually is handled by a GridsManager object.
In EAMxx, I/O is handled through the SCORPIO library, currently a submodule of E3SM. The scream_io library within eamxx allows to interface the EAMxx infrastructure classes with the SCORPIO library.
Here we can discuss EKAT, Kokkos, and all of the highly-technical non-scientific stuff that makes our heads hurt.
"},{"location":"developer/kokkos_ekat/#kokkos-views","title":"Kokkos Views","text":""},{"location":"developer/kokkos_ekat/#vectorization-packs","title":"Vectorization: Packs","text":""},{"location":"developer/kokkos_ekat/#fields-and-the-field-manager","title":"Fields and the Field Manager","text":""},{"location":"developer/kokkos_ekat/#preconditions-postconditions-and-invariants","title":"Preconditions, Postconditions, and Invariants","text":""},{"location":"developer/managers/","title":"Managers","text":""},{"location":"developer/managers/#fieldmanager-and-gridsmanager","title":"FieldManager and GridsManager","text":""},{"location":"developer/processes/","title":"Atmospheric Processes","text":"
In EAMxx, the AtmosphereProcess (AP) is a class representing a portion of the atmosphere timestep algorithm. In simple terms, an AP is an object that given certain input fields performs some calculations to compute some output fields.
TODO: describe init sequcene (e.g., the process of requesting fields), base class main interfaces/capabilities (e.g., subcycling), class expectations (e.g., must update fields on physics grid)
Here is a list of currently implemented atmosphere processes. TODO: add links to papers/github-repos, and a SMALL description * p3: Microphysics, blah blah * SHOC: Macrophysics/Turbulence, blah * rrtmgp: Radiation, blah * spa: prescribed aerosols, blah blah * surface coupling: blah * mam: prognostic aerosols, blah blah * nudging: This process is responsible for nudging the model simulation given a set of files with a target nudged state.
Herein l\u0456es the source code for EAMxx. Broadly, here's where things are:
control: Contains the atmosphere driver and basic tests for it.
dynamics: Here's where HOMME lives within EAMxx, along with code for interfacing with it using EAMxx's data structures.
mct_coupling: Glue code for embedding EAMxx within E3SM as an atmosphere component using the MCT coupler.
physics: Source code for physics-related atmospheric processes, including
p3: The C++/Kokkos implementation of P3 microphysics within EAMxx.
shoc: The C++/Kokkos implementation of SHOC macrophysics within EAMxx.
rrtmgp: A stub for the radiation processes as represented in EAMxx.
share: Utilities and data structures common to these processes.
share: Utilities used by various components within EAMxx. Of note:
io: EAMxx's interface to the SCORPIO library.
diagnostics: A collection of simple classes used to compute diagnostic quantities.
Each of these directories contains a CMakeLists.txt file for defining how things are build, and a tests/ subdirectory that houses relevant unit and verification tests.
You'll also see some other files in the src/ directory itself, such as
scream_config.h.in: A template for generating a C++ header file with EAMxx configuration information.
In this section we describe our testing methodology for standalone EAMxx configurations. We use several types of tests
Unit tests are individual test programs that demonstrate that a small set of code performs a single function or a set of related functions. We use a C++ unit testing framework called Catch2 to implement unit tests.
Property (verification) tests are test programs that configure code that demonstrates that a part of EAMxx (for example, an atmospheric physics parameterization or the dynamical core) is able to produce an answer that satisfies some physical constraint or matches a known solution under specific circumstances.
Fortran-C++ \"bit-for-bit\" (BFB) tests are test programs, often implemented as unit tests, that demonstrate that a set of C++ code ported from Fortran produces bit-for-bit identical results to its Fortran counterpart, provided certain compiler options are enabled (such as \"strict\" floating-point arithmetic).
Test Suites are named collections of tests that can be run on demand using the ctest command.
We also support a test-all-scream configuration that runs all of the standalone tests for an EAMxx configuration.
"},{"location":"developer/standalone_testing/#running-eamxxs-tests-with-ctest","title":"Running EAMxx's Tests with CTest","text":"
Before running the tests, generate a baseline file:
cd $RUN_ROOT_DIR\nmake baseline\n
The tests will run, automatically using the baseline file, which is located in the CMake-configurable path ${SCREAM_BASELINES_DIR}. By default, this path is set to an invalid string. If baselines tests are enabled, we check that a valid path has been provided.
To run all of SCREAM's tests, make sure you're in $RUN_ROOT_DIR and type
ctest -VV\n
This runs everything and reports results in an extra-verbose (-VV) manner.
You can also run subsets of the SCREAM tests. For example, to run only the P3 regression tests (again, from the $RUN_ROOT_DIR directory), use
ctest -R p3_regression\n
"},{"location":"developer/standalone_testing/#grouping-tests-with-labels","title":"Grouping Tests with Labels","text":"
We can create groupings of tests by using labels. For example, we have a driver label that runs tests for SCREAM's standalone driver. You can see a list of available labels by typing
ctest --print-labels\n
To see which tests are associated with a given label (e.g. driver), use
ctest -L driver -N\n
"},{"location":"developer/standalone_testing/#eamxx-test-suites","title":"EAMxx Test Suites","text":""},{"location":"developer/standalone_testing/#the-p3_regression-suite","title":"The p3_regression Suite","text":"
p3_regression uses a baseline file to compare any new or altered implementations with our P3 Fortran reference implementation. If you're working on the C++/Kokkos implementation, you can invoke any new tests to the function Baseline::run_and_cmp in ${SCREAM_SRC_DIR}/components/eamxx/p3/tests/p3_run_and_cmp.cpp.
If the reference Fortran implementation changes enough that a new baseline file is required, make sure to let other SCREAM team members know, in order to minimize disruptions.
"},{"location":"developer/style_guide/","title":"SCREAM C++ Style Guide","text":"
Here's our style guide. Let the holy wars begin!
"},{"location":"developer/style_guide/#types","title":"Types","text":""},{"location":"developer/style_guide/#functions-and-methods","title":"Functions and Methods","text":""},{"location":"developer/style_guide/#variables","title":"Variables","text":""},{"location":"technical/","title":"EAMxx Technical Guide","text":"
The goal of this document is to describe the specific equations, parameterizations, and numerical methods used in the current version of EAMxx. Because our master-branch implementation changes every time we make a new commit, this documentation will also evolve continuously. As such, documentation for master should always be considered to be preliminary and under construction. If you want trustworthy documentation, pull it from an official model release.
Currently, EAMxx is only configured for km-scale convection-permitting runs. In order to provide scientifically-credible simulations at lower resolution, parameterizations for the following processes would be needed:
deep convection
gravity-wave drag
energy fixer
The only configuration of EAMxx that is currently implemented is the convection-permitting version, commonly known as the Simple Cloud-Resolving E3SM Atmosphere Model (SCREAM). Processes in EAMxx-SCREAM are:
a non-hydrostatic version of the spectral-element dynamical core used by other E3SM Atmosphere Model versions1 with semi-Lagrangian tracer advection as described by Bradley et al. (2022)2
turbulent mountain stress is crudely parameterized following Fiedler and Panofsky (1072)3 to reduce excessive winds around topography
the Simple Higher-Order Closure (SHOC) parameterization from Bogenschutz and Krueger (2013)[@Bogenschutz_Krueger13], which handles turbulent diffusion, condensation/evaporation, and liquid cloud fraction
an all-or-nothing ice cloud fraction parameterization that sets ice cloud fraction to 100% whenever cloud ice mass qi is less than a user-specified threshold set by default to 1e-5 kg/kg. This scheme also sets the total cloud fraction (used by microphysics) to the maximum of the liquid and ice cloud fraction.
the effects of aerosol are prescribed via the Simple Prescribed Aerosol (SPA) scheme, which is very similar to MACv2-SP4
the P3 microphysics scheme from Morrison and Milbrandt (2015)5 modified as described by Caldwell et al. (2021)6 to assume instantaneous liquid saturation adjustment for consistency with SHOC
RTE/RRTMGP radiation from Pincus et al. (2019)7 rewritten in C++ for consistency and performance
the CFMIP Observation Simulator Package (COSP) is also integrated into EAMxx, but currently only the ISCCP output is enabled
By default processes are called in this order, but which processes to include and in what order is modifiable at run time. After all atmospheric processes are called, output is written. Surface components are then called before the next atmosphere step starts. These processes are described in more detail in Caldwell et al. (2021)6. As in EAM, dynamics operates on a spectral element grid and all other processes use a finite-volume grid that divides each spectral element into 4 quadrilaterals. This physics grid is described in Hannah et al. (2021)8.
Mark A. Taylor, Oksana Guba, Andrew Steyer, Paul A. Ullrich, David M. Hall, and Christopher Eldred. An energy consistent discretization of the nonhydrostatic equations in primitive variables. Journal of Advances in Modeling Earth Systems, 12(1):e2019MS001783, 2020. e2019MS001783 10.1029/2019MS001783. URL: https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2019MS001783, arXiv:https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2019MS001783, doi:https://doi.org/10.1029/2019MS001783.\u00a0\u21a9
A. M. Bradley, P. A. Bosler, and O. Guba. Islet: interpolation semi-lagrangian element-based transport. Geoscientific Model Development, 15(16):6285\u20136310, 2022. URL: https://gmd.copernicus.org/articles/15/6285/2022/, doi:10.5194/gmd-15-6285-2022.\u00a0\u21a9
F. Fiedler and H. A. Panofsky. The geostrophic drag coefficient and the \u2018effective\u2019 roughness length. Quarterly Journal of the Royal Meteorological Society, 98(415):213\u2013220, 1972. URL: https://rmets.onlinelibrary.wiley.com/doi/abs/10.1002/qj.49709841519, arXiv:https://rmets.onlinelibrary.wiley.com/doi/pdf/10.1002/qj.49709841519, doi:https://doi.org/10.1002/qj.49709841519.\u00a0\u21a9
B. Stevens, S. Fiedler, S. Kinne, K. Peters, S. Rast, J. M\u00fcsse, S. J. Smith, and T. Mauritsen. Macv2-sp: a parameterization of anthropogenic aerosol optical properties and an associated twomey effect for use in cmip6. Geoscientific Model Development, 10(1):433\u2013452, 2017. URL: https://gmd.copernicus.org/articles/10/433/2017/, doi:10.5194/gmd-10-433-2017.\u00a0\u21a9
Hugh Morrison and Jason A. Milbrandt. Parameterization of cloud microphysics based on the prediction of bulk ice particle properties. part i: scheme description and idealized tests. Journal of the Atmospheric Sciences, 72(1):287 \u2013 311, 2015. URL: https://journals.ametsoc.org/view/journals/atsc/72/1/jas-d-14-0065.1.xml, doi:10.1175/JAS-D-14-0065.1.\u00a0\u21a9
P. M. Caldwell, C. R. Terai, B. Hillman, N. D. Keen, P. Bogenschutz, W. Lin, H. Beydoun, M. Taylor, L. Bertagna, A. M. Bradley, T. C. Clevenger, A. S. Donahue, C. Eldred, J. Foucar, J.-C. Golaz, O. Guba, R. Jacob, J. Johnson, J. Krishna, W. Liu, K. Pressel, A. G. Salinger, B. Singh, A. Steyer, P. Ullrich, D. Wu, X. Yuan, J. Shpund, H.-Y. Ma, and C. S. Zender. Convection-permitting simulations with the e3sm global atmosphere model. Journal of Advances in Modeling Earth Systems, 13(11):e2021MS002544, 2021. e2021MS002544 2021MS002544. URL: https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2021MS002544, arXiv:https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2021MS002544, doi:https://doi.org/10.1029/2021MS002544.\u00a0\u21a9\u21a9
Robert Pincus, Eli J. Mlawer, and Jennifer S. Delamere. Balancing accuracy, efficiency, and flexibility in radiation calculations for dynamical models. Journal of Advances in Modeling Earth Systems, 11(10):3074\u20133089, 2019. URL: https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2019MS001621, arXiv:https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2019MS001621, doi:https://doi.org/10.1029/2019MS001621.\u00a0\u21a9
Walter M. Hannah, Andrew M. Bradley, Oksana Guba, Qi Tang, Jean-Christophe Golaz, and Jon Wolfe. Separating physics and dynamics grids for improved computational efficiency in spectral element earth system models. Journal of Advances in Modeling Earth Systems, 13(7):e2020MS002419, 2021. e2020MS002419 2020MS002419. URL: https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2020MS002419, arXiv:https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2020MS002419, doi:https://doi.org/10.1029/2020MS002419.\u00a0\u21a9
The goal of the AeroCom algorithm is to calculate properties at cloud top based on the AeroCom recommendation. There are two main parts of the algorithm: probabilistically determining \"cloud top\" and then \"calculating properties\" at said cloud top.
We treat model columns independently, so we loop over all columns in parallel. We then loop over all layers in serial (due to needing an accumulative product), starting at 2 (second highest) layer because the highest is assumed to have no clouds. Let's take a photonic approach from above the model top. Let's say that \\(p_{k}\\) is the probability of a photon passing through the layer \\(k\\). We follow the maximum-random overlap assumption. In all cases, we assume the cloudiness (or cloudy fraction) is completely opaque.
We assume the highest layer has no clouds, thus the \\(p_{k} = 1\\) for the highest layer. Note that \\(p_{k}\\) is initialized as 1 for all layers. We also clip the cloudy fraction \\(C_{i,k}\\) to ensure that \\(C_{i,k} \\in [0+\\epsilon, 1-\\epsilon]\\), where \\(\\epsilon = 0.001\\). Starting at the second highest layer, \\(k+1\\), we check if some \"cloudy\" conditions are met. These conditions are now arbitrarily defined by a cloudiness threshold of \\(\\epsilon\\) (i.e., \\(C_{i,k}>\\epsilon\\)) and a non-zero threshold on the total (both liquid and ice) droplet number concentration (i.e., \\(cQ_{i,k} + iQ_{i,k} > 0\\)). If the conditions are met, we estimate the cloud-top cloud fraction using an accumulative product following the maximum-random overlap assumption.
The thermodynamic phase is used only for cloud properties (e.g., cloud-top cloud droplet number concentration) or cloud content (e.g., cloud liquid content). Further, \\(X_{i,k}\\) is the three-dimensional cloud property of interest which is needed if we are converting a property from three-dimensional (\\(X\\)) to its two-dimensional counterpart (\\(x\\)). \"Other\" properties here include temperature and pressure which are not dependent on the thermodynamic phase.
Most studies in this topic refer a technical report by Tiedtke et al. (1979)1. Another more recent general reference that may be of interest is that of R\u00e4is\u00e4nen et al. (2004)2.
M. Tiedtke, J.-F. Geleyn, A. Hollingsworth, and J.-F. Louis. ECMWF model parameterisation of sub-grid scale processes. Technical Report, ECMWF, Shinfield Park, Reading, January 1979. 10.\u00a0\u21a9
Petri R\u00e4is\u00e4nen, Howard W Barker, Marat F Khairoutdinov, Jiangnan Li, and David A Randall. Stochastic generation of subgrid-scale cloudy columns for large-scale models. Quarterly Journal of the Royal Meteorological Society: A journal of the atmospheric sciences, applied meteorology and physical oceanography, 130(601):2047\u20132067, 2004.\u00a0\u21a9
"},{"location":"user/","title":"SCREAM User Guide","text":"
This section contains documentation on how to create, setup, and run CIME cases with EAMxx as the atmosphere component. It is assumed that the reader has a familiarity with CIME case control system. In particular, we assume that the user knows how to create a case, and what the case.setup, case.build, and case.submit commands do.
This user guide is still under construction. In the meantime, in case you can't find the information you need, you may visit our public confluence EAMxx user guide.
"},{"location":"user/clean_clear_sky/","title":"Clean- and clean-clear-sky diagnostics","text":"
In order to decompose the aerosol effective radiative forcing, additional diagnostic radiation calls are needed. These extra diagnostics are optionally added to the main radiation call. The extra diagnostics are:
Clean-clear-sky fluxes: the fluxes that would be present if there were neither aerosols nor clouds, and are calculated by adding an additional radiation call at the very beginning of the logic before the optics class is endowed with aerosol and cloud properties.
Clean-sky fluxes: the fluxes that would be present if there were no aerosols, and are calculated by adding an additional radiation call after substantiating an additional optics class, but not endowing it with aerosol properties.
"},{"location":"user/clean_clear_sky/#example-setup-current-as-of-april-2024","title":"Example setup (current as of April 2024)","text":"
The extra calls are controlled by runtime flags extra_clnclrsky_diag and extra_clnsky_diag (they take either true or false as their values).
COSP can be run with or without subcolumn sampling. This is configured by changing the cosp_subcolumns namelist variable via atmchange. A value of 1 implies no subcolumn sampling, while values greater than 1 specify the number of subcolumns to use for subcolumn sampling (assuming maximum-random overlap). E.g.,
./atmchange physics::cosp:cosp_subcolumns=1\n
would disable subcolumn sampling, while
./atmchange physics::cosp::cosp_subcolumns=10\n
would use 10 subcolumns for the COSP internal subcolumn sampling using SCOPS/PREC_SCOPS. The default for high resolution cases (e.g., ne1024) should be to not use subcolumns, while lower resolutions (e.g., ne30) should enable subcolumn sampling.
Output streams need to be added manually. A minimal example:
isccp_cldtot (total cloud area from ISCCP simulator)
isccp_ctptau (ISCCP-simulated cloud top pressure/optical depth joint histogram)
modis_ctptau (MODIS-simulated cloud top pressure/optical depth joint histogram)
misr_cthtau (MISR-simulated cloud top height/optical depth joint histogram)
cosp_sunlit (sunlit flag aggregated at COSP frequency for renormalizing daytime averages)
ISCCP, MODIS, and MISR outputs are valid only for daytime/sunlit columns (to be consistent with available satellite retrievals). In order to aggregate only daytime columns in time averages, these outputs are multiplied by the sunlit flag (0 or 1) at each COSP calculation time. Time averages of these quantities are then aggregated, along with the cosp sunlit flag each time COSP is called. In order to back out the daytime-only time averages from the outputs, one needs to divide the output fields by cosp_sunlit. E.g.,
"},{"location":"user/eamxx_cases/","title":"Basics of EAMxx cases","text":"
This section explains how to create a case which uses EAMxx as the atmosphere model, as well as what are the currently supported compsets and grids for EAMxx.
This section explains how input parameters are passed to EAMxx, and how the user can change their value. The full list of the currently configuraable runtime parameters for EAMxx can be found here.
The infrastructure for reading inputs into EAMxx involves a few scripts/files:
atmchange and atmquery: these scripts are located in SRCDIR/components/eamxx/scripts, and are soft-linked in the case folder. As their names suggest, they can be used to query and change the runtime configuration parameter of EAMxx. Since these two scripts are the only scripts that the average user needs to know and interact with, in the next sections we give a brief overview of how they can be used and how their output can be interpreted. Additionally, for both of the scripts a short help can also be obtained using the -h flag.
buildnml: this script, located in SRCDIR/components/eamxx/cime_config, is called by CIME's case management scripts (case.setup, case.build, and case.submit), and is responsible for creating the input files that EAMxx will read to load its runtime parameters. Users should not have to modify this script, nor should they have to manually call it, but it is useful to know what it does. When buildnml runs, it creates a few files, containing EAMxx input parameters:
scream_input.yaml: this YAML file is located in the RUNDIR/data folder, and will be read by EAMxx at runtime to load all of its configuration parameters. More precisely, this file contains parameters that need to be used inside the EAMxx interfaces.
namelist.nl: this namelist file is located in the RUNDIR/data folder, and will be parsed at runtime to get all the parameters for the HOMME dycore (ADD REF). This file only contains dycore-specific parameters that are only recognized inside HOMME, and does not contain any parameter pertaining EAMxx infrastructure.
namelist_scream.xml: this XML file is located in the case directory, and contains all the runtime parameters that EAMxx will read in at runtime. buildnml uses this XML file as an intermediate file during the generation of scream_input.yaml and namelist.nl. More specifically, buildnml generates this file using case information to select the proper configurations from the file namelist_defaults_scream.xml, located in SRCDIR/components/eamxx/cime_config. Despite the fact that the only files that are needed at runtime are scream_input.yaml and namelist.nl, we generate and keep this XML file around to make the implementation of atmquery easier.
Since these files are automatically generated when buildnml runs, users should not manually modify them. Any manual modification will be lost the next time buildnml runs (e.g., at case.submit time).
"},{"location":"user/model_input/#querying-model-inputs-atmquery","title":"Querying model inputs: atmquery","text":"
This script is the simplest way for the user to check the value and properties of EAMxx input parameters. A basic usage of the script is
$ ./atmquery my_param\n
which will retrieve the value of the parameter called my_param, by locating the XML node \"my_param\" in the file namelist_scream.xml in the RUNDIR folder. Obviously, an XML file can have multiple nodes with the same tag, and the script is implemented to error out if multiple matches are found. In such a scenario, the user needs to provide also the parents nodes names, using enough parents to uniquely identify the node (in most cases, one parent is enough). To specify a parent, the user can prepend the parent name and :: to the node name:
$ ./atmquery foo::my_param\n
The output will contain the fully scoped parameter name, along with the value. E.g.,
It is sometimes desirable to query all the nodes that have a particular name, or that contain a particular string. We can do that by using the --grep flag:
TODO: This difference between basic and --grep is not really intuitive: as pointed out in this issue, we should change this. If we do, don't forget to update this following part of the docs. Using the --grep option has another effect: if the match is not a leaf of the XML tree, all its subelements are printed:
Similarly to the CIME utility xmlchange, the options --value, --type, --valid-values, and --full can be used to respectively retrieve just the parameter value (useful for shell scripting), the parameter's type, a list of valid values for parameter (when applicable), or all of the above:
Finally, the option --listall can be used to list the whole content of the XML file, which will be displayed with each node indented in its parent scope:
"},{"location":"user/model_input/#changing-model-inputs-atmchange","title":"Changing model inputs: atmchange","text":"
When buildnml runs, the model inputs are deduced from the case configuration settings (e.g., the grid, the compset, etc.) and the namelist_scream_defaults.xml file, located in the eamxx source tree. The user can change any of these parameters using the atmchange script. A basic usage of the script is
$ ./atmchange my_param=10\n
As for atmquery, if there are multiple matches for a given parameter name, the user must specify a unique scoped name, which allows atmchange to uniquely identify the XML node to modify:
$ ./atmquery homme::number_of_subcycles\n namelist_defaults::atmosphere_processes::homme::number_of_subcycles: 1\n$ ./atmchange number_of_subcycles=10\nERROR: internal_diagnostics_level is ambiguous. Use ANY in the node path to allow multiple matches. Matches:\n namelist_defaults::atmosphere_processes::number_of_subcycles\n namelist_defaults::atmosphere_processes::sc_import::number_of_subcycles\n namelist_defaults::atmosphere_processes::homme::number_of_subcycles\n namelist_defaults::atmosphere_processes::physics::number_of_subcycles\n namelist_defaults::atmosphere_processes::physics::mac_aero_mic::number_of_subcycles\n namelist_defaults::atmosphere_processes::physics::mac_aero_mic::tms::number_of_subcycles\n namelist_defaults::atmosphere_processes::physics::mac_aero_mic::shoc::number_of_subcycles\n namelist_defaults::atmosphere_processes::physics::mac_aero_mic::cldFraction::number_of_subcycles\n namelist_defaults::atmosphere_processes::physics::mac_aero_mic::spa::internal_diagnostics_level\n namelist_defaults::atmosphere_processes::physics::mac_aero_mic::p3::number_of_subcycles\n namelist_defaults::atmosphere_processes::physics::rrtmgp::number_of_subcycles\n namelist_defaults::atmosphere_processes::sc_export::number_of_subcycles\n$ ./atmchange homme::number_of_subcycles=10\nRegenerating /path/to/namelist_scream.xml. Manual edits will be lost.\n$ ./atmquery homme::number_of_subcycles\n namelist_defaults::atmosphere_processes::homme::number_of_subcycles: 10\n
In some cases, the user may be interested in changing all nodes with a given name. In that case, you can use 'ANY' as a node name:
Since the XML file stores constraints on the parameter value (like its type or valid values), attempting to use the wrong type will cause an error:
$ ./atmquery --type se_ne\n namelist_defaults::ctl_nl::se_ne: integer\n$ ./atmchange se_ne=hello\nERROR: Could not refine 'hello' as type 'integer':\n
There are three main types supported: integer, float, string, logical. When passing a string to atmchange, the script will try to interpret it acoording to the parameter type, and throw an error if that's not possible: for \"string\", anything works; for \"integer\", only digits are allowed, possibly with a negative sign in front; for \"float\", only digits are allowed, possibly with a negative sign in front and a decimal point; for \"logical\", only the strings \"true\" and \"false\" are allowed (case insensitive). There are two additional types supported: \"file\" and \"array(T)\", where \"T\" is any of the other supported types (but not another array): - \"file\" is used to inform CIME of the input files that have to be download from E3SM data servers, like initial conditions files, or certain lookup tables. - \"array(T)\" allows to specify a list of items (of the same type), which will be parsed inside EAMxx as a std::vector<T>.
For type \"string\" and \"array(T)\", it is also possible to append to the currently stored value
"},{"location":"user/model_input/#modifying-the-list-of-atmosphere-processes","title":"Modifying the list of atmosphere processes","text":"
The atmchange script can be used to change any of the runtime parameters of EAMxx. In particular, it can be used to add, remove, or reorder atmosphere processes. When adding an atmosphere process, we must first make sure that the defaults for that process are present in namelist_defaults_scream.xml. For instance, the default settings for the \"physics\" atmosphere process group include the following:
where \"mac_aero_mic\" is itself an atmosphere process group, consisting of macrophysics, aerosols, and microphysics processes. If one wanted to add the \"cosp\" atmosphere process to this list, and change the number of its subcycles, it could do so via
Notice that if we swapped the two commands, we would get an error, since the node \"cosp\" is not present in the XML generated from the defaults until we decide to add it.
It is also possible to declare a new (empty) atmosphere process group, which can then be filled with valid atmosphere processes via subsequent calls to atmchange. The syntax to trigger this behavior consists in specifying a process name that begins and ends with an underscore:
This adds a new process to the list of processes in \"physics\", called \"_my_group_\", and which is itself an atmosphere process group. Hence, we can then do
$ ./atmchange _my_group_::atm_procs_list+=A,B\n
where A and B must be valid atmosphere process names (i.e., present in namelist_defaults_scream.xml) or be themselves new atmosphere process groups (i.e., beginning/ending with an underscore)
atmchange can also be used to completely change a list of atmosphere processes:
$ ./atmchange physics::atm_procs_list=A,B,C\n
Notice that we used \"=\" instead of \"+=\", which means we will be overwriting the value, rather than appending. Any atmosphere process that was previously in the list but is no longer in it will be removed from the generated namelist_defaults.xml (and scream_input.yaml) files, along with all their nested parameters.
EAMxx allows the user to configure the desired model output via YAML files, with each YAML file associated to a different output file. In order to add an output stream, one needs to run atmchange output_yaml_files+=/path/to/my/output/yaml (more information on how to use atmchange can be found here). During the buildnml phase of the case management system, a copy of these YAML files will be copied into the RUNDIR/data folder. During this process, the files will be parsed, and any CIME-related variable will be resolved accordingly. Therefore, it is not advised to put the original YAML files in RUNDIR/data, since upon buildnml execution, all the CIME vars will no longer be available in the YAML file, making it harder to tweak it, and even harder to share with other users/cases. Another consequence of this is that the user should not modify the YAML files in RUNDIR/data, since any modification will be lost on the next run of buildnml.
The following is a basic example of an output request.
%YAML 1.1\n---\nfilename_prefix: my_output\nAveraging Type: Average\nMax Snapshots Per File: 10\nFields:\n Physics:\n Field Names:\n - T_mid\n - qv\n Dynamics:\n Field Names:\n - dp3d_dyn\n - omega_dyn\noutput_control:\n Frequency: 6\n frequency_units: nhours\n
Notice that lists can be equivalently specified in YAML as Field Names: [f1, f2, f3]. The user can specify fields to be outputted from any of the grids used in the simulation. In the example above, we requested fields from both the Physics and Dynamics grid. The meaning of the other parameters is as follows:
Averaging Type: how the fields are integrated in time before being saved. Valid options are
Instant: no integration, each time frame saved corresponds to instantaneous values of the fields
Average/Max/Min: the fields undergo the corresponding operation over the time interval specified in the output_control section. In the case above, each snapshot saved to file corresponds to an average of the output fields over 6h windows.
filename_prefix: the prefix of the output file, which will be created in the run directory. The full filename will be $prefix.$avgtype.$frequnits_x$freq.$timestamp.nc, where $timestamp corresponds to the first snapshot saved in the file for Instant output, or the beginning of the first averaging window for the other averaging types
Max Snapshots Per File: specifies how many time snapshots can be put in a file. Once this number is reached, EAMxx will close the file and open a new one.
Frequency: how many units of time are between two consecutive writes to file. For Instant output the fields are \"sampled\" at this frequency, while for other averaging types the fields are \"integrated\" in time over this window
frequency_units: units of the output frequency. Valid options are nsteps (the number of atmosphere time steps), nsecs, nmins, nhours, ndays, nmonths, nyears.
In addition to the fields computed by EAMxx as part of the timestep, the user can request to output derived quantities, which will be computed on the fly by the I/O interface of EAMxx. There are two types of diagnostic outputs:
quantities computed as a function of EAMxx fields. These are simply physical quantities that EAMxx does not keep in persistent storage. As of May 2024, the available derived quantities are (case sensitive):
PotentialTemperature
AtmosphereDensity
Exner
VirtualTemperature
z_int
z_mid
geopotential_int
geopotential_mid
dz
DryStaticEnergy
SeaLevelPressure
LiqWaterPath
IceWaterPath
VapWaterPath
RainWaterPath
RimeWaterPath
ShortwaveCloudForcing
LongwaveCloudForcing
RelativeHumidity
ZonalVapFlux
MeridionalVapFlux
precip_liq_surf_mass_flux
precip_ice_surf_mass_flux
precip_total_surf_mass_flux
surface_upward_latent_heat_flux
wind_speed
AerosolOpticalDepth550nm
NumberPath
AeroComCld
TODO: add some information about what each diagnostic is, perhaps a formula
lower-dimensional slices of a field. These are hyperslices of an existing field or of another diagnostic output. As of August 2023, given a field X, the available options are:
X_at_lev_N: slice the field X at the N-th vertical level index. Recall that in EAMxx N=0 corresponds to the model top.
X_at_model_bot, X_at_model_top: special case for top and bottom of the model.
X_at_Ymb, X_at_YPa, X_at_YhPa: interpolates the field X at a vertical position specified by the give pressure Y. Available units are mb (millibar), Pa, and hPa.
X_at_Ym_above_Z: interpolates the field X at a vertical height of Y meters above Z, with Z=surface or Z=sealevel.
The following options can be used to to save fields on a different grid from the one they are computed on.
horiz_remap_file: a path to a map file (as produced by ncremap) between the grid where the fields are defined and a coarser grid. EAMxx will use this to remap fields on the fly, allowing to reduce the size of the output file. Note: with this feature, the user can only specify fields from a single grid.
vertical_remap_file: similar to the previous option, this map file is used to refine/coarsen fields in the vertical direction.
IOGrid: this parameter can be specified inside one of the grids sections, and will denote the grid (which must exist in the simulation) where the fields must be remapped before being saved to file. This feature is really only used to save fields on the dynamics grid without saving twice the DOFs at the interface of two spectral elements. E.g., for a scalar quantity defined only in the horizontal direction, native output from the Dynamics grid would produce arrays of length nelems*ngp*ngp, where ngp is the number of Gauss points along each axis in the 2d spectral element, and nelems is the number of horizontal elements. However, due to continuity, the values on the Gauss points on the element boundary must match the values on the neighboring element, resulting in duplicated data. By remapping to a \"unique\" version of the dynamics grid (which in EAMxx is referred to as \"Physics GLL\"), we can save roughly 45% of storage. Note: this feature cannot be used along with the horizontal/vertical remap.
It is also possible to request tendencies of fields that are updated by atmosphere processes, on a per-process basis (here, \"updated\" means that the field is both an input as well as an output of the atmosphere process). Since the term \"tendency\" can be used with slightly different connotations, we clarify what we mean by that when it comes to model output: if process P updates field A, by the tendency of A from process P we mean (A_after_P - A_before_P) / dt, where dt is the atmosphere timestep.
As of May 2024, the user needs two things in order to get tendencies from a process. E.g., to get the tendencies of T_mid and horiz_winds from the process shoc, one needs:
The YAML file shown at the top of this section, together with the remap options in the following section, covers most of the options used in a typical run. There are however particular use cases that require some less common options, which we list here (in parentheses, the location in the YAML file and the type of the parameter value).
flush_frequency (toplevel list, integer): this parameter can be used to specify how often the IO library should sync the in-memory data to file. If not specified, the IO library is free to decide when it should flush the data. This option can be helpful for debugging, in case a crash is occurring after a certain number of steps, but before the IO library would automatically flush to file.
Floating Point Precision (toplevel list, string): this parameter specifies the precision to be used for floating point variables in the output file. By default, EAMxx uses single precision. Valid values are single, float, double, and real. The first two are synonyms, while the latter resolves to single or double depending on EAMxx cmake configuration parameter SCREAM_DOUBLE_PRECISION.
file_max_storage_type (toplevel list, string): this parameter determines how the capacity of the file is specified. By default, it is set to num_snapshots, which makes EAMxx read Max Snapshots Per File (explained in the first section). However, the user can specify one_year or one_month, which will make EAMxx create one output file per year/month of simulation, fitting however many snapshots are needed in each file (depending on the output frequency). If one_year or one_month are used, the option Max Snapshots Per File is ignored.
MPI Ranks in Filename (toplevel list, boolean): this option specifies whether the number of MPI ranks in the atm communicator should be put inside the output file name. By default, this is false, since it is usually not important. This option is mostly important for standalone unit testing, where several versions of the same test (corresponding to different numbers of MPI ranks) are running concurrently, so that different file names are needed to avoid resource contention.
save_grid_data (output_control sublist, boolean): this option allows to specify whether grid data (such as lat/lon) should be added to the output stream. By default, it is true.
iotype (toplevel list, string): this option allows the user to request a particular format for the output file. The possible values are default, netcdf, pnetcdf,adios,hdf5, wheredefault` means \"whatever is the PIO type from the case settings\".
skip_t0_output (output_control sublist, boolean): this option is relevant only for Instant output, where fields are also outputed at the case start time (i.e., after initialization but before the beginning of the first timestep). By default it is set to false.
restart options: when performing a restart, EAMxx attempts to restart every output stream listed in the output_yaml_files atm option (which can be queried via atmquery output_yaml_files). The user can specify a few options, in order to tweak the restart behavior:
Perform Restart (Restart sublist, boolean): this parameter is true by default, but can be set to false to force the model to ignore any history restart files, and start the output stream from scratch, as if this was an initial run.
filename_prefix (Restart sublist, string): by default, this parameter is set to match the value of filename_prefix from the toplevel list. It can be set to something else in case we want to restart a previous simulation that was using a different filename prefix.
force_new_file (Restart sublist, boolean): this parameter allows to start a fresh new output file upon restarts. By default, is is set to false, so that EAMxx will attempt to resume filling the last produced output file (if any, and if it can accommodate more snapshots).
"},{"location":"user/nudging/","title":"Nudging in EAMxx","text":"
Nudging is supported in EAMxx. Currently, it is possible to nudge EAMxx to the output from a different EAMxx run or to reanalysis. Nudging data can be on your model grid or an arbitrary coarser grid. Inline interpolating of finer-grid nudging data to a coarser model resolution isn't implemented yet but may be in the future.
"},{"location":"user/nudging/#data-to-nudge-towards","title":"Data to nudge towards","text":"
The user is expected to prepapre (and then use atmchange to point to) nudging data files that are compliant with EAMxx specification. In practice, this means that the data files must contain variable names known to EAMxx (only U, V, T_mid, and qv are supported now). The files can be specified with an explicit list or via pattern matching. The files must contain an arbitary global attribute case_t0, and it is recommended to be the same as the time dimension unit (the files must be time-dimensioned). Finally, the dimension order must be such that lev is the last dimension, so most likely, the user must transpose the dimensions.
"},{"location":"user/nudging/#pressure-in-the-nudging-data","title":"Pressure in the nudging data","text":"
Pressure can be explicitly provided in the nudging data as time-varying p_mid corresponding to the option TIME_DEPENDENT_3D_PROFILE for source_pressure_type. Alternatively, the data can contain a time-invariant pressure variable p_lev corresponding to the option TIME_DEPENDENT_3D_PROFILE for source_pressure_type.
"},{"location":"user/nudging/#weighted-nudging-for-rrm-applications","title":"Weighted nudging for RRM applications","text":"
In regionally refined model applications, it is possible to use weighted nudging, for example, to avoid nudging the refined region. To achieve that, the user can use atmchange to set use_nudging_weights (boolean) and provide nudging_weights_file that has the weight to apply for nudging (for example, zeros in the refined region). Currently, weighted nudging is only supported if the user provides the nudging data at the target grid.
"},{"location":"user/nudging/#example-setup-current-as-of-april-2024","title":"Example setup (current as of April 2024)","text":"
To enable nudging as a process, one must declare it in the atm_procs_list runtime parameter.
The following options are needed to specify the nudging.
./atmchange nudging::nudging_filenames_patterns=\"/pathto/nudging_files/*.nc\" # can provide file name explicitly here instead (or multiple patterns)\n./atmchange nudging::source_pressure_type=TIME_DEPENDENT_3D_PROFILE # see section on pressure\n./atmchange nudging::nudging_fields=U,V # can include qv, T_mid as well\n./atmchange nudging::nudging_timescale=21600 # in seconds\n
To gain a deeper understanding of these parameters and options, please refer to code implementation of the nudging process.
"}]}
\ No newline at end of file
+{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"The E3SM Atmosphere Model in C++ (EAMxx)","text":"
EAMxx EAMxx is almost completely different in all ways from the atmosphere model used for E3SM versions 1-3.
EAMxx was built from the ground up using C++ in order to embrace modern software practices and to allow \"performance portability\" across various supercomputers. The latter goal is achieved by using the Kokkos library. EAMxx is a \"clean-start\" model with almost no similarity to the E3SM atmosphere model used in versions 1-3. Currently only the km-scale explicit-convection version called SCREAM (the Simple Cloud-Resolving E3SM Atmosphere Model) is available, but a low-resolution version is in the works.
Like the documentation for other component models, EAMxx documentation is divided into:
The User Guide - info about running EAMxx and all options for modifying a simulation
The Developer Guide - information needed to contribute to EAMxx development
The Technical Guide - equations and numerical methods used in EAMxx
Put another way, all information about how to customize runs without changing code is included in the User Guide, general information about software design which is needed for intelligently modifying code goes in the Developer Guide, and details about the specific process implementations in the current model version are included in the Technical Guide.
description: List of fields to be nudged. Note, syntax of 'A:B' represents nudging field A with data from field B in files, syntax of 'A' assumes that nudging file has the same variables name as EAMxx
type: array(string)
nudging::nudging_timescale:
description: Timescale to apply nudging tendencies, 0: full replacement, >0: actual timescale
type: integer
nudging::use_nudging_weights:
description: Flag for nudging weights option
type: logical
nudging::nudging_weights_file:
description: weights that relax the nudging fields update
type: string
nudging::skip_vert_interpolation:
description: Flag for skipping vertical interpolation
type: logical
nudging::source_pressure_type:
description: Flag for how source pressure levels are handled in the nudging dataset. TIME_DEPENDENT_3D_PROFILE: The dataset contains a time-varying pressure profile, variable name 'p_mid' with dimensions (time,ncol,nlev). STATIC_1D_VERTICAL_PROFILE: The dataset uses a fixed in time single pressure profile, variable name 'p_lev' with dimension (nlev).
description: If STATIC_1D_VERTICAL_PROFILE, this is an optional arg to point to a file with the source pressure levels defined. Default is to look for p_levs in the first nudging_filenames_patterns file
type: string
nudging::nudging_refine_remap_mapfile:
description: Refine-remapping mapfile from the source nudging dataset to the physics grid
type: string
nudging::nudging_refine_remap_vert_cutoff:
description: A vertical cutoff to go with refine-remap logic (in units of p_mid) where the nudging is turned off above it (closer to the surface)
type: real
nudging::number_of_subcycles:
description: how many times to subcycle this atm process
type: MISSING
constraints: gt 0
nudging::enable_precondition_checks:
description: MISSING
type: logical
nudging::enable_postcondition_checks:
description: MISSING
type: logical
nudging::repair_log_level:
description: MISSING
type: string
valid values: trace,debug,info,warn
nudging::internal_diagnostics_level:
description: MISSING
type: integer
nudging::compute_tendencies:
description: list of computed fields for which this process will back out tendencies
Follow these simple instructions to build and test EAMxx's standalone configuration for yourself. This document makes use of the following paths:
${RUN_ROOT_DIR}: the root directory where EAMxx is built and run
${EAMXX_SRC_DIR}: the directory into which you've cloned the scream repo
EAMxx's configuration and build system is based on CMake. CMake has been around a while and has gained a lot of traction in recent years, especially in the HPC community. It has good reference documentation, but it can be tricky to use if you've never encountered it. Ask a EAMxx team member for help if you're stuck on something CMake-related.
If you see a CMakeLists.txt files or a file with a .cmake suffix, that's just part of the build system. You might also see files with CTest as part of their name. These files are related to CTest, CMake's testing tool.
First, make sure you're on one of the machines supported by EAMxx, or that you have the following software installed:
A working MPI installation (typically MPICH or Open-MPI)
CMake and GNU Make
A working set of C, C++, and Fortran compilers
A recent version of Git
A working installation of NetCDF, including both C and Fortran libraries.
"},{"location":"common/installation/#setting-up-your-environment","title":"Setting Up Your Environment","text":""},{"location":"common/installation/#configuring-and-building-scream","title":"Configuring and Building Scream","text":""},{"location":"common/installation/#1-start-from-a-trustworthy-commit","title":"1. Start From a Trustworthy Commit","text":"
First, make sure you've cloned the EAMxx repo (including all submodules) to EAMXX_SRC_DIR using the following command:
If you have already cloned the project and forgot to type --recurse-submodules, you can change to $EAMXX_SRC_DIR and using the following command to initialize, fetch and checkout all submodules:
git submodule update --init --recursive\n
If you're running a branch that's not master, check out this branch with
git checkout <branch>\n
"},{"location":"common/installation/#2-configure-your-eamxx-build","title":"2. Configure Your EAMxx Build","text":"
Change to your $RUN_ROOT_DIR directory and use CMake to configure your build.
If you're building SCREAM on one of our supported platforms, you can tell CMake to use the appropriate machine file using the -C flag. Machine files are located in $EAMXX_SRC_DIR/components/eamxx/cmake/machine-files. Take a look and see whether your favorite machine has one.
For example, to configure SCREAM on the Quartz machine at LLNL:
If you're building on a machine that doesn't have a ready-made machine file, you can try configuring your build by manually passing options to CMake. This usually looks something like the following, which configures EAMxx to compile CPU code using Kokkos's OpenMP backend:
In either case, EAMxx requires MPI-aware compilers. Let's examine these options (only some of which are required on any given machine) to make sure we know what they do:
CMAKE_BUILD_TYPE: specifies whether you are building EAMxx in a developer-friendly configuration (Debug), for a production run (Release) or for performance profiling or some other specialized purpose. Typically, you'll set this option to Debug or Release.
CMAKE_{C,CXX,Fortran}_COMPILER: the name of the command used to invoke an MPI-enabled C, C++, or Fortran compiler to build EAMxx
MPIEXEC_EXECUTABLE: the name of the command used to run EAMxx using MPI, typically mpiexec or mpirun, but possibly different depending on your desired machine
EKAT_MPI_NP_FLAG: the flag passed to MPIEXEC_EXECUTABLE that you use to specify the number of desired MPI processes. This is typically -n for mpiexec and -np for mpirun.
SCREAM_DYNAMICS_DYCORE: specifies the dycore used for configuring EAMxx, which is NONE if you are not configuring EAMxx to run its dycore-related tests, or HOMME if you want to use HOMMExx
SCREAM_DOUBLE_PRECISION: indicates whether EAMxx's Real type is a double-precision (ON) or single-precision (OFF) floating point type
SCREAM_INPUT_ROOT: specifies the location of the top-level folder that stores input data files for EAMxx. This folder is populated with input files which are downloaded automatically during EAMxx's build process.
The Kokkos-related build options (most of which begin with Kokkos_) are described in the Kokkos Wiki
NetCDF_C_PATHS: specifies one or more folders in which the NetCDF C library and headers are installed. In the simplest configuration, the headers should be located in ${NetCDF_C_PATHS}/include and the library should live in ${NetCDF_C_PATHS}/lib.
NetCDF_Fortran_PATHS: specifies one or more folders in which the NetCDF Fortran library and modules are installed. Analogous to ${NetCDF_C_PATHS}, .mod files should be in ${NetCDF_Fortran_PATHS}/include, and the library should be installed in ${NetCDF_Fortran_PATHS}/lib.
PnetCDF_C_PATHS: specifies one or more folders in which the pNetCDF C library and headers are installed, analogous to NetCDF_C_PATHS.
PnetCDF_Fortran_PATHS: specifies one or more folders in which the pNetCDF Fortran library and modules are installed, analogous to NetCDF_Fortran_PATHS.
Above, we've configured Debug builds to make it easier to find and fix errors. For performance testing, you should configure a Release build and make use of other options, depending on your architecture.
Now you can build SCREAM from that same directory:
make -j\n
The -j flag tells Make to use threads to compile in parallel. If you like, you can set the number of threads by passing it as an argument to -j (e.g. make -j8).
In EAMxx, a Field is a data structure holding two things: pointers to the data and pointers to metadata. Both the data and metadata are stored in std::shared_ptr instances, to ensure consistency across all copies of the field. This allows for fast shallow copy semantic for this class.
The data is stored on both CPU and device memory (these may be the same, depending on the Kokkos backend). In EAMxx, we always assume and guarantee that the device data is up to date. That implies that the data be explicitly synced to host before using it on host, and explicitly synced to device after host manipulation, in order to ensure correctness. In order to access the data, users must use the get_view method, which takes two template arguments: the data type, and an enum specifying whether CPU or device data is needed. The data type is used to reinterpret the generic pointer stored inside to a view of the correct scalar type and layout. It is a possibly const-qualified type, and if the field was marked as \"read-only\", the method ensures that the provided data type is const. A read-only field can be created via the getConst method, which returns an identical copy of the field, but marked as read-only. The enum specifying host or device data is optional, with device being the default.
The metadata is a collection of information on the field, such as name, layout, units, allocation size, and more. Part of the metadata is immutable after creation (e.g., name, units, or layout), while some metadata can be partially or completely modified. The metadata is contained in the FieldHeader data structure, which contains four parts:
FieldIdentifier: stores the field's name, layout, units, data type, and name of the grid where it's defined. These information are condensed in a single string, that can be used to uniquely identify a field, allowing to distinguish between different version of the same field. The layout is stored in the FieldLayout data structure, which includes:
the field tags: stored as a std::vector<FieldTag>, they give context to the field's extents.
the field dims: stored both as a std::vector<int>, as well as a 1d Kokkos::View.
FieldTracking: stores information on the usage of the field, as well as its possible connections to other fields. In particular, the tracked items are:
the field time stamp: the time stamp when the field was last updated.
the field accumulation start time: used for fields that are accumulated over several time steps (or time step subcycles). For instance, it allows to reconstruct fluxes from raw accumulations.
the providers/customers: lists of atmosphere processes (see below) that respectively require/compute the field in their calculations.
the field groups: a list of field groups that this field belongs too. Field groups are used to access a group of fields without explicit prior knowledge about the number and/or names of the fields.
FieldAllocProp: stores information about the allocation. While the field is not yet allocated, users can request special allocations for the field, for instance to accommodate packing (for SIMD), which may require padding. Upon allocation, this information is then used by the Field structure to extract the actual data, wrapped in a properly shaped Kokkos::View. The alloc props are also responsible of tracking additional information in case the field is a \"slice\" of a higher-dimensional one, a fact that can affect how the data is accessed.
Extra data: stored as a std::map<std::string,ekat::any>, allows to catch any metadata that does not fit in the above structures. This is a last resort structure, intended to accommodate the most peculiar corner cases, and should be used sparingly.
"},{"location":"developer/grid/","title":"Grids and Remappers","text":""},{"location":"developer/grid/#grids-and-remappers","title":"Grids and Remappers","text":"
In EAMxx, the AbstractGrid is an interface used to access information regarding the horizontal and vertical discretization. The most important information that the grid stores is:
the number of local/global DOFs: these are the degrees of freedom of the horizontal grid only. Here, local/global refers to the MPI partitioning.
the DOFs global IDs (GIDs): a list of GIDs of the DOFs on the current MPI rank, stored as a Field
the local IDs (LIDs) to index list: this list maps the LID of a DOF (that is, the position of the DOF in the GID list) to a \"native\" indexing system for that DOF. For instance, a PointGrid (a class derived from AbstractGrid) is a simple collection of points, so the \"native\" indexing system coincides with the LIDs. However, for a SEGrid (a derived class, for spectral element grids), the \"native\" indexing is a triplet (ielem,igp,jgp), specifying the element index, and the two indices of the Gauss point within the element.
geometry data: stored as a std::map<std::string,Field>, this represent any data that is intrinsically linked to the grid (either along the horizontal or vertical direction), such as lat/lon coordinates, vertical coordinates, area associated with the DOF.
Grids can also be used to retrieve the layout of a 2d/3d scalar/vector field, which allows certain downstream classes to perform certain operations without assuming anything on the horizontal grid.
In general, grid objects are passed around the different parts of EAMxx as const objects (read-only). The internal data can only be modified during construction, which usually is handled by a GridsManager object.
In EAMxx, I/O is handled through the SCORPIO library, currently a submodule of E3SM. The scream_io library within eamxx allows to interface the EAMxx infrastructure classes with the SCORPIO library.
Here we can discuss EKAT, Kokkos, and all of the highly-technical non-scientific stuff that makes our heads hurt.
"},{"location":"developer/kokkos_ekat/#kokkos-views","title":"Kokkos Views","text":""},{"location":"developer/kokkos_ekat/#vectorization-packs","title":"Vectorization: Packs","text":""},{"location":"developer/kokkos_ekat/#fields-and-the-field-manager","title":"Fields and the Field Manager","text":""},{"location":"developer/kokkos_ekat/#preconditions-postconditions-and-invariants","title":"Preconditions, Postconditions, and Invariants","text":""},{"location":"developer/managers/","title":"Managers","text":""},{"location":"developer/managers/#fieldmanager-and-gridsmanager","title":"FieldManager and GridsManager","text":""},{"location":"developer/processes/","title":"Atmospheric Processes","text":"
In EAMxx, the AtmosphereProcess (AP) is a class representing a portion of the atmosphere timestep algorithm. In simple terms, an AP is an object that given certain input fields performs some calculations to compute some output fields.
TODO: describe init sequcene (e.g., the process of requesting fields), base class main interfaces/capabilities (e.g., subcycling), class expectations (e.g., must update fields on physics grid)
Here is a list of currently implemented atmosphere processes. TODO: add links to papers/github-repos, and a SMALL description * p3: Microphysics, blah blah * SHOC: Macrophysics/Turbulence, blah * rrtmgp: Radiation, blah * spa: prescribed aerosols, blah blah * surface coupling: blah * mam: prognostic aerosols, blah blah * nudging: This process is responsible for nudging the model simulation given a set of files with a target nudged state.
Herein l\u0456es the source code for EAMxx. Broadly, here's where things are:
control: Contains the atmosphere driver and basic tests for it.
dynamics: Here's where HOMME lives within EAMxx, along with code for interfacing with it using EAMxx's data structures.
mct_coupling: Glue code for embedding EAMxx within E3SM as an atmosphere component using the MCT coupler.
physics: Source code for physics-related atmospheric processes, including
p3: The C++/Kokkos implementation of P3 microphysics within EAMxx.
shoc: The C++/Kokkos implementation of SHOC macrophysics within EAMxx.
rrtmgp: A stub for the radiation processes as represented in EAMxx.
share: Utilities and data structures common to these processes.
share: Utilities used by various components within EAMxx. Of note:
io: EAMxx's interface to the SCORPIO library.
diagnostics: A collection of simple classes used to compute diagnostic quantities.
Each of these directories contains a CMakeLists.txt file for defining how things are build, and a tests/ subdirectory that houses relevant unit and verification tests.
You'll also see some other files in the src/ directory itself, such as
scream_config.h.in: A template for generating a C++ header file with EAMxx configuration information.
In this section we describe our testing methodology for standalone EAMxx configurations. We use several types of tests
Unit tests are individual test programs that demonstrate that a small set of code performs a single function or a set of related functions. We use a C++ unit testing framework called Catch2 to implement unit tests.
Property (verification) tests are test programs that configure code that demonstrates that a part of EAMxx (for example, an atmospheric physics parameterization or the dynamical core) is able to produce an answer that satisfies some physical constraint or matches a known solution under specific circumstances.
Fortran-C++ \"bit-for-bit\" (BFB) tests are test programs, often implemented as unit tests, that demonstrate that a set of C++ code ported from Fortran produces bit-for-bit identical results to its Fortran counterpart, provided certain compiler options are enabled (such as \"strict\" floating-point arithmetic).
Test Suites are named collections of tests that can be run on demand using the ctest command.
We also support a test-all-scream configuration that runs all of the standalone tests for an EAMxx configuration.
"},{"location":"developer/standalone_testing/#running-eamxxs-tests-with-ctest","title":"Running EAMxx's Tests with CTest","text":"
Before running the tests, generate a baseline file:
cd $RUN_ROOT_DIR\nmake baseline\n
The tests will run, automatically using the baseline file, which is located in the CMake-configurable path ${SCREAM_BASELINES_DIR}. By default, this path is set to an invalid string. If baselines tests are enabled, we check that a valid path has been provided.
To run all of SCREAM's tests, make sure you're in $RUN_ROOT_DIR and type
ctest -VV\n
This runs everything and reports results in an extra-verbose (-VV) manner.
You can also run subsets of the SCREAM tests. For example, to run only the P3 regression tests (again, from the $RUN_ROOT_DIR directory), use
ctest -R p3_regression\n
"},{"location":"developer/standalone_testing/#grouping-tests-with-labels","title":"Grouping Tests with Labels","text":"
We can create groupings of tests by using labels. For example, we have a driver label that runs tests for SCREAM's standalone driver. You can see a list of available labels by typing
ctest --print-labels\n
To see which tests are associated with a given label (e.g. driver), use
ctest -L driver -N\n
"},{"location":"developer/standalone_testing/#eamxx-test-suites","title":"EAMxx Test Suites","text":""},{"location":"developer/standalone_testing/#the-p3_regression-suite","title":"The p3_regression Suite","text":"
p3_regression uses a baseline file to compare any new or altered implementations with our P3 Fortran reference implementation. If you're working on the C++/Kokkos implementation, you can invoke any new tests to the function Baseline::run_and_cmp in ${SCREAM_SRC_DIR}/components/eamxx/p3/tests/p3_run_and_cmp.cpp.
If the reference Fortran implementation changes enough that a new baseline file is required, make sure to let other SCREAM team members know, in order to minimize disruptions.
"},{"location":"developer/style_guide/","title":"SCREAM C++ Style Guide","text":"
Here's our style guide. Let the holy wars begin!
"},{"location":"developer/style_guide/#types","title":"Types","text":""},{"location":"developer/style_guide/#functions-and-methods","title":"Functions and Methods","text":""},{"location":"developer/style_guide/#variables","title":"Variables","text":""},{"location":"technical/","title":"EAMxx Technical Guide","text":"
The goal of this document is to describe the specific equations, parameterizations, and numerical methods used in the current version of EAMxx. Because our master-branch implementation changes every time we make a new commit, this documentation will also evolve continuously. As such, documentation for master should always be considered to be preliminary and under construction. If you want trustworthy documentation, pull it from an official model release.
Currently, EAMxx is only configured for km-scale convection-permitting runs. In order to provide scientifically-credible simulations at lower resolution, parameterizations for the following processes would be needed:
deep convection
gravity-wave drag
energy fixer
The only configuration of EAMxx that is currently implemented is the convection-permitting version, commonly known as the Simple Cloud-Resolving E3SM Atmosphere Model (SCREAM). Processes in EAMxx-SCREAM are:
a non-hydrostatic version of the spectral-element dynamical core used by other E3SM Atmosphere Model versions1 with semi-Lagrangian tracer advection as described by Bradley et al. (2022)2
turbulent mountain stress is crudely parameterized following Fiedler and Panofsky (1072)3 to reduce excessive winds around topography
the Simple Higher-Order Closure (SHOC) parameterization from Bogenschutz and Krueger (2013)[@Bogenschutz_Krueger13], which handles turbulent diffusion, condensation/evaporation, and liquid cloud fraction
an all-or-nothing ice cloud fraction parameterization that sets ice cloud fraction to 100% whenever cloud ice mass qi is less than a user-specified threshold set by default to 1e-5 kg/kg. This scheme also sets the total cloud fraction (used by microphysics) to the maximum of the liquid and ice cloud fraction.
the effects of aerosol are prescribed via the Simple Prescribed Aerosol (SPA) scheme, which is very similar to MACv2-SP4
the P3 microphysics scheme from Morrison and Milbrandt (2015)5 modified as described by Caldwell et al. (2021)6 to assume instantaneous liquid saturation adjustment for consistency with SHOC
RTE/RRTMGP radiation from Pincus et al. (2019)7 rewritten in C++ for consistency and performance
the CFMIP Observation Simulator Package (COSP) is also integrated into EAMxx, but currently only the ISCCP output is enabled
By default processes are called in this order, but which processes to include and in what order is modifiable at run time. After all atmospheric processes are called, output is written. Surface components are then called before the next atmosphere step starts. These processes are described in more detail in Caldwell et al. (2021)6. As in EAM, dynamics operates on a spectral element grid and all other processes use a finite-volume grid that divides each spectral element into 4 quadrilaterals. This physics grid is described in Hannah et al. (2021)8.
Mark A. Taylor, Oksana Guba, Andrew Steyer, Paul A. Ullrich, David M. Hall, and Christopher Eldred. An energy consistent discretization of the nonhydrostatic equations in primitive variables. Journal of Advances in Modeling Earth Systems, 12(1):e2019MS001783, 2020. e2019MS001783 10.1029/2019MS001783. URL: https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2019MS001783, arXiv:https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2019MS001783, doi:https://doi.org/10.1029/2019MS001783.\u00a0\u21a9
A. M. Bradley, P. A. Bosler, and O. Guba. Islet: interpolation semi-lagrangian element-based transport. Geoscientific Model Development, 15(16):6285\u20136310, 2022. URL: https://gmd.copernicus.org/articles/15/6285/2022/, doi:10.5194/gmd-15-6285-2022.\u00a0\u21a9
F. Fiedler and H. A. Panofsky. The geostrophic drag coefficient and the \u2018effective\u2019 roughness length. Quarterly Journal of the Royal Meteorological Society, 98(415):213\u2013220, 1972. URL: https://rmets.onlinelibrary.wiley.com/doi/abs/10.1002/qj.49709841519, arXiv:https://rmets.onlinelibrary.wiley.com/doi/pdf/10.1002/qj.49709841519, doi:https://doi.org/10.1002/qj.49709841519.\u00a0\u21a9
B. Stevens, S. Fiedler, S. Kinne, K. Peters, S. Rast, J. M\u00fcsse, S. J. Smith, and T. Mauritsen. Macv2-sp: a parameterization of anthropogenic aerosol optical properties and an associated twomey effect for use in cmip6. Geoscientific Model Development, 10(1):433\u2013452, 2017. URL: https://gmd.copernicus.org/articles/10/433/2017/, doi:10.5194/gmd-10-433-2017.\u00a0\u21a9
Hugh Morrison and Jason A. Milbrandt. Parameterization of cloud microphysics based on the prediction of bulk ice particle properties. part i: scheme description and idealized tests. Journal of the Atmospheric Sciences, 72(1):287 \u2013 311, 2015. URL: https://journals.ametsoc.org/view/journals/atsc/72/1/jas-d-14-0065.1.xml, doi:10.1175/JAS-D-14-0065.1.\u00a0\u21a9
P. M. Caldwell, C. R. Terai, B. Hillman, N. D. Keen, P. Bogenschutz, W. Lin, H. Beydoun, M. Taylor, L. Bertagna, A. M. Bradley, T. C. Clevenger, A. S. Donahue, C. Eldred, J. Foucar, J.-C. Golaz, O. Guba, R. Jacob, J. Johnson, J. Krishna, W. Liu, K. Pressel, A. G. Salinger, B. Singh, A. Steyer, P. Ullrich, D. Wu, X. Yuan, J. Shpund, H.-Y. Ma, and C. S. Zender. Convection-permitting simulations with the e3sm global atmosphere model. Journal of Advances in Modeling Earth Systems, 13(11):e2021MS002544, 2021. e2021MS002544 2021MS002544. URL: https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2021MS002544, arXiv:https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2021MS002544, doi:https://doi.org/10.1029/2021MS002544.\u00a0\u21a9\u21a9
Robert Pincus, Eli J. Mlawer, and Jennifer S. Delamere. Balancing accuracy, efficiency, and flexibility in radiation calculations for dynamical models. Journal of Advances in Modeling Earth Systems, 11(10):3074\u20133089, 2019. URL: https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2019MS001621, arXiv:https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2019MS001621, doi:https://doi.org/10.1029/2019MS001621.\u00a0\u21a9
Walter M. Hannah, Andrew M. Bradley, Oksana Guba, Qi Tang, Jean-Christophe Golaz, and Jon Wolfe. Separating physics and dynamics grids for improved computational efficiency in spectral element earth system models. Journal of Advances in Modeling Earth Systems, 13(7):e2020MS002419, 2021. e2020MS002419 2020MS002419. URL: https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2020MS002419, arXiv:https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2020MS002419, doi:https://doi.org/10.1029/2020MS002419.\u00a0\u21a9
The goal of the AeroCom algorithm is to calculate properties at cloud top based on the AeroCom recommendation. There are two main parts of the algorithm: probabilistically determining \"cloud top\" and then \"calculating properties\" at said cloud top.
We treat model columns independently, so we loop over all columns in parallel. We then loop over all layers in serial (due to needing an accumulative product), starting at 2 (second highest) layer because the highest is assumed to have no clouds. Let's take a photonic approach from above the model top. Let's say that \\(p_{k}\\) is the probability of a photon passing through the layer \\(k\\). We follow the maximum-random overlap assumption. In all cases, we assume the cloudiness (or cloudy fraction) is completely opaque.
We assume the highest layer has no clouds, thus the \\(p_{k} = 1\\) for the highest layer. Note that \\(p_{k}\\) is initialized as 1 for all layers. We also clip the cloudy fraction \\(C_{i,k}\\) to ensure that \\(C_{i,k} \\in [0+\\epsilon, 1-\\epsilon]\\), where \\(\\epsilon = 0.001\\). Starting at the second highest layer, \\(k+1\\), we check if some \"cloudy\" conditions are met. These conditions are now arbitrarily defined by a cloudiness threshold of \\(\\epsilon\\) (i.e., \\(C_{i,k}>\\epsilon\\)) and a non-zero threshold on the total (both liquid and ice) droplet number concentration (i.e., \\(cQ_{i,k} + iQ_{i,k} > 0\\)). If the conditions are met, we estimate the cloud-top cloud fraction using an accumulative product following the maximum-random overlap assumption.
The thermodynamic phase is used only for cloud properties (e.g., cloud-top cloud droplet number concentration) or cloud content (e.g., cloud liquid content). Further, \\(X_{i,k}\\) is the three-dimensional cloud property of interest which is needed if we are converting a property from three-dimensional (\\(X\\)) to its two-dimensional counterpart (\\(x\\)). \"Other\" properties here include temperature and pressure which are not dependent on the thermodynamic phase.
Most studies in this topic refer a technical report by Tiedtke et al. (1979)1. Another more recent general reference that may be of interest is that of R\u00e4is\u00e4nen et al. (2004)2.
M. Tiedtke, J.-F. Geleyn, A. Hollingsworth, and J.-F. Louis. ECMWF model parameterisation of sub-grid scale processes. Technical Report, ECMWF, Shinfield Park, Reading, January 1979. 10.\u00a0\u21a9
Petri R\u00e4is\u00e4nen, Howard W Barker, Marat F Khairoutdinov, Jiangnan Li, and David A Randall. Stochastic generation of subgrid-scale cloudy columns for large-scale models. Quarterly Journal of the Royal Meteorological Society: A journal of the atmospheric sciences, applied meteorology and physical oceanography, 130(601):2047\u20132067, 2004.\u00a0\u21a9
"},{"location":"user/","title":"SCREAM User Guide","text":"
This section contains documentation on how to create, setup, and run CIME cases with EAMxx as the atmosphere component. It is assumed that the reader has a familiarity with CIME case control system. In particular, we assume that the user knows how to create a case, and what the case.setup, case.build, and case.submit commands do.
This user guide is still under construction. In the meantime, in case you can't find the information you need, you may visit our public confluence EAMxx user guide.
"},{"location":"user/clean_clear_sky/","title":"Clean- and clean-clear-sky diagnostics","text":"
In order to decompose the aerosol effective radiative forcing, additional diagnostic radiation calls are needed. These extra diagnostics are optionally added to the main radiation call. The extra diagnostics are:
Clean-clear-sky fluxes: the fluxes that would be present if there were neither aerosols nor clouds, and are calculated by adding an additional radiation call at the very beginning of the logic before the optics class is endowed with aerosol and cloud properties.
Clean-sky fluxes: the fluxes that would be present if there were no aerosols, and are calculated by adding an additional radiation call after substantiating an additional optics class, but not endowing it with aerosol properties.
"},{"location":"user/clean_clear_sky/#example-setup-current-as-of-april-2024","title":"Example setup (current as of April 2024)","text":"
The extra calls are controlled by runtime flags extra_clnclrsky_diag and extra_clnsky_diag (they take either true or false as their values).
COSP can be run with or without subcolumn sampling. This is configured by changing the cosp_subcolumns namelist variable via atmchange. A value of 1 implies no subcolumn sampling, while values greater than 1 specify the number of subcolumns to use for subcolumn sampling (assuming maximum-random overlap). E.g.,
./atmchange physics::cosp:cosp_subcolumns=1\n
would disable subcolumn sampling, while
./atmchange physics::cosp::cosp_subcolumns=10\n
would use 10 subcolumns for the COSP internal subcolumn sampling using SCOPS/PREC_SCOPS. The default for high resolution cases (e.g., ne1024) should be to not use subcolumns, while lower resolutions (e.g., ne30) should enable subcolumn sampling.
Output streams need to be added manually. A minimal example:
isccp_cldtot (total cloud area from ISCCP simulator)
isccp_ctptau (ISCCP-simulated cloud top pressure/optical depth joint histogram)
modis_ctptau (MODIS-simulated cloud top pressure/optical depth joint histogram)
misr_cthtau (MISR-simulated cloud top height/optical depth joint histogram)
cosp_sunlit (sunlit flag aggregated at COSP frequency for renormalizing daytime averages)
ISCCP, MODIS, and MISR outputs are valid only for daytime/sunlit columns (to be consistent with available satellite retrievals). In order to aggregate only daytime columns in time averages, these outputs are multiplied by the sunlit flag (0 or 1) at each COSP calculation time. Time averages of these quantities are then aggregated, along with the cosp sunlit flag each time COSP is called. In order to back out the daytime-only time averages from the outputs, one needs to divide the output fields by cosp_sunlit. E.g.,
To run the DP configuration of EAMxx (DP-EAMxx) please refer to the official DP resource page. At this location you will find full documentation of case descriptions and access to run scripts. Using these scripts, you should be able to get DP-EAMxx up and running in a matter of minutes on any machine that EAMxx currently runs on (CPU or GPU).
"},{"location":"user/eamxx_cases/","title":"Basics of EAMxx cases","text":"
This section explains how to create a case which uses EAMxx as the atmosphere model, as well as what are the currently supported compsets and grids for EAMxx.
This section explains how input parameters are passed to EAMxx, and how the user can change their value. The full list of the currently configuraable runtime parameters for EAMxx can be found here.
The infrastructure for reading inputs into EAMxx involves a few scripts/files:
atmchange and atmquery: these scripts are located in SRCDIR/components/eamxx/scripts, and are soft-linked in the case folder. As their names suggest, they can be used to query and change the runtime configuration parameter of EAMxx. Since these two scripts are the only scripts that the average user needs to know and interact with, in the next sections we give a brief overview of how they can be used and how their output can be interpreted. Additionally, for both of the scripts a short help can also be obtained using the -h flag.
buildnml: this script, located in SRCDIR/components/eamxx/cime_config, is called by CIME's case management scripts (case.setup, case.build, and case.submit), and is responsible for creating the input files that EAMxx will read to load its runtime parameters. Users should not have to modify this script, nor should they have to manually call it, but it is useful to know what it does. When buildnml runs, it creates a few files, containing EAMxx input parameters:
scream_input.yaml: this YAML file is located in the RUNDIR/data folder, and will be read by EAMxx at runtime to load all of its configuration parameters. More precisely, this file contains parameters that need to be used inside the EAMxx interfaces.
namelist.nl: this namelist file is located in the RUNDIR/data folder, and will be parsed at runtime to get all the parameters for the HOMME dycore (ADD REF). This file only contains dycore-specific parameters that are only recognized inside HOMME, and does not contain any parameter pertaining EAMxx infrastructure.
namelist_scream.xml: this XML file is located in the case directory, and contains all the runtime parameters that EAMxx will read in at runtime. buildnml uses this XML file as an intermediate file during the generation of scream_input.yaml and namelist.nl. More specifically, buildnml generates this file using case information to select the proper configurations from the file namelist_defaults_scream.xml, located in SRCDIR/components/eamxx/cime_config. Despite the fact that the only files that are needed at runtime are scream_input.yaml and namelist.nl, we generate and keep this XML file around to make the implementation of atmquery easier.
Since these files are automatically generated when buildnml runs, users should not manually modify them. Any manual modification will be lost the next time buildnml runs (e.g., at case.submit time).
"},{"location":"user/model_input/#querying-model-inputs-atmquery","title":"Querying model inputs: atmquery","text":"
This script is the simplest way for the user to check the value and properties of EAMxx input parameters. A basic usage of the script is
$ ./atmquery my_param\n
which will retrieve the value of the parameter called my_param, by locating the XML node \"my_param\" in the file namelist_scream.xml in the RUNDIR folder. Obviously, an XML file can have multiple nodes with the same tag, and the script is implemented to error out if multiple matches are found. In such a scenario, the user needs to provide also the parents nodes names, using enough parents to uniquely identify the node (in most cases, one parent is enough). To specify a parent, the user can prepend the parent name and :: to the node name:
$ ./atmquery foo::my_param\n
The output will contain the fully scoped parameter name, along with the value. E.g.,
It is sometimes desirable to query all the nodes that have a particular name, or that contain a particular string. We can do that by using the --grep flag:
TODO: This difference between basic and --grep is not really intuitive: as pointed out in this issue, we should change this. If we do, don't forget to update this following part of the docs. Using the --grep option has another effect: if the match is not a leaf of the XML tree, all its subelements are printed:
Similarly to the CIME utility xmlchange, the options --value, --type, --valid-values, and --full can be used to respectively retrieve just the parameter value (useful for shell scripting), the parameter's type, a list of valid values for parameter (when applicable), or all of the above:
Finally, the option --listall can be used to list the whole content of the XML file, which will be displayed with each node indented in its parent scope:
"},{"location":"user/model_input/#changing-model-inputs-atmchange","title":"Changing model inputs: atmchange","text":"
When buildnml runs, the model inputs are deduced from the case configuration settings (e.g., the grid, the compset, etc.) and the namelist_scream_defaults.xml file, located in the eamxx source tree. The user can change any of these parameters using the atmchange script. A basic usage of the script is
$ ./atmchange my_param=10\n
As for atmquery, if there are multiple matches for a given parameter name, the user must specify a unique scoped name, which allows atmchange to uniquely identify the XML node to modify:
$ ./atmquery homme::number_of_subcycles\n namelist_defaults::atmosphere_processes::homme::number_of_subcycles: 1\n$ ./atmchange number_of_subcycles=10\nERROR: internal_diagnostics_level is ambiguous. Use ANY in the node path to allow multiple matches. Matches:\n namelist_defaults::atmosphere_processes::number_of_subcycles\n namelist_defaults::atmosphere_processes::sc_import::number_of_subcycles\n namelist_defaults::atmosphere_processes::homme::number_of_subcycles\n namelist_defaults::atmosphere_processes::physics::number_of_subcycles\n namelist_defaults::atmosphere_processes::physics::mac_aero_mic::number_of_subcycles\n namelist_defaults::atmosphere_processes::physics::mac_aero_mic::tms::number_of_subcycles\n namelist_defaults::atmosphere_processes::physics::mac_aero_mic::shoc::number_of_subcycles\n namelist_defaults::atmosphere_processes::physics::mac_aero_mic::cldFraction::number_of_subcycles\n namelist_defaults::atmosphere_processes::physics::mac_aero_mic::spa::internal_diagnostics_level\n namelist_defaults::atmosphere_processes::physics::mac_aero_mic::p3::number_of_subcycles\n namelist_defaults::atmosphere_processes::physics::rrtmgp::number_of_subcycles\n namelist_defaults::atmosphere_processes::sc_export::number_of_subcycles\n$ ./atmchange homme::number_of_subcycles=10\nRegenerating /path/to/namelist_scream.xml. Manual edits will be lost.\n$ ./atmquery homme::number_of_subcycles\n namelist_defaults::atmosphere_processes::homme::number_of_subcycles: 10\n
In some cases, the user may be interested in changing all nodes with a given name. In that case, you can use 'ANY' as a node name:
Since the XML file stores constraints on the parameter value (like its type or valid values), attempting to use the wrong type will cause an error:
$ ./atmquery --type se_ne\n namelist_defaults::ctl_nl::se_ne: integer\n$ ./atmchange se_ne=hello\nERROR: Could not refine 'hello' as type 'integer':\n
There are three main types supported: integer, float, string, logical. When passing a string to atmchange, the script will try to interpret it acoording to the parameter type, and throw an error if that's not possible: for \"string\", anything works; for \"integer\", only digits are allowed, possibly with a negative sign in front; for \"float\", only digits are allowed, possibly with a negative sign in front and a decimal point; for \"logical\", only the strings \"true\" and \"false\" are allowed (case insensitive). There are two additional types supported: \"file\" and \"array(T)\", where \"T\" is any of the other supported types (but not another array): - \"file\" is used to inform CIME of the input files that have to be download from E3SM data servers, like initial conditions files, or certain lookup tables. - \"array(T)\" allows to specify a list of items (of the same type), which will be parsed inside EAMxx as a std::vector<T>.
For type \"string\" and \"array(T)\", it is also possible to append to the currently stored value
"},{"location":"user/model_input/#modifying-the-list-of-atmosphere-processes","title":"Modifying the list of atmosphere processes","text":"
The atmchange script can be used to change any of the runtime parameters of EAMxx. In particular, it can be used to add, remove, or reorder atmosphere processes. When adding an atmosphere process, we must first make sure that the defaults for that process are present in namelist_defaults_scream.xml. For instance, the default settings for the \"physics\" atmosphere process group include the following:
where \"mac_aero_mic\" is itself an atmosphere process group, consisting of macrophysics, aerosols, and microphysics processes. If one wanted to add the \"cosp\" atmosphere process to this list, and change the number of its subcycles, it could do so via
Notice that if we swapped the two commands, we would get an error, since the node \"cosp\" is not present in the XML generated from the defaults until we decide to add it.
It is also possible to declare a new (empty) atmosphere process group, which can then be filled with valid atmosphere processes via subsequent calls to atmchange. The syntax to trigger this behavior consists in specifying a process name that begins and ends with an underscore:
This adds a new process to the list of processes in \"physics\", called \"_my_group_\", and which is itself an atmosphere process group. Hence, we can then do
$ ./atmchange _my_group_::atm_procs_list+=A,B\n
where A and B must be valid atmosphere process names (i.e., present in namelist_defaults_scream.xml) or be themselves new atmosphere process groups (i.e., beginning/ending with an underscore)
atmchange can also be used to completely change a list of atmosphere processes:
$ ./atmchange physics::atm_procs_list=A,B,C\n
Notice that we used \"=\" instead of \"+=\", which means we will be overwriting the value, rather than appending. Any atmosphere process that was previously in the list but is no longer in it will be removed from the generated namelist_defaults.xml (and scream_input.yaml) files, along with all their nested parameters.
EAMxx allows the user to configure the desired model output via YAML files, with each YAML file associated to a different output file. In order to add an output stream, one needs to run atmchange output_yaml_files+=/path/to/my/output/yaml (more information on how to use atmchange can be found here). During the buildnml phase of the case management system, a copy of these YAML files will be copied into the RUNDIR/data folder. During this process, the files will be parsed, and any CIME-related variable will be resolved accordingly. Therefore, it is not advised to put the original YAML files in RUNDIR/data, since upon buildnml execution, all the CIME vars will no longer be available in the YAML file, making it harder to tweak it, and even harder to share with other users/cases. Another consequence of this is that the user should not modify the YAML files in RUNDIR/data, since any modification will be lost on the next run of buildnml.
The following is a basic example of an output request.
%YAML 1.1\n---\nfilename_prefix: my_output\nAveraging Type: Average\nMax Snapshots Per File: 10\nFields:\n Physics:\n Field Names:\n - T_mid\n - qv\n Dynamics:\n Field Names:\n - dp3d_dyn\n - omega_dyn\noutput_control:\n Frequency: 6\n frequency_units: nhours\n
Notice that lists can be equivalently specified in YAML as Field Names: [f1, f2, f3]. The user can specify fields to be outputted from any of the grids used in the simulation. In the example above, we requested fields from both the Physics and Dynamics grid. The meaning of the other parameters is as follows:
Averaging Type: how the fields are integrated in time before being saved. Valid options are
Instant: no integration, each time frame saved corresponds to instantaneous values of the fields
Average/Max/Min: the fields undergo the corresponding operation over the time interval specified in the output_control section. In the case above, each snapshot saved to file corresponds to an average of the output fields over 6h windows.
filename_prefix: the prefix of the output file, which will be created in the run directory. The full filename will be $prefix.$avgtype.$frequnits_x$freq.$timestamp.nc, where $timestamp corresponds to the first snapshot saved in the file for Instant output, or the beginning of the first averaging window for the other averaging types
Max Snapshots Per File: specifies how many time snapshots can be put in a file. Once this number is reached, EAMxx will close the file and open a new one.
Frequency: how many units of time are between two consecutive writes to file. For Instant output the fields are \"sampled\" at this frequency, while for other averaging types the fields are \"integrated\" in time over this window
frequency_units: units of the output frequency. Valid options are nsteps (the number of atmosphere time steps), nsecs, nmins, nhours, ndays, nmonths, nyears.
In addition to the fields computed by EAMxx as part of the timestep, the user can request to output derived quantities, which will be computed on the fly by the I/O interface of EAMxx. There are two types of diagnostic outputs:
quantities computed as a function of EAMxx fields. These are simply physical quantities that EAMxx does not keep in persistent storage. As of May 2024, the available derived quantities are (case sensitive):
PotentialTemperature
AtmosphereDensity
Exner
VirtualTemperature
z_int
z_mid
geopotential_int
geopotential_mid
dz
DryStaticEnergy
SeaLevelPressure
LiqWaterPath
IceWaterPath
VapWaterPath
RainWaterPath
RimeWaterPath
ShortwaveCloudForcing
LongwaveCloudForcing
RelativeHumidity
ZonalVapFlux
MeridionalVapFlux
precip_liq_surf_mass_flux
precip_ice_surf_mass_flux
precip_total_surf_mass_flux
surface_upward_latent_heat_flux
wind_speed
AerosolOpticalDepth550nm
NumberPath
AeroComCld
TODO: add some information about what each diagnostic is, perhaps a formula
lower-dimensional slices of a field. These are hyperslices of an existing field or of another diagnostic output. As of August 2023, given a field X, the available options are:
X_at_lev_N: slice the field X at the N-th vertical level index. Recall that in EAMxx N=0 corresponds to the model top.
X_at_model_bot, X_at_model_top: special case for top and bottom of the model.
X_at_Ymb, X_at_YPa, X_at_YhPa: interpolates the field X at a vertical position specified by the give pressure Y. Available units are mb (millibar), Pa, and hPa.
X_at_Ym_above_Z: interpolates the field X at a vertical height of Y meters above Z, with Z=surface or Z=sealevel.
The following options can be used to to save fields on a different grid from the one they are computed on.
horiz_remap_file: a path to a map file (as produced by ncremap) between the grid where the fields are defined and a coarser grid. EAMxx will use this to remap fields on the fly, allowing to reduce the size of the output file. Note: with this feature, the user can only specify fields from a single grid.
vertical_remap_file: similar to the previous option, this map file is used to refine/coarsen fields in the vertical direction.
IOGrid: this parameter can be specified inside one of the grids sections, and will denote the grid (which must exist in the simulation) where the fields must be remapped before being saved to file. This feature is really only used to save fields on the dynamics grid without saving twice the DOFs at the interface of two spectral elements. E.g., for a scalar quantity defined only in the horizontal direction, native output from the Dynamics grid would produce arrays of length nelems*ngp*ngp, where ngp is the number of Gauss points along each axis in the 2d spectral element, and nelems is the number of horizontal elements. However, due to continuity, the values on the Gauss points on the element boundary must match the values on the neighboring element, resulting in duplicated data. By remapping to a \"unique\" version of the dynamics grid (which in EAMxx is referred to as \"Physics GLL\"), we can save roughly 45% of storage. Note: this feature cannot be used along with the horizontal/vertical remap.
It is also possible to request tendencies of fields that are updated by atmosphere processes, on a per-process basis (here, \"updated\" means that the field is both an input as well as an output of the atmosphere process). Since the term \"tendency\" can be used with slightly different connotations, we clarify what we mean by that when it comes to model output: if process P updates field A, by the tendency of A from process P we mean (A_after_P - A_before_P) / dt, where dt is the atmosphere timestep.
As of May 2024, the user needs two things in order to get tendencies from a process. E.g., to get the tendencies of T_mid and horiz_winds from the process shoc, one needs:
The YAML file shown at the top of this section, together with the remap options in the following section, covers most of the options used in a typical run. There are however particular use cases that require some less common options, which we list here (in parentheses, the location in the YAML file and the type of the parameter value).
flush_frequency (toplevel list, integer): this parameter can be used to specify how often the IO library should sync the in-memory data to file. If not specified, the IO library is free to decide when it should flush the data. This option can be helpful for debugging, in case a crash is occurring after a certain number of steps, but before the IO library would automatically flush to file.
Floating Point Precision (toplevel list, string): this parameter specifies the precision to be used for floating point variables in the output file. By default, EAMxx uses single precision. Valid values are single, float, double, and real. The first two are synonyms, while the latter resolves to single or double depending on EAMxx cmake configuration parameter SCREAM_DOUBLE_PRECISION.
file_max_storage_type (toplevel list, string): this parameter determines how the capacity of the file is specified. By default, it is set to num_snapshots, which makes EAMxx read Max Snapshots Per File (explained in the first section). However, the user can specify one_year or one_month, which will make EAMxx create one output file per year/month of simulation, fitting however many snapshots are needed in each file (depending on the output frequency). If one_year or one_month are used, the option Max Snapshots Per File is ignored.
MPI Ranks in Filename (toplevel list, boolean): this option specifies whether the number of MPI ranks in the atm communicator should be put inside the output file name. By default, this is false, since it is usually not important. This option is mostly important for standalone unit testing, where several versions of the same test (corresponding to different numbers of MPI ranks) are running concurrently, so that different file names are needed to avoid resource contention.
save_grid_data (output_control sublist, boolean): this option allows to specify whether grid data (such as lat/lon) should be added to the output stream. By default, it is true.
iotype (toplevel list, string): this option allows the user to request a particular format for the output file. The possible values are default, netcdf, pnetcdf,adios,hdf5, wheredefault` means \"whatever is the PIO type from the case settings\".
skip_t0_output (output_control sublist, boolean): this option is relevant only for Instant output, where fields are also outputed at the case start time (i.e., after initialization but before the beginning of the first timestep). By default it is set to false.
restart options: when performing a restart, EAMxx attempts to restart every output stream listed in the output_yaml_files atm option (which can be queried via atmquery output_yaml_files). The user can specify a few options, in order to tweak the restart behavior:
Perform Restart (Restart sublist, boolean): this parameter is true by default, but can be set to false to force the model to ignore any history restart files, and start the output stream from scratch, as if this was an initial run.
filename_prefix (Restart sublist, string): by default, this parameter is set to match the value of filename_prefix from the toplevel list. It can be set to something else in case we want to restart a previous simulation that was using a different filename prefix.
force_new_file (Restart sublist, boolean): this parameter allows to start a fresh new output file upon restarts. By default, is is set to false, so that EAMxx will attempt to resume filling the last produced output file (if any, and if it can accommodate more snapshots).
"},{"location":"user/nudging/","title":"Nudging in EAMxx","text":"
Nudging is supported in EAMxx. Currently, it is possible to nudge EAMxx to the output from a different EAMxx run or to reanalysis. Nudging data can be on your model grid or an arbitrary coarser grid. Inline interpolating of finer-grid nudging data to a coarser model resolution isn't implemented yet but may be in the future.
"},{"location":"user/nudging/#data-to-nudge-towards","title":"Data to nudge towards","text":"
The user is expected to prepapre (and then use atmchange to point to) nudging data files that are compliant with EAMxx specification. In practice, this means that the data files must contain variable names known to EAMxx (only U, V, T_mid, and qv are supported now). The files can be specified with an explicit list or via pattern matching. The files must contain an arbitary global attribute case_t0, and it is recommended to be the same as the time dimension unit (the files must be time-dimensioned). Finally, the dimension order must be such that lev is the last dimension, so most likely, the user must transpose the dimensions.
"},{"location":"user/nudging/#pressure-in-the-nudging-data","title":"Pressure in the nudging data","text":"
Pressure can be explicitly provided in the nudging data as time-varying p_mid corresponding to the option TIME_DEPENDENT_3D_PROFILE for source_pressure_type. Alternatively, the data can contain a time-invariant pressure variable p_lev corresponding to the option TIME_DEPENDENT_3D_PROFILE for source_pressure_type.
"},{"location":"user/nudging/#weighted-nudging-for-rrm-applications","title":"Weighted nudging for RRM applications","text":"
In regionally refined model applications, it is possible to use weighted nudging, for example, to avoid nudging the refined region. To achieve that, the user can use atmchange to set use_nudging_weights (boolean) and provide nudging_weights_file that has the weight to apply for nudging (for example, zeros in the refined region). Currently, weighted nudging is only supported if the user provides the nudging data at the target grid.
"},{"location":"user/nudging/#example-setup-current-as-of-april-2024","title":"Example setup (current as of April 2024)","text":"
To enable nudging as a process, one must declare it in the atm_procs_list runtime parameter.
The following options are needed to specify the nudging.
./atmchange nudging::nudging_filenames_patterns=\"/pathto/nudging_files/*.nc\" # can provide file name explicitly here instead (or multiple patterns)\n./atmchange nudging::source_pressure_type=TIME_DEPENDENT_3D_PROFILE # see section on pressure\n./atmchange nudging::nudging_fields=U,V # can include qv, T_mid as well\n./atmchange nudging::nudging_timescale=21600 # in seconds\n
To gain a deeper understanding of these parameters and options, please refer to code implementation of the nudging process.
"},{"location":"user/rrm_eamxx/","title":"Running EAMxx with a Regionally Refined Mesh (RRM)","text":"
Running EAMxx with a RRM allows you run a select region of the globe at high resolution (i.e. 3 km) with the remainder of the globe at a lower resolution (i.e. 25 or 100 km). This document will point you to the steps required and resources available to assist in developing and running a new RRM.
"},{"location":"user/rrm_eamxx/#choose-your-rrm","title":"Choose Your RRM","text":"
What region of the globe do you want to refine? Your first step should be to check library of RRM grids/cases that have already been developed to potentially avoid duplicate work. If you found a RRM that suits your needs, you can skip the next step (\"Generate Your RRM\").
"},{"location":"user/rrm_eamxx/#generate-your-rrm","title":"Generate Your RRM","text":"
Please refer to the offical E3SM guide for developing new atmosphere grids, which provides detailed guidance for developing your RRM.
After you have made all the necessary files for your RRM, you will need to configure your code branch so that it knows about your new grid. The steps required to do this are documented at the top of the library of RRM grids/cases page.
"},{"location":"user/rrm_eamxx/#make-your-initial-condition-file","title":"Make Your Initial Condition File","text":"
The easiest way to generate an initial condition is to use the HICCUP tool, which is a set of flexible and robust python routines to streamline the task of generating a new atmospheric initial condition for E3SM. Otherwise, please see the step-by-step instuctions if you prefer to manually generate your initial condition.
"},{"location":"user/rrm_eamxx/#assemble-nudging-data-optional","title":"Assemble Nudging Data (Optional)","text":"
If you wish to nudge your simulation, assemble your nudging data in the format required by EAMxx. Please refer to the nudging documentation.
In the event that you only want to nudge a portion of your domain, then you will need to generate a nudging weights file. A common use case for this is when you want the high-resolution region to remain free-running (unnudged) while nudging the coarse domain towards reanalysis or model data. Please use this script as an example of how to generate your nudging weights file.
"},{"location":"user/rrm_eamxx/#run-your-rrm","title":"Run your RRM","text":"
Congratulations, you are now ready to run your EAMxx RRM. If you are running your RRM in free running mode (not using any nudging) then you simply need to modify an existing EAMxx script and change the resolution to match the one you created for your RRM.
If you are using nudging, then please see this example script of how to run a nudged EAMxx RRM run. This example script uses the California 3-km RRM, which is on the master branch.
To run the DP configuration of EAMxx (DP-EAMxx) please refer to the official DP resource page. At this location you will find full documentation of case descriptions and access to run scripts. Using these scripts, you should be able to get DP-EAMxx up and running in a matter of minutes on any machine that EAMxx currently runs on (CPU or GPU).
Running EAMxx with a Regionally Refined Mesh (RRM)
+
Running EAMxx with a RRM allows you run a select region of the globe at high resolution (i.e. 3 km) with the remainder of the globe at a lower resolution (i.e. 25 or 100 km). This document will point you to the steps required and resources available to assist in developing and running a new RRM.
+
Choose Your RRM
+
What region of the globe do you want to refine? Your first step should be to check library of RRM grids/cases that have already been developed to potentially avoid duplicate work. If you found a RRM that suits your needs, you can skip the next step ("Generate Your RRM").
After you have made all the necessary files for your RRM, you will need to configure your code branch so that it knows about your new grid. The steps required to do this are documented at the top of the library of RRM grids/cases page.
+
Make Your Initial Condition File
+
The easiest way to generate an initial condition is to use the HICCUP tool, which is a set of flexible and robust python routines to streamline the task of generating a new atmospheric initial condition for E3SM. Otherwise, please see the step-by-step instuctions if you prefer to manually generate your initial condition.
+
Assemble Nudging Data (Optional)
+
If you wish to nudge your simulation, assemble your nudging data in the format required by EAMxx. Please refer to the nudging documentation.
+
In the event that you only want to nudge a portion of your domain, then you will need to generate a nudging weights file. A common use case for this is when you want the high-resolution region to remain free-running (unnudged) while nudging the coarse domain towards reanalysis or model data. Please use this script as an example of how to generate your nudging weights file.
+
Run your RRM
+
Congratulations, you are now ready to run your EAMxx RRM. If you are running your RRM in free running mode (not using any nudging) then you simply need to modify an existing EAMxx script and change the resolution to match the one you created for your RRM.