Skip to content
Thomas Nipen edited this page Jan 23, 2019 · 8 revisions

Basic requirements

Gridpp supports NetCDF files and handles 4 dimensions: x, y, time, and ensemble_member. The files do not need to have all 4 dimensions. The files can have additional dimensions, but these will be ignored. The dimension names are auto-detected, but can all be specified using options.

In addition, the files must contain variables that specify the latitude and longitude of all grid points. These variables can be 1D vectors for data on regular lat/lon grids. Otherwise they must be 2D.

Some methods use elevation and/or land-area-fraction information. To use these methods, both input and output files must contain these fields.

If the file already contains forecast data for a particular variable, then gridpp will overwrite this if this variable is processed. If the variable does not exist, it will be created.

Specifying dimension names

Dimensions are auto-detected by checking for commonly used names. However, they can specifically be specified as follows:

gridpp input.nc  timeDim=date xDim=lon yDim=lat ensDim=member\
       output.nc timeDim=time xDim=x yDim=y ensDim=ensemble_member\
       -v ...

Note that not all dimensions must be specified. Unspecified dimensions will be auto-detected. Also note that dimensions can be different in the input and output files.

Specifying grid variables

Gridpp uses latitude and longitude values only, and not projection coordinates (e.g. x and y values on a lambert conformal grid). The names of the latitude and longitude variables are auto-detected based on commonly used names, but can be explicitly specified using:

gridpp input.nc latVar=latitude lonVar=longitude\
       output.nc ...

Specifying time stamps

Example definition

Here is an example of a working structure:

netcdf input {

dimensions:
      time = UNLIMITED ; // (7 currently)
      latitude = 18 ;
      longitude = 36 ;
variables:
      double time(time) ;
              time:units = "seconds since 1970-01-01 00:00:00 +0000" ;
      double forecast_reference_time ;
              forecast_reference_time:units = "seconds since 1970-01-01 00:00:00 +00:00" ;
      float longitude(longitude) ;
      float latitude(latitude) ;
      float air_temperature_2m(time, latitude, longitude) ;
}
Clone this wiki locally