Nodes of different colours represent the following:
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
Parse a stream name, which consists of one or more stream name fragments, and return the corresponding variable information
as a list of var_info_type. Multiple stream name fragments should be separated by "+" (i.e., a plus, meaning "addition"
operation) or "-" (i.e., a minus, meaning "subtraction" operation).
A stream name fragment can be a predefined stream name (e.g., "invariant", "input", etc.) or a single variable name.
For example, a stream name of "invariant+input+restart" means the union of variables in the "invariant", "input", and
"restart" streams.
Duplicate variable information in the resulting list is discarded.
(KCW, 2024-06-01)
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.
pure function parse_stream_name(stream_name)result(var_info_list)! Module(s) from MPAS.use dyn_mpas_procedures,only:index_unique,tokenizecharacter(*),intent(in)::stream_nametype(var_info_type),allocatable::var_info_list(:)character(*),parameter::supported_stream_name_operator='+-'character(:),allocatable::stream_name_fragment(:),stream_name_operator(:)character(len(invariant_var_info_list%name)),allocatable::var_name_list(:)integer::i,jtype(var_info_type),allocatable::var_info_list_buffer(:)call tokenize(stream_name,supported_stream_name_operator,stream_name_fragment,stream_name_operator)var_info_list=parse_stream_name_fragment(stream_name_fragment(1))do i=2,size(stream_name_fragment)! Process the stream name fragment according to the operator.var_info_list_buffer=parse_stream_name_fragment(stream_name_fragment(i))if(size(var_info_list_buffer)>0)then select case(stream_name_operator(i-1))case('+')var_info_list=[var_info_list,var_info_list_buffer]case('-')do j=1,size(var_info_list_buffer)var_name_list=var_info_list%namevar_info_list=pack(var_info_list,var_name_list/=var_info_list_buffer(j)%name)end do case default! Do nothing for unknown operators. Should not happen at all.end select end if end do! Discard duplicate variable information by names.var_name_list=var_info_list%namevar_info_list=var_info_list(index_unique(var_name_list))end function parse_stream_name