[gradsusr] How to highlight multiple model domains in one figure

Jeff Duda jeffduda319 at gmail.com
Sat Oct 15 10:41:51 EDT 2016


There's no simple or easy way to do it. Here are two methods I have used in
the past:

1) Generate a netcdf grid using whatever library you're familiar with (if
any). Make the grid the same size as your model domain. You can make the
values inside the grid essentially whatever you want so long as you can
bound the outer edge of the domain in a single contour. I suggest making
all values in the domain either 0.0 or 1.0. Then write a control file to
display that grid and make sure the value of UNDEF is set to something
other than the value on the grid. Then just display the field using gxout
contour and with contour labeling set to off.

2) Use gxout fwrite and define any field on that domain using const like
'define field = const(tmp,1,-a)' which essentially does the same thing as
in option 1, except it will write the field to a binary file instead of a
netcdf file. Then you can just modify the control file you used for the
original data set (assuming you used one), just changing the DSET, DTYPE,
and VARS entries to suit your new data. Whatever the name of the field you
wrote (in this example, it was defined using the name 'field'), the VARS
entry will become
VARS 1
field 0 99 field
ENDVARS

Also make sure to set UNDEF to some value other than the constant value (1
in this example). Then, as in the first suggestion, display the field using
gxout contour and with contour labeling off.

Once you have the general idea here, you can manipulate the steps to make
small alterations to improve the output image.

Jeff Duda

On Fri, Oct 14, 2016 at 7:59 PM, lpasmanoranjan <lpasmanoranjan at gmail.com>
wrote:

> Dear GrADS users,
> I would like to ask you a favour.
>
> I would like to highlight the following three model domains in one figure
> around my study region (India as center). But I can't able to draw the
> closed polygons as in the attachment.
>
> I have three model domains in Lambert conformal conic projection:
> MODEL 1: (8S,50E), (8S,90E), (45N,95E), (45N,45E).
> MODEL 2: (7S,42E), (7S,92E), (47N,97E), (47N,41E).
> MODEL 3:
>
> Would you please suggest how to do it in grads!!
>
> Thank you very much for any kind of help or suggestion.
>
>
> --
> Kind Regards,
> Mano
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>


-- 
Jeff Duda
Post-doctoral research associate
University of Oklahoma School of Meteorology
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20161015/d3833452/attachment.html 


More information about the gradsusr mailing list