Subversion Repositories lagranto.wrf

Rev

Rev 11 | Rev 17 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11 Rev 15
Line 872... Line 872...
872
      character*80 unit
872
      character*80 unit
873
      real         dlon,dlat,alpha,rlat1,ralt2
873
      real         dlon,dlat,alpha,rlat1,ralt2
874
 
874
 
875
      if ( unit.eq.'km' ) then
875
      if ( unit.eq.'km' ) then
876
 
876
 
877
         arg=sind(yp)*sind(yq)+cosd(yp)*cosd(yq)*cosd(xp-xq)
877
         arg=sin(yp*deg2rad)*sin(yq*deg2rad)+
-
 
878
     >              cos(yp*deg2rad)*cos(yq*deg2rad)*cos((xp-xq)*deg2rad)
878
         if (arg.lt.-1.) arg=-1.
879
         if (arg.lt.-1.) arg=-1.
879
         if (arg.gt.1.) arg=1.
880
         if (arg.gt.1.) arg=1.
880
         sdis=re*acos(arg)
881
         sdis=re*acos(arg)
881
 
882
 
882
      elseif ( unit.eq.'deg' ) then
883
      elseif ( unit.eq.'deg' ) then