<HTML>
<HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="OPENWEBMAIL" name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>
Hi Ugo,
<br />
<br />you extracted only one level (1000 hPa), but your .ctl to plot data is expecting 17 levels.
<br />
<br />In the .ctl, try:
<br /><font size="2">zdef 1 levels 1000
<br />
<br />It must work.
<br />Ricardo </font>
<br />
<br /><font size="2"><b>On Mon, 18 Jun 2012 10:26:08 -0700 (PDT), ugo okoro wrote</b>
<br />>
<strong>hello all,</strong><strong>
<br />> </strong><strong>
<br />>
</strong><strong>please i am working with ncep data in .nc format and had merged
it with the help of this forum. however i am faced with some challenges as when
i subtract the merged data with the original data for some variables, i dont get
zero.</strong><strong>
<br />> </strong><strong> </strong>
<br />>
<strong>
<br />> </strong>
<br />> <strong>for instance for u-wind, i merged it
using the following .gs script;</strong>
<br />>
<br />> *script to merge data
from multiple netcdf files, e.g. uwnd.1979.nc, uwnd.1980.nc, etc
<br />> *edit
start and end dates as needed
<br />> *view output with Mergedncep_uwnd1000.ctl
(edit tdef for longer times)
<br />> 'reinit'
<br />> iyear=1979
<br />> 'set
gxout fwrite'
<br />> 'set fwrite F:\merged_uwnd1000.dat'
<br />> while (iyear
<= 2011)
<br />>
'sdfopen
F:\ncep_uwind\uwnd.'iyear'.nc'
<br />> 'q file'
<br />>
res=sublin(result,5)
<br />> tsize=subwrd(res,12)
<br />> say tsize
<br />> tim
= 1
<br />> 'set x 1 144'
<br />> 'set y 1 73'
<br />> while (tim <=
tsize)
<br />> 'set t 'tim
<br />> 'd uwnd(lev=1000)'
<br />>
tim=tim+1
<br />> endwhile
<br />> 'close 1'
<br />> iyear=iyear+1
<br />>
endwhile
<br />> 'disable fwrite'
<br />> 'reinit'
<br />>
<br />>
<strong>and ran it with the following .ctl script;</strong>
<br />>
<br />>
dset F:\merged_uwnd1000.dat
<br />> title daily NCEP/DOE Reanalysis 2
<br />>
undef -9.99e+33
<br />> xdef 144 linear 0 2.5
<br />> ydef 73 linear -90
2.5
<br />> zdef 17 levels 1000 925 850 700 600 500 400 300
<br />> 250 200 150
100 70 50 30 20 10
<br />> tdef 12053 linear 00Z01JAN1979 1dy
<br />> vars
1
<br />> uwnd 0 t,z,y,x Daily U-wind on Pressure Levels
<br />>
endvars
<br />>
<br />> please were did i get it wrong?
<br />>
<br />> ugo
okoro
<br />> cmsr, iap-cas,
<br />> beijing.
<br />> <blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;">
<br />>
</blockquote>
</font>
</BODY>
</HTML>