Gridded NetCDF initial conditions gridded_netcdf/std

Gridded NetCDF initial conditions gridded_netcdf/std#

Description#

Reads initial conditions from a 3D (level x latitude x longitude) gridded NetCDF file

See domain plugin Gridded NetCDF for information required coordinates format in the NetCDF file.

YAML arguments#

The following arguments are used to configure the plugin. pyCIF will return an exception at the initialization if mandatory arguments are not specified, or if any argument does not fit accepted values or type:

Optional arguments#

dir : str, optional, default “”

Path to the corresponding component. This value is used if not provided in parameters

file : str, optional, default “”

File format in the given directory. This value is used if not provided in parameters

varname : str, optional, default “”

Variable name to use to read data filesinstead of the parameter name if different to the parameter name

file_freq : str, optional, default “”

Temporal frequency to fetch files

split_freq : str, optional

Force splitting the processing at a given frequency different to file_freq

dir_vcoord : str, optional, default “”

Directory containing file_vcoord. Use this argument if the vertical coordinates are not in file

file_vcoord : str, optional

NetCDF file containing the vertical coordinates. Use this argument if the vertical coordinates are not in file

vertical_coord : “mids” or “bounds”, optional

Read the domain’s vertical levels if this parameter is used. Should be ‘mids’ if the vertical coordinate represents the levels mid-points or ‘bounds’ if the vertical coordinate represents the levels boundaries. If this parameter is not used a domain single vertical level is created

  • “mids”: levels mid-points

  • “bounds”: levels boundaries

vertical_dim_name : str, optional, default “lev”

Vertical dimension name in file or file_vcoord

sigma_a_var_name : str, optional, default “ap”

‘sigma a’ variable name in file or file_vcoord

sigma_b_var_name : str, optional, default “bp”

‘sigma b’ variable name in file or file_vcoord

pressure_unit : “Pa” or “hPa”, optional

pressure units if different from units attributes in sigma `a` variable, should be ``'Pa' or 'hPa'

latitude_varname : str, optional, default “latitude”

Latitude coordinate variable name in file. If this argument is not provided, the latitude coordinate is found by its standard_name or long_name attribute (which should be 'latitude').

longitude_varname : str, optional, default “longitude”

Longitude coordinate variable name in file. If this argument is not provided, the longitude coordinate is found by its standard_name or long_name attribute (which should be 'longitude').

latitude_dimname : str, optional, default “latitude”

Latitude dimension name in file.

longitude_dimname : str, optional, default “longitude”

Longitude dimension name in file.

use_corners : bool, optional, default False

True if the longitudes and latitudes are used to defined the corners instead of gridcell centers

extend_lat : bool, optional, default False

Extend corner latitudes by one cell if nlat_corner != nlat + 1

extend_lon : bool, optional, default False

Extend corner longitudes by one cell if nlon_corner != nlon + 1

lat_min : float, optional, default -90.0

Minimum latitude

lat_max : float, optional, default 90.0

Maximum latitude

delta_lat : float, optional

Skip the reading/computation of latitude bounds and use regular gridcells with a size of delta_lat. delta_lat should divide lat_max - lat_min and be coherent with the NetCDF file dimensions.

lon_min : float, optional, default -180.0

Minimum longitude

lon_max : float, optional, default 180.0

Maximum longitude

delta_lon : float, optional

Skip the reading/computation of longitude bounds and use regular gridcells with a size of delta_lon. delta_lon should divide lon_max - lon_min and be coherent with the NetCDF file dimensions.

regular_lon : bool, optional, default True

Overwrites the default behaviour of regular domain in zonal direction to compute corners. In this case, use the first and last delta to extent East and West

regular_lat : bool, optional, default True

Overwrites the default behaviour of regular domain in meridional direction to compute corners. In this case, use the first and last delta to extent South and North

sort_lat : bool, optional, default True

Sort latitudes in ascending order

sort_lon : bool, optional, default True

Sort longitudes in ascending order

drop_variables : list, optional, default []

List of variables to drop when reading the NetCDF files. This allows issues of MissingDimensionErrors as documented in, e.g., https://stackoverflow.com/questions/55109481/how-to-import-netcdf4-file-with-xarray-when-index-names-have-multiple-dimensions

YAML template#

Please find below a template for a YAML configuration:

 1field:
 2  plugin:
 3    name: gridded_netcdf
 4    version: std
 5    type: field
 6
 7    # Optional arguments
 8    dir: XXXXX  # str
 9    file: XXXXX  # str
10    varname: XXXXX  # str
11    file_freq: XXXXX  # str
12    split_freq: XXXXX  # str
13    dir_vcoord: XXXXX  # str
14    file_vcoord: XXXXX  # str
15    vertical_coord: XXXXX  # mids|bounds
16    vertical_dim_name: XXXXX  # str
17    sigma_a_var_name: XXXXX  # str
18    sigma_b_var_name: XXXXX  # str
19    pressure_unit: XXXXX  # Pa|hPa
20    latitude_varname: XXXXX  # str
21    longitude_varname: XXXXX  # str
22    latitude_dimname: XXXXX  # str
23    longitude_dimname: XXXXX  # str
24    use_corners: XXXXX  # bool
25    extend_lat: XXXXX  # bool
26    extend_lon: XXXXX  # bool
27    lat_min: XXXXX  # float
28    lat_max: XXXXX  # float
29    delta_lat: XXXXX  # float
30    lon_min: XXXXX  # float
31    lon_max: XXXXX  # float
32    delta_lon: XXXXX  # float
33    regular_lon: XXXXX  # bool
34    regular_lat: XXXXX  # bool
35    sort_lat: XXXXX  # bool
36    sort_lon: XXXXX  # bool
37    drop_variables: XXXXX  # list