mag_hdf5.f90 Source File


This file depends on

sourcefile~~mag_hdf5.f90~~EfferentGraph sourcefile~mag_hdf5.f90 mag_hdf5.f90 sourcefile~io.f90 io.f90 sourcefile~mag_hdf5.f90->sourcefile~io.f90 sourcefile~timeutils.f90 timeutils.f90 sourcefile~mag_hdf5.f90->sourcefile~timeutils.f90 sourcefile~grid.f90 grid.f90 sourcefile~io.f90->sourcefile~grid.f90 sourcefile~mpimod.f90 mpimod.F90 sourcefile~io.f90->sourcefile~mpimod.f90 sourcefile~phys_consts.f90 phys_consts.F90 sourcefile~io.f90->sourcefile~phys_consts.f90 sourcefile~pathlib.f90 pathlib.f90 sourcefile~io.f90->sourcefile~pathlib.f90 sourcefile~timeutils.f90->sourcefile~phys_consts.f90 sourcefile~grid.f90->sourcefile~mpimod.f90 sourcefile~grid.f90->sourcefile~phys_consts.f90 sourcefile~mesh.f90 mesh.f90 sourcefile~grid.f90->sourcefile~mesh.f90 sourcefile~reader.f90 reader.f90 sourcefile~grid.f90->sourcefile~reader.f90 sourcefile~mpimod.f90->sourcefile~phys_consts.f90 sourcefile~mesh.f90->sourcefile~phys_consts.f90 sourcefile~reader.f90->sourcefile~phys_consts.f90

Contents

Source Code


Source Code

submodule (io) mag_hdf5

use timeutils, only: date_filename
use h5fortran, only: hdf5_file
implicit none

contains

module procedure output_magfields
!! WE ASSUME THE ROOT PROCESS HAS ALREADY REDUCED THE MAGNETIC FIELD DATA

type(hdf5_file) :: hout

character(:), allocatable :: filenamefull

filenamefull = date_filename(outdir // '/magfields/',ymd,UTsec) // '.h5'
print *, '  Output file name (magnetic fields):  ',filenamefull

call hout%initialize(filenamefull, status='unknown',action='rw')

call hout%write('/magfields/Br',     real(Br))
call hout%write('/magfields/Btheta', real(Btheta))
call hout%write('/magfields/Bphi',   real(Bphi))

call hout%finalize()

end procedure output_magfields

end submodule mag_hdf5