[Thread Prev][Thread Next][Index]

Re: [ferret_users] writing out data in ASCII format



Hi Yogesh,
A correction to my last answer. If you use the LIST command as I specified in my first answer, there will be extra lines inserted in the output with details of the longitudes, latitudes and time steps. (for example if I'd written out COADS_CLIMATOLOGY data this way, you get what's below)

To get a listing of only the coordinates and variable values, use the /FORMAT qualifier, something like this

   yes? list/file=myfile.dat/FORMAT=(4f8.2)  x[gx=aod], y[gy=aod], aod, t[gt=aod]

For the COADS_CLIMATOLOGYdata, this would look like this. The underlying units of the time axis is hours, so that's why those numbers look as they do.

yes? use coads_climatology
yes? list/x=181:185/y=1:5/format=(4f8.2) x[gx=sst], y[gy=sst], sst, t[gt=sst]
             DATA SET: /home/porter/tmap/ferret/linux/fer_dsets/data/coads_climatology.cdf
             LONGITUDE: 179W to 175W
             LATITUDE: 1 to 5
             TIME: 0.7575 to 8766.6
 Column  1: X is X (axis COADSX)
 Column  2: Y is Y (axis COADSY)
 Column  3: SST is SEA SURFACE TEMPERATURE (Deg C)
 Column  4: T is T (axis TIME)
  181.00    1.00   28.28  366.00
  183.00    1.00   28.41  366.00
  185.00    1.00   27.92  366.00
  181.00    3.00   27.97  366.00
  183.00    3.00   28.25  366.00
  185.00    3.00   28.28  366.00
  181.00    5.00   28.25  366.00
  183.00    5.00   28.06  366.00
  185.00    5.00   28.41  366.00
  181.00    1.00   28.42 1096.48
  183.00    1.00   28.40 1096.48
  185.00    1.00   28.02 1096.48
  181.00    3.00   28.36 1096.48
  183.00    3.00   28.41 1096.48
  185.00    3.00   27.99 1096.48
  181.00    5.00   27.99 1096.48
  183.00    5.00   28.17 1096.48
  185.00    5.00   28.11 1096.48
  181.00    1.00   28.05 1826.97
  183.00    1.00   27.55 1826.97
  185.00    1.00   27.72 1826.97


And here is what the listing looks like without the FORMAT

yes? use coads_climatology
yes?  list/x=181:185/y=1:5 x[gx=sst], y[gy=sst], sst, t[gt=sst]
             DATA SET: /home/porter/tmap/ferret/linux/fer_dsets/data/coads_climatology.cdf
             LONGITUDE: 179W to 175W
             LATITUDE: 1 to 5
             TIME: 0.7575 to 8766.6
 Column  1: X is X (axis COADSX)
 Column  2: Y is Y (axis COADSY)
 Column  3: SST is SEA SURFACE TEMPERATURE (Deg C)
 Column  4: T is T (axis TIME)
                 X     Y     SST     T
 ---- L:1 T:   16-JAN 06:00
 ---- J:46 Y:   1N
179W   / 81:  181.0  1.000  28.28   366.
177W   / 82:  183.0  1.000  28.41   366.
175W   / 83:  185.0  1.000  27.92   366.
 ---- J:47 Y:   3N
179W   / 81:  181.0  3.000  27.97   366.
177W   / 82:  183.0  3.000  28.25   366.
175W   / 83:  185.0  3.000  28.28   366.
 ---- J:48 Y:   5N
179W   / 81:  181.0  5.000  28.25   366.
177W   / 82:  183.0  5.000  28.06   366.
175W   / 83:  185.0  5.000  28.41   366.
 ---- L:2 T:   15-FEB 16:29
 ---- J:46 Y:   1N
179W   / 81:  181.0  1.000  28.42  1096.
177W   / 82:  183.0  1.000  28.40  1096.




Ansley Manke wrote:
Hi Yogesh,
Use the LIST command. I can't tell from your question what the time axis is like, but assuming the time steps are in units of months, this would be just

   yes? list/file=myfile.dat  x[gx=aod], y[gy=aod], aod, t[gt=aod]

The data will be listed in the order that you show, with x varying fastest, then y, and time.

Yogesh Tiwari wrote:
Hello Ferret Users,

I have an  ASCII data file in the format:
##################
lon,lat,AOD,month
-179.5 89.5 0 1
-178.5 89.5 0 1
-177.5 89.5 0 1
-176.5 89.5 0 1
-175.5 89.5 0 1
-174.5 89.5 0 1
-173.5 89.5 0 1
###################
Above is 1x1 grid data. I am regridding this data on 5x5 grid in ferret . It works well.

My question is:

Now I want to save regridded data in ASCII format similar to format as my original data as above.

I want to write out ASCII data to use in some other small graphics which dosen't support netcdf.

Kindly any one help how to do this.

Regards,
Yogesh
--
Dr. Yogesh K. Tiwari,
Scientist,
Indian Institute of Tropical Meteorology,
Homi Bhabha Road,
Pashan,
Pune-411008
INDIA

Phone: 0091-99 2273 9513 (Cell)
         : 0091-20-258 93 600 (O) ( Ext.250)
Fax    : 0091-20-258 93 825

-- 

~>   ~>   ~>   ~>   ~>   ~>   ~>   ~>   ~>   ~>   ~> 

Ansley Manke, NOAA/PMEL   ansley.b.manke@xxxxxxxx
7600 Sand Point Way NE, Seattle WA
Phone 206-526-6246,  FAX 206-526-6744

  

-- 

~>   ~>   ~>   ~>   ~>   ~>   ~>   ~>   ~>   ~>   ~> 

Ansley Manke, NOAA/PMEL   ansley.b.manke@xxxxxxxx
7600 Sand Point Way NE, Seattle WA
Phone 206-526-6246,  FAX 206-526-6744


[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement