Skip to content
Thomas Nipen edited this page Nov 26, 2017 · 13 revisions

Gridpp processes fields based on their variable names in the NetCDF files. The variable is not required to exist in the output file. Gridpp will simply write a new variable.

NetCDF/CF attributes

The NetCDF/CF standard requires that variables are annotated with units and standard_name attributes. Gridpp does not contain any logic to figure out what these should be, so these must be provided by the user. Gridpp will write attributes into the output file if it knows what they are. There are determined in this order:

  1. Attributes are provided on the command-line
  2. Attributes are already present in the output file
  3. Attributes are copied from the variable in the input file

The attributes can be specified on the command-line as follows:

gridpp <input_file> <output_file> -v precip units=mm standardName=precipitation_amount

Different input and output variable names

By default, -v assumes that the name of the variable in the input file is the same as in the output file. There are two cases where this might not be desired:

  1. You are processing a variable and want it to have a different name
  2. The names are different in the two files

Use the -vi option to specify a different variable name from the input file. The following creates accumulates the precip variable and names it precip_acc in the output file:

gridpp <input_file> <output_file> -vi precip -v precip_acc -c accumulate
Clone this wiki locally