time_initialise Subroutine

public subroutine time_initialise()

Uses

  • proc~~time_initialise~~UsesGraph proc~time_initialise time_initialise module~input input proc~time_initialise->module~input module~utilities utilities proc~time_initialise->module~utilities module~input->module~utilities

Arguments

None

Calls

proc~~time_initialise~~CallsGraph proc~time_initialise time_initialise proc~get_config_fid get_config_fid proc~time_initialise->proc~get_config_fid proc~is_leap_year is_leap_year proc~time_initialise->proc~is_leap_year proc~open_file open_file proc~get_config_fid->proc~open_file proc~log_error log_error proc~open_file->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~~time_initialise~~CalledByGraph proc~time_initialise time_initialise proc~initialise initialise proc~initialise->proc~time_initialise program~swim swim program~swim->proc~initialise

Contents

Source Code


Source Code

  subroutine time_initialise
    use utilities, only : is_leap_year
    use input, only : get_config_fid
    integer i

    read(get_config_fid(), TIME_PARAMETERS)

    ! *** count total number of days in simulation
    nDaysSim = 0
    do i = iyr, iyr + nbyr - 1
      if (is_leap_year(i) ) then
        nDaysSim = nDaysSim + 366
      else
        nDaysSim = nDaysSim + 365
      end if
    end do
  end subroutine time_initialise