station timeseries to grid

From: yanling_1220 <yanling_1220_at_nyahnyahspammersnyahnyah>
Date: Thu, 27 Aug 2009 15:44:51 +0800 (CST)

Dear all,

I want to interpolate my station timeseries data to grids,which is with missing values.I find althought "natgrids" "Natgrid" and "natgridd" can deal with timeseries data,but they don't allow missing values in the input data arrays."obj_anal_ic" allow missing values in the input data arrays,but it design for one dimension array,and must do loop.Is there any other function
I didn't find which is according with my goal?
 
Before find other function,I write a sript with "obj_anal_ic" (the attached),but it pop up following error messeges when run in ncl 5.1.1,and I don't know how to modify it.Can somebody help me please?
 
Thanks in advance.
sunflower
 
error messege as following(line 36 is where the function "obj_anal_ic" lie,in red color ):
-----------------------------------------------------------------------------------
fatal:wgt_runave: The length of wgt must be less than or equal to the last dimen
sion of x
fatal:Execute: Error occurred at or near line 10354 in file $NCARG_ROOT/lib/ncar
g/nclscripts/csm/contributed.ncl
fatal:Execute: Error occurred at or near line 10673 in file $NCARG_ROOT/lib/ncar
g/nclscripts/csm/contributed.ncl
fatal:Execute: Error occurred at or near line 36 in file obj_anal_ic.ncl
---------------------------------------------------------------------------------------
 
---------------------------------------------------------------------------------------
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
  npts = 5
  ntim = 480 ;extract 1961-2000 timeseries
  xx = asciiread ( "Yangtze_river_1961_2000_tas_observed_cof.txt", (/npts, ntim/), "float")
  xx!0 = "pts"
  xx!1 = "time"
  xObs = xx(time|:,pts|:)
  xObs@_FillValue = -99.99
  printVarSummary(xObs )

  stain= asciiread("Yangtze_river_temperature_station.txt",(/5,3/), "float")
  printVarSummary(stain )
  lat1 = stain(:,1)
  lon1 = stain(:,2)
  
  lon = fspan(89, 98, 10) ;I output is 1.0*1.0
  nlon = dimsizes( lon)
  print(lon)
  lat = fspan(32, 36, 5)
  nlat = dimsizes( lat)
  print(lat)
;============================================================== ;
  grid =new((/nlat,nlon,ntim/),typeof(xObs))
  do nmo =0,ntim-1
    zVal = xObs(nmo,:)
    rscan = (/5,3,2,1,0.5/)
    opt = True
    opt_at_zonal = True ; use zonal averages as a 1st guess
    grid(:,:,nmo) = obj_anal_ic(lon1,lat1,zVal,lon,lat, rscan, opt) ;line 36
    printVarSummary(grid)
  end do
end
-------------------------------------------------------------------------------------
 
 
 

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

Received on Thu Aug 27 2009 - 01:44:51 MDT

This archive was generated by hypermail 2.2.0 : Thu Oct 01 2009 - 13:56:13 MDT