Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(KORC_PARAMS), | intent(in) | :: | params | |||
type(FIELDS), | intent(inout) | :: | F |
subroutine load_1D_FS_from_hdf5(params,F)
TYPE(KORC_PARAMS), INTENT(IN) :: params
TYPE(FIELDS), INTENT(INOUT) :: F
CHARACTER(MAX_STRING_LENGTH) :: filename
CHARACTER(MAX_STRING_LENGTH) :: dset
INTEGER(HID_T) :: h5file_id
INTEGER :: h5error
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 = "/PSIP1D"
call load_array_from_hdf5(h5file_id,dset,F%PSIP_1D)
dset = "/dMagPsiSqdPsiP"
call load_array_from_hdf5(h5file_id,dset,F%dMagPsiSqdPsiP)
dset = "/ddMagPsiSqdPsiPSq"
call load_array_from_hdf5(h5file_id,dset,F%ddMagPsiSqdPsiPSq)
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 load_1D_FS_from_hdf5