crop_initialise Subroutine

public subroutine crop_initialise(iyr, mb, meap, ms, nbyr)

Uses

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

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: iyr
integer, intent(in) :: mb
integer, intent(in) :: meap
integer, intent(in) :: ms
integer, intent(in) :: nbyr

Calls

proc~~crop_initialise~~CallsGraph proc~crop_initialise crop_initialise proc~crop_allocate crop_allocate proc~crop_initialise->proc~crop_allocate 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~output_register_hydrotope_var output_register_hydrotope_var proc~crop_initialise->proc~output_register_hydrotope_var proc~get_config_fid get_config_fid proc~crop_initialise->proc~get_config_fid proc~input_open_file input_open_file proc~crop_initialise->proc~input_open_file proc~log_error log_error proc~input_count_rows->proc~log_error proc~read_real_column read_real_column proc~crop_read_management_input->proc~read_real_column proc~read_integer_column read_integer_column proc~crop_read_management_input->proc~read_integer_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~input_open_file->proc~open_file proc~log_message log_message proc~log_error->proc~log_message 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~read_real_column->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~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~read_integer_column->proc~log_error proc~read_integer_column->proc~input_type_conversion_error proc~read_integer_column->proc~move_lines proc~check_int_range check_int_range proc~read_integer_column->proc~check_int_range proc~read_integer_column->proc~read_csv_item proc~read_integer_column->proc~header_column_index proc~read_integer_column->proc~input_error_column_not_found proc~input_type_conversion_error->proc~log_error proc~check_int_range->proc~log_error proc~log_warn log_warn proc~check_int_range->proc~log_warn proc~out_of_range_error out_of_range_error proc~check_int_range->proc~out_of_range_error proc~check_range->proc~log_error proc~check_range->proc~log_warn 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~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~input_error_column_not_found->proc~log_error 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~log_warn->proc~log_message proc~out_of_range_error->proc~log_error proc~out_of_range_error->proc~to_string proc~colourise->proc~string_index

Called by

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

Contents

Source Code


Source Code

  subroutine crop_initialise(iyr, mb, meap, ms, nbyr)
    use input, only: input_open_file, input_count_rows, get_config_fid
    use output, only: output_register_hydrotope_var
    integer, intent(in) :: iyr, mb, meap, ms, nbyr

    istyr = iyr

    read(get_config_fid(), CROP_PARAMETERS)
    crop_yield_output_id = output_register_hydrotope_var("crop_yield", .false.)

    crop_input_file_id = input_open_file(crop_input_file)
    crop_management_input_file_id = input_open_file(crop_management_input_file)

    ! **** count number of managment operation years in landmgt.csv
    mgt_tot = input_count_rows(crop_management_input_file_id, .true.)
    ! **** count number of crops in crop.dat
    mcrdb = input_count_rows(crop_input_file_id, .true.)

    call crop_allocate(mb, mcrdb, meap, ms, nbyr)

    call crop_read_management_input

  end subroutine crop_initialise