|
Home Introduction Ionospheric Physics Registration/ Download Source Code Description Tutorial Graphics Feedback Publications License Notice |
![]() Tutorial
Only two files need to be edited to set up a code run: param-1.00.inc and sami2-1.00.namelist. The include file
param-1.00.inc
contains the parameters
nz and
nf.
A typical value of nz is 201 although the code will run with a value 101 as long as rmax < 10,000 km. Increasing the number of grid points along the field decreases the time step, and will lead to longer run times. If any of these parameters is changed the code must be recompiled to effect the change. The namelist file
sami2-1.00.namelist
contains the geophysical input conditions.
The inputs are described in the
Source Code Description
section. These inputs can be changed without recompiling
the code. For basic runs, the user should only need to
change the following parameters:
SAMI2 is written in Fortran 77. It has been compiled and run using the following Fortran compilers: Absoft, Lahey, the Portland Group, and Intel. Typical compilation lines for each compiler are as follows where sami2.x is the executable file. Each compilation line is a single line with no carriage return. There is also a makefile included in the distribution that can be used (i.e., makesami2-1.00).
In the above, the options -s, -Msave, -save, --sav save the values of the local variables in subroutines, and the options -O, -fast optimize the program. For Absoft Fortran 77 (v7.5) it is also necessary to use the option -N3 so that unformatted data is written in a form that can be read by the IDL procedure read-u.pro given in the Graphics section. Note: It is important that SAMI2 be compiled with
the save or
static option.
If the code has compiled successfully, simply type
Example 1 This is a short run for a single field line to see if the code runs 10 or so time steps and outputs the data in the appropriate format.
This is a longer run for the single field line case. It is for the same geophysical conditions as Example 1 but is run for 48 hrs with the data dumped every 15 minutes after the first 24 hours. The default is to output formatted data files.
This is a much longer run: the number of field lines is nf = 60. The default is to output formatted data files. This run will generate a file denif.dat that is approximately 126 MB. This can be changed by editing the sami2-1.00.namelist and setting fmtout = .false. after Step 1 below. This will generate a file deniu.dat that is approximately 31 MB.
This example shows how to use the auxiliary code grid-rminrmax.f. SAMI2 sets up the grid using the parameters rmin (the altitude of the lowest field line at its magnetic equator) and rmax (the altitude of the highest field line at its magnetic equator). The purpose of grid-rminrmax.f is to determine these altitudes by specifying the input parameters glat_in, glon_in, grad_in_min, and grad_in_max where grad_in_min and grad_in_max are the minimum and maximum altitudes at a given latitude and longitude of interest. For instance, say you are interested in doing a simulation relevant to Arecibo observations in the altitude range 100 - 2000 km. The geographic latitude and longitude for Arecibo are 18.3 and 293.25, respectively.
|
|