<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span></span></div><div></div><div><span>Dear all,</span></div><div><span></span><span>Could <span id="yiv1784184641misspell-0">you</span> please let me know if anyone have idea about converting the <span id="yiv1784184641misspell-1" class="yiv1784184641mark">TXT</span> or ASCII data into <span id="yiv1784184641misspell-2" class="yiv1784184641mark">NetCDF</span>?</span></div><div><span></span><span>Please attached is the file required to be transformed into <span id="yiv1784184641misspell-3" class="yiv1784184641mark">NetCDF</span>.</span></div><div><span></span><span><var id="yui-ie-cursor"></var>Please below is the program I used to convert from binary to <span id="yiv1784184641misspell-4" class="yiv1784184641mark">TXT</span></span></div><div><blockquote style="padding-left: 5px; margin-top: 5px; margin-left: 5px;
border-left-color: rgb(16, 16, 255); border-left-width: 2px; border-left-style: solid;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><div id="yiv1784184641"><div><div style="color: rgb(0, 0, 0); font-family: times new roman, new york, times, serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><div><span></span> </div><div><span>PROGRAM convert_<span id="yiv1784184641misspell-5" class="yiv1784184641mark">rfe</span>_bin2<span id="yiv1784184641misspell-6" class="yiv1784184641mark">asc</span><br><br>c <span id="yiv1784184641misspell-7" class="yiv1784184641mark">cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc</span><br>c Program: convert_<span id="yiv1784184641misspell-8" class="yiv1784184641mark">rfe</span>2.f<br>c<br>c Description: This program reads in a daily <span
id="yiv1784184641misspell-9" class="yiv1784184641mark">RFE</span> (rainfall estimate) file<br>c (version 2) in .bin format and creates an <span id="yiv1784184641misspell-10" class="yiv1784184641mark">ascii</span> integer<br>c file. Each file contains <span id="yiv1784184641misspell-11" class="yiv1784184641mark">rfe</span> coordinate data ordered by rows.<br>c Rainfall resolution is 0.1 degree with a domain of<br>c 20W-55E, 40S-40N.<br>c<br>c Inputs: 'input_file' = the 10-day binary <span id="yiv1784184641misspell-12" class="yiv1784184641mark">precip</span> file to be converted<br>c<br>c Output: 'output.<span
id="yiv1784184641misspell-13" class="yiv1784184641mark">txt</span>' = the output <span id="yiv1784184641misspell-14" class="yiv1784184641mark">ascii</span> converted text file<br>c<br>c Modified: July, 2010 by Nick Novella (nicholas.novella@noaa.gov)<br>c<br>c <span id="yiv1784184641misspell-15" class="yiv1784184641mark">cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc</span><br><br>        REAL*4 <span id="yiv1784184641misspell-16" class="yiv1784184641mark">rfe</span>(751,801),arr(3,601551)<br>        real*4 lat,<span id="yiv1784184641misspell-17" class="yiv1784184641mark">lon</span><br>        INTEGER:: i,j,ind<br>        character*25:: input_file<br><br>c ##### CHANGE FILE NAME BELOW TO INPUT FILE #####<br><br>        input_file="all_products.bin.20100621"<br><br>c ##################################################<br><br>c ##### Initialize the arrays #####<br>        do i = 1,751 <br>        do j = 1,801 <br>         <span
id="yiv1784184641misspell-18" class="yiv1784184641mark">rfe</span> (i,j) = -999<br>        end do<br>        end do<br><br>c ##### Read in the input rainfall data #####<br>        open
(unit=22,file=input_file,access="direct",<br>        1        convert='big_<span id="yiv1784184641misspell-19" class="yiv1784184641mark">endian</span>',status="old",<span id="yiv1784184641misspell-20" class="yiv1784184641mark">recl</span>=751*801*4)<br>        read (22, rec=1) <span id="yiv1784184641misspell-21" class="yiv1784184641mark">rfe</span> <br><br>c ##### Open the output file #####<br>        open (88,file="output.<span id="yiv1784184641misspell-22" class="yiv1784184641mark">txt</span>",access='sequential',<br>        1        status='unknown',form='formatted')<br><br>c ##### The next code converts the input rainfall data. Each row is then written<br>c to the output file.<br><br>        ind=1 <br>         lat= -40.0<br>        <span id="yiv1784184641misspell-23" class="yiv1784184641mark">lon</span>= -20.0 <br>        do j=1,801<br>        do i=1,751<br>
arr(1,ind)=lat<br> arr(2,ind)=<span id="yiv1784184641misspell-24" class="yiv1784184641mark">lon</span><br> arr(3,ind)=<span id="yiv1784184641misspell-25" class="yiv1784184641mark">rfe</span>(i,j)<br><br>        write (88,499) arr(1,ind), arr(2,ind), arr(3,ind)<br>499        format(1X,f6.2,1X,f6.2,1X,f8.2)<br><br>         ind=ind+1<br>         <span id="yiv1784184641misspell-26" class="yiv1784184641mark">lon</span>=<span id="yiv1784184641misspell-27" class="yiv1784184641mark">lon</span>+0.1<br>        end do<br> lat=lat+0.1<br> <span id="yiv1784184641misspell-28" class="yiv1784184641mark">lon</span>=-20.0<br>        end do<br><br><br><br><br><br> END PROGRAM<br></span></div><div></div><div> </div><div><font size="3" face="times new roman, new york,
times, serif">With my kind regards<br>Gamal<br>___________________________________________________________<br><b>Gamal <span id="yiv1784184641misspell-31" class="yiv1784184641mark">Salah</span> El Afandi, <span id="yiv1784184641misspell-33" class="yiv1784184641mark">Ph</span>.D.
<br>College of Agricultural, Environment and Nutrition Sciences </b></font></div>
<div><font size="3" face="times new roman, new york, times, serif"><b>College of Engineering <br>Tuskegee University, Tuskegee Alabama USA<br></b><br></font><a href="http://www.tuskegee.edu/" rel="nofollow" target="_blank"><font size="3" face="times new roman, new york, times, serif">http://www.tuskegee.edu/</font></a><br><a href="http://www.tuskegee.edu/academics/colleges/caens.aspx" rel="nofollow" target="_blank"><font size="3" face="times new roman, new york, times, serif">http://www.tuskegee.edu/academics/colleges/caens.aspx</font></a><br><a href="http://www.tuskegee.edu/academics/colleges/ceps.aspx" rel="nofollow" target="_blank"><font size="3" face="times new roman, new york, times, serif">http://www.tuskegee.edu/academics/colleges/ceps.aspx</font></a><br><a href="http://maindb.unfccc.int/public/roe/expert_list.pl?id_country=66&" rel="nofollow" target="_blank"><font size="3" face="times new roman, new york, times,
serif">http://maindb.unfccc.int/public/roe/expert_list.pl?id_country=66&</font></a><font size="3" face="times new roman, new york, times, serif">;<br></font><a href="http://www.itap.purdue.edu/pto/NATO_KEEO/partCoDir_en.html" rel="nofollow" target="_blank"><font size="3" face="times new roman, new york, times, serif">http://www.itap.purdue.edu/pto/NATO_KEEO/partCoDir_en.html</font></a><br><a href="http://www.ucar.edu/governance/iap/iapreps.shtml" rel="nofollow" target="_blank"><font size="3" face="times new roman, new york, times, serif">http://www.ucar.edu/governance/iap/iapreps.shtml</font></a></div>
<div> </div></div></div></div><br><br> </div> </div> </blockquote></div> </div></body></html>