Subroutine that allocates the variables keeping the axisymmetric fields data.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
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