output_write_space_time_csv Subroutine

public subroutine output_write_space_time_csv(file_id, array, space_ix, time_label, space_label)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: file_id
real, intent(in) :: array(:,:,:)
integer, intent(in), optional :: space_ix(:)
character(len=*), intent(in) :: time_label(:)
character(len=*), intent(in), optional :: space_label(:)

Calls

proc~~output_write_space_time_csv~~CallsGraph proc~output_write_space_time_csv output_write_space_time_csv proc~output_array_to_csv output_array_to_csv proc~output_write_space_time_csv->proc~output_array_to_csv proc~log_error log_error proc~output_write_space_time_csv->proc~log_error proc~output_array_to_csv->proc~log_error proc~log_message log_message proc~log_error->proc~log_message proc~log_write log_write proc~log_message->proc~log_write proc~log_format_message log_format_message proc~log_message->proc~log_format_message proc~to_string to_string proc~log_write->proc~to_string proc~date_time_str date_time_str proc~log_format_message->proc~date_time_str proc~colourise colourise proc~log_format_message->proc~colourise proc~string_index string_index proc~colourise->proc~string_index

Called by

proc~~output_write_space_time_csv~~CalledByGraph proc~output_write_space_time_csv output_write_space_time_csv proc~output_write_time output_write_time proc~output_write_time->proc~output_write_space_time_csv proc~output_write_monthly output_write_monthly proc~output_write_monthly->proc~output_write_time proc~output_write_daily output_write_daily proc~output_write_daily->proc~output_write_time proc~output_write_annual output_write_annual proc~output_write_annual->proc~output_write_time proc~output_day output_day proc~output_day->proc~output_write_daily proc~output_year output_year proc~output_year->proc~output_write_monthly proc~output_year->proc~output_write_daily proc~output_year->proc~output_write_annual proc~output_month output_month proc~output_month->proc~output_write_monthly proc~output_month->proc~output_write_daily proc~time_finish_year time_finish_year proc~time_finish_year->proc~output_year proc~time_process_day time_process_day proc~time_process_day->proc~output_day proc~time_process_month time_process_month proc~time_process_month->proc~output_month proc~time_process_month->proc~time_process_day proc~time_process_years time_process_years proc~time_process_years->proc~time_finish_year proc~time_process_years->proc~time_process_month program~swim swim program~swim->proc~time_process_years

Contents


Source Code

  subroutine output_write_space_time_csv(file_id, array, space_ix, time_label, &
      space_label)
    ! Write a 3D (vars, space, time) array with time, space index to tidy csv
    integer, intent(in) :: file_id
    integer, intent(in), optional :: space_ix(:)
    character(len=*), intent(in) :: time_label(:)
    character(len=*), intent(in), optional :: space_label(:)
    real, intent(in) :: array(:, :, :)
    integer it

    if (present(space_ix)) then
      do it = 1, size(time_label)
        call output_array_to_csv(file_id, array(:, :, it), space_ix, time_label(it:it))
      end do
    else if (present(space_label)) then
      do it = 1, size(time_label)
        call output_array_to_csv(file_id, array(:, :, it), &
          time_label=time_label(it:it), space_label=space_label)
      end do
    else
      call log_error("output_write_space_time_csv", &
        "space_ix or space_label have to be given.")
    end if
  end subroutine output_write_space_time_csv