[gradsusr] Question about xdfopen

James Spinks jspin881 at hotmail.com
Sat Sep 5 22:19:02 EDT 2015


Jeff,

What model is the forecast data coming from? Have you tried to use the re() function?  http://opengrads.org/doc/udxt/re/re.html

Maybe you could define your variables something like:

fcst = re(reflecitivty, 0.1)
obs = re(reflectivity.2, 0.1)

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. 

-James


Date: Fri, 4 Sep 2015 22:24:12 -0500
From: jeffduda319 at gmail.com
To: gradsusr at gradsusr.org
Subject: [gradsusr] Question about xdfopen

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.

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.

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):

------control file code----------------------DSET KAMA_V03_20100613_235808.nc
XDEF lon 1500 linear -105 0.01
YDEF lat 1500 linear 32 0.01
TDEF time 1 linear 00Z14JUN2010 1hr
VARS 1
Reflectivity=>obsrefl 1
ENDVARS
-----end control file code------------------

This corresponds to the metadata of the observed radar data from ncdump that follows:

-----------ncdump -h output-----------------------------------------------------------
netcdf KAMA_V03_20100613_235808 {
dimensions:
        lat = 638 ;
        lon = 800 ;
        time = 1 ;
variables:
        double Reflectivity(time, lat, lon) ;
                Reflectivity:long_name = "Nexrad 2 radar dataset" ;
                Reflectivity:missing_value = -999. ;
                Reflectivity:units = "dBz" ;
        double lat(lat) ;
                lat:units = "degrees_north" ;
                lat:spacing = "0.006905108991704942" ;
                lat:datum = "NAD83 - NOAA Standard" ;
        double lon(lon) ;
                lon:units = "degrees_east" ;
                lon:spacing = "0.006905108991704942" ;
                lon:datum = "NAD83 - NOAA Standard" ;
        int time(time) ;
                time:units = "seconds since 1970-1-1" ;

// global attributes:
                :title = "Nexrad 2 radar dataset  23:58:08 UTC  06/13/2010" ;
                :Conventions = "CF-1.0" ;
                :History = "Exported to NetCDF-3 CF-1.0 conventions by the NOAA Weather and Climate Toolkit (version 3.7.4)  \n",
                        "Export Date: Fri Sep 04 21:43:37 CDT 2015" ;
                :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]]" ;
                :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]]" ;
}
----end ncdump -h output------------------------------------------------------------------------------

Unfortunately, the above control file is not right, as I get this error when attempting to plot just the observed radar data:

ga-> d obsrefl
gancgrid error: nc_get_vara_double failed; NetCDF: Start+count exceeds dimension bound
Data Request Error:  Error for variable 'obsrefl'
  Error ocurred at column 1
DISPLAY error:  Invalid expression 
  Expression = obsrefl

So I need help figuring out how to correct that.

Now, onto the control file for my forecast data (with unnecessary entries removed):
---------------control file code-----------------------------------------------------------------
dset /work/jdduda/analysis/FLSM/m1/wrfout_d01_2010-06-%d2_%h2:00:00
dtype netcdf
undef -9999
options template
title  OUTPUT FROM WRF V3.6.1 MODEL - scalar fields - by Jeff Duda
pdef  750  700 lcc   22.99725 -113.57413 1 1   38.50000   38.50000  -99.38000 4000.00000 4000.00000
xdef   750 linear -119.22278 0.05291406
ydef   700 linear   22.99725 0.03706590
zdef    50 linear 1 1.0
tdef 37 linear 00Z13JUN2010 1HR
VARS  1
REFD_COM=>refdcom   0 t,y,x AFWA COMPOSITE RADAR REFL (dbZ)
ENDVARS
------------------end control file code-------------------------------------------------------------------

Does anyone know how I can remedy this situation? Thanks for your attention.

Jeff Duda
-- 
Jeff Duda
Graduate research assistant
University of Oklahoma School of Meteorology
Center for Analysis and Prediction of Storms



_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20150905/eceef4b6/attachment.html 


More information about the gradsusr mailing list