diagnostics
Module
Description
$Id$
** AUTOMATIC CPARAM.INC GENERATION ************************
Declare (for generation of cparam.inc) the number of f array variables and auxiliary variables added by this module
Quick access
- Variables:
allocate_cnames,allocate_phiaverages_names,allocate_phizaverages_names,allocate_sound_data,allocate_xyaverages_names,allocate_xzaverages_names,allocate_yaverages_names,allocate_yzaverages_names,ch1davg,ch2davg,clean_line,da_xy_rel1,da_xz_rel1,da_yz_rel1,dl_y_rel1,dt_save,dvol_rel1,eps_rkf_save,expand_cname,expand_cname_full,expand_cname_short,fnamexy_cap,init_xaver,it_save,ixav_max,lcalculating_phiavg_norm,max_name,max_name_int,max_name_real,maxranks,mnamer,p_phiavg_norm,parse_name,parse_name_s,parse_name_sa,parse_name_v,phiaverages_clean_up,phiavg_norm,phiavg_profile,phizaverages_clean_up,report_undefined,sound_clean_up,sum_mn_name,sum_mn_name_arr2,sum_mn_name_real,sum_mn_name_std,sum_name,sum_name_int,sum_name_real,write_sound_append,xyaverages_clean_up,xzaverages_clean_up,xzsum_mn_name_y_mpar,yaverages_clean_up,yzaverages_clean_up,zaverages_clean_up,zsum_mn_name_xy,zsum_mn_name_xy_mpar,zsum_mn_name_xy_mpar_vec,zsum_mn_name_xy_scal,zsum_mn_name_xy_vec- Routines:
allocate_diagnostic_arrays(),allocate_diagnostic_names(),allocate_fnames(),allocate_phiaverages(),allocate_phizaverages(),allocate_sound(),allocate_vnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yaverages(),allocate_yzaverages(),allocate_zaverages(),allocate_zaverages_data(),calc_nnames(),calc_phiavg_profile(),diagnostic(),diagnostics_clean_up(),diagnostics_diag_reductions(),diagnostics_init_reduc_pointers(),fnames_clean_up(),fparse_name(),gen_form_legend(),get_average_density(),get_from_fname(),initialize_diagnostic_arrays(),initialize_diagnostics(),initialize_time_integrals(),integrate_mn(),integrate_mn_name(),max_mn_name(),name_is_present(),phiaverages_rz(),phisum_mn_name_rz(),phizaverages_r(),phizsum_mn_name_r(),prep_finalize_thread_diagnos(),prints(),report_undefined_diagnostics(),restore_diagnostic_controls(),save_diagnostic_controls(),save_name(),save_name_halfz(),save_name_sound(),set_type(),sign_masked_xyaver(),sum_lim_mn_name(),sum_mn_name_halfy(),sum_mn_name_halfz(),sum_weighted_name(),surf_mn_name(),trim_averages(),vnames_clean_up(),write_1daverages(),write_1daverages_prepare(),write_2daverages(),write_2daverages_prepare(),write_sound(),xyaverages_z(),xyintegrate_mn_name_z(),xymax_mn_name_z(),xysum_mn_name_z(),xysum_mn_name_z_npar(),xzaverages_y(),xzintegrate_mn_name_y(),xzsum_mn_name_y(),yaverages_xz(),yintegrate_mn_name_xz(),ysum_mn_name_xz(),ysum_mn_name_xz_npar(),yzaverages_x(),yzintegrate_mn_name_x(),yzsum_mn_name_x(),yzsum_mn_name_x_mpar(),zaverages_xy(),zsum_mn_name_xy_arr(),zsum_mn_name_xy_arr2(),zsum_mn_name_xy_mpar_scal()
Needed modules
Variables
- diagnostics/allocate_cnames [private]
- diagnostics/allocate_phiaverages_names [private]
- diagnostics/allocate_phizaverages_names [private]
- diagnostics/allocate_sound_data [private]
- diagnostics/allocate_xyaverages_names [private]
- diagnostics/allocate_xzaverages_names [private]
- diagnostics/allocate_yaverages_names [private]
- diagnostics/allocate_yzaverages_names [private]
- diagnostics/ch1davg [character,private]
- diagnostics/ch2davg [character,private]
- diagnostics/clean_line [private]
- diagnostics/da_xy_rel1 [real,private]
- diagnostics/da_xz_rel1 [real,private]
- diagnostics/da_yz_rel1 [real,private]
- diagnostics/dl_y_rel1 [real,private]
- diagnostics/dt_save [real,private]
- diagnostics/dvol_rel1 [real,private]
- diagnostics/eps_rkf_save [real,private]
- diagnostics/expand_cname [public]
- diagnostics/expand_cname_full [private]
- diagnostics/expand_cname_short [private]
- diagnostics/fnamexy_cap (*,*,*) [real,private/allocatable]
- diagnostics/init_xaver [private]
- diagnostics/it_save [integer,private]
- diagnostics/ixav_max [integer,private]
- diagnostics/lcalculating_phiavg_norm [logical,private/optional/default=.false.]
- diagnostics/max_name [public]
- diagnostics/max_name_int [private]
- diagnostics/max_name_real [private]
- diagnostics/maxranks (*) [integer,private/allocatable]
- diagnostics/p_phiavg_norm (*) [real,private/pointer]
- diagnostics/parse_name [public]
- diagnostics/parse_name_s [private]
- diagnostics/parse_name_sa [private]
- diagnostics/parse_name_v [private]
- diagnostics/phiaverages_clean_up [private]
- diagnostics/phiavg_profile (*,*) [real,private/allocatable]
- diagnostics/phizaverages_clean_up [private]
- diagnostics/report_undefined [private]
- diagnostics/sound_clean_up [private]
- diagnostics/sum_mn_name [public]
- diagnostics/sum_mn_name_arr2 [private]
- diagnostics/sum_mn_name_real [private]
- diagnostics/sum_mn_name_std [private]
- diagnostics/sum_name [public]
- diagnostics/sum_name_int [private]
- diagnostics/sum_name_real [private]
- diagnostics/write_sound_append [private]
- diagnostics/xyaverages_clean_up [private]
- diagnostics/xzaverages_clean_up [private]
- diagnostics/xzsum_mn_name_y_mpar [private]
- diagnostics/yaverages_clean_up [private]
- diagnostics/yzaverages_clean_up [private]
- diagnostics/zaverages_clean_up [private]
- diagnostics/zsum_mn_name_xy [public]
- diagnostics/zsum_mn_name_xy_mpar [public]
- diagnostics/zsum_mn_name_xy_mpar_vec [private]
- diagnostics/zsum_mn_name_xy_scal [private]
- diagnostics/zsum_mn_name_xy_vec [private]
Subroutines and functions
- subroutine diagnostics/initialize_diagnostics()
Setup variables needed for output of diagnostic quantities and averages.
14-aug-03/axel: added dxy, dyz, and dxz 26-aug-13/MR: removed switch first; moved calculation of dVol_rel1 from diagnostic 31-mar-15/MR: added switch for proper volume averaging 22-feb-2024/Kishore: added dA_{xy,yz,xz}_rel1, required for 1D averages in curvilinear coordinates.
- Call to:
warning(),fatal_error(),save_name(),gen_form_legend(),output_timeseries(),system_cmd(),noform(),len_fmtd_expr(),fetch_to_process_masked(),reduce_zsum(),mpiwtime(),read_snaptime(),update_snaptime(),output_average_2d(),trim_average(),fparse_name(),name_is_present(),in_overlap_mask(),integrate_mn(),not_implemented(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/initialize_diagnostic_arrays()
Not needed so far.
- Call to:
save_name(),gen_form_legend(),output_timeseries(),system_cmd(),noform(),len_fmtd_expr(),fetch_to_process_masked(),fatal_error(),reduce_zsum(),mpiwtime(),read_snaptime(),update_snaptime(),output_average_2d(),trim_average(),fparse_name(),name_is_present(),in_overlap_mask(),integrate_mn(),not_implemented(),warning(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/prints()
Reads and registers print parameters gathered from the different modules and marked in `print.in’.
3-may-02/axel: coded
20-aug-13/MR: changes for accumulating and complex diagnostics 26-aug-13/MR: corrected insertion of imaginary values 12-jan-17/MR: undefined diagnostics suppressed in output
- Use :
general(safe_character_append(),compress(),expand_1dindex(),find_proc_coords()),cparam(max_col_width()),io(io_strategy()),hdf5_io(output_timeseries()),sub(insert()),syscalls(system_cmd())- Call to:
save_name(),gen_form_legend(),output_timeseries(),system_cmd(),noform(),len_fmtd_expr(),fetch_to_process_masked(),fatal_error(),reduce_zsum(),mpiwtime(),read_snaptime(),update_snaptime(),output_average_2d(),trim_average(),fparse_name(),name_is_present(),in_overlap_mask(),integrate_mn(),not_implemented(),warning(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/report_undefined_diagnostics()
- Call to:
noform(),len_fmtd_expr(),fetch_to_process_masked(),fatal_error(),reduce_zsum(),mpiwtime(),read_snaptime(),update_snaptime(),output_average_2d(),trim_average(),fparse_name(),name_is_present(),in_overlap_mask(),integrate_mn(),not_implemented(),warning(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/gen_form_legend(fform[, legend])
19-aug-13/MR: outsourced from prints 10-jan-17/MR: added adjustment of fixed point format to output value 12-jan-17/MR: undefined diagnostics suppressed in format
- Parameters:
fform [character,out]
legend [character,out,]
- Use :
general(safe_character_append(),itoa()),sub(noform(),len_fmtd_expr())- Call to:
noform(),len_fmtd_expr(),fetch_to_process_masked(),fatal_error(),reduce_zsum(),mpiwtime(),read_snaptime(),update_snaptime(),output_average_2d(),trim_average(),fparse_name(),name_is_present(),in_overlap_mask(),integrate_mn(),not_implemented(),warning(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/write_sound(tout)
Reads and registers “sound” parameters gathered from the different modules and marked in `sound.in’.
3-dec-10/dhruba+joern: coded
10-jan-11/MR: modified
- Parameters:
tout [real,in]
- Use :
general(itoa(),safe_character_append(),safe_character_prepend(),compress()),sub(noform())- Call to:
noform(),fetch_to_process_masked(),fatal_error(),reduce_zsum(),mpiwtime(),read_snaptime(),update_snaptime(),output_average_2d(),trim_average(),fparse_name(),name_is_present(),in_overlap_mask(),integrate_mn(),not_implemented(),warning(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/get_average_density(mass_per_proc, average_density)
Calculation of average density.
1-dec-09/dhruba+piyali: adapted from diagnostic 3-may-12/axel+MR: to divide by box_volume, not nw
- Parameters:
mass_per_proc [real,in]
average_density [real,out]
- Call to:
fetch_to_process_masked(),fatal_error(),reduce_zsum(),mpiwtime(),read_snaptime(),update_snaptime(),output_average_2d(),trim_average(),fparse_name(),name_is_present(),in_overlap_mask(),integrate_mn(),not_implemented(),warning(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/diagnostic(vname, nlname[, lcomplex])
Finalize calculation of diagnostic quantities (0-D).
2-sep-01/axel: coded
14-aug-03/axel: began adding surface integrals 26-aug-13/MR: moved calculation of dVol_rel1 to initialize_diagnostics
added optional parameter lcomplex for use with imaginary part
- Parameters:
vname (nlname) [real,inout]
nlname [integer,in,]
lcomplex [logical,in,]
- Use :
- Call to:
fetch_to_process_masked(),fatal_error(),reduce_zsum(),mpiwtime(),read_snaptime(),update_snaptime(),output_average_2d(),trim_average(),fparse_name(),name_is_present(),in_overlap_mask(),integrate_mn(),not_implemented(),warning(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/initialize_time_integrals(f)
Initialize time_integrals for full chunks.
28-jun-07/axel+mreinhard: coded 29-oct-20/hongzhe: added iuxst, iuyst, iuzst
- Parameters:
- Call to:
fatal_error(),reduce_zsum(),mpiwtime(),read_snaptime(),update_snaptime(),output_average_2d(),trim_average(),fparse_name(),name_is_present(),in_overlap_mask(),integrate_mn(),not_implemented(),warning(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/xyaverages_z(fnamez, ncountsz)
Calculate xy-averages (still depending on z) NOTE: these averages depend on z, so after summation in x and y they are still distributed over nprocz CPUs; hence the dimensions of fsumz (and fnamez). In other words: the whole xy-average is present in one and the same fsumz, but the result is not complete on any of the processors before mpireduce_sum has been called. This is simpler than collecting results first in processors with the same ipz and different ipy, and then assemble result from the subset of ipz processors which have ipy=0 back on the root processor.
MR: but wastes storage in fnamez
6-jun-02/axel: coded 27-mar-2025/Kishore: handling of itype_name_z
- Parameters:
fnamez (,,*) [real]
ncountsz (,) [integer]
- Use :
- Call to:
fatal_error(),reduce_zsum(),mpiwtime(),read_snaptime(),update_snaptime(),output_average_2d(),trim_average(),fparse_name(),name_is_present(),in_overlap_mask(),integrate_mn(),not_implemented(),warning(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/xzaverages_y(fnamey)
Calculate xz-averages (still depending on y).
12-oct-05/anders: adapted from xyaverages_z
- Parameters:
fnamey (,,*) [real]
- Call to:
reduce_zsum(),mpiwtime(),read_snaptime(),update_snaptime(),output_average_2d(),trim_average(),fparse_name(),fatal_error(),name_is_present(),in_overlap_mask(),integrate_mn(),not_implemented(),warning(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/yzaverages_x(fnamex)
Calculate yz-averages (still depending on x).
2-oct-05/anders: adapted from xyaverages_z
- Parameters:
fnamex (,,*) [real]
- Call to:
reduce_zsum(),mpiwtime(),read_snaptime(),update_snaptime(),output_average_2d(),trim_average(),fparse_name(),fatal_error(),name_is_present(),in_overlap_mask(),integrate_mn(),not_implemented(),warning(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/phizaverages_r(fnamer)
Calculate phiz-averages (still depending on r).
29-jan-07/wlad: adapted from yzaverages_x and phiaverages_rz
- Parameters:
fnamer (,) [real]
- Call to:
reduce_zsum(),mpiwtime(),read_snaptime(),update_snaptime(),output_average_2d(),trim_average(),fparse_name(),fatal_error(),name_is_present(),in_overlap_mask(),integrate_mn(),not_implemented(),warning(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/yaverages_xz(fnamexz)
Calculate y-averages (still depending on x and z).
7-jun-05/axel: adapted from zaverages_xy
- Parameters:
fnamexz (,,*) [real]
- Call to:
reduce_zsum(),mpiwtime(),read_snaptime(),update_snaptime(),output_average_2d(),trim_average(),fparse_name(),fatal_error(),name_is_present(),in_overlap_mask(),integrate_mn(),not_implemented(),warning(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/zaverages_xy(fnamexy)
Calculate z-averages (still depending on x and y).
19-jun-02/axel: coded 25-mar-16/MR: extensions for Yin-Yang grid
- Parameters:
fnamexy (,,*) [real]
- Use :
- Call to:
reduce_zsum(),mpiwtime(),read_snaptime(),update_snaptime(),output_average_2d(),trim_average(),fparse_name(),fatal_error(),name_is_present(),in_overlap_mask(),integrate_mn(),not_implemented(),warning(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/phiaverages_rz(fnamerz)
Calculate azimuthal averages (as functions of r_cyl,z). NOTE: these averages depend on (r and) z, so after summation they are still distributed over nprocz CPUs; hence the dimensions of fsumrz and fnamerz.
9-dec-02/wolf: coded
- Parameters:
fnamerz (,,*,*) [real]
- Call to:
mpiwtime(),read_snaptime(),update_snaptime(),output_average_2d(),trim_average(),fparse_name(),fatal_error(),name_is_present(),in_overlap_mask(),integrate_mn(),not_implemented(),warning(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/write_1daverages()
Write 1d averages (z-averages, .., i.e. quantities that are only 1d after averaging). These are written every it1d (default it1) timesteps and appended to their individual files.
7-aug-03/wolf: coded
24-Nov-2018/PABourdin: redesigned 09-nov-2022/ccyang: reorganized 27-mar-2025/Kishore: handle ilabel_max_dt
- Use :
- Call to:
mpiwtime(),read_snaptime(),update_snaptime(),output_average_2d(),trim_average(),fparse_name(),fatal_error(),name_is_present(),in_overlap_mask(),integrate_mn(),not_implemented(),warning(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/write_1daverages_prepare(lwrite)
Prepare l1davg for writing 2D averages. This needs to be done in the beginning of each time step, so the various routines know that they need to calculate averages.
28-jul-20/joern+axel: adapted from write_2daverages_prepare
- Parameters:
lwrite [logical,in]
- Use :
- Called from:
- Call to:
read_snaptime(),update_snaptime(),mpiwtime(),output_average_2d(),trim_average(),fparse_name(),fatal_error(),name_is_present(),in_overlap_mask(),integrate_mn(),not_implemented(),warning(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/write_2daverages_prepare(lwrite)
Prepare l2davg for writing 2D averages. This needs to be done in the beginning of each time step, so the various routines know that they need to calculate averages.
23-nov-03/axel: adapted from write_2daverages and wvid_prepare
- Parameters:
lwrite [logical,in]
- Use :
- Call to:
read_snaptime(),update_snaptime(),mpiwtime(),output_average_2d(),trim_average(),fparse_name(),fatal_error(),name_is_present(),in_overlap_mask(),integrate_mn(),not_implemented(),warning(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/write_2daverages()
Write 2d averages (z-averages, phi-averages, .., i.e. quantities that are still 2d after averaging) if it is time. In analogy to 3d output to VARN, the time interval between two writes is determined by a parameter (t2davg) in run.in.
7-aug-03/wolf: adapted from wsnap
24-Nov-2018/PABourdin: redesigned 09-nov-2022/ccyang: reorganized
- Use :
hdf5_io(output_average()),io(output_average_2d()),mpicomm(mpiwtime())- Call to:
mpiwtime(),output_average_2d(),trim_average(),fparse_name(),fatal_error(),name_is_present(),in_overlap_mask(),integrate_mn(),not_implemented(),warning(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/trim_averages()
Trim averages for times past the current time.
25-apr-16/ccyang: coded 23-Nov-2018/PABourdin: redesigned
- Use :
- Call to:
trim_average(),fparse_name(),fatal_error(),name_is_present(),in_overlap_mask(),integrate_mn(),not_implemented(),warning(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- function diagnostics/fparse_name(iname, cname, ctest, itest, cform[, ncomp])
Parse name and format of scalar print variable On output, ITEST is set to INAME if CNAME matches CTEST and CFORM is set to the format given as default. E.g. if CTEST=’bmax’ *i.e. we are testing input line CNAME for ‘bmax’, CNAME=’bmax’ will be parsed to ITEST=INAME, CFORM=’(1pe10.2)’, CNAME=’bmax(G5.1)’ to ITEST=INAME, CFORM=’G5.1’, CNAME=’brms’ to ITEST=<unchanged, normally 0>, CFORM=’(1pe10.2)’
- return value is iname if ctest matches
- -1
- if so and itest/=0 at call (indicates multiple
occurrence of the same diagnostic in print.in)
0 if ctest does not match
4-may-02/axel: coded 6-apr-04/wolf: more liberate format reading
- 26-feb-13/MRprepared for ignoring multiple occurrences of
diagnostics in print.in
26-aug-13/MR : removed unneeded 0p setting in format, added handling of D formats 27-aug-13/MR : reinstated 0p 10-jan-17/MR : added correction of floating-point formats if not sufficient to hold sign
- Parameters:
iname [integer,in]
cname [character,inout]
ctest [character,in]
itest [integer,inout]
cform [character,out]
ncomp [integer,in,]
- Return:
fparse_name [integer]
- Use :
general(safe_character_assign(),itoa(),keep_compiler_quiet())- Call to:
fparse_name(),fatal_error(),name_is_present(),in_overlap_mask(),integrate_mn(),not_implemented(),warning(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/set_type(iname[, lsqrt[, llog10[, lint[, lsum[, lmax[, lmin[, lsurf[, ldt]]]]]]]])
Sets the diagnostic type in itype_name.
21-sep-17/MR: coded
- Parameters:
iname [integer]
lsqrt [logical]
llog10 [logical]
lint [logical]
lsum [logical]
lmax [logical]
lmin [logical]
lsurf [logical]
ldt [logical]
- Call to:
in_overlap_mask(),integrate_mn(),not_implemented(),warning(),fatal_error(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/save_name(a, iname[, l_dt])
Sets the value of a (must be treated as real) in fname array
26-may-02/axel: adapted from max_mn_name 20-sep-17/MR: removed setting of itype_name as it is set to “save” by default.
- Parameters:
a [real]
iname [integer]
l_dt [logical]
- Call to:
in_overlap_mask(),integrate_mn(),not_implemented(),warning(),fatal_error(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/save_name_sound(a, iname, iscoord)
Lists the value of a (must be treated as real) in fname array
3-Dec-10/dhruba+joern: adapted from max_mn_name
25-aug-13/MR: removed unneeded setting of itype, added test of iname.
- Parameters:
a [real]
iname [integer]
iscoord [integer]
- Call to:
in_overlap_mask(),integrate_mn(),not_implemented(),warning(),fatal_error(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/save_name_halfz(a, iname)
Lists the value of a (must be treated as real) in fname array
16-may-09/axel: adapted from save_name
- Parameters:
a (2) [real]
iname [integer]
- Call to:
in_overlap_mask(),integrate_mn(),not_implemented(),warning(),fatal_error(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/max_mn_name(a, iname[, lsqrt[, l_dt[, lneg[, lreciprocal[, mask[, iname_loc]]]]]])
Successively calculate maximum of a, which is supplied at each call. Start from zero if lfirstpoint=.true. Optional mask is conveyed to maxval/maxloc. Optional iname_loc>0 indicates that additionally the location of the maximum is requested.
1-apr-01/axel+wolf: coded 4-may-02/axel: adapted for fname array
23-jun-02/axel: allows for taking square root in the end 29-jun-12/MR: incorporated test for iname/=0 29-apr-26/MR: added optional parameter iname_loc
- Parameters:
- Use :
general(ioptest(),posindex_to_1dindex(),expand_1dindex())- Call to:
in_overlap_mask(),integrate_mn(),not_implemented(),warning(),fatal_error(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/sum_mn_name_halfy(a, iname)
To calculate averages over half the size of box, useful for simulations which includes equator (either cartesian or spherical).
??-???-??/dhruba: aped from sum_mn_name
- Parameters:
a (nx) [real]
iname [integer]
- Call to:
warning(),integrate_mn(),fatal_error(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/sum_mn_name_halfz(a, iname)
To calculate averages over half the size of box (this time divided along the z direction), useful for simulations which includes equator (either cartesian or spherical).
7-may-09/dhruba: aped from sum_mn_name_halfy
- Parameters:
a (nx) [real]
iname [integer]
- Call to:
warning(),integrate_mn(),fatal_error(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/sum_weighted_name(a, weight, iname[, lsqrt])
Succesively calculate the weighted sum of a. The result is divided by the total weight in the diagnostics subroutine.
17-apr-06/anders: coded
- Parameters:
a (*) [real]
weight (*) [real]
iname [integer]
lsqrt [logical]
- Call to:
warning(),integrate_mn(),fatal_error(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/sum_lim_mn_name(a, iname, p)
Successively calculate integral of a, which is supplied at each call. Just takes values between r_int < r < r_ext The purpose is to compute quantities just inside a cylinder or sphere
2-nov-05/wlad: adapted from sum_mn_name
- Parameters:
a (nx) [real]
iname [integer]
p [pencil_case]
- Call to:
warning(),integrate_mn(),fatal_error(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/surf_mn_name(a, iname, ncontrib[, lcontrib])
Successively calculate surface integral. This routine assumes that “a” contains the partial result for each pencil, so here we just need to add up the contributions from all processors. Start from zero if lfirstpoint=.true. lcontrib: logical that denotes whether the current processor should contribute
14-aug-03/axel: adapted from sum_mn_name 15-feb-13/MR: test of iname incorporated 26-Feb-2026/Kishore: added lcontrib
- Parameters:
a [real,in]
iname [integer,in]
ncontrib [integer,in]
lcontrib [logical,in,]
- Call to:
integrate_mn(),fatal_error(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/integrate_mn(a, inta)
Successively calculate sum of a, which is supplied at each call. Start from zero if lfirstpoint=.true. ultimately multiply by dv to get the integral. This differs from sum_mn_name by the setting of ilabel_integrate and hence in the behaviour in the final step.
Note, for regular integration (uniform meshes) it is better to use the usual sum_mn_name routine with lint=.true.
1-dec-09/dhruba+piyali:
- Parameters:
a (nx) [real,in]
inta [real,inout]
- Call to:
integrate_mn(),fatal_error(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/integrate_mn_name(a, iname)
Successively calculate sum of a, which is supplied at each call. Start from zero if lfirstpoint=.true. ultimately multiply by dv to get the integral. This differs from sum_mn_name by the setting of ilabel_integrate and hence in the behaviour in the final step.
Note, for regular integration (uniform meshes) it is better to use the usual sum_mn_name routine with lint=.true.
30-may-03/tony: adapted from sum_mn_name 13-nov-06/tony: modified to handle stretched mesh 31-mar-15/MR: use integrate_mn to avoid doubled code
- Parameters:
a (nx) [real]
iname [integer]
- Call to:
integrate_mn(),fatal_error(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/xysum_mn_name_z(a, iname[, mask])
3-sep-13/MR: derived from xysum_mn_name_z 27-mar-2025/Kishore: added ilabel_sum
- Parameters:
- Use :
- Call to:
fatal_error(),xyintegrate_mn_name_z(),xysum_mn_name_z_npar(),xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/xysum_mn_name_z_npar(a, n, iname[, mask])
Successively calculate sum over x,y of a, which is supplied at each call. The result fnamez is z-dependent. Start from zero if lfirstpoint=.true.
5-jun-02/axel: adapted from sum_mn_name 3-sep-13/MR: derived from xysum_mn_name_z, index n now parameter
- Parameters:
- Call to:
xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),fatal_error(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/xymax_mn_name_z(a, iname[, l_dt])
Successively calculate maximum over x,y of a, which is supplied at each call. The result fnamez is z-dependent.
27-mar-2025/Kishore: coded
- Parameters:
a (nx) [real,in]
iname [integer,in]
l_dt [logical,in,]
- Use :
- Called from:
pde(),write_diagnostics(),calc_all_module_diagnostic_auxiliaries(),perform_diagnostics(),finalize_diagnostics()- Call to:
xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),fatal_error(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/xzsum_mn_name_y(a, iname)
3-sep-13/MR: derived from xzsum_mn_name_y
- Parameters:
a (nx) [real,in]
iname [integer,in]
- Use :
- Call to:
xzintegrate_mn_name_y(),yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),fatal_error(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/yzsum_mn_name_x(a, iname)
3-sep-13/MR: derived from yzsum_mn_name_x
- Parameters:
a (nx) [real,in]
iname [integer,in]
- Use :
- Call to:
yzintegrate_mn_name_x(),yzsum_mn_name_x_mpar(),yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),fatal_error(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/yzsum_mn_name_x_mpar(a, m, iname)
Successively calculate sum over y,z of a, which is supplied at each call. The result fnamex is x-dependent. Start from zero if lfirstpoint=.true.
2-oct-05/anders: adapted from xysum_mn_name_z 3-sep-13/MR: derived from yzsum_mn_name_x, m now parameter 22-feb-2024/Kishore: fix for non-Cartesian coordinates
- Parameters:
a (nx) [real,in]
m [integer,in]
iname [integer,in]
- Call to:
yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),fatal_error(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/xyintegrate_mn_name_z(a, iname)
Integrate over x and y. Apply trapezoidal rule properly in the case of non-periodic boundaries.
18-jun-07/tobi: adapted from xysum_mn_name_z
- Parameters:
a (nx) [real]
iname [integer]
- Call to:
yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),fatal_error(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/xzintegrate_mn_name_y(a, iname)
Integrate over x and z. Apply trapezoidal rule properly in the case of non-periodic boundaries.
18-jun-07/tobi: adapted from xzsum_mn_name_y
- Parameters:
a (nx) [real]
iname [integer]
- Call to:
yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),fatal_error(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/yzintegrate_mn_name_x(a, iname)
Integrate over y and z. Apply trapezoidal rule properly in the case of non-periodic boundaries.
18-jun-07/tobi: adapted from yzsum_mn_name_x
- Parameters:
a (nx) [real]
iname [integer]
- Call to:
yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),fatal_error(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/phizsum_mn_name_r(a, iname)
Successively calculate sum over phi,z of a, which is supplied at each call. Start from zero if lfirstpoint=.true.
29-jan-07/wlad: adapted from yzsum_mn_name_x and phisum_mn_name
- Parameters:
a (nx) [real]
iname [integer]
- Call to:
yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),fatal_error(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/ysum_mn_name_xz(a, iname)
3-sep-13/MR: derived from ysum_mn_name_xz
- Parameters:
a (nx) [real,in]
iname [integer,in]
- Use :
- Call to:
yintegrate_mn_name_xz(),ysum_mn_name_xz_npar(),zsum_yy(),get_from_fname(),fatal_error(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/ysum_mn_name_xz_npar(a, n, iname)
Successively calculate sum over y of a, which is supplied at each call. The result fnamexz is xz-dependent. Start from zero if lfirstpoint=.true.
7-jun-05/axel: adapted from zsum_mn_name_xy 3-sep-13/MR: derived from ysum_mn_name_xz, n now parameter 22-feb-2024/Kishore: fix for non-Cartesian coordinates
- Parameters:
a (nx) [real,in]
n [integer,in]
iname [integer,in]
- Call to:
zsum_yy(),get_from_fname(),fatal_error(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/yintegrate_mn_name_xz(a, iname)
Integrate over y. Apply trapezoidal rule properly in the case of non-periodic boundaries.
19-nov-2024/Kishore: adapted from xyintegrate_mn_name_z
- Parameters:
a (nx) [real]
iname [integer]
- Called from:
initialize_diagnostic_arrays(),write_1daverages_prepare(),xymax_mn_name_z()- Call to:
zsum_yy(),get_from_fname(),fatal_error(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/zsum_mn_name_xy_arr2(arr, iname)
Stores multi-component diagnostics.
22-sep-20/MR: adapted from zsum_mn_name_xy_mpar
- Parameters:
arr (,,*) [real,in]
iname [integer,in]
- Use :
- Call to:
zsum_yy(),get_from_fname(),fatal_error(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/zsum_mn_name_xy_arr(arr, iname)
Stores multi-component diagnostics.
22-sep-20/MR: adapted from zsum_mn_name_xy_mpar
- Parameters:
arr (,) [real,in]
iname [integer,in]
- Use :
- Call to:
zsum_yy(),get_from_fname(),fatal_error(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/zsum_mn_name_xy_mpar_scal(a, m, iname)
Accumulates contributions to z-sum within an mn-loop which are later merged with an mpi reduce command. In the Yang part of a Yin-Yang grid, the contributions to the sum along a (extended) phi coordinate line of the Yin grid are calculated by use of predetermined weights. Likewise for those coordinate lines of the Yin-phi which lie completely within the Yang grid (i.e. the polar caps).
3-apr-16/MR: derived from zsum_mn_name_xy_mpar; extensions for Yin-Yang grid 7-jun-16/MR: outsourced initialize_zaver_yy, reduce_zsum, zsum_y and
corresponding Yin-Yang specific data to Yinyang_mpi
- Parameters:
a (nx) [real,in]
m [integer,in]
iname [integer,in]
- Use :
cdata(n()),yinyang_mpi(zsum_yy())- Call to:
zsum_yy(),get_from_fname(),fatal_error(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/calc_phiavg_profile(p)
Calculate profile for phi-averaging for given pencil.
2-feb-03/wolf: coded
- Parameters:
p [pencil_case,in]
- Call to:
get_from_fname(),fatal_error(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/diagnostics_init_reduc_pointers()
Phiavg_norm is the dst on the master thread which the local variable on other threads points to
- Called from:
- Call to:
get_from_fname(),fatal_error(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/diagnostics_diag_reductions()
Add to the dst on the master thread
- Call to:
get_from_fname(),fatal_error(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/phisum_mn_name_rz(a, iname)
Successively calculate sum over phi of a, which is supplied at each call. Start from zero if lfirstpoint=.true. The fnamerz array has one extra slice in z where we put ones and sum them up in order to get the normalization correct.
2-feb-03/wolf: adapted from xysum_mn_name_z
- Parameters:
a (nx) [real]
iname [integer]
- Call to:
get_from_fname(),fatal_error(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- function diagnostics/get_from_fname(iname)
Gets value from fname.
30-oct-09/MR: coded
- Parameters:
iname [integer,in]
- Return:
get_from_fname [real]
- Call to:
fatal_error(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/allocate_sound(nnamel)
Allocate the variables needed for “sound”.
3-Dec-10/dhruba+joern: coded 11-jan-11/MR: parameter nnamel added 22-mar-25/TP: refactored name allocations to separate function
- Parameters:
nnamel [integer,in]
- Use :
file_io(parallel_unit_vec(),parallel_open(),parallel_close(),parallel_count_lines()),general(itoa()),sub(location_in_proc())- Call to:
fatal_error(),location_in_proc(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/allocate_fnames(nnamel)
Allocate arrays needed for diagnostics.
23-mar-10/Bourdin.KIS: copied from allocate_yaverages 11-jan-11/MR: parameter nnamel added 18-aug-13/MR: accumulation of diagnostics enabled 25-aug-13/MR: added allocation of itype_name 25-mar-25/TP: refactored name allocations to their own function
- Parameters:
nnamel [integer,in]
- Call to:
fatal_error(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/allocate_vnames(nnamel)
Allocate arrays needed for video slices.
23-mar-10/Bourdin.KIS: copied from allocate_yaverages 11-jan-11/MR: parameter nnamel added
- Parameters:
nnamel [integer,in]
- Call to:
fatal_error(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/allocate_xyaverages(nnamel)
Allocate arrays needed for xy-averages.
24-nov-09/anders: copied from allocate_yaverages 11-jan-11/MR: parameter nnamel added 25-mar-25/TP: refactored name allocations to their own function 27-mar-2025/Kishore: added allocation of itype_name_z
- Parameters:
nnamel [integer,in]
- Call to:
fatal_error(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/allocate_xzaverages(nnamel)
Allocate arrays needed for xz-averages.
24-nov-09/anders: copied from allocate_yaverages 11-jan-11/MR: parameter nnamel added 21-mar-25/TP: refactored name allocations to their own function
- Parameters:
nnamel [integer,in]
- Call to:
fatal_error(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/allocate_yzaverages(nnamel)
Allocate arrays needed for yz-averages.
24-nov-09/anders: copied from allocate_yaverages 11-jan-11/MR: parameter nnamel added 21-mar-25/TP: refactored name allocations to their own function
- Parameters:
nnamel [integer,in]
- Call to:
fatal_error(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/allocate_phizaverages(nnamel)
Allocate arrays needed for phiz-averages.
24-nov-09/anders: copied from allocate_yaverages 11-jan-11/MR: parameter nnamel added 21-mar-25/TP: refactored name allocations to their own function
- Parameters:
nnamel [integer,in]
- Call to:
fatal_error(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/allocate_yaverages(nnamel)
Allocate arrays needed for y-averages.
12-aug-09/dhruba: coded 11-jan-11/MR: parameter nnamel added 21-mar-25/TP: refactored name allocations to their own function
- Parameters:
nnamel [integer,in]
- Call to:
fatal_error(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/allocate_zaverages(nnamel)
Allocate arrays needed for z-averages.
12-aug-09/dhruba: coded 11-jan-11/MR: parameter nnamel added 11-mar-16/MR: outsourced allocation of fnamexy to allocate_zaverages_data
- Parameters:
nnamel [integer,in]
- Call to:
fatal_error(),initialize_zaver_yy(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/allocate_zaverages_data(nnamel)
Allocate data array needed for z-averages. Additional fnamexy_cap for collection of z-sums in polar caps of Yang grid.
11-mar-16/MR: outsourced from allocate_zaverages
- Parameters:
nnamel [integer,in]
- Use :
- Call to:
initialize_zaver_yy(),fatal_error(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/allocate_phiaverages(nnamel)
Allocate arrays needed for phi-averages.
24-nov-09/anders: copied from allocate_zaverages 11-jan-11/MR: parameter nnamel=iadd+nnamerz instead of nnamerz 21-mar-25/TP: refactored name allocations to their own function
- Parameters:
nnamel [integer,in]
- Call to:
fatal_error(),xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/sign_masked_xyaver(quan, idiag)
Forms sign-masked averaging over xy-planes (only positive values count).
28-sep-16/MR: coded
- Parameters:
quan (nx) [real,in]
idiag [integer,in]
- Call to:
xysum_mn_name_z(),vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/diagnostics_clean_up()
16-jan-17/MR: coded
- Call to:
vnames_clean_up(),fnames_clean_up(),name_is_present(),allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/fnames_clean_up()
Deallocate space needed for reading the print.in file.
20-apr-10/Bourdin.KIS: copied from xyaverages_clean_up 25-aug-13/MR: added deallocation of itype_name.
- subroutine diagnostics/vnames_clean_up()
Deallocate space needed for reading the video.in file.
20-apr-10/Bourdin.KIS: copied from xyaverages_clean_up
- function diagnostics/name_is_present(ccname, vlabel[, form])
Verify if the string vlabel is present or not in the ccname array, return index, put format in form if requested and present
16-sep-10/dintrans: coded 16-may-12/MR: changed function type in integer to return index of found name;
new optional parameter form for use with print.in where the name vlabel comes with a format specification
- Parameters:
ccname (*) [character,inout]
vlabel [character,in]
form [character,inout,]
- Return:
name_is_present [integer]
- Call to:
allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/prep_finalize_thread_diagnos()
For accumulated diagnostic variables get which reduction to perform: inds_max_diags/inds_sum_diags hold the indices of the fname entries, which need to be reduced by max/sum. Will be determined only once. Index vectors are threadprivate.
25-aug-23/TP: modified, bug fix
- subroutine diagnostics/calc_nnames()
Calculates the sizes of diagnostic arrays 21-mar-25/TP: carved out from rprint_list
- Use :
general(numeric_precision()),file_io(parallel_file_exists(),parallel_count_lines(),read_name_format())- Called from:
register_modules(),initialize_modules(),finalize_modules(),choose_pencils(),rprint_list()- Call to:
allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/allocate_diagnostic_names()
Allocates diagnostic arrays holding the names of the diagnostic outputs Separate from the data allocations because of multithreading concerns 21-mar-25/TP: coded
- Called from:
register_modules(),initialize_modules(),finalize_modules(),choose_pencils(),rprint_list()- Call to:
allocate_vnames(),allocate_sound(),allocate_zaverages(),allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/allocate_diagnostic_arrays()
Allocates diagnostic arrays holding the output data Separate from the name allocations because of multithreading concerns 21-mar-25/TP: coded
Read print.in.double if applicable, else print.in. Read in the list of variables to be printed.
- Called from:
register_modules(),initialize_modules(),finalize_modules(),choose_pencils(),rprint_list()- Call to:
allocate_fnames(),allocate_xyaverages(),allocate_xzaverages(),allocate_yzaverages(),allocate_phizaverages(),allocate_yaverages(),allocate_zaverages_data(),allocate_phiaverages()
- subroutine diagnostics/save_diagnostic_controls([lsnap_time])
- Parameters:
lsnap_time [logical]
- subroutine diagnostics/restore_diagnostic_controls([lsnap_time])
- Parameters:
lsnap_time [logical]