EarthSciData.DataArrayType

An array of data.

  • data: The data.

  • units: Physical units of the data, e.g. m s⁻¹.

  • description: Description of the data.

  • dimnames: Dimensions of the data, e.g. (lat, lon, layer).

EarthSciData.DataFrequencyInfoType

Information about the temporal frequency of archived data.

  • start: Beginning of time of the time series.

  • frequency: Interval between each record.

  • centerpoints: Time representing the temporal center of each record.

EarthSciData.DataSetInterpolatorType

DataSetInterpolators are used to interpolate data from a FileSet to represent a given time and location. Data is loaded (and downloaded) lazily, so the first time you use it on a for a given dataset and time period it may take a while to load. Each time step is downloaded and loaded as it is needed during the simulation and cached on the hard drive at the path specified by the \$EARTHSCIDATADIR environment variable, or in a scratch directory if that environment variable has not been specified. The interpolator will also cache data in memory representing the data records for the times immediately before and after the current time step.

varname is the name of the variable to interpolate. default_time is the time to use when initializing the interpolator.

EarthSciData.FileSetType

An interface for types describing a dataset, potentially comprised of multiple files.

To satisfy this interface, a type must implement the following methods:

  • relpath(fs::FileSet, t::DateTime)
  • url(fs::FileSet, t::DateTime)
  • localpath(fs::GEOSFPFileSet, t::DateTime)
  • DataFrequencyInfo(fs::GEOSFPFileSet, t::DateTime)::DataFrequencyInfo
  • loadslice(fs::GEOSFPFileSet, t::DateTime, varname)::DataArray
  • load_interpolator(fs::FileSet, t::DateTime, varname)
  • varnames(fs::FileSet, t::DateTime)
EarthSciData.GEOSFPType

A data loader for GEOS-FP data as archived for use with GEOS-Chem classic.

Domain options (as of 2022-01-30):

  • 4x5
  • 0.125x0.15625_AS
  • 0.125x0.15625_EU
  • 0.125x0.15625_NA
  • 0.25x0.3125
  • 0.25x0.3125_AF
  • 0.25x0.3125_AS
  • 0.25x0.3125_CH
  • 0.25x0.3125_EU
  • 0.25x0.3125_ME
  • 0.25x0.3125_NA
  • 0.25x0.3125_OC
  • 0.25x0.3125_RU
  • 0.25x0.3125_SA
  • 0.5x0.625
  • 0.5x0.625_AS
  • 0.5x0.625_CH
  • 0.5x0.625_EU
  • 0.5x0.15625_NA
  • 2x2.5
  • 4x5
  • C180
  • C720
  • NATIVE
  • c720

coord_defaults can be used to provide default values for the coordinates of the domain. For example if we want to perform a 2D simulation with a vertical dimension, we can set coord_defaults = Dict(:lev => 1).

See http://geoschemdata.wustl.edu/ExtData/ for current options.

EarthSciData.GEOSFPFileSetType

GEOS-FP data as archived for use with GEOS-Chem classic.

Domain options (as of 2022-01-30):

  • 4x5
  • 0.125x0.15625_AS
  • 0.125x0.15625_EU
  • 0.125x0.15625_NA
  • 0.25x0.3125
  • 0.25x0.3125_AF
  • 0.25x0.3125_AS
  • 0.25x0.3125_CH
  • 0.25x0.3125_EU
  • 0.25x0.3125_ME
  • 0.25x0.3125_NA
  • 0.25x0.3125_OC
  • 0.25x0.3125_RU
  • 0.25x0.3125_SA
  • 0.5x0.625
  • 0.5x0.625_AS
  • 0.5x0.625_CH
  • 0.5x0.625_EU
  • 0.5x0.15625_NA
  • 2x2.5
  • 4x5
  • C180
  • C720
  • NATIVE
  • c720

Possible filetypes are:

  • :A1
  • :A3cld
  • :A3dyn
  • :A3mstC
  • :A3mstE
  • :I3

See http://geoschemdata.wustl.edu/ExtData/ for current options.

EarthSciData.ITPTransGroundLevelType

Create an interpolator that returns zero whenever z > 1, and otherwise first peforms a coordinate transformation before interpolating the data.

EarthSciData.NEI2016MonthlyEmisType

A data loader for CMAQ-formatted monthly US National Emissions Inventory data for year 2016, available from: https://gaftp.epa.gov/Air/emismod/2016/v1/gridded/monthly_netCDF/. The emissions here are monthly averages, so there is no information about diurnal variation etc.

spatial_ref should be the spatial reference system that the simulation will be using. x, Δx, y, and Δy should be the coordinate variables and grid spacing values for the simulation that is going to be run, corresponding to the given x and y values of the given spatial_ref, and the lev represents the variable for the vertical grid level. Δx and Δy must be in units of meters, and x and y must be in the same units as spatial_ref.

NOTE: This is an interpolator that returns the emissions value of the nearest grid cell center for the underlying emissions grid, so it may not exactly conserve the total emissions mass, especially if the simulation grid is coarser than the emissions grid.

Example

using EarthSciData, ModelingToolkit, Unitful
@parameters t lat lon lev
@parameters Δz = 60 [unit=u"m"]
emis = NEI2016MonthlyEmis{Float32}("mrggrid_withbeis_withrwc", t, lon, lat, lev, Δz)
EarthSciData.create_interp_equationFunction
create_interp_equation(
    itp,
    filename,
    t,
    sample_time,
    coords
)
create_interp_equation(
    itp,
    filename,
    t,
    sample_time,
    coords,
    scale
)

Create an equation that interpolates the given dataset at the given time and location. filename is an identifier for the dataset, and t is the time variable. The RHS of each equation will be multiplied by the optional scale.

EarthSciData.descriptionMethod
description(itp, t)

Return the description of the data associated with this interpolator.

EarthSciData.dimnamesMethod
dimnames(itp, t)

Return the dimension names associated with this interpolator.

EarthSciData.interp!Method
interp!(itp, t, locs)

Return the value of the given variable from the given dataset at the given time and location.

EarthSciData.load_interpolator!Method
load_interpolator!(cache, fs, t, varname)

Load the data for the given DateTime and variable name as an interpolator from Interpolations.jl.

EarthSciData.load_interpolator!Method
load_interpolator!(cache, fs, t, varname; spatial_ref)

Load the data for the given DateTime and variable name as an interpolator from Interpolations.jl. spatial_ref should be the spatial reference system that the simulation will be using.

EarthSciData.loadslice!Method
loadslice!(data, fs, t, varname)

Load the data for the given variable name at the given time.

EarthSciData.loadslice!Method
loadslice!(data, fs, t, varname)

Load the data for the given variable name at the given time.

EarthSciData.prune!Method
prune!(pde_sys, prefix)

Remove equations from a PDESystem where a variable in the LHS contains the given prefix but none of the equations have an RHS containing that variable. This can be used to remove data loading equations that are not used in the final model.

EarthSciData.relpathMethod
relpath(fs, t)

File path on the server relative to the host root; also path on local disk relative to ENV["EARTHSCIDATADIR"] (or a scratch directory if that environment variable is not set).

EarthSciData.relpathMethod
relpath(fs, t)

File path on the server relative to the host root; also path on local disk relative to ENV["EARTHSCIDATADIR"].

EarthSciData.unitsMethod
units(itp, t)

Return the units of the data associated with this interpolator.

EarthSciData.urlMethod
url(fs, t)

Return the URL for the file for the given DateTime.