Re: Fw:Help: Interpolation failure using linint2_Wrap

From: heaven_bird334 <heaven_bird334_at_nyahnyahspammersnyahnyah>
Date: Thu Jun 14 2012 - 08:34:34 MDT

Dear Dennis,
         Great! It works now.
         Thank you very much!

Best Regards,
Li

At 2012-06-14 12:01:59,"Dennis Shea" <shea@ucar.edu> wrote:
>The grids must be South->North as noted in documentation.
>
> f = addfile(inf,"r") ; open initial sst data for reading
> sst = f->sst(::-1,:)
>
> f = addfile(latlonfi,"r") ; open initial sst data for reading
> LAT = f->lat(::-1)
>
>
>On 6/13/12 9:06 PM, heaven_bird334 wrote:
>> 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 ta r
>> 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 & nbsp; = 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
>> ;
>> & nbsp; 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
>>
>> < div> ; 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

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jun 14 08:34:54 2012

This archive was generated by hypermail 2.1.8 : Fri Jun 15 2012 - 14:51:31 MDT