Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions src/calc_electrodynamics.f90
Original file line number Diff line number Diff line change
Expand Up @@ -328,15 +328,15 @@ subroutine UA_calc_electrodynamics(UAi_nMLTs, UAi_nLats)
!/

DivJuAltMC = -1.0e32
SigmaHallMC = 0.0 !-1.0e32
SigmaPedersenMC = 0.0 !-1.0e32
SigmaHallMC = 0.0
SigmaPedersenMC = 0.0
LengthMC = -1.0e32
KDlmMC = -1.0e32
KDpmMC = -1.0e32
KlmMC = -1.0e32
KpmMC = -1.0e32
SigmaLLMC = 0.0 !-1.0e32
SigmaPPMC = 0.0 !-1.0e32
SigmaLLMC = 0.0
SigmaPPMC = 0.0
SigmaLPMC = -1.0e32
SigmaPLMC = -1.0e32
DivJuAltMC = -1.0e32
Expand All @@ -349,12 +349,6 @@ subroutine UA_calc_electrodynamics(UAi_nMLTs, UAi_nLats)
do iBlock = 1, nBlocks
if (Debug) write(*, *) 'DBG: starting block ', iBlock, ' of ', nBlocks

call calc_physics(iBlock)
call calc_rates(iBlock)
call calc_collisions(iBlock)
call get_potential(iBlock)
call calc_efield(iBlock)

e_density = IDensityS(:, :, :, ie_, iBlock)

! Should probably improve these collision frequencies:
Expand Down
17 changes: 15 additions & 2 deletions src/get_potential.f90
Original file line number Diff line number Diff line change
Expand Up @@ -280,15 +280,28 @@ subroutine get_potential(iBlock)
! -----------------------------------------------------
! Now get the aurora.
! This assumes that the field lines are basically
! vertical starting at the top of the model.
! vertical starting at the bottom of the model.
! -----------------------------------------------------

if (floor((tSimulation - dt)/DtAurora) /= &
floor((tsimulation)/DtAurora) .or. IsFirstAurora(iBlock)) then

call report("Getting Aurora", 1)

iAlt = nAlts + 1
iAlt = 2

call iemodel_%grid( &
MLT(-1:nLons + 2, -1:nLats + 2, iAlt), &
MLatitude(-1:nLons + 2, -1:nLats + 2, iAlt, iBlock))

ElectronEnergyFluxDiffuse = 0.0
ElectronEnergyFluxWave = 0.0
ElectronEnergyFluxMono = 0.0
IonEnergyFlux = 0.0
ElectronAverageEnergyWave = 3.0
ElectronAverageEnergyDiffuse = 3.0
ElectronAverageEnergyMono = 10.0
IonAverageEnergy = 10.0

! We get the diffuse aurora always, since it *should* always be done.
! Inside the aurora subroutine we check if the user wants to use it or not.
Expand Down
17 changes: 15 additions & 2 deletions src/initialize.f90
Original file line number Diff line number Diff line change
Expand Up @@ -514,15 +514,28 @@ subroutine initialize_gitm(TimeIn)
endif

call init_b0
call init_get_potential

if (UseApex .and. IsEarth) then
call report("subsolr", 2)
call SUBSOLR(iTimeArray(1), iJulianDay, iTimeArray(4), &
iTimeArray(5), iTimeArray(6), SubsolarLatitude, &
SubsolarLongitude)
endif

call init_get_potential

do iBlock = 1, nBlocks
call calc_physics(iBlock)
call calc_rates(iBlock)
call calc_collisions(iBlock)
enddo

if (UseDynamo .and. .not. Is1D) then
call UA_calc_electrodynamics(iLon, iLat)
else
call UA_calc_electrodynamics_1d
endif
call get_potential(1)

if (.not. Is1D) call exchange_messages_sphere

call calc_pressure
Expand Down
8 changes: 4 additions & 4 deletions src/logfile.f90
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,11 @@ subroutine logfile(dir)
write(iLogFileUnit_, "(i8,i5,5i3,i4,f8.4,6f9.1,5f7.1,9f8.1,2f7.1,3f8.3)") &
iStep, iTimeArray, & ! i8, i5, 5i3, i4
dt, & ! f8.4
minTemp, maxTemp, AverageTemp, minVertVel, maxVertVel, AverageVertVel, & ! 6f13.5
f107, f107A, By, Bz, Vx, & ! 5f9.1
minTemp, maxTemp, AverageTemp, minVertVel, maxVertVel, AverageVertVel, & ! 6f9.1
f107, f107A, By, Bz, Vx, & ! 5f7.1
Hpi, HPn/1.0e9, HPs/1.0e9, &
HPn_d/1.0e9, HPs_d/1.0e9, HPn_w/1.0e9, HPs_w/1.0e9, HPn_m/1.0e9, HPs_m/1.0e9, & ! 9f10.1
CPCPn, CPCPs, & ! 2f10.2
HPn_d/1.0e9, HPs_d/1.0e9, HPn_w/1.0e9, HPs_w/1.0e9, HPn_m/1.0e9, HPs_m/1.0e9, & ! 9f8.1
CPCPn, CPCPs, & ! 2f7.1
SSLon, SSLat, SSVTEC ! 3f8.3

