<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }div.foxdiv20140814100404963852 { }body { font-size: 10.5pt; font-family: 微软雅黑; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>I have no experience to write grib file although I have done some job to decode it. But it's easy for me to convert the data to GrADS binary or netCDF data formats which can be used in GrADS software.</div>
<div><br></div><div>Regards</div><div>Yaqiang</div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><span style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;">*************************************************</span><br style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;"><span style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;">Dr. Yaqiang Wang</span><br style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;"><span style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;">Chinese Academy of Meteorological Sciences (CAMS)</span><br style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;"><span style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;">46, Zhong-Guan-Cun South Avenue</span><br style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;"><span style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;">Beijing, 100081</span><br style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;"><span style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;">China</span><br style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;"><span style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;">             </span><br style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;"><a href="mailto:yaqiang.wang@gmail.com" target="_blank" style="font-family: 微软雅黑; font-size: 14px; line-height: 21px;">yaqiang.wang@gmail.com</a><br style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;"><br style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;"><a href="http://www.meteothinker.com" target="_blank" style="font-family: 微软雅黑; font-size: 14px; line-height: 21px;">http://www.meteothinker.com</a><br style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;"><span style="color: rgb(136, 136, 136); font-family: 微软雅黑; font-size: 14px; line-height: 21px;">**************************************************</span></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div>&nbsp;</div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b>&nbsp;<a href="mailto:claudiomet@gmail.com">claudiomet</a></div><div><b>Date:</b>&nbsp;2014-08-14&nbsp;02:39</div><div><b>To:</b>&nbsp;<a href="mailto:gradsusr@gradsusr.org">GrADS Users Forum</a></div><div><b>Subject:</b>&nbsp;Re: [gradsusr] calpuff model output in ascii matrix to grib format</div></div></div><div><div class="FoxDiv20140814100404963852"><div dir="ltr"><div><div><div><div>Hello Dr. Yaqiang Wang ! and thanks for the answer.<br></div><br></div>In effect, the files are Surfer grid files and actually I plot this files using a VBA script.<br>The coordinates are in UTM WGS-84, but I have no problems to transform to degree and replace with sed in each file, and delete the footer with extra information (a simple bash script to mass processing).<br>
<br></div>With all of this solved,&nbsp; how can I create grib files and what kind of another extra info I need?<br></div>Thanks again!<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-08-13 3:00 GMT-04:00 <a href="mailto:yaqiang.wang@gmail.com">yaqiang.wang@gmail.com</a> <span dir="ltr">&lt;<a href="mailto:yaqiang.wang@gmail.com" target="_blank">yaqiang.wang@gmail.com</a>&gt;</span>:<br>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div>
<div><span></span>The data format is Sufer ASCII grid data format but with some extra information lines at the end.</div>
<div><br></div><div>The x and y coordinate are not longitude and latitude considering the values from the head lines of the data. So the projection parameters are needed to plot the data in rigth place on the earth or convert it to grib data format.</div>
<div><br></div><div><span style="background-color:rgba(0,0,0,0)">DSAA<br>         100         100<br>    463.3000    483.1000<br>   7772.4004   7792.2002<br>  0.4900E+02  0.1420E+04</span></div><div><span style="background-color:rgba(0,0,0,0)"><br>
</span></div><div><span style="background-color:rgba(0,0,0,0)">Regards</span></div><div><span style="background-color:rgba(0,0,0,0)">Yaqiang</span></div><hr style="width:210px;min-height:1px" color="#b5c4df" align="left" size="1">
<div><span><div style="MARGIN:10px;FONT-FAMILY:verdana;FONT-SIZE:10pt"><span style="color:rgb(136,136,136);font-family:微软雅黑;font-size:14px;line-height:21px">*************************************************</span><br style="color:rgb(136,136,136);font-family:微软雅黑;font-size:14px;line-height:21px">
<span style="color:rgb(136,136,136);font-family:微软雅黑;font-size:14px;line-height:21px">Dr. Yaqiang Wang</span><br style="color:rgb(136,136,136);font-family:微软雅黑;font-size:14px;line-height:21px"><span style="color:rgb(136,136,136);font-family:微软雅黑;font-size:14px;line-height:21px">Chinese Academy of Meteorological Sciences (CAMS)</span><br style="color:rgb(136,136,136);font-family:微软雅黑;font-size:14px;line-height:21px">
<span style="color:rgb(136,136,136);font-family:微软雅黑;font-size:14px;line-height:21px">46, Zhong-Guan-Cun South Avenue</span><br style="color:rgb(136,136,136);font-family:微软雅黑;font-size:14px;line-height:21px"><span style="color:rgb(136,136,136);font-family:微软雅黑;font-size:14px;line-height:21px">Beijing, 100081</span><br style="color:rgb(136,136,136);font-family:微软雅黑;font-size:14px;line-height:21px">
<span style="color:rgb(136,136,136);font-family:微软雅黑;font-size:14px;line-height:21px">China</span><br style="color:rgb(136,136,136);font-family:微软雅黑;font-size:14px;line-height:21px"><span style="color:rgb(136,136,136);font-family:微软雅黑;font-size:14px;line-height:21px">             </span><br style="color:rgb(136,136,136);font-family:微软雅黑;font-size:14px;line-height:21px">
<a href="mailto:yaqiang.wang@gmail.com" style="font-family:微软雅黑;font-size:14px;line-height:21px" target="_blank">yaqiang.wang@gmail.com</a><br style="color:rgb(136,136,136);font-family:微软雅黑;font-size:14px;line-height:21px">
<br style="color:rgb(136,136,136);font-family:微软雅黑;font-size:14px;line-height:21px"><a href="http://www.meteothinker.com" style="font-family:微软雅黑;font-size:14px;line-height:21px" target="_blank">http://www.meteothinker.com</a><br style="color:rgb(136,136,136);font-family:微软雅黑;font-size:14px;line-height:21px">
<span style="color:rgb(136,136,136);font-family:微软雅黑;font-size:14px;line-height:21px">**************************************************</span></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div>&nbsp;</div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT:8px;PADDING-LEFT:8px;FONT-SIZE:12px;FONT-FAMILY:tahoma;COLOR:#000000;BACKGROUND:#efefef;PADDING-BOTTOM:8px;PADDING-TOP:8px">
<div><b>From:</b>&nbsp;<a href="mailto:claudiomet@gmail.com" target="_blank">claudiomet</a></div><div><b>Date:</b>&nbsp;2014-08-13&nbsp;01:57</div><div><b>To:</b>&nbsp;<a href="mailto:gradsusr@gradsusr.org" target="_blank">GRADS USERS</a></div>
<div><b>Subject:</b>&nbsp;[gradsusr] calpuff model output in ascii matrix to grib format</div></div></div><div><div class="h5"><div><div><div dir="ltr"><div><div><div><div><div><div><div>Hi users!<br><br></div>I have a model called CALPUFF, one of the output format of this model are ASCII files in matrix format. I attach files for example, there are 5 files with 5 forecast hours.<br>
<br></div>the first five lines are only information:<br></div>1) format<br></div>2) number of points in x y<br></div>3) start and end coordinate in x<br></div>4) start and end coordinate in y<br></div>5) minimum and maximum value in entire matrix<br clear="all">
<div><div><div><div><div><div><div><div><div><br></div><div>and the rest of the file is the matrix.<br><br></div><div>How can I write this files in grib format (multiplie or single file) to plot this information in GrADS?<br>
<br></div><div>I'm reading articles like this<br><br><a href="http://cookbooks.opengrads.org/index.php?title=Recipe-012:_Converting_GPCC_ASCII_files_to_Binary_and_GRIB-1" target="_blank">http://cookbooks.opengrads.org/index.php?title=Recipe-012:_Converting_GPCC_ASCII_files_to_Binary_and_GRIB-1</a><br>
<br>But I'm not a Fortran master :(<br><br></div><div>Thanks in advance!<br></div><div><br>-- <br><div dir="ltr">Claudio Cortes N.<br><span style="font-family:arial narrow,sans-serif"><span style="color:rgb(68,68,68)"><span style="font-family:tahoma,sans-serif"><font><br>
</font></span></span></span></div>
</div></div></div></div></div></div></div></div></div></div>
</div></div></div></div></blockquote>
</div><br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Claudio Cortes N.<br>Project Engineer<br>Environmental Area<br>MICOMO S.A.<br>Tel: +56 (2) 22400516<br>Cel: +56 (9) 65871064<br><a href="mailto:ccortes@micomo.cl" target="_blank">ccortes@micomo.cl</a><br>
<a href="http://www.micomo.cl" target="_blank">www.micomo.cl</a><br>Antonio Rabat Sur 6165, Vitacura<br>Región Metropolitana, Chile<span style="font-family:arial narrow,sans-serif"><span style="color:rgb(68,68,68)"><span style="font-family:tahoma,sans-serif"><font><br>
</font></span></span></span></div>
</div>
</div></div></blockquote>
</body></html>