Country maskout

Douglas Clark dbcl at CEH.AC.UK
Tue Mar 7 04:08:16 EST 2006


Siraj,

You'll probably have to use the "set defval" command, see
http://grads.iges.org/grads/gadoc/gadocindex.html

In outline, I would suggest:
1. Create a field that is undef everywhere
e.g. define pmask=const(var,0,-a)
define pmask=maskout(pmask,pmask-1)
where var is any variable that you already have in your GrADS file.

2. Use set defval to reset values over Pakistan. You would have to work out the x,y coords of each point that you want to change, which could be tedious but probably isn't too bad because at GCM resolution Pakistan shouldn't cover many gridboxes.
e.g. 'set defval pmask 20 25 1' to change the value of pmask at x=20,y=25 to 1.
set defval will only work on t=1 (I think).

Doug

>>> sirajkhan78 at GMAIL.COM 07/03/2006 06:13:22 >>>
Hi All,

While working on GCM data, I have maskout surface from sea using maskout
function. Now I want to mask out my country (Pakistan) from global
data i.eexcept pakistan I want to assign undefined values to all grid
boxes.
How can I do it using gradsc or any subrotien??

--
Siraj Ul Islam
1: Research Fellow (Climate Section)
Global Change Impact Studies Centre
First Floor Saudi Pak tower
Blue Area Islamabad Pakistan
Ph :   92-51-9219785
Fax : 92-51-9219787

2: Mphil Scholar
Computational Physics and Simulation Group
Department of Physics
Quaid e Azam University
Islamabad.


--
This message (and any attachments) is for the recipient only. NERC
is subject to the Freedom of Information Act 2000 and the contents
of this email and any reply you make may be disclosed by NERC unless
it is exempt from release under the Act. Any material supplied to
NERC may be stored in an electronic records management system.



More information about the gradsusr mailing list