<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.apple-tab-span
        {mso-style-name:apple-tab-span;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Arlindo<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I am attaching a utility I wrote that will create a gridded polygon shapefile. I ran it with the commands:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>grid2shp -1 984000 -2 '-384000' -x 112 -y 79 -s 12000 -o cmaqgrid<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>It created a shapefile called cmaqgrid which I then projected to WGS84 and then determined the extent of the grid in WGS84 space. The image is attached.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>It is for North America Lambert Conformal Conic; so, users in other parts of the world should remove the PRJ file and copy in the appropriate projection file.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>My first guess would be <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>dset ^file.ncf<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>dtype netcdf<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>title Vertically integrated atmos chem/aerosol vbles<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>pdef 112 79 lcc 32.95 -75.4 1 1 33 45 -97.00 12000 12000<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>undef -9999<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>xdef 112 linear -84.49 0.168<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>ydef 79 linear 32.95 0.15<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>zdef 1 linear 1 1<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>tdef 48 linear 00:00Z01jul2011 1dy<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>vars 1<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>AOD=>aod 1 t,z,y,x Aerosol Optical Depth<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>endvars<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>However, once I see the image in GrADS, I would tweak the numbers. The utility was statically built with MinGW. The source and Makefile is included for Linux users.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>John Huddleston<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> arlindo.dasilva@gmail.com [mailto:arlindo.dasilva@gmail.com] <b>On Behalf Of </b>Arlindo da Silva<br><b>Sent:</b> Thursday, December 15, 2011 12:55 PM<br><b>To:</b> Huddleston, John<br><b>Cc:</b> GrADS Users Forum<br><b>Subject:</b> Reading CMAQ netcdf files in GrADS<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hi John,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal> Something tells me that you might know this. I have these CMAQ netcdf files from the DISCOVER-AQ campaign (see ncdump below). Do you happen to know the PDEF line that goes with these? I have the grid metrics in a separate file, I could always write some code to remap these, but if grads can do it on the fly it would be good enough for the exploratory data analysis that I need to perform.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal> Thanks,<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal> Arlindo<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>-----<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><div><p class=MsoNormal>netcdf UMA_AOD {<o:p></o:p></p></div><div><p class=MsoNormal>dimensions:<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>TSTEP = UNLIMITED ; // (48 currently)<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>DATE-TIME = 2 ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>LAY = 1 ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>VAR = 1 ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>ROW = 79 ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>COL = 112 ;<o:p></o:p></p></div><div><p class=MsoNormal>variables:<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>int TFLAG(TSTEP, VAR, DATE-TIME) ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>TFLAG:units = "<YYYYDDD,HHMMSS>" ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>TFLAG:long_name = "TFLAG " ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>TFLAG:var_desc = "Timestep-valid flags: (1) YYYYDDD or (2) HHMMSS " ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>float AOD(TSTEP, LAY, ROW, COL) ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>AOD:long_name = "AOD " ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>AOD:units = "unitless " ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>AOD:var_desc = "AOD by Mie in VIS file " ;<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>// global attributes:<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:IOAPI_VERSION = "$Id: @(#) ioapi library version 3.0 $ " ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:EXEC_ID = "???????????????? " ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:FTYPE = 1 ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:CDATE = 2011182 ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:CTIME = 164809 ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:WDATE = 2011182 ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:WTIME = 164809 ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:SDATE = 2011182 ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:STIME = 130000 ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:TSTEP = 10000 ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:NTHIK = 1 ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:NCOLS = 112 ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:NROWS = 79 ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:NLAYS = 1 ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:NVARS = 1 ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:GDTYP = 2 ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:P_ALP = 33. ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:P_BET = 45. ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:P_GAM = -97. ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:XCENT = -97. ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:YCENT = 40. ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:XORIG = 984000. ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:YORIG = -384000. ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:XCELL = 12000. ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:YCELL = 12000. ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:VGTYP = 1 ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:VGTOP = 200.f ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:VGLVLS = 1.f, 0.9959855f ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:GDNAM = "AQF_CONUS_5x " ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:UPNAM = "setup " ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:VAR-LIST = "AOD " ;<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>:FILEDESC = "hourly 1-layer cross-point Visibility Information <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a><o:p></o:p></p></div></div></body></html>