Load the time control parameters from the JSON file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(type_input) | :: | self | ||||
type(json_file), | intent(inout) | :: | json |
JSON parser |
subroutine read_conditions_time_control_simulation_period(self, json) !> Load the time control parameters from the JSON file implicit none class(type_input) :: self type(json_file), intent(inout) :: json !! JSON parser character(:), allocatable :: key logical :: found key = join([time_control, simulation_period, unit]) call json%get(key, self%conditions%time_control%simulation_period%unit, found=found) if (.not. found) then call json%destroy() call error_message(904, c_opt=key) end if if (.not. any(valid_units(:) == self%conditions%time_control%simulation_period%unit)) then call json%destroy() call error_message(905, c_opt=key) end if key = join([time_control, simulation_period, start]) call json%get(key, self%conditions%time_control%simulation_period%start, found=found) if (.not. found) then call json%destroy() call error_message(904, c_opt=key) end if key = join([time_control, simulation_period, end]) call json%get(key, self%conditions%time_control%simulation_period%end, found=found) if (.not. found) then call json%destroy() call error_message(904, c_opt=key) else if (self%conditions%time_control%simulation_period%start >= self%conditions%time_control%simulation_period%end) then call json%destroy() call error_message(905, c_opt=key) end if end subroutine read_conditions_time_control_simulation_period