linint2_Wrap

From: Montane Caminal, Francesc <fmontane_at_nyahnyahspammersnyahnyah>
Date: Tue Feb 19 2013 - 17:16:53 MST

Hello NCL,

I need to perform spatial interpolation on my data from 0.5x0.5 (lat = 360 and lon=720) to 1x1 spatial resolution (lat =180 and lon=360), and I am using the “linint2_Wrap” function.
However, when I ran my script, I got some error messages (not found in the “Error messages“ section of your FAQ) and several warning messages (see pic below).
I have uploaded my data file to ftp folder (incoming) and attached the script here.
Any help will be very appreciated!

Thanks,

Francesc

Error messages:

[cid:6e85507d-98ac-466f-b935-cbef9c1b99eb]

NCL script:

load "$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"

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"

begin

print("reading the variables")

setfileoption("nc","MissingToFillValue",False)

a = addfile ("/home/ecolab/CABLE_forcing1/cruncep_tair_2010.nc", "r")

setfileoption("nc","Format","LargeFile")

temp=a->tair

printVarSummary(temp)

temp = temp (:,::-1,:)

printVarSummary(temp)

;create a sequence for the new values of time, which has to be a double precision variable

newtime=fspan(21600.00,31536000.00,1460)

;create a sequence for the new values of lat

newlat=fspan(-89.50,89.50,180)

;create a sequence for the new values of lon

newlon=fspan(-179.50,179.50,360)

newtime@units = "seconds since December 31, 2009 21:00:00"

newlat@units = "degrees_east"

newlon@units = "degrees_north"

print("new values for long, lat and time created")

 

newtemp=linint2_Wrap(a&lon,a&lat,temp,True,newlon,newlat,0)

printVarSummary(newtemp)

print("newtemp: min="+min(newtemp)+" max="+max(newtemp))

newtemp!0 = "time"

newtemp!1 = "lat"

newtemp!2 = "lon"

newtemp&time = newtime

newtemp&lat = newlat

newtemp&lon = newlon

fout=addfile("cruncep_tair_1x1_2010.nc","c")

fout@title="Air temperature in K and interpolated into 1x1 spatial resolution"

fout->tair=newtemp

 

end

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Tue Feb 19 17:17:06 2013

This archive was generated by hypermail 2.1.8 : Thu Feb 21 2013 - 11:26:43 MST