Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/LANL/RAM-SCB
Browse files Browse the repository at this point in the history
  • Loading branch information
Vania Jordanova committed Nov 30, 2023
2 parents 3ebaa6f + 200cef0 commit 8c1f25e
Show file tree
Hide file tree
Showing 83 changed files with 31,550 additions and 411 deletions.
55 changes: 50 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ default : RAM_SCB
include Makefile.def

srcDir = src
GlowDir= srcGlow

INSTALLFILES = ${srcDir}/Makefile.DEPEND \
${srcDir}/Makefile.RULES \
srcInterface/Makefile.DEPEND \
srcExternal/Makefile.DEPEND

srcExternal/Makefile.DEPEND \
${GlowDir}/Makefile.DEPEND
help:
@echo ' '
@echo ' You can "make" the following:'
Expand All @@ -30,6 +32,7 @@ PDF:
RAM_SCB:
@cd ${SHAREDIR}; make LIB
@cd srcExternal; make LIB
@cd ${GlowDir}; make LIB
@cd ${srcDir}; make LIB
@cd ${srcDir}; make RAM_SCB

Expand All @@ -41,12 +44,14 @@ LIB:
cd ${srcDir}; make LIB
cd srcInterface; make LIB
cd srcExternal; make LIB
cd ${GlowDir}; make LIB

clean:
@touch ${INSTALLFILES}
@cd ${srcDir}; make clean
@cd srcInterface; make clean
@cd srcExternal; make clean
@cd ${GlowDir}; make clean
@(if [ -d util ]; then cd util; make clean; fi);
@(if [ -d share ]; then cd share; make clean; fi);

Expand All @@ -59,6 +64,7 @@ allclean:
@(if [ -d srcPspline ]; then rm -rf srcPspline; fi);
@cd ${srcDir}; make distclean
@cd srcInterface; make distclean
@cd ${GlowDir}; make distclean
rm -f *~

