allocate_1D_FS_arrays Subroutine

public subroutine allocate_1D_FS_arrays(params, F)

Arguments

Type IntentOptional AttributesName
type(KORC_PARAMS), intent(in) :: params

Core KORC simulation parameters.

type(FIELDS), intent(inout) :: F

An instance of the KORC derived type FIELDS. In this variable we keep the loaded data.


Calls

proc~~allocate_1d_fs_arrays~~CallsGraph proc~allocate_1d_fs_arrays allocate_1D_FS_arrays h5fclose_f h5fclose_f proc~allocate_1d_fs_arrays->h5fclose_f h5fopen_f h5fopen_f proc~allocate_1d_fs_arrays->h5fopen_f interface~load_from_hdf5 load_from_hdf5 proc~allocate_1d_fs_arrays->interface~load_from_hdf5 proc~rload_from_hdf5 rload_from_hdf5 interface~load_from_hdf5->proc~rload_from_hdf5 proc~iload_from_hdf5 iload_from_hdf5 interface~load_from_hdf5->proc~iload_from_hdf5 proc~korc_abort korc_abort proc~rload_from_hdf5->proc~korc_abort h5dclose_f h5dclose_f proc~rload_from_hdf5->h5dclose_f h5dread_f h5dread_f proc~rload_from_hdf5->h5dread_f proc~iload_from_hdf5->proc~korc_abort proc~iload_from_hdf5->h5dclose_f proc~iload_from_hdf5->h5dread_f mpi_abort mpi_abort proc~korc_abort->mpi_abort

Called by

proc~~allocate_1d_fs_arrays~~CalledByGraph proc~allocate_1d_fs_arrays allocate_1D_FS_arrays proc~initialize_fields initialize_fields proc~initialize_fields->proc~allocate_1d_fs_arrays program~main main program~main->proc~initialize_fields

Contents

Source Code


Source Code

  subroutine allocate_1D_FS_arrays(params,F)
    !! @note Subroutine that allocates the variables keeping the axisymmetric
    !! fields data. @endnote
    TYPE (KORC_PARAMS), INTENT(IN) 	:: params
    !! Core KORC simulation parameters.
    TYPE(FIELDS), INTENT(INOUT)    :: F
    !! An instance of the KORC derived type FIELDS. In this variable we keep
    !! the loaded data.
    CHARACTER(MAX_STRING_LENGTH)           :: dset
    INTEGER(HID_T)                         :: h5file_id
    INTEGER                                :: h5error
    CHARACTER(MAX_STRING_LENGTH)           :: filename

    filename = TRIM(params%magnetic_field_filename)
    call h5fopen_f(filename, H5F_ACC_RDONLY_F, h5file_id, h5error)
    if (h5error .EQ. -1) then
       write(output_unit_write,'("KORC ERROR: Something went wrong in: load_field_data_from_hdf5 --> h5fopen_f")')
    end if
    
    dset = "/N1D"
    call load_from_hdf5(h5file_id,dset,F%dim_1D)
        
    ALLOCATE(F%PSIP_1D(F%dim_1D))
    ALLOCATE(F%dMagPsiSqdPsiP(F%dim_1D))
    ALLOCATE(F%ddMagPsiSqdPsiPSq(F%dim_1D))

    call h5fclose_f(h5file_id, h5error)
    if (h5error .EQ. -1) then
       write(output_unit_write,'("KORC ERROR: Something went wrong in: load_field_data_from_hdf5 --> h5fclose_f")')
    end if
    
  end subroutine ALLOCATE_1D_FS_ARRAYS