[gradsusr] ploting probmlems

Jennifer Adams jma at cola.iges.org
Fri Feb 22 11:35:29 EST 2013


Your defined variable evws28 is defined in the entire domain (set x 1 144), which I assume corresponds to longitudes ranging from 0 to 360. Defined variables in GrADS are never given the 'wraps the globe' flag -- meaning that if you set your dimension environment with longitudes ranging from -70 to 120, and make a request to display your defined variable it will not show you values from -70 to 0. This is different from making the same request from a variable in your data file, which may have the 'wraps the globe flag' -- GrADS will fill in the data values for the negative longitudes for variables that wrap. Also, if you have a defined variable named evws28 and an open file (which is also the default file) with the variable named evws28, and you make a request to display evws28, GrADS will first look through the list of defined variables to see if any match before it checks the list of variables in the default file. So, if evws28 is still defined, your I/O request to display the variable in your new file ews28.nc will not succeed -- you will always get the defined version, which doesn't wrap. You have two options:
1. Do a 'reinit' before you open your newly created file ews28.nc so that there are no defined variables to conflict with the variable in your file. Then GrADS will recognize that this file wraps the globe and will give you all the data you request, including the negative longitudes.
2. Set the domain when you first define the variable ewvs28 to correspond to the desired range of longitudes, including the negative ones, something like ('set lon -70 120') or cover the whole range with 'set lon -360 360'. Of course, this last option will mean your file is twice as big as it needs to be. 
--Jennifer


On Feb 21, 2013, at 7:47 PM, kombo kai wrote:

> Hi Jennifer and all otherd grads users
> I do still have the problem of writing the enviromental verticle shear.nc filesd using the grads
> I have the u and v winds components from NCEP/NCAR reanalysis
> I ave done the follwing towrite these data sets
> sdfopen d:/vorticity/uwnd.mon.mean.nc
> sdfopen d/vorticity/vwnd.mon.mean.nc
>  set lon 0 360
> set lat -90 90
> set t 1 778
> set z 10
> set x 1 144
> set y 1 73
> define U1=uwnd(z=10)
> defineV1=vwnd.2(z=10)
> set z 3
> define U2=uwnd(z=3)
> define V2=vwnd.2(z=3)
> define U=U1-U2
> define V=V1-V2
> define evws28=sqrt(U*U+V*V)
> set sdfwrite d:/vorticty/evws28.nc
> sdfwrite evws28
> when I opened the evws28.nc and the set the following for plotinf
> I get data on only the 0 120E and misses the data for -70 0
> e.g.
> sdfopen d:/vorticity/ews28.nc
> set lon -70 120
> set lat -45 45
> set t 5
> d evws28
> this display only the 0 120 E and misses -70W 0
> please Jennifer and others tell me how to fix this problem ? could it be the problem of negative values of the sqrt
> Please help me on how to fix it
> rgds
> kaikombo
> :
> 
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

--
Jennifer M. Adams
IGES/COLA
4041 Powder Mill Road, Suite 302
Calverton, MD 20705
jma at cola.iges.org



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130222/404dafd7/attachment-0003.html 


More information about the gradsusr mailing list