still interpolating

From: Гузий Саша <guziy.sasha_at_nyahnyahspammersnyahnyah>
Date: Wed, 6 Aug 2008 23:00:51 +0300

Dear list members,

I want to use ncl library for interpolation of precipitations calculated by
wrf.
Here is a part of my script
=============start of significant part
times = wrf_user_list_times(a) ; get times in file
   ntimes = dimsizes(times) ; number of times
   result = new (ntimes, float)

   xlong = wrf_user_getvar(a, "XLONG", 0)
   xlat = wrf_user_getvar(a, "XLAT", 0)

   ;;convert to 1d arrays
   ;;needed for interpolation
   x = ndtooned(xlat)
   y = ndtooned(xlong)

   do it = 0,ntimes-1 ; loop through all times

    if(variableName .ne. "rain") then
        variable = wrf_user_getvar(a,variableName, it);
    else

        rainc = wrf_user_getvar(a,"RAINC",it)
        rainnc = wrf_user_getvar(a,"RAINNC",it)
        variable = rainc + rainnc
    end if

    ;;convert to 1dim array
    values = ndtooned(variable)

    ;spline interpolation
    result(it) = dsgrid2(x,y, values, x0,y0)
=====================================end of significant part

It works and gives some nubers, but i am not sure if this is the best
solution, since the results very differ from measurements.
Can anybody suggest anything better, maybe I am doing something wrong? I am
new to ncl. So any help is would be great.

Thank you in advance.

--
Best regards
Guziy Alex.

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Aug 06 2008 - 14:00:51 MDT

This archive was generated by hypermail 2.2.0 : Mon Aug 11 2008 - 10:00:53 MDT