phys_consts.F90 Source File


Files dependent on this one

sourcefile~~phys_consts.f90~~AfferentGraph sourcefile~phys_consts.f90 phys_consts.F90 sourcefile~gemini.f90 gemini.f90 sourcefile~gemini.f90->sourcefile~phys_consts.f90 sourcefile~mpimod.f90 mpimod.F90 sourcefile~gemini.f90->sourcefile~mpimod.f90 sourcefile~potentialbcs_mumps.f90 potentialBCs_mumps.f90 sourcefile~gemini.f90->sourcefile~potentialbcs_mumps.f90 sourcefile~neutral.f90 neutral.f90 sourcefile~gemini.f90->sourcefile~neutral.f90 sourcefile~precipbcs_mod.f90 precipBCs_mod.f90 sourcefile~gemini.f90->sourcefile~precipbcs_mod.f90 sourcefile~timeutils.f90 timeutils.f90 sourcefile~gemini.f90->sourcefile~timeutils.f90 sourcefile~temporal.f90 temporal.f90 sourcefile~gemini.f90->sourcefile~temporal.f90 sourcefile~grid.f90 grid.f90 sourcefile~gemini.f90->sourcefile~grid.f90 sourcefile~mesh.f90 mesh.f90 sourcefile~gemini.f90->sourcefile~mesh.f90 sourcefile~io.f90 io.f90 sourcefile~gemini.f90->sourcefile~io.f90 sourcefile~potential_comm_mumps.f90 potential_comm_mumps.f90 sourcefile~gemini.f90->sourcefile~potential_comm_mumps.f90 sourcefile~multifluid.f90 multifluid.f90 sourcefile~gemini.f90->sourcefile~multifluid.f90 sourcefile~mpimod.f90->sourcefile~phys_consts.f90 sourcefile~testinterp2.f90 testinterp2.f90 sourcefile~testinterp2.f90->sourcefile~phys_consts.f90 sourcefile~interpolation.f90 interpolation.f90 sourcefile~testinterp2.f90->sourcefile~interpolation.f90 sourcefile~test_dayrollover.f90 test_dayrollover.f90 sourcefile~test_dayrollover.f90->sourcefile~phys_consts.f90 sourcefile~test_dayrollover.f90->sourcefile~timeutils.f90 sourcefile~fang_run.f90 fang_run.f90 sourcefile~fang_run.f90->sourcefile~phys_consts.f90 sourcefile~fang.f90 fang.f90 sourcefile~fang_run.f90->sourcefile~fang.f90 sourcefile~potentialbcs_mumps.f90->sourcefile~phys_consts.f90 sourcefile~potentialbcs_mumps.f90->sourcefile~mpimod.f90 sourcefile~potentialbcs_mumps.f90->sourcefile~interpolation.f90 sourcefile~potentialbcs_mumps.f90->sourcefile~timeutils.f90 sourcefile~reader.f90 reader.f90 sourcefile~potentialbcs_mumps.f90->sourcefile~reader.f90 sourcefile~potentialbcs_mumps.f90->sourcefile~grid.f90 sourcefile~potentialbcs_mumps.f90->sourcefile~mesh.f90 sourcefile~pdeelliptic.f90 PDEelliptic.f90 sourcefile~pdeelliptic.f90->sourcefile~phys_consts.f90 sourcefile~pdeelliptic.f90->sourcefile~mpimod.f90 sourcefile~magcalc.f90 magcalc.f90 sourcefile~magcalc.f90->sourcefile~phys_consts.f90 sourcefile~magcalc.f90->sourcefile~mpimod.f90 sourcefile~magcalc.f90->sourcefile~timeutils.f90 sourcefile~magcalc.f90->sourcefile~grid.f90 sourcefile~magcalc.f90->sourcefile~mesh.f90 sourcefile~magcalc.f90->sourcefile~io.f90 sourcefile~neutral.f90->sourcefile~phys_consts.f90 sourcefile~neutral.f90->sourcefile~mpimod.f90 sourcefile~neutral.f90->sourcefile~interpolation.f90 sourcefile~neutral.f90->sourcefile~timeutils.f90 sourcefile~neutral.f90->sourcefile~reader.f90 sourcefile~neutral.f90->sourcefile~grid.f90 sourcefile~neutral.f90->sourcefile~mesh.f90 sourcefile~readgrid_hdf5.f90 readgrid_hdf5.f90 sourcefile~readgrid_hdf5.f90->sourcefile~phys_consts.f90 sourcefile~read.f90 read.f90 sourcefile~readgrid_hdf5.f90->sourcefile~read.f90 sourcefile~interpolation.f90->sourcefile~phys_consts.f90 sourcefile~precipbcs_mod.f90->sourcefile~phys_consts.f90 sourcefile~precipbcs_mod.f90->sourcefile~mpimod.f90 sourcefile~precipbcs_mod.f90->sourcefile~interpolation.f90 sourcefile~precipbcs_mod.f90->sourcefile~timeutils.f90 sourcefile~precipbcs_mod.f90->sourcefile~reader.f90 sourcefile~precipbcs_mod.f90->sourcefile~grid.f90 sourcefile~precipbcs_mod.f90->sourcefile~mesh.f90 sourcefile~timeutils.f90->sourcefile~phys_consts.f90 sourcefile~reader.f90->sourcefile~phys_consts.f90 sourcefile~temporal.f90->sourcefile~phys_consts.f90 sourcefile~temporal.f90->sourcefile~mpimod.f90 sourcefile~temporal.f90->sourcefile~mesh.f90 sourcefile~test_fang.f90 test_fang.f90 sourcefile~test_fang.f90->sourcefile~phys_consts.f90 sourcefile~test_fang.f90->sourcefile~fang_run.f90 sourcefile~test_diffusion1d.f90 test_diffusion1D.f90 sourcefile~test_diffusion1d.f90->sourcefile~phys_consts.f90 sourcefile~pdeparabolic.f90 PDEparabolic.f90 sourcefile~test_diffusion1d.f90->sourcefile~pdeparabolic.f90 sourcefile~fang.f90->sourcefile~phys_consts.f90 sourcefile~test_formats.f90 test_formats.f90 sourcefile~test_formats.f90->sourcefile~phys_consts.f90 sourcefile~test_formats.f90->sourcefile~timeutils.f90 sourcefile~grid.f90->sourcefile~phys_consts.f90 sourcefile~grid.f90->sourcefile~mpimod.f90 sourcefile~grid.f90->sourcefile~reader.f90 sourcefile~grid.f90->sourcefile~mesh.f90 sourcefile~readgrid_raw.f90 readgrid_raw.f90 sourcefile~readgrid_raw.f90->sourcefile~phys_consts.f90 sourcefile~readgrid_raw.f90->sourcefile~read.f90 sourcefile~potential_mumps.f90 potential_mumps.f90 sourcefile~potential_mumps.f90->sourcefile~phys_consts.f90 sourcefile~potential_mumps.f90->sourcefile~mpimod.f90 sourcefile~potential_mumps.f90->sourcefile~pdeelliptic.f90 sourcefile~potential_mumps.f90->sourcefile~interpolation.f90 sourcefile~potential_mumps.f90->sourcefile~mesh.f90 sourcefile~calculus.f90 calculus.f90 sourcefile~potential_mumps.f90->sourcefile~calculus.f90 sourcefile~mesh.f90->sourcefile~phys_consts.f90 sourcefile~test_potential2d.f90 test_potential2D.f90 sourcefile~test_potential2d.f90->sourcefile~phys_consts.f90 sourcefile~test_potential2d.f90->sourcefile~pdeelliptic.f90 sourcefile~io.f90->sourcefile~phys_consts.f90 sourcefile~io.f90->sourcefile~mpimod.f90 sourcefile~io.f90->sourcefile~grid.f90 sourcefile~calculus.f90->sourcefile~phys_consts.f90 sourcefile~calculus.f90->sourcefile~mesh.f90 sourcefile~diffusion.f90 diffusion.f90 sourcefile~diffusion.f90->sourcefile~phys_consts.f90 sourcefile~diffusion.f90->sourcefile~grid.f90 sourcefile~diffusion.f90->sourcefile~mesh.f90 sourcefile~diffusion.f90->sourcefile~pdeparabolic.f90 sourcefile~potential_comm_mumps.f90->sourcefile~phys_consts.f90 sourcefile~potential_comm_mumps.f90->sourcefile~mpimod.f90 sourcefile~potential_comm_mumps.f90->sourcefile~potentialbcs_mumps.f90 sourcefile~potential_comm_mumps.f90->sourcefile~pdeelliptic.f90 sourcefile~potential_comm_mumps.f90->sourcefile~grid.f90 sourcefile~potential_comm_mumps.f90->sourcefile~potential_mumps.f90 sourcefile~potential_comm_mumps.f90->sourcefile~mesh.f90 sourcefile~potential_comm_mumps.f90->sourcefile~calculus.f90 sourcefile~collisions.f90 collisions.f90 sourcefile~potential_comm_mumps.f90->sourcefile~collisions.f90 sourcefile~multifluid.f90->sourcefile~phys_consts.f90 sourcefile~multifluid.f90->sourcefile~mpimod.f90 sourcefile~multifluid.f90->sourcefile~precipbcs_mod.f90 sourcefile~multifluid.f90->sourcefile~timeutils.f90 sourcefile~multifluid.f90->sourcefile~grid.f90 sourcefile~multifluid.f90->sourcefile~mesh.f90 sourcefile~multifluid.f90->sourcefile~calculus.f90 sourcefile~multifluid.f90->sourcefile~diffusion.f90 sourcefile~ionization.f90 ionization.f90 sourcefile~multifluid.f90->sourcefile~ionization.f90 sourcefile~advec_mpi.f90 advec_mpi.f90 sourcefile~multifluid.f90->sourcefile~advec_mpi.f90 sourcefile~multifluid.f90->sourcefile~collisions.f90 sourcefile~sources.f90 sources.f90 sourcefile~multifluid.f90->sourcefile~sources.f90 sourcefile~ionization.f90->sourcefile~phys_consts.f90 sourcefile~ionization.f90->sourcefile~mpimod.f90 sourcefile~ionization.f90->sourcefile~neutral.f90 sourcefile~ionization.f90->sourcefile~timeutils.f90 sourcefile~ionization.f90->sourcefile~fang.f90 sourcefile~ionization.f90->sourcefile~grid.f90 sourcefile~ionization.f90->sourcefile~mesh.f90 sourcefile~testinterp3.f90 testinterp3.f90 sourcefile~testinterp3.f90->sourcefile~phys_consts.f90 sourcefile~testinterp3.f90->sourcefile~interpolation.f90 sourcefile~testinterp1.f90 testinterp1.f90 sourcefile~testinterp1.f90->sourcefile~phys_consts.f90 sourcefile~testinterp1.f90->sourcefile~interpolation.f90 sourcefile~advec.f90 advec.f90 sourcefile~advec.f90->sourcefile~phys_consts.f90 sourcefile~advec_mpi.f90->sourcefile~phys_consts.f90 sourcefile~advec_mpi.f90->sourcefile~mpimod.f90 sourcefile~advec_mpi.f90->sourcefile~grid.f90 sourcefile~advec_mpi.f90->sourcefile~mesh.f90 sourcefile~collisions.f90->sourcefile~phys_consts.f90 sourcefile~glow_run.f90 glow_run.F90 sourcefile~glow_run.f90->sourcefile~phys_consts.f90 sourcefile~glow_run.f90->sourcefile~ionization.f90 sourcefile~test_sza.f90 test_sza.f90 sourcefile~test_sza.f90->sourcefile~phys_consts.f90 sourcefile~test_sza.f90->sourcefile~timeutils.f90 sourcefile~sources.f90->sourcefile~phys_consts.f90 sourcefile~sources.f90->sourcefile~grid.f90 sourcefile~sources.f90->sourcefile~mesh.f90 sourcefile~sources.f90->sourcefile~calculus.f90 sourcefile~sources.f90->sourcefile~collisions.f90 sourcefile~pdeparabolic.f90->sourcefile~phys_consts.f90 sourcefile~output.f90 output.f90 sourcefile~output.f90->sourcefile~io.f90 sourcefile~potential_root.f90 potential_root.f90 sourcefile~potential_root.f90->sourcefile~potential_comm_mumps.f90 sourcefile~potential2d.f90 potential2d.f90 sourcefile~potential2d.f90->sourcefile~pdeelliptic.f90 sourcefile~potential2d.f90->sourcefile~grid.f90 sourcefile~potential2d.f90->sourcefile~potential_mumps.f90 sourcefile~potential2d.f90->sourcefile~calculus.f90 sourcefile~interp2d.f90 interp2d.f90 sourcefile~interp2d.f90->sourcefile~interpolation.f90 sourcefile~mhd1d_shock.f90 MHD1D_shock.f90 sourcefile~mhd1d_shock.f90->sourcefile~advec.f90 sourcefile~mpirecv.f90 mpirecv.f90 sourcefile~mpirecv.f90->sourcefile~mpimod.f90 sourcefile~reader_raw.f90 reader_raw.f90 sourcefile~reader_raw.f90->sourcefile~reader.f90 sourcefile~mag_ncdf.f90 mag_ncdf.f90 sourcefile~mag_ncdf.f90->sourcefile~timeutils.f90 sourcefile~mag_ncdf.f90->sourcefile~io.f90 sourcefile~potential_worker.f90 potential_worker.f90 sourcefile~potential_worker.f90->sourcefile~potential_comm_mumps.f90 sourcefile~mag_hdf5.f90 mag_hdf5.f90 sourcefile~mag_hdf5.f90->sourcefile~timeutils.f90 sourcefile~mag_hdf5.f90->sourcefile~io.f90 sourcefile~plasma_output_raw.f90 plasma_output_raw.f90 sourcefile~plasma_output_raw.f90->sourcefile~timeutils.f90 sourcefile~plasma.f90 plasma.f90 sourcefile~plasma_output_raw.f90->sourcefile~plasma.f90 sourcefile~mag.f90 mag.f90 sourcefile~mag.f90->sourcefile~io.f90 sourcefile~aurora.f90 aurora.f90 sourcefile~aurora.f90->sourcefile~io.f90 sourcefile~plasma_output_ncdf.f90 plasma_output_ncdf.f90 sourcefile~plasma_output_ncdf.f90->sourcefile~timeutils.f90 sourcefile~plasma_output_ncdf.f90->sourcefile~plasma.f90 sourcefile~mhd1d_saw.f90 MHD1D_SAW.f90 sourcefile~mhd1d_saw.f90->sourcefile~advec.f90 sourcefile~plasma_input_hdf5.f90 plasma_input_hdf5.f90 sourcefile~plasma_input_hdf5.f90->sourcefile~timeutils.f90 sourcefile~plasma_input_hdf5.f90->sourcefile~plasma.f90 sourcefile~sources_mpi.f90 sources_mpi.f90 sourcefile~sources_mpi.f90->sourcefile~mpimod.f90 sourcefile~sources_mpi.f90->sourcefile~sources.f90 sourcefile~plasma_input_raw.f90 plasma_input_raw.f90 sourcefile~plasma_input_raw.f90->sourcefile~timeutils.f90 sourcefile~plasma_input_raw.f90->sourcefile~plasma.f90 sourcefile~mpisend.f90 mpisend.f90 sourcefile~mpisend.f90->sourcefile~mpimod.f90 sourcefile~aurora_hdf5.f90 aurora_hdf5.f90 sourcefile~aurora_hdf5.f90->sourcefile~timeutils.f90 sourcefile~aurora_hdf5.f90->sourcefile~aurora.f90 sourcefile~aurora_raw.f90 aurora_raw.f90 sourcefile~aurora_raw.f90->sourcefile~timeutils.f90 sourcefile~aurora_raw.f90->sourcefile~aurora.f90 sourcefile~elliptic3d.f90 elliptic3d.f90 sourcefile~elliptic3d.f90->sourcefile~pdeelliptic.f90 sourcefile~integral.f90 integral.f90 sourcefile~integral.f90->sourcefile~calculus.f90 sourcefile~elliptic2d.f90 elliptic2d.f90 sourcefile~elliptic2d.f90->sourcefile~pdeelliptic.f90 sourcefile~div.f90 div.f90 sourcefile~div.f90->sourcefile~calculus.f90 sourcefile~read.f90->sourcefile~grid.f90 sourcefile~atmos.f90 atmos.f90 sourcefile~atmos.f90->sourcefile~neutral.f90 sourcefile~input.f90 input.f90 sourcefile~input.f90->sourcefile~io.f90 sourcefile~mag_raw.f90 mag_raw.f90 sourcefile~mag_raw.f90->sourcefile~timeutils.f90 sourcefile~mag_raw.f90->sourcefile~io.f90 sourcefile~reader_hdf5.f90 reader_hdf5.f90 sourcefile~reader_hdf5.f90->sourcefile~reader.f90 sourcefile~gradient.f90 gradient.f90 sourcefile~gradient.f90->sourcefile~calculus.f90 sourcefile~plasma.f90->sourcefile~reader.f90 sourcefile~plasma.f90->sourcefile~io.f90 sourcefile~plasma_output_hdf5.f90 plasma_output_hdf5.f90 sourcefile~plasma_output_hdf5.f90->sourcefile~timeutils.f90 sourcefile~plasma_output_hdf5.f90->sourcefile~plasma.f90 sourcefile~mhd1d_snd.f90 MHD1D_SND.f90 sourcefile~mhd1d_snd.f90->sourcefile~advec.f90 sourcefile~aurora_ncdf.f90 aurora_ncdf.f90 sourcefile~aurora_ncdf.f90->sourcefile~timeutils.f90 sourcefile~aurora_ncdf.f90->sourcefile~aurora.f90 sourcefile~mpihalo.f90 mpihalo.f90 sourcefile~mpihalo.f90->sourcefile~mpimod.f90 sourcefile~glow_dummy.f90 glow_dummy.f90 sourcefile~glow_dummy.f90->sourcefile~ionization.f90 sourcefile~path_exists_intel.f90 path_exists_intel.f90 sourcefile~path_exists_intel.f90->sourcefile~input.f90 sourcefile~path_exists.f90 path_exists.f90 sourcefile~path_exists.f90->sourcefile~input.f90

