Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | mb | |||
integer, | intent(in) | :: | meap | |||
integer, | intent(in) | :: | subbasin_input_file_id | |||
integer, | intent(in), | dimension(:, :, :) | :: | mstruc |
subroutine snow_initialise(mb, meap, subbasin_input_file_id, mstruc)
use input, only: get_config_fid
use output, only: output_register_hydrotope_var, output_register_subbasin_var
integer, intent(in) :: mb, meap, subbasin_input_file_id
integer, dimension(:, :, :), intent(in) :: mstruc
read(get_config_fid(), SNOW_PARAMETERS)
glacier_weq_output_id = output_register_hydrotope_var("glacier_weq", .False.)
snowfall_weq_output_id = output_register_subbasin_var("snowfall_weq")
snow_depth_weq_output_id = output_register_hydrotope_var("snow_depth_weq")
call snow_allocate(mb, meap)
call snow_read_input(subbasin_input_file_id)
if (bSnowModule) then
allocate(rsn(mb, meap))
rsn = 0.
allocate(sul(mb, meap))
sul = 0.
allocate(suz(mb, meap))
suz = 0.
allocate(gla(mb, meap))
gla = 0.
gla = mstruc(:, :, 6) ! initialise glacier depth [mm]
snoa = snow1
end if
end subroutine snow_initialise