[Thread Prev][Thread Next][Index]

Re: [ferret_users] Convert a non-gridded ASCII data to netCDF file in Ferret



Hi,
The grid does not need to be regularly spaced, but it does need to be a rectilinear grid.  The longitude and latitude variables in the file do not define a grid, as you can see when you look at the PLOT/VS plot.

Your script
columns/delim=\b/var="date,time,lon,lat,var1,var2" arbsea_20060430.txt
set var/units=degrees_east lon
set var/units=degrees_north lat
!plot/vs/ribbon/thick/sym=17 lon,lat,var1

LET temp=SCAT2GRIDGAUSS_XY(lon,lat,var1,var2,x[gx=xax],y[gy=yax])
needs to include definitions for the coordinate axes xax and yax.  You will need to use DEFINE AXIS commands to define an XY grid that covers the range of the longitude and latitude variables, at a spacing of your choice.  Please see the documentation of SCAT2GRIDGAUSS_XY, for the correct usage and definition of arguments. http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/index-1/index/. You will need to call the function separately for each of your input variables, var1 and var2.

-Ansley

On 1/14/2015 2:00 AM, Madhavan BL wrote:
Hello Ansley,

Thanks. I tried your suggestion but still have problems with using scat2gridgauss_xy function. Attached is my ferret code for your convenience. 

When using scat2griddgauss_xy function, I guess I need to provide the coordinates of X- and Y- axes regularly spaced output grid. If so, basing on the available irregularly spaced X- and Y- coordinates, is it not possible to compute the regularly spaced output X- and Y- grid?

Thanking you in advance,
Regards,
Madhavan


Bomidi Lakshmi Madhavan, Ph.D
Remote Sensing of Atmospheric Processes
Leibniz Institute for Tropospheric Research (TROPOS)
Permoserstraße 15, D-04318 Leipzig, Germany
Phone: +49 (0)341 2717-7187 (Office), +49 (0)1578 8467548 (Mobile)
E-Mail: madhavan.bomidi@xxxxxxxxxblmadhavan@xxxxxxxxx
Skype ID: blmadhavan, Web: http://sat.tropos.de 

On Tue, Jan 13, 2015 at 6:15 PM, Ansley Manke <ansley.b.manke@xxxxxxxx> wrote:
Hi Madhavan,
This data is, as you say, not on a grid, so you cannot read it directly to a grid using those commands.  You will need to read the locations and variables as 1-dimensional lists and then use a SCAT2GRID function to interpolate them to a grid.

The FILE/FORM=DELIMITED command will translate the date and time information.  An alias for that command is COLUMNS.  You can take a first look at the data with the PLOT/VS/RIBBON command to show the locations of the data, colored by the values of a variable:
yes? columns/delim=\b/var="date,time,lon,lat,var1,var2" arbsea_20060430.txt
yes? set var/units=degrees_east lon
yes? set var/units=degrees_north lat
yes? plot/vs/ribbon/thick/sym=17 lon,lat,var1
To interpolate to a grid, you would define an output grid and use the scat2gridgauss_xy or scat2gridlaplace_xy function to interpolate the data to that grid.

-Ansley



On 1/13/2015 12:28 AM, Madhavan BL wrote:
Dear All,

I have an ASCII data file with 6 columns: 
[yyyy-mm-dd  hr:mi:se  longitude(deg.E) latitude(deg.N)  var1  var2]

Since my data is not gridded properly, I am unable to convert my ASCII data file into gridded netCDF file by Ferret. While I have followed a similar post on converting an ASCII file to netCDF file when the data is properly gridded, I still could not get my code running properly to convert non-gridded ASCII data to netCDF file. I have some lat-lon issues to read by ferret. Can anyone suggest me how I can convert a non-gridded ASCII data to netCDF file in ferret? 

I am herein attaching a my ASCII data file along with the ferret code I have tried.

Look forward for your favourable response,

Thanking you in advance,
With regards,
Madhavan


----------------------------------------------------------
​ Dr. ​
Bomidi Lakshmi Madhavan
Remote Sensing of Atmospheric Processes
Leibniz Institute for Tropospheric Research (TROPOS)
Permoserstraße 15, D-04318 Leipzig, Germany
Phone: +49 (0)341 2717-7187 (Office), +49 (0)1578 8467548 (Mobile)
E-Mail: madhavan.bomidi@xxxxxxxxxblmadhavan@xxxxxxxxx
Skype ID: blmadhavan, Web: http://sat.tropos.de 




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

Privacy Policy | Disclaimer | Accessibility Statement