Skip to content

Diagnosing variables client

Thomas Nipen edited this page Jun 18, 2020 · 3 revisions

Humidity

Diagnosing of humidity variables is implemented as a calibrator.

gridpp input.nc output.nc -v dewpoint -c diagnoseHumidity\
                                         temperature=air_temperature_2m\
                                         rh=relative_humidity_2m

Wetbulb temperature requires both RH and pressure. However, if pressure is not available, it can be approximated using a standard atmosphere and the elevation field. This is done automatically if pressure= is not supplied. For this to work, altitude must be designed in the output.

  • compute (string): which variable to compute. One of "rh", "dewpoint", or "wetbulb".
  • temperature (string): name of temperature variable
  • rh (string): name of relative humidity variable
  • dewpoint (string): name of dewpoint variable
  • pressure (string): name of pressure variable

Wind

Gridpp can diagnose a number of wind variables based on other variables. This is implemented as a calibrator. Wind can be represented by speed and direction or by x and y components, which must exist.

gridpp input.nc output.nc -v windspeed -d bypass -c diagnoseWind compute=speed x=x_wind_10m y=y_wind_10m\
                          -v winddir -d bypass -c diagnoseWind compute=dir x=x_wind_10m y=y_wind_10m

where x_wind_10m and y_wind_10m are the variable names of the x and y winds, which must exist in the input file. Note that the bypass downscaler is used if windspeed and winddir are not available in the input (which one might expect if the variables are to be computed).

To diagnose x and y components, use:

gridpp input.nc output.nc -v xwind -c diagnoseWind compute=x speed=windspeed direction=winddirection\
                          -v ywind -c diagnoseWind compute=y speed=windspeed direction=winddirection

where windspeed and winddirection are the variable names of speed and direction.

  • compute (string): which variable to compute. One of "x", "y", "speed", or "direction".
  • x (string): name of x-wind variable
  • y (string): name of y-wind variable
  • speed (string): name of wind speed variable
  • direction (string): name of wind direction variable

(De)accumulation

Variables, such as precipitation, are often accumulated in the file. Sometimes operations should be done on deaccumulated fields. To do this use the deaccumulate calibrator:

gridpp input.nc output.nc -vi precipitation_amount_acc -v precipitation_amount -c deaccumulate

The variable can be deaccumulated, processed, then accumulated as follows:

gridpp input.nc output.nc -v precipitation_amount_acc\
                          -c deaccumulate\
                          -c neighbourhood radius=3\
                          -c accumulate
Clone this wiki locally