Skip to content

New driver: ecrad_ifs_field_api#92

Open
reuterbal wants to merge 14 commits intomasterfrom
feature/field_api-rebased
Open

New driver: ecrad_ifs_field_api#92
reuterbal wants to merge 14 commits intomasterfrom
feature/field_api-rebased

Conversation

@reuterbal
Copy link
Collaborator

In CY50R3, a new driver layer around radiation_scheme was added to IFS that allows to dispatch to different variants of the radiation scheme, called radiation_scheme_layer. This is paired with a new way of encapsulating the interpolated input and output fields in a common data structure managed by field_api.
This encapsulation allows to defer the mechanics for required data transfers for GPU execution of the radiation scheme to field_api.

To replicate and test this behaviour in the offline version of ecrad, this PR contributes

  • radintg_zrgp_mod, the packaging functionality for inputs to radiation_scheme and optional encapsulation with field_api;
  • radiation_scheme_layer_mod, the dispatch layer that takes care of unpacking from field_api and calling radiation_scheme from an OpenMP-parallel block loop;
  • a new driver ecrad_ifs_field_api that invokes radiation_scheme via this avenue;
  • some small fixes to the test harness to incorporate field_api into the test runs

The existing blocking driver is updated to share the same indexing infrastructure as the field_api variant.

In IFS, the implementation of radintg_zrgp_mod and radiation_scheme_layer_mod is templated using FYPP. This mechanic has been replicated here but is entirely optional and by default switched off. By default, committed versions of the fypp-generated F90 files are used.

The field-api driver depends on field_api, which is kept as an optional dependency. If not available, the field_api variant is not built.

Copy link
Contributor

@wertysas wertysas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me! I only have two small questions, but no other comments. It will be useful to get the updated driver layer and the FIELD API usage into the standalone.

!$OMP& PRIVATE(KIDIA,KFDIA,IBL,&
!$OMP& ${chunked_join([f'F_{v_name}' for v_name in variable_names], ', &\n!$OMP& ')}$ &
!$OMP& ) &
!$OMP& PRIVATE(&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why these are split it into two private clauses instead of one in this case?

endif()
set( CONFIG_NAM "${CMAKE_CURRENT_BINARY_DIR}/config_${_PAR_NAME}.nam" )
list( APPEND _PAR_NAMELIST_OPTIONS "directory_name=\\\"data\\\"" )
list( APPEND _PAR_NAMELIST_OPTIONS "nblocksize=15" )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, is there a reason for choosing 15 as the blocksize here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants