<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:メイリオ
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
<span class="Apple-style-span" style="font-family: 'MS PGothic', 'MS UI Gothic', Osaka; line-height: 17px; color: rgb(42, 42, 42); ">Dear Jennifer</span><div><font class="Apple-style-span" color="#2A2A2A" face="'MS PGothic', 'MS UI Gothic', Osaka"><span class="Apple-style-span" style="line-height: 17px;"><br></span></font></div><div><font class="Apple-style-span" color="#2A2A2A" face="'MS PGothic', 'MS UI Gothic', Osaka"><span class="Apple-style-span" style="line-height: 17px;">Thank you very much for your advice.</span></font></div><div><font class="Apple-style-span" color="#2A2A2A" face="'MS PGothic', 'MS UI Gothic', Osaka"><span class="Apple-style-span" style="line-height: 17px;">I made it following your suggestion.</span></font></div><div><font class="Apple-style-span" color="#2A2A2A" face="'MS PGothic', 'MS UI Gothic', Osaka"><span class="Apple-style-span" style="line-height: 17px;"><br></span></font></div><div><font class="Apple-style-span" color="#2A2A2A" face="'MS PGothic', 'MS UI Gothic', Osaka"><span class="Apple-style-span" style="line-height: 17px;">Best Regards,</span></font></div><div><font class="Apple-style-span" color="#2A2A2A" face="'MS PGothic', 'MS UI Gothic', Osaka"><span class="Apple-style-span" style="line-height: 17px;">Takaya Namba<br></span></font><br><div><hr id="stopSpelling">From: jma@cola.iges.org<br>To: gradsusr@gradsusr.org<br>Date: Tue, 21 Jun 2011 08:43:24 -0400<br>Subject: Re: [gradsusr] xdfopen via opendap (developed from re Re: sdfopen        with opendap file)<br><br><br><div><div>On Jun 20, 2011, at 3:57 PM, James T. Potemra wrote:</div><br class="ecxApple-interchange-newline"><blockquote><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.&nbsp;</div><div><br></div><div>As for the descriptor file, this is what works for me:</div><div><div><br></di
v><div>dset <a href="http://data.nodc.noaa.gov/opendap/pathfinder/Version5.0/Monthly/" target="_blank">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.&nbsp;</div><div><br></div><div>--Jennifer</div><div><br></div><div><br></div><br><blockquote><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" target="_blank">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" target="_blank">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>Dear Sir<br></blockquote><blockquote><br></blockquote><blockquote>I tried to read the HDF file of pathfinder monthly sst via opendap<br></blockquote><blockquote><br></blockquote><blockquote>Fortunately I could read the sst data by xdfopen and data descriptor<br></blockquote><blockquote>file(bsst.ctl) as bellow,<br></blockquote><blockquote>Then I tried to develop using 
% of DSET in the data descriptor file.<br></blockquote><blockquote>Then I have a problem explained below and could you tell me how to<br></blockquote><blockquote>solve the problem?<br></blockquote><blockquote><br></blockquote><blockquote>Best Regards, Takaya Namba<br></blockquote><blockquote><br></blockquote><blockquote>bsst.ctl (data descriptor file)<br></blockquote><blockquote><br></blockquote><blockquote>DSET<br></blockquote><blockquote>http://data.nodc.noaa.gov/opendap/pathfinder/Version5.0/Monthly/1985/198501.s04m1pfv50-bsst-16b.hdf<br></blockquote><blockquote>options yrev<br></blockquote><blockquote>***DSET<br></blockquote><blockquote>http://data.nodc.noaa.gov/opendap/pathfinder/Version5.0/Monthly/%y4/%y4%m2.s04m1pfv50-bsst-16b.hdf<br></blockquote><blockquote>TITLE This is a sample<br></blockquote><blockquote>UNDEF 99999.0<br></blockquote><blockquote>YDEF lat 4096 LINEAR -90 0.043945<br></blockquote><blockquote>XDEF lon 8192 LINEAR -180 0.043945<br></blockquote><blockquote>***TDEF time 1 linear 00:00z1! 5JAN1985 1mo<br></blockquote><blockquote>VARS 1:<br></blockquote><blockquote>bsst=&gt;bsst 1 99 surface temperature<br></blockquote><blockquote>ENDVARS<br></blockquote><blockquote><br></blockquote><blockquote><br></blockquote><blockquote>However, I would like to use<br></blockquote><blockquote>DSET<br></blockquote><blockquote>http://data.nodc.noaa.gov/opendap/pathfinder/Version5.0/Monthly/%y4/%y4%m2.s04m1pfv50-bsst-16b.hdf<br></blockquote><blockquote>instead of<br></blockquote><blockquote>DSET<br></blockquote><blockquote>http://data.nodc.noaa.gov/opendap/pathfinder/Version5.0/Monthly/1985/198501.s04m1pfv50-bsst-16b.hdf.<br></blockquote><blockquote>Because I would like to do all the thirty years from jan 1988 to 2009.<br></blockquote><blockquote><br></blockquote><blockquote>I added the line in the bsst.ctl<br></blockquote><blockquote>TDEF time 1 linear 00:00z15JAN1985 1mo<br></blockquote><blockquote>and then<br></blockquote><blockquote>grads -cl batch-opendap.gs.<br></blockquote><blockquote><br></blockquote>
<blockquote>However, the error comes like below,<br></blockquote><blockquote><br></blockquote><blockquote>Error: nc_open failed to open file<br></blockquote><blockquote>http://data.nodc.noaa.gov/opendap/pathfinder/Version5.0/Monthly/%y4/%y4%m2.s04m1pfv50-bsst-16b.hdf<br></blockquote><blockquote>NetCDF: DAP server error<br></blockquote><blockquote>gadsdf: Couldn't i! ngest SDF metadata.<br></blockquote><blockquote>SDF Descriptor file bsst.ctl was not suc cessfully opened &amp; parsed.<br></blockquote><blockquote><br></blockquote><blockquote>I understand that I could not replace /%y4/%y4%m2 with /1985/198501 by<br></blockquote><blockquote>the data descriptor file.<br></blockquote><blockquote>Could you tell me how can I replace by the proper descriptor file as I<br></blockquote><blockquote>expected?<br></blockquote><blockquote><br></blockquote><blockquote>(batch-opendap.gs grads script file)<br></blockquote><blockquote>'set gxout shaded'<br></blockquote><blockquote>'xdfopen bsst.ctl'<br></blockquote><blockquote>'q file'<br></blockquote><blockquote>say result<br></blockquote><blockquote>'set lat 10 50'<br></blockquote><blockquote>'set lon 120 170'<br></blockquote><blockquote>'set T 1'<br></blockquote><blockquote>'set Z 1'<br></blockquote><blockquote>'d bsst'<br></blockquote><blockquote>'cbar'<br></blockquote><blockquote>'quit'<br></blockquote><blockquote><br></blockquote><blockquote><br></blockquote><blockquote>dncdump -h<br></blockquote><blockquote>"http://data.nodc.noaa.gov/opendap/pathfinder/Version5.0/Monthly/1985/198501.s04m1pfv50-bsst-16b.hdf"<br></blockquote><blockquote><br></blockquote><blockquote>is as below,<br></blockquote><blockquote><br></blockquote><blockquote>netcdf 198501.s04m1pfv50-bsst-16b { // format variant: 64bit<br></blockquote><blockquote>dimensions:<br></blockquote><blockquote>lat = 4096 ;<br></blockquote><blockquote>&amp;n! bsp; lon = 8192 ;<br></blockquote><blockquote>variables:<br></blockquote><blockquote>short bsst(lat, lon) ;<br></blockquote><blockquote>bsst:dsp_PixelType = 1b ;<br></blo
ckquote><blockquote>bsst:dsp_PixelSize = 2b ;<br></blockquote><blockquote>bsst:dsp_Flag = 0s ;<br></blockquote><blockquote>bsst:dsp_nBits = 16s ;<br></blockquote><blockquote>bsst:dsp_LineSize = 0 ;<br></blockquote><blockquote>bsst:dsp_cal_name = "Temperature" ;<br></blockquote><blockquote>bsst:units = "Temp" ;<br></blockquote><blockquote>bsst:dsp_cal_eqnNumber = 2s ;<br></blockquote><blockquote>bsst:dsp_cal_CoeffsLeng! th = 8s ;<br></blockquote><blockquote>&amp;n bsp; bsst:dsp_cal_coeffs = 0.075f, -3.f ;<br></blockquote><blockquote>bsst:scale_factor = 0.075f ;<br></blockquote><blockquote>bsst:add_off = -3.f ;<br></blockquote><blockquote><br></blockquote><blockquote><br></blockquote><blockquote><br></blockquote><blockquote><br></blockquote><blockquote><br></blockquote><blockquote>------------------------------------------------------------------------<br></blockquote><blockquote><br></blockquote><blockquote>_______________________________________________<br></blockquote><blockquote>gradsusr mailing list<br></blockquote><blockquote>gradsusr@gradsusr.org<br></blockquote><blockquote>http://gradsusr.org/mailman/listinfo/gradsusr<br></blockquote><blockquote><br></blockquote>_______________________________________________<br>gradsusr mailing list<br>gradsusr@gradsusr.org<br>http://gradsusr.org/mailman/listinfo/gradsusr<br></div></blockquote></div><br><div> <div style="word-wrap:break-word;font-size:12px"><span class="ecxApple-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;text-indent:0px;text-transform:none;orphans:2;white-space:normal;widows:2;word-spacing:0px"><span class="ecxApple-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;text-indent:0px;
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="ecxkhtml-block-placeholder"></div><br class="ecxApple-interchange-newline"></span></span></div> </div><br><br>_______________________________________________
gradsusr mailing list
gradsusr@gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr</div></div>                                               </div></body>
</html>