[Thread Prev][Thread Next][Index]

Re: [ferret_users] hi



Hi Simi,
I just noticed your message hadn't been answered.  I think you should be able to read your data into a variable representing time using the DELIMITED read capabilities; see "delimited data files, reading" in the Users Guide, where you can tell Ferret that your data is dates or times.  This will leave you with a variable in units of Julian days since 1-Jan-1900.

Then you would need to define a time axis based on the times in your file (this assumes they are in increasing order!)  and define a variable regridding the variable in the netCDF file to that time axis.  Ferret can translate between two time axes if they are formatted in terms of calendar dates.

So, say the time dataset had these dates.  Dates can be formatted in a number of ways, as described in the documentation on delimited data reading.
12/15/83
 1/16/88
 2/13/89
10/ 4/91
Then to read this data and get data from the monthly_navy_winds dataset,

yes? file/form=delim/type=date/var=tdate bn_delimited_read_date_time.dat

yes? ! This irregular axis has a point at each date in the ascii file
yes? define axis/t/units=days/t0=1-jan-1900 taxdates = v1[d=1]


yes? ! List UWND from the monthly_navy_winds.cdf at the dates
yes? use monthly_navy_winds
yes? let uwnd_at_dates = uwnd[gt=taxdates@nrst]
yes? list/x=300/y=20 uwnd_at_dates
             VARIABLE : UWND[GT=TAXDATES]
             FILENAME : monthly_navy_winds.cdf
             FILEPATH : /home/porter/tmap/ferret/linux/fer_dsets/data/
             SUBSET   : 5 points (TIME)
             LONGITUDE: 60W
             LATITUDE : 20N
                       60W  
                      113
 15-DEC-1983 00 / 1: -5.648
 18-DEC-1983 00 / 2: -5.757
 16-JAN-1988 00 / 3: -6.313
 13-FEB-1989 00 / 4: -7.472
 04-OCT-1991 00 / 5: -4.065

You could use one of the other regridding transformations, such as @NRST, to get the value from the netcdf file that is closest to the specified date, without interpolation; or @AVE, etc.

simi wrote:
Hi,
   I have a text file of dates (not evenly spaced). Is it possible to retrieve
 sst values from a netcdf file corresponding to those days.

thanks
simi
--
Center for Atmospheric and Oceanic Science,
Indian Institute of Science,
Bangalore - 560 012, INDIA
http://caos.iisc.ernet.in/


  

[Thread Prev][Thread Next][Index]

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

Privacy Policy | Disclaimer | Accessibility Statement