Speeding up rcm2rgrid?

From: Bridget Thrasher <bthrasher_at_nyahnyahspammersnyahnyah>
Date: Thu Apr 04 2013 - 22:19:43 MDT

I have a very large grid (4823 x 5268) that I'm trying to change from curvilinear to rectilinear. I'm trying to use rcm2rgrid, but it's sitting for hours without returning. I don't have a sense for how long this function should take since I've never used it before. Am I doing something wrong? Or is the grid size grinding it to a halt? If the latter, is there anything I can do to speed it up?

-Bridget

ls_obs = systemfunc("ls pr*.nc")
fin = addfile(ls_obs(0),"r")
lat2d = fin->lat(::-1,:)
lon2d = fin->lon

olats = new((/dimsizes(fin->y)/),double,1e20)
olons = new((/dimsizes(fin->x)/),double,1e20)
olats_stride = (max(lat2d)-min(lat2d))/int2dble(dimsizes(fin->y)-1)
olons_stride = (max(lon2d)-min(lon2d))/int2dble(dimsizes(fin->x)-1)
olats(0) = min(lat2d)
olons(0) = min(lon2d)

do y = 1,dimsizes(fin->y)-1
        olats(y) = olats(y-1) + olats_stride
end do
do x = 1,dimsizes(fin->x)-1
        olons(x) = olons(x-1) + olons_stride
end do

dat = rcm2rgrid(lat2d,lon2d,fin->pr(:,::-1,:),olats,olons,1)

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Apr 4 22:19:56 2013

This archive was generated by hypermail 2.1.8 : Sun Apr 07 2013 - 21:13:30 MDT