Contents

Source Code


Source Code

module phys_consts

#if REALBITS==32
use, intrinsic:: iso_fortran_env, only: wp=>real32
#else
use, intrinsic:: iso_fortran_env, only: wp=>real64
#endif

implicit none
public

!> colored output text (for Unix-like systems at least).
!> It should be compatible across compiler vendors.
character(5), parameter :: &
  red = char(27) // '[31m', &
  black = char(27) // '[0m'

!MATHEMATICAL CONSTANTS
real(wp), parameter :: pi = 4.0_wp*atan(1.0_wp)


!PHYSICAL CONSTANTS
real(wp), parameter :: kB=1.38064852e-23_wp, &      !Boltzmann constant [J K^-1] = [m^2 kg s^-2 K^-1]
                       elchrg=1.60217662e-19_wp, &  !elementary charge
                       amu=1.660539040e-27_wp, &    !atomic mass unit
                       Gconst=6.67408e-11_wp, &     !Universal gravitation constant
                       mu0=4.0_wp*pi*1e-7_wp        !vacuum permeability


!> EARTH-RELATED PARAMETERS
real(wp), parameter :: Mmag=7.94e22_wp
  !! Earth's magnetic moment
real(wp), parameter :: Re = 6371.0e3_wp
  !! Earth Radius [meters]
