[gradsusr] Differencing two files in GrADS

Andrew Friedman andfried at berkeley.edu
Wed Sep 18 02:34:41 EDT 2013


Hi Phil,

For time, try setting the time value of the second file within the equation like
uwnd_total = uwnd - uwnd.2(t=1)

For height, set Z=1 before running the equation.

Likewise, for longitude, you can try setting X from 1 to 144 for both files.
However, this may not work if the underlying longitude points are different. In that case, I believe you'll have to either set the longitude values using XDFOPEN, or regrid using LTERP.

Andrew

On Sep 17, 2013, at 8:16 PM, Phil Klotzbach <philk at atmos.colostate.edu> wrote:

> Good evening,
> 
> I am currently running OpenGRADS 2.0.1 on my Windows 7 laptop.  What I 
> am attempting to do is to plot a difference between 2013 values of zonal 
> wind from the long-term (1981-2010) mean values.  I have downloaded two 
> separate files from the NCEP/NCAR Reanalysis off of ESRL's website 
> (e.g., uwnd.2013.nc and uwnd.day.1981-2010.ltm.nc). What I am hoping to 
> do is to generate a height/time cross-section of zonal wind anomalies 
> during the past several months of 2013.  I am attempting to see if 
> westerly wind anomalies propagating from the stratosphere have been 
> impacting the circulation in the tropical Atlantic.
> 
> Before I get to a vertical cross-section, I figured I would start with a 
> simpler problem of just differencing the values of 2013 zonal wind from 
> the long-term mean zonal wind.  The problem that I am having is how to 
> difference values of uwnd from the first file from values from the 
> second file.  I have read documentation online, and it appears that you 
> should be able to just generate an equation such as: uwnd_total = uwnd - 
> uwnd.2 (to difference the values from the two files).  However, the 
> error message that I get is as follows:
> 
> Entire grid contents are set to missing data
> Grid limit of file: X = 1 144 Y = 1 73 Z = 1 17 T = 1 365 E = 1 1
> Grid limit of request: X = 1 145 Y = 1 73 Z = 1 1 T = 734869 734869 E = 1 1
> Warning issued for variable = uwnd.2
> 
> It looks like the problem is that GrADS does not know what the 
> dimensions of the second file are.   How do you specify in the equation 
> the dimensions of both variables at the same time?
> 
> Thanks for any help that you can provide.
> 
> Phil
> 
> --
> ----------------------------------------------------
> Phil Klotzbach, Ph.D.
> Research Scientist
> Department of Atmospheric Science
> Colorado State University
> Email: philk at atmos.colostate.edu
> ----------------------------------------------------
> 
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr



Andrew Friedman
Graduate student, UC Berkeley Geography
andfried at berkeley.edu








More information about the gradsusr mailing list