Reading and storing check points (restart files)¶
readCheckPoints.f90
¶
Description
This module contains the functions that can help reading and mapping of the restart files
Quick access
- Variables
bytes_allocated
,l_axi_old
,lreadr
,lreads
,lreadxi
,n_start_file
,ratio1
,ratio1_old
,ratio2
,ratio2_old
- Routines
finish_start_fields()
,getlm2lmo()
,mapdatahydro()
,mapdatamag()
,mapdatar()
,maponefield()
,maponefield_mpi()
,read_map_one_field()
,read_map_one_field_mpi()
,read_map_one_scalar()
,read_map_one_scalar_mpi()
,readstartfields()
,readstartfields_mpi()
,readstartfields_old()
Needed modules
iso_fortran_env
(output_unit()
)precision_mod
: This module controls the precision used in MagICparallel_mod
: This module contains the blocking informationcommunications
(scatter_from_rank0_to_lo()
,lo2r_one()
): This module contains the different MPI communicators used in MagIC.fields
(dw_lmloc()
,ddw_lmloc()
,ds_lmloc()
,dp_lmloc()
,dz_lmloc()
,dxi_lmloc()
,db_lmloc()
,ddb_lmloc()
,dj_lmloc()
,ddj_lmloc()
,db_ic_lmloc()
,ddb_ic_lmloc()
,dj_ic_lmloc()
,ddj_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….truncation
(n_r_max()
,lm_max()
,n_r_maxmag()
,lm_maxmag()
,n_r_ic_max()
,n_r_ic_maxmag()
,nalias()
,n_phi_tot()
,l_max()
,m_max()
,minc()
,lmagmem()
,fd_stretch()
,fd_ratio()
,m_min()
): This module defines the grid points and the truncationlogic
(l_rot_ma()
,l_rot_ic()
,l_sric()
,l_srma()
,l_cond_ic()
,l_heat()
,l_mag()
,l_mag_lf()
,l_chemical_conv()
,l_ab1()
,l_bridge_step()
,l_double_curl()
,l_z10mat()
,l_single_matrix()
,l_parallel_solve()
,l_mag_par_solve()
,l_phase_field()
): Module containing the logicals that control the runblocking
(lo_map()
,lm2l()
,lm2m()
,lm_balance()
,llm()
,ulm()
,llmmag()
,ulmmag()
,st_map()
): Module containing blocking informationinit_fields
(start_file()
,inform()
,tomega_ic1()
,tomega_ic2()
,tomega_ma1()
,tomega_ma2()
,omega_ic1()
,omegaosz_ic1()
,omega_ic2()
,omegaosz_ic2()
,omega_ma1()
,omegaosz_ma1()
,omega_ma2()
,omegaosz_ma2()
,tshift_ic1()
,tshift_ic2()
,tshift_ma1()
,tshift_ma2()
,tipdipole()
,scale_b()
,scale_v()
,scale_s()
,scale_xi()
): This module is used to construct the initial solution.radial_functions
(rscheme_oc()
,chebt_ic()
,cheb_norm_ic()
,r()
): This module initiates all the radial functions (transport properties, density, temperature, cheb transforms, etc.)num_param
(alph1()
,alph2()
,alpha()
): Module containing numerical and control parametersradial_data
(n_r_icb()
,n_r_cmb()
): This module defines the MPI decomposition in the radial direction.physical_parameters
(ra()
,ek()
,pr()
,prmag()
,radratio()
,sigma_ratio()
,kbotv()
,ktopv()
,sc()
,raxi()
,lffac()
): Module containing the physical parametersconstants
(c_z10_omega_ic()
,c_z10_omega_ma()
,pi()
,zero()
,two()
,one()
,c_lorentz_ma()
,c_lorentz_ic()
,c_moi_ic()
,c_moi_ma()
): module containing constants and parameters used in the code.chebyshev
(type_cheb_odd()
)radial_scheme
(type_rscheme()
): This is an abstract type that defines the radial scheme used in MagICfinite_differences
(type_fd()
): This module is used to calculate the radial grid when finite differences are requestedcosine_transform_odd
(costf_odd_t()
): 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….useful
(polynomial_interpolation()
,abortrun()
): This module contains several useful routines.updatewp_mod
(get_pol_rhs_imp()
): This module handles the time advance of the poloidal potential w and the pressure p. It contains the computation of the implicit terms and the linear solves.updatez_mod
(get_tor_rhs_imp()
): This module handles the time advance of the toroidal potential z It contains the computation of the implicit terms and the linear solves….updates_mod
(get_entropy_rhs_imp()
): This module handles the time advance of the entropy s. It contains the computation of the implicit terms and the linear solves….updatexi_mod
(get_comp_rhs_imp()
): This module handles the time advance of the chemical composition xi. It contains the computation of the implicit terms and the linear solves….updateb_mod
(get_mag_rhs_imp()
,get_mag_ic_rhs_imp()
): This module handles the time advance of the magnetic field potentials b and aj as well as the inner core counterparts b_ic and aj_ic. It contains the computation of the implicit terms and the linearupdatewps_mod
(get_single_rhs_imp()
): This module handles the time advance of the poloidal potential w, the pressure p and the entropy s in one single matrix per degree. It contains the computation of the implicit terms and the lineartime_schemes
(type_tscheme()
): This module defines an abstract class type_tscheme which is employed for the time advance of the code.time_array
(type_tarray()
,type_tscalar()
): This module defines two types that are defined to store the implicit/explicit terms at the different sub-stage/step.
Variables
-
readcheckpoints/
bytes_allocated
[integer,private/optional/default=0]¶
-
-
readcheckpoints/
l_axi_old
[logical,private]¶
-
-
readcheckpoints/
lreadr
[logical,private]¶
-
-
readcheckpoints/
lreads
[logical,private]¶
-
-
readcheckpoints/
lreadxi
[logical,private]¶
-
-
readcheckpoints/
n_start_file
[integer,private]¶
-
-
readcheckpoints/
ratio1
[real,private]¶
-
-
readcheckpoints/
ratio1_old
[real,private]¶
-
-
readcheckpoints/
ratio2
[real,private]¶
-
-
readcheckpoints/
ratio2_old
[real,private]¶
-
Subroutines and functions
-
subroutine
readcheckpoints/
readstartfields_old
(w, dwdt, z, dzdt, p, dpdt, s, dsdt, xi, dxidt, phi, dphidt, b, dbdt, aj, djdt, b_ic, dbdt_ic, aj_ic, djdt_ic, omega_ic, omega_ma, domega_ic_dt, domega_ma_dt, lorentz_torque_ic_dt, lorentz_torque_ma_dt, time, tscheme, n_time_step)¶ This subroutine is used to read the old restart files produced by MagIC. This is now deprecated with the change of the file format. This is still needed to read old files.
- Parameters
dwdt [type_tarray ,inout]
dzdt [type_tarray ,inout]
dpdt [type_tarray ,inout]
dsdt [type_tarray ,inout]
dxidt [type_tarray ,inout]
dphidt [type_tarray ,inout]
b (ulmmag-(llmmag)+1,n_r_maxmag) [complex ,out]
dbdt [type_tarray ,inout]
aj (ulmmag-(llmmag)+1,n_r_maxmag) [complex ,out]
djdt [type_tarray ,inout]
b_ic (ulmmag-(llmmag)+1,n_r_ic_maxmag) [complex ,out]
dbdt_ic [type_tarray ,inout]
aj_ic (ulmmag-(llmmag)+1,n_r_ic_maxmag) [complex ,out]
djdt_ic [type_tarray ,inout]
omega_ic [real ,out]
omega_ma [real ,out]
domega_ic_dt [type_tscalar ,inout]
domega_ma_dt [type_tscalar ,inout]
lorentz_torque_ic_dt [type_tscalar ,inout]
lorentz_torque_ma_dt [type_tscalar ,inout]
time [real ,out]
tscheme [real ]
n_time_step [integer ,out]
- Called from
- Call to
abortrun()
,getlm2lmo()
,mapdatahydro()
,scatter_from_rank0_to_lo()
,get_single_rhs_imp()
,get_pol_rhs_imp()
,get_entropy_rhs_imp()
,get_tor_rhs_imp()
,get_comp_rhs_imp()
,mapdatamag()
,get_mag_rhs_imp()
,get_mag_ic_rhs_imp()
,finish_start_fields()
-
subroutine
readcheckpoints/
readstartfields
(w, dwdt, z, dzdt, p, dpdt, s, dsdt, xi, dxidt, phi, dphidt, b, dbdt, aj, djdt, b_ic, dbdt_ic, aj_ic, djdt_ic, omega_ic, omega_ma, domega_ic_dt, domega_ma_dt, lorentz_torque_ic_dt, lorentz_torque_ma_dt, time, tscheme, n_time_step)¶ This subroutine is used to read the restart files produced by MagIC.
- Parameters
dwdt [type_tarray ,inout]
dzdt [type_tarray ,inout]
dpdt [type_tarray ,inout]
dsdt [type_tarray ,inout]
dxidt [type_tarray ,inout]
dphidt [type_tarray ,inout]
b (ulmmag-(llmmag)+1,n_r_maxmag) [complex ,out]
dbdt [type_tarray ,inout]
aj (ulmmag-(llmmag)+1,n_r_maxmag) [complex ,out]
djdt [type_tarray ,inout]
b_ic (ulmmag-(llmmag)+1,n_r_ic_maxmag) [complex ,out]
dbdt_ic [type_tarray ,inout]
aj_ic (ulmmag-(llmmag)+1,n_r_ic_maxmag) [complex ,out]
djdt_ic [type_tarray ,inout]
omega_ic [real ,out]
omega_ma [real ,out]
domega_ic_dt [type_tscalar ,inout]
domega_ma_dt [type_tscalar ,inout]
lorentz_torque_ic_dt [type_tscalar ,inout]
lorentz_torque_ma_dt [type_tscalar ,inout]
time [real ,out]
tscheme [real ]
n_time_step [integer ,out]
- Called from
- Call to
abortrun()
,print_info()
,getlm2lmo()
,read_map_one_scalar()
,read_map_one_field()
,maponefield()
,scatter_from_rank0_to_lo()
,finish_start_fields()
,get_single_rhs_imp()
,get_pol_rhs_imp()
,get_entropy_rhs_imp()
,get_tor_rhs_imp()
,get_comp_rhs_imp()
,get_mag_rhs_imp()
,get_mag_ic_rhs_imp()
-
subroutine
readcheckpoints/
read_map_one_scalar
(fh, tscheme, nexp_old, nimp_old, nold_old, tscheme_family_old, dscal_dt)¶ – Input variables
- Parameters
fh [integer ,in]
tscheme [real ]
nexp_old [integer ,in]
nimp_old [integer ,in]
nold_old [integer ,in]
tscheme_family_old [character(len=*),in]
dscal_dt [type_tscalar ,inout]
- Called from
-
subroutine
readcheckpoints/
read_map_one_field
(fh, tscheme, wold, work, scale_w, r_old, lm2lmo, n_r_max_old, n_r_maxl, dim1, nexp_old, nimp_old, nold_old, tscheme_family_old, w, dwdt, l_map, l_transp)¶ — Input variables
- Parameters
fh [integer ,in]
tscheme [real ]
wold (*,*) [complex ,inout]
work (*,*) [complex ,inout]
scale_w [real ,in]
r_old (*) [real ,in]
lm2lmo (lm_max) [integer ,in]
n_r_max_old [integer ,in]
n_r_maxl [integer ,in]
dim1 [integer ,in]
nexp_old [integer ,in]
nimp_old [integer ,in]
nold_old [integer ,in]
tscheme_family_old [character(len=*),in]
dwdt [type_tarray ,inout]
l_map [logical ,in]
l_transp [logical ,in] :: do we need to transpose to lm-loc
- Called from
- Call to
-
subroutine
readcheckpoints/
readstartfields_mpi
(w, dwdt, z, dzdt, p, dpdt, s, dsdt, xi, dxidt, phi, dphidt, b, dbdt, aj, djdt, b_ic, dbdt_ic, aj_ic, djdt_ic, omega_ic, omega_ma, domega_ic_dt, domega_ma_dt, lorentz_torque_ic_dt, lorentz_torque_ma_dt, time, tscheme, n_time_step)¶ This subroutine is used to read the restart files produced by MagIC using MPI-IO
- Parameters
dwdt [type_tarray ,inout]
dzdt [type_tarray ,inout]
dpdt [type_tarray ,inout]
dsdt [type_tarray ,inout]
dxidt [type_tarray ,inout]
dphidt [type_tarray ,inout]
b (ulmmag-(llmmag)+1,n_r_maxmag) [complex ,out]
dbdt [type_tarray ,inout]
aj (ulmmag-(llmmag)+1,n_r_maxmag) [complex ,out]
djdt [type_tarray ,inout]
b_ic (ulmmag-(llmmag)+1,n_r_ic_maxmag) [complex ,out]
dbdt_ic [type_tarray ,inout]
aj_ic (ulmmag-(llmmag)+1,n_r_ic_maxmag) [complex ,out]
djdt_ic [type_tarray ,inout]
omega_ic [real ,out]
omega_ma [real ,out]
domega_ic_dt [type_tscalar ,inout]
domega_ma_dt [type_tscalar ,inout]
lorentz_torque_ic_dt [type_tscalar ,inout]
lorentz_torque_ma_dt [type_tscalar ,inout]
time [real ,out]
tscheme [real ]
n_time_step [integer ,out]
- Called from
- Call to
mpiio_setup()
,abortrun()
,readstartfields()
,print_info()
,getlm2lmo()
,read_map_one_scalar_mpi()
,getblocks()
,read_map_one_field_mpi()
,maponefield()
,scatter_from_rank0_to_lo()
,get_single_rhs_imp()
,get_pol_rhs_imp()
,get_entropy_rhs_imp()
,get_tor_rhs_imp()
,get_comp_rhs_imp()
,get_mag_rhs_imp()
,get_mag_ic_rhs_imp()
,finish_start_fields()
-
subroutine
readcheckpoints/
read_map_one_scalar_mpi
(fh, tscheme, nexp_old, nimp_old, nold_old, tscheme_family_old, dscal_dt)¶ – Input variables
- Parameters
fh [integer ,in]
tscheme [real ]
nexp_old [integer ,in]
nimp_old [integer ,in]
nold_old [integer ,in]
tscheme_family_old [character(len=*),in]
dscal_dt [type_tscalar ,inout]
- Called from
-
subroutine
readcheckpoints/
read_map_one_field_mpi
(fh, info, datatype, tscheme, wold, lm_max_old, n_r_max_old, nrstart_old, nrstop_old, radial_balance_old, lm2lmo, r_old, n_r_maxl, dim1, scale_w, nexp_old, nimp_old, nold_old, tscheme_family_old, w, dwdt, disp, l_map, l_transp[, l_read_field_only])¶ — Input variables
- Parameters
fh [integer ,in]
info [integer ,in]
datatype [integer ,in]
tscheme [real ]
wold (lm_max_old,nrstop_old-nrstart_old+1) [complex ,in]
lm_max_old [integer ,in,]
n_r_max_old [integer ,in]
nrstart_old [integer ,in]
nrstop_old [integer ,in]
radial_balance_old (n_procs-1+1) [load ,in]
lm2lmo (lm_max) [integer ,in]
r_old (*) [real ,in]
n_r_maxl [integer ,in]
dim1 [integer ,in]
scale_w [real ,in]
nexp_old [integer ,in]
nimp_old [integer ,in]
nold_old [integer ,in]
tscheme_family_old [character(len=*),in]
dwdt [type_tarray ,inout]
disp [integer ,inout]
l_map [logical ,in]
l_transp [logical ,in] :: Do we need to transpose d?dt arrays?
- Options
l_read_field_only [logical ,in,]
- Called from
- Call to
-
subroutine
readcheckpoints/
getlm2lmo
(n_r_max, n_r_max_old, l_max, l_max_old, m_min, m_min_old, m_max, m_max_old, minc, minc_old, lm_max, lm_max_old, lm2lmo)¶ — Input variables
- Parameters
n_r_max [integer ,in]
n_r_max_old [integer ,in]
l_max [integer ,in]
l_max_old [integer ,in]
m_min [integer ,in]
m_min_old [integer ,in]
m_max [integer ,in]
m_max_old [integer ,inout]
minc [integer ,in]
minc_old [integer ,in]
lm_max [integer ,in]
lm_max_old [integer ,out]
lm2lmo (lm_max) [integer ,out] :: data found in startfile
- Called from
readstartfields_old()
,readstartfields()
,readstartfields_mpi()
-
subroutine
readcheckpoints/
maponefield_mpi
(wold, lm_max_old, n_r_max_old, nrstart_old, nrstop_old, radial_balance_old, lm2lmo, r_old, n_r_maxl, dim1, lbc1, l_ic, scale_w, w)¶ — Input variables
- Parameters
wold (lm_max_old,nrstop_old-nrstart_old+1) [complex ,in]
lm_max_old [integer ,in,]
n_r_max_old [integer ,in]
nrstart_old [integer ,in]
nrstop_old [integer ,in]
radial_balance_old (n_procs-1+1) [load ,in]
lm2lmo (lm_max) [integer ,in]
r_old (*) [real ,in]
n_r_maxl [integer ,in]
dim1 [integer ,in]
lbc1 [logical ,in]
l_ic [logical ,in]
scale_w [real ,in]
- Called from
- Call to
-
subroutine
readcheckpoints/
maponefield
(wo, scale_w, r_old, lm2lmo, n_r_max_old, n_r_maxl, dim1, lbc1, l_ic, w)¶ — Input variables
- Parameters
- Called from
readstartfields()
,read_map_one_field()
,readstartfields_mpi()
- Call to
-
subroutine
readcheckpoints/
mapdatahydro
(wo, zo, po, so, xio, r_old, lm2lmo, n_r_max_old, lm_max_old, n_r_maxl, lbc1, lbc2, lbc3, lbc4, lbc5, w, z, p, s, xi)¶ — Input variables
- Parameters
wo (lm_max_old,n_r_max_old) [complex ,in]
zo (lm_max_old,n_r_max_old) [complex ,in]
po (lm_max_old,n_r_max_old) [complex ,in]
so (lm_max_old,n_r_max_old) [complex ,in]
xio (lm_max_old,n_r_max_old) [complex ,in]
r_old (*) [real ,in]
lm2lmo (lm_max) [integer ,in]
n_r_max_old [integer ,in,]
lm_max_old [integer ,in,]
n_r_maxl [integer ,in]
lbc1 [logical ,in]
lbc2 [logical ,in]
lbc3 [logical ,in]
lbc4 [logical ,in]
lbc5 [logical ,in]
- Called from
- Call to
-
subroutine
readcheckpoints/
mapdatamag
(wo, zo, po, so, r_old, n_rad_tot, n_r_max_old, lm_max_old, n_r_maxl, lm2lmo, dim1, l_ic, w, z, p, s)¶ — Input variables
- Parameters
wo (lm_max_old,n_r_max_old) [complex ,in]
zo (lm_max_old,n_r_max_old) [complex ,in]
po (lm_max_old,n_r_max_old) [complex ,in]
so (lm_max_old,n_r_max_old) [complex ,in]
r_old (*) [real ,in]
n_rad_tot [integer ,in]
n_r_max_old [integer ,in,]
lm_max_old [integer ,in,]
n_r_maxl [integer ,in]
lm2lmo (lm_max) [integer ,in]
dim1 [integer ,in]
l_ic [logical ,in]
w (lm_maxmag,dim1) [complex ,out]
z (lm_maxmag,dim1) [complex ,out]
p (lm_maxmag,dim1) [complex ,out]
s (lm_maxmag,dim1) [complex ,out]
- Called from
- Call to
-
subroutine
readcheckpoints/
mapdatar
(datar, r_old, n_rad_tot, n_r_max_old, n_r_maxl, lbc, l_ic)¶ Copy (interpolate) data (read from disc file) from old grid structure to new grid. Linear interploation is used in r if the radial grid structure differs
called in mapdata
- Parameters
datar (*) [complex ,inout] :: old data
r_old (*) [real ,in]
n_rad_tot [integer ,in]
n_r_max_old [integer ,in]
n_r_maxl [integer ,in]
lbc [logical ,in]
l_ic [logical ,in]
- Called from
maponefield_mpi()
,maponefield()
,mapdatahydro()
,mapdatamag()
- Call to
-
subroutine
readcheckpoints/
finish_start_fields
(time, minc_old, l_mag_old, omega_ic1old, omega_ma1old, z, s, xi, b, omega_ic, omega_ma)¶ – Input variables
- Parameters
time [real ,in]
minc_old [integer ,in]
l_mag_old [logical ,in]
omega_ic1old [real ,in]
omega_ma1old [real ,in]
b (ulmmag-(llmmag)+1,n_r_maxmag) [complex ,inout]
omega_ic [real ,out]
omega_ma [real ,out]
- Called from
readstartfields_old()
,readstartfields()
,readstartfields_mpi()
-
subroutine
readcheckpoints/
print_info
(ra_old, ek_old, pr_old, sc_old, raxi_old, pm_old, radratio_old, sigma_ratio_old, n_phi_tot_old, nalias_old, l_max_old)¶ – Input variables
- Parameters
ra_old [real ,in]
ek_old [real ,in]
pr_old [real ,in]
sc_old [real ,in]
raxi_old [real ,in]
pm_old [real ,in]
radratio_old [real ,in]
sigma_ratio_old [real ,in]
n_phi_tot_old [integer ,in]
nalias_old [integer ,in]
l_max_old [integer ,in]
storeCheckPoints.f90
¶
Description
This module contains several subroutines that can be used to store the checkpoint_#.tag files
Quick access
- Routines
store()
,store_mpi()
,write_one_field()
,write_one_field_mpi()
Needed modules
iso_fortran_env
(output_unit()
)precision_mod
: This module controls the precision used in MagICparallel_mod
: This module contains the blocking informationcommunications
(gt_oc()
,gt_ic()
,gather_from_lo_to_rank0()
,gather_all_from_lo_to_rank0()
,lo2r_one()
): This module contains the different MPI communicators used in MagIC.truncation
(n_r_max()
,n_r_ic_max()
,minc()
,nalias()
,n_theta_max()
,n_phi_tot()
,lm_max()
,lm_maxmag()
,n_r_maxmag()
,m_max()
,n_r_ic_maxmag()
,l_max()
,fd_stretch()
,fd_ratio()
,m_min()
): This module defines the grid points and the truncationradial_functions
(rscheme_oc()
,r()
): This module initiates all the radial functions (transport properties, density, temperature, cheb transforms, etc.)physical_parameters
(ra()
,pr()
,prmag()
,radratio()
,ek()
,sigma_ratio()
,raxi()
,sc()
,stef()
): Module containing the physical parametersblocking
(llm()
,ulm()
,llmmag()
,ulmmag()
): Module containing blocking informationradial_data
(nrstart()
,nrstop()
,nrstartmag()
,nrstopmag()
): This module defines the MPI decomposition in the radial direction.num_param
(tscale()
,alph1()
,alph2()
): Module containing numerical and control parametersinit_fields
(inform()
,omega_ic1()
,omegaosz_ic1()
,tomega_ic1()
,omega_ic2()
,omegaosz_ic2()
,tomega_ic2()
,omega_ma1()
,omegaosz_ma1()
,tomega_ma1()
,omega_ma2()
,omegaosz_ma2()
,tomega_ma2()
): This module is used to construct the initial solution.logic
(l_heat()
,l_mag()
,l_cond_ic()
,l_chemical_conv()
,l_save_out()
,l_double_curl()
,l_parallel_solve()
,l_mag_par_solve()
,l_phase_field()
): Module containing the logicals that control the runoutput_data
(tag()
,log_file()
,n_log_file()
): This module contains the parameters for output controlcharmanip
(dble2str()
): This module contains several useful routines to manipule character stringstime_schemes
(type_tscheme()
): This module defines an abstract class type_tscheme which is employed for the time advance of the code.time_array
(type_tarray()
,type_tscalar()
): This module defines two types that are defined to store the implicit/explicit terms at the different sub-stage/step.
Variables
Subroutines and functions
-
subroutine
storecheckpoints/
store
(time, tscheme, n_time_step, l_stop_time, l_new_rst_file, l_ave_file, w, z, p, s, xi, phi, b, aj, b_ic, aj_ic, dwdt, dzdt, dpdt, dsdt, dxidt, dphidt, dbdt, djdt, dbdt_ic, djdt_ic, domega_ma_dt, domega_ic_dt, lorentz_torque_ma_dt, lorentz_torque_ic_dt)¶ This subroutine stores the results in a checkpoint file. In addition to the magnetic field and velocity potentials we also store the time derivative terms djdt(lm,nR),dbdt(lm,nR), … to allow to restart with 2nd order Adams-Bashforth scheme. To minimize the memory imprint, a gather/write strategy has been adopted here. This implies that only one global array dimension(lm_max,n_r_max) is required.
- Parameters
time [real ,in]
tscheme [real ]
n_time_step [integer ,in]
l_stop_time [logical ,in]
l_new_rst_file [logical ,in]
l_ave_file [logical ,in]
b (ulmmag-(llmmag)+1,n_r_maxmag) [complex ,in]
aj (ulmmag-(llmmag)+1,n_r_maxmag) [complex ,in]
b_ic (ulmmag-(llmmag)+1,n_r_ic_maxmag) [complex ,in]
aj_ic (ulmmag-(llmmag)+1,n_r_ic_maxmag) [complex ,in]
dwdt [type_tarray ,in]
dzdt [type_tarray ,in]
dpdt [type_tarray ,in]
dsdt [type_tarray ,in]
dxidt [type_tarray ,in]
dphidt [type_tarray ,in]
dbdt [type_tarray ,in]
djdt [type_tarray ,in]
dbdt_ic [type_tarray ,in]
djdt_ic [type_tarray ,in]
domega_ma_dt [type_tscalar ,in]
domega_ic_dt [type_tscalar ,in]
lorentz_torque_ma_dt [type_tscalar ,in]
lorentz_torque_ic_dt [type_tscalar ,in]
- Call to
dble2str()
,write_one_field()
,gather_all_from_lo_to_rank0()
-
subroutine
storecheckpoints/
write_one_field
(fh, tscheme, w, dwdt, work)¶ - Parameters
- Called from
- Call to
-
subroutine
storecheckpoints/
store_mpi
(time, tscheme, n_time_step, l_stop_time, l_new_rst_file, l_ave_file, w, z, p, s, xi, phi, b, aj, b_ic, aj_ic, dwdt, dzdt, dpdt, dsdt, dxidt, dphidt, dbdt, djdt, dbdt_ic, djdt_ic, domega_ma_dt, domega_ic_dt, lorentz_torque_ma_dt, lorentz_torque_ic_dt)¶ This subroutine stores the results in a checkpoint file. In addition to the magnetic field and velocity potentials we also store the time derivative terms djdt(lm,nR),dbdt(lm,nR), … to allow to restart with 2nd order Adams-Bashforth scheme. To minimize the memory imprint, a gather/write strategy has been adopted here. This implies that only one global array dimension(lm_max,n_r_max) is required.
- Parameters
time [real ,in]
tscheme [real ]
n_time_step [integer ,in]
l_stop_time [logical ,in]
l_new_rst_file [logical ,in]
l_ave_file [logical ,in]
b (lm_maxmag,nrstopmag-(nrstartmag)+1) [complex ,in]
aj (lm_maxmag,nrstopmag-(nrstartmag)+1) [complex ,in]
b_ic (ulmmag-(llmmag)+1,n_r_ic_maxmag) [complex ,in]
aj_ic (ulmmag-(llmmag)+1,n_r_ic_maxmag) [complex ,in]
dwdt [type_tarray ,in]
dzdt [type_tarray ,in]
dpdt [type_tarray ,in]
dsdt [type_tarray ,in]
dxidt [type_tarray ,in]
dphidt [type_tarray ,in]
dbdt [type_tarray ,in]
djdt [type_tarray ,in]
dbdt_ic [type_tarray ,in]
djdt_ic [type_tarray ,in]
domega_ma_dt [type_tscalar ,in]
domega_ic_dt [type_tscalar ,in]
lorentz_torque_ma_dt [type_tscalar ,in]
lorentz_torque_ic_dt [type_tscalar ,in]
- Called from
- Call to
dble2str()
,mpiio_setup()
,write_one_field_mpi()
,gather_from_lo_to_rank0()
-
subroutine
storecheckpoints/
write_one_field_mpi
(fh, info, datatype, tscheme, w, dwdt, work, size_tmp, disp, l_transp)¶ This subroutine is used to write one field and its associated possible help arrays (d?dt) which are required to time advance the solution. This is using MPI-IO with R-distributed arrays.
- Parameters
fh [integer ,in] :: file unit
info [integer ,in] :: MPI file info
datatype [integer ,in] :: MPI file info
tscheme [real ]
dwdt [type_tarray ,in] :: time advance arrays
size_tmp [integer ,in]
disp [integer ,inout]
l_transp [logical ,in] :: Do we need to transpose anything?
- Called from