rundir:
Expand All @@ -75,9 +81,9 @@ rundir:
cd ${RUNDIR}; \
ln -s ../input/bav_diffcoef_chorus_rpa_Kp*.PAonly.dat .
cd ${RUNDIR}/IM/output; \
mkdir -p ram/Dsbnd scb/Day00
mkdir -p ram/Dsbnd scb/Day00 sce/
cd ${RUNDIR}/IM; \
mkdir input_ram input_scb output_swmf; \
mkdir input_ram input_scb input_sce output_swmf; \
mkdir restartIN restartOUT; \
tar xzf ${IMDIR}/input/ramscb_inputs.tgz; \
mv Input_git/EMIC_model input_ram/; \
Expand All @@ -89,7 +95,8 @@ rundir:
mv Input_git/*geomlt*.txt input_ram/; \
mv initialization.nc input_ram/; \
mv QinDenton_20130317_1min.txt input_scb/; \
mv NitrogenCrossSections.dat input_ram/;
mv NitrogenCrossSections.dat input_ram/; \
cp -r ${IMDIR}/input/glow_data input_sce/;
@(if [ "$(STANDALONE)" != "NO" ]; then \
cd ${RUNDIR} ; \
cp ${IMDIR}/Param/PARAM.in.default ./PARAM.in; \
Expand All @@ -98,6 +105,7 @@ rundir:
rm -f output; \
ln -s IM/output/ram output_ram; \
ln -s IM/output/scb output_scb; \
ln -s IM/output/sce output_sce;\
fi)


Expand Down Expand Up @@ -441,3 +449,40 @@ testEMIC_check:
${IMDIR}/output/testEMIC/pressure.ref \
>> testEMIC.diff
@echo "Test Successful!"



#TEST SCE----------------------------------
testSCE:
@echo "starting..." > testSCE.diff
@echo "testSCE_compile..." >> testSCE.diff
make testSCE_compile
@echo "testSCE_rundir..." >> testSCE.diff
make testSCE_rundir PARAMFILE=PARAM.in.testSCE
@echo "testSCE_run..." >> testSCE.diff
make testSCE_run MPIRUN=
@echo "testSCE_check..." >> testSCE.diff
make testSCE_check

testSCE_compile:
make

testSCE_rundir:
rm -rf ${TESTDIRC}
make rundir RUNDIR=${TESTDIRC} STANDALONE="YES"
cp Param/${PARAMFILE} ${TESTDIRC}/PARAM.in
cp -r input/glow_data ${TESTDIRC}/=

testSCE_run:
cd ${TESTDIRC}; ${MPIRUN} ./ram_scb.exe | tee runlog;

testSCE_check:
${SCRIPTDIR}/DiffNum.pl -b -a=1e-9 \
${TESTDIRC}/output_ram/log_d20130317_t000000.log \
${IMDIR}/output/testSCE/log.ref \
> testSCE.diff
${SCRIPTDIR}/DiffNum.pl -b -a=1e-9 \
${TESTDIRC}/output_ram/pressure_d20130317_t001000.dat \
${IMDIR}/output/testSCE/pressure.ref \
>> testSCE.diff
@echo "Test Successful!"
64 changes: 64 additions & 0 deletions PARAM.XML
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,69 @@ F PressureDetail

</commandgroup>

<commandgroup name="SCE">
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!SCE group!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

<command name="IONOSPHERE">
<parameter name="iConductanceModel" type="integer" default="7"/>
<parameter name="StarLightPedConductance" type="float" default="2.5"/>
<parameter name="DoUseFullSpec" type="logical" default="F"/>
<parameter name="DoSaveGLOWConductivity" type="logical" default="F"/>
#IONOSPHERE
7 iConductanceModel
2.5 StarLightPedConductance
F DoUseFullSpec
F DoSaveGLOWConductivity

\begin{itemize}
\item iConductanceModel: 7 uses Robinson's statistical conductance model; 9 uses S. Solomon's GLOW model. If "9" is used, the last two commands are needed. When the GLOW model is used, parallelizing is recommended.
\item StarLightPedConductance: the background conductance due to star light
\item DoUseFullSpec: only needed when iConductanceModel=9; It uses full precipitating spectrum as input to the GLOW
\item DoSaveGLOWConductivity: only needed when iConductanceModel=9; It saves height-dependent conductivity from GLOW
</command>

<command name="BOUNDARY">
<parameter name="LatBoundary" type="float" default="50"/>
#BOUNDARY
50 LatBoundary

Specify the low latitudinal boundary for the ionospheric potential solver. Default is set at 50 degree magnetic latitude.
</command>

<command name="SOLVER">
<parameter name="NameSolver" type="string" default="GMRES"/>
#SOLVER
GMRES NameSolver (gmres or bicgstab)

Specify the scheme for the ionospheric potential solver.
</command>

<command name="KRYLOV">
<parameter name="UsePreconditioner" type="logical" default="T"/>
<parameter name="UseInitialGuess" type="logical" default="T"/>
<parameter name="Tolerance" type="real" min="0" default="0.01"/>
<parameter name="MaxIteration" type="integer" min="1" default="100"/>

#KRYLOV
T UsePreconditioner
T UseInitialGuess
0.01 Tolerance
100 MaxIteration

This command controls the parameters for the Krylov solver used to
solve the Poisson type equation for the electric potential.
If UsePreconditioner is true the solver uses a preconditioner.
If UseInitialGuess is true, the previous solution is used as an
initial guess. The Tolerance parameter sets the second norm of
the final (preconditioned) residual. The MaxIteration parameter sets the
maximum number of iterations before the linear solver gives up.
In most cases the default values should work fine.

The default values are shown above.
</command>

<commandgroup name="COMPONENTS">
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!Components group!!!!!!!!!
Expand Down Expand Up @@ -478,6 +541,7 @@ Set the source for the convective electric field in RAM-SCB. The choice made wi
\item \textbf{VOLS}: $K_{P}$-based Volland-Stern empirical electric field (internal VS calculation).
\item \textbf{WESC}: Weimer 2001 empirical electric field mapped to the equatorial plane via RAM-SCB field lines (internal W01 calculation).
\item \textbf{W5SC}: Weimer 2005 empirical electric field mapped to the equatorial plane via RAM-SCB field lines (internal W05 calculation).
\item \textbf{RSCE}: self-consistently calculated electric field mapped to the equatorial plane via RAM-SCB field lines. If this option is chosen, the following commands are needed: IONOSPHERE, BOUNDARY, SOLVER, KRYLOV. The description of these commands are provided below.
\end{enumerate}

The parameter UseEfInd turns the use of induced electric field on or off. Default is no induced electric field.
Expand Down
Loading

0 comments on commit 8c1f25e

Please sign in to comment.