[Thread Prev][Thread Next][Index]

Re: [ferret_users] Reading text file and creating netcdf file by using define axis from variable



Hi Don,
Defining an axis directly from the data only makes sense if the data is actually organized as a grid.

Your data looks like it's at a set of scattered points. Is that the case? To check what the distribution of the points looks like, you can plot them as marks on a map

   yes? file/skip=1/var="lat,lon,grd" Data.txt
   yes? go basemap
   yes? plot/vs lon, lat

If the points are scattered, you could use one of the SCAT2GRID functions. Define a grid,  and call the function to interpolate the variable GRD onto the grid.

--Ansley

On 5/31/2013 6:44 AM, Don DNA wrote:


Please anyone help me, I am having text file, I could able to read it using following command

yes? file/skip=1/var="lat,lon,grd" Data.txt
yes? sh d
     currently SET data sets:
    1> ./Data.txt  (default)
 name     title                             I         J         K         L         M         N
 LAT      LAT                              1:20480   ...       ...       ...       ...       ...
 LON      LON                              1:20480   ...       ...       ...       ...       ...
 GRD      GRD                              1:20480   ...       ...       ...       ...       ...


 list /i=1:10 lat,lon,grd
             DATA SET: ./Data.txt
             X: 0.5 to 10.5
 Column  1: LAT
 Column  2: LON
 Column  3: GRD
             LAT    LON    GRD
1    /  1:  11.83  88.93  0.3000
2    /  2:  11.95  87.95  0.1000
3    /  3:  12.10  86.98  0.3000
4    /  4:  17.67  40.43  0.3000
5    /  5:  24.82  57.92  0.3000
6    /  6:  13.28  42.93  0.0500
7    /  7:   7.93  73.32  0.1800
8    /  8:   7.25  72.00  0.2400
9    /  9:   4.33  67.43  0.0600
10   / 10:  24.07  57.59  0.0200


define axis/X/units=Degrees_East xaxis=lon[i=1:2791]
 **ERROR: improper grid or axis definition: data for DEFINE AXIS/FROM_VARIABLE is not monotonic at index 2

define axis/Y/units=Degrees_north yaxis=lat[i=1:2791]
 **ERROR: improper grid or axis definition: data for DEFINE AXIS/FROM_VARIABLE is not monotonic at index 6

Now I want to create netcdf file, I searched in user list and in ferret website, in that I found that axis can be defined by using variable, but in my case I am unable to define axis from variable, I don't have much idea about ferret programming, please those who know kindly help me, and please go through attachment.


- Dona Clara.





















[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement