snow_initialise Subroutine

public subroutine snow_initialise(mb, meap, subbasin_input_file_id, mstruc)

Uses

  • proc~~snow_initialise~~UsesGraph proc~snow_initialise snow_initialise module~input input proc~snow_initialise->module~input module~output output proc~snow_initialise->module~output module~utilities utilities module~input->module~utilities module~output->module~utilities

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: mb
integer, intent(in) :: meap
integer, intent(in) :: subbasin_input_file_id
integer, intent(in), dimension(:, :, :):: mstruc

Calls

proc~~snow_initialise~~CallsGraph proc~snow_initialise snow_initialise proc~snow_read_input snow_read_input proc~snow_initialise->proc~snow_read_input proc~output_register_hydrotope_var output_register_hydrotope_var proc~snow_initialise->proc~output_register_hydrotope_var proc~snow_allocate snow_allocate proc~snow_initialise->proc~snow_allocate proc~get_config_fid get_config_fid proc~snow_initialise->proc~get_config_fid proc~output_register_subbasin_var output_register_subbasin_var proc~snow_initialise->proc~output_register_subbasin_var proc~read_real_column read_real_column proc~snow_read_input->proc~read_real_column proc~output_register_var output_register_var proc~output_register_hydrotope_var->proc~output_register_var proc~open_file open_file proc~get_config_fid->proc~open_file proc~output_register_subbasin_var->proc~output_register_var proc~log_error log_error proc~output_register_var->proc~log_error proc~string_index string_index proc~output_register_var->proc~string_index proc~open_file->proc~log_error proc~input_type_conversion_error input_type_conversion_error proc~read_real_column->proc~input_type_conversion_error proc~move_lines move_lines proc~read_real_column->proc~move_lines proc~read_real_column->proc~log_error proc~check_range check_range proc~read_real_column->proc~check_range proc~read_csv_item read_csv_item proc~read_real_column->proc~read_csv_item proc~header_column_index header_column_index proc~read_real_column->proc~header_column_index proc~input_error_column_not_found input_error_column_not_found proc~read_real_column->proc~input_error_column_not_found proc~input_type_conversion_error->proc~log_error proc~log_message log_message proc~log_error->proc~log_message proc~check_range->proc~log_error proc~log_warn log_warn proc~check_range->proc~log_warn proc~out_of_range_error out_of_range_error proc~check_range->proc~out_of_range_error proc~header_column_index->proc~move_lines proc~header_column_index->proc~input_error_column_not_found proc~input_error_column_not_found->proc~log_error proc~log_warn->proc~log_message proc~out_of_range_error->proc~log_error proc~to_string to_string proc~out_of_range_error->proc~to_string 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~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~colourise->proc~string_index

Called by

proc~~snow_initialise~~CalledByGraph proc~snow_initialise snow_initialise proc~initialise initialise proc~initialise->proc~snow_initialise program~swim swim program~swim->proc~initialise

Contents

Source Code


Source Code

  subroutine snow_initialise(mb, meap, subbasin_input_file_id, mstruc)
    use input, only: get_config_fid
    use output, only: output_register_hydrotope_var, output_register_subbasin_var
    integer, intent(in) :: mb, meap, subbasin_input_file_id
    integer, dimension(:, :, :), intent(in) :: mstruc

    read(get_config_fid(), SNOW_PARAMETERS)
    glacier_weq_output_id = output_register_hydrotope_var("glacier_weq", .False.)
    snowfall_weq_output_id = output_register_subbasin_var("snowfall_weq")
    snow_depth_weq_output_id = output_register_hydrotope_var("snow_depth_weq")
    call snow_allocate(mb, meap)
    call snow_read_input(subbasin_input_file_id)

    if (bSnowModule) then
      allocate(rsn(mb, meap))
      rsn = 0.
      allocate(sul(mb, meap))
      sul = 0.
      allocate(suz(mb, meap))
      suz = 0.
      allocate(gla(mb, meap))
      gla = 0.
      gla = mstruc(:, :, 6) ! initialise glacier depth [mm]
      snoa = snow1
    end if
  end subroutine snow_initialise