[gradsusr] Performs array assignments based on a conditional array

Marsh, Kieren k.marsh at geos-uae.com
Tue Mar 13 06:03:59 EDT 2012


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

 

________________________________

De : Arlindo Meque <mequitomz at yahoo.com.br>
À : gradsusers <gradsusr at gradsusr.org> 
Envoyé le : Vendredi 2 décembre 2011 14h08
Objet : [gradsusr] How to match land-ocean boundaries?

 

 

I am plotting the precipitation field from CRU data.

Is there any function that will make my variable to match the political boundary on the eastern side of the map? Please find attached the plot. It seems that the precipitation field does not follow exactly the coastal line. 

I hope my question is clear.

Best regards,

Arlindo 


_______________________________________________
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/f179c664/attachment-0003.html 


More information about the gradsusr mailing list