temporal interpolation with linint1_n_Wrap

From: Montane Caminal, Francesc <fmontane_at_nyahnyahspammersnyahnyah>
Date: Mon Feb 25 2013 - 12:03:31 MST

Hello NCL users,
I need to do a temporal interpolation of my climate variable of interest from 6-h in the original file to 3-h in the new file.
Attached is a file that includes temperature values for 2 times measured in 6-hours interval (total time 12 hours). I was trying to interpolate temperature values using “linint1_n_Wrap” to get 4 measures of temperature, one every 3-h (interpolate temperature values from 6-h to 3-h in the new file, for the total time of 12 hours), but the new created file after interpolating has empty values of temperature.
I attach my original netcdf file and also the script I used to do the temporal interpolation using “linint1_n_Wrap”. Is there a more recommended function than “linint1_n_Wrap” to do this? Can anyone, please tell me what do I need to modify in the script to get the right output with the interpolated values in 3-h instead of 6-h?
Any help will be very appreciated!


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"


print("reading the variables")


a = addfile("cruncep_tair_2010_1x1_2time.nc","r")



temp@_FillValue = -9.99999979021477e+33

temp@missing_value = temp@_FillValue<mailto:temp@_FillValue>

;reverse the latitude values

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

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


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




tair1=linint1_n_Wrap(time2, temp, False, tNew, 0, 0)


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

tair1!0 = "time"

tair1!1 = "lat"

tair1!2 = "lon"




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

fout@title="Temperature interpolated into 3-h resolution for 12-h in January 2010"




ncl-talk mailing list
List instructions, subscriber options, unsubscribe:

Received on Mon Feb 25 12:03:54 2013

This archive was generated by hypermail 2.1.8 : Thu Feb 28 2013 - 14:47:31 MST