Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | iyr | |||
integer, | intent(in) | :: | mb | |||
integer, | intent(in) | :: | meap | |||
integer, | intent(in) | :: | ms | |||
integer, | intent(in) | :: | nbyr |
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