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 - fileor- file_vcoord
- vertical_dim_type : “sigma_pressure” or “heights”, optional, default “sigma_pressure”
- Vertical dimension type 
- “sigma_pressure”: Levels defined with ap/bp sigma pressure coordinates, with - p = psurf * bp + ap
- “heights”: Levels in meters above ground 
- sigma_a_var_name : str, optional, default “ap”
- ‘sigma a’ variable name in - fileor- file_vcoord
- sigma_b_var_name : str, optional, default “bp”
- ‘sigma b’ variable name in - fileor- file_vcoord
- pressure_unit : “Pa” or “hPa”, optional
- pressure units if different from - unitsattributes in- sigma `a` variable, should be ``'Pa'or- 'hPa'
- reverse_vcoord : bool, optional, default False
- reverse the vertical coordinate or not 
- 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_nameor- long_nameattribute (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_nameor- long_nameattribute (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_latshould divide- lat_max - lat_minand 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_lonshould divide- lon_max - lon_minand 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 
- force_centered_lat : bool, optional, default False
- Force grid cells latitude to be centered between thier corners. Grid cells centers and corners will be read normally then the grid cells centers latitudes will be adjusted. 
- force_centered_lon : bool, optional, default False
- Force grid cells longitude to be centered between thier corners. Grid cells centers and corners will be read normally then the grid cells centers longitudes will be adjusted. 
- 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  vertical_dim_type: XXXXX  # sigma_pressure|heights
18  sigma_a_var_name: XXXXX  # str
19  sigma_b_var_name: XXXXX  # str
20  pressure_unit: XXXXX  # Pa|hPa
21  reverse_vcoord: XXXXX  # bool
22  latitude_varname: XXXXX  # str
23  longitude_varname: XXXXX  # str
24  latitude_dimname: XXXXX  # str
25  longitude_dimname: XXXXX  # str
26  use_corners: XXXXX  # bool
27  extend_lat: XXXXX  # bool
28  extend_lon: XXXXX  # bool
29  lat_min: XXXXX  # float
30  lat_max: XXXXX  # float
31  delta_lat: XXXXX  # float
32  lon_min: XXXXX  # float
33  lon_max: XXXXX  # float
34  delta_lon: XXXXX  # float
35  regular_lon: XXXXX  # bool
36  regular_lat: XXXXX  # bool
37  force_centered_lat: XXXXX  # bool
38  force_centered_lon: XXXXX  # bool
39  sort_lat: XXXXX  # bool
40  sort_lon: XXXXX  # bool
41  drop_variables: XXXXX  # list
