<div dir="ltr"><div>hi, i met a strange problem between grads and ncl.</div><div><br></div><div>the below is the ctl file for the data,</div><div>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</div><div><br></div><div>dset E:\lnw\postvar2010010100</div><div>options sequential big_endian</div><div>options sequential</div><div>title post output from grapes</div><div>undef -9.99E+33</div><div>xdef  360 linear    0.0000    1.0000</div><div>ydef  180 linear  -89.5000    1.0000</div><div>zdef   29 levels </div><div> 1000.000000</div><div> 962.5000000</div><div> 925.0000000</div><div> 887.5000000</div><div> 850.0000000</div><div> 800.0000000</div><div> 750.0000000</div><div> 700.0000000</div><div> 650.0000000</div><div> 600.0000000</div><div> 550.0000000</div><div> 500.0000000</div><div> 450.0000000</div><div> 400.0000000</div><div> 350.0000000</div><div> 300.0000000</div><div> 275.0000000</div><div> 250.0000000</div><div> 225.0000000</div><div> 200.0000000</div><div> 175.0000000</div><div> 150.0000000</div><div> 125.0000000</div><div> 100.0000000</div><div> 70.00000000</div><div> 50.00000000</div><div> 30.00000000</div><div> 20.00000000</div><div> 10.00000000</div><div>tdef   21 linear 00z01JAN2010   360mn</div><div>vars 46</div><div>u 29 0 u_wind</div><div>v 29 0 v_wind</div><div>t 29 0 temperature</div><div>h 29 0 geopotential height</div><div>q2 29 0 specific humidity</div><div>q3 29 0 specific humidity</div><div>q4 29 0 specific humidity</div><div>q5 29 0 specific humidity</div><div>q6 29 0 specific humidity</div><div>q7 29 0 specific humidity</div><div>ozone 29 0 cloud fraction from microphy</div><div>w 29 0 vertical wind</div><div>ps 0 0 surface pressure</div><div>psl 0 0 sea level pressure</div><div>rainc 0 0 precipitation</div><div>rainnc 0 0 precipitation</div><div>ts 0 0 surface temperature</div><div>glw 0 0 surface downward lw</div><div>gsw 0 0 surface net sw</div><div>glwu 0 0 surface upward lw</div><div>tglwu 0 0 toa upward lw</div><div>gclw 0 0 surface clear sky downward lw</div><div>gclwu 0 0 surface clear sky upward lw</div><div>tgclwu 0 0 toa clear sky upward lw</div><div>gswu 0 0 surface upward sw</div><div>tgsw 0 0 toa net sw</div><div>tgswu 0 0 toa upward sw</div><div>gcsw 0 0 surface clear sky net sw</div><div>gcswu 0 0 surface clear sky upward sw</div><div>tgcsw 0 0 toa clear sky net sw</div><div>tgcswu 0 0 toa clear sky upward sw</div><div>tcc 0 0 total cloud cover</div><div>hcc 0 0 high cloud cover</div><div>mcc 0 0 middle cloud cover</div><div>lcc 0 0 low cloud cover</div><div>tvw 0 0 column integrated qv</div><div>tcw 0 0 column integrated qc</div><div>tiw 0 0 column integrated qi</div><div>hfx 0 0 sueface heat flux</div><div>qfx 0 0 sueface vapour flux</div><div>zs 0 0 terrain</div><div>q2m 0 0 specific humidity at 2m</div><div>t2m 0 0 temperature at 2m</div><div>u10m 0 0 u wind at 10m</div><div>v10m 0 0 v wind at 10m</div><div>pblh 0 0 pbl height</div><div>endvars</div><div><br></div><div>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</div><div><br></div><div>according to the above ctl file, we can find some variables 4D and others 1D,</div><div>so i gave the following code  in ncl for test:</div><div><br></div><div>++++++++++++++++++++++++++++++++++++++++</div><div>fili=&quot;postvar2010010100&quot;</div><div>nlat=180</div><div>mlon=360</div><div>nlev=29</div><div>ntim=21</div><div><br></div><div>setfileoption(&quot;bin&quot;,&quot;ReadByteOrder&quot;,&quot;BigEndian&quot;)</div><div>uwind=fbinrecread(fili,0,(/mlon,nlat,nlev,ntim/),&quot;float&quot;)</div><div><br></div><div>++++++++++++++++++++++++++++++++++++++++</div><div><br></div><div>but there come the following warning,</div><div>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</div><div>warning:fbinrecread: size specified is less than record size, some data will not be read  </div><div>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</div><div><br></div><div>i changed its dimension description with &quot;-1&quot; instead of (/mlon,nlat,nlev,ntim/),as follows,</div><div><br></div><div>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</div><div>uwind1=fbinrecread(fili,0,-1,&quot;float&quot;)</div><div>print(dimsizes(uwind1))</div><div><br></div><div>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</div><div><br></div><div>then, come to the following result,</div><div><br></div><div>+++++++++++++++++++++++++++++++++</div><div> print(dimsizes(uu))</div><div>(0)     64800</div><div>+++++++++++++++++++++++++++++++++</div><div><br></div><div>so i use the following code to read the first variable,</div><div><br></div><div>++++++++++++++++++++++++++++++++++++++++++++++++++++</div><div>uwind2=fbinrecread(fili,0,(/mlon,nlat/),&quot;float&quot;)</div><div>++++++++++++++++++++++++++++++++++++++++++++++++++++</div><div><br></div><div>there is no warning appeared.</div><div><br></div><div><br></div><div>the above result shows that the first variable has the dimension &quot;mlon*nlat&quot; not &quot;mlon*nlat*nlev*ntim&quot;,which is so wierd.</div><div>and i cannot distinguish which level and time the uwind2 represented.</div><div><br></div><div>can somebody give me some advice about this difference between ctl file&#39;s description and ncl realization?</div><div><br></div><div>if i should add two cycle, like following,</div><div><br></div><div>++++++++++++++++++++++++++++++++++++++++++++++++++++++</div><div>do i=0,ntim-1</div><div>  do j=0,nlev-1</div><div>     uwind=fbinrecread(fili,0,(/mlon,nlat/),&quot;float&quot;)</div><div>     vwind=fbinrecread(fili,1,(/mlon,nlat/),&quot;float&quot;)</div><div>     ttemp=fbinrecread(fili,2,(/mlon,nlat/),&quot;float&quot;)  </div><div><br></div><div>     ....................</div><div>     u10m=fbinrecread(fili,43,(/mlon,nlat/),&quot;float&quot;)</div><div>     v10m=fbinrecread(fili,44,(/mlon,nlat/),&quot;float&quot;)</div><div>     pblh=fbinrecread(fili,45,(/mlon,nlat/),&quot;float&quot;)</div><div>  end do</div><div>end do</div><div><br></div><div>+++++++++++++++++++++++++++++++++++++++++++++++++++++</div><div><br></div><div><br></div><div>any help will be appreciated,thanks</div><div>      </div><div><br></div><div>   </div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><br>
</div>