[Thread Prev][Thread Next][Index]
Re: [ferret_users] matrix format
Hi,
Assuming that matrix format means data written along lon (columns)
and lat (rows/lines). Here is a simple example. Please let me know if you
have any questions.....
Best Regards,
Jaison
!------------example starts here--------------------
set data 501.nc
set reg/x=60:100/y=-5:25/l=1/k=1 ! 161 points along x/lon
! 121 points along y/lat
sp rm -f text.dat ! remove previous versions
list/file=text.dat/format=(161F11.5)/nohead/append u10[d=1]
! check the ascii file
define axis/x=60:100:0.25/units=longitudes xlon ! 161 columns
define axis/y=-5:25:0.25/units=latitudes ylat ! 121 rows/lines
define grid/x=xlon/y=ylat gfile
! now we have to read along the lines...so use /COLUMNS=161
! with the file command, 161-number of columns...
FILE/grid=gfile/var=uu/columns=161 text.dat
! the difference between u10 and uu should be ideally zero
! but you may see very very small values due to precision issues
! of data loaded from ascii file
shade/lev=(-.2,.2,0.01) uu[d=2]-u10[d=1]
go land
!------------example ends here--------------------
On Tue, 01 Jan 2008 21:25:28 +0530, M.V.Ramana Murthy wrote
> Dear Members,
> we want to read netcdf file containing wind (U10 and V10) and write
> to matrix format. we could read and write the file but we see some
> errors in writing. The original data is at 0.25 deg grid with an
> extent ( long 29.9E to 120.1E and Lat 60.1S to 30.1 N) and we would
> like to get matrix format for the region ( long 60Eto 90Eand Lat -6
> to 26 N) at 0.25 deg. The output file gives long at 2.75 deg and Lat
> at 0.25 deg . The commands and the input file we used is enclosed herewith
>
> set data 501.nc
> list/x=60:100/y=-5:25/file=test.dat U10
>
> Could you suggest how to get the data at 0.25 deg for both long and
> lat .
>
> Thanks in advance.
>
> N.T.Reddy
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Privacy Policy | Disclaimer | Accessibility Statement