<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jun 20, 2011, at 3:57 PM, James T. Potemra wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Takaya:<br><br>I don't think that the template option works with data via OPeNDAP, only on<br>local files. </div></blockquote><div>That is incorrect. Templating works on OPeNDAP URLs the same way it works on local file names, you need to add 'options template' to the descriptor file. </div><div><br></div><div>As for the descriptor file, this is what works for me:</div><div><div><br></div><div>dset <a href="http://data.nodc.noaa.gov/opendap/pathfinder/Version5.0/Monthly/">http://data.nodc.noaa.gov/opendap/pathfinder/Version5.0/Monthly/</a>%y4/%y4%m2.s04m1pfv50-bsst-16b.hdf</div><div>dtype netcdf</div><div>options yrev template</div><div>title Please Put An Accurate Title in Every Descriptor File</div><div>undef 0</div><div>unpack scale_factor add_off</div><div>xdef 8192 linear -180 0.043945</div><div>ydef 4096 linear -90 0.043945</div><div>zdef 1 linear 0 1</div><div>tdef 12 linear 00z01JAN1985 1mo</div><div>vars 1</div><div>bsst 0 y,x temperature</div><div>endvars</div></div><div><br></div><div>The xdfopen interface wouldn't find the unpacking attribute names because they are non-standard ("add_off"), so a full descriptor is necessary. You can expand the tdef statement to include all the years in the data set, I just used 12 to make sure the templating was working. </div><div><br></div><div>--Jennifer</div><div><br></div><div><br></div><br><blockquote type="cite"><div>The data provider needs to aggregate the data on the server<br>side<br>of things. Otherwise, you will have to write your script to loop through<br>all the<br>files.<br><br>You are also welcome to get the Pathfinder SST from our site,<br><a href="http://apdrc.soest.hawaii.edu">http://apdrc.soest.hawaii.edu</a>.<br>The exact URL is:<br><br><a href="http://apdrc.soest.hawaii.edu:80/dods/public_data/satellite_product/AVHRR/avhrr_mon">http://apdrc.soest.hawaii.edu:80/dods/public_data/satellite_product/AVHRR/avhrr_mon</a><br><br>for the monthly values (and these are aggregated).<br><br>Jim<br><br>Namba Takaya wrote:<br><blockquote type="cite">Dear Sir<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I tried to read the HDF file of pathfinder monthly sst via opendap<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Fortunately I could read the sst data by xdfopen and data descriptor<br></blockquote><blockquote type="cite">file(bsst.ctl) as bellow,<br></blockquote><blockquote type="cite">Then I tried to develop using % of DSET in the data descriptor file.<br></blockquote><blockquote type="cite">Then I have a problem explained below and could you tell me how to<br></blockquote><blockquote type="cite">solve the problem?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Best Regards, Takaya Namba<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">bsst.ctl (data descriptor file)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">DSET<br></blockquote><blockquote type="cite">http://data.nodc.noaa.gov/opendap/pathfinder/Version5.0/Monthly/1985/198501.s04m1pfv50-bsst-16b.hdf<br></blockquote><blockquote type="cite">options yrev<br></blockquote><blockquote type="cite">***DSET<br></blockquote><blockquote type="cite">http://data.nodc.noaa.gov/opendap/pathfinder/Version5.0/Monthly/%y4/%y4%m2.s04m1pfv50-bsst-16b.hdf<br></blockquote><blockquote type="cite">TITLE This is a sample<br></blockquote><blockquote type="cite">UNDEF 99999.0<br></blockquote><blockquote type="cite">YDEF lat 4096 LINEAR -90 0.043945<br></blockquote><blockquote type="cite">XDEF lon 8192 LINEAR -180 0.043945<br></blockquote><blockquote type="cite">***TDEF time 1 linear 00:00z1! 5JAN1985 1mo<br></blockquote><blockquote type="cite">VARS 1:<br></blockquote><blockquote type="cite">bsst=>bsst 1 99 surface temperature<br></blockquote><blockquote type="cite">ENDVARS<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">However, I would like to use<br></blockquote><blockquote type="cite">DSET<br></blockquote><blockquote type="cite">http://data.nodc.noaa.gov/opendap/pathfinder/Version5.0/Monthly/%y4/%y4%m2.s04m1pfv50-bsst-16b.hdf<br></blockquote><blockquote type="cite">instead of<br></blockquote><blockquote type="cite">DSET<br></blockquote><blockquote type="cite">http://data.nodc.noaa.gov/opendap/pathfinder/Version5.0/Monthly/1985/198501.s04m1pfv50-bsst-16b.hdf.<br></blockquote><blockquote type="cite">Because I would like to do all the thirty years from jan 1988 to 2009.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I added the line in the bsst.ctl<br></blockquote><blockquote type="cite">TDEF time 1 linear 00:00z15JAN1985 1mo<br></blockquote><blockquote type="cite">and then<br></blockquote><blockquote type="cite">grads -cl batch-opendap.gs.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">However, the error comes like below,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Error: nc_open failed to open file<br></blockquote><blockquote type="cite">http://data.nodc.noaa.gov/opendap/pathfinder/Version5.0/Monthly/%y4/%y4%m2.s04m1pfv50-bsst-16b.hdf<br></blockquote><blockquote type="cite">NetCDF: DAP server error<br></blockquote><blockquote type="cite">gadsdf: Couldn't i! ngest SDF metadata.<br></blockquote><blockquote type="cite">SDF Descriptor file bsst.ctl was not suc cessfully opened & parsed.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I understand that I could not replace /%y4/%y4%m2 with /1985/198501 by<br></blockquote><blockquote type="cite">the data descriptor file.<br></blockquote><blockquote type="cite">Could you tell me how can I replace by the proper descriptor file as I<br></blockquote><blockquote type="cite">expected?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">(batch-opendap.gs grads script file)<br></blockquote><blockquote type="cite">'set gxout shaded'<br></blockquote><blockquote type="cite">'xdfopen bsst.ctl'<br></blockquote><blockquote type="cite">'q file'<br></blockquote><blockquote type="cite">say result<br></blockquote><blockquote type="cite">'set lat 10 50'<br></blockquote><blockquote type="cite">'set lon 120 170'<br></blockquote><blockquote type="cite">'set T 1'<br></blockquote><blockquote type="cite">'set Z 1'<br></blockquote><blockquote type="cite">'d bsst'<br></blockquote><blockquote type="cite">'cbar'<br></blockquote><blockquote type="cite">'quit'<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">dncdump -h<br></blockquote><blockquote type="cite">"http://data.nodc.noaa.gov/opendap/pathfinder/Version5.0/Monthly/1985/198501.s04m1pfv50-bsst-16b.hdf"<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">is as below,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">netcdf 198501.s04m1pfv50-bsst-16b { // format variant: 64bit<br></blockquote><blockquote type="cite">dimensions:<br></blockquote><blockquote type="cite">lat = 4096 ;<br></blockquote><blockquote type="cite">&n! bsp; lon = 8192 ;<br></blockquote><blockquote type="cite">variables:<br></blockquote><blockquote type="cite">short bsst(lat, lon) ;<br></blockquote><blockquote type="cite">bsst:dsp_PixelType = 1b ;<br></blockquote><blockquote type="cite">bsst:dsp_PixelSize = 2b ;<br></blockquote><blockquote type="cite">bsst:dsp_Flag = 0s ;<br></blockquote><blockquote type="cite">bsst:dsp_nBits = 16s ;<br></blockquote><blockquote type="cite">bsst:dsp_LineSize = 0 ;<br></blockquote><blockquote type="cite">bsst:dsp_cal_name = "Temperature" ;<br></blockquote><blockquote type="cite">bsst:units = "Temp" ;<br></blockquote><blockquote type="cite">bsst:dsp_cal_eqnNumber = 2s ;<br></blockquote><blockquote type="cite">bsst:dsp_cal_CoeffsLeng! th = 8s ;<br></blockquote><blockquote type="cite">&n bsp; bsst:dsp_cal_coeffs = 0.075f, -3.f ;<br></blockquote><blockquote type="cite">bsst:scale_factor = 0.075f ;<br></blockquote><blockquote type="cite">bsst:add_off = -3.f ;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">------------------------------------------------------------------------<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">gradsusr mailing list<br></blockquote><blockquote type="cite">gradsusr@gradsusr.org<br></blockquote><blockquote type="cite">http://gradsusr.org/mailman/listinfo/gradsusr<br></blockquote><blockquote type="cite"><br></blockquote>_______________________________________________<br>gradsusr mailing list<br>gradsusr@gradsusr.org<br>http://gradsusr.org/mailman/listinfo/gradsusr<br></div></blockquote></div><br><div apple-content-edited="true"> <div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 12px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams</div><div>IGES/COLA</div><div>4041 Powder Mill Road, Suite 302</div><div>Calverton, MD 20705</div><div><a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></div> </div><br></body></html>