Subversion Repositories lagranto.icon

Rev

Rev 3 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3 Rev 5
Line 1107... Line 1107...
1107
      character*80 unit
1107
      character*80 unit
1108
      real         dlon
1108
      real         dlon
1109
 
1109
 
1110
      if ( unit.eq.'km' ) then
1110
      if ( unit.eq.'km' ) then
1111
 
1111
 
-
 
1112
         arg=sin(yp*pi180)*sin(yq*pi180)+cos(yp*pi180)*cos(yq*pi180)*
-
 
1113
     >       cos((xp-xq)*pi180)
1112
         arg=sind(yp)*sind(yq)+cosd(yp)*cosd(yq)*cosd(xp-xq)
1114
c         arg=sind(yp)*sind(yq)+cosd(yp)*cosd(yq)*cosd(xp-xq)
1113
         if (arg.lt.-1.) arg=-1.
1115
         if (arg.lt.-1.) arg=-1.
1114
         if (arg.gt.1.) arg=1.
1116
         if (arg.gt.1.) arg=1.
1115
         sdis=re*acos(arg)
1117
         sdis=re*acos(arg)
1116
         
1118
         
1117
      elseif ( unit.eq.'deg' ) then
1119
      elseif ( unit.eq.'deg' ) then
Line 1275... Line 1277...
1275
          klo=k
1277
          klo=k
1276
        endif
1278
        endif
1277
      goto 1
1279
      goto 1
1278
      endif
1280
      endif
1279
      h=xa(khi)-xa(klo)
1281
      h=xa(khi)-xa(klo)
1280
      if (h.eq.0.) pause 'bad xa input in splint'
1282
c      if (h.eq.0.) pause 'bad xa input in splint'
-
 
1283
      if (h.eq.0.) then
-
 
1284
        write(*,*) 'bad xa input in splint'
-
 
1285
        read(*,*)
-
 
1286
      end if
1281
      a=(xa(khi)-x)/h
1287
      a=(xa(khi)-x)/h
1282
      b=(x-xa(klo))/h
1288
      b=(x-xa(klo))/h
1283
      y=a*ya(klo)+b*ya(khi)+((a**3-a)*y2a(klo)+(b**3-b)*y2a(khi))*(h**
1289
      y=a*ya(klo)+b*ya(khi)+((a**3-a)*y2a(klo)+(b**3-b)*y2a(khi))*(h**
1284
     *2)/6.
1290
     *2)/6.
1285
      return
1291
      return