[gradsusr] Difference two files in GrADS continued

Muthuvel Chelliah - NOAA Federal muthuvel.chelliah at noaa.gov
Thu Sep 19 13:41:23 EDT 2013


Of course! When u difference 2 fields, they should
corr. to the same time... They r not in ur case...

-Muthu


On Thu, Sep 19, 2013 at 12:45 PM, Phil Klotzbach
<philk at atmos.colostate.edu>wrote:

> Hi everyone,
>
> Thanks so much for your help!  In order to zero in on the problem
> further, I've tried to simplify the problem by opening two files with
> the exact same dimensions (latitude/longitude/time/levels) (uwnd.2009.nc
> and uwnd.2010.nc).  Basically, what I want to obtain is a height/time
> cross-section of the difference between the two years (e.g., zonal wind
> in 2010 minus zonal wind in 2009).  Let's say in this case, I've opened
> up uwnd.2010.nc first and then uwnd.2009.nc second - using the sdfopen
> command.  Since I want to create a height/time cross-section, I need to
> set the following dimensions before starting the calculation:
>
> set dfile 1
> set t 152 258
> set z 1 16
> set x 1
> set y 1
>
> Then, I want to create an average over a specific area:
>
> uave = aave(uwnd, lon=-70, lon=-20, lat=0, lat=30)
>
> When I display the uave field, it looks perfect - a height/time
> cross-section for zonal wind in 2010.   But, if I then switch to the
> second file (e.g., set dfile 2) (zonal wind in 2009) and try to change
> the dimensions on that file, it instantly tells me that uave (the
> variable that had the height/time cross-section for 2010) has all
> undefined values.  For example:
>
> set dfile 2
> set t 152 258
> display uave - Gives message saying cannot contour grid - all undefined
> values
>
> I'm not sure how to get around this issue.  I tried this with two files
> that have the exact same dimensions (e.g., uwnd.2009.nc and
> uwnd.2010.nc) - in order to make sure that it wasn't a time dimension
> mismatch that was causing the original problem.
>
> Is there any way to specify the dimensions in both files at the same
> time?  Thanks for any additional help.
>
> 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
>



-- 

------------------------------------------------------------------
Dr.Muthuvel Chelliah, eMail:Muthuvel.Chelliah at noaa.gov
Rm.3008, Climate Prediction Center, Ph:(301) 683-3393
NCEP/NWS/NOAA/U.S.Dept.of Commerce,
5830, University Research Court, NCWCP
College Park, MD 20740.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130919/9001ae2d/attachment-0003.html 


More information about the gradsusr mailing list