<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Jeff,<br><br>What model is the forecast data coming from? Have you tried to use the re() function? http://opengrads.org/doc/udxt/re/re.html<br><br>Maybe you could define your variables something like:<br><br>fcst = re(reflecitivty, 0.1)<br>obs = re(reflectivity.2, 0.1)<br><br>I would define this near the beginning of your script (before you set lat/lon). I guess the idea would be to make match up the grids by regridding. <br><br>-James<br><br><br><div><hr id="stopSpelling">Date: Fri, 4 Sep 2015 22:24:12 -0500<br>From: jeffduda319@gmail.com<br>To: gradsusr@gradsusr.org<br>Subject: [gradsusr] Question about xdfopen<br><br><div dir="ltr"><div><div><div>I want to overlay some forecast radar reflectivity with observed reflectivity from NEXRAD radars across the US. I obtained the radar data from NCDC, then used the Weather and Climate Toolkit to convert the level 2 or level 3 radar data into netCDF.<br><br></div>The first problem: if I just use sdfopen to open the radar observations file, the dimensions do not line up with those of my forecast reflectivity, and I can't figure out a way to get them to line up so that both will plot on the same set of axes. I tried messing around with "set dfile" and then setting the dimension environment to favor the observed radar data after the forecast data were already plotted, but it didn't work. I also tried using lterp() to interpolate the observed data to the forecast, but that didn't work either.<br><br></div>The second problem: I looked into creating a short descriptor file so I can use xdfopen to control the dimensions of the observed radar data and force them to correspond better with those in the control file for my forecast reflectivity. Below is the file I used (for observed radar data):<br><br></div>------control file code----------------------<br clear="all"><div><div><div><div><div>DSET KAMA_V03_20100613_235808.nc<br>XDEF lon 1500 linear -105 0.01<br>YDEF lat 1500 linear 32 0.01<br>TDEF time 1 linear 00Z14JUN2010 1hr<br>VARS 1<br>Reflectivity=>obsrefl 1<br>ENDVARS<br></div><div>-----end control file code------------------<br><br></div><div>This corresponds to the metadata of the observed radar data from ncdump that follows:<br><br></div><div>-----------ncdump -h output-----------------------------------------------------------<br></div><div>netcdf KAMA_V03_20100613_235808 {<br>dimensions:<br> lat = 638 ;<br> lon = 800 ;<br> time = 1 ;<br>variables:<br> double Reflectivity(time, lat, lon) ;<br> Reflectivity:long_name = "Nexrad 2 radar dataset" ;<br> Reflectivity:missing_value = -999. ;<br> Reflectivity:units = "dBz" ;<br> double lat(lat) ;<br> lat:units = "degrees_north" ;<br> lat:spacing = "0.006905108991704942" ;<br> lat:datum = "NAD83 - NOAA Standard" ;<br> double lon(lon) ;<br> lon:units = "degrees_east" ;<br> lon:spacing = "0.006905108991704942" ;<br> lon:datum = "NAD83 - NOAA Standard" ;<br> int time(time) ;<br> time:units = "seconds since 1970-1-1" ;<br><br>// global attributes:<br> :title = "Nexrad 2 radar dataset 23:58:08 UTC 06/13/2010" ;<br> :Conventions = "CF-1.0" ;<br> :History = "Exported to NetCDF-3 CF-1.0 conventions by the NOAA Weather and Climate Toolkit (version 3.7.4) \n",<br> "Export Date: Fri Sep 04 21:43:37 CDT 2015" ;<br> :geographic_datum_ESRI_PRJ = "GEOGCS[\"GCS_North_American_1983\",DATUM[\"D_North_American_1983\",SPHEROID[\"GRS_1980\",6378137,298.257222101]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.0174532925199433]]" ;<br> :geographic_datum_OGC_WKT = "GEOGCS[\"NAD83\", DATUM[\"NAD83\", SPHEROID[\"GRS_1980\", 6378137.0, 298.25722210100002],TOWGS84[0,0,0,0,0,0,0]], PRIMEM[\"Greenwich\", 0.0], UNIT[\"degree\",0.017453292519943295], AXIS[\"Longitude\",EAST], AXIS[\"Latitude\",NORTH]]" ;<br>}<br></div><div>----end ncdump -h output------------------------------------------------------------------------------<br></div><div><br></div><div>Unfortunately, the above control file is not right, as I get this error when attempting to plot just the observed radar data:<br><br>ga-> d obsrefl<br>gancgrid error: nc_get_vara_double failed; NetCDF: Start+count exceeds dimension bound<br>Data Request Error: Error for variable 'obsrefl'<br> Error ocurred at column 1<br>DISPLAY error: Invalid expression <br> Expression = obsrefl<br><br></div><div>So I need help figuring out how to correct that.<br><br></div><div>Now, onto the control file for my forecast data (with unnecessary entries removed):<br></div><div>---------------control file code-----------------------------------------------------------------<br></div><div>dset /work/jdduda/analysis/FLSM/m1/wrfout_d01_2010-06-%d2_%h2:00:00<br>dtype netcdf<br>undef -9999<br>options template<br>title OUTPUT FROM WRF V3.6.1 MODEL - scalar fields - by Jeff Duda<br>pdef 750 700 lcc 22.99725 -113.57413 1 1 38.50000 38.50000 -99.38000 4000.00000 4000.00000<br>xdef 750 linear -119.22278 0.05291406<br>ydef 700 linear 22.99725 0.03706590<br>zdef 50 linear 1 1.0<br>tdef 37 linear 00Z13JUN2010 1HR<br>VARS 1<br>REFD_COM=>refdcom 0 t,y,x AFWA COMPOSITE RADAR REFL (dbZ)<br></div><div>ENDVARS<br></div><div>------------------end control file code-------------------------------------------------------------------<br><br></div><div>Does anyone know how I can remedy this situation? Thanks for your attention.<br><br></div><div>Jeff Duda<br></div><div>-- <br><div class="ecxgmail_signature">Jeff Duda<br>Graduate research assistant<br>University of Oklahoma School of Meteorology<br>Center for Analysis and Prediction of Storms<br></div>
</div></div></div></div></div></div>
<br>_______________________________________________
gradsusr mailing list
gradsusr@gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr</div>                                            </div></body>
</html>