	subroutine cubit( delx,dely,
     .               w1  , w2  , w3  ,  w4  ,
     .               w5  , w6  , w7  ,  w8  ,
     .               w9  , w10 , w11 ,  w12 ,
     .               w13 , w14 , w15 ,  w16 , rout)

c
c
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c                       #     # ######   #####   #####
c                       #     # #     # #     # #     #
c                       #     # #     # #       #
c                       ####### ######  #       #
c                       #     # #       #       #
c                       #     # #       #     # #     #
c                       #     # #        #####   #####
c                       
c                          #######  #####   #####
c                          #       #     # #     #
c                          #       #       #
c                          #####    #####   #####
c                          #             #       #
c                          #       #     # #     #
c                          #######  #####   #####
c                       
c                          ######     #     #####
c                          #     #   # #   #     #
c                          #     #  #   #  #     #
c                          #     # #     # #     #
c                          #     # ####### #     #
c                          #     # #     # #     #
c                          ######  #     #  #####
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c	Jose Zero NASA GSFC DAO -- zero@talisman.gsfc.nasa.gov
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c                                |                         |
c                       ---------+-------------------------+----------
c                                |                         |
c                                |                         |
c                                |                         |
c                                |                         |
c                                |                         |
c                           ^    |        X                |
c                           |    |rlatitudeij,rlongitudeij |
c                           |    |                         |
c                     dely  |    |                         |
c                           |    |                         |
c                       ----x----+-------------------------+-----------
c                                |<------->                |          
c                                   delx
c the relative positions of the w's in the horizontal plane are:
c
c---------------w12----------w4----------w8--------w16       jj+4          
c               |            |           |          | 
c               |            |           |          | 
c               |            |           |          | 
c               |            |           |          | 
c               |            |           |          | 
c--------------w10---------- w2---------w6---------w14       jj+3
c               |            |           |          | 
c               |            |           |          | 
c               |            |    x      |          | 
c               |            |           |          | 
c               |            |           |          | 
c--------------w9-----------w1----------w5--------w13        jj+2
c               |            |           |          | 
c               |            |           |          | 
c               |            |           |          | 
c               |            |           |          | 
c               |            |           |          | 
c--------------w11----------w3----------w7--------w15        jj+1
c               |            |           |          | 
c               |            |           |          | 
c               |            |           |          | 
c               |            |           |          | 
c               |            |           |          | 
c
c
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c
c


        parameter ( sixth = 1./6.)
        parameter ( third = 1./3.)

c
c
c
           delxsqr   =        delx * delx
           delx2     = (2.0 - delx) * 0.5
c
          c1a =  delx2    * (1.0 - delxsqr)
          c2a = (delxsqr + delx) * delx2
          c3a = (delxsqr - delx) * delx2 * third
          c4a = (delxsqr - 1.0)  * delx  * sixth
c
c
c    
            delysqr =  dely * dely
            dely2   = ( 2.0 - dely) * 0.5
c
          c1b =  dely2 * (1.0 - delysqr)
          c2b = (delysqr + dely) * dely2
          c3b = (delysqr - dely) * dely2 * third
          c4b = (delysqr - 1.0 ) * dely  * sixth
 


       tem1   = c1b*w1    + c2b*w2  +  c3b*w3    + c4b*w4
       tem2   = c1b*w5    + c2b*w6  +  c3b*w7    + c4b*w8
       tem3   = c1b*w9    + c2b*w10 +  c3b*w11   + c4b*w12
       tem4   = c1b*w13   + c2b*w14 +  c3b*w15   + c4b*w16    
       rout   = c1a*tem1  + c2a*tem2+  c3a*tem3  + c4a*tem4
       return
       end         


