IO: RMS force balance, torsional oscillations, misc¶
RMS.f90
¶
Description
This module contains the calculation of the RMS force balance and induction terms.
Quick access
- Variables:
adv2hint
,advp2
,advp2lm
,advrmsl
,advrmslnr
,advt2
,advt2lm
,arc2hint
,arcmag2hint
,arcmagrmsl
,arcmagrmslnr
,arcrmsl
,arcrmslnr
,buo_temp2hint
,buo_temprmsl
,buo_temprmslnr
,buo_xi2hint
,buo_xirmsl
,buo_xirmslnr
,cfp2
,cfp2lm
,cft2
,cft2lm
,cia2hint
,ciarmsl
,ciarmslnr
,clf2hint
,clfrmsl
,clfrmslnr
,compute_lm_forces
,cor2hint
,corrmsl
,corrmslnr
,difpol2hint
,difpollmr
,difrmsl
,difrmslnr
,diftor2hint
,dpdpc
,dpdtc
,dpkindrc
,dpkindrlm
,dr_facc
,dtbpol2hint
,dtbpollmr
,dtbrms
,dtbrms_file
,dtbtor2hint
,dtvp
,dtvplm
,dtvr
,dtvrlm
,dtvrms
,dtvrms_file
,dtvt
,dtvtlm
,geo2hint
,geormsl
,geormslnr
,get_nl_rms
,iner2hint
,inerrmsl
,inerrmslnr
,init_rnb
,lf2hint
,lfp2
,lfp2lm
,lfrlm
,lfrmsl
,lfrmslnr
,lft2
,lft2lm
,mag2hint
,magrmsl
,magrmslnr
,n_cheb_maxc
,n_dtbrms_file
,n_dtvrms_file
,n_r_maxc
,ncut
,pfp2lm
,pft2lm
,plf2hint
,plfrmsl
,plfrmslnr
,pre2hint
,prermsl
,prermslnr
,rc
,transform_to_grid_rms
,transform_to_lm_rms
,vp_old
,vr_old
,vt_old
- Routines:
Needed modules
parallel_mod
: This module contains the blocking informationprecision_mod
: This module controls the precision used in MagICmem_alloc
(bytes_allocated()
): This little module is used to estimate the global memory allocation used in MagICblocking
(st_map()
,lo_map()
,lm2()
,lm2m()
,llm()
,ulm()
,llmmag()
,ulmmag()
,lm2lma()
,lm2l()
,lm2lms()
): Module containing blocking informationfinite_differences
(type_fd()
): This module is used to calculate the radial grid when finite differences are requestedfields
(w_rloc()
,dw_rloc()
,z_rloc()
,s_rloc()
,p_rloc()
,dp_rloc()
,xi_rloc()
,ddw_rloc()
): This module contains all the fields used in MagIC in the hybrid (LM,r) space as well as their radial derivatives. It defines both the LM-distributed arrays and the R-distributed arrays….radial_scheme
(type_rscheme()
): This is an abstract type that defines the radial scheme used in MagICtruncation
(n_r_max()
,n_cheb_max()
,n_r_maxmag()
,lm_max()
,lm_maxmag()
,l_max()
,n_phi_max()
,n_theta_max()
,minc()
,fd_ratio()
,fd_stretch()
,nlat_padded()
): This module defines the grid points and the truncationphysical_parameters
(ra()
,ek()
,pr()
,prmag()
,radratio()
,corfac()
,n_r_lcr()
,buofac()
,chemfac()
,thexpnb()
,vischeatfac()
): Module containing the physical parametersradial_data
(nrstop()
,nrstart()
,radial_balance()
,nrstartmag()
,nrstopmag()
): This module defines the MPI decomposition in the radial direction.radial_functions
(rscheme_oc()
,r()
,r_cmb()
,r_icb()
,or1()
,or2()
,or3()
,or4()
,rho0()
,rgrav()
,beta()
,dlvisc()
,dbeta()
,ogrun()
,alpha0()
,temp0()
,visc()
,l_r()
): This module initiates all the radial functions (transport properties, density, temperature, cheb transforms, etc.)logic
(l_save_out()
,l_heat()
,l_chemical_conv()
,l_conv_nl()
,l_mag_lf()
,l_conv()
,l_corr()
,l_mag()
,l_finite_diff()
,l_newmap()
,l_2d_rms()
,l_parallel_solve()
,l_mag_par_solve()
,l_adv_curl()
,l_double_curl()
,l_anelastic_liquid()
,l_mag_nl()
,l_non_rot()
): Module containing the logicals that control the runnum_param
(tscale()
,alph1()
,alph2()
): Module containing numerical and control parametershorizontal_data
(phi()
,theta_ord()
,costheta()
,sintheta()
,o_sin_theta_e2()
,cosn_theta_e2()
,o_sin_theta()
,dtheta2a()
,dphi()
,dtheta2s()
,dlh()
,hdif_v()
): Module containing functions depending on longitude and latitude plus help arrays depending on degree and orderconstants
(zero()
,one()
,half()
,four()
,third()
,vol_oc()
,pi()
,two()
,three()
): module containing constants and parameters used in the code.integration
(rint_r()
): Radial and geostrophic integration functionsradial_der
(get_dr()
,get_dr_rloc()
): Radial derivatives functionsoutput_data
(rdea()
,rcut()
,tag()
,runid()
): This module contains the parameters for output controlcosine_transform_odd
: This module contains the built-in type I discrete Cosine Transforms. This implementation is based on Numerical Recipes and FFTPACK. This only works forn_r_max-1 = 2**a 3**b 5**c
, with a,b,c integers….rms_helpers
(hint2dpol()
,get_poltorrms()
,hint2dpollm()
,hintrms()
): This module contains several useful subroutines required to compute RMS diagnosticsdtb_mod
(pdiflm_lmloc()
,tdiflm_lmloc()
,pstrlm_lmloc()
,padvlm_lmloc()
,tadvlm_lmloc()
,tstrlm_lmloc()
,tomelm_lmloc()
): This module contains magnetic field stretching and advection terms plus a separate omega-effect. It is used for movie output….useful
(abortrun()
): This module contains several useful routines.mean_sd
(mean_sd_type()
,mean_sd_2d_type()
): This module contains a small type that simply handles two arrays (mean and SD) This type is used for time-averaged outputs (and their standard deviations).time_schemes
(type_tscheme()
): This module defines an abstract class type_tscheme which is employed for the time advance of the code.sht
(spat_to_sphertor()
,spat_to_qst()
,scal_to_sh()
,scal_to_grad_spat()
)
Variables
- rms/adv2hint (*,*) [real,private/allocatable]¶
- rms/advp2 (*,*) [real,private/allocatable]¶
- rms/advp2lm (*) [complex,private/allocatable]¶
- rms/advrmsl [mean_sd_type,private]¶
- rms/advrmslnr [mean_sd_2d_type,private]¶
- rms/advt2 (*,*) [real,private/allocatable]¶
- rms/advt2lm (*) [complex,private/allocatable]¶
- rms/arc2hint (*,*) [real,private/allocatable]¶
- rms/arcmag2hint (*,*) [real,private/allocatable]¶
- rms/arcmagrmsl [mean_sd_type,private]¶
- rms/arcmagrmslnr [mean_sd_2d_type,private]¶
- rms/arcrmsl [mean_sd_type,private]¶
- rms/arcrmslnr [mean_sd_2d_type,private]¶
- rms/buo_temp2hint (*,*) [real,private/allocatable]¶
- rms/buo_temprmsl [mean_sd_type,private]¶
- rms/buo_temprmslnr [mean_sd_2d_type,private]¶
- rms/buo_xi2hint (*,*) [real,private/allocatable]¶
- rms/buo_xirmsl [mean_sd_type,private]¶
- rms/buo_xirmslnr [mean_sd_2d_type,private]¶
- rms/cfp2 (*,*) [real,private/allocatable]¶
- rms/cfp2lm (*) [complex,private/allocatable]¶
- rms/cft2 (*,*) [real,private/allocatable]¶
- rms/cft2lm (*) [complex,private/allocatable]¶
- rms/cia2hint (*,*) [real,private/allocatable]¶
- rms/ciarmsl [mean_sd_type,private]¶
- rms/ciarmslnr [mean_sd_2d_type,private]¶
- rms/clf2hint (*,*) [real,private/allocatable]¶
- rms/clfrmsl [mean_sd_type,private]¶
- rms/clfrmslnr [mean_sd_2d_type,private]¶
- rms/compute_lm_forces [public]¶
- rms/cor2hint (*,*) [real,private/allocatable]¶
- rms/corrmsl [mean_sd_type,private]¶
- rms/corrmslnr [mean_sd_2d_type,private]¶
- rms/difpol2hint (*,*) [real,allocatable/public]¶
- rms/difpollmr (*,*) [complex,allocatable/public]¶
- rms/difrmsl [mean_sd_type,private]¶
- rms/difrmslnr [mean_sd_2d_type,private]¶
- rms/diftor2hint (*,*) [real,allocatable/public]¶
- rms/dpdpc (*,*) [real,private/allocatable]¶
- rms/dpdtc (*,*) [real,private/allocatable]¶
- rms/dpkindrc (*,*) [real,private/allocatable]¶
- rms/dpkindrlm (*) [complex,private/allocatable]¶
- rms/dr_facc (*) [real,allocatable/public]¶
- rms/dtbpol2hint (*,*) [real,allocatable/public]¶
- rms/dtbpollmr (*,*) [complex,allocatable/public]¶
- rms/dtbrms [public]¶
- rms/dtbrms_file [character(len=72),private]¶
- rms/dtbtor2hint (*,*) [real,allocatable/public]¶
- rms/dtvp (*,*) [real,private/allocatable]¶
- rms/dtvplm (*) [complex,private/allocatable]¶
- rms/dtvr (*,*) [real,private/allocatable]¶
- rms/dtvrlm (*) [complex,private/allocatable]¶
- rms/dtvrms [public]¶
- rms/dtvrms_file [character(len=72),private]¶
- rms/dtvt (*,*) [real,private/allocatable]¶
- rms/dtvtlm (*) [complex,private/allocatable]¶
- rms/geo2hint (*,*) [real,private/allocatable]¶
- rms/geormsl [mean_sd_type,private]¶
- rms/geormslnr [mean_sd_2d_type,private]¶
- rms/get_nl_rms [public]¶
- rms/iner2hint (*,*) [real,private/allocatable]¶
- rms/inerrmsl [mean_sd_type,private]¶
- rms/inerrmslnr [mean_sd_2d_type,private]¶
- rms/init_rnb [private]¶
‘)
- rms/lf2hint (*,*) [real,private/allocatable]¶
- rms/lfp2 (*,*) [real,private/allocatable]¶
- rms/lfp2lm (*) [complex,private/allocatable]¶
- rms/lfrlm (*) [complex,private/allocatable]¶
- rms/lfrmsl [mean_sd_type,private]¶
- rms/lfrmslnr [mean_sd_2d_type,private]¶
- rms/lft2 (*,*) [real,private/allocatable]¶
- rms/lft2lm (*) [complex,private/allocatable]¶
- rms/mag2hint (*,*) [real,private/allocatable]¶
- rms/magrmsl [mean_sd_type,private]¶
- rms/magrmslnr [mean_sd_2d_type,private]¶
- rms/n_cheb_maxc [integer,public]¶
Number of Chebyshevs
- rms/n_dtbrms_file [integer,private]¶
- rms/n_dtvrms_file [integer,private]¶
- rms/n_r_maxc [integer,public]¶
Number of radial points
- rms/ncut [integer,public]¶
Number of points for the cut-off
- rms/pfp2lm (*) [complex,private/allocatable]¶
- rms/pft2lm (*) [complex,private/allocatable]¶
- rms/plf2hint (*,*) [real,private/allocatable]¶
- rms/plfrmsl [mean_sd_type,private]¶
- rms/plfrmslnr [mean_sd_2d_type,private]¶
- rms/pre2hint (*,*) [real,private/allocatable]¶
- rms/prermsl [mean_sd_type,private]¶
- rms/prermslnr [mean_sd_2d_type,private]¶
- rms/rc (*) [real,private/allocatable]¶
Cut-off radii
- rms/transform_to_grid_rms [public]¶
- rms/transform_to_lm_rms [public]¶
- rms/vp_old (*,*,*) [real,private/allocatable]¶
- rms/vr_old (*,*,*) [real,private/allocatable]¶
- rms/vt_old (*,*,*) [real,private/allocatable]¶
Subroutines and functions
- subroutine rms/initialize_rms()¶
Memory allocation of arrays used in the computation of r.m.s. force balance
- subroutine rms/finalize_rms()¶
Deallocate arrays used for r.m.s. force balance computation
- Called from:
- subroutine rms/zerorms()¶
Zeros integrals that are set in get_td, update_z, update_wp, update_b, dtVrms and dtBrms
- Called from:
RMS_helpers.f90
¶
Description
This module contains several useful subroutines required to compute RMS diagnostics
Quick access
- Routines:
Needed modules
precision_mod
: This module controls the precision used in MagICparallel_mod
: This module contains the blocking informationcommunications
(reduce_radial()
): This module contains the different MPI communicators used in MagIC.truncation
(l_max()
,n_r_max()
,lm_max()
): This module defines the grid points and the truncationradial_functions
(or2()
,rscheme_oc()
,r()
): This module initiates all the radial functions (transport properties, density, temperature, cheb transforms, etc.)useful
(cc2real()
): This module contains several useful routines.integration
(rint_r()
): Radial and geostrophic integration functionsconstants
(vol_oc()
,one()
): module containing constants and parameters used in the code.
Variables
Subroutines and functions
- subroutine rms_helpers/get_poltorrms(pol, drpol, tor, llm, ulm, polrms, torrms, polasrms, torasrms, map)¶
calculates integral PolRms=sqrt( Integral (pol^2 dV) ) calculates integral TorRms=sqrt( Integral (tor^2 dV) ) plus axisymmetric parts. integration in theta,phi by summation of spherical harmonics integration in r by using Chebycheff integrals The mapping map gives the mapping lm to l,m for the input arrays Pol,drPol and Tor Output: PolRms,TorRms,PolAsRms,TorAsRms
- Parameters:
pol (1 - llm + ulm,n_r_max) [complex ,in] :: Poloidal field Potential
drpol (1 - llm + ulm,n_r_max) [complex ,in] :: Radial derivative of Pol
tor (1 - llm + ulm,n_r_max) [complex ,in] :: Toroidal field Potential
llm [integer ,in,required]
ulm [integer ,in,required]
polrms [real ,out]
torrms [real ,out]
polasrms [real ,out]
torasrms [real ,out]
map [mappings ,in]
- Call to:
- subroutine rms_helpers/hint2dpol(dpol, lmstart, lmstop, pol2hint, map)¶
- subroutine rms_helpers/hint2dpollm(dpol, lmstart, lmstop, pol2hint, map)¶
- Parameters:
dpol (1 - lmstart + lmstop) [complex ,in]
lmstart [integer ,in,required]
lmstop [integer ,in,required]
pol2hint (1 - lmstart + lmstop) [real ,inout]
map [mappings ,in]
- Call to:
dtB.f90
¶
Description
This module contains magnetic field stretching and advection terms plus a separate omega-effect. It is used for movie output.
Quick access
- Variables:
bpvrlm
,bpvtbtvpcotlm
,bpvtbtvpsn2lm
,bpvtlm
,brvplm
,brvtlm
,brvzlm
,btvplm
,btvrlm
,btvzlm
,btvzsn2lm
,dtb_lmloc_container
,dtb_rloc_container
,padvlm_lmloc
,padvlm_rloc
,padvlmic_lmloc
,pdiflm_lmloc
,pdiflmic_lmloc
,pstrlm_lmloc
,pstrlm_rloc
,tadvlm_lmloc
,tadvlm_rloc
,tadvlmic_lmloc
,tadvrlm_lmloc
,tadvrlm_rloc
,tdiflm_lmloc
,tdiflmic_lmloc
,tomelm_lmloc
,tomelm_rloc
,tomerlm_lmloc
,tomerlm_rloc
,tstrlm_lmloc
,tstrlm_rloc
,tstrrlm_lmloc
,tstrrlm_rloc
- Routines:
finalize_dtb_mod()
,get_dh_dtblm()
,get_dtblm()
,get_dtblmfinish()
,initialize_dtb_mod()
Needed modules
precision_mod
: This module controls the precision used in MagICparallel_mod
: This module contains the blocking informationmem_alloc
(bytes_allocated()
): This little module is used to estimate the global memory allocation used in MagICtruncation
(n_r_maxmag()
,n_r_ic_maxmag()
,n_r_max()
,lm_max()
,n_r_ic_max()
,l_max()
,n_phi_max()
,n_theta_max()
,nlat_padded()
): This module defines the grid points and the truncationmpi_transp_mod
(type_mpitransp()
): This is an abstract class that will be used to define MPI transposers The actual implementation is deferred to either point-to-point (MPI_Isend and MPI_IRecv) communications or all-to-all (MPI_AlltoAll)mpi_ptop_mod
(type_mpiptop()
): This module contains the implementation of MPI_Isend/MPI_Irecv global transposephysical_parameters
(opm()
,o_sr()
): Module containing the physical parametersradial_functions
(o_r_ic()
,lambda()
,or2()
,dllambda()
,rscheme_oc()
,or1()
,orho1()
,or3()
): This module initiates all the radial functions (transport properties, density, temperature, cheb transforms, etc.)radial_data
(nrstart()
,nrstop()
): This module defines the MPI decomposition in the radial direction.horizontal_data
(dphi()
,dlh()
,hdif_b()
,o_sin_theta_e2()
,dtheta1s()
,dtheta1a()
,o_sin_theta()
,cosn_theta_e2()
): Module containing functions depending on longitude and latitude plus help arrays depending on degree and orderlogic
(l_cond_ic()
,l_dtrmagspec()
): Module containing the logicals that control the runblocking
(lo_map()
,lm2l()
,lm2m()
,llmmag()
,ulmmag()
,llm()
,ulm()
,lm2lms()
,lm2lma()
): Module containing blocking informationconstants
(zero()
,two()
,ci()
): module containing constants and parameters used in the code.radial_der
(get_dr()
): Radial derivatives functions
Variables
- dtb_mod/bpvrlm (*) [complex,private/allocatable]¶
- dtb_mod/bpvtbtvpcotlm (*) [complex,private/allocatable]¶
- dtb_mod/bpvtbtvpsn2lm (*) [complex,private/allocatable]¶
- dtb_mod/bpvtlm (*) [complex,private/allocatable]¶
- dtb_mod/brvplm (*) [complex,private/allocatable]¶
- dtb_mod/brvtlm (*) [complex,private/allocatable]¶
- dtb_mod/brvzlm (*) [complex,private/allocatable]¶
- dtb_mod/btvplm (*) [complex,private/allocatable]¶
- dtb_mod/btvrlm (*) [complex,private/allocatable]¶
- dtb_mod/btvzlm (*) [complex,private/allocatable]¶
- dtb_mod/btvzsn2lm (*) [complex,private/allocatable]¶
- dtb_mod/dtb_lmloc_container (*,*,*) [complex,private/target/allocatable]¶
- dtb_mod/dtb_rloc_container (*,*,*) [complex,private/target/allocatable]¶
- dtb_mod/padvlm_lmloc (*,*) [complex,pointer/public]¶
- dtb_mod/padvlm_rloc (*,*) [complex,pointer/public]¶
- dtb_mod/padvlmic_lmloc (*,*) [complex,allocatable/public]¶
- dtb_mod/pdiflm_lmloc (*,*) [complex,allocatable/public]¶
- dtb_mod/pdiflmic_lmloc (*,*) [complex,allocatable/public]¶
- dtb_mod/pstrlm_lmloc (*,*) [complex,pointer/public]¶
- dtb_mod/pstrlm_rloc (*,*) [complex,pointer/public]¶
- dtb_mod/tadvlm_lmloc (*,*) [complex,pointer/public]¶
- dtb_mod/tadvlm_rloc (*,*) [complex,pointer/public]¶
- dtb_mod/tadvlmic_lmloc (*,*) [complex,allocatable/public]¶
- dtb_mod/tadvrlm_lmloc (*,*) [complex,pointer/public]¶
- dtb_mod/tadvrlm_rloc (*,*) [complex,pointer/public]¶
- dtb_mod/tdiflm_lmloc (*,*) [complex,allocatable/public]¶
- dtb_mod/tdiflmic_lmloc (*,*) [complex,allocatable/public]¶
- dtb_mod/tomelm_lmloc (*,*) [complex,pointer/public]¶
- dtb_mod/tomelm_rloc (*,*) [complex,pointer/public]¶
- dtb_mod/tomerlm_lmloc (*,*) [complex,pointer/public]¶
- dtb_mod/tomerlm_rloc (*,*) [complex,pointer/public]¶
- dtb_mod/tstrlm_lmloc (*,*) [complex,pointer/public]¶
- dtb_mod/tstrlm_rloc (*,*) [complex,pointer/public]¶
- dtb_mod/tstrrlm_lmloc (*,*) [complex,pointer/public]¶
- dtb_mod/tstrrlm_rloc (*,*) [complex,pointer/public]¶
Subroutines and functions
- subroutine dtb_mod/initialize_dtb_mod()¶
Memory allocation for diagnostics related to the induction equation
- Called from:
- subroutine dtb_mod/get_dtblm(nr, vr, vt, vp, br, bt, bp)¶
This subroutine calculates non-linear products in grid-space for radial level nR.
- Parameters:
nr [integer ,in]
vr (*,*) [real ,in]
vt (*,*) [real ,in]
vp (*,*) [real ,in]
br (*,*) [real ,in]
bt (*,*) [real ,in]
bp (*,*) [real ,in]
- Call to:
- subroutine dtb_mod/get_dh_dtblm(nr)¶
Purpose of this routine is to calculate theta and phi derivative related terms of the magnetic production and advection terms and store them.
- Parameters:
nr [integer ,in]
- subroutine dtb_mod/get_dtblmfinish(time, n_time_step, omega_ic, b, ddb, aj, dj, ddj, b_ic, db_ic, ddb_ic, aj_ic, dj_ic, ddj_ic)¶
– Input of variables:
- Parameters:
time [real ,in]
n_time_step [integer ,in]
omega_ic [real ,in]
b (1 - llmmag + ulmmag,n_r_maxmag) [complex ,in]
ddb (1 - llmmag + ulmmag,n_r_maxmag) [complex ,in]
aj (1 - llmmag + ulmmag,n_r_maxmag) [complex ,in]
dj (1 - llmmag + ulmmag,n_r_maxmag) [complex ,in]
ddj (1 - llmmag + ulmmag,n_r_maxmag) [complex ,in]
b_ic (1 - llmmag + ulmmag,n_r_ic_maxmag) [complex ,in]
db_ic (1 - llmmag + ulmmag,n_r_ic_maxmag) [complex ,in]
ddb_ic (1 - llmmag + ulmmag,n_r_ic_maxmag) [complex ,in]
aj_ic (1 - llmmag + ulmmag,n_r_ic_maxmag) [complex ,in]
dj_ic (1 - llmmag + ulmmag,n_r_ic_maxmag) [complex ,in]
ddj_ic (1 - llmmag + ulmmag,n_r_ic_maxmag) [complex ,in]
- Called from:
- Call to:
out_dtB_frame.f90
¶
Description
This module handles the final assembly of the arrays produced to store the movies that diagnose the different contributions of the induction equations. It produces arrays that are stored in the corresponding movie files.
Quick access
- Variables:
- Routines:
Needed modules
precision_mod
: This module controls the precision used in MagICparallel_mod
: This module contains the blocking informationtruncation
(n_r_max()
,lm_max()
,n_r_ic_max()
,lm_maxmag()
,n_r_maxmag()
,n_r_ic_maxmag()
,l_max()
,m_max()
,minc()
,n_theta_max()
,n_r_tot()
,nlat_padded()
,n_phi_max()
,n_cheb_ic_max()
): This module defines the grid points and the truncationcommunications
(lo2r_one()
,gather_from_lo_to_rank0()
): This module contains the different MPI communicators used in MagIC.fields
(work_lmloc()
,b_rloc()
,db_rloc()
,aj_rloc()
,dj_rloc()
,b_lmloc()
,b_ic_lmloc()
,aj_ic_lmloc()
,db_ic_lmloc()
,dj_ic_lmloc()
): This module contains all the fields used in MagIC in the hybrid (LM,r) space as well as their radial derivatives. It defines both the LM-distributed arrays and the R-distributed arrays….radial_data
(nrstart()
,nrstop()
): This module defines the MPI decomposition in the radial direction.radial_functions
(r()
,or1()
,chebt_ic()
,r_ic()
,rscheme_oc()
,r_icb()
,dr_fac_ic()
,chebt_ic_even()
): This module initiates all the radial functions (transport properties, density, temperature, cheb transforms, etc.)blocking
(lm2l()
,lm2m()
,lm2()
,lo_map()
,llmmag()
,ulmmag()
,llm()
,ulm()
): Module containing blocking informationhorizontal_data
(costheta()
,n_theta_cal2ord()
,sintheta()
,dlh()
,o_sin_theta()
): Module containing functions depending on longitude and latitude plus help arrays depending on degree and orderdtb_mod
(padvlmic_lmloc()
,pdiflmic_lmloc()
,tadvlmic_lmloc()
,tdiflmic_lmloc()
,pstrlm_lmloc()
,pstrlm_rloc()
,pdiflm_lmloc()
,padvlm_rloc()
,padvlm_lmloc()
,tstrlm_rloc()
,tstrlm_lmloc()
,tadvlm_rloc()
,tadvlm_lmloc()
,tdiflm_lmloc()
,tomelm_rloc()
,tomelm_lmloc()
): This module contains magnetic field stretching and advection terms plus a separate omega-effect. It is used for movie output….movie_data
(n_movie_fields()
,n_movie_fields_ic()
,n_movie_file()
,n_movie_const()
,n_movie_surface()
,movie_const()
,n_movie_field_type()
,frames()
,n_movies()
,n_movie_field_start()
)logic
(l_cond_ic()
): Module containing the logicals that control the runconstants
(zero()
,one()
): module containing constants and parameters used in the code.radial_der
(get_dr()
): Radial derivatives functionssht
(torpol_to_spat()
,sphtor_to_spat()
,scal_to_spat()
,toraxi_to_spat()
)
Variables
- out_dtb_frame/get_bpol [private]¶
- out_dtb_frame/get_btor [private]¶
- out_dtb_frame/get_dtb [private]¶
- out_dtb_frame/lm2pt [private]¶
Subroutines and functions
- subroutine out_dtb_frame/calc_dtb_frame()¶
Controls output of specific movie frames related to magnetic field production and diffusion.
- Called from:
- subroutine out_dtb_frame/calc_dtb_frame_ic()¶
Controls output of specific movie frames related to magnetic field production and diffusion in the inner core.
- Called from:
- Call to:
TO.f90
¶
Description
This module contains information for TO calculation and output
Quick access
- Variables:
bplast
,bpsdas_rloc
,bpzas_rloc
,bpzdas_rloc
,bs2as_rloc
,bslast
,bspas_rloc
,bspdas_rloc
,bszas_rloc
,bzlast
,bzpdas_rloc
,ddzasl
,dzasl
,dzastras_rloc
,dzcoras_rloc
,dzddvpas_rloc
,dzddvplmr
,dzdvpas_rloc
,dzdvplmr
,dzlfas_rloc
,dzpenas_rloc
,dzrstras_rloc
,dzstras_rloc
,get_pas
,v2as_rloc
,vas_rloc
,zasl
- Routines:
finalize_to()
,getto()
,gettofinish()
,gettonext()
,initialize_to()
,prep_to_axi()
Needed modules
iso_fortran_env
(output_unit()
)precision_mod
: This module controls the precision used in MagICmem_alloc
(bytes_allocated()
): This little module is used to estimate the global memory allocation used in MagICtruncation
(n_phi_max()
,n_r_max()
,l_max()
,n_theta_max()
,lm_max()
,nlat_padded()
): This module defines the grid points and the truncationradial_data
(nrstart()
,nrstop()
): This module defines the MPI decomposition in the radial direction.radial_functions
(or1()
,or2()
,or3()
,or4()
,beta()
,orho1()
,dbeta()
): This module initiates all the radial functions (transport properties, density, temperature, cheb transforms, etc.)physical_parameters
(corfac()
,kbotv()
,ktopv()
,epsphase()
,penaltyfac()
): Module containing the physical parametershorizontal_data
(sintheta()
,costheta()
,hdif_v()
,dlh()
,n_theta_cal2ord()
,o_sin_theta()
): Module containing functions depending on longitude and latitude plus help arrays depending on degree and orderconstants
(one()
,two()
): module containing constants and parameters used in the code.logic
(lverbose()
,l_mag()
,l_parallel_solve()
,l_phase_field()
): Module containing the logicals that control the run
Variables
- torsional_oscillations/bplast (*,*,*) [real,private/allocatable]¶
- torsional_oscillations/bpsdas_rloc (*,*) [real,allocatable/public]¶
- torsional_oscillations/bpzas_rloc (*,*) [real,allocatable/public]¶
- torsional_oscillations/bpzdas_rloc (*,*) [real,allocatable/public]¶
- torsional_oscillations/bs2as_rloc (*,*) [real,allocatable/public]¶
- torsional_oscillations/bslast (*,*,*) [real,private/allocatable]¶
- torsional_oscillations/bspas_rloc (*,*) [real,allocatable/public]¶
- torsional_oscillations/bspdas_rloc (*,*) [real,allocatable/public]¶
- torsional_oscillations/bszas_rloc (*,*) [real,allocatable/public]¶
- torsional_oscillations/bzlast (*,*,*) [real,private/allocatable]¶
- torsional_oscillations/bzpdas_rloc (*,*) [real,allocatable/public]¶
- torsional_oscillations/ddzasl (*,*) [real,allocatable/public]¶
- torsional_oscillations/dzasl (*) [real,private/allocatable]¶
- torsional_oscillations/dzastras_rloc (*,*) [real,allocatable/public]¶
- torsional_oscillations/dzcoras_rloc (*,*) [real,allocatable/public]¶
- torsional_oscillations/dzddvpas_rloc (*,*) [real,allocatable/public]¶
- torsional_oscillations/dzddvplmr (*,*) [real,private/allocatable]¶
- torsional_oscillations/dzdvpas_rloc (*,*) [real,allocatable/public]¶
- torsional_oscillations/dzdvplmr (*,*) [real,private/allocatable]¶
- torsional_oscillations/dzlfas_rloc (*,*) [real,allocatable/public]¶
- torsional_oscillations/dzpenas_rloc (*,*) [real,allocatable/public]¶
- torsional_oscillations/dzrstras_rloc (*,*) [real,allocatable/public]¶
- torsional_oscillations/dzstras_rloc (*,*) [real,allocatable/public]¶
- torsional_oscillations/get_pas [private]¶
- torsional_oscillations/v2as_rloc (*,*) [real,allocatable/public]¶
- torsional_oscillations/vas_rloc (*,*) [real,allocatable/public]¶
- torsional_oscillations/zasl (*) [real,private/allocatable]¶
Subroutines and functions
- subroutine torsional_oscillations/prep_to_axi(z, dz)¶
- Parameters:
z (*) [complex ,in]
dz (*) [complex ,in]
- subroutine torsional_oscillations/getto(vr, vt, vp, cvr, dvpdr, br, bt, bp, cbr, cbt, phase, dtlast, nr)¶
This program calculates various axisymmetric linear and nonlinear variables for a radial grid point nR and a theta-block. Input are the fields vr,vt,vp,cvr,dvpdr Output are linear azimuthally averaged field VpAS (flow phi component), VpAS2 (square of flow phi component), V2AS (V*V), and Coriolis force Cor. These are give in (r,theta)-space. Also in (r,theta)-space are azimuthally averaged correlations of non-axisymmetric flow components and the respective squares: Vsp=Vs*Vp,Vzp,Vsz,VspC,VzpC,VszC. These are used to calulcate the respective correlations and Reynolds stress.
- Parameters:
vr (*,*) [real ,in]
vt (*,*) [real ,in]
vp (*,*) [real ,in]
cvr (*,*) [real ,in]
dvpdr (*,*) [real ,in]
br (*,*) [real ,in]
bt (*,*) [real ,in]
bp (*,*) [real ,in]
cbr (*,*) [real ,in]
cbt (*,*) [real ,in]
phase (*,*) [real ,in]
dtlast [real ,in] :: last time step
nr [integer ,in] :: radial grid point
- subroutine torsional_oscillations/gettonext(br, bt, bp, ltonext, ltonext2, dt, dtlast, nr)¶
Preparing TO calculation by storing flow and magnetic field contribution to build time derivative.
- Parameters:
br (*,*) [real ,in]
bt (*,*) [real ,in]
bp (*,*) [real ,in]
ltonext [logical ,in]
ltonext2 [logical ,in]
dt [real ,in]
dtlast [real ,in]
nr [integer ,in]
- subroutine torsional_oscillations/gettofinish(nr, dtlast)¶
This handles the computation of the axisymmetric viscous stress in spectral space using z and its radial derivatives, and then transform it to grid space using SHTs.
- Parameters:
nr [integer ,in]
dtlast [real ,in]
out_TO.f90
¶
Description
This module handles the writing of TO-related outputs: zonal force balance and z-integrated terms. This is a re-implementation of the spectral method used up to MagIC 5.10, which formerly relies on calculation of Plm on the cylindrical grid. This was quite costly and not portable on large truncations. As such, a local 4th order method is preferred here.
Quick access
- Variables:
bpsdas
,bpzas
,bpzdas
,bs2as
,bspas
,bspdas
,bszas
,bzpdas
,cyl
,cylmean
,dzastras
,dzcoras
,dzddvpas
,dzdvpas
,dzlfas
,dzpenas
,dzrstras
,dzstras
,gather_from_rloc_to_rank0
,get_dds
,get_ds
,h
,interp_theta
,movfile
,n_nhs_file
,n_s_otc
,n_shs_file
,n_to_file
,n_tomov_file
,ntomovsets
,oh
,tofile
,v2as
,vas
,volcyl_oc
- Routines:
Needed modules
precision_mod
: This module controls the precision used in MagICparallel_mod
: This module contains the blocking informationconstants
(one()
,two()
,pi()
,vol_oc()
): module containing constants and parameters used in the code.truncation
(n_r_max()
,n_theta_max()
,n_phi_max()
,minc()
,n_r_ic_max()
): This module defines the grid points and the truncationmem_alloc
(bytes_allocated()
): This little module is used to estimate the global memory allocation used in MagICnum_param
(tscale()
): Module containing numerical and control parametersoutput_data
(sdens()
,zdens()
,tag()
,runid()
,log_file()
,n_log_file()
,n_s_max()
): This module contains the parameters for output controlradial_data
(radial_balance()
,nrstart()
,nrstop()
): This module defines the MPI decomposition in the radial direction.radial_functions
(r_icb()
,r_cmb()
,r()
): This module initiates all the radial functions (transport properties, density, temperature, cheb transforms, etc.)horizontal_data
(theta_ord()
,phi()
): Module containing functions depending on longitude and latitude plus help arrays depending on degree and orderlogic
(l_save_out()
,l_tomovie()
,l_full_sphere()
,l_phase_field()
,l_mag()
): Module containing the logicals that control the runphysical_parameters
(ra()
,ek()
,pr()
,prmag()
,radratio()
,lffac()
,raxi()
,sc()
): Module containing the physical parameterstorsional_oscillations
(dzcoras_rloc()
,dzdvpas_rloc()
,dzddvpas_rloc()
,dzrstras_rloc()
,dzastras_rloc()
,dzstras_rloc()
,dzlfas_rloc()
,v2as_rloc()
,bs2as_rloc()
,bspdas_rloc()
,bpsdas_rloc()
,bzpdas_rloc()
,bpzdas_rloc()
,bpzas_rloc()
,bspas_rloc()
,bszas_rloc()
,vas_rloc()
,dzpenas_rloc()
): This module contains information for TO calculation and outputuseful
(logwrite()
): This module contains several useful routines.integration
(cylmean_otc()
,cylmean_itc()
,simps()
): Radial and geostrophic integration functions
Variables
- outto_mod/bpsdas (*,*) [real,private/allocatable]¶
- outto_mod/bpzas (*,*) [real,private/allocatable]¶
- outto_mod/bpzdas (*,*) [real,private/allocatable]¶
- outto_mod/bs2as (*,*) [real,private/allocatable]¶
- outto_mod/bspas (*,*) [real,private/allocatable]¶
- outto_mod/bspdas (*,*) [real,private/allocatable]¶
- outto_mod/bszas (*,*) [real,private/allocatable]¶
- outto_mod/bzpdas (*,*) [real,private/allocatable]¶
- outto_mod/cyl (*) [real,private/allocatable]¶
Cylindrical grid
- outto_mod/cylmean [private]¶
- outto_mod/dzastras (*,*) [real,private/allocatable]¶
- outto_mod/dzcoras (*,*) [real,private/allocatable]¶
- outto_mod/dzddvpas (*,*) [real,private/allocatable]¶
- outto_mod/dzdvpas (*,*) [real,private/allocatable]¶
- outto_mod/dzlfas (*,*) [real,private/allocatable]¶
- outto_mod/dzpenas (*,*) [real,private/allocatable]¶
- outto_mod/dzrstras (*,*) [real,private/allocatable]¶
- outto_mod/dzstras (*,*) [real,private/allocatable]¶
- outto_mod/gather_from_rloc_to_rank0 [private]¶
- outto_mod/get_dds [private]¶
- outto_mod/get_ds [private]¶
- outto_mod/h (*) [real,private/allocatable]¶
height
- outto_mod/interp_theta [private]¶
- outto_mod/movfile [character(len=64),private]¶
- outto_mod/n_nhs_file [integer,private]¶
- outto_mod/n_s_otc [integer,private]¶
- outto_mod/n_shs_file [integer,private]¶
- outto_mod/n_to_file [integer,private]¶
- outto_mod/n_tomov_file [integer,private]¶
- outto_mod/ntomovsets [integer,private]¶
Number of TO_mov frames
- outto_mod/oh (*) [real,private/allocatable]¶
1/h
- outto_mod/tofile [character(len=64),private]¶
- outto_mod/v2as (*,*) [real,private/allocatable]¶
- outto_mod/vas (*,*) [real,private/allocatable]¶
- outto_mod/volcyl_oc [real,private]¶
Subroutines and functions
- subroutine outto_mod/initialize_outto_mod()¶
Memory allocation of arrays needed for TO outputs
- Called from:
- subroutine outto_mod/finalize_outto_mod()¶
Memory de-allocation of arrays needed for TO outputs
- Called from:
- subroutine outto_mod/outto(time, n_time_step, ekin, ekintas, ltomov)¶
Output of axisymmetric zonal flow, its relative strength, its time variation, and all forces acting on it.
- Parameters:
time [real ,in] :: Time
n_time_step [integer ,in] :: Iteration number
ekin [real ,in] :: Kinetic energy
ekintas [real ,in] :: Toroidal axisymmetric energy
ltomov [logical ,in] :: Do we need to store the movie files as well
- Called from:
- Call to:
radial_spectra.f90
¶
Quick access
- Variables:
- Routines:
Needed modules
precision_mod
: This module controls the precision used in MagICparallel_mod
: This module contains the blocking informationcommunications
(reduce_radial()
): This module contains the different MPI communicators used in MagIC.truncation
(n_r_max()
,n_r_ic_max()
): This module defines the grid points and the truncationradial_data
(n_r_icb()
): This module defines the MPI decomposition in the radial direction.radial_functions
(or2()
,r_icb()
,r_ic()
): This module initiates all the radial functions (transport properties, density, temperature, cheb transforms, etc.)num_param
(escale()
): Module containing numerical and control parametersblocking
(llm()
,ulm()
): Module containing blocking informationlogic
(l_cond_ic()
): Module containing the logicals that control the runoutput_data
(tag()
): This module contains the parameters for output controluseful
(cc2real()
): This module contains several useful routines.constants
(pi()
,one()
,four()
,half()
): module containing constants and parameters used in the code.
Variables
- radial_spectra/filehandle [integer,private]¶
Subroutines and functions
- subroutine radial_spectra/rbrspec(time, pol, polic, fileroot, lic, map)¶
- Parameters:
- Called from:
- Call to:
- subroutine radial_spectra/rbpspec(time, tor, toric, fileroot, lic, map)¶
Called from rank0, map gives the lm order of Tor and TorIC
- Parameters:
- Called from:
- Call to:
outGeos.f90
¶
Description
This module is used to compute z-integrated diagnostics such as the degree of geostrophy or the separation of energies between inside and outside the tangent cylinder. This makes use of a local Simpson’s method. This also handles the computation of the z-average profile of rotation when a Couette flow setup is used
Quick access
- Variables:
geos_file
,n_geos_file
,up_ploc
,up_rloc
,us_ploc
,us_rloc
,uz_ploc
,uz_rloc
,vol_otc
,wz_ploc
,wz_rloc
- Routines:
calc_geos_frame()
,calcgeos()
,finalize_geos()
,initialize_geos()
,outgeos()
,outomega()
Needed modules
precision_mod
: This module controls the precision used in MagICparallel_mod
: This module contains the blocking informationblocking
(lo_map()
,llm()
,ulm()
): Module containing blocking informationconstants
(half()
,two()
,pi()
,one()
,four()
,third()
,zero()
): module containing constants and parameters used in the code.mem_alloc
(bytes_allocated()
): This little module is used to estimate the global memory allocation used in MagICradial_data
(radial_balance()
,nrstart()
,nrstop()
): This module defines the MPI decomposition in the radial direction.radial_functions
(or1()
,or2()
,r_icb()
,r_cmb()
,r()
,orho1()
,orho2()
,beta()
): This module initiates all the radial functions (transport properties, density, temperature, cheb transforms, etc.)output_data
(sdens()
,zdens()
,tag()
,n_s_max()
): This module contains the parameters for output controlhorizontal_data
(n_theta_cal2ord()
,o_sin_theta_e2()
,theta_ord()
,o_sin_theta()
,costheta()
,sintheta()
): Module containing functions depending on longitude and latitude plus help arrays depending on degree and ordermovie_data
(n_movie_field_type()
,n_movie_fields()
,n_movie_file()
,n_movies()
,n_movie_field_start()
,frames()
)truncation
(n_phi_max()
,n_theta_max()
,n_r_max()
,nlat_padded()
,l_max()
): This module defines the grid points and the truncationintegration
(simps()
,cylmean_otc()
,cylmean_itc()
): Radial and geostrophic integration functionslogic
(l_save_out()
): Module containing the logicals that control the run
Variables
- geos/cyl (*) [real,allocatable/public]¶
Cylindrical grid
- geos/cylmean [private]¶
- geos/gather_ploc [private]¶
- geos/geos_file [character(len=72),private]¶
file name
- geos/h (*) [real,private/allocatable]¶
h(s)
- geos/n_geos_file [integer,private]¶
file unit for geos.TAG
- geos/n_s_otc [integer,private]¶
Index for last point outside TC
- geos/npstart [integer,private]¶
Starting nPhi index when MPI distributed
- geos/npstop [integer,private]¶
Stoping nPhi index when MPI distributed
- geos/up_ploc (*,*,*) [real,private/allocatable]¶
- geos/up_rloc (*,*,*) [real,private/allocatable]¶
- geos/us_ploc (*,*,*) [real,private/allocatable]¶
- geos/us_rloc (*,*,*) [real,private/allocatable]¶
- geos/uz_ploc (*,*,*) [real,private/allocatable]¶
- geos/uz_rloc (*,*,*) [real,private/allocatable]¶
- geos/vol_otc [real,private]¶
volume outside tangent cylinder
- geos/wz_ploc (*,*,*) [real,private/allocatable]¶
- geos/wz_rloc (*,*,*) [real,private/allocatable]¶
Subroutines and functions
- subroutine geos/initialize_geos(l_geos, l_sric, l_geosmovie)¶
Memory allocation and definition of the cylindrical grid
- Parameters:
l_geos [logical ,in] :: Do we need the geos outputs
l_sric [logical ,in] :: Is the inner core rotating
l_geosmovie [logical ,in] :: Geos movie
- Called from:
- Call to:
- subroutine geos/finalize_geos(l_geos, l_sric, l_geosmovie)¶
Memory deallocation
- Parameters:
l_geos [logical ,in] :: Do we need the geos outputs
l_sric [logical ,in] :: Is the inner core rotating?
l_geosmovie [logical ,in] :: Do we have geos movies?
- Called from:
- subroutine geos/calcgeos(vr, vt, vp, cvr, dvrdp, dvpdr, nr)¶
This routine computes the term needed for geos.TAG outputs in physical space.
- Parameters:
vr (*,*) [real ,in]
vt (*,*) [real ,in]
vp (*,*) [real ,in]
cvr (*,*) [real ,in]
dvrdp (*,*) [real ,in]
dvpdr (*,*) [real ,in]
nr [integer ,in] :: Radial grid point
- subroutine geos/outgeos(time, geos, geosa, geosz, geosm, geosnap, ekin)¶
This routine handles the output of geos.TAG
- Parameters:
time [real ,in]
geos [real ,out]
geosa [real ,out]
geosz [real ,out]
geosm [real ,out]
geosnap [real ,out]
ekin [real ,out]
- Called from:
- Call to:
- subroutine geos/calc_geos_frame()¶
This subroutine handles the computation and the writing of geos movie files.
- Called from:
- Call to:
- subroutine geos/outomega(z, omega_ic)¶
Output of axisymmetric zonal flow omega(s) into field omega.TAG, where s is the cylindrical radius. This is done for the southern and norther hemispheres at z=+-(r_icb+0.5)
- Parameters:
- Called from:
- Call to:
probes.f90
¶
Description
Module for artificial sensors to compare time series of physical data with experiments. Probes are located in a radially symmetrical way on a radial surface given by r_probe (in terms of r_cmb), theta_probe in degrees between 0 and 90 and n_phi_probes denoting the number of probes in phi. Probes will be located at ‘n_phi_probes’ points at two equatorially symmetric latitudes - theta_probe and (180 - theta_probe) on r = r_probe.
version 1.0: Works only for v_phi, for now. Will be extended for other data later.
Quick access
- Variables:
n_phi_probes
,n_probebr
,n_probebt
,n_probevp
,n_theta_usr
,probe_filebr
,probe_filebt
,probe_filevp
,r_probe
,rad_rank
,rad_usr
,theta_probe
- Routines:
Needed modules
precision_mod
: This module controls the precision used in MagICparallel_mod
(rank()
): This module contains the blocking informationtruncation
(n_r_max()
,n_phi_max()
,n_theta_max()
): This module defines the grid points and the truncationradial_data
(nrstart()
,nrstop()
): This module defines the MPI decomposition in the radial direction.radial_functions
(r_cmb()
,orho1()
,or1()
,or2()
,r()
): This module initiates all the radial functions (transport properties, density, temperature, cheb transforms, etc.)num_param
(vscale()
): Module containing numerical and control parametershorizontal_data
(o_sin_theta()
,theta_ord()
,n_theta_ord2cal()
): Module containing functions depending on longitude and latitude plus help arrays depending on degree and orderoutput_data
(tag()
): This module contains the parameters for output controlconstants
(pi()
,one()
): module containing constants and parameters used in the code.logic
(l_save_out()
): Module containing the logicals that control the run
Variables
- probe_mod/n_phi_probes [integer,public]¶
number of probes in phi - symmetrically distributed
- probe_mod/n_probebr [integer,private]¶
- probe_mod/n_probebt [integer,private]¶
- probe_mod/n_probevp [integer,private]¶
- probe_mod/n_theta_usr [integer,private]¶
- probe_mod/probe_filebr [character(len=72),private]¶
- probe_mod/probe_filebt [character(len=72),private]¶
- probe_mod/probe_filevp [character(len=72),private]¶
- probe_mod/r_probe [real,public]¶
- probe_mod/rad_rank [integer,private]¶
- probe_mod/rad_usr [integer,private]¶
- probe_mod/theta_probe [real,public]¶
probe locations, r_probe in terms of r_cmb and theta in degrees
Subroutines and functions
- subroutine probe_mod/probe_out(time, n_r, vp, br, bt)¶
- Parameters:
time [real ,in] :: Time
n_r [integer ,in] :: radial grod point no.
vp (*,*) [real ,in]
br (*,*) [real ,in]
bt (*,*) [real ,in]