Le Mercredi 7 Septembre 2016 10.31 CEST, Francois Delclaux <francois.delclaux@xxxxxxxxxxxxxxxxxxx> a écrit:
Hi Ferret users,
I have a DEM Z(x,y) and a map precipitation P(x,y)
Now I would like to plot (or save in a ascii file), for each cell which
has the same elevation, the average of all the precipitation values
which are at this elevation.
In other word, for a given Z0 elevation, I would like to have the
average of Precipitation values which are at Z0 elevation.
What the best way for doing that ?
Hi François,
Are you aware of conditionnal variables in ferret ?
You can easilly define a mask on a variable by selecting a specific value (or range)
Then multiply this mask with the quantity to analyze and
then list the average.
An example using levitus_climatology
yes? use levitus_climatology
yes? let mask = if salt gt 35 and salt le 37 then 1
yes? let temp_at_mask = temp * mask
yes? list temp_at_mask[i=@ave,j=@ave,k=1]
you get 22.86
Hope that will help
Regards
Patrick