Hello everyone,
I am trying to interpolate 6-hourly values using a monthly value. The file SOIL-2020-01.nc has TSOI as a function of (time,levsoi,lat,lon). In the given file, variable TSOI is written for one timestep, 10 levels, several latitudes and longitudes. TSOI is considered as a monthly average for entire month and I need to interpolate 6-hourly values for the month from the single value. Can anyone please check the code below and tell me if I got it correct?
Thanks in advance
Spandana
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"
begin
fn ="/home/stummuri/CCSM-INPUTS/SOIL-2020-01.nc"
in = addfile(fn, "r")
lat = in->lat
lon = in->lon
time = in->time
levsoi = in->levsoi
tsoi = in->TSOI
nlat = dimsizes(lat)
mlon = dimsizes(lon)
ntime = dimsizes(time)
nlevsoi = dimsizes(levsoi)
zDay = clmMon2clmDay(TSOI(0,:,:,:), 1, 0)
x6hr = new ( (/nlevsoi,nlat,mlon,4*31/), typeof(zDay) )
x6hr(:,:,:,::4) = (/ zDay /) ; fill every 4th value
x6hr = linmsg(x6hr, 4)
end
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Sep 22 2007 - 22:39:01 MDT
This archive was generated by hypermail 2.2.0 : Wed Sep 26 2007 - 10:02:41 MDT