[gradsusr] Control File for Mask

Jeff Duda jeffduda319 at gmail.com
Mon Jun 27 12:00:30 EDT 2016


Justin,
It very well could be the TDEF line. GrADS is expecting the data in all
files to be valid at the same time. If it isn't, you have to use
manipulation strings to get things to plot right. For example, if the time
of your data is today, 12Z 27 June 2016, then you would have to enter 'd
maskout(evap,land.2(time=12Z27JUN2016)-0.5)'

You might also want to consider using xdfopen instead of sdfopen. While you
still have to write a control file to use xdfopen, you don't have to put
nearly as many details in the control file as you would for just a regular
open, which requires a full blown control file like you created.

Jeff

On Mon, Jun 27, 2016 at 10:21 AM, Justin Hicks <jhicks2014 at gmail.com> wrote:

> GrADS Users,
>
> I am trying to open up a netcdf mask file using 'sdfopen', but GrADS is
> not opening it up. The mask should show values ONLY for Africa. I decided
> to make a control file instead, but I am confused as how to write one for a
> mask.
>
> For this mask, land is given a value of 1 and ocean value are given a
> value of 0.
>
> The control file I have is below:
>
> DSET ~/Downloads/Region15_AFR_maskv3.nc
> options template
> undef 0
> Xdef  360 LINEAR -179.5  1.0
> Ydef  180 LINEAR  89.5   1.0
> Zdef   1  LINEAR  1.0    1.0
> Tdef   1  LINEAR  00Z01jan1979 1mo
> Vars 1
> land=>land  0  t,y,x   land_mask
> endvars
>
>
> I have tried changing the undef value, but I get the same error each time
> I run the command 'd maskout(evap,land.2-0.5)':
>
> "Cannot contour grid - all undefined values"
>
> I am not sure why all values are coming up undefined (the land area I want
> isn't showing up either, instead it's the default world map). Perhaps it is
> the Tdef? I'm not sure why a mask would need a tdef.
>
> -Justin
>
>
> _______________________________________________
> 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/20160627/b3df0072/attachment.html 


More information about the gradsusr mailing list