Skip to content

Improve Stochastic Physics PSyclone Scripts by Grouping Functionalities into Reusable Functions #167

@jasonjunweilyu

Description

@jasonjunweilyu

Are there any linked Issues or Pull Requests?

No response

Brief description

During the review of PR #65 , the code reviewer has pointed out that functionalities in Stochastic Physics Psyclone scripts can be grouped into functions and relocated to https://github.com/MetOffice/lfric_core/blob/main/infrastructure/build/psyclone/psyclone_tools.py , for reuse by different PSyclone scripts. This can improve the modularity and reduce the length and duplication of the Psyclone script.

Further details of the issue.

The details are in the conversations of PR #65 during the code review stage. Specifically, the current issues of the Stochastic Physics Psyclone scripts are:

  1. Duplication of codes between different Stochastic Physics Psyclone scripts.
  2. Logics of initializing different transforms based on OFFLOAD_DIRECTIVES can be grouped into a function.
  3. Some parts of the codes can be replaced by calling redundant_computation__setval and colour_loops.
  4. GPU-related transformation codes can be grouped into a function with better if and try logic.
  5. OpenMP transformation codes can also be grouped into a function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions