subroutine uvrot(u,v,uu,vv,id,jd,xl,xd,xr,ihem) save dimension u(id,jd),v(id,jd),uu(id,jd),vv(id,jd) parameter (acon=3.14159265/180.) c c Rotates winds to a true geographic sense from winds in a polar stereo c grid sense. Assumes data is now on a lat-lon grid (the u and v c have been interpolated from a polar stereo grid). c c input c u - input u components c v - input v components c id - i (lon) dimension of grid c jd - j (lat) dimension of grid c xl - lon of i =1 c xd - lon increment for successive values of i c xr - longitude of +x direction from pole (10 for nmc 47x51 grid) c (-15 for lfm grids) c ihem - hemisphere of data where +1 is nh and -1 is sh. c note- The original source projection determines ihem c For projections down on north pole, set ihem=1. c For projections down on south pole, set ihem=-1. c c output c uu - rotated u wind (can be same array as input) c vv - rotated v wind (can be same array as input) c c xhem=1. if(ihem.eq.-1) xhem=-1. yd=xhem*xd yr=xhem*xr yl=xhem*xl ang=yl do 20 i=1,id ac=acon*(ang-yr) cs=cos(ac) sn=sin(ac) do 15 j=1,jd uh=-sn*u(i,j)+cs*v(i,j) vh=-cs*u(i,j)-sn*v(i,j) uu(i,j)=uh * xhem vv(i,j)=vh * xhem 15 continue ang=ang+yd 20 continue return end