[ncl-install] station timeseries to grid

yanling_1220 yanling_1220 at 163.com
Thu Aug 27 01:44:51 MDT 2009


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 at _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
-------------------------------------------------------------------------------------
 
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-install/attachments/20090827/333e34bc/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: obj_anal_ic.ncl
Type: application/octet-stream
Size: 1269 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-install/attachments/20090827/333e34bc/attachment-0001.obj 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Yangtze_river_1961_2000_tas_observed_cof.txt
Url: http://mailman.ucar.edu/pipermail/ncl-install/attachments/20090827/333e34bc/attachment-0002.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Yangtze_river_temperature_station.txt
Url: http://mailman.ucar.edu/pipermail/ncl-install/attachments/20090827/333e34bc/attachment-0003.txt 


More information about the ncl-install mailing list