Gridded NetCDF domain (gridded_netcdf / std)

Description

Reads domain from a gridded NetCDF file

This plugin read the ‘latitude x longitude’ or ‘level x latitude x longitude’ domain from NetCDF files coordinates.

The latitude and longitude coordinate are found by their standard_name or long_name attribute (which should be 'latitude' or 'longitude'), or by their variable name (which should be 'lat', 'lon', 'latitude' or 'longitude').

If the latitude or longitude variable has a bounds attribute, the cell bounds are read from the variable given by this bounds attribute (which should be shaped as (n, 2)). Otherwise the bounds are computed with the max/min arguments and the lat/lon coordinates (assuming they represents the cells centers of a regular grid).

Vertical levels information (sigma pressure) is read only if the argument vertical_coord is provided. Vertical levels information can reside in a separate 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:

Mandatory arguments

file: (mandatory)

NetCDF file containing the grid coordinates

accepted type: <class ‘str’>

Optional arguments

dir: (optional):

Directory containing file

accepted type: <class ‘str’>

dir_vcoord: (optional):

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

accepted type: <class ‘str’>

file_vcoord: (optional):

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

accepted type: <class ‘str’>

vertical_coord: (optional):

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

accepted values:

  • mids: TEXT

  • bounds: TEXT

vertical_coord_name: (optional): lev

Vertical coordinate name in file or file_vcoord

accepted type: <class ‘str’>

sigma_a_var_name: (optional): ap

‘sigma a’ variable name in file or file_vcoord

accepted type: <class ‘str’>

sigma_b_var_name: (optional): bp

‘sigma b’ variable name in file or file_vcoord

accepted type: <class ‘str’>

pressure_unit: (optional):

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

accepted values: [‘Pa’, ‘hPa’]

lat_min: (optional): -90.0

Minimum latitude

accepted type: <class ‘float’>

lat_max: (optional): 90.0

Maximum latitude

accepted type: <class ‘float’>

lon_min: (optional): -180.0

Minimum longitude

accepted type: <class ‘float’>

lon_max: (optional): 180.0

Maximum longitude

accepted type: <class ‘float’>

longitude_varname: (optional)

Name of the longitude variable

accepted type: <class ‘str’>

latitude_varname: (optional)

Name of the latitude variable

accepted type: <class ‘str’>

longitude_coordname: (optional)

Name of the longitude coordinate

accepted type: <class ‘str’>

latitude_coordname: (optional)

Name of the latitude coordinate

accepted type: <class ‘str’>

use_corners: (optional): False

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

accepted type: <class ‘str’>

extend_lon: (optional): False

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

accepted type: <class ‘str’>

extend_lat: (optional): False

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

accepted type: <class ‘str’>

Yaml template

Please find below a template for a Yaml configuration:

 1domain:
 2  plugin:
 3    name: gridded_netcdf
 4    version: std
 5    type: domain
 6
 7  # Mandatory arguments
 8  file: XXXXX
 9
10  # Optional arguments
11  dir: XXXXX
12  dir_vcoord: XXXXX
13  file_vcoord: XXXXX
14  vertical_coord: XXXXX
15  vertical_coord_name: XXXXX
16  sigma_a_var_name: XXXXX
17  sigma_b_var_name: XXXXX
18  pressure_unit: XXXXX
19  lat_min: XXXXX
20  lat_max: XXXXX
21  lon_min: XXXXX
22  lon_max: XXXXX
23  longitude_varname: XXXXX
24  latitude_varname: XXXXX
25  longitude_coordname: XXXXX
26  latitude_coordname: XXXXX
27  use_corners: XXXXX
28  extend_lon: XXXXX
29  extend_lat: XXXXX