forked from MSTEM-QUDA/BATSRUS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PARAM.XML
10518 lines (9010 loc) · 421 KB
/
PARAM.XML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!-- The syntax is described by share/Scripts/CheckParam.pl and the manual -->
<commandList name="BATSRUS: GM, EE, SC, IH and OH Components">
List of MH (GM, EE, SC, IH, and OH) commands used in the PARAM.in file
<!-- Set variables for expressions and rules -->
<set name="nVar" type="integer" value="$_Value{nVar}" />
<set name="nSpecies" type="integer" value="$_Value{nSpecies}" />
<set name="nFluid" type="integer" value="($_Value{nFluid} or 1)" />
<set name="nIonFluid" type="integer" value="($_Value{nIonFluid} or 1)" />
<set name="nNeutralFluid" type="integer" value="$_Value{nNeutralFluid}" />
<set name="UsePe" type="integer" value="$_Value{UsePe}" />
<set name="nG" type="integer" value="$_Value{nG}" />
<set name="nI" type="integer" value="$_Value{nI}" />
<set name="nJ" type="integer" value="$_Value{nJ}" />
<set name="nK" type="integer" value="$_Value{nK}" />
<set name="nDim" type="integer" value="3-($nJ==1)-($nK==1)" />
<set name="NameComp" type="string" value="$_NameComp" />
<set name="NameRestartOutDir" type="string" value="$NameComp/restartOUT" />
<set name="NamePlotDir" type="string" value="$NameComp/IO2" />
<set name="lLine" type="integer" value="400" />
<!-- Initialize MaxBlock to 0 so we can check if it was set or not -->
<set name="MaxBlock" type="integer" value="0" />
<commandgroup name="STAND ALONE MODE">
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!! STAND ALONE PARAMETERS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<command name="COMPONENT">
<parameter name="NameComp" type="string" input="select">
<option name="GM" default="T" />
<option name="EE" />
<option name="SC" />
<option name="IH" />
<option name="OH" />
</parameter>
<set name="NameRestartOutDir" type="string" value="$NameComp/restartOUT"/>
<set name="NamePlotDir" type="string" value="$NameComp/IO2"/>
#COMPONENT
GM NameComp
This command can be used in the stand-alone mode to make BATSRUS behave as
if it was the Global Magnetosphere (GM), Eruptive Event (EE),
Solar Corona (SC), Inner Heliosphere (IH) or Outer Heliosphere (OH)
component of the SWMF. The NameComp
variable contains the two-character component ID of the selected component.
If NameComp is different from the default component value, then
the default values for all parameters (including the component dependent
defaults, like coordinate system) are reset, therefore it should occur
as the first command if it is used to change the behavior of BATSRUS.
The default behavior is Global Magnetosphere (GM) for the stand-alone BATSRUS.
The command is also saved into the restart header files.
In the SWMF the BATSRUS codes are configured to the appropriate components,
so the default components should not be changed by this command.
</command>
<command name="DESCRIPTION" if="$_IsStandAlone">
<parameter name="StringDescription" type="string" length="$lLine" />
#DESCRIPTION
This is a test run for Jupiter with no rotation.
This command is only used in the stand alone mode.
The StringDescription string can be used to describe the simulation
for which the parameter file is written. The #DESCRIPTION command and
the StringDescription string are saved into the restart file,
which helps in identifying the restart files.
The default value is ``Please describe me!", which is self explanatory.
</command>
<command name="ECHO" if="$_IsStandAlone">
<parameter name="DoEcho" type="logical" default="F"/>
#ECHO
T DoEcho
This command is only used in the stand alone mode.
If the DoEcho variable is true, the input parameters are echoed back.
The default value for DoEcho is .false., but it is a good idea to
set it to true at the beginning of the PARAM.in file.
</command>
<command name="PROGRESS" if="$_IsStandAlone">
<parameter name="DnProgressShort" type="integer" min="-1" default="10" />
<parameter name="DnProgressLong" type="integer" min="-1" default="100" />
#PROGRESS
10 DnProgressShort
100 DnProgressLong
The frequency of short and long progress reports for BATSRUS in
stand alone mode. These are the defaults. Set -1-s for no progress reports.
</command>
<command name="TIMEACCURATE" if="$_IsStandAlone">
<parameter name="IsTimeAccurate" type="logical" default="T" />
#TIMEACCURATE
F IsTimeAccurate
This command is only used in stand alone mode.
If IsTimeAccurate is set to true, BATSRUS solves
a time dependent problem. If IsTimeAccurate is false, a steady-state
solution is sought for. It is possible to use steady-state mode
in the first few sessions to obtain a steady state solution,
and then to switch to time accurate mode in the following sessions.
In time accurate mode saving plot files, log files and restart files,
or stopping conditions are taken in simulation time, which is the
time relative to the initial time. In steady state mode the simulation
time is not advanced at all, instead the time step or iteration number
is used to control the frequencies of various actions.
In steady-state mode BATSRUS uses different time steps in different
grid cells (limited only by the local stability conditions)
to accelerate the convergence towards steady state.
The default is time accurate mode.
</command>
<command name="SUBCYCLING" alias="LOCALTIMESTEP">
<parameter name="UseSubcycling" type="logical" default="F" />
<parameter name="UseMaxTimeStep" type="logical" default="T"
if="$UseSubcycling"/>
<parameter name="DtLimitDim" type="real" min="0"
if="$UseSubcycling"/>
#SUBCYCLING
T UseSubcycling (rest read if UseSubcycling is true)
T UseMaxTimeStep
10.0 DtLimitDim
This command controls how the time stepping works in time accurate mode.
If UseSubcycling is true, the time step size in each grid block
can be different.
This algorithm is sometimes called "subcycling" because some of the blocks
will take several small time steps during a single global time step.
This should not be confused with the "steady state" mode
(see the TIMEACCURATE command) where each grid cell takes different
time steps and the result is only valid if a steady state is reached.
If UseMaxTimeStep is true, each blocks takes the time step determined by
the local stability condition but limited by the DtLimitDim parameter.
If UseMaxTimeStep is false, then the local time step will be set by
the AMR level. For Cartesian grids the time step will be proportional
to the physical cell size, which is optimal if the wave speeds are
roughly constant in the whole domain. Note that the global time step
is set so that the stability conditions hold in every grid block. A
conservative flux correction is applied at the resolution changes. On
the other hand, the normal velocity, normal magnetic/electric field
etc. used in some source terms are not "corrected", which is different
from the default uniform time step algorithm.
The DtLimitDim parameter sets an upper limit on the time step for
all the grid blocks in dimensional time units (typically seconds).
Setting this parameter to a reasonable value can greatly improve the
accuracy and robustness of the scheme with minimal effect on the
computational speed, since typically there are relatively few blocks that
would allow very large time steps. Setting DtLimitDim to a very large
value will result in a global time step based on the block with the
largest stable time step.
Currently the subcycling algorithm is either first or second order
accurate in time depending on the value of nStage set in the
#TIMESTEPPING command.
For spherical grids the #FIXAXIS command does not work with the subcycling
algorithm, on the other hand the #COARSENAXIS command can be used.
See also the #PARTSTEADY and #TIMESTEPLIMIT commands for related
time stepping algorithms.
The default is using a uniform time step for the whole domain.
</command>
<command name="BEGIN_COMP" multiple="T" if="$_IsStandAlone">
This command is allowed in stand alone mode only for the sake of the
test suite, which contains these commands when the framework is tested.
</command>
<command name="END_COMP" multiple="T" if="$_IsStandAlone">
This command is allowed in stand alone mode only for the sake of the
test suite, which contains these commands when the framework is tested.
</command>
<command name="RUN" if="$_IsStandAlone">
#RUN
This command is only used in stand alone mode.
The #RUN command does not have any parameters. It signals the end
of the current session, and makes BATSRUS execute the session with
the current set of parameters. The parameters for the next session
start after the #RUN command. For the last session there is no
need to use the #RUN command, since the #END command or simply
the end of the PARAM.in file makes BATSRUS execute the last session.
</command>
<command name="END">
#END
The #END command signals the end of the included file or the
end of the PARAM.in file. Lines following the #END command are
ignored. It is not required to use the #END command. The end
of the included file or PARAM.in file is equivalent with an
#END command in the last line.
</command>
</commandgroup>
<commandgroup name="PLANET PARAMETERS">
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!! PLANET PARAMETERS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
The planet commands can only be used in stand alone mode.
The commands allow to work with an arbitrary planet.
It is also possible to change some parameters of the planet relative
to the real values.
By default Earth is assumed with its real parameters.
Another planet (moon, comet) can be selected with the #PLANET
(#MOON, #COMET) command. The real planet parameters can be modified
and simplified with the other planet commands listed in this subsection.
These modified commands cannot precede the #PLANET command!
<command name="PLANET" alias="MOON,COMET"
if="$_IsFirstSession and $_IsStandAlone">
<parameter name="NamePlanet" type="string" case="upper" input="select">
<option name="NONE" />
<option name="NEW" />
<option name="MERCURY" />
<option name="VENUS" />
<option name="EARTH" default="T" />
<option name="MARS" />
<option name="JUPITER" />
<option name="SATURN" />
<option name="URANUS" />
<option name="NEPTUNE" />
<option name="PLUTO" />
<option name="MOON" />
<option name="IO" />
<option name="EUROPA" />
<option name="GANYMEDE" />
<option name="TITAN" />
<option name="ENCELADUS" />
<option name="HALLEY" />
<option name="COMET1P" />
<option name="BORRELLY" />
<option name="COMET19P" />
<option name="CHURYUMOVGERASIMENKO" />
<option name="COMET67P" />
<option name="HALEBOPP" />
</parameter>
<if expr="$NamePlanet =~ /NEW|GANYMEDE|COMET[16]|BORRELLY|PLUTO|NEPTUNE/">
<parameter name="RadiusPlanet" type="real" min="0" />
<parameter name="MassPlanet" type="real" min="0" />
<parameter name="OmegaPlanet" type="real" min="0" />
<parameter name="TiltRotation" type="real" min="0" />
<parameter name="TypeBField" type="string" input="select">
<option name="NONE" />
<option name="DIPOLE" default="T" />
</parameter>
</if>
<if expr="$TypeBField eq 'DIPOLE'">
<parameter name="MagAxisThetaGeo" type="real" min="0" max="180"/>
<parameter name="MagAxisPhiGeo" type="real" min="0" max="360"/>
<parameter name="DipoleStrength" type="real" />
</if>
<rule expr="not $PlanetCommand">
PLANET should precede $PlanetCommand
</rule>
#PLANET
NEW NamePlanet (rest of parameters read for unknown planet)
6300000.0 RadiusPlanet [m]
5.976E+24 MassPlanet [kg]
0.000000199 OmegaPlanet [radian/s]
23.5 TiltRotation [degree]
DIPOLE TypeBField
11.0 MagAxisThetaGeo [degree]
289.1 MagAxisPhiGeo [degree]
-31100.0E-9 DipoleStrength [T]
The NamePlanet parameter contains the name of the planet
with arbitrary capitalization. In case the name of the planet
is not recognized, the following variables are read:
RadiusPlanet is the radius of the planet,
MassPlanet is the mass of the planet,
OmegaPlanet is the angular speed relative to an inertial frame, and
TiltRotation is the tilt of the rotation axis relative to ecliptic North,
TypeBField, which can be "NONE" or "DIPOLE".
TypeBField="NONE" means that the planet does not have magnetic field.
If TypeBField is set to "DIPOLE" then the following variables are read:
MagAxisThetaGeo and MagAxisPhiGeo are the colatitude and longitude
of the north magnetic pole in corotating planetocentric coordinates.
Finally DipoleStrength is the equatorial strength of the magnetic dipole
field. The units are indicated in the above example, which shows the
Earth values approximately.
The default value is NamePlanet="Earth". Although many other planets
and some of the moons are recognized, some of the parameters,
like the equinox time are not yet properly set.
</command>
<command name="ROTATIONAXIS" if="$_IsStandAlone">
<parameter name="IsRotAxisPrimary" type="logical" default="T" />
<if expr="$IsRotAxisPrimary">
<parameter name="RotAxisTheta" type="real" min="0" max="180"/>
<parameter name="RotAxisPhi" type="real" min="0" max="360"/>
</if>
<set name="PlanetCommand" type="string" value="ROTATIONAXIS" />
#ROTATIONAXIS
T IsRotAxisPrimary (rest of parameters read if true)
23.5 RotAxisTheta
198.3 RotAxisPhi
If the IsRotAxisPrimary variable is false, the rotational axis
is aligned with the magnetic axis. If it is true, the other two variables
are read, which give the position of the rotational axis at the
initial time in the GSE coordinate system. Both angles are read in degrees
and stored internally in radians.
The default is to use the true rotational axis determined by the
date and time given by #STARTTIME.
</command>
<command name="ROTATION" if="$_IsStandAlone">
<parameter name="UseRotation" type="logical" default="T" />
<if expr="$UseRotation">
<parameter name="RotationPeriod" type="real" />
</if>
<set name="PlanetCommand" type="string" value="ROTATION" />
#ROTATION
T UseRotation
24.06575 RotationPeriod [hour] (read if UseRotation is true)
If UseRotation is false, the planet is assumed to stand still,
and the OmegaPlanet variable is set to zero.
If UseRotation is true, the RotationPeriod variable is read in hours,
and it is converted to the angular speed OmegaPlanet given in radians/second.
Note that OmegaPlanet is relative to an inertial coordinate system,
so the RotationPeriod is not 24 hours for the Earth, but the
length of the astronomical day.
The default is to use rotation with the real rotation period of the planet.
</command>
<command name="MAGNETICAXIS" if="$_IsStandAlone">
<parameter name="IsMagAxisPrimary" type="logical" default="T" />
<if expr="$IsMagAxisPrimary">
<parameter name="MagAxisTheta" type="real" min="0" max="180"/>
<parameter name="MagAxisPhi" type="real" min="0" max="360"/>
</if>
<set name="PlanetCommand" type="string" value="MAGNETICAXIS" />
#MAGNETICAXIS
T IsMagAxisPrimary (rest of parameters read if true)
34.5 MagAxisTheta [degree]
0.0 MagAxisPhi [degree]
If the IsMagAxisPrimary variable is false, the magnetic axis
is aligned with the rotational axis. If it is true, the other two variables
are read, which give the position of the magnetic axis at the
initial time in the GSE coordinate system. Both angles are read in degrees
and stored internally in radians.
The default is to use the true magnetic axis determined by the
date and time given by #STARTTIME.
</command>
<command name="MAGNETICCENTER" if="$_IsStandAlone">
<parameter name="MagCenterX" type="real" default="0.0" />
<parameter name="MagCenterY" type="real" default="0.0" />
<parameter name="MagCenterZ" type="real" default="0.0" />
<set name="PlanetCommand" type="string" value="MAGNETICCENTER" />
#MAGNETICCENTER
0.1 MagCenterX
-0.02 MagCenterY
0.0 MagCenterZ
Shifts the magnetic center (e.g. the center of the dipole) to the location
given by the three parameters. The default is no shift
(at least for most planets).
</command>
<command name="MONOPOLEB0">
<parameter name="MonopoleStrengthSi" type="real" default="0"/>
#MONOPOLEB0
16.0 MonopoleStrengthSi [Tesla]
The MonopoleStrengthSi variable contains the
magnetic strength of the monopole B0 field at R=1 radial distance.
The unit is Tesla unless the normalization is set to NONE
(see #NORMALIZATION command), when it is just the normalized value.
The default value is zero.
</command>
<command name="DIPOLE" if="$_IsStandAlone">
<parameter name="DipoleStrengthSi" type="real" />
#DIPOLE
-3.11e-5 DipoleStrengthSi [Tesla]
The DipoleStrengthSi variable contains the
magnetic equatorial strength of the dipole magnetic field in Tesla.
The default value is the real dipole strength for the planet.
For the Earth the default is taken to be -31100 nT.
The sign is taken to be negative so that the magnetic axis can
point northward as usual.
</command>
<command name="UPDATEB0" if="$_IsStandAlone">
<parameter name="DtUpdateB0" type="real" min="-1" default="0.0001" />
The DtUpdateB0 variable determines how often the position of
the magnetic axis is recalculated. A negative value indicates that
the motion of the magnetic axis during the course of the simulation
is neglected. This is an optimization parameter, since recalculating
the values which depend on the orientation of the magnetic
field can be costly. Since the magnetic field moves relatively
slowly as the planet rotates around, it may not be necessary
to continuously update the magnetic field orientation.
The default value is 0.0001, which means that the magnetic axis
is continuously followed.
</command>
<command name="IDEALAXES" if="$_IsStandAlone">
#IDEALAXES
The #IDEALAXES command has no parameters. It sets both the rotational
and magnetic axes parallel with the ecliptic North direction. In fact
it is identical with the commands:
#ROTATIONAXIS
T IsRotAxisPrimary
0.0 RotAxisTheta
0.0 RotAxisPhi
#MAGNETICAXIS
F IsMagAxisPrimary
but much shorter.
</command>
<command name="MULTIPOLEB0" if="$_IsStandAlone">
<parameter name="UseMultipoleB0" type="logical" default="F" />
<parameter name="MaxHarmonicDegree" type="integer" default="-1" />
<parameter name="NamePlanetHarmonicsFile" type="string" length="$lLine"/>
#MULTIPOLEB0
T UseMultipoleB0
10 MaxHarmonicDegree
planetharmonics.txt NamePlanetaryHarmonicsFile
Using this command, you can specify the
planetary magnetic field (B0) using the Spherical Harmonics
expansion. This is useful for e.g. to model the IGRF or complicated
planetary magnetic field. Planetary rotation is allowed when using
this option. We suggest using the GSE coordinate system using
the #COORDSYSTEM command. If UseMultipoleB0 is true, the
#IDEALAXES command is enforced i.e. the dipole magnetic axis
is aligned with the rotation axis. No matter what coordinate system
you use in GM, the multipole B0 calculation is always done in the
GEO coordinate system.
As of now this feature cannot be used with the IE solver, and
should be used in standalone GM/BATSRUS only. Secular variation
has not been implemented yet.
The planetharmonics.txt file should be of the form -
\begin{verbatim}
Header line (is not read) - n m g h (follow this specific order)
0 0 0.000000 0.000000
1 0 -29619.400000 0.000000
1 1 -1728.200000 5186.100000
2 0 -2267.700000 0.000000
2 1 3068.400000 -2481.600000
2 2 1670.900000 -458.000000
\end{verbatim}
Where g and h are the Legendre coefficients in units of nT.
</command>
</commandgroup>
<commandgroup name="USER DEFINED INPUT">
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!! USER DEFINED INPUT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<command name="USERSWITCH" alias="USERSWITCHES">
<parameter name="StringSwitch" type="string" length="$lLine" case="lower"/>
#USERSWITCH
-all +init +ic -perturb +B0 +source +update +progress StringSwitch
This command controls the use of user defined routines in src/ModUser.f90.
The string contains a single-space separated list of switches starting
with a + sign or a - sign for switching the routines on or off, respectively.
This command can occur multiple times in the same session.
Previous settings are preserved for the next session. The possible
switches are (with alternative names):
\begin{verbatim}
all : switch all routines on or off
init, init_session : initialize user module before running session
ic, initial_condition : initial conditions
perturb, perturbation : perturbation (default is false)
B0, get_b0 : user defined B0 field
source : user source terms (explicit and implicit)
Sexpl, source_expl : explicit user source terms
Simpl, source_impl : point-implicit user source terms
update, update_state : user defined state update
progress, write_progress: user progress report
\end{verbatim}
Default is that all implemented user routines are off.
When the perturbation is switched on, it gets switched off after
the perturbation is applied. The corresponding logicals can be
changed in the user module.
</command>
<command name="USERINPUTBEGIN" multiple="T">
#USERINPUTBEGIN
This command signals the beginning of the section of the file which
is read by the subroutine user\_read\_inputs in the ModUser.f90 file.
The section ends with the #USERINPUTEND command.
There is no XML based parameter checking in the user section.
</command>
<command name="USERINPUTEND" multiple="T">
#USERINPUTEND
This command signals the end of the section of the file which
is read by the subroutine user\_read\_inputs in the ModUser.f90 file.
The section begins with the #USERINPUTBEGIN command.
There is no XML based parameter checking in the user section.
</command>
</commandgroup>
<commandgroup name="TESTING AND TIMING">
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!! TESTING AND TIMING PARAMETERS !!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<command name="TESTINFO">
<parameter name="DoWriteCallSequence" type="logical" default="F"/>
#TESTINFO
T DoWriteCallSequence
If DoWriteCallSequence is set to true, the code will attempt to produce
a call sequence from the stop_mpi subroutine (which is called when the
code finds an error) by making an intentional floating point exception.
This will work only if the compiler is able to and requested to produce a
call sequence. The NAGFOR compiler combined with the -debug flag can do that.
Default is DoWriteCallSequence=F.
</command>
<command name="TEST">
<parameter name="StringTest" type="string" length="$lLine"/>
#TEST
read_inputs
A space separated list of subroutine names. Default is empty string.
Examples:\\
read_inputs - echo the input parameters following the #TEST line\\
project_B - info on projection scheme\\
implicit - info on implicit scheme\\
krylov - info on the Krylov solver\\
message_count- count messages\\
initial_refinement\\
...
Check the subroutines for call setoktest("...",oktest,oktest_me) to
see the appropriate strings.
</command>
<command name="TESTIJK">
<parameter name="iTest" type="integer" min="-$nG"
max="$nI+$nG" default="1" />
<parameter name="jTest" type="integer" min="-$nG"
max="$nJ+$nG" default="1" if="$nDim!=1" />
<parameter name="kTest" type="integer" min="-nG"
max="$nK+2" default="1" if="$nDim==3" />
<parameter name="iBlockTest" type="integer" min="1" default="1" />
<parameter name="iProcTest" type="integer" min="0" />
#TESTIJK
1 iTest (cell index for testing)
1 jTest (read for nDim = 2 or 3)
1 kTest (read for nDim = 3)
1 iBlockTest (block index for testing)
0 iProcTest (processor index for testing)
The location of test info in terms of indices, block and processor number.
Note that the user should set #TESTIJK or #TESTXYZ, not both. If both
are set, the final one in the session will set the test point.
</command>
<command name="TESTXYZ">
<parameter name="xTest" type="real" min="$xMin" max="$xMax" />
<parameter name="yTest" type="real" min="$yMin" max="$yMax" />
<parameter name="zTest" type="real" min="$zMin" max="$zMax" />
#TESTXYZ
1.5 xTest (X coordinate of cell for testing)
-10.5 yTest (Y coordinate of cell for testing)
-10. zTest (Z coordinate of cell for testing)
The location of test info in terms of coordinates.
Note that the user should set #TESTIJK or #TESTXYZ, not both. If both
are set, the final one in the session will set the test point.
</command>
<command name="TESTVAR">
<parameter name="NameTestVar" type="string" length="20" case="lower"
default="1" />
#TESTVAR
12 NameTestVar
#TESTVAR
p NameTestVar
Index or the name of the variable to be tested. The name should agree with
one of the names in the NameVar_V array in ModEquation.f90 (case insensitive).
If an index is given instead of a name, it should be in the range 1 to nVar.
Default is the first variable that is usually density.
</command>
<command name="TESTDIM">
<parameter name="iDimTest" type="integer" input="select">
<option name="all" value="0" />
<option name="x" value="1" default="T" />
<option name="y" value="2" />
<option name="z" value="3" />
</parameter>
#TESTDIM
1 iDimTest
Index of dimension/direction to be tested. Default is X dimension.
</command>
<command name="TESTSIDE">
<parameter name="iSideTest" type="integer" input="select">
<option name="all" value="0" default="T"/>
<option name="left" value="-1" />
<option name="right" value="1" />
</parameter>
#TESTSIDE
0 iSideTest (-1, 0, 1)
Select the side of the cell to be tested. -1 is for "left" side, +1 is
for right side, 0 is for both sides. Currently this is implemented in the
UpdateStateFast code only, where the sides are done with multiple threads
on the GPU. Default value is shown.
</command>
<command name="STRICT" multiple="T">
<parameter name="UseStrict" type="logical" default="T" />
#STRICT
T UseStrict
If true then stop when parameters are incompatible. If false, try to
correct parameters and continue. Default is true, i.e. strict mode
</command>
<command name="VERBOSE">
<parameter name="lVerbose" type="integer" input="select">
<option name="errors and warnings only" value="-1" />
<option name="start and end of sessions" value="0" />
<option name="default" value="1" default="T"/>
<option name="calls on test processor" value="10" />
<option name="calls on all processors" value="100" />
</parameter>
#VERBOSE
-1 lVerbose
Verbosity level controls the amount of output to STDOUT. Default level is 1.
\\
lVerbose $\leq -1$ only warnings and error messages are shown.\\
lVerbose $\geq 0$ start and end of sessions is shown.\\
lVerbose $\leq 1$ a lot of extra information is given.\\
lVerbose $\leq 10$ all calls of set_oktest are shown for the test processor.\\
lVerbose $\leq 100$ all calls of set_oktest are shown for all processors.\\
</command>
<command name="DEBUG">
<parameter name="DoDebug" type="logical" default="F" />
<parameter name="DoDebugGhost" type="logical" default="F" />
#DEBUG
F DoDebug (use it as if(okdebug.and.oktest)...)
F DoDebugGhost (parameter for show_BLK in library.f90)
Excessive debug output can be controlled by the global okdebug parameter
</command>
<command name="CODEVERSION" if="$_IsFirstSession">
<parameter name="CodeVersion" min="0" default="7.50" type="real" />
#CODEVERSION
7.50 CodeVersion
Checks CodeVersion. Prints a WARNING if it differs from the CodeVersion
defined in ModMain.f90.
</command>
<command name="USERMODULE" if="$_IsFirstSession">
<parameter name="NameUserModule" type="string" length="$lLine"
default="EMPTY" />
<parameter name="VersionUserModule" type="real" min="0"
default="1.0" />
#USERMODULE
TEST PROBLEM Smith
1.3 VersionUserModule
Checks the selected user module. If the name or the version number
differs from that of the compiled user module, a warning is written,
and the code stops in strict mode (see #STRICT command).
This command and its parameters are written into the restart header file too,
so the user module is checked when a restart is done.
There are no default values. If the command is not present, the user
module is not checked.
</command>
<command name="EQUATION" if="$_IsFirstSession">
<parameter name="NameEquation" type="string" length="$lLine"
default="MHD" />
<parameter name="nVar" type="integer" default="8" />
#EQUATION
MHD NameEquation
8 nVar
Define the equation name and the number of variables.
If any of these do not agree with the values determined
by the code, BATSRUS stops with an error. Used in restart
header files and can be given in PARAM.in as a check
and as a description.
</command>
<command name="RESTARTVARIABLES">
<parameter name="NameRestartVar" type="string" length="$lLine"/>
#RESTARTVARIABLES
Rho Mx My Mz Bx By Bz p NameRestartVar
The NameRestartVar string contains a space separated list of variable names
that are stored in a restart file. This command is saved automatically
into the restart files. Other then useful information about the content of
the restart file, it is also needed for the #CHANGEVARIABLES command.
The default assumption is that the restart file contains the same variables
as the equation module that the code is compiled with.
</command>
<command name="CHANGEVARIABLES">
<parameter name="DoChangeRestartVariables" type="logical" default="F"/>
#CHANGEVARIABLES
T DoChangeRestartVariables
This command allows reading restart files that were produced with different
equation and user modules than what the restarted code is using.
If DoChangeRestartVariables is set to true, the code attempts to copy the
corresponding variables correctly.
This typically works if the restart file contains all the variables
that the restarted code is using. See subroutine match\_copy\_restart\_variables
in ModRestartFile.f90 for more detail.
The default is to use the same variables and equation modules during restart.
</command>
<command name="SPECIFYRESTARTVARMAPPING">
<parameter name="DoSpecifyRestartVarMapping" type="logical" default="F"/>
<parameter name="NameVarsRestartFrom" type="string" length="$lLine"/>
<parameter name="NameVarsRestartTo" type="string" length="$lLine"/>
#SPECIFYRESTARTVARMAPPING
T DoSpecifyRestartVarMapping
H2OpRho H2OpP NameVarsRestartFrom
H3OpRho P NameVarsRestartTo
This command allows specifying the mapping of variables when reading restart
files in one equation/user file to another equation/user file. In the above
example, the code will use the values of H2OpRho/H2OpP in the old equation/user
file to initialize the variables H3OpRho/P in the new equation/user file.
This mapping applies after the default mapping which maps the variables with
the same variable names, meaning that it will overwrite the default mapping
algorithm. For example, if both the original equation/user file and the new
equation/user file have the variable P, the code will initialize P in the new
equation/user file with the values of P in the old equation/user file by
default. However, in the above example, users choose to map H2OpP in the
old equation/user file to the varaible P in the new equation/user file. The
mapping of variables is also shown in the runlog in case the user wants to
see how the variables are mapped.
The deafult is not to apply user specified mapping even a different
equation/user file is used during restart.
</command>
<command name="PRECISION" if="$_IsFirstSession">
<parameter name="nByteReal" type="integer" input="select">
<option name="single precision" value="4" default="$_nByteReal==4"/>
<option name="double precision" value="8" default="$_nByteReal==8" />
</parameter>
<rule expr="$nByteReal==$_nByteReal or not $UseStrict">
nByteReal in file must agree with _nByteReal in strict mode.
</rule>
#PRECISION
8 nByteReal
Define the number of bytes in a real number. If it does not agree
with the value determined by the code, BATSRUS stops with an error
unless the strict mode is switched off.
This is used in restart header files to store (and check) the precision
of the restart files. It is now possible to read restart files with
a precision that differs from the precision the code is compiled with,
but strict mode has to be switched off with the #STRICT command.
The #PRECISION command may also be used to enforce a certain precision.
</command>
<command name="CHECKGRIDSIZE" if="$_IsFirstSession">
<parameter name="nI" type="integer" min="$nI" max="$nI" />
<parameter name="nJ" type="integer" min="$nJ" max="$nJ" />
<parameter name="nK" type="integer" min="$nK" max="$nK" />
<parameter name="MinBlockAll" type="integer" default="4000" min="1" />
<set name="MaxBlock" value="$MinBlockAll+1"/>
#CHECKGRIDSIZE
4 nI
4 nJ
4 nK
576 MinBlockAll
This command is typically used in the restart headerfile to check consistency.
The nI, nJ, nK parameters provide the block size in terms of number of
grid cells in the 3 directions. The code stops with an error message
if nI, nJ, or nK differ from the values set with Config.pl -g=...
The MinBlockAll parameter stores the total number of grid blocks
actually used at the time the restart file was saved.
When doing a restart, it is used to set the number of grid blocks
to be sufficient to coninue the run as long as no AMR is performed.
To allocate more blocks, use the #GRIDBLOCKALL command.
This command can also be used directly in PARAM.in to check the block size
and to set the total number of blocks at the same time.
</command>
<command name="BLOCKLEVELSRELOADED">
#BLOCKLEVELSRELOADED
This command means that the restart file contains the information about
the minimum and maximum allowed refinement levels for each block.
This command is only used in the restart header file.
</command>
<command name="TIMING" if="$_IsStandAlone">
<parameter name="UseTiming" type="logical" default="T" />
<if expr="$UseTiming">
<parameter name="DnTiming" type="integer" min="-3" default="-2" />
<parameter name="nDepthTiming" type="integer" min="-1" default="-1" />
<parameter name="TypeTimingReport" type="string" input="select">
<option name="cumulative" value="cumu" default="1" />
<option name="list" />
<option name="tree" />
</parameter>
</if>
#TIMING
T UseTiming (rest of parameters read if true)
-2 DnTiming (-3 none, -2 final, -1 each session)
-1 nDepthTiming (-1 for arbitrary depth)
cumu TypeTimingReport (cumu/list/tree + optional 'all')
This command can only be used in stand alone mode. In the SWMF the
#TIMING command should be issued for CON.
If UseTiming=.true., the TIMING module must be on.
If UseTiming=.false., the execution is not timed.
Dntiming determines the frequency of timing reports.
If DnTiming .ge. 1, a timing report is produced every dn_timing step.
If DnTiming .eq. -1, a timing report is shown at the end of each session.
If DnTiming .eq. -2, a timing report is shown at the end of the whole run.
If DnTiming .eq. -3, no timing report is shown.
nDepthTiming determines the depth of the timing tree. A negative number
means unlimited depth. If TimingDepth is 1, only the full BATSRUS execution
is timed.
TypeTimingReport determines the format of the timing reports:
'cumu' - cumulative list sorted by timings
'list' - list based on caller and sorted by timings
'tree' - tree based on calling sequence
If the word 'all' is added, the timing is done on all the CPU-s. One output
file will be created for each processor.
The default values are shown above.
</command>
</commandgroup>
<commandgroup name="INITIAL AND BOUNDARY CONDITIONS">
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!! MAIN INITIAL AND BOUNDARY CONDITION PARAMETERS !!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<command name="NORMALIZATION" if="$_IsFirstSession">
<parameter name="TypeNormalization" type="string" case="upper"
input="select">
<option name="SI"/>
<option name="PLANETARY" default="T"/>
<option name="SOLARWIND"/>
<option name="OUTERHELIO"/>
<option name="NONE"/>
<option name="USER"/>
<option name="READ"/>
</parameter>
<if expr="$TypeNormalization =~ /READ/">
<parameter name="No2SiUnitX" type="real" min="0" default="1"/>
<parameter name="No2SiUnitU" type="real" min="0" default="1"/>
<parameter name="No2SiUnitRho" type="real" min="0" default="1"/>
</if>
#NORMALIZATION
READ TypeNormalization
1000.0 No2SiUnitX (only read if TypeNormalization=READ)
1000.0 No2SiUnitU (only read if TypeNormalization=READ)
1.0e-6 No2SiUnitRho (only read if TypeNormalization=READ)
This command determines what units are used internally in BATSRUS.
The units are normalized so that several physical constants become
unity (e.g. the permeability of vacuum), so the equations are simpler
in the code. The normalization also helps to keep the various
quantities within reasonable ranges. For example density of space
plasma is very small in SI units, so it is better to use some normalization,
like amu/cm$^3$. Also note that distances and positions (like grid size,
grid resolution, plotting resolution, radius of the inner body etc)
are always read in normalized units from the PARAM.in file.
Other quantities are read in I/O units (see the #IOUNITS command).
The normalization of the distance, velocity and density are
determined by the TypeNormalization parameter. The normalization
of all other quantities are derived from these three values.
It is important to note that the normalization of number density
(defined as the density normalization divided by the proton mass)
is usually not consistent with the inverse cube of the normalization
of distance.
Possible values for TypeNormalization are NONE, PLANETARY, SOLARWIND,
OUTERHELIO, USER and READ.
If TypeNormalization="NONE" then the distance, velocity and density
units are the SI units, i.e. meter, meter/sec, and kg/m$^3$.
Note that the magnetic field and the temperature are still normalized
differently from SI units so that the Alfven speed is $B/\sqrt{\rho}$
and the ion temperature is simply $p/(\rho/AverageIonMass)$,
where the AverageIonMass is given relative to the mass of proton.
If TypeNormalization="PLANETARY" then the distance unit is the
radius of the central body (moon, planet, or the Sun). If there is
no central body, the length normalization is 1km. The velocity unit
is km/s, and the density unit is amu/cm3.
TypeNormalization="SOLARWIND" is used for the solar corona and
the inner heliosphere components. The distance unit is the
solar radius, the velocity and density are normalized to
the density and the sound speed of the coronal plasma defined
by the #CORONA command.
For planetary applications (GM component), TypeNormalization="SOLARWIND"
is depreciated. If it is used then the distance unit is the radius of the
planet, and the velocity and density are normalized to