call flush_unit(iLogFileUnit_)
Expand Down
100 changes: 100 additions & 0 deletions srcTests/auto_test/UAM.in.000.default.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@

#DEBUG
0 debug level (0 = no info, 10 = max info)
0 cpu to watch
60.0 dt between normal code output to stdout
F usebarriers - forces the code to stop and wait more often

--------------------------------------------------------------------------

#RESTART
F Restart Code

--------------------------------------------------------------------------
start and end times:

#TIMESTART
2002 year
12 month
21 day
00 hour
00 minute
00 second

#TIMEEND
2002 year
12 month
21 day
00 hour
10 minute
00 second

#FIXEDDT
2.0

--------------------------------------------------------------------------
Set blocks in lon and lat.
- total cells in a direction = nBlocks x nCells (set in ModSize)
- res = (max - min) / num cells

#GRID
2 number of blocks in longitude
2 number of blocks in latitude
-90.0 minimum latitude to model
90.0 maximum latitude to model
0.0 longitude start to model (set to 0.0 for whole Earth)
0.0 longitude end to model (set to 0.0 for whole Earth)

--------------------------------------------------------------------------
Output file stuff

#SAVEPLOTS
60.0 dt for writing restart files
1 how many output files do you want
3DALL second output style
300.0 dt for output (1 every 5 min)


#NGDC_INDICES
UA/DataIn/f107.txt

#EUV_DATA
T Use FISM solar flux data
UA/DataIn/FISM/fismflux_daily_2002.dat Filename

------------ Electrodynamics Drivers ------------


#SME_INDICES
UA/DataIn/Examples/ae20021221.dat SME Filename
none onset time delay file
T convert SME to Hemispheric Power

#MHD_INDICES
UA/DataIn/Examples/imf20021221.dat

#ELECTRODYNAMICS
FTA
60.0
weimer05
60.0

-----------------------------------------------------------------


#APEX
F

#MSISOBC
T Shift the [O] density at the lower boundary by 6 months
0.0 change the obateness of the Earth by this percent (0 = none)


#AUSMSOLVER
T Use AUSM+-up Solvers

--------------------------------------------------------------------------



#END
100 changes: 100 additions & 0 deletions srcTests/auto_test/UAM.in.001.defaultRestart.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@

#DEBUG
0 debug level (0 = no info, 10 = max info)
0 cpu to watch
60.0 dt between normal code output to stdout
F usebarriers - forces the code to stop and wait more often

--------------------------------------------------------------------------

#RESTART
T Restart Code

--------------------------------------------------------------------------
start and end times:

#TIMESTART
2002 year
12 month
21 day
00 hour
00 minute
00 second

#TIMEEND
2002 year
12 month
21 day
00 hour
20 minute
00 second

#FIXEDDT
2.0

--------------------------------------------------------------------------
Set blocks in lon and lat.
- total cells in a direction = nBlocks x nCells (set in ModSize)
- res = (max - min) / num cells

#GRID
2 number of blocks in longitude
2 number of blocks in latitude
-90.0 minimum latitude to model
90.0 maximum latitude to model
0.0 longitude start to model (set to 0.0 for whole Earth)
0.0 longitude end to model (set to 0.0 for whole Earth)

--------------------------------------------------------------------------
Output file stuff

#SAVEPLOTS
60.0 dt for writing restart files
1 how many output files do you want
3DALL second output style
300.0 dt for output (1 every 5 min)


#NGDC_INDICES
UA/DataIn/f107.txt

#EUV_DATA
T Use FISM solar flux data
UA/DataIn/FISM/fismflux_daily_2002.dat Filename

------------ Electrodynamics Drivers ------------


#SME_INDICES
UA/DataIn/Examples/ae20021221.dat SME Filename
none onset time delay file
T convert SME to Hemispheric Power

#MHD_INDICES
UA/DataIn/Examples/imf20021221.dat

#ELECTRODYNAMICS
FTA
60.0
weimer05
60.0

-----------------------------------------------------------------


#APEX
F

#MSISOBC
T Shift the [O] density at the lower boundary by 6 months
0.0 change the obateness of the Earth by this percent (0 = none)


#AUSMSOLVER
T Use AUSM+-up Solvers

--------------------------------------------------------------------------



#END
Loading
Loading