Open gold2718 opened 4 years ago
To handle module variables (i.e., suite variables), the _init
routine must be passed the size of the horizontal extent of each block.
If a host model has ccpp_block_number
(number of current block), ccpp_block_count
(how many blocks are there in total), ccpp_block_sizes
(array of length ccpp_block_count
that contains the sizes of all blocks), then assume we are dealing with a blocked host model and create the infrastructure to handle blocked data.
Copied from #386:
capgen needs to be able to correctly create the host cap interfaces, depending on the phase:
init
, timestep_init
, timestep_final
, or final
:
horizontal_dimension
is the total number of columns on the taskhorizontal_dimension
columns.intent(inout)
and intent(out)
fields.run
:
horizontal_loop_begin
is typically 1
and horizontal_loop_end
is typically the number of field columns in that array element
Many models (e.g., UFS, CAM6) have blocked data structures where each 'block' is a DDT that contains field arrays.
horizontal_dimension
is made up of the collection of the field sections from each block._run
phase, one 'block' is passed to the suite sohorizontal_loop_extent
becomes the number of columns in that object._init
or_final
phases, schemes expect a flat array containinghorizontal_dimension
columns.capgen needs to support this data model.