Skip to content
Thomas Nipen edited this page Apr 9, 2020 · 3 revisions

Command-line examples

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.

Options

  • 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

Library example

x = 10
y = 5
wind_speed = gridpp.wind_speed(x, y)
Clone this wiki locally