[gradsusr] Control File for Mask
Jeff Duda
jeffduda319 at gmail.com
Mon Jun 27 13:03:26 EDT 2016
Justin,
Show me the exact code you're running, including any and all control files
opened by the code.
Jeff
On Mon, Jun 27, 2016 at 12:00 PM, Justin Hicks <jhicks2014 at gmail.com> wrote:
> Jeff,
>
> I tried to use manipulation strings using the following command: 'd
> maskout(evap,data.2(time=00Z01JUN1990)-0.5)'.
> Note how I changed the variable from 'land' to 'data' just because of the
> ncdump contents. I received this error after entering this command: Data
> Request Warning:
>
> Request is completely outside file limits
> Entire grid contents are set to missing data
> Grid limits of file: X = 1 360 Y = 1 180 Z = 1 1 T = 1 1 E = 1 1
> Grid limits of request: X = 180 541 Y = 31 180 Z = 1 1 T = 138 138
> E = 1 1
> Warning issued for variable = data.2
> Cannot contour grid - all undefined values
>
>
> I'll post the contents of ncdump -c below:
>
> ncdump -c Region15_AFR_maskv3.nc
> netcdf Region15_AFR_maskv3 {
> dimensions:
> Longitude = 360 ;
> Latitude = 180 ;
> variables:
> float Longitude(Longitude) ;
> float Latitude(Latitude) ;
> float data(Latitude, Longitude) ;
> data:
>
> Longitude = -179.5, -178.5, -177.5, -176.5, -175.5, -174.5, -173.5,
> -172.5,
> -171.5, -170.5, -169.5, -168.5, -167.5, -166.5, -165.5, -164.5,
> -163.5,
> -162.5, -161.5, -160.5, -159.5, -158.5, -157.5, -156.5, -155.5,
> -154.5,
> -153.5, -152.5, -151.5, -150.5, -149.5, -148.5, -147.5, -146.5,
> -145.5,
> -144.5, -143.5, -142.5, -141.5, -140.5, -139.5, -138.5, -137.5,
> -136.5,
> -135.5, -134.5, -133.5, -132.5, -131.5, -130.5, -129.5, -128.5,
> -127.5,
> -126.5, -125.5, -124.5, -123.5, -122.5, -121.5, -120.5, -119.5,
> -118.5,
> -117.5, -116.5, -115.5, -114.5, -113.5, -112.5, -111.5, -110.5,
> -109.5,
> -108.5, -107.5, -106.5, -105.5, -104.5, -103.5, -102.5, -101.5,
> -100.5,
> -99.5, -98.5, -97.5, -96.5, -95.5, -94.5, -93.5, -92.5, -91.5, -90.5,
> -89.5, -88.5, -87.5, -86.5, -85.5, -84.5, -83.5, -82.5, -81.5, -80.5,
> -79.5, -78.5, -77.5, -76.5, -75.5, -74.5, -73.5, -72.5, -71.5, -70.5,
> -69.5, -68.5, -67.5, -66.5, -65.5, -64.5, -63.5, -62.5, -61.5, -60.5,
> -59.5, -58.5, -57.5, -56.5, -55.5, -54.5, -53.5, -52.5, -51.5, -50.5,
> -49.5, -48.5, -47.5, -46.5, -45.5, -44.5, -43.5, -42.5, -41.5, -40.5,
> -39.5, -38.5, -37.5, -36.5, -35.5, -34.5, -33.5, -32.5, -31.5, -30.5,
> -29.5, -28.5, -27.5, -26.5, -25.5, -24.5, -23.5, -22.5, -21.5, -20.5,
> -19.5, -18.5, -17.5, -16.5, -15.5, -14.5, -13.5, -12.5, -11.5, -10.5,
> -9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5,
> 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5,
> 15.5, 16.5, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5, 24.5, 25.5,
> 26.5,
> 27.5, 28.5, 29.5, 30.5, 31.5, 32.5, 33.5, 34.5, 35.5, 36.5, 37.5,
> 38.5,
> 39.5, 40.5, 41.5, 42.5, 43.5, 44.5, 45.5, 46.5, 47.5, 48.5, 49.5,
> 50.5,
> 51.5, 52.5, 53.5, 54.5, 55.5, 56.5, 57.5, 58.5, 59.5, 60.5, 61.5,
> 62.5,
> 63.5, 64.5, 65.5, 66.5, 67.5, 68.5, 69.5, 70.5, 71.5, 72.5, 73.5,
> 74.5,
> 75.5, 76.5, 77.5, 78.5, 79.5, 80.5, 81.5, 82.5, 83.5, 84.5, 85.5,
> 86.5,
> 87.5, 88.5, 89.5, 90.5, 91.5, 92.5, 93.5, 94.5, 95.5, 96.5, 97.5,
> 98.5,
> 99.5, 100.5, 101.5, 102.5, 103.5, 104.5, 105.5, 106.5, 107.5, 108.5,
> 109.5, 110.5, 111.5, 112.5, 113.5, 114.5, 115.5, 116.5, 117.5, 118.5,
> 119.5, 120.5, 121.5, 122.5, 123.5, 124.5, 125.5, 126.5, 127.5, 128.5,
> 129.5, 130.5, 131.5, 132.5, 133.5, 134.5, 135.5, 136.5, 137.5, 138.5,
> 139.5, 140.5, 141.5, 142.5, 143.5, 144.5, 145.5, 146.5, 147.5, 148.5,
> 149.5, 150.5, 151.5, 152.5, 153.5, 154.5, 155.5, 156.5, 157.5, 158.5,
> 159.5, 160.5, 161.5, 162.5, 163.5, 164.5, 165.5, 166.5, 167.5, 168.5,
> 169.5, 170.5, 171.5, 172.5, 173.5, 174.5, 175.5, 176.5, 177.5, 178.5,
> 179.5 ;
>
> Latitude = -89.5, -88.5, -87.5, -86.5, -85.5, -84.5, -83.5, -82.5, -81.5,
> -80.5, -79.5, -78.5, -77.5, -76.5, -75.5, -74.5, -73.5, -72.5, -71.5,
> -70.5, -69.5, -68.5, -67.5, -66.5, -65.5, -64.5, -63.5, -62.5, -61.5,
> -60.5, -59.5, -58.5, -57.5, -56.5, -55.5, -54.5, -53.5, -52.5, -51.5,
> -50.5, -49.5, -48.5, -47.5, -46.5, -45.5, -44.5, -43.5, -42.5, -41.5,
> -40.5, -39.5, -38.5, -37.5, -36.5, -35.5, -34.5, -33.5, -32.5, -31.5,
> -30.5, -29.5, -28.5, -27.5, -26.5, -25.5, -24.5, -23.5, -22.5, -21.5,
> -20.5, -19.5, -18.5, -17.5, -16.5, -15.5, -14.5, -13.5, -12.5, -11.5,
> -10.5, -9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5,
> 0.5,
> 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5,
> 14.5, 15.5, 16.5, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5, 24.5,
> 25.5,
> 26.5, 27.5, 28.5, 29.5, 30.5, 31.5, 32.5, 33.5, 34.5, 35.5, 36.5,
> 37.5,
> 38.5, 39.5, 40.5, 41.5, 42.5, 43.5, 44.5, 45.5, 46.5, 47.5, 48.5,
> 49.5,
> 50.5, 51.5, 52.5, 53.5, 54.5, 55.5, 56.5, 57.5, 58.5, 59.5, 60.5,
> 61.5,
> 62.5, 63.5, 64.5, 65.5, 66.5, 67.5, 68.5, 69.5, 70.5, 71.5, 72.5,
> 73.5,
> 74.5, 75.5, 76.5, 77.5, 78.5, 79.5, 80.5, 81.5, 82.5, 83.5, 84.5,
> 85.5,
> 86.5, 87.5, 88.5, 89.5 ;
> }
>
> -Justin
>
> On Mon, Jun 27, 2016 at 12:00 PM, Jeff Duda <jeffduda319 at gmail.com> wrote:
>
>> 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
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>>
>
> _______________________________________________
> 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/88ef4ea7/attachment.html
More information about the gradsusr
mailing list