<div dir="ltr"><div><div><div><div><div><div><div>Justin,<br></div>I see your TDEF lines are actually the same, so that definitely should not be the cause of the problem.<br><br></div>Yes, it is possible that different YDEF lines are causing the issue. Strange how the difference shows up in the X dimension in the error message you get, though. You can change the YDEF entry however you want it. As far as I&#39;ve ever used it, YDEF only controls how the data can be plotted within grads. The PDEF entry is what controls the actual projection, and that is something you don&#39;t want to change, although I see you aren&#39;t using a PDEF entry anyway, so I guess that advice is irrelevant.<br><br></div>If you continue to have problems after matching up the YDEF lines, try the following:<br></div>-Do fields plot correctly from the first file when it is the only file open?<br></div>-Does your mask field plot correctly when it is the only file open?<br></div>-Check &#39;q dims&#39; when displaying a field in both files when each is the only one open. If they are different, that might be a clue as to why the command you want to run is failing.<br><br></div>Jeff<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 27, 2016 at 12:19 PM, Justin Hicks <span dir="ltr">&lt;<a href="mailto:jhicks2014@gmail.com" target="_blank">jhicks2014@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Jeff,<div><br></div><div>This is the code:</div><div><br></div><div><div><div>ga-&gt; open GLDAS_MOS10_M.ctl                           </div><div>Scanning description file:  GLDAS_MOS10_M.ctl</div><div>Data file /data2/gds/GLDAS_V1/GLDAS_MOS10_M/%y4/GLDAS_MOS10_M.A%y4%m2.001.grb is open as file 1</div><div>LON set to 0 360 </div><div>LAT set to -59.5 89.5 </div><div>LEV set to 1 1 </div><div>Time values set: 1979:1:1:0 1979:1:1:0 </div><div>E set to 1 1 </div><div>ga-&gt; open Region15_AFR_maskv3.nc                  </div><div>Scanning description file:  Region15_AFR_maskv3.nc</div><div>Warning: OPTIONS keyword &quot;template&quot; is used, but the </div><div>   DSET entry contains no substitution templates.</div><div>Data file ~/Downloads/Region15_AFR_maskv3.nc is open as file 2</div><div>ga-&gt; d maskout(evap,data.2(time=00Z01JUN1990)-0.5)</div><span class=""><div>Data Request Warning:  Request is completely outside file limits</div><div>  Entire grid contents are set to missing data </div><div>  Grid limits of file:     X = 1 360  Y = 1 180  Z = 1 1  T = 1 1  E = 1 1 </div><div>  Grid limits of request:  X = 180 541  Y = 31 180  Z = 1 1  T = 138 138  E = 1 1 </div><div>  Warning issued for variable = data.2</div><div>Cannot contour grid - all undefined values </div></span></div></div><div><br></div><div><br></div><div>I sent you the control file for the mask before, so here is the control file for the GLDAS data:</div><div><br></div><div><div>dset /data2/gds/GLDAS_V1/GLDAS_MOS10_M/%y4/GLDAS_MOS10_M.A%y4%m2.001.grb</div><div>index /data2/control/GLDAS_MOS10_M.idx</div><div>options template</div><div>undef 9.999E+20</div><div>title /data2/gds/GLDAS_V1/GLDAS_MOS10_M/1979/GLDAS_MOS10_M.A197901.001.grb</div><div>*  produced by grib2ctl v0.9.13</div><div>* command line options: /data2/gds/GLDAS_V1/GLDAS_MOS10_M/1979/GLDAS_MOS10_M.A197901.001.grb</div><div>dtype grib 0</div><div>ydef 150 linear -59.500000 1</div><div>xdef 360 linear -179.500000 1.000000</div><div>tdef 436 linear 00Z01jan1979 1mo</div><div>zdef 1 linear 1 1</div><div>vars 24</div><div>AvgSurfT 0 138,1,0  ** Average Surface Temperature       K              </div><div>Canopint 0 71,1,0  ** Total canopy water storage    kg/m^2</div><div>Evap 0 57,1,0  ** Total Evapotranspiration          kg/m^2/s     </div><div>LWdown 0 205,1,0  ** Surface incident longwave radiation W/m^2        </div><div>LWnet 0 112,1,0  ** Net Longwave Radiation            W/m^2        </div><div>PSurf 0 1,1,0  ** Surface pressure                 Pa             </div><div>Qair 0 51,1,0  ** Near surface specific humidity    kg/kg          </div><div>Qg 0 155,1,0  ** Ground Heat Flux                  W/m^2        </div><div>Qh 0 122,1,0  ** Sensible Heat Flux                W/m^2        </div><div>Qle 0 121,1,0  ** Latent Heat Flux                  W/m^2        </div><div>Qs 0 235,1,0  ** Surface Runoff                    kg/m^2/s     </div><div>Qsb 0 234,1,0  ** Subsurface Runoff                 kg/m^2/s     </div><div>Qsm 0 99,1,0  ** Snowmelt                          kg/m^2/s     </div><div>Rainf 0 132,1,0  ** Rainfall rate                     kg/m^2/s     </div><div>SWE 0 65,1,0  ** Snow Water Equivalent             kg/m^2       </div><div>SWdown 0 204,1,0  ** Surface incident shortwave radiation  W/m^2 </div><div>SWnet 0 111,1,0  ** Net Shortwave Radiation           W/m^2        </div><div>Snowf 0 131,1,0  ** Snowfall rate                     kg/m^2/s     </div><div>TSoil 0 85,112,50001 ** Deep Soil Temperature                  K              </div><div>SoilM1 0 86,112,50001 ** 0-2 cm  Average layer 1 soil moisture     kg/m^2       </div><div>SoilM2 0 86,112,40002 ** 2-150 cm  Average layer 2 soil moisture     kg/m^2</div><div>SoilM3 0 86,112,30003 ** 150-350 cm  Average layer 3 soil moisture     kg/m^2</div><div>Tair 0 11,1,0  ** Near surface air temperature      K              </div><div>Wind 0 32,1,0  ** Near surface wind magnitude     m/s            </div><div>ENDVARS</div></div><div><br></div><div><br></div><div>Now that I look at it, would it be the different &#39;ydef&#39; between the two files that is causing this problem? And if so, how could I change this?</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-Justin</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 27, 2016 at 1:03 PM, Jeff Duda <span dir="ltr">&lt;<a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Justin,<br></div>Show me the exact code you&#39;re running, including any and all control files opened by the code.<span><font color="#888888"><br><br></font></span></div><span><font color="#888888">Jeff<br></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 27, 2016 at 12:00 PM, Justin Hicks <span dir="ltr">&lt;<a href="mailto:jhicks2014@gmail.com" target="_blank">jhicks2014@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Jeff,<div><br></div><div>I tried to use manipulation strings using the following command: &#39;d maskout(evap,data.2(time=00Z01JUN1990)-0.5)&#39;.</div><div>Note how I changed the variable from &#39;land&#39; to &#39;data&#39; just because of the ncdump contents. I received this error after entering this command: Data Request Warning: </div><div><br></div><div> Request is completely outside file limits</div><div>  Entire grid contents are set to missing data </div><div>  Grid limits of file:     X = 1 360  Y = 1 180  Z = 1 1  T = 1 1  E = 1 1 </div><div>  Grid limits of request:  X = 180 541  Y = 31 180  Z = 1 1  T = 138 138  E = 1 1 </div><div>  Warning issued for variable = data.2</div><span><div>Cannot contour grid - all undefined values </div><div><br></div><div><br></div></span><div>I&#39;ll post the contents of ncdump -c below:</div><div><br></div><div><div>ncdump -c Region15_AFR_maskv3.nc</div><div>netcdf Region15_AFR_maskv3 {</div><div>dimensions:</div><div><span style="white-space:pre-wrap">        </span>Longitude = 360 ;</div><div><span style="white-space:pre-wrap">        </span>Latitude = 180 ;</div><div>variables:</div><div><span style="white-space:pre-wrap">        </span>float Longitude(Longitude) ;</div><div><span style="white-space:pre-wrap">        </span>float Latitude(Latitude) ;</div><div><span style="white-space:pre-wrap">        </span>float data(Latitude, Longitude) ;</div><div>data:</div><div><br></div><div> Longitude = -179.5, -178.5, -177.5, -176.5, -175.5, -174.5, -173.5, -172.5, </div><div>    -171.5, -170.5, -169.5, -168.5, -167.5, -166.5, -165.5, -164.5, -163.5, </div><div>    -162.5, -161.5, -160.5, -159.5, -158.5, -157.5, -156.5, -155.5, -154.5, </div><div>    -153.5, -152.5, -151.5, -150.5, -149.5, -148.5, -147.5, -146.5, -145.5, </div><div>    -144.5, -143.5, -142.5, -141.5, -140.5, -139.5, -138.5, -137.5, -136.5, </div><div>    -135.5, -134.5, -133.5, -132.5, -131.5, -130.5, -129.5, -128.5, -127.5, </div><div>    -126.5, -125.5, -124.5, -123.5, -122.5, -121.5, -120.5, -119.5, -118.5, </div><div>    -117.5, -116.5, -115.5, -114.5, -113.5, -112.5, -111.5, -110.5, -109.5, </div><div>    -108.5, -107.5, -106.5, -105.5, -104.5, -103.5, -102.5, -101.5, -100.5, </div><div>    -99.5, -98.5, -97.5, -96.5, -95.5, -94.5, -93.5, -92.5, -91.5, -90.5, </div><div>    -89.5, -88.5, -87.5, -86.5, -85.5, -84.5, -83.5, -82.5, -81.5, -80.5, </div><div>    -79.5, -78.5, -77.5, -76.5, -75.5, -74.5, -73.5, -72.5, -71.5, -70.5, </div><div>    -69.5, -68.5, -67.5, -66.5, -65.5, -64.5, -63.5, -62.5, -61.5, -60.5, </div><div>    -59.5, -58.5, -57.5, -56.5, -55.5, -54.5, -53.5, -52.5, -51.5, -50.5, </div><div>    -49.5, -48.5, -47.5, -46.5, -45.5, -44.5, -43.5, -42.5, -41.5, -40.5, </div><div>    -39.5, -38.5, -37.5, -36.5, -35.5, -34.5, -33.5, -32.5, -31.5, -30.5, </div><div>    -29.5, -28.5, -27.5, -26.5, -25.5, -24.5, -23.5, -22.5, -21.5, -20.5, </div><div>    -19.5, -18.5, -17.5, -16.5, -15.5, -14.5, -13.5, -12.5, -11.5, -10.5, </div><div>    -9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, </div><div>    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, </div><div>    15.5, 16.5, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5, 24.5, 25.5, 26.5, </div><div>    27.5, 28.5, 29.5, 30.5, 31.5, 32.5, 33.5, 34.5, 35.5, 36.5, 37.5, 38.5, </div><div>    39.5, 40.5, 41.5, 42.5, 43.5, 44.5, 45.5, 46.5, 47.5, 48.5, 49.5, 50.5, </div><div>    51.5, 52.5, 53.5, 54.5, 55.5, 56.5, 57.5, 58.5, 59.5, 60.5, 61.5, 62.5, </div><div>    63.5, 64.5, 65.5, 66.5, 67.5, 68.5, 69.5, 70.5, 71.5, 72.5, 73.5, 74.5, </div><div>    75.5, 76.5, 77.5, 78.5, 79.5, 80.5, 81.5, 82.5, 83.5, 84.5, 85.5, 86.5, </div><div>    87.5, 88.5, 89.5, 90.5, 91.5, 92.5, 93.5, 94.5, 95.5, 96.5, 97.5, 98.5, </div><div>    99.5, 100.5, 101.5, 102.5, 103.5, 104.5, 105.5, 106.5, 107.5, 108.5, </div><div>    109.5, 110.5, 111.5, 112.5, 113.5, 114.5, 115.5, 116.5, 117.5, 118.5, </div><div>    119.5, 120.5, 121.5, 122.5, 123.5, 124.5, 125.5, 126.5, 127.5, 128.5, </div><div>    129.5, 130.5, 131.5, 132.5, 133.5, 134.5, 135.5, 136.5, 137.5, 138.5, </div><div>    139.5, 140.5, 141.5, 142.5, 143.5, 144.5, 145.5, 146.5, 147.5, 148.5, </div><div>    149.5, 150.5, 151.5, 152.5, 153.5, 154.5, 155.5, 156.5, 157.5, 158.5, </div><div>    159.5, 160.5, 161.5, 162.5, 163.5, 164.5, 165.5, 166.5, 167.5, 168.5, </div><div>    169.5, 170.5, 171.5, 172.5, 173.5, 174.5, 175.5, 176.5, 177.5, 178.5, </div><div>    179.5 ;</div><div><br></div><div> Latitude = -89.5, -88.5, -87.5, -86.5, -85.5, -84.5, -83.5, -82.5, -81.5, </div><div>    -80.5, -79.5, -78.5, -77.5, -76.5, -75.5, -74.5, -73.5, -72.5, -71.5, </div><div>    -70.5, -69.5, -68.5, -67.5, -66.5, -65.5, -64.5, -63.5, -62.5, -61.5, </div><div>    -60.5, -59.5, -58.5, -57.5, -56.5, -55.5, -54.5, -53.5, -52.5, -51.5, </div><div>    -50.5, -49.5, -48.5, -47.5, -46.5, -45.5, -44.5, -43.5, -42.5, -41.5, </div><div>    -40.5, -39.5, -38.5, -37.5, -36.5, -35.5, -34.5, -33.5, -32.5, -31.5, </div><div>    -30.5, -29.5, -28.5, -27.5, -26.5, -25.5, -24.5, -23.5, -22.5, -21.5, </div><div>    -20.5, -19.5, -18.5, -17.5, -16.5, -15.5, -14.5, -13.5, -12.5, -11.5, </div><div>    -10.5, -9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 0.5, </div><div>    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, </div><div>    14.5, 15.5, 16.5, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5, 24.5, 25.5, </div><div>    26.5, 27.5, 28.5, 29.5, 30.5, 31.5, 32.5, 33.5, 34.5, 35.5, 36.5, 37.5, </div><div>    38.5, 39.5, 40.5, 41.5, 42.5, 43.5, 44.5, 45.5, 46.5, 47.5, 48.5, 49.5, </div><div>    50.5, 51.5, 52.5, 53.5, 54.5, 55.5, 56.5, 57.5, 58.5, 59.5, 60.5, 61.5, </div><div>    62.5, 63.5, 64.5, 65.5, 66.5, 67.5, 68.5, 69.5, 70.5, 71.5, 72.5, 73.5, </div><div>    74.5, 75.5, 76.5, 77.5, 78.5, 79.5, 80.5, 81.5, 82.5, 83.5, 84.5, 85.5, </div><div>    86.5, 87.5, 88.5, 89.5 ;</div><div>}</div></div><span><font color="#888888"><div><br></div><div>-Justin</div></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 27, 2016 at 12:00 PM, Jeff Duda <span dir="ltr">&lt;<a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Justin,<br></div>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&#39;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 &#39;d maskout(evap,land.2(time=12Z27JUN2016)-0.5)&#39;<br><br></div>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&#39;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.<br><br></div>Jeff<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Mon, Jun 27, 2016 at 10:21 AM, Justin Hicks <span dir="ltr">&lt;<a href="mailto:jhicks2014@gmail.com" target="_blank">jhicks2014@gmail.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">GrADS Users,<div><br></div><div>I am trying to open up a netcdf mask file using &#39;sdfopen&#39;, 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. </div><div><br></div><div>For this mask, land is given a value of 1 and ocean value are given a value of 0. </div><div><br></div><div>The control file I have is below: </div><div><br></div><div><div>DSET<span style="white-space:pre-wrap">        </span>~/Downloads/Region15_AFR_maskv3.nc</div><div>options template</div><div>undef 0</div><div>Xdef  360 LINEAR -179.5  1.0</div><div>Ydef  180 LINEAR  89.5   1.0</div><div>Zdef   1  LINEAR  1.0    1.0</div><div>Tdef   1  LINEAR  00Z01jan1979 1mo</div><div>Vars 1</div><div>land=&gt;land  0  t,y,x   land_mask</div><div>endvars</div></div><div><br></div><div><br></div><div>I have tried changing the undef value, but I get the same error each time I run the command &#39;d maskout(evap,land.2-0.5)&#39;:</div><div><br></div><div>&quot;Cannot contour grid - all undefined values&quot;</div><div><br></div><div>I am not sure why all values are coming up undefined (the land area I want isn&#39;t showing up either, instead it&#39;s the default world map). Perhaps it is the Tdef? I&#39;m not sure why a mask would need a tdef.</div><span><font color="#888888"><div><br></div><div>-Justin</div><div><br></div></font></span></div>
<br></div></div>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><br>-- <br><div data-smartmail="gmail_signature"><div dir="ltr"><div>Jeff Duda<br>Post-doctoral research associate<br>University of Oklahoma School of Meteorology<br></div></div></div>
</font></span></div>
<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div data-smartmail="gmail_signature"><div dir="ltr"><div>Jeff Duda<br>Post-doctoral research associate<br>University of Oklahoma School of Meteorology<br></div></div></div>
</div>
</div></div><br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Jeff Duda<br>Post-doctoral research associate<br>University of Oklahoma School of Meteorology<br></div></div></div>
</div>