comparing two nc files

Mary Jo Nath Mary-Jo.Nath at NOAA.GOV
Wed Jun 6 09:24:43 EDT 2007


Use maskout().
If  the variable in FILE1 is SD, and the variable in FILE2 is AVG,  and
assuming SD and AVG are on the same lat-lon grid, then do something like:

d maskout(AVG.2, 29.9999-SD.1)

AVG will then only be plotted when 29.9999-SD.1 >= 0., which is when SD < 30
[You might have to do something like "d maskout(AVG.2(t=1,z=1),
29.9999-SD.1(t=1,z=1)) if the time and/or level coordinates don't match
for FILE1 and FILE2.]

MJ



Sachin Ghude wrote:
>
> Dear all,
>
> I have two files, FILE1.nc and FILE2.nc.
>
> FILE1.nc has data which is a standard deviation (SD) of the averages
> in FILE2.nc. Data in FILE1 ranges from 0 - 60.
>
> I want to plot data in FILE2.nc only for those grids where the values
> in FILE1.nc is less than 30. ( Essentially, I want to plot averages
> for the SD less than 30).
>
> Would somebody please advice me How to  do this in GRADS.
>
> Sachin D Ghude
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20070606/fc320c04/attachment.html 


More information about the gradsusr mailing list