!----------------------------------------------------------------------- ! am 2001-8-17 ! to get magnetic longitude (xmlon) for subsolar point for specific data ! used for calculating the equivalent current function ! subroutine subsollon(mtime,iyr) implicit none integer, intent(in) :: mtime(3),iyr ! real :: xmlon,date,colat,elon,vp,sbsllat,sbsllon common/ssolar/ xmlon,date,colat,elon,sbsllat,sbsllon integer :: iday,ihr,imn real :: sec ! ! input: iyr,iday,ihr,imn,sec ! IYR = Year (e.g., 1994). IYR must be in the range: 1601 to 2100. ! IDAY = Day number of year (e.g., IDAY = 32 for Feb 1) ! IHR = Hour of day (e.g., 13 for 13:49) ! IMN = Minute of hour (e.g., 49 for 13:49) ! SEC = Second and fraction after the hour/minute. ! output: SBSLLAT = geographic latitude of subsolar point (degrees) ! SBSLLON = geographic longitude of subsolar point (degrees, ! between -180 and +180) iday = mtime(1) ihr = mtime(2) imn = mtime(3) sec = 0. write (6,'(1x,/,'' SUBSOL inputs: iyr, iday, ihr, imn, sec ='', | 4i5,f5.0,'' UT '')') iyr,iday,ihr,imn,sec call subsol(iyr,iday,ihr,imn,sec,sbsllat,sbsllon) ! write (6,'('' SUBSOL returns: sbsllat,sbsllon ='',2f8.2, ! | '' deg '')') sbsllat,sbsllon ! write (6,*) ' ' date = float(iyr) + float(iday)/365. + float(ihr)/24./365. ! ! cofrm: assign DGRF/IGRF spherical harmonic coefficients ! cofrm must be called before calling DYPOL! ! dypol: computes parameters for dipole component of geomagnetic field. ! ! input: from COFRM through COMMON /MAGCOF/ NMAX,GB(144),GV(144),ICHG ! NMAX = Maximum order of spherical harmonic coefficients used ! GB = Coefficients for magnetic field calculation ! GV = Coefficients for magnetic potential calculation ! ICHG = Flag indicating when GB,GV have been changed ! ! output: COLAT = Geocentric colatitude of geomagnetic dipole north pole (deg) ! ELON = East longitude of geomagnetic dipole north pole (deg) ! VP = Magnitude, in T.m, of dipole component of magnetic ! potential at geomagnetic pole and geocentric radius ! of 6371.2 km call cofrm(date) call dypol(colat,elon,vp) ! calculate magn. longitude with geocentric spherical ! latitude and longitude of sbsllat,sbsllon ! colat = geocentric colatitude of geomagnetic dipole north pole (deg) ! elon = east longitude of geomagnetic dipole north pole (deg) ! input: sbsllat,sbsllon,colat,elon ! output: xmlon ! geomagnetic dipole longitude of the point ! write(6,*) ' colatitude of geomagnetic dipole north pole colat= ', ! | colat ! write(6,*) ' East longitude elat= ',elon call solgmlon(sbsllat,sbsllon,colat,elon,xmlon) write (6,'(1x,/,'' SOLGMLON returns: XMLON = '' | f11.3,'' deg '',f11.3,'' deg '')') xmlon,sbsllon end subroutine subsollon