cain.f90.in
1.17 KB
!----------------------------------------------------------------------------
! compute bcain
! inputs:
! 2) position dlat,dlong,alt
!
! outputs:
! 1) Bcain in MSO and IAU and it's magnitude
! 2) index indacting calculation is ok
!
!-----------------------------------------------------------------------------
subroutine cain (dlat,dlong,alt,Btt,Bpp,Brr,Bx,By,Bz,B,ifail)
!-------------------------------------------------------------
! DECLARATION
!-------------------------------------------------------------
implicit real (kind=8) (a-h,o-z)
external cread, gfield
character(2000) :: coeffs_cain_file ="@CAIN_COEF_DIR@/FSU_mars90"
integer l
common /trace/rm, maxln
! real dlat,dlong,alt,Btt,Bpp,Brr,Bx,By,Bz,B
integer ifail
!------------------------------------------------------------
! END OF DECLARATION
!------------------------------------------------------------
rm = 3396.2
l = 1
ty = 1999.6493
open (unit=12,file =trim(coeffs_cain_file))
call cread (12,ty,l,maxln,a)
call gfield(dlat,dlong,alt,maxln,rm,Btt, Bpp, Brr, Bx,By,Bz,B)
ifail = 1
end