landuse_initialise Subroutine

public subroutine landuse_initialise()

Uses

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

Arguments

None

Calls

proc~~landuse_initialise~~CallsGraph proc~landuse_initialise landuse_initialise proc~input_count_rows input_count_rows proc~landuse_initialise->proc~input_count_rows proc~log_debug log_debug proc~landuse_initialise->proc~log_debug proc~get_config_fid get_config_fid proc~landuse_initialise->proc~get_config_fid proc~input_open_file input_open_file proc~landuse_initialise->proc~input_open_file proc~landuse_read_input landuse_read_input proc~landuse_initialise->proc~landuse_read_input proc~log_error log_error proc~input_count_rows->proc~log_error proc~log_message log_message proc~log_debug->proc~log_message proc~open_file open_file proc~get_config_fid->proc~open_file proc~input_open_file->proc~open_file proc~read_real_column read_real_column proc~landuse_read_input->proc~read_real_column proc~read_integer_column read_integer_column proc~landuse_read_input->proc~read_integer_column proc~log_error->proc~log_message proc~open_file->proc~log_error 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~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~to_string to_string proc~log_write->proc~to_string proc~input_type_conversion_error->proc~log_error proc~check_int_range->proc~log_error proc~out_of_range_error out_of_range_error proc~check_int_range->proc~out_of_range_error proc~log_warn log_warn proc~check_int_range->proc~log_warn 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~check_range->proc~log_error proc~check_range->proc~out_of_range_error proc~check_range->proc~log_warn 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~out_of_range_error->proc~log_error proc~out_of_range_error->proc~to_string proc~string_index string_index proc~colourise->proc~string_index proc~log_warn->proc~log_message

Called by

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

Contents

Source Code


Source Code

  subroutine landuse_initialise
    use input, only : input_open_file, input_count_rows, get_config_fid

    read(get_config_fid(), nml=landuse_parameters)

    landuse_input_file_id = input_open_file(landuse_input_file)
    ! **** count number of land use types in *.lut
    nlut = input_count_rows(landuse_input_file_id, .true.)

    !**** Begin: Arrays allocated with: nlut (formerly 'mc') = number of land use types
    allocate(LULC % cn2a(nlut))
    LULC % cn2a = 0.
    allocate(LULC % cn2b(nlut))
    LULC % cn2b = 0.
    allocate(LULC % cn2c(nlut))
    LULC % cn2c = 0.
    allocate(LULC % cn2d(nlut))
    LULC % cn2d = 0.
    allocate(LULC % canmx(nlut))
    LULC % canmx = 0.
    allocate(LULC % id(nlut)) ! land use ID in * .lut
    LULC % id = 0
    allocate(LULC % lutype(nlut)) ! land use type: 0 = no vegetation; 1 = crops (managed); 2 = natrual vegetation, water
    LULC % id = 0
    allocate(LULC%veg_code(nlut)) ! vegetation code (crop.dat(nlut)) for each land use class, read from input file
    LULC % veg_code = 0
    allocate(LULC % ETcor(nlut)) ! vegetation - specific correction on ETp

    call landuse_read_input

    call log_debug('hydrotope_initialise', 'Interception iicep =', int=iicep)
    if (iicep == 0) LULC % canmx = 0.

  end subroutine landuse_initialise