[ncl-talk] Regridding Using linint2

Lauren Jean Vargo lvargo at unm.edu
Thu Jul 30 11:46:56 MDT 2015


Hello,


I'm trying to re-grid velocity data from 1km resolution to 5km resolution (2801x1501 to 560x300 resolution) using linint2.


Right now the script runs and the linint2 function appears to work at first- I attached a screenshot of the script output, including the printVarSummary for the re-gridded velocity (Velmeas), which shows the dimensions are 560x300. However, the plot shows that instead of decreasing the resolution and showing velocity over all of Greenland, Velmeas appears to have stayed at the same resolution and zoomed into 1:500 x 1:300 of the original 2801x1501 resolution.


While this data is a map of velocity, there's no lat lon data associated with it, so I was trying to simply treat it as an array.


I'm running NCL version 6.3.0 on Yellowstone


Here's the script:

     g = addfile("Velocity_data.nc","r")
     vx = g->vx(0,:,:)     ; read in velocity data
     vy = g->vy(0,:,:)     ; read in velocity data
     printVarSummary(vx)
     printVarSummary(vy)
     Velm = ((vx^2) + (vy^2))^0.5   ; calculate absolute velocity
     printVarSummary(Velm)

     xi = ispan(1,1501,1)     ; original x resolution
     yi = ispan(1,2801,1)     ; original y resolution
     xo = ispan(1,300,1)      ; new x resolution
     yo = ispan(1,560,1)      ; new y resolution
     Velmeas = linint2(xi,yi,Velm,False,xo,yo,0)    ; Re-grid
     printVarSummary(Velmeas)

  wks  = gsn_open_wks("x11","test_Vel")
  plot = gsn_contour(wks,Velmeas,False)



Thanks for any help,

Lauren


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150730/e419cd63/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Output.png
Type: image/png
Size: 40573 bytes
Desc: Output.png
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150730/e419cd63/attachment.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plot.png
Type: image/png
Size: 31896 bytes
Desc: plot.png
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150730/e419cd63/attachment-0001.png 


More information about the ncl-talk mailing list