Skip to content

Add Fortran API for FunctionSpace checksum with array support#389

Merged
wdeconinck merged 3 commits into
developfrom
feature/fortran_functionspace_checksum_array
Jun 16, 2026
Merged

Add Fortran API for FunctionSpace checksum with array support#389
wdeconinck merged 3 commits into
developfrom
feature/fortran_functionspace_checksum_array

Conversation

@wdeconinck

@wdeconinck wdeconinck commented Jun 15, 2026

Copy link
Copy Markdown
Member

This pull request improves the Fortran API for function space checksums, with a focus on deprecating old methods, expanding array API support, and improving deprecation handling. The changes also include new tests and internal refactoring to support these updates.

Key changes:

Deprecation Handling and Warnings

  • Introduced a new atlas_Deprecation_module.F90 that provides environment-variable-controlled deprecation warnings and errors, allowing users to enable or disable deprecation messages for legacy API usage. [1] [2]
  • Updated get_checksum methods in CellColumns, EdgeColumns, and NodeColumns modules to emit warnings or errors (with clear migration guidance) when used, utilizing the new deprecation module and providing one-time warning subroutines. [1] [2] [3]

Array API Expansion and Refactoring

  • Refactored atlas_FunctionSpace_module.F90 to a Fypp template (atlas_FunctionSpace_module.fypp), and added a family of checksum_<dtype>_r<rank> functions, enabling direct checksum computation on arrays of various types and ranks. The generic checksum interface is now expanded to include these. [1] [2] [3] [4] [5]

Testing Improvements

  • Added a new test (test_blockstructuredcolumns_checksum_array_api) to verify the new array API for checksums, ensuring correct results for various array slices and dimensions.

These changes modernize the Fortran API, encourage migration to new interfaces, and provide robust mechanisms for managing deprecated functionality.

💣💥☠️ Static Analyzer Report ☠️💥💣
https://sites.ecmwf.int/docs/atlas/static-analyzer/PR-389

@wdeconinck wdeconinck merged commit af42e52 into develop Jun 16, 2026
235 of 236 checks passed
@wdeconinck wdeconinck deleted the feature/fortran_functionspace_checksum_array branch June 16, 2026 07:18
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.

1 participant