ULYSSES In Space

 

Sun Banner
ULYSSES

Ulysses HISCALE Data Analysis Handbook

 

Appendix 9  Geometric Factor Study for the Deflected and Unscattered Electrons of HISCALE (Buckley MS Thesis)

 

A9.13  Appendix: Computer Programs

 

 
*			PROGRAM I.8			    *
*******************************************************************************
*                                  DMAIN1                                     *
* THIS IS THE MAIN PROGRAM USED TO MODEL THE B-FIELD FOR THE DEFLECTION       *
* SYSTEM.  FOR COMMENTS, SEE PAGE 125 OF SHODHAN'S THESIS.                    *
*******************************************************************************
          implicit none        
          integer NX,NY
          real*8 X,Y,Z,SUM1
	  real*8 BX,BY,BZ,B
          real*8 MAGB(-5:5,-13:4),NORMB(-5:5,-13:4),EXPT(-5:5,-13:4)
          real*8 MGX(-5:5,-13:4),MGY(-5:5,-13:4),MGZ(-5:5,-13:4)
          real*8 DIFF(-5:5,-13:4),DUFF(-5:5,-13:4)
          real DIFF1(-5:5,-13:4),MAGB1(-5:5,-13:4),EXPT1(-5:5,-13:4)
         print *,'please wait!'
         open(1,file='exttes.dat',access='sequential',status='new')
c	 open(10,file='norm.dat',access='sequential',status='new')
	 open(11,file='error.dat',access='sequential',status='new')
c	 open(12,file='diff.dat',access='sequential',status='new')
         open(2,file='bfieldM1.dat',access='sequential',status='old')
         do NY = 4,-13,-1
           do NX = 5,-5,-1
c            print *,NX,NY
             read(2,*) EXPT(NX,NY)   
           end do
         end do
         Z =  -0.1d0
	 SUM1=0.0D0
  	 do NY = -13,4
           do NX = -5,5
             X = dfloat(NX) * 0.1d0
             Y = dfloat(NY) * 0.1d0
c
             call FDMOD (X,Y,Z,BX,BY,BZ)
c            to find the total fields
             B = dsqrt(BX*BX + BY*BY + BZ*BZ)
c
c            to store it in the array
             MAGB(NX,NY) = B
C            MGZ(NX,NY) = dabs(BZ)
c            print *,'bx',BX,' BY: ',BY,' BZ: ',BZ
c            print *,'MGZ: ',MGZ(NX,NY)
           end do
          end do
          
          do NY = -13,4
           do NX = -5,5
       
c           find the relative percentage error
            DIFF(NX,NY)=1.0d0 - (MAGB(NX,NY)/EXPT(NX,NY))
            DIFF(NX,NY)=DIFF(NX,NY) * 100.0d0
            DUFF(NX,NY)=MAGB(NX,NY)-EXPT(NX,NY)
c           print *,nx,ny 
c   
           end do
          end do     
	  DO NY = -11,4
	    DO NX = -5,5
	    SUM1 = SUM1 + ABS(DUFF(NX,NY))
	    END DO
	  END DO
	  DO NY = -13,-12
            DO NX = -1,1
            SUM1 = SUM1 + ABS(DUFF(NX,NY))
	    END DO
	  END DO
c
	  write (1,10)
	  write (1,15) 
          write (1,*) 'EXPERIMENTAL VALUES OF B-FIELD (IN GAUSS)'
	  write (1,*)
	  write (1,70) (nx/10.,nx=5,-5,-1)
          do NY = 4,-13,-1
c           write(1,71) NY/10.
	   write(1,*)
           write(1,60) (ny/10.,(EXPT(NX,NY),NX=5,-5,-1))
          end do
	 WRITE (1,*)
	 WRITE (1,*)
	 WRITE (1,*) 'NORMALIZED VALUES OF B-FIELD FROM SIMULATION (IN GAUSS)'
	 write (1,*) 
         write(1,70) (NX/10.,NX=5,-5,-1)
         do NY = 4,-13,-1
c          write(1,71) NY/10.
	  write(1,*)
          write(1,60) (ny/10.,(MAGB(NX,NY),NX=5,-5,-1))
         end do
         write(11,10)
	 WRITE(11,15) 
	 WRITE(11,*) 'EXPERIMENTAL ERROR:  1.0 - (CALC/EXPT)*(100)'
	 write(11,*) 
         write(11,70) (NX/10.,NX=5,-5,-1)       
         do NY = 4,-13,-1
c           write(11,71) NY/10.
	   write(11,*)
           write(11,60) (ny/10.,(DIFF(NX,NY),NX=5,-5,-1))
         end do
	 WRITE(11,*)
	 WRITE(11,*)
	 WRITE(11,*) 'DIFFERENCE: (EXPT - CALC)'
	 write(11,*)
	 WRITE(11,70) (NX/10.,NX=5,-5,-1)
	 DO NY = 4,-13,-1
c	   WRITE(11,71) NY/10.
	   write(11,*)
	   WRITE(11,60) (ny/10.,(DUFF(NX,NY),NX=5,-5,-1))
	 END DO
C	 WRITE(12,*)
C	 WRITE(12,*) 'SUM = ',SUM1
         do NY = 4,-13,-1
          do NX=5,-5,-1
           DIFF1(NX,NY)=sngl(DIFF(NX,NY))
           EXPT1(NX,NY)=sngl(EXPT(NX,NY))
           MAGB1(NX,NY)=sngl(MAGB(NX,NY))
          end do
         end do
         call WWPLOT(EXPT1,MAGB1)
 10      format (' Z = -0.1" PLANE')
 15	 FORMAT (' TRIAL 4,11')
 25      format (' ')
 30      format (' calculated values')
 35      format (' 1.0 - (calculated/expt.) * 100.0')
 40      format (' experimental values')
 55      format (' Y:',f4.1,'" ',18(1x,f6.1))
 60      format (' Y:',f4.1,'"',11(1x,f6.1))
 70      format (' X:       '11(2x,F3.1,'"',1x))
 71      format (' Y:',F4.1,'"')
 75      format (1x,11(3x,i2,2x))
        close (1)
        close (2)
	CLOSE (10)
	CLOSE (11)
	CLOSE (12)
	stop
        end
 

Return to the Table of Contents for Buckley's Thesis

Return to HISCALE List of Appendices

Return to Ulysses HISCALE Data Analysis Handbook Table of Contents


Updated 8/8/19, Cameron Crane

QUICK FACTS

Manufacturer: ESA provided the Ulysses spacecraft, NASA provided the power supply, and various others provided its instruments.

Mission End Date: June 30, 2009

Destination: The inner heliosphere of the sun away from the ecliptic plane

Orbit:  Elliptical orbit transversing the polar regions of the sun outside of the ecliptic plane