<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>
<div>
<div><span class="Apple-style-span" style="font-size: medium; font-family: Consolas, monospace; ">
<div>I've found a solution to the question posted below (from April 2013) thanks to Arlindo da Silva at NASA-GSFC. For V2 and beyond, the ctl files for cdf data need to be modified slightly (see below), and then the 'open' command used instead of 'xdfopen'.</div>
<div><br>
</div>
</span>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="border-left-color: rgb(181, 196, 223); border-left-width: 5px; border-left-style: solid; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 5px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 5px; font-family: Consolas; font-size: medium; ">
<div>Hello,</div>
<div></div>
<div></div>
<div>I seem to be having an issue using xdfopen in GrADS 2.0.a3 but not in an older version (GrADS 1.10r2). I have ARM netcdf data which I would like to display in GrADS with xdfopen. In GrADS 1.10 it works fine with the script below but in GrADS 2.0a3 it
does not.</div>
<div></div>
<div>DSET ARM/20100530/sgpmet/sgpmetE15.b1.201005%d2.000000.cdf</div>
<div>OPTIONS template</div>
<div>TITLE ARM Data</div>
<div>UNDEF -9999</div>
<div>TDEF time 2880 linear 00:00Z30may2010 1mn</div>
<div>XDEF time 01 levels -98.284</div>
<div>YDEF time 01 levels 36.431</div>
<div>VARS 4</div>
<div>atmos_pressure=>press 0 99 atmospheric pressure (kpa)</div>
<div>temp_mean=>temp 0 99 temperature (deg C)</div>
<div>rh_mean=>rh 0 99 relative humidity (%)</div>
<div>tbrg_precip_total=>precip 0 99 Tipping bucket rain guage total precip (mm/hr)</div>
<div>ENDVARS</div>
<div></div>
<div>The problem is, in GrADS 2.0a3, the initial value is being treated as a constant and not varying in time like it should. I get just a straight line at whatever the initial value is. For example, if I try to display temperature and the temperature at
00Z May 30 (initial time) is 25 C, I will get a straight line with only that same value at every time. I tried changing the ctl file to this (below) based on the users guide but it is still not working.</div>
<div></div>
<div>DSET ARM/20100530/sgpmet/sgpmetE15.b1.201005%d2.000000.cdf</div>
<div>OPTIONS template</div>
<div>DTYPE netcdf</div>
<div>TITLE ARM Data</div>
<div>UNDEF -9999</div>
<div>TDEF time 2880 linear 00:00Z30may2010 1mn</div>
<div>XDEF time 01 levels -98.284</div>
<div>YDEF time 01 levels 36.431</div>
<div>VARS 4</div>
<div>atmos_pressure=>press 0 t atmospheric pressure (kpa)</div>
<div>temp_mean=>temp 0 t temperature (deg C)</div>
<div>rh_mean=>rh 0 t relative humidity (%)</div>
<div>tbrg_precip_total=>precip 0 t Tipping bucket rain guage total precip (mm/hr)</div>
<div>ENDVARS</div>
<div></div>
<div>I really want to use GrADS 2.0a3 because it has better math functions and tools to make comparisons to other data sets easier. I also have the same problem in GrADS 2.0.2 so I think it must have something to do with newer versions. Thanks in advance
for any help.</div>
<div></div>
<div>Also, time is the only dimension in the cdf file so that is why xdef and ydef are set to time.</div>
<div></div>
<div>Tom</div>
<div><br>
</div>
</blockquote>
<span class="Apple-style-span" style="font-size: medium; font-family: Consolas, monospace; ">
<div><span class="Apple-style-span" style="font-size: medium; font-family: Consolas, monospace; ">
<div><font class="Apple-style-span" face="Consolas,monospace">-----</font></div>
<div><font class="Apple-style-span" face="Consolas,monospace">
<div>On Fri, Mar 7, 2014 at 10:13 AM, Santanello, Joseph A. (GSFC-6170) <<a href="mailto:joseph.a.santanello@nasa.gov">joseph.a.santanello@nasa.gov</a>> wrote:</div>
<div><br>
</div>
<div>Hi Arlindo,</div>
<div><br>
</div>
<div>Here is an example of what I'm working with. 'test30' is what you open with xdfopen, and then it reads in the daily ARM cdf files. So if you then change the time dimension (e.g. 1 48) you'll see the variables are constant throughout each day instead of
varying every 30 mins.</div>
<div><br>
</div>
<div>/discover/nobackup/jsantane/WRF2GrADS/NEWS/2006/SMOS % ll test30_E4_jun1.ctl</div>
<div>-rwxr-xr-x 1 jsantane r0620 509 2008-11-13 17:36 test30_E4_jun1.ctl</div>
<div><br>
</div>
</font><span class="Apple-style-span" style="font-family: Consolas, monospace; ">It turns out, you had the wrong ctl. Actually, you had a "ddf" not a "ctl", and because you were using "time" for XDEF, YDEF and TDEF grads v2 got confused (this portion of the
code was rewritten for v2). Use the attached "ctl" instead with the open command (yes, "open" not "sdfopen" or "xdfopen"):</span><font class="Apple-style-span" face="Consolas,monospace">
<div><br>
</div>
<div>ga-> open test30_E4_jun1.ctl</div>
<div><br>
</div>
<div>It worked for me with opengrads v2. If it works please post the solution to gradsusr so others can benefit as well.</div>
<div><br>
</div>
<div>Let me know if it works for you.</div>
<div><br>
</div>
<div>Arlindo</div>
<div><b><br>
</b></div>
<div></div>
<div><b>Old ctl file:</b></div>
<div>
<div>DSET ^sgp30smosE4.b1.2006%m2%d2.000000.cdf</div>
<div>OPTIONS template</div>
<div>TITLE Lamont OK ARM Data</div>
<div>XDEF time 1 LINEAR -97.485 1.0</div>
<div>YDEF time 1 LINEAR 36.605 1.0</div>
<div>ZDEF time 1 LINEAR 1.0 1.0</div>
<div>TDEF time 4416 LINEAR 00Z01JUN2006 30MN</div>
<div>VARS 9</div>
<div>wspd=>wspd 1 99 Wind Speed</div>
<div>wspd_va=>wspdva 1 99 Wind Speed</div>
<div>wdir=>wdir 1 99 Wind Direction</div>
<div>sd_deg=>degsd 1 99 SD Degree</div>
<div>temp=>temp 1 99 Wind Speed</div>
<div>rh=>relh 1 99 Wind Speed</div>
<div>vap_pres=>vpress 1 99 Vapor Pressure</div>
<div>bar_pres=>press 1 99 Barometric Pressure</div>
<div>precip=>pcp 1 99 Precipitation</div>
<div>ENDVARS</div>
<div><br>
</div>
</div>
<div><b>New ctl file:</b></div>
<div>
<div>DSET ^sgp30smosE4.b1.2006%m2%d2.000000.cdf</div>
<div>OPTIONS template</div>
<div>DTYPE netcdf</div>
<div>UNDEF 1e20</div>
<div>TITLE Lamont OK ARM Data</div>
<div>XDEF 1 LINEAR -97.485 1.0</div>
<div>YDEF 1 LINEAR 36.605 1.0</div>
<div>ZDEF 1 LINEAR 1.0 1.0</div>
<div>TDEF 4416 LINEAR 00Z01JUN2006 30MN</div>
<div>VARS 9</div>
<div>wspd=>wspd 0 t Wind Speed</div>
<div>wspd_va=>wspdva 0 t Wind Speed</div>
<div>wdir=>wdir 0 t Wind Direction</div>
<div>sd_deg=>degsd 0 t SD Degree</div>
<div>temp=>temp 0 t Wind Speed</div>
<div>rh=>relh 0 t Wind Speed</div>
<div>vap_pres=>vpress 0 t Vapor Pressure</div>
<div>bar_pres=>press 0 t Barometric Pressure</div>
<div>precip=>pcp 0 t Precipitation</div>
<div>ENDVARS</div>
</div>
<div>----</div>
<div><br>
</div>
<div><br>
</div>
</font></div>
</span></div>
</span></div>
<div>
<div>
<div>-----------------</div>
<div>Joseph.A.Santanello@nasa.gov</div>
<div>http://neptune.gsfc.nasa.gov/hsb/personnel/index.php?id=182</div>
</div>
</div>
</div>
</div>
</body>
</html>