real(wp), parameter :: Me = 5.9722e24_wp
  !! Earth mass


!> ION DATA (need to be doubled?)
integer, parameter :: lsp=7
  !! number of ion/electron species
real(wp), parameter :: ms(lsp)=[16.0_wp, 30.0_wp, 28.0_wp, 32.0_wp, 14.0_wp, 1.0_wp, 5.485799090e-4_wp]*amu
  !! mass of each species
real(wp), parameter :: qs(lsp)=[1.0_wp,1.0_wp,1.0_wp,1.0_wp,1.0_wp,1.0_wp,-1.0_wp]*elchrg
  !! charge of each species
real(wp), parameter :: gammas(lsp)=[5.0_wp/3.0_wp, &
                                    7.0_wp/5.0_wp, &
                                    7.0_wp/5.0_wp, &
                                    7.0_wp/5.0_wp, &
                                    5.0_wp/3.0_wp, &
                                    5.0_wp/3.0_wp, &
                                    5.0_wp/3.0_wp]
  !! adiabatic index for each speces


!> NEUTRAL DATA
integer, parameter :: ln=4, lnchem=6
  !! number of neutral densities, and number of neutrals in chem. rxns.
real(wp),parameter :: mn(ln)=[16.0_wp,28.0_wp,32.0_wp,1.0_wp]*amu
  !! mass of neutral species

!AURORAL DATA
integer, parameter :: lwave=15 !spectral auroral lines tracked in GLOWv0.982
real(wp), parameter :: wavelengths(lwave)=[3371.0_wp, &
                                        4278.0_wp, &
                                        5200.0_wp, &
                                        5577.0_wp, &
                                        6300.0_wp, &
                                        7320.0_wp, &
                                        10400.0_wp, &
                                        3644.0_wp, &
                                        7774.0_wp, &
                                        8446.0_wp, &
                                        3276.0_wp, &
                                        1700.0_wp, & !this is N2(A) LBH
                                        1356.0_wp, &
                                        1493.0_wp, &
                                        1304.0_wp] !wavelength of each auroral line, housekeeping

!> HOUSEKEEPING PARAMETERS
real(wp), parameter :: mindens     = 1.0e-100_wp
real(wp), parameter :: mindensnull = 1.0e-20_wp
real(wp), parameter :: mindensdiv  = 1.0e-5_wp

logical :: debug=.false.

end module phys_consts