[ncl-talk] Sub: figure error....

dale zuri dalezuri at gmail.com
Mon Sep 18 00:04:48 MDT 2017


Hi,
After interpolating the irregular grid to regular, the output plot reflects
the missing values for most of the region. I attached here an output figure.
I would appreciate any help and suggestions to fix this issue.

Thanks
Dz


begin



  iz = addfile("landsea2_wrf.nc","r")
  lat2d = iz->lat
  lon2d = iz->lon
 mas=iz->mask

  c = addfile("era-down_1989_apr-sep_22z.nc","r")
  t2    = cds->p

  t2!1="lon2d"
  t2!2="lat2d"
  t2 at lon2d = lon2d
  t2 at lat2d = lat2d
printVarSummary(t2)
aavg= t2(time|:,lat2d|:,lon2d|:)
printVarSummary(aavg)
print(aavg(0,:,0))
printMinMax(aavg,0)
printMinMax(lat2d,0)
printMinMax(lon2d,0)
;******************************************************
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
f1    = addfile("/import/h/marchforecast/mar1982-2010/
simpleWunit.2005031212.nc", "r")   ; note the "s" of addfile
T1    = f1->precSum                ; read T from all files
printVarSummary (T1)
latnew=f1->lat_0
lonnew=f1->lon_0
;;;;;;Interpolation Step;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;printVarSummary(T)
;printVarSummary(aavg)
;print(aavg)
printVarSummary(aavg)
newsst = rcm2rgrid_Wrap(lat2d,lon2d,aavg,latnew,lonnew,1)
printMinMax(newsst,0)
printVarSummary(newsst)
print(newsst)


  system("/bin/rm -f simple.nc")   ; remove any pre-existing file
       ncdf = addfile("simple.nc" ,"c")  ; open output netCDF file

    ;===================================================================
    ; create global attributes of the file (optional)
    ;===================================================================
       fAtt               = True            ; assign file attributes
       fAtt at title         = "NCL Simple Approach to netCDF Creation"
       fAtt at source_file   =  "original-file.nc"
       fAtt at Conventions   = "None"
       fAtt at creation_date = systemfunc ("date")
       fileattdef( ncdf, fAtt )            ; copy file attributes

    ;===================================================================
    ; make time an UNLIMITED dimension; recommended  for most applications
    ;===================================================================
       filedimdef(ncdf,"time",-1,True)

    ;===================================================================
    ; output variables directly; NCL will call appropriate functions
    ; to write the meta data associated with each variable
    ;===================================================================
ncdf->newsst  = newsst

end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170917/44584384/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ncview.newsst.ps
Type: application/postscript
Size: 193604 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170917/44584384/attachment.ps>


More information about the ncl-talk mailing list