output_initialise_time Subroutine

public subroutine output_initialise_time()

Arguments

None

Calls

proc~~output_initialise_time~~CallsGraph proc~output_initialise_time output_initialise_time proc~log_error log_error proc~output_initialise_time->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_initialise_time~~CalledByGraph proc~output_initialise_time output_initialise_time proc~output_initialise output_initialise proc~output_initialise->proc~output_initialise_time proc~initialise initialise proc~initialise->proc~output_initialise program~swim swim program~swim->proc~initialise

Contents


Source Code

  subroutine output_initialise_time
    ! decide time dimension/index
    output_ndays = 1
    output_nmonths = 1
    output_nyears = 1
    if (output_write_interval == "M") then
      output_ndays = 31
    else if (output_write_interval == "Y") then
      output_ndays = 366
      output_nmonths = 12
    else if (output_write_interval /= "D") then
      call log_error("output_initialise_time", &
        "output_write_interval must be one of D, M, Y not "//trim(output_write_interval))
    end if
    allocate(output_day_ix(output_ndays))
    allocate(output_month_ix(output_nmonths))
  end subroutine output_initialise_time