ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_WRFSurfaceFields.H File Reference
#include <array>
#include <iosfwd>
#include <limits>
#include <memory>
#include <string>
#include <AMReX_BoxArray.H>
#include <AMReX_DistributionMapping.H>
#include <AMReX_FArrayBox.H>
#include <AMReX_MultiFab.H>
#include <AMReX_Periodicity.H>
#include <AMReX_Vector.H>
Include dependency graph for ERF_WRFSurfaceFields.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  WRFSurfaceFields
 
struct  WRFSurfaceFields::Descriptor
 
struct  WRFSurfaceFields::HeaderLevel
 
struct  WRFSurfaceFields::Pending
 

Detailed Description

Land and soil fields of a wrfinput file that no land model takes: leaf area, vegetation fraction, deep soil temperature, roughness, albedo, background albedo, sea ice, snow, and the soil temperature and moisture profiles with the depths of their layers.

ERF::init_from_wrfinput fills this holder when the two-stream force-restore balance (erf.radiation.seb_prognostic_enable) runs without a land model. Every field is optional: a file without it leaves get() null. The holder keeps the values as the file gives them, in the file's units; it applies no physics.

A field that holds a value outside its catalog range, or one that is not finite, or that the level's files do not cover, is reported and not held: get() is null, as for a field the file does not have. The code that takes a field decides whether its absence stops the run.

The data are those of the initial time. They are written to the checkpoint and read back on a restart. A regrid carries them onto the new grids: a column the old grids of the level held keeps its values, and any other column takes those of the column of the coarser level it lies in (piecewise constant, so a flag stays a flag, a soil profile stays the profile of one column, and no value leaves the catalog range). A level without a file of its own (made by tagging, at the start or by a regrid) takes every field of the coarser level in the same way.

The class has no NetCDF dependency: fill() takes the region a rank has read as an FArrayBox, so the unit tests can drive it without a file.