subroutine rtll(tlmd,tphd,tlm0d,ctph0,stph0,almd,aphd) c c *** Rotate eta lat, lon (tphd, tlmd) to geographical lat, lon (aphd, almd). c All calculations are done in degrees. c implicit none c real*4 tlmd,tphd . ,tlm0d,ctph0,stph0 . ,almd,aphd,cph . ,stph,ctph,ctlm,stlm . ,saphd,salmd CTO REAL*4,PARAMETER :: d2r=.017453293 CTO c_______________________________________________________________________________ c stph=sind(tphd) ctph=cosd(tphd) ctlm=cosd(tlmd) stlm=sind(tlmd) c saphd=stph0*ctph*ctlm+ctph0*stph crr if(saphd.gt. 1.)saphd= 1. if(saphd.lt.-1.)saphd=-1. crr CTO aphd=asind(saphd) aphd=asin(saphd) aphd=aphd*(1./d2r) c cph=cosd(aphd) salmd=stlm*ctph/cph crr if(salmd.gt. 1.) salmd= 1. if(salmd.lt.-1.) salmd=-1. crr CTO almd=tlm0d+asind(salmd) almd=asin(salmd) almd=almd*(1./d2r) almd=almd+tlm0d c return end