-
Notifications
You must be signed in to change notification settings - Fork 11
NetCDF
The output fields from the model can be written to NetCDF with the following config:
outputs:
- netcdf:
filename_pattern: %Y%m%dT%hZ.nc
variables: [2t, t_500]
extra_variables: [ws]
accumulated_variables: [tp]A filename will be constructed by expanding time tokens in filename_pattern, and one will be produced for each forecast initialization time.
If variables are provided, a subset of the full variable list will be produced. If this is not provided, all variables will be produced.
extra_variables is a list of variables to derive. Currently "ws" is the only variable supported, which computes wind speed from 10u and 10v. If this is not provided, no variables are derived.
accumulated_variables is a list of variables to accumulate across lead times. Accumulated variable names will default to anemoi_name + "_acc".
If the domain that is being written is one on a rectangular domain (i.e. the anemoi dataset has a field shape), then a gridded NetCDF file (with x and y dimensions) will automatically be produced. Otherwise (e.g. an octahedral grid), a field with a single location dimension will be produced.
For rectangular domains a chosen projection can be specified through a proj4 string, using the proj4_str key:
outputs:
- netcdf:
...
proj4_str: "+proj=lcc +lat_0=63.3 +lon_0=15 +lat_1=63.3 +lat_2=63.3 +x_0=0 +y_0=0 +R=6371000 +units=m +no_defs +type=crs"A list of pre-defined projections can alternatively be used by setting domain_name: name. The current supported domains are meps, arome_arctic, nordkyst_v3, nordic_analysis.
See more examples in Configuration-file
Predictions can be interpolated to a regular lat-lon grid using the interp_res key:
outputs:
- netcdf:
...
interp_res: 0.25The output grid resolution is given in degrees, so the above example uses 0.25 degrees which gives roughly 25km grid spacing at equator.
By default, compression is not used when writing NetCDF output files. To enable deflate level 4, add "compression: True"
Copyright © 2024-2025 MET Norway