[gradsusr] Difference two files in GrADS continued
Phil Klotzbach
philk at atmos.colostate.edu
Thu Sep 19 12:45:48 EDT 2013
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
----------------------------------------------------
More information about the gradsusr
mailing list