[Thread Prev][Thread Next][Index]

Re: [ferret_users] creating an array from anomaly data



Hi Randye,

There's some documentation about "masking", here

https://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/variables-xpressions/XPRESSIONS#_VPID_181


You'll open up your mask file, and the timeseries-data file, and then make sure the mask and the data are on the same time axis with a regridding operation -- and multiply the model-data variable by one of the masks.  Something like this, if the model data has a variable called "uvar".  The result will be the masked variable on the whole grid of uvar,


yes? use mask-var.nc

yes? use model_data_1.nc


yes? let/like=uvar masked_uvar = var1[d=1] * uvar[d=2,gt=var1[d=1]]


!  See a time-series of the masked variable at some point in uvar's grid.

yes? plot/symbol/x=300/y=40/y=0  masked_uvar



Note I've regridded the model data to the time axis of the mask , but you could do it the other way around, mask var1 to the grid of uvar.



On 10/23/2019 7:53 AM, Randye l Rutberg wrote:
Ferret Users,

Last week I posted a question seeking a method for having Ferret return the year that a temperature anomaly occurs if given a threshold.  The response I received was very helpful and allowed me to do this.  

I basically followed these commands:

To your query, it is the way that I use to do.

use  data.nc   ! load the data !

! generate the mask of the variable (var) in the data set, to your query I hope it is the time series you are talking about e.g. ENSO index time series !

let var1 = if var ge 1 then var     !! this is the value which is greater than or equal to 1
let var2 = if var le -1 then var     !!  this is the value which is less than or equal to -1

list var1, var2        !! this will show you the magnitude with dates !!

save/file=mask-var.nc var1, var2   !! in case if you want to save them !!

exit

***********************************************

Now, I am stuck on the next step.  I would like to use the dates generated for the anomolous and non-anomalous years to look at other model outputs. In other words, I want to compare various model outputs during years with and without temperature anomalies.  However, I do not know how to proceed to accomplish this.

Thank you in advance for your help.

Randye




Dr. Randye Rutberg
Assistant Professor
Department of Geography
Hunter College of the City University of New York

Office: 1047 Hunter North
Phone: 212 772 5326
Fax:      212 772 5268
Email:   rrutberg@xxxxxxxxxxxxxxx
Snail mail:  695 Park Ave
                   New York, NY  10021


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement