initialise Subroutine

subroutine initialise()

Uses

  • proc~~initialise~~UsesGraph proc~initialise initialise module~river river proc~initialise->module~river module~subbasin subbasin proc~initialise->module~subbasin module~vegetation vegetation proc~initialise->module~vegetation module~erosion erosion proc~initialise->module~erosion module~hydrotope hydrotope proc~initialise->module~hydrotope module~utilities utilities proc~initialise->module~utilities module~catchment catchment proc~initialise->module~catchment module~landuse landuse proc~initialise->module~landuse module~reservoir reservoir proc~initialise->module~reservoir module~management management proc~initialise->module~management module~evapotranspiration evapotranspiration proc~initialise->module~evapotranspiration module~snow snow proc~initialise->module~snow module~soil soil proc~initialise->module~soil module~time time proc~initialise->module~time module~output output proc~initialise->module~output module~nutrient nutrient proc~initialise->module~nutrient module~crop crop proc~initialise->module~crop module~input input proc~initialise->module~input module~groundwater groundwater proc~initialise->module~groundwater module~river->module~utilities module~subbasin->module~utilities module~vegetation->module~utilities module~erosion->module~utilities module~hydrotope->module~utilities module~catchment->module~subbasin module~catchment->module~utilities module~catchment->module~input module~landuse->module~utilities module~reservoir->module~utilities module~management->module~utilities module~evapotranspiration->module~utilities module~snow->module~utilities module~soil->module~utilities module~time->module~utilities module~output->module~utilities module~nutrient->module~utilities module~crop->module~utilities module~input->module~utilities module~groundwater->module~utilities

Arguments

None

Calls

proc~~initialise~~CallsGraph proc~initialise initialise proc~subbasin_initialise_area subbasin_initialise_area proc~initialise->proc~subbasin_initialise_area proc~catchment_initialise_parameters catchment_initialise_parameters proc~initialise->proc~catchment_initialise_parameters proc~vegetation_initialise vegetation_initialise proc~initialise->proc~vegetation_initialise proc~snow_initialise snow_initialise proc~initialise->proc~snow_initialise proc~output_initialise_user_input output_initialise_user_input proc~initialise->proc~output_initialise_user_input proc~output_initialise output_initialise proc~initialise->proc~output_initialise proc~print_module_parameters print_module_parameters proc~initialise->proc~print_module_parameters proc~groundwater_initialise groundwater_initialise proc~initialise->proc~groundwater_initialise proc~parse_commandline_arguments parse_commandline_arguments proc~initialise->proc~parse_commandline_arguments proc~input_initialise input_initialise proc~initialise->proc~input_initialise proc~crop_initialise crop_initialise proc~initialise->proc~crop_initialise proc~soil_initialise soil_initialise proc~initialise->proc~soil_initialise proc~print_splash print_splash proc~initialise->proc~print_splash proc~hydrotope_initialise hydrotope_initialise proc~initialise->proc~hydrotope_initialise proc~time_initialise time_initialise proc~initialise->proc~time_initialise proc~erosion_initialise erosion_initialise proc~initialise->proc~erosion_initialise proc~groundwater_correct_params groundwater_correct_params proc~initialise->proc~groundwater_correct_params proc~management_initialise management_initialise proc~initialise->proc~management_initialise proc~nutrient_initialise nutrient_initialise proc~initialise->proc~nutrient_initialise proc~catchment_initialise catchment_initialise proc~initialise->proc~catchment_initialise proc~input_nc_initialise input_nc_initialise proc~initialise->proc~input_nc_initialise proc~crop_read_input crop_read_input proc~initialise->proc~crop_read_input proc~landuse_initialise landuse_initialise proc~initialise->proc~landuse_initialise proc~river_initialise river_initialise proc~initialise->proc~river_initialise proc~subbasin_initialise subbasin_initialise proc~initialise->proc~subbasin_initialise proc~log_info log_info proc~initialise->proc~log_info proc~subbasin_initialise_weather_gen subbasin_initialise_weather_gen proc~initialise->proc~subbasin_initialise_weather_gen proc~reservoir_initialise reservoir_initialise proc~initialise->proc~reservoir_initialise proc~output_print_variables output_print_variables proc~initialise->proc~output_print_variables proc~get_config_fid get_config_fid proc~initialise->proc~get_config_fid proc~evapotranspiration_initialise evapotranspiration_initialise proc~initialise->proc~evapotranspiration_initialise proc~river_initialise_travel_time river_initialise_travel_time proc~initialise->proc~river_initialise_travel_time proc~log_warn log_warn proc~catchment_initialise_parameters->proc~log_warn proc~catchment_assign_subcatch catchment_assign_subcatch proc~catchment_initialise_parameters->proc~catchment_assign_subcatch proc~catchment_read_subcatch_params catchment_read_subcatch_params proc~catchment_initialise_parameters->proc~catchment_read_subcatch_params proc~catchment_initialise_subcatchm catchment_initialise_subcatchm proc~catchment_initialise_parameters->proc~catchment_initialise_subcatchm proc~vegetation_initialise->proc~get_config_fid proc~output_register_hydrotope_var output_register_hydrotope_var proc~vegetation_initialise->proc~output_register_hydrotope_var proc~vegetation_allocate vegetation_allocate proc~vegetation_initialise->proc~vegetation_allocate proc~vegetation_prepare_parameters vegetation_prepare_parameters proc~vegetation_initialise->proc~vegetation_prepare_parameters proc~snow_initialise->proc~get_config_fid proc~snow_allocate snow_allocate proc~snow_initialise->proc~snow_allocate proc~snow_initialise->proc~output_register_hydrotope_var proc~output_register_subbasin_var output_register_subbasin_var proc~snow_initialise->proc~output_register_subbasin_var proc~snow_read_input snow_read_input proc~snow_initialise->proc~snow_read_input proc~output_initialise_user_input->proc~get_config_fid proc~extend_unique_string extend_unique_string proc~output_initialise_user_input->proc~extend_unique_string proc~log_error log_error proc~output_initialise_user_input->proc~log_error proc~string_index string_index proc~output_initialise_user_input->proc~string_index proc~log_create log_create proc~output_initialise_user_input->proc~log_create proc~open_file open_file proc~output_initialise_user_input->proc~open_file proc~output_initialise_is_requested output_initialise_is_requested proc~output_initialise->proc~output_initialise_is_requested proc~output_initialise_time output_initialise_time proc~output_initialise->proc~output_initialise_time proc~output_initialise_storage output_initialise_storage proc~output_initialise->proc~output_initialise_storage proc~output_initialise_unit_shares output_initialise_unit_shares proc~output_initialise->proc~output_initialise_unit_shares proc~output_allocate output_allocate proc~output_initialise->proc~output_allocate proc~print_help print_help proc~print_module_parameters->proc~print_help proc~groundwater_initialise->proc~get_config_fid proc~groundwater_initialise->proc~output_register_hydrotope_var proc~groundwater_allocate groundwater_allocate proc~groundwater_initialise->proc~groundwater_allocate proc~groundwater_read_input groundwater_read_input proc~groundwater_initialise->proc~groundwater_read_input proc~groundwater_initialise->proc~output_register_subbasin_var proc~parse_commandline_arguments->proc~print_splash proc~parse_commandline_arguments->proc~print_help proc~input_initialise->proc~get_config_fid proc~crop_initialise->proc~get_config_fid proc~input_count_rows input_count_rows proc~crop_initialise->proc~input_count_rows proc~crop_read_management_input crop_read_management_input proc~crop_initialise->proc~crop_read_management_input proc~crop_initialise->proc~output_register_hydrotope_var proc~crop_allocate crop_allocate proc~crop_initialise->proc~crop_allocate proc~input_open_file input_open_file proc~crop_initialise->proc~input_open_file proc~soil_initialise->proc~get_config_fid proc~soil_initialise->proc~input_count_rows proc~soil_read_input soil_read_input proc~soil_initialise->proc~soil_read_input proc~soil_initialise->proc~log_error proc~soil_initialise->proc~output_register_hydrotope_var proc~soil_allocate soil_allocate proc~soil_initialise->proc~soil_allocate proc~random_n random_n proc~soil_initialise->proc~random_n proc~log_debug log_debug proc~soil_initialise->proc~log_debug proc~soil_initialise->proc~input_open_file proc~colourise colourise proc~print_splash->proc~colourise proc~hydrotope_subbasin_division hydrotope_subbasin_division proc~hydrotope_initialise->proc~hydrotope_subbasin_division proc~hydrotope_read_input hydrotope_read_input proc~hydrotope_initialise->proc~hydrotope_read_input proc~hydrotope_initialise->proc~output_register_hydrotope_var proc~hydrotope_allocate hydrotope_allocate proc~hydrotope_initialise->proc~hydrotope_allocate proc~hydrotope_initialise->proc~output_register_subbasin_var proc~time_initialise->proc~get_config_fid proc~is_leap_year is_leap_year proc~time_initialise->proc~is_leap_year proc~erosion_initialise->proc~get_config_fid proc~erosion_read_input erosion_read_input proc~erosion_initialise->proc~erosion_read_input proc~erosion_allocate erosion_allocate proc~erosion_initialise->proc~erosion_allocate proc~management_initialise->proc~log_info proc~management_route_transfer management_route_transfer proc~management_initialise->proc~management_route_transfer proc~management_read_wu_inout management_read_wu_inout proc~management_initialise->proc~management_read_wu_inout proc~management_initialise->proc~log_create proc~management_initialise->proc~log_debug proc~management_read_ctrl management_read_ctrl proc~management_initialise->proc~management_read_ctrl proc~nutrient_initialise->proc~get_config_fid proc~nutrient_allocate nutrient_allocate proc~nutrient_initialise->proc~nutrient_allocate proc~catchment_initialise->proc~get_config_fid proc~catchment_allocate catchment_allocate proc~catchment_initialise->proc~catchment_allocate proc~catchment_initialise->proc~input_open_file proc~input_nc_initialise->proc~log_info proc~input_nc_initialise->proc~get_config_fid proc~input_nc_check_attr input_nc_check_attr proc~input_nc_initialise->proc~input_nc_check_attr nf90_inq_varid nf90_inq_varid proc~input_nc_initialise->nf90_inq_varid proc~input_nc_offset_time input_nc_offset_time proc~input_nc_initialise->proc~input_nc_offset_time proc~input_nc_check_dims input_nc_check_dims proc~input_nc_initialise->proc~input_nc_check_dims proc~input_nc_check_grid input_nc_check_grid proc~input_nc_initialise->proc~input_nc_check_grid proc~input_nc_convert_coordinates input_nc_convert_coordinates proc~input_nc_initialise->proc~input_nc_convert_coordinates proc~input_nc_check_missing input_nc_check_missing proc~input_nc_initialise->proc~input_nc_check_missing proc~input_nc_initialise->proc~log_debug proc~input_nc_check_error input_nc_check_error proc~input_nc_initialise->proc~input_nc_check_error proc~input_nc_find_time input_nc_find_time proc~input_nc_initialise->proc~input_nc_find_time nf90_open nf90_open proc~input_nc_initialise->nf90_open proc~input_nc_read_grid input_nc_read_grid proc~input_nc_initialise->proc~input_nc_read_grid proc~crop_read_input->proc~log_error proc~read_string_column read_string_column proc~crop_read_input->proc~read_string_column proc~read_integer_column read_integer_column proc~crop_read_input->proc~read_integer_column proc~vegetation_s_curve_parameters vegetation_s_curve_parameters proc~crop_read_input->proc~vegetation_s_curve_parameters proc~crop_read_input->proc~log_debug proc~read_real_column read_real_column proc~crop_read_input->proc~read_real_column proc~landuse_initialise->proc~get_config_fid proc~landuse_initialise->proc~input_count_rows proc~landuse_read_input landuse_read_input proc~landuse_initialise->proc~landuse_read_input proc~landuse_initialise->proc~log_debug proc~landuse_initialise->proc~input_open_file proc~river_initialise->proc~get_config_fid proc~river_read_input river_read_input proc~river_initialise->proc~river_read_input proc~river_initialise->proc~output_register_subbasin_var proc~river_allocate river_allocate proc~river_initialise->proc~river_allocate proc~subbasin_initialise->proc~get_config_fid proc~subbasin_initialise->proc~input_count_rows proc~subbasin_read_routing subbasin_read_routing proc~subbasin_initialise->proc~subbasin_read_routing proc~subbasin_allocate subbasin_allocate proc~subbasin_initialise->proc~subbasin_allocate proc~subbasin_initialise->proc~output_register_subbasin_var proc~hydrograph_storage_location hydrograph_storage_location proc~subbasin_initialise->proc~hydrograph_storage_location proc~subbasin_allocate_obs_discharge subbasin_allocate_obs_discharge proc~subbasin_initialise->proc~subbasin_allocate_obs_discharge proc~subbasin_read_input subbasin_read_input proc~subbasin_initialise->proc~subbasin_read_input proc~header_column_index header_column_index proc~subbasin_initialise->proc~header_column_index proc~subbasin_initialise->proc~input_open_file proc~log_message log_message proc~log_info->proc~log_message proc~reservoir_initialise->proc~log_info proc~reservoir_initialise->proc~get_config_fid proc~reservoir_read_month_file reservoir_read_month_file proc~reservoir_initialise->proc~reservoir_read_month_file proc~reservoir_initial_values reservoir_initial_values proc~reservoir_initialise->proc~reservoir_initial_values proc~reservoir_initialise->proc~log_warn proc~reservoir_allocate reservoir_allocate proc~reservoir_initialise->proc~reservoir_allocate proc~reservoir_init_subbasin reservoir_init_subbasin proc~reservoir_initialise->proc~reservoir_init_subbasin proc~reservoir_read_storage_file reservoir_read_storage_file proc~reservoir_initialise->proc~reservoir_read_storage_file proc~reservoir_routing reservoir_routing proc~reservoir_initialise->proc~reservoir_routing proc~reservoir_open_output reservoir_open_output proc~reservoir_initialise->proc~reservoir_open_output proc~reservoir_read_control_file reservoir_read_control_file proc~reservoir_initialise->proc~reservoir_read_control_file proc~output_print_variables->proc~string_index proc~get_config_fid->proc~open_file proc~evapotranspiration_initialise->proc~get_config_fid proc~evapotranspiration_read_input evapotranspiration_read_input proc~evapotranspiration_initialise->proc~evapotranspiration_read_input proc~evapotranspiration_initialise->proc~output_register_hydrotope_var proc~evapotranspiration_initialise->proc~log_debug proc~evapotranspiration_allocate evapotranspiration_allocate proc~evapotranspiration_initialise->proc~evapotranspiration_allocate proc~river_muskingum_travel_time river_muskingum_travel_time proc~river_initialise_travel_time->proc~river_muskingum_travel_time proc~hydrotope_subbasin_division->proc~log_info proc~hydrotope_subbasin_division->proc~log_error proc~input_count_rows->proc~log_error proc~evapotranspiration_read_input->proc~read_real_column proc~soil_read_input->proc~log_info proc~soil_read_input->proc~log_error proc~soil_read_input->proc~read_string_column proc~soil_read_input->proc~log_debug proc~soil_read_input->proc~open_file proc~to_string to_string proc~soil_read_input->proc~to_string proc~check_range check_range proc~soil_read_input->proc~check_range proc~input_nc_check_attr->proc~log_debug nf90_get_att nf90_get_att proc~input_nc_check_attr->nf90_get_att proc~reservoir_read_month_file->proc~log_warn proc~reservoir_read_month_file->proc~read_real_column proc~reservoir_read_month_file->proc~input_open_file proc~subbasin_read_routing->proc~input_count_rows proc~subbasin_read_routing->proc~read_integer_column proc~subbasin_read_routing->proc~input_open_file proc~rsv_pol rsv_pol proc~reservoir_initial_values->proc~rsv_pol proc~extend_unique_string->proc~log_error proc~print_help->proc~log_error proc~crop_read_management_input->proc~read_integer_column proc~crop_read_management_input->proc~read_real_column proc~log_warn->proc~log_message proc~input_nc_offset_time->proc~log_error proc~hydrotope_read_input->proc~log_info proc~hydrotope_read_input->proc~input_count_rows proc~hydrotope_read_input->proc~read_integer_column proc~hydrotope_read_input->proc~read_real_column proc~hydrotope_read_input->proc~input_open_file proc~landuse_read_input->proc~read_integer_column proc~landuse_read_input->proc~read_real_column proc~erosion_read_input->proc~read_real_column proc~log_error->proc~log_message proc~output_initialise_time->proc~log_error proc~output_register_var output_register_var proc~output_register_hydrotope_var->proc~output_register_var proc~read_string_column->proc~log_error proc~read_string_column->proc~header_column_index proc~input_error_column_not_found input_error_column_not_found proc~read_string_column->proc~input_error_column_not_found proc~read_csv_item read_csv_item proc~read_string_column->proc~read_csv_item proc~move_lines move_lines proc~read_string_column->proc~move_lines proc~input_nc_check_dims->nf90_inq_varid proc~input_nc_check_dims->proc~log_error proc~input_nc_check_dims->proc~log_debug proc~input_nc_check_dims->proc~input_nc_check_error nf90_get_var nf90_get_var proc~input_nc_check_dims->nf90_get_var nf90_inq_dimid nf90_inq_dimid proc~input_nc_check_dims->nf90_inq_dimid nf90_inquire_dimension nf90_inquire_dimension proc~input_nc_check_dims->nf90_inquire_dimension proc~log_format_message log_format_message proc~log_message->proc~log_format_message proc~log_write log_write proc~log_message->proc~log_write proc~read_integer_column->proc~log_error proc~read_integer_column->proc~header_column_index proc~read_integer_column->proc~input_error_column_not_found proc~input_type_conversion_error input_type_conversion_error proc~read_integer_column->proc~input_type_conversion_error proc~read_integer_column->proc~read_csv_item proc~read_integer_column->proc~move_lines proc~check_int_range check_int_range proc~read_integer_column->proc~check_int_range proc~input_nc_check_grid->proc~log_warn proc~input_nc_check_grid->proc~log_debug proc~input_nc_check_grid->proc~input_open_file proc~hydrotope_allocate->proc~random_n proc~management_read_time_series management_read_time_series proc~management_read_wu_inout->proc~management_read_time_series proc~river_travel_time_coefficients river_travel_time_coefficients proc~river_muskingum_travel_time->proc~river_travel_time_coefficients proc~river_mannings_discharge river_mannings_discharge proc~river_muskingum_travel_time->proc~river_mannings_discharge proc~reservoir_read_storage_file->proc~read_real_column proc~reservoir_read_storage_file->proc~input_open_file proc~groundwater_read_input->proc~read_real_column proc~output_check_requested_vars output_check_requested_vars proc~output_initialise_storage->proc~output_check_requested_vars proc~output_open_files output_open_files proc~output_initialise_storage->proc~output_open_files proc~output_initialise_labelled output_initialise_labelled proc~output_initialise_storage->proc~output_initialise_labelled proc~output_initialise_storage_index output_initialise_storage_index proc~output_initialise_storage->proc~output_initialise_storage_index proc~input_nc_convert_coordinates->proc~log_error proc~input_nc_convert_coordinates->proc~log_debug proc~log_create->proc~open_file proc~log_str2level log_str2level proc~log_create->proc~log_str2level proc~river_read_input->proc~read_real_column proc~output_register_subbasin_var->proc~output_register_var proc~has_column has_column proc~subbasin_allocate_obs_discharge->proc~has_column proc~subbasin_read_input->proc~read_string_column proc~subbasin_read_input->proc~read_integer_column proc~subbasin_read_input->proc~read_real_column proc~output_open_file output_open_file proc~reservoir_open_output->proc~output_open_file proc~input_nc_check_missing->proc~log_warn proc~input_nc_check_missing->proc~log_error proc~input_nc_check_missing->proc~log_debug proc~input_nc_check_missing->proc~input_nc_check_error proc~input_nc_check_missing->nf90_get_var proc~header_column_index->proc~input_error_column_not_found proc~header_column_index->proc~move_lines float float proc~random_n->float proc~snow_read_input->proc~read_real_column proc~log_debug->proc~log_message proc~management_read_ctrl->proc~log_info proc~management_read_ctrl->proc~input_count_rows proc~management_read_ctrl->proc~log_error proc~management_read_ctrl->proc~read_string_column proc~management_read_ctrl->proc~read_integer_column proc~management_read_ctrl->proc~read_real_column proc~management_read_ctrl->proc~input_open_file proc~management_allocate_transfer management_allocate_transfer proc~management_read_ctrl->proc~management_allocate_transfer proc~management_deallocate_transfer management_deallocate_transfer proc~management_read_ctrl->proc~management_deallocate_transfer proc~management_subbasin_pointer management_subbasin_pointer proc~management_read_ctrl->proc~management_subbasin_pointer proc~management_is_transfer_subbasin management_is_transfer_subbasin proc~management_read_ctrl->proc~management_is_transfer_subbasin proc~input_nc_check_error->proc~log_error nf90_strerror nf90_strerror proc~input_nc_check_error->nf90_strerror proc~input_nc_find_time->proc~log_error proc~input_nc_find_time->proc~log_debug proc~colourise->proc~string_index proc~catchment_read_subcatch_params->proc~read_integer_column proc~catchment_read_subcatch_params->proc~log_debug proc~catchment_read_subcatch_params->proc~read_real_column proc~read_real_column->proc~log_error proc~read_real_column->proc~header_column_index proc~read_real_column->proc~input_error_column_not_found proc~read_real_column->proc~input_type_conversion_error proc~read_real_column->proc~check_range proc~read_real_column->proc~read_csv_item proc~read_real_column->proc~move_lines proc~input_nc_read_grid->proc~input_open_file proc~input_nc_read_grid->proc~check_range proc~open_file->proc~log_error proc~evapotranspiration_allocate_sc evapotranspiration_allocate_sc proc~catchment_initialise_subcatchm->proc~evapotranspiration_allocate_sc proc~groundwater_allocate_subcatch groundwater_allocate_subcatch proc~catchment_initialise_subcatchm->proc~groundwater_allocate_subcatch proc~soil_allocate_subcatch soil_allocate_subcatch proc~catchment_initialise_subcatchm->proc~soil_allocate_subcatch proc~snow_allocate_subcatch snow_allocate_subcatch proc~catchment_initialise_subcatchm->proc~snow_allocate_subcatch proc~river_allocate_subcatch river_allocate_subcatch proc~catchment_initialise_subcatchm->proc~river_allocate_subcatch proc~reservoir_read_control_file->proc~input_count_rows proc~reservoir_read_control_file->proc~read_string_column proc~reservoir_read_control_file->proc~read_integer_column proc~reservoir_read_control_file->proc~read_real_column proc~reservoir_read_control_file->proc~input_open_file proc~read_logical_column read_logical_column proc~reservoir_read_control_file->proc~read_logical_column proc~reservoir_allocate_reservoir reservoir_allocate_reservoir proc~reservoir_read_control_file->proc~reservoir_allocate_reservoir proc~input_open_file->proc~open_file proc~output_check_requested_vars->proc~log_error proc~output_check_requested_vars->proc~string_index proc~output_open_files->proc~output_open_file proc~output_write_csv_header output_write_csv_header proc~output_open_files->proc~output_write_csv_header proc~log_format_message->proc~colourise proc~date_time_str date_time_str proc~log_format_message->proc~date_time_str proc~read_logical_column->proc~log_error proc~read_logical_column->proc~header_column_index proc~read_logical_column->proc~input_error_column_not_found proc~read_logical_column->proc~input_type_conversion_error proc~read_logical_column->proc~read_csv_item proc~read_logical_column->proc~move_lines proc~output_open_file->proc~open_file proc~input_error_column_not_found->proc~log_error proc~log_write->proc~to_string proc~input_type_conversion_error->proc~log_error proc~check_range->proc~log_warn proc~check_range->proc~log_error proc~out_of_range_error out_of_range_error proc~check_range->proc~out_of_range_error proc~has_column->proc~header_column_index proc~check_int_range->proc~log_warn proc~check_int_range->proc~log_error proc~check_int_range->proc~out_of_range_error proc~output_register_var->proc~log_error proc~output_register_var->proc~string_index proc~output_initialise_labelled->proc~log_error proc~output_initialise_labelled->proc~read_string_column proc~output_initialise_labelled->proc~has_column proc~indeces_in_array indeces_in_array proc~output_initialise_storage_index->proc~indeces_in_array proc~management_read_time_series->proc~read_real_column proc~management_read_time_series->proc~open_file proc~management_convert_to_daily management_convert_to_daily proc~management_read_time_series->proc~management_convert_to_daily proc~out_of_range_error->proc~log_error proc~out_of_range_error->proc~to_string proc~days_in_month days_in_month proc~management_convert_to_daily->proc~days_in_month proc~indeces_in_array->proc~string_index proc~days_in_month->proc~is_leap_year

Called by

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

Contents

Source Code


Source Code

  subroutine initialise
    use catchment, only : &
      bSubcatch, &
      catchment_ids, &
      catchment_initialise, &
      catchment_initialise_parameters, &
      da, &
      subcatch_id
    use crop, only : crop_initialise, crop_read_input, mcrdb
    use erosion, only : cvm, erosion_initialise
    use evapotranspiration, only : evapotranspiration_initialise, lat
    use groundwater, only : groundwater_correct_params, groundwater_initialise
    use hydrotope, only : &
      frar, &
      hydrotope_area, &
      hydrotope_ids, &
      hydrotope_initialise, &
      hydrotope_input_file_id, &
      hydrotope_subbasin_id, &
      meap, &
      mstruc
    use input, only : &
      get_config_fid, &
      input_initialise, &
#ifdef with_netcdf
      input_nc_initialise, &
#endif
      parse_commandline_arguments, &
      print_splash
    use landuse, only : LULC, landuse_initialise, nlut
    use management, only : management_initialise
    use nutrient, only : &
      bn1, &
      bn2, &
      bn3, &
      bnu1, &
      bnu2, &
      bp1, &
      bp2, &
      bp3, &
      bpu1, &
      bpu2, &
      nutrient_initialise
    use output, only : &
      output_initialise, &
      output_initialise_user_input, &
      output_print_variables, &
      output_dir
    use reservoir, only : reservoir_initialise
    use river, only : &
      chd, &
      chl, &
      chn, &
      chnn, &
      chs, &
      chss, &
      ovn, &
      river_initialise, &
      river_initialise_travel_time
    use snow, only : snow_initialise
    use soil, only : al, amp, avt, ffc, ml, ms, soil_initialise, tc, wft, wi
    use subbasin, only : &
      flu, &
      icodes, &
      inum1s, &
      mb, &
      mch, &
      mhyd, &
      neap, &
      sbar, &
      slope_length, &
      stp, &
      subbasin_ids, &
      subbasin_initialise, &
      subbasin_initialise_area, &
      subbasin_initialise_weather_gen, &
      subbasin_input_file_id, &
      tp5, &
      tp6
    use time, only : iyr, nbyr, nc, ndayssim, time_initialise
    use utilities, only : log_info, identifier_max_length
    use vegetation, only : vegetation_initialise

    character(len=identifier_max_length) :: print_defaults
    logical :: print_output_variables

    call parse_commandline_arguments(version, print_output_variables, print_defaults)

    if (trim(print_defaults) /= '') call print_module_parameters(print_defaults)

    call print_splash(version)

    ! Utility modules
    call input_initialise
    call output_initialise_user_input

    ! Space-time modules
    call time_initialise
    call subbasin_initialise
    call hydrotope_initialise(mb, neap, sbar)
    call catchment_initialise(sbar, flu)

    ! Process modules
    call landuse_initialise
    call river_initialise(mb, mch, mhyd, subbasin_input_file_id)
    call soil_initialise(mb, meap, mstruc, neap, bSubcatch, da, slope_length, stp, ovn, chs, flu, chn, chl, LULC%cn2a, LULC%cn2b, LULC%cn2c, LULC%cn2d)
    call crop_initialise(iyr, mb, meap, ms, nbyr)
    call erosion_initialise(mb, mcrdb, meap, subbasin_input_file_id, da, flu, stp, slope_length, tc, tp6, tp5, al, chl, chnn, chd, chss)
    call nutrient_initialise(mb, mcrdb, meap, ml)
    call evapotranspiration_initialise(mb, meap, subbasin_input_file_id)
    call vegetation_initialise(mb, nlut, mcrdb, meap, lat)
    call crop_read_input(bn1, bn2, bn3, bnu1, bnu2, bp1, bp2, bp3, bpu1, bpu2, cvm)
    call groundwater_initialise(mb, subbasin_input_file_id)
    call reservoir_initialise(icodes, inum1s, mb, mhyd)
    call snow_initialise(mb, meap, subbasin_input_file_id, mstruc)
    call management_initialise(get_config_fid(), frar, icodes, inum1s, iyr, &
      mb, mhyd, mstruc, ndayssim, nbyr, neap, sbar, output_dir)

    ! Preprocessing that depends on many modules input data (could likely be detangled)
    call catchment_initialise_parameters(mb, nbyr, sbar)
    call river_initialise_travel_time(mb)
    call subbasin_initialise_area(da)
    call groundwater_correct_params
    call subbasin_initialise_weather_gen(amp, avt, ffc, lat, nc, wft, wi)

    ! open ncdf climate files and initialise module
#ifdef with_netcdf
    call input_nc_initialise(iyr, mb)
#endif

    call output_initialise( &
      hydrotope_ids, hydrotope_area, hydrotope_subbasin_id, subbasin_ids, neap, &
      subcatch_id, catchment_ids, hydrotope_input_file_id, subbasin_input_file_id)

    call log_info('swim', 'MAX number of soil layers =', int=ml)
    call log_info('swim', 'MAX number of simulation years =', int=nbyr)
    call log_info('swim', 'Number of years of simulation =', int=nbyr)
    call log_info('swim', 'First year =', int=iyr)
    call log_info('swim', 'Number of subbasins =', int=mb)
    call log_info('swim', 'Number of soil types =', int=ms)
    call log_info('swim', 'Number of crops in crop DB =', int=mcrdb)
    call log_info('swim', 'Number of land use types =', int=nlut)
    call log_info('swim', 'Program codes & Routing structure files - READ!')

    if (print_output_variables) call output_print_variables

  end subroutine initialise