<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div><div>Dear all,</div><div>I am trying to construct two files, a binary and a CTL, from 5 NC files format. To do that job, first I opened the NC file into GrAds to get infos (with "q ctlinfo" command) to prepare my GrAds script to produce the files.</div><div><br></div><div><br></div><div>The <b>q ctlinfo</b> command give me the following lines for one NC file:</div><div><br></div><div><br></div><div><font class="Apple-style-span" color="#e81f13">dset ta_A1_1960_1999.nc</font></div><div><font class="Apple-style-span" color="#e81f13">title CNRM &nbsp;model output prepared for IPCC Fourth Assessment climate of the 20th Century experiment (20C3M)</font></div><div><font class="Apple-style-span" color="#e81f13">undef 1e+20</font></div><div><font class="Apple-style-span" color="#e81f13">dtype netcdf</font></div><div><font class="Apple-style-span" color="#e81f13">xdef 128 linear 0 2.8125</font></div><div><font class="Apple-style-span" color="#e81f13">ydef 64 levels -87.8638 -85.0965 -82.3129 -79.5256 -76.7369 -73.9475 -71.1577 -68.3678</font></div><div><font class="Apple-style-span" color="#e81f13">&nbsp;-65.5776 -62.7873 -59.997 -57.2066 -54.4162 -51.6257 -48.8352 -46.0447 -43.2542 -40.4636</font></div><div><font class="Apple-style-span" color="#e81f13">&nbsp;-37.6731 -34.8825 -32.0919 -29.3014 -26.5108 -23.7202 -20.9296 -18.139 -15.3484 -12.5578</font></div><div><font class="Apple-style-span" color="#e81f13">&nbsp;-9.76715 -6.97653 -4.18592 -1.39531 1.39531 4.18592 6.97653 9.76715 12.5578 15.3484</font></div><div><font class="Apple-style-span" color="#e81f13">&nbsp;18.139 20.9296 23.7202 26.5108 29.3014 32.0919 34.8825 37.6731 40.4636 43.2542</font></div><div><font class="Apple-style-span" color="#e81f13">&nbsp;46.0447 48.8352 51.6257 54.4162 57.2066 59.997 62.7873 65.5776 68.3678 71.1577</font></div><div><font class="Apple-style-span" color="#e81f13">&nbsp;73.9475 76.7369 79.5256 82.3129 85.0965 87.8638</font></div><div><font class="Apple-style-span" color="#e81f13">zdef 17 levels 100000 92500 85000 70000 60000 50000 40000 30000</font></div><div><font class="Apple-style-span" color="#e81f13">&nbsp;25000 20000 15000 10000 7000 5000 3000 2000 1000</font></div><div><font class="Apple-style-span" color="#e81f13">tdef 480 linear 12Z16JAN1960 1mo</font></div><div><font class="Apple-style-span" color="#e81f13">vars 1</font></div><div><font class="Apple-style-span" color="#e81f13">ta=&gt;ta &nbsp;17 &nbsp;t,z,y,x &nbsp;Temperature</font></div><div><font class="Apple-style-span" color="#e81f13">endvars</font></div><div><br></div><div><br></div><div>And from this information I prepared my GrAds script (listened in the end of the e-mail message).&nbsp;</div><div><br></div><div>But, I get surprised when compared both graph outputs (in attach). As you can note they differ from each other.</div><div><br></div><div>What should I do to fix this kind of problem?&nbsp;</div><div><br></div><div>Thanks in advance,</div><div><br></div><div><br></div><div><b>The GrAds script is:</b></div><div><br></div><div>* This program selects a binary file with u, v, T and w (necessary data form energy computation)</div><div>* data to be read by the thermo.gs program</div><div><br></div><div>'reinit'</div><div><br></div><div>'sdfopen &nbsp;ua_A1_1960_1999.nc'</div><div>'sdfopen &nbsp;va_A1_1960_1999.nc'</div><div>'sdfopen &nbsp;ta_A1_1960_1999.nc'</div><div>'sdfopen &nbsp;wap_A1_1960_1999.nc'</div><div>'sdfopen &nbsp;zg_A1_1960_1999.nc'</div><div><br></div><div>frase='ua.1 va.2 ta.3 wap.4 zg.5'</div><div><br></div><div><br></div><div>***********************************************************</div><div>'q file'</div><div>rc=sublin(result,5)</div><div>nt=subwrd(rc,12)</div><div>nl=subwrd(rc,9)</div><div>nx=subwrd(rc,3)</div><div>ny=subwrd(rc,6)</div><div>rc=sublin(result,6)</div><div>'q time'</div><div>td=subwrd(result,3)</div><div>ano=substr(td, 9, 4)</div><div><br></div><div>say n_tempos ' &nbsp;'nt</div><div>say n_niveis ' &nbsp;'nl</div><div>say n_lons &nbsp; ' &nbsp;'nx</div><div>say n_lats &nbsp; ' &nbsp;'ny</div><div>say n_ano &nbsp; &nbsp;' &nbsp;'ano</div><div>say npz1 &nbsp; &nbsp; ' &nbsp;'12</div><div><br></div><div>&nbsp;</div><div>***********************************************************</div><div><br></div><div>'set fwrite uvtwg.bin'</div><div><br></div><div>'set gxout fwrite'</div><div>'set x 1 128 '</div><div>'set y 1 64 '</div><div><br></div><div>i=109</div><div><br></div><div><br></div><div>while (i &lt;= 480)</div><div>'set t ' i</div><div><br></div><div>&nbsp; v=1</div><div>&nbsp;while(v &lt;= 5)</div><div>&nbsp;var=subwrd(frase,v)&nbsp;</div><div>&nbsp; j=1</div><div>&nbsp;&nbsp;</div><div>&nbsp;&nbsp;</div><div>while (j &lt;= 12)</div><div>&nbsp; &nbsp;'set z ' j</div><div><br></div><div>&nbsp; &nbsp; 'd 'var''&nbsp;</div><div><br></div><div>&nbsp; &nbsp;j=j+1</div><div>&nbsp; endwhile</div><div>&nbsp;v=v+1</div><div>&nbsp;endwhile</div><div><br></div><div>i=i+1</div><div>endwhile</div><div><br></div><div>'disable fwrite'</div><div><br></div><div>**********************************************************</div><div>write (uvtwg.ctl,'dset &nbsp; ^uvtwg.bin')</div><div>write (uvtwg.ctl,'undef &nbsp;1e+20 ')</div><div>write (uvtwg.ctl,'title &nbsp;CNRM &nbsp;model output prepared for IPCC Fourth Assessment climate of the 20th Century experiment (20C3M) ')</div><div>write (uvtwg.ctl,"xdef 128 linear 0 2.8125 &nbsp;")</div><div>write (uvtwg.ctl,"ydef 64 levels &nbsp; &nbsp;-87.8638 -85.0965 -82.3129 -79.5256 -76.7369 -73.9475 -71.1577 -68.3678 -65.5776 -62.7873 -59.997 -57.2066 -54.4162 -51.6257 -48.8352 -46.0447 -43.2542 -40.4636 -37.6731 -34.8825 -32.0919 -29.3014 -26.5108 -23.7202 -20.9296 -18.139 -15.3484 -12.5578 -9.76715 -6.97653 -4.18592 -1.39531 1.39531 4.18592 6.97653 9.76715 12.5578 15.3484 18.139 20.9296 23.7202 26.5108 29.3014 32.0919 34.8825 37.6731 40.4636 43.2542 46.0447 48.8352 51.6257 54.4162 57.2066 59.997 62.7873 65.5776 68.3678 71.1577 73.9475 76.7369 79.5256 82.3129 85.0965 87.8638 &nbsp;")</div><div>write (uvtwg.ctl,"zdef "12" levels &nbsp;100000 92500 85000 70000 60000 50000 40000 30000 25000 20000 15000 10000 ")</div><div>write (uvtwg.ctl,"tdef 372 linear &nbsp;JAN1969 1MO " &nbsp; )</div><div>write (uvtwg.ctl,'vars &nbsp;5')</div><div>write (uvtwg.ctl,"u "12" &nbsp;33,100 &nbsp;zonal wind &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(U) &nbsp;[m/sec] &nbsp; ")</div><div>write (uvtwg.ctl,"v "12" &nbsp;34,100 &nbsp;meridional wind &nbsp; &nbsp; &nbsp; (V) &nbsp;[m/sec] &nbsp; ")</div><div>write (uvtwg.ctl,"t "12" &nbsp;34,100 &nbsp;temperature &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (T) &nbsp;[K] &nbsp; ")</div><div>write (uvtwg.ctl,"w "12" &nbsp;11,100 &nbsp;vertical velocity &nbsp; &nbsp; (dp/dt) [pa/dia] ")</div><div>write (uvtwg.ctl,"g "12" &nbsp;11,100 &nbsp;geopotential &nbsp; &nbsp; &nbsp; &nbsp; (zg) &nbsp;[m2/s2] &nbsp;")</div><div>write (uvtwg.ctl,'endvars')</div><div>**********************************************************</div></div><div><br></div><div><br></div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="font-family: Helvetica; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><span class="Apple-style-span" style="font-family: arial; font-size: small; "><div><span style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><font color="#333333"><span style="background-color: rgb(255, 255, 255); ">José Augusto P. Veiga,&nbsp;</span><br><br>======================================<br>Universidade do Estado do Amazonas&nbsp;<br>Departamento de Meteorologia<br><span style="border-collapse: separate; font-family: arial; font-size: small; ">Escola Superior de Tecnologia (EST)</span><br>-----------------------------------------------------------------------------</font></span></div><div><span style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><span style="border-collapse: separate; font-family: arial; font-size: small; "><font color="#333333">Av. Darcy Vargas, 1200, Manaus-AM Brasil<br>Work phone:&nbsp; &nbsp; (92) 3878 4333<br>Skype:<span style="background-color: rgb(255, 255, 255); ">&nbsp;veiga_j.a.p.</span><br></font></span></span></div><div><font color="#333333"><span style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">-----------------------------------------------------------------------------</span><br>CV:&nbsp;<a href="http://lattes.cnpq.br/4027612512091565" target="_blank"><font color="#333333" style="background-color: rgb(255, 255, 255); ">http://lattes.cnpq.br/4027612512091565</font></a><br>URL:<font style="background-color: rgb(255, 255, 0); "><a href="http://scientificmet.wordpress.com/" target="_blank">http://scientificmet.wordpress.com/</a></font></font></div><div><font color="#333333"><a href="http://nmet.wordpress.com/">http://nmet.wordpress.com/</a></font></div><div><font color="#333333"><span style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">-----------------------------------------------------------------------------</span></font></div></span></div></div></span></div></span></div></span>
</div>
<br><div><br></div><div><img height="800" width="1000" apple-width="yes" apple-height="yes" id="a234665f-ebca-4278-9084-c385ec2098d3" src="cid:A2EBACD7-FE00-41A7-BD83-E225DFE1B074"></div><div><br></div><div><img height="800" width="1000" apple-width="yes" apple-height="yes" id="9797cdc7-8515-480d-890d-1fa18ba80955" src="cid:B480BA05-C2C4-4465-98B9-1C87DA3FBB59"></div></body></html>