[ncl-talk] problem with bilinear interpolation

antonio avio antonioavio at googlemail.com
Thu Apr 2 04:44:00 MDT 2015


Hallo NCL,
Im just wondering why the output of the interpolation filed are missing in
the last latitude (south and north poles: 87.5-90). The input data is
bellow:

netcdf MERRA.U.1979.plev {
dimensions:
        time = 365 ;
        levels = 42 ;
        latitude = 144 ;
        longitude = 288 ;
variables:
        float U(time, levels, latitude, longitude) ;
                U:long_name = "Eastward wind component" ;
                U:_FillValue = 1.e+15f ;
                U:comments = "Unknown1 variable comment" ;
                U:grid_name = "grid-1" ;
                U:time_statistic = "average" ;
        double time(time) ;
                time:standard_name = "time" ;
                time:units = "hours since 1979-01-01 12:00:00" ;
                time:calendar = "standard" ;
        double levels(levels) ;
                levels:standard_name = "air_pressure" ;
                levels:long_name = "Level" ;
                levels:units = "hPa" ;
                levels:positive = "down" ;
                levels:axis = "Z" ;
        double latitude(latitude) ;
                latitude:standard_name = "latitude" ;
                latitude:long_name = "Latitude" ;
                latitude:units = "degrees_north" ;
                latitude:axis = "Y" ;
        double longitude(longitude) ;
                longitude:standard_name = "longitude" ;
                longitude:long_name = "Longitude" ;
                longitude:units = "degrees_east" ;
                longitude:axis = "X" ;


My script is:

oad "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"

begin

;===========2.5x2.5=============

  xlat = fspan(-90.,90,73)
  xlon = fspan(0.,357.5,144)
  xlat at units = "degrees_north"
  xlon at units = "degrees_east"

;===============================

do y =1979,1979
  print(y)

  f  = addfile ("MERRA.U."+y+".plev.nc" , "r")

    u   = f->U
    u   = lonFlip(u)

printVarSummary(u)

print("=====================Process=========================")

  U = linint2(u&longitude,u&latitude,u,True,xlon,xlat,0)


  U!0   = "time"
  U!1   = "level"
  U!2   = "lat"
  U!3   = "lon"
  U&lat = xlat
  U&lon = xlon
  U&time  = u&time
  U&level = u&levels

printVarSummary(U)

Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150402/91192f83/attachment.html 


More information about the ncl-talk mailing list