User Tools

Site Tools


start:hype_netcdf_standard

HYPE netCDF Standard

Standard for netCDF files used by HYPE and produced by HYPE.

Dimensions

Order of the dimensions should be: time → space

The time dimension is the only one that should be unlimited and should be named “time”.

Dimensions cannot store its own data. Time for example, need its own data variable (also named “time”) as we need to know which time each timestep represent.

Variables

All files have the variables time and id. The variables thus have the same name as the dimensions.

The variable “id” store ids that define space. It can be subbasins or other areas, e.g. subid, obsid or outregid. Id does not have be sorted in any special order.

One data variable (such as cout) per file.

The data variable uses _FillValue, which is a necessary attribute, for missing values. For HYPE result files _FillValue = -9999.f and missing_value = -9999.f are both set. For forcing data _FillValue = 1.e+20f can be used (or other value). For observation files _FillValue is checked for during indata tests.

A data variable can have the attribute units. For files written by HYPE the data variable in addition have the attribute long_name.

The time variable should have correct attributes calendar, units and axis. Calendar and axis is optional for input data. Example:

time:units = "days since 1971-01-01" ;

time:calendar = "standard" ;

time:axis = "T" ;

HYPE runs on the gregorian calendar, which means the time attributes “proleptic_gregorian”, “gregorian” and “standard” are ok to use, and “standard” is assumed if attribute is missing in input file.

The space variable “id” can have attributes short_name and long_name.

Additional variables may be introduced, e.g coordinates and elevation. This is not standardized yet, but subbasin coordinates could be stored as variables “geo_x” and “geo_y” with attributes:

units = according to CF standard (like "degree_north")
long_name (e.g "subbasin outlet latitude (WGS84)")

Elevations could be stored as variable “geo_z” with attibutes:

units = "m"
long_name (e.g "sub-basin mean elevation (m above sea level)")

Metadata

HYPE includes these global metadata attributes in output files:

title (e.g "Timeseries of comp outflow subbasi in m3/s")

hype_version (e.g "5.21.0")

frequency (meanperiod of output e.g "day", "month")

Filestructure

HYPE uses NETCDF4, compression level 5 for output files.

Description of HYPE netcdf files and how to use them is found among the other HYPE files on the wiki. Forcing data have filenames in the form NNobs.nc, other observations NNNNobs.nc or NNNNobs_cgname.nc, while netCDF output files are called timeXXXX.nc, where NNNN or XXXX defines the variable.

start/hype_netcdf_standard.txt · Last modified: 2024/02/15 09:58 by cpers