Re: Interpolation error using the linint2 of NCL

From: Bridget Thrasher <bthrasher_at_nyahnyahspammersnyahnyah>
Date: Thu Jun 14 2012 - 19:56:56 MDT

Looks to me like your latitudes are actually decreasing from positive to negative values.

On Jun 14, 2012, at 6:34 PM, 김인원 <rladlsdnjs88@gmail.com> wrote:

> Hello
>
> I tried to interpolate using linear interpolation (the linint2) but, failed.
> There appears warning.
>
> warning: linint2: xi, yi, xo, and yo must be monotonically increasing.
>
> However, I checked xi,yi,xo,yo through the print, they are monotonically increasing
>
> When I print the output(fo), value is -999.
>
> How do i modify code to interpolate?
>
> (xi, yi)
> =======================================================
> Variable: psfc
> Type: float
> Total Size: 1039680 bytes
> 259920 values
> Number of Dimensions: 2
> Dimensions and sizes: [lat_0 | 361] x [lon_0 | 720]
> Coordinates:
> lat_0: [90..-90]
> lon_0: [ 0..359.5]
> Number Of Attributes: 12
> initial_time : 06/06/2011 (00:00)
> forecast_time : 0
> level : 0
> level_type : Mean sea level (Pa)
> parameter_template_discipline_category_number : ( 0, 0, 3, 1 )
> parameter_discipline_and_category : Meteorological products, Mass
> grid_type : Latitude/longitude
> _FillValue : -999
> units : Pa
> long_name : Pressure reduced to MSL
> production_status : Operational products
> center : US National Weather Service - NCEP (WMC)
>
> (xo,yo)
> =========================================================
> Variable: fo
> Type: float
> Total Size: 884736 bytes
> 221184 values
> Number of Dimensions: 2
> Dimensions and sizes: [384] x [576]
> Coordinates:
> Number Of Attributes: 1
> _FillValue : -999
> =========================================================
>
>
> Detailed code
> =========================================================
> begin
>
> fP = addfile("./gfs.t00z.pgrb2f00.nc","r")
>
> psfc = fP->PRMSL_P0_L101_GLL0
> lon = fP->lon_0
> lat = fP->lat_0
> psfc@_FillValue=-999.
>
> fC = addfile("./cami_1980-01-01_0.47x0.63_L26_c071226_org.nc","r")
> LON = fC->lon
> LAT = fC->lat
>
> fo=linint2(lon,lat,psfc,False,LON,LAT,0)
>
> print (fo)
>
> end
>
>
> --
> --
> In-Won Kim
> Intergrated Climate System Modeling Lab.
> Department of Environmental Atmospheric Sciences
> 599-1 Daeyeon-dong, Nam-gu
> Pukyong National University,
> Busan, S.Korea
>
> Tel. +82-51-629-6643
> Fax +82-51-629-7991
>
> _______________________________________________
> 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 Thu Jun 14 19:57:20 2012

This archive was generated by hypermail 2.1.8 : Fri Jun 15 2012 - 14:51:31 MDT