Hi,
I met a problem when interpolating SST from fixed grids (89*180) to R42 grids (108*128) using linint2_Wrap. After the interpolation, the new SST data contains too much "_FillValue" of "missing" value, and the new SST can not plot out contours. This is not the right result, however, no error information is given out during the whole process.
The flowing is my scripts, which is simplified with detailed annotation. Also, the relative datas are all attached behind this letter as a tar bar. Any suggestion or help is appreciable!
;........................................................
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
inf = "sst_initial.nc" ; Initial sst(89,180)
latlonfi = "latlon_Out.nc" ; New lat(108) and lon(128) for interpolation , that is R42 grid
outfi = "sst_interpolation.nc" ; New interpolated sst(108,128)
;
; read in initial sst
;
f = addfile(inf,"r") ; open initial sst data for reading
sst = f->sst
delete(f)
printVarSummary(sst) ; sst [lat | 89] x [lon | 180]
; lat: [88..-88]
; lon: [ 0..358]
;
; read in R43 lat and lon info
;
f = addfile(latlonfi,"r") ; open initial sst data for reading
LAT = f->lat
LON = f->lon
delete(f)
printVarSummary(LAT) ; [lat | 108]; lat: [88.73005..-88.73004]
printVarSummary(LON) ; [lon | 128]; lon: [ 0..357.1875]
;
; interpolation
;
sstNew = linint2_Wrap (sst&lon,sst&lat,sst, False, LON,LAT, 0)
printVarSummary(sstNew) ; [lat | 108] x [lon | 128]
; lat: [88.73005..-88.73004]
; lon: [ 0..357.1875]
;
; output nc
;
system ("rm "+outfi) ; remove any pre-existing file
ncdf = addfile(outfi,"c") ; create new netCDF file
ncdf->sstNew = sstNew
print(sstNew({0},{190:230})) ; All missing data!
;(0) 32767
;(1) 32767
;... ...
;(13) 32767
; However, SSTs over Topical Easten Pacific shouldn't be missing value!
end
Best Regards,
Li
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2.1.8 : Fri Jun 15 2012 - 14:51:31 MDT