Interpolation- problem with the linint2 function

From: Lorenzo de Cillia <lorenzo.decillia_at_nyahnyahspammersnyahnyah>
Date: Tue Nov 26 2013 - 10:36:29 MST

Hello!

I have a problem with the following NCL script....
I'm reading out geopotential height data from a .nc file and try to
interpolate it to a 2.5x2.5 grid with the function linint2...

The problem is that I got a lot of missing values (so 1e+20) in the results
and I don't know why... Can please somebody tell me if there's an error in
the script or in the usage of the linint2 function?

Thank you for your help,

Lorenzo

------------------------------
-------------

begin
    filen=getenv("FILENAME")

;; print (filen)
        a = addfile(filen,"r")

    u1 = a->zg(:,3,:,:)

;;;output
    u1@_FillValue=1e+20
    npts = dimsizes(u1(:,0,0)) ; number of time points
    nlat = dimsizes(u1(0,:,0)) ; number of latitudes
    nlon = dimsizes(u1(0,0,:)) ; number of lon

    um=new ( (/nlat,nlon /), float)
    filo = "daily_model.dat" ; output file

;;interpolate to 2.5x2.5

    mlon = u1&lon
    mlat = u1&lat
    print(mlat)

    klon = ispan(0,143,1)*2.5
    print(klon)
    klat = ispan(0,72,1)*2.5
    print(klat)

    ;print(u1)
    model =linint2(mlon,mlat,u1,False,klon,klat,0)
    printVarSummary(model)
    print(model)
    fbinrecwrite (filo, -1, model)
end

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Nov 26 10:36:37 2013

This archive was generated by hypermail 2.1.8 : Wed Dec 04 2013 - 20:42:38 MST