SPEC 3.20
Stepped Pressure Equilibrium Code
sphdf5.f90 File Reference

Writes all the output information to ext.sp.h5. More...

Modules

module  sphdf5
 writing the HDF5 output file
 

Functions/Subroutines

subroutine sphdf5::init_outfile
 Initialize the interface to the HDF5 library and open the output file.
 
subroutine sphdf5::mirror_input_to_outfile
 Mirror input variables into output file. More...
 
subroutine sphdf5::init_convergence_output
 Prepare convergence evolution output. More...
 
subroutine sphdf5::write_convergence_output (nDcalls, ForceErr)
 Write convergence output (evolution of interface geometry, force, etc).
 
subroutine sphdf5::write_grid
 Write the magnetic field on a grid. More...
 
subroutine sphdf5::init_flt_output (numTrajTotal)
 Initialize field line tracing output group and create array datasets. More...
 
subroutine sphdf5::write_poincare (offset, data, success)
 Write a hyperslab of Poincare data corresponding to the output of one parallel worker. More...
 
subroutine sphdf5::write_transform (offset, length, lvol, diotadxup, fiota)
 Write the rotational transform output from field line following. More...
 
subroutine sphdf5::finalize_flt_output
 Finalize Poincare output. More...
 
subroutine sphdf5::write_vector_potential (sumLrad, allAte, allAze, allAto, allAzo)
 Write the magnetic vector potential Fourier harmonics to the output file group /vector_potential . More...
 
subroutine sphdf5::hdfint
 Write the final state of the equilibrium to the output file. More...
 
subroutine sphdf5::finish_outfile
 Close all open HDF5 objects (we know of) and list any remaining still-open objects.
 

Variables

logical, parameter sphdf5::hdfdebug = .false.
 global flag to enable verbal diarrhea commenting HDF5 operations
 
integer, parameter sphdf5::internalhdf5msg = 0
 1: print internal HDF5 error messages; 0: only error messages from sphdf5
 
integer sphdf5::hdfier
 error flag for HDF5 library
 
integer sphdf5::rank
 rank of data to write using macros
 
integer(hid_t) sphdf5::file_id
 default file ID used in macros
 
integer(hid_t) sphdf5::space_id
 default dataspace ID used in macros
 
integer(hid_t) sphdf5::dset_id
 default dataset ID used in macros
 
integer(hsize_t), dimension(1:1) sphdf5::onedims
 dimension specifier for one-dimensional data used in macros
 
integer(hsize_t), dimension(1:2) sphdf5::twodims
 dimension specifier for two-dimensional data used in macros
 
integer(hsize_t), dimension(1:3) sphdf5::threedims
 dimension specifier for three-dimensional data used in macros
 
logical sphdf5::grp_exists
 flags used to signal if a group already exists
 
logical sphdf5::var_exists
 flags used to signal if a variable already exists
 
integer(hid_t) sphdf5::iteration_dset_id
 Dataset identifier for "iteration".
 
integer(hid_t) sphdf5::dataspace
 dataspace for extension by 1 iteration object
 
integer(hid_t) sphdf5::memspace
 memspace for extension by 1 iteration object
 
integer(hsize_t), dimension(1) sphdf5::old_data_dims
 current dimensions of "iterations" dataset
 
integer(hsize_t), dimension(1) sphdf5::data_dims
 new dimensions for "iterations" dataset
 
integer(hsize_t), dimension(1) sphdf5::max_dims
 maximum dimensions for "iterations" dataset
 
integer(hid_t) sphdf5::plist_id
 Property list identifier used to activate dataset transfer property.
 
integer(hid_t) sphdf5::dt_ndcalls_id
 Memory datatype identifier (for "nDcalls" dataset in "/iterations")
 
integer(hid_t) sphdf5::dt_energy_id
 Memory datatype identifier (for "Energy" dataset in "/iterations")
 
integer(hid_t) sphdf5::dt_forceerr_id
 Memory datatype identifier (for "ForceErr" dataset in "/iterations")
 
integer(hid_t) sphdf5::dt_irbc_id
 Memory datatype identifier (for "iRbc" dataset in "/iterations")
 
integer(hid_t) sphdf5::dt_izbs_id
 Memory datatype identifier (for "iZbs" dataset in "/iterations")
 
integer(hid_t) sphdf5::dt_irbs_id
 Memory datatype identifier (for "iRbs" dataset in "/iterations")
 
integer(hid_t) sphdf5::dt_izbc_id
 Memory datatype identifier (for "iZbc" dataset in "/iterations")
 
integer, parameter sphdf5::rankp =3
 rank of Poincare data
 
integer, parameter sphdf5::rankt =2
 rank of rotational transform data
 
integer(hid_t) sphdf5::grppoincare
 group for Poincare data
 
integer(hid_t) sphdf5::dset_id_t
 Dataset identifier for \(\theta\) coordinate of field line following.
 
integer(hid_t) sphdf5::dset_id_s
 Dataset identifier for \(s\) coordinate of field line following.
 
integer(hid_t) sphdf5::dset_id_r
 Dataset identifier for \(R\) coordinate of field line following.
 
integer(hid_t) sphdf5::dset_id_z
 Dataset identifier for \(Z\) coordinate of field line following.
 
integer(hid_t) sphdf5::dset_id_success
 Dataset identifier for success flag of trajectories to follow.
 
integer(hid_t) sphdf5::filespace_t
 Dataspace identifier in file for \(\theta\) coordinate of field line following.
 
integer(hid_t) sphdf5::filespace_s
 Dataspace identifier in file for \(s\) coordinate of field line following.
 
integer(hid_t) sphdf5::filespace_r
 Dataspace identifier in file for \(R\) coordinate of field line following.
 
integer(hid_t) sphdf5::filespace_z
 Dataspace identifier in file for \(Z\) coordinate of field line following.
 
integer(hid_t) sphdf5::filespace_success
 Dataspace identifier in file for success flag of trajectories to follow.
 
integer(hid_t) sphdf5::memspace_t
 Dataspace identifier in memory for \(\theta\) coordinate of field line following.
 
integer(hid_t) sphdf5::memspace_s
 Dataspace identifier in memory for \(s\) coordinate of field line following.
 
integer(hid_t) sphdf5::memspace_r
 Dataspace identifier in memory for \(R\) coordinate of field line following.
 
integer(hid_t) sphdf5::memspace_z
 Dataspace identifier in memory for \(Z\) coordinate of field line following.
 
integer(hid_t) sphdf5::memspace_success
 Dataspace identifier in memory for success flag of trajectories to follow.
 
integer(hid_t) sphdf5::grptransform
 group for rotational transform data
 
integer(hid_t) sphdf5::dset_id_diotadxup
 Dataset identifier for diotadxup (derivative of rotational transform ?)
 
integer(hid_t) sphdf5::dset_id_fiota
 Dataset identifier for fiota ( rotational transform ?)
 
integer(hid_t) sphdf5::filespace_diotadxup
 Dataspace identifier in file for diotadxup.
 
integer(hid_t) sphdf5::filespace_fiota
 Dataspace identifier in file for fiota.
 
integer(hid_t) sphdf5::memspace_diotadxup
 Dataspace identifier in memory for diotadxup.
 
integer(hid_t) sphdf5::memspace_fiota
 Dataspace identifier in memory for fiota.
 
character(len=15), parameter sphdf5::aname = "description"
 Attribute name for descriptive info.
 
integer(hid_t) sphdf5::attr_id
 Attribute identifier.
 
integer(hid_t) sphdf5::aspace_id
 Attribute Dataspace identifier.
 
integer(hid_t) sphdf5::atype_id
 Attribute Datatype identifier.
 
integer, parameter sphdf5::arank = 1
 Attribure rank.
 
integer(hsize_t), dimension(arank) sphdf5::adims = (/1/)
 Attribute dimension.
 
integer(size_t) sphdf5::attrlen
 Length of the attribute string.
 
character(len=:), allocatable sphdf5::attr_data
 Attribute data.
 

Detailed Description

Writes all the output information to ext.sp.h5.

If the output file already exists, it will be deleted and replaced by an empty one, which gets filled in with the updated data. All calls to the HDF5 API are filtered to only happen from MPI rank-0 to be able to use the serial HDF5 library. Parallel HDF5 was considered in the past, but abandoned due to very subtle and irreproducible errors.