[gradsusr] Tr : Performs array assignments based on a conditional array
wilfried pokam
wpokam at yahoo.fr
Tue Mar 13 06:48:39 EDT 2012
Thanks Kieren for your reply.
As you suggest, I tried only the following lines
'sdfopen
/home/precis/wind/uwnd.nc'
'sdfopen /home/precis/precip/prate_Interp.nc'
'set lat -90 90'
'set lon -180 180'
'set lev 1000 100'
'set t 1 2'
‘set
dfile 2’
'pre = prate.2*86400'
But I got the following error:
Data Request Warning: Request is completely outside file limits
Define Error: Unable to allocate data memory
Size of request was -19031830 grid elements
*** glibc detected *** grads: double free or corruption (!prev): 0x08b07620 ***
What's wrong!!
After that, the GUI interface goes off. Wind data is 4D (t,lev,lat,lon) and precip 3D (t,lev,lat,lon). Dimensions of coordinates t,lat,lon are the same for both variables.
Thanks
Wilfied
________________________________
De : "Marsh, Kieren" <k.marsh at geos-uae.com>
À : wilfried pokam <wpokam at yahoo.fr>; GrADS Users Forum <gradsusr at gradsusr.org>
Envoyé le : Mardi 13 mars 2012 11h03
Objet : RE: [gradsusr] Performs array assignments based on a conditional array
You need to specify to GrADS which file to usesing set dfile:
See my ‘set dfile’ additions below (this assumes you sdfopen the
files in the order you specify)
'sdfopen
/home/precis/wind/uwnd.nc'
'sdfopen /home/precis/precip/prate_Interp.nc'
'set lat -90 90'
'set lon -180 180'
'set lev 1000 100'
'set t 1 2'
‘set
dfile 2’
'pre = prate.3*86400'
‘set dfile 1’
'p = const(maskout(uwnd.1,pre-1),0,-u)
From:gradsusr-bounces at gradsusr.org
[mailto:gradsusr-bounces at gradsusr.org] On Behalf Of wilfried pokam
Sent: 13 March 2012 13:06
To: gradsusers; GrADS Users Forum
Subject: [gradsusr] Performs array assignments based on a conditional
array
Hello
Grads users,
I want to
assign to the wind zonal wind (at all vertical levels) the value 0 at
grid points where the precipitation is less than 10mm/day. I tried the
following, but I have an error
-------------------------------------------------------------
'sdfopen /home/precis/wind/uwnd.nc'
'sdfopen /home/precis/precip/prate_Interp.nc'
'set lat -90 90'
'set lon -180 180'
'set lev 1000 100'
'set t 1 2'
'pre =
prate.3*86400'
'p = const(maskout(uwnd.1,pre-1),0,-u)
----------------------------------------------------
Both
'uwnd.nc' and 'prate_Interp.nc' are on the same horizontal grids.
Any
help would be appreciated
Regards
Wilfried
_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20120313/f77ed40d/attachment-0003.html
More information about the gradsusr
mailing list