Re: interpolation using ascii files

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri Dec 16 2011 - 09:35:59 MST

The problem is that you are trying to pass in 1D lat/lon/x arrays to linint2, which is expecting a 2D data array that has 1D lat/lon coordinate arrays.

You might want to try triple2grid or natgrid:

  newtmax = triple2grid(lon,lat,tmax,newlon,newlat,0)

  newtmax = natgrid(lon,lat,tmax,newlon,newlat)

http://www.ncl.ucar.edu/Document/Functions/Built-in/natgrid.shtml
http://www.ncl.ucar.edu/Document/Functions/Built-in/triple2grid.shtml

--Mary

On Dec 14, 2011, at 10:02 AM, jagan TNAU wrote:

> Dear NCL users,
>
> I have successfully interpolated the netcdf files using the function "linint2" as in the code file attached regrid-netcdf.ncl. Now I have higher resolution (0.22 degree) downscaled climate change scenario data in ascii format like the one I attached herewith (1971-apr.txt). I want this to be interpolated to CRU grids at lower resolution (0.5 degree).
>
> Whether it is possible to use ascii files for interpolation using the functions like "linint2". As I am unable to find some examples on interpolation of ascii files I am requesting the users to help. I have tried using the code (regrid-ascii.ncl) but I get dimension error (The rightmost dimensions of fi must be nyi x nxi, where nyi and nxi are the lengths of yi and xi respectively) which I am unable to correct it.
>
> --
> With regards
>
> Dr.R.Jagannathan
> Professor of Agronomy,
> Department of Agronomy
> Tamil Nadu Agricultural University,
> Coimbatore - 641 003 India
>
> PHONE: Mob: +91 94438 89891
>
> DO NOT PRINT THIS E-MAIL UNLESS NECESSARY. THE ENVIRONMENT CONCERNS US ALL.
> <1971_apr.txt><regrid-ascii.ncl><1971_apr.txt>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Dec 16 09:36:09 2011

This archive was generated by hypermail 2.1.8 : Fri Dec 16 2011 - 10:27:49 MST