swim Program

Uses

  • program~~swim~~UsesGraph program~swim swim module~time time program~swim->module~time module~utilities utilities module~time->module~utilities

Calls

program~~swim~~CallsGraph program~swim swim proc~initialise initialise program~swim->proc~initialise proc~time_process_years time_process_years program~swim->proc~time_process_years proc~terminate terminate program~swim->proc~terminate 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~time_finish_year time_finish_year proc~time_process_years->proc~time_finish_year proc~time_process_month time_process_month proc~time_process_years->proc~time_process_month proc~time_process_years->proc~log_info proc~time_initialise_year time_initialise_year proc~time_process_years->proc~time_initialise_year proc~dealloc_reservoir dealloc_reservoir proc~terminate->proc~dealloc_reservoir proc~dealloc_hydrotope dealloc_hydrotope proc~terminate->proc~dealloc_hydrotope proc~management_write_user_output management_write_user_output proc~terminate->proc~management_write_user_output proc~dealloc_evapotranspiration dealloc_evapotranspiration proc~terminate->proc~dealloc_evapotranspiration proc~dealloc_erosion dealloc_erosion proc~terminate->proc~dealloc_erosion proc~dealloc_nutrient dealloc_nutrient proc~terminate->proc~dealloc_nutrient proc~dealloc_vegetation dealloc_vegetation proc~terminate->proc~dealloc_vegetation proc~input_nc_close input_nc_close proc~terminate->proc~input_nc_close proc~dealloc_groundwater dealloc_groundwater proc~terminate->proc~dealloc_groundwater proc~crop_deallocate crop_deallocate proc~terminate->proc~crop_deallocate proc~dealloc_catchment dealloc_catchment proc~terminate->proc~dealloc_catchment proc~subbasin_close subbasin_close proc~terminate->proc~subbasin_close proc~dealloc_snow dealloc_snow proc~terminate->proc~dealloc_snow proc~dealloc_soil dealloc_soil proc~terminate->proc~dealloc_soil proc~dealloc_river dealloc_river proc~terminate->proc~dealloc_river proc~terminate->proc~get_config_fid proc~dealloc_output dealloc_output proc~terminate->proc~dealloc_output proc~output_open_file output_open_file proc~management_write_user_output->proc~output_open_file proc~gen_filename gen_filename proc~management_write_user_output->proc~gen_filename 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~output_year output_year proc~time_finish_year->proc~output_year proc~output_nashsutcliffe_efficiency output_nashsutcliffe_efficiency proc~time_finish_year->proc~output_nashsutcliffe_efficiency proc~log_debug log_debug proc~time_finish_year->proc~log_debug proc~parse_commandline_arguments->proc~print_splash proc~parse_commandline_arguments->proc~print_help proc~input_initialise->proc~get_config_fid nf90_close nf90_close proc~input_nc_close->nf90_close proc~input_nc_check_error input_nc_check_error proc~input_nc_close->proc~input_nc_check_error 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~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~time_process_month->proc~log_debug proc~time_process_day time_process_day proc~time_process_month->proc~time_process_day proc~output_month output_month proc~time_process_month->proc~output_month 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_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~time_initialise_year->proc~read_real_column 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~output_write_daily output_write_daily proc~output_year->proc~output_write_daily proc~output_write_annual output_write_annual proc~output_year->proc~output_write_annual proc~output_write_monthly output_write_monthly proc~output_year->proc~output_write_monthly 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~output_open_file->proc~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~output_nashsutcliffe_efficiency->proc~log_debug 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~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~time_process_day->proc~log_debug proc~runsubbasin runsubbasin proc~time_process_day->proc~runsubbasin proc~reservoir_process reservoir_process proc~time_process_day->proc~reservoir_process proc~river_route_add river_route_add proc~time_process_day->proc~river_route_add proc~log_progress log_progress proc~time_process_day->proc~log_progress proc~subbasin_initialise_subbasin subbasin_initialise_subbasin proc~time_process_day->proc~subbasin_initialise_subbasin proc~river_route river_route proc~time_process_day->proc~river_route proc~subbasin_read_climate subbasin_read_climate proc~time_process_day->proc~subbasin_read_climate proc~management_total_demand management_total_demand proc~time_process_day->proc~management_total_demand proc~reservoir_subbasin reservoir_subbasin proc~time_process_day->proc~reservoir_subbasin proc~management_external_supply management_external_supply proc~time_process_day->proc~management_external_supply proc~reservoir_is_operational reservoir_is_operational proc~time_process_day->proc~reservoir_is_operational proc~evapotranspiration_radiation evapotranspiration_radiation proc~time_process_day->proc~evapotranspiration_radiation proc~time_day_length time_day_length proc~time_process_day->proc~time_day_length proc~output_day output_day proc~time_process_day->proc~output_day proc~input_nc_read_climate input_nc_read_climate proc~time_process_day->proc~input_nc_read_climate proc~time_process_day->proc~management_is_transfer_subbasin proc~river_transfer river_transfer proc~time_process_day->proc~river_transfer 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~output_month->proc~output_write_daily proc~output_month->proc~output_write_monthly 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~output_write_time output_write_time proc~output_write_daily->proc~output_write_time 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_write_annual->proc~output_write_time proc~runsubbasin->proc~subbasin_initialise_subbasin proc~runsubbasin->proc~management_subbasin_pointer proc~runsubbasin->proc~management_is_transfer_subbasin proc~soil_curve_number_peak_runoff soil_curve_number_peak_runoff proc~runsubbasin->proc~soil_curve_number_peak_runoff proc~erosion_organic_nitrate_loss erosion_organic_nitrate_loss proc~runsubbasin->proc~erosion_organic_nitrate_loss proc~soil_curve_number_alpha soil_curve_number_alpha proc~runsubbasin->proc~soil_curve_number_alpha proc~erosion_phosphorus_loss erosion_phosphorus_loss proc~runsubbasin->proc~erosion_phosphorus_loss proc~snow_degree_day_melting snow_degree_day_melting proc~runsubbasin->proc~snow_degree_day_melting proc~subbasin_flow_travel_time subbasin_flow_travel_time proc~runsubbasin->proc~subbasin_flow_travel_time proc~output_store_subbasin_value output_store_subbasin_value proc~runsubbasin->proc~output_store_subbasin_value proc~erosion_enritchment_ratio erosion_enritchment_ratio proc~runsubbasin->proc~erosion_enritchment_ratio proc~groundwater_process groundwater_process proc~runsubbasin->proc~groundwater_process proc~landuse_is_forest landuse_is_forest proc~runsubbasin->proc~landuse_is_forest proc~snow_process snow_process proc~runsubbasin->proc~snow_process proc~management_transfer_out management_transfer_out proc~runsubbasin->proc~management_transfer_out proc~hydrotope_process hydrotope_process proc~runsubbasin->proc~hydrotope_process proc~soil_curve_transmission_losses soil_curve_transmission_losses proc~runsubbasin->proc~soil_curve_transmission_losses proc~output_store_hydrotope_value output_store_hydrotope_value proc~runsubbasin->proc~output_store_hydrotope_value proc~landuse_is_cropland landuse_is_cropland proc~runsubbasin->proc~landuse_is_cropland proc~snow_initialise_subbasin snow_initialise_subbasin proc~runsubbasin->proc~snow_initialise_subbasin proc~crop_yield_output crop_yield_output proc~runsubbasin->proc~crop_yield_output proc~erosion_soil_loss erosion_soil_loss proc~runsubbasin->proc~erosion_soil_loss proc~input_error_column_not_found->proc~log_error proc~reservoir_process->proc~log_error proc~reservoir_process->proc~rsv_pol proc~et_turc et_turc proc~reservoir_process->proc~et_turc proc~reservoir_is_full_dead_storage reservoir_is_full_dead_storage proc~reservoir_process->proc~reservoir_is_full_dead_storage proc~reservoir_get reservoir_get proc~reservoir_process->proc~reservoir_get proc~river_route_add->proc~management_subbasin_pointer proc~river_route_add->proc~management_is_transfer_subbasin proc~output_store_subbasin_values output_store_subbasin_values proc~river_route_add->proc~output_store_subbasin_values proc~river_route_add->proc~management_transfer_out proc~log_write->proc~to_string proc~input_type_conversion_error->proc~log_error proc~output_write_monthly->proc~output_write_time proc~log_progress->proc~log_format_message proc~log_progress->proc~log_write proc~river_route_phosphorus river_route_phosphorus proc~river_route->proc~river_route_phosphorus proc~river_route_nitrate river_route_nitrate proc~river_route->proc~river_route_nitrate proc~river_erosion_enritchment_ratio river_erosion_enritchment_ratio proc~river_route->proc~river_erosion_enritchment_ratio proc~river_route_erosion river_route_erosion proc~river_route->proc~river_route_erosion proc~river_transmission_loss river_transmission_loss proc~river_route->proc~river_transmission_loss proc~river_muskingum_routing river_muskingum_routing proc~river_route->proc~river_muskingum_routing 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~subbasin_read_climate->proc~read_real_column proc~has_column->proc~header_column_index proc~management_total_demand->proc~log_warn proc~management_total_demand->proc~management_subbasin_pointer proc~management_total_demand->proc~management_is_transfer_subbasin proc~management_user_pointer management_user_pointer proc~management_total_demand->proc~management_user_pointer proc~management_is_active_period management_is_active_period proc~management_total_demand->proc~management_is_active_period proc~reservoir_subbasin->proc~rsv_pol proc~reservoir_subbasin->proc~output_store_subbasin_value proc~reservoir_subbasin->proc~output_store_hydrotope_value proc~reservoir_subbasin->proc~reservoir_get proc~management_external_supply->proc~log_warn proc~management_external_supply->proc~management_subbasin_pointer proc~management_external_supply->proc~management_is_transfer_subbasin proc~management_external_supply->proc~management_user_pointer proc~management_external_supply->proc~management_is_active_period proc~reservoir_is_operational->proc~reservoir_get proc~check_int_range->proc~log_warn proc~check_int_range->proc~log_error proc~check_int_range->proc~out_of_range_error proc~evapotranspiration_radiation->proc~log_warn proc~output_register_var->proc~log_error proc~output_register_var->proc~string_index proc~output_day->proc~output_write_daily proc~output_hydrotope_to_catchment output_hydrotope_to_catchment proc~output_day->proc~output_hydrotope_to_catchment proc~output_hydrotope_to_subbasin output_hydrotope_to_subbasin proc~output_day->proc~output_hydrotope_to_subbasin proc~output_subbasin_to_catchment output_subbasin_to_catchment proc~output_day->proc~output_subbasin_to_catchment proc~input_nc_read_climate->proc~log_debug proc~input_nc_weighted_mean input_nc_weighted_mean proc~input_nc_read_climate->proc~input_nc_weighted_mean 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~gamma_distribution gamma_distribution proc~soil_curve_number_alpha->proc~gamma_distribution proc~management_user_pointer->proc~log_error proc~days_in_month days_in_month proc~management_convert_to_daily->proc~days_in_month proc~landuse_index landuse_index proc~landuse_is_forest->proc~landuse_index proc~snow_process->proc~output_store_hydrotope_value proc~snow_glacier_melt snow_glacier_melt proc~snow_process->proc~snow_glacier_melt proc~snow_melting snow_melting proc~snow_process->proc~snow_melting proc~indeces_in_array->proc~string_index proc~management_transfer_out->proc~log_warn proc~management_transfer_out->proc~management_subbasin_pointer proc~management_transfer_out->proc~management_user_pointer proc~management_transfer_out->proc~management_is_active_period proc~hydrotope_process->proc~management_subbasin_pointer proc~hydrotope_process->proc~management_is_transfer_subbasin proc~hydrotope_process->proc~management_user_pointer proc~hydrotope_process->proc~landuse_is_forest proc~hydrotope_process->proc~landuse_is_cropland proc~hydrotope_process->proc~management_is_active_period proc~soil_process soil_process proc~hydrotope_process->proc~soil_process proc~soil_curve_number soil_curve_number proc~hydrotope_process->proc~soil_curve_number proc~landuse_is_natural_vegetation landuse_is_natural_vegetation proc~hydrotope_process->proc~landuse_is_natural_vegetation proc~soil_temperature soil_temperature proc~hydrotope_process->proc~soil_temperature proc~nutrient_fertilisation nutrient_fertilisation proc~hydrotope_process->proc~nutrient_fertilisation proc~soil_curve_number_runoff soil_curve_number_runoff proc~hydrotope_process->proc~soil_curve_number_runoff proc~vegetation_store_output vegetation_store_output proc~hydrotope_process->proc~vegetation_store_output proc~nutrient_leaching nutrient_leaching proc~hydrotope_process->proc~nutrient_leaching amax1 amax1 proc~hydrotope_process->amax1 proc~evapotranspiration_process evapotranspiration_process proc~hydrotope_process->proc~evapotranspiration_process proc~vegetation_process vegetation_process proc~hydrotope_process->proc~vegetation_process proc~crop_initialise_hydrotope crop_initialise_hydrotope proc~hydrotope_process->proc~crop_initialise_hydrotope proc~hydrotope_process->proc~landuse_index proc~erosion_cklsp_factor erosion_cklsp_factor proc~hydrotope_process->proc~erosion_cklsp_factor proc~crop_process crop_process proc~hydrotope_process->proc~crop_process proc~river_transmission_loss->proc~river_mannings_discharge proc~out_of_range_error->proc~log_error proc~out_of_range_error->proc~to_string proc~output_write_space_time_csv output_write_space_time_csv proc~output_write_time->proc~output_write_space_time_csv proc~output_array_to_bin output_array_to_bin proc~output_write_time->proc~output_array_to_bin proc~landuse_is_cropland->proc~landuse_index proc~river_muskingum_routing->proc~log_warn proc~input_nc_weighted_mean->proc~input_nc_check_error proc~input_nc_weighted_mean->nf90_get_var proc~output_write_space_time_csv->proc~log_error proc~output_array_to_csv output_array_to_csv proc~output_write_space_time_csv->proc~output_array_to_csv proc~days_in_month->proc~is_leap_year proc~soil_percolation soil_percolation proc~soil_process->proc~soil_percolation proc~landuse_is_natural_vegetation->proc~landuse_index proc~gamma_distribution->proc~random_n proc~vegetation_store_output->proc~output_store_hydrotope_value proc~nutrient_nitrate_cycle nutrient_nitrate_cycle proc~nutrient_leaching->proc~nutrient_nitrate_cycle proc~nutrient_nitrate_leaching nutrient_nitrate_leaching proc~nutrient_leaching->proc~nutrient_nitrate_leaching proc~nutrient_phosphorus_cycle nutrient_phosphorus_cycle proc~nutrient_leaching->proc~nutrient_phosphorus_cycle proc~nutrient_phosphorus_loss nutrient_phosphorus_loss proc~nutrient_leaching->proc~nutrient_phosphorus_loss proc~vegetation_water_stress vegetation_water_stress proc~vegetation_process->proc~vegetation_water_stress amin1 amin1 proc~vegetation_process->amin1 proc~nutrient_phosphorus_uptake nutrient_phosphorus_uptake proc~vegetation_process->proc~nutrient_phosphorus_uptake proc~nutrient_nitrate_uptake nutrient_nitrate_uptake proc~vegetation_process->proc~nutrient_nitrate_uptake proc~vegetation_temperature_stress vegetation_temperature_stress proc~vegetation_process->proc~vegetation_temperature_stress proc~landuse_index->proc~log_error proc~crop_operation crop_operation proc~crop_process->proc~crop_operation proc~crop_process->proc~vegetation_water_stress proc~crop_growth crop_growth proc~crop_process->proc~crop_growth proc~nutrient_nitrate_cycle->amin1 proc~crop_operation->proc~output_store_hydrotope_value proc~vegetation_water_stress->proc~management_subbasin_pointer proc~vegetation_water_stress->proc~management_is_transfer_subbasin proc~vegetation_water_stress->proc~management_user_pointer proc~vegetation_water_stress->proc~landuse_is_cropland proc~vegetation_water_stress->proc~management_is_active_period proc~wam_correct_irrigationdemand wam_correct_irrigationdemand proc~vegetation_water_stress->proc~wam_correct_irrigationdemand proc~crop_growth->amin1 proc~crop_growth->proc~nutrient_phosphorus_uptake proc~crop_growth->proc~nutrient_nitrate_uptake proc~crop_growth->proc~vegetation_temperature_stress proc~vegetation_adjust_energy_ratio vegetation_adjust_energy_ratio proc~crop_growth->proc~vegetation_adjust_energy_ratio proc~vegetation_s_curve vegetation_s_curve proc~crop_growth->proc~vegetation_s_curve proc~nutrient_phosphorus_cycle->amin1 proc~vegetation_nutrient_stress vegetation_nutrient_stress proc~nutrient_phosphorus_uptake->proc~vegetation_nutrient_stress proc~output_array_to_csv->proc~log_error proc~nutrient_nitrate_uptake->proc~vegetation_nutrient_stress proc~vegetation_temperature_stress->proc~landuse_is_cropland

Contents

Source Code


Variables

Type AttributesNameInitial
character, parameter, dimension(19):: swim_modules =(/"time                 ", "hydrotope            ", "subbasin             ", "catchment            ", "evapotranspiration   ", "soil                 ", "groundwater          ", "reservoir            ", "vegetation           ", "crop                 ", "landuse              ", "snow                 ", "nutrient             ", "management           ", "river                ", "erosion              ", "output               ", "input                ", "utilities            "/)
character, parameter:: version ="v2021.1"

Subroutines

subroutine initialise()

Arguments

None

subroutine print_module_parameters(module_name)

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: module_name

subroutine terminate()

Arguments

None

Source Code

program swim

  use time, only : time_process_years


  implicit none

  ! Version string, the only place this is defined
  character(*), parameter :: version = "v2021.1"
  ! Modules in order of dependence
  character(*), dimension(19), parameter :: swim_modules = (/ &
    ! Space-time modules
    "time                 ", &  ! 1
    "hydrotope            ", &  ! 2
    "subbasin             ", &  ! 3
    "catchment            ", &  ! 4
    ! process modules
    "evapotranspiration   ", &  ! 5
    "soil                 ", &  ! 6
    "groundwater          ", &  ! 7
    "reservoir            ", &  ! 8
    "vegetation           ", &  ! 9
    "crop                 ", &  ! 10
    "landuse              ", &  ! 11
    "snow                 ", &  ! 12
    "nutrient             ", &  ! 13
    "management           ", &  ! 14
    "river                ", &  ! 15
    "erosion              ", &  ! 16
    ! utility modules
    "output               ", &  ! 17
    "input                ", &  ! 18
    "utilities            "  &  ! 19
  /)

  call initialise
  call time_process_years
  call terminate

contains

  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

  subroutine terminate
    use input, only : &
#ifdef with_netcdf
      input_nc_close, &
#endif
      get_config_fid
    use management, only : bWAM_Module, management_write_user_output
    use subbasin, only : mb
    use time, only : nDaysSim
    use catchment, only : dealloc_catchment
    use crop, only : crop_deallocate
    use erosion, only : dealloc_erosion
    use evapotranspiration, only : dealloc_evapotranspiration
    use groundwater, only : dealloc_groundwater
    use hydrotope, only : dealloc_hydrotope
    use nutrient, only : dealloc_nutrient
    use output, only : dealloc_output
    use reservoir, only : dealloc_reservoir
    use river, only : dealloc_river
    use snow, only : dealloc_snow
    use soil, only : dealloc_soil
    use subbasin, only : subbasin_close
    use vegetation, only : dealloc_vegetation

    if (bWAM_Module) call management_write_user_output(mb, ndayssim)

    close(get_config_fid())

    call dealloc_catchment
    call crop_deallocate
    call dealloc_erosion
    call dealloc_evapotranspiration
    call dealloc_groundwater
    call dealloc_hydrotope
    call dealloc_nutrient
    call dealloc_output
    call dealloc_reservoir
    call dealloc_river
    call dealloc_snow
    call dealloc_soil
    call subbasin_close
    call dealloc_vegetation

    !**** Close netcdf files
#ifdef with_netcdf
    call input_nc_close
#endif

    return
  end subroutine terminate

  subroutine print_module_parameters(module_name)
    ! Print modules' current parameters
    ! This subroutine has to be placed in the SWIM program unit as
    ! namelists cant be parsed as arguments
    use time, only : time_parameters
    !use hydrotope, only : hydrotope_parameters
    use subbasin, only : subbasin_parameters
    use catchment, only : catchment_parameters
    use evapotranspiration, only : evapotranspiration_parameters
    use soil, only : soil_parameters
    use groundwater, only : groundwater_parameters
    use reservoir, only : reservoir_parameters
    use vegetation, only : vegetation_parameters
    use crop, only : crop_parameters
    use landuse, only : landuse_parameters
    use snow, only : snow_parameters
    use nutrient, only : nutrient_parameters
    use management, only : management_parameters
    use river, only : river_parameters
    use erosion, only : erosion_parameters
    use input, only : &
      input_parameters, &
#ifdef with_netcdf
      nc_climate_parameters, &
#endif
      print_help
    use output, only : output_parameters

    character(len=*), intent(in) :: module_name
    logical :: pparams(size(swim_modules))

    pparams = swim_modules == module_name
    if (module_name == "all") pparams(:) = .True.
    if (.not. any(pparams)) &
      call print_help("Not a valid module name in -d "//trim(module_name))

    if (pparams(1)) write(*, nml=time_parameters)
    !if (pparams(2)) write(*, nml=hydrotope_parameters)
    if (pparams(3)) write(*, nml=subbasin_parameters)
    if (pparams(4)) write(*, nml=catchment_parameters)
    if (pparams(5)) write(*, nml=evapotranspiration_parameters)
    if (pparams(6)) write(*, nml=soil_parameters)
    if (pparams(7)) write(*, nml=groundwater_parameters)
    if (pparams(8)) write(*, nml=reservoir_parameters)
    if (pparams(9)) write(*, nml=vegetation_parameters)
    if (pparams(10)) write(*, nml=crop_parameters)
    if (pparams(11)) write(*, nml=landuse_parameters)
    if (pparams(12)) write(*, nml=snow_parameters)
    if (pparams(13)) write(*, nml=nutrient_parameters)
    if (pparams(14)) write(*, nml=management_parameters)
    if (pparams(15)) write(*, nml=river_parameters)
    if (pparams(16)) write(*, nml=erosion_parameters)
    if (pparams(17)) write(*, nml=output_parameters)
    if (pparams(18)) then
      write(*, nml=input_parameters)
#ifdef with_netcdf
      write(*, nml=nc_climate_parameters)
#endif
    end if
    stop

  end subroutine print_module_parameters

end program swim