IO: graphic files, movie files, coeff files and potential files¶
out_graph_file.f90
¶
Description
This module contains the subroutines that store the 3-D graphic files.
Quick access
- Variables:
graph_mpi_fh
,info
,n_fields
,n_graph
,n_graph_file
,size_of_header
- Routines:
close_graph_file()
,graphout()
,graphout_header()
,graphout_ic()
,graphout_mpi()
,graphout_mpi_header()
,open_graph_file()
Needed modules
iso_fortran_env
(output_unit()
)parallel_mod
: This module contains the blocking informationprecision_mod
: This module controls the precision used in MagICconstants
(one()
): module containing constants and parameters used in the code.truncation
(lm_maxmag()
,n_r_maxmag()
,n_r_ic_maxmag()
,lm_max()
,n_theta_max()
,n_phi_tot()
,n_r_max()
,l_max()
,minc()
,n_phi_max()
,n_r_ic_max()
,nlat_padded()
): This module defines the grid points and the truncationradial_functions
(r_cmb()
,orho1()
,or1()
,or2()
,r()
,r_icb()
,r_ic()
,o_r_ic()
,o_r_ic2()
): This module initiates all the radial functions (transport properties, density, temperature, cheb transforms, etc.)radial_data
(nrstart()
,n_r_cmb()
,n_r_icb()
): This module defines the MPI decomposition in the radial direction.physical_parameters
(ra()
,ek()
,pr()
,prmag()
,radratio()
,sigma_ratio()
,raxi()
,sc()
,stef()
): Module containing the physical parametersnum_param
(vscale()
): Module containing numerical and control parametershorizontal_data
(theta_ord()
,o_sin_theta()
,n_theta_cal2ord()
): Module containing functions depending on longitude and latitude plus help arrays depending on degree and orderlogic
(l_mag()
,l_cond_ic()
,l_pressgraph()
,l_chemical_conv()
,l_heat()
,l_save_out()
,l_phase_field()
,l_full_sphere()
): Module containing the logicals that control the runoutput_data
(runid()
,n_log_file()
,log_file()
,tag()
): This module contains the parameters for output control
Variables
- graphout_mod/graph_mpi_fh [integer,private]¶
- graphout_mod/info [integer,private]¶
- graphout_mod/n_fields [integer,private]¶
- graphout_mod/n_graph [integer,private/optional/default=0]¶
- graphout_mod/n_graph_file [integer,public]¶
- graphout_mod/size_of_header [integer,private]¶
- graphout_mod/write_one_field [private]¶
Subroutines and functions
- subroutine graphout_mod/open_graph_file(n_time_step, timescaled, l_ave[, n_graph_handle])¶
- Parameters:
n_time_step [integer ,in]
timescaled [real ,in]
l_ave [logical ,in]
- Options:
n_graph_handle [integer ,inout,]
- Called from:
- Call to:
- subroutine graphout_mod/close_graph_file([n_graph_handle])¶
This routine handles the closing of the Graphic files
- Options:
n_graph_handle [integer ,inout,]
- Called from:
- subroutine graphout_mod/graphout(n_r, vr, vt, vp, br, bt, bp, sr, prer, xir, phir[, n_graph_handle])¶
Output of components of velocity, magnetic field vector, entropy and composition for graphic outputs.
- Parameters:
n_r [integer ,in] :: radial grod point no.
vr (*,*) [real ,in]
vt (*,*) [real ,in]
vp (*,*) [real ,in]
br (*,*) [real ,in]
bt (*,*) [real ,in]
bp (*,*) [real ,in]
sr (*,*) [real ,in]
prer (*,*) [real ,in]
xir (*,*) [real ,in]
phir (*,*) [real ,in]
- Options:
n_graph_handle [integer ,in,] :: File index
- subroutine graphout_mod/graphout_header(time[, n_graph_handle])¶
- Parameters:
time [real ,in]
- Options:
n_graph_handle [integer ,in,]
- subroutine graphout_mod/graphout_mpi(n_r, vr, vt, vp, br, bt, bp, sr, prer, xir, phir[, n_graph_handle])¶
MPI version of the graphOut subroutine (use of MPI_IO)
- Parameters:
n_r [integer ,in] :: radial grid point no.
vr (*,*) [real ,in]
vt (*,*) [real ,in]
vp (*,*) [real ,in]
br (*,*) [real ,in]
bt (*,*) [real ,in]
bp (*,*) [real ,in]
sr (*,*) [real ,in]
prer (*,*) [real ,in]
xir (*,*) [real ,in]
phir (*,*) [real ,in]
- Options:
n_graph_handle [integer ,in,]
- Called from:
- subroutine graphout_mod/graphout_mpi_header(time[, n_graph_handle])¶
Writes the header of the G file (MPI version)
- Parameters:
time [real ,in]
- Options:
n_graph_handle [integer ,in,]
- Called from:
- subroutine graphout_mod/graphout_ic(b_ic, db_ic, aj_ic, bicb[, n_graph_handle])¶
Purpose of this subroutine is to write inner core magnetic field onto graphic output file. If the inner core is insulating (l_cond_ic=false) the potential field is calculated from the outer core field at r=r_cmb. This version assumes that the fields are fully local on the rank which is calling this routine (usually rank 0).
- Parameters:
b_ic (*,*) [complex ,in]
db_ic (*,*) [complex ,in]
aj_ic (*,*) [complex ,in]
bicb (*) [complex ,in]
- Options:
n_graph_handle [integer ,in,]
- Called from:
- Call to:
movie.f90
¶
Quick access
- Variables:
frames
,get_movie_type
,lgeosfield
,licfield
,lphasefield
,movie
,movie_const
,movie_file
,n_frame_work
,n_md
,n_movie_const
,n_movie_field_start
,n_movie_field_stop
,n_movie_field_type
,n_movie_fields
,n_movie_fields_ic
,n_movie_fields_max
,n_movie_file
,n_movie_surface
,n_movies
,n_movies_max
- Routines:
finalize_movie_data()
,initialize_movie_data()
,movie_gather_frames_to_rank0()
Needed modules
iso_fortran_env
(output_unit()
)parallel_mod
: This module contains the blocking informationprecision_mod
: This module controls the precision used in MagICtruncation
(n_r_max()
,n_theta_max()
,n_phi_max()
,minc()
,n_r_ic_max()
,n_r_tot()
): This module defines the grid points and the truncationlogic
(l_store_frame()
,l_save_out()
,l_movie()
,l_movie_oc()
,l_geosmovie()
,l_movie_ic()
,l_htmovie()
,l_dtbmovie()
,l_phasemovie()
,l_dtphasemovie()
): Module containing the logicals that control the runradial_data
(nrstart()
,nrstop()
,n_r_icb()
,n_r_cmb()
,radial_balance()
): This module defines the MPI decomposition in the radial direction.radial_functions
(r_cmb()
,r_icb()
,r()
,r_ic()
): This module initiates all the radial functions (transport properties, density, temperature, cheb transforms, etc.)horizontal_data
(theta_ord()
,phi()
,n_theta_ord2cal()
): Module containing functions depending on longitude and latitude plus help arrays depending on degree and orderoutput_data
(n_log_file()
,log_file()
,tag()
,n_s_max()
): This module contains the parameters for output controlcharmanip
(capitalize()
,delete_string()
,dble2str()
): This module contains several useful routines to manipule character stringsuseful
(logwrite()
,abortrun()
): This module contains several useful routines.constants
(pi()
,one()
): 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 MagIC
Variables
- movie_data/frames (*) [real,allocatable/public]¶
- movie_data/get_movie_type [private]¶
- movie_data/lgeosfield (30) [logical,public]¶
- movie_data/licfield (30) [logical,public]¶
- movie_data/lphasefield (30) [logical,private]¶
- movie_data/movie (30) [character(len=80),public]¶
‘
- movie_data/movie_const (30) [real,public]¶
- movie_data/movie_file (30) [character(len=72),public]¶
- movie_data/n_frame_work [integer,public]¶
- movie_data/n_md [integer,public]¶
- movie_data/n_movie_const (30) [integer,public]¶
- movie_data/n_movie_field_start (6,30) [integer,public]¶
- movie_data/n_movie_field_stop (6,30) [integer,public]¶
- movie_data/n_movie_field_type (6,30) [integer,public]¶
- movie_data/n_movie_fields (30) [integer,public]¶
- movie_data/n_movie_fields_ic (30) [integer,public]¶
- movie_data/n_movie_fields_max [integer,parameter=6]¶
Max no. of fields per movie
- movie_data/n_movie_file (30) [integer,public]¶
- movie_data/n_movie_surface (30) [integer,public]¶
- movie_data/n_movies [integer,public]¶
- movie_data/n_movies_max [integer,parameter=30]¶
Max no. of different movies
Subroutines and functions
- subroutine movie_data/initialize_movie_data()¶
This routine is called during the initialization of the code. It allows to:
Estimate the required memory imprint and allocate the arrays accordingly
Open the requested movie files
- Called from:
- subroutine movie_data/movie_gather_frames_to_rank0()¶
MPI communicators for movie files
- Called from:
- Call to:
out_movie_file.f90
¶
Description
This module handles the storage of the relevant diagnostics in the public array frames(*) and then the writing of the corresponding movie files
Quick access
- Variables:
- Routines:
Needed modules
precision_mod
: This module controls the precision used in MagICparallel_mod
(rank()
): This module contains the blocking informationgeos
(cyl()
): 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 alsotruncation
(n_phi_max()
,n_theta_max()
,minc()
,lm_max()
,l_max()
,n_m_max()
,lm_maxmag()
,n_r_maxmag()
,n_r_ic_maxmag()
,n_r_ic_max()
,n_r_max()
,nlat_padded()
): This module defines the grid points and the truncationmovie_data
(frames()
,n_movie_fields()
,n_movies()
,n_movie_surface()
,n_movie_const()
,n_movie_field_type()
,lgeosfield()
,n_movie_field_start()
,n_movie_field_stop()
,movie_const()
,movie_file()
,n_movie_file()
,licfield()
,n_movie_fields_ic()
)radial_data
(n_r_icb()
,n_r_cmb()
): This module defines the MPI decomposition in the radial direction.radial_functions
(orho1()
,orho2()
,or1()
,or2()
,or3()
,or4()
,beta()
,r_surface()
,r_cmb()
,r()
,r_ic()
,temp0()
): This module initiates all the radial functions (transport properties, density, temperature, cheb transforms, etc.)physical_parameters
(lffac()
,radratio()
,ra()
,ek()
,pr()
,prmag()
,raxi()
,sc()
): Module containing the physical parametersnum_param
(vscale()
,tscale()
): Module containing numerical and control parametersblocking
(lm2l()
,lm2()
,llmmag()
,ulmmag()
): Module containing blocking informationhorizontal_data
(o_sin_theta()
,sintheta()
,costheta()
,n_theta_cal2ord()
,o_sin_theta_e2()
,phi()
,theta_ord()
): Module containing functions depending on longitude and latitude plus help arrays depending on degree and orderfields
(w_rloc()
,b_rloc()
,b_ic()
,bicb()
): 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….logic
(l_save_out()
,l_cond_ic()
,l_mag()
,l_full_sphere()
): Module containing the logicals that control the runconstants
(zero()
,half()
,one()
,two()
): module containing constants and parameters used in the code.output_data
(runid()
,n_s_max()
): This module contains the parameters for output controluseful
(abortrun()
): This module contains several useful routines.
Variables
- out_movie/get_b_surface [private]¶
- out_movie/get_sl [private]¶
- out_movie/store_fields_3d [private]¶
- out_movie/store_fields_p [private]¶
- out_movie/store_fields_p_avg [private]¶
- out_movie/store_fields_r [private]¶
- out_movie/store_fields_sur [private]¶
- out_movie/store_fields_t [private]¶
Subroutines and functions
- subroutine out_movie/store_movie_frame(n_r, vr, vt, vp, br, bt, bp, sr, drsr, xir, phir, dvrdp, dvpdr, dvtdr, dvrdt, cvr, cbr, cbt)¶
Controls output of movie frames. Usually called from radialLoop.
- Parameters:
n_r [integer ,in] :: radial grid point no.
vr (*,*) [real ,in]
vt (*,*) [real ,in]
vp (*,*) [real ,in]
br (*,*) [real ,in]
bt (*,*) [real ,in]
bp (*,*) [real ,in]
sr (*,*) [real ,in]
drsr (*,*) [real ,in]
xir (*,*) [real ,in]
phir (*,*) [real ,in]
dvrdp (*,*) [real ,in]
dvpdr (*,*) [real ,in]
dvtdr (*,*) [real ,in]
dvrdt (*,*) [real ,in]
cvr (*,*) [real ,in]
cbr (*,*) [real ,in]
cbt (*,*) [real ,in]
- subroutine out_movie/write_movie_frame(n_frame, time)¶
Writes different movie frames into respective output files. Called from rank 0 with full arrays in standard LM order.
- Parameters:
n_frame [integer ,in]
time [real ,in]
- Called from:
- subroutine out_movie/get_fl(fl, n_r, l_ic)¶
Return field fl whose contourlines are the fields lines of the axisymmetric poloidal mangetic field.
\[f(r,\theta) = \dfrac{1}{r}\dfrac{\partial}{\partial \theta} b(r,\theta,m=0)\]This routine is called for l_ic=.true. only from rank 0 with full field b_ic in standard lm ordering available. The case l_ic=.false. is called from all ranks and uses b_Rloc.
- Parameters:
fl (*) [real ,out] :: Field for field lines
n_r [integer ,in] :: No. of radial grid point
l_ic [logical ,in] :: =true if inner core field
- Call to:
store_movie_IC.f90
¶
Description
This module handles the computation of the inner core contribution to the movie files. Relevant outputs are stored in frames(*) from the movie.f90 module.
Quick access
- Variables:
store_fields_3d
,store_fields_p
,store_fields_p_avg
,store_fields_r
,store_fields_t
- Routines:
Needed modules
precision_mod
: This module controls the precision used in MagICparallel_mod
: This module contains the blocking informationcommunications
(gather_from_lo_to_rank0()
): This module contains the different MPI communicators used in MagIC.truncation
(minc()
,lm_maxmag()
,n_r_ic_maxmag()
,n_theta_max()
,nlat_padded()
,n_phi_max()
,lm_max()
,n_r_ic_max()
,l_max()
): This module defines the grid points and the truncationradial_functions
(r_ic()
,r_icb()
,o_r_ic2()
,o_r_ic()
): This module initiates all the radial functions (transport properties, density, temperature, cheb transforms, etc.)physical_parameters
(lffac()
): Module containing the physical parametershorizontal_data
(n_theta_cal2ord()
,o_sin_theta()
): Module containing functions depending on longitude and latitude plus help arrays depending on degree and orderlogic
(l_cond_ic()
): Module containing the logicals that control the runmovie_data
(frames()
,n_movie_field_stop()
,n_movie_field_start()
,n_movie_const()
,n_movie_fields_ic()
,n_movie_surface()
,n_movies()
,n_movie_field_type()
,n_movie_fields()
)out_movie
(get_fl()
): This module handles the storage of the relevant diagnostics in the public array frames(*) and then the writing of the corresponding movie filesconstants
(zero()
,one()
): module containing constants and parameters used in the code.blocking
(llmmag()
,ulmmag()
): Module containing blocking information
Variables
- out_movie_ic/store_fields_3d [private]¶
- out_movie_ic/store_fields_p [private]¶
- out_movie_ic/store_fields_p_avg [private]¶
- out_movie_ic/store_fields_r [private]¶
- out_movie_ic/store_fields_t [private]¶
Subroutines and functions
- subroutine out_movie_ic/store_movie_frame_ic(bicb, b_ic, db_ic, ddb_ic, aj_ic, dj_ic)¶
Controls storage of IC magnetic field in movie frame.
- Parameters:
bicb (lm_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]
- Called from:
out_coeff.f90
¶
Description
This module contains the subroutines that calculate the Bcmb files, the [B|V|T]_coeff_r files and the [B|V|T]_lmr files
Quick access
- Variables:
b_r_file
,n_b_r_file
,n_b_r_sets
,n_t_r_file
,n_t_r_sets
,n_v_r_file
,n_v_r_sets
,n_xi_r_file
,n_xi_r_sets
,t_r_file
,v_r_file
,write_coeff_r
,xi_r_file
- Routines:
finalize_coeff()
,initialize_coeff()
,write_bcmb()
,write_coeffs()
,write_pot()
,write_pot_mpi()
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 MagIClogic
(l_r_field()
,l_cmb_field()
,l_save_out()
,l_average()
,l_cond_ic()
,l_r_fieldt()
,l_r_fieldxi()
,l_mag()
): Module containing the logicals that control the runradial_functions
(r()
,rho0()
): 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.physical_parameters
(ra()
,ek()
,pr()
,prmag()
,radratio()
,sigma_ratio()
,raxi()
,sc()
): Module containing the physical parametersnum_param
(tscale()
): Module containing numerical and control parametersblocking
(lm2()
,llm()
,ulm()
): Module containing blocking informationtruncation
(lm_max()
,l_max()
,minc()
,n_r_max()
,n_r_ic_max()
,m_min()
,m_max()
): This module defines the grid points and the truncationcommunications
(gather_from_lo_to_rank0()
,gather_all_from_lo_to_rank0()
,gt_ic()
,gt_oc()
): This module contains the different MPI communicators used in MagIC.output_data
(tag()
,n_coeff_r()
,n_r_array()
,n_r_step()
,l_max_r()
,n_coeff_r_max()
): This module contains the parameters for output controlconstants
(two()
,half()
): module containing constants and parameters used in the code.
Variables
- out_coeff/b_r_file (*) [character(len=72),private/allocatable]¶
- out_coeff/filehandle [integer,private]¶
- out_coeff/n_b_r_file (*) [integer,private/allocatable]¶
- out_coeff/n_b_r_sets (*) [integer,private/allocatable]¶
- out_coeff/n_t_r_file (*) [integer,private/allocatable]¶
- out_coeff/n_t_r_sets (*) [integer,private/allocatable]¶
- out_coeff/n_v_r_file (*) [integer,private/allocatable]¶
- out_coeff/n_v_r_sets (*) [integer,private/allocatable]¶
- out_coeff/n_xi_r_file (*) [integer,private/allocatable]¶
- out_coeff/n_xi_r_sets (*) [integer,private/allocatable]¶
- out_coeff/t_r_file (*) [character(len=72),private/allocatable]¶
- out_coeff/v_r_file (*) [character(len=72),private/allocatable]¶
- out_coeff/write_coeff_r [private]¶
- out_coeff/xi_r_file (*) [character(len=72),private/allocatable]¶
Subroutines and functions
- subroutine out_coeff/initialize_coeff()¶
- Called from:
- subroutine out_coeff/finalize_coeff()¶
- Called from:
- subroutine out_coeff/write_bcmb(time, b_lmloc, l_max_cmb, n_cmb_sets, cmb_file, n_cmb_file)¶
Each call of this subroutine writes time and the poloidal magnetic potential coefficients b at the CMB up to degree and order l_max_cmb at the end of output file cmb_file. The parameters l_max_cmb, minc and the number of stored coeffs are written into the header of cmb_file. Each further set contains:
Real and imaginary part of b(*) for all orders m<=l are written for a specific degree l, then for the degrees l+1, l+2, l_max_cmb.
- Parameters:
time [real ,in] :: Time
b_lmloc (1 - llm + ulm) [complex ,in] :: Poloidal field potential
l_max_cmb [integer ,inout] :: Max degree of output
n_cmb_sets [integer ,inout] :: Total no. of cmb sets,
cmb_file [character(len=*),in] :: Name of output file
n_cmb_file [integer ,inout] :: Output unit for $cmb_file
- Called from:
- Call to:
- subroutine out_coeff/write_coeffs(w_lmloc, dw_lmloc, ddw_lmloc, z_lmloc, b_lmloc, db_lmloc, ddb_lmloc, aj_lmloc, s_lmloc, xi_lmloc, timescaled)¶
This routine handles the writing of coefficients at a given depth
- Parameters:
w_lmloc (*,*) [complex ,in]
dw_lmloc (*,*) [complex ,in]
ddw_lmloc (*,*) [complex ,in]
z_lmloc (*,*) [complex ,in]
b_lmloc (*,*) [complex ,in]
db_lmloc (*,*) [complex ,in]
ddb_lmloc (*,*) [complex ,in]
aj_lmloc (*,*) [complex ,in]
s_lmloc (*,*) [complex ,in]
xi_lmloc (*,*) [complex ,in]
timescaled [real ,in]
- Called from:
- subroutine out_coeff/write_pot_mpi(time, b, aj, b_ic, aj_ic, npotsets, root, omega_ma, omega_ic)¶
This routine stores the fields in (lm,r) space using MPI-IO
- Parameters:
time [real ,in] :: Time
b (lm_max,1 - nrstart + nrstop) [complex ,in] :: Poloidal potential
aj (lm_max,1 - nrstart + nrstop) [complex ,in] :: Toroidal potential
b_ic (1 - llm + ulm,n_r_ic_max) [complex ,in]
aj_ic (1 - llm + ulm,n_r_ic_max) [complex ,in]
npotsets [integer ,in]
root [character(len=*),in]
omega_ma [real ,in]
omega_ic [real ,in]
- Called from:
- Call to:
- subroutine out_coeff/write_pot(time, b, aj, b_ic, aj_ic, npotsets, root, omega_ma, omega_ic)¶
This routine stores the fields in spectral and radial space
- Parameters:
time [real ,in] :: Output time
b_ic (1 - llm + ulm,n_r_ic_max) [complex ,in]
aj_ic (1 - llm + ulm,n_r_ic_max) [complex ,in]
npotsets [integer ,in]
root [character(len=*),in] :: File prefix
omega_ma [real ,in]
omega_ic [real ,in]
- Call to:
field_average.f90
¶
Description
This module is used when one wants to store time-averaged quantities
Quick access
- Variables:
aj_ave_lmloc
,aj_ave_rloc
,aj_ic_ave
,b_ave_lmloc
,b_ave_rloc
,b_ic_ave
,bicb
,p_ave_lmloc
,p_ave_rloc
,phi_ave_lmloc
,phi_ave_rloc
,s_ave_lmloc
,s_ave_rloc
,w_ave_lmloc
,w_ave_rloc
,xi_ave_lmloc
,xi_ave_rloc
,z_ave_lmloc
,z_ave_rloc
- Routines:
fields_average()
,finalize_fields_average_mod()
,initialize_fields_average_mod()
Needed modules
truncation
: This module defines the grid points and the truncationprecision_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 MagICcommunications
(get_global_sum()
,gather_from_lo_to_rank0()
,gather_all_from_lo_to_rank0()
,gt_oc()
,gt_ic()
): This module contains the different MPI communicators used in MagIC.radial_data
(n_r_cmb()
,n_r_icb()
,nrstart()
,nrstop()
): This module defines the MPI decomposition in the radial direction.radial_functions
(chebt_ic()
,chebt_ic_even()
,r()
,dr_fac_ic()
,rscheme_oc()
,l_r()
): This module initiates all the radial functions (transport properties, density, temperature, cheb transforms, etc.)blocking
(lm2()
,llm()
,ulm()
,llmmag()
,ulmmag()
): Module containing blocking informationlogic
(l_mag()
,l_conv()
,l_save_out()
,l_heat()
,l_cond_ic()
,l_chemical_conv()
,l_phase_field()
,l_onset()
): Module containing the logicals that control the runkinetic_energy
(get_e_kin()
): This module handles the computation of kinetic energy and the time-averaged radial profiles.magnetic_energy
(get_e_mag()
): This module handles the computation and the writing of the diagnostic files related to magnetic energy: e_mag_oc.TAG, e_mag_ic.TAG, dipole.TAG, eMagR.TAGoutput_data
(tag()
,n_log_file()
,log_file()
,n_graphs()
,l_max_cmb()
): This module contains the parameters for output controlparallel_mod
(rank()
): This module contains the blocking informationconstants
(zero()
,vol_oc()
,vol_ic()
,one()
): module containing constants and parameters used in the code.out_coeff
(write_pot_mpi()
): This module contains the subroutines that calculate the Bcmb files, the [B|V|T]_coeff_r files and the [B|V|T]_lmr filesspectra
(spectrum()
): This module handles the computation and the writing of spectra. It handles both 2-D spectra in (r,l) and (r,m) spaces and usual spectra integrated over all radii in (l) or (m) spaces….graphout_mod
(graphout_mpi()
,graphout_mpi_header()
): This module contains the subroutines that store the 3-D graphic files.radial_der
(get_dr()
): Radial derivatives functionsfieldslast
(dwdt()
,dpdt()
,dzdt()
,dsdt()
,dxidt()
,dbdt()
,djdt()
,dbdt_ic()
,djdt_ic()
,domega_ma_dt()
,domega_ic_dt()
,dphidt()
): This module contains all the work arrays of the previous time-steps needed to time advance the code. They are needed in the time-stepping scheme….storecheckpoints
: This module contains several subroutines that can be used to store the checkpoint_#.tag filestime_schemes
(type_tscheme()
): This module defines an abstract class type_tscheme which is employed for the time advance of the code.
Variables
- fields_average_mod/aj_ave_lmloc (*,*) [complex,private/allocatable]¶
- fields_average_mod/aj_ave_rloc (*,*) [complex,private/allocatable]¶
- fields_average_mod/aj_ic_ave (*,*) [complex,private/allocatable]¶
- fields_average_mod/b_ave_lmloc (*,*) [complex,private/allocatable]¶
- fields_average_mod/b_ave_rloc (*,*) [complex,private/allocatable]¶
- fields_average_mod/b_ic_ave (*,*) [complex,private/allocatable]¶
- fields_average_mod/bicb (*) [complex,private/allocatable]¶
- fields_average_mod/p_ave_lmloc (*,*) [complex,private/allocatable]¶
- fields_average_mod/p_ave_rloc (*,*) [complex,private/allocatable]¶
- fields_average_mod/phi_ave_lmloc (*,*) [complex,private/allocatable]¶
- fields_average_mod/phi_ave_rloc (*,*) [complex,private/allocatable]¶
- fields_average_mod/s_ave_lmloc (*,*) [complex,private/allocatable]¶
- fields_average_mod/s_ave_rloc (*,*) [complex,private/allocatable]¶
- fields_average_mod/w_ave_lmloc (*,*) [complex,private/allocatable]¶
- fields_average_mod/w_ave_rloc (*,*) [complex,private/allocatable]¶
- fields_average_mod/xi_ave_lmloc (*,*) [complex,private/allocatable]¶
- fields_average_mod/xi_ave_rloc (*,*) [complex,private/allocatable]¶
- fields_average_mod/z_ave_lmloc (*,*) [complex,private/allocatable]¶
- fields_average_mod/z_ave_rloc (*,*) [complex,private/allocatable]¶
Subroutines and functions
- subroutine fields_average_mod/initialize_fields_average_mod()¶
Allocate arrays for computations of time-averaged fields
- Called from:
- subroutine fields_average_mod/finalize_fields_average_mod()¶
Deallocate arrays used to compute time-averaged fields
- Called from:
- subroutine fields_average_mod/fields_average(simtime, tscheme, nave, l_stop_time, time_passed, time_norm, omega_ic, omega_ma, w, z, p, s, xi, phi, b, aj, b_ic, aj_ic)¶
This subroutine averages the fields in spectral space over time to produce spectra and checkpoints of the time-averaged field. It also computes the spherical harmonic transforms to produce the corresponding average graphic file G_ave.TAG.
- Parameters:
simtime [real ,in]
tscheme [real ] :: Time scheme
nave [integer ,in] :: number for averaged time steps
l_stop_time [logical ,in] :: true if this is the last time step
time_passed [real ,in] :: time passed since last log
time_norm [real ,in] :: time passed since start of time loop
omega_ic [real ,in]
omega_ma [real ,in]
w (1 - llm + ulm,n_r_max) [complex ,in] :: Poloidal potential (V)
z (1 - llm + ulm,n_r_max) [complex ,in] :: Toroidal potential (V)
s (1 - llm + ulm,n_r_max) [complex ,in] :: Temperature/Entropy
xi (1 - llm + ulm,n_r_max) [complex ,in] :: Chemical composition
b (1 - llmmag + ulmmag,n_r_maxmag) [complex ,in] :: Poloidal potential (B)
aj (1 - llmmag + ulmmag,n_r_maxmag) [complex ,in] :: Toroidal potential (B)
b_ic (1 - llmmag + ulmmag,n_r_ic_maxmag) [complex ,in] :: Poloidal potential of the inner core field
aj_ic (1 - llmmag + ulmmag,n_r_ic_maxmag) [complex ,in] :: Toroidal potential of the inner core field
- Called from:
- Call to:
get_ddrns_even()
,get_drns_even()
,spectrum()
,get_e_kin()
,get_e_mag()
,open_graph_file()
,graphout_mpi_header()
,gather_from_lo_to_rank0()
,torpol_to_spat()
,scal_to_spat()
,graphout_mpi()
,gather_all_from_lo_to_rank0()
,graphout_ic()
,close_graph_file()
,write_bcmb()
,write_pot_mpi()
,store_mpi()