PRO xytowindcoordinates,wdir,x,y,xwind,ywind ;wdir; degree ; transform wind angle to angle in normal x-y coordiante system wdirtemp=270.0-wdir ;print,wdirtemp rad=wdirtemp*3.1415926/180.0 ; find a sign mistake in the coordinate transfoamtion in the code of ; /davis/s2/wang/d2wwg/code/fortran/footprintpaper/code/integral-flux.pro ; maybe not, becsaue the different definition of dx xwind=x*cos(rad)+y*sin(rad) ywind=-x*sin(rad)+y*cos(rad) return end