Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
subroutine catchment_initialise_parameters(mb,nbyr,sbar)!-------------------------------------------------------------------------------! Author : stefan.liersch@pik-potsdam.de! Date : 2010-02-24! modified: 2010-02-25!! PURPOSE : Reading file subcatch.def! count number of subcatchments (user defined aggregation of subbasins)!! CALLED : from subroutine main program!! ToDo : - Writing output like pcp etc. at subcatchment level to specific output files!!-------------------------------------------------------------------------------integer,intent(in)::mbinteger,intent(in)::nbyrreal(dp),dimension(:),intent(in)::sbar! read file subcatch.def! enable assignment of individual subbasin parametersinteger::i,n,nosubcharacter(len=20)::temp_name! skip this routine if no subcatch parametersif(.not.bSubcatch)then allocate(catchment_ids(1))catchment_ids=1return end ifnosub=0do n=1,mbif(subcatch_id(n)<0)nosub=nosub+1end do if(nosub>0)then call log_warn("catchment_initialise_parameters",&"You are simulating with a subset of n subbasins:",int=mb-nosub)end if! allocate arraysn_subcatch=MAXVAL(subcatch_id)call catchment_initialise_subcatchm(n_subcatch,nbyr)do i=1,mbif(subcatch_id(i)/=0)then write(temp_name,'(I5)')subcatch_id(i)subcatch_name(subcatch_id(i))=trim(adjustl(temp_name))subcatch_area(subcatch_id(i))=subcatch_area(subcatch_id(i))+sbar(i)!subarea(i)end if end do! read individual subcatchment bsn parameterscall catchment_read_subcatch_params! assign parameters at the subcatchment levelcall catchment_assign_subcatch(mb)end subroutine catchment_initialise_parameters