Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalization of advection-related subroutines in mpas_atm_time_integration.F #1162

Merged
merged 1 commit into from
May 1, 2024

Conversation

ldfowler58
Copy link
Contributor

This PR makes a couple of corrections to subroutines related to advection of "scalars" like arrays in mpas_atm_time_integration.F. These corrections will allow us to call subroutine advance_scalars for
state-related arrays different than scalars (for instance, aerosols and passive tracers).

We modified two subroutines:

  • In subroutine advance_scalars, we replaced 'num_scalars' with 'num_'//trim(field_name) (see line 1355).

  • In subroutine atm_advance_scalars_mono_work, we replaced 'dynamics:'scalars_old' with 'dynamics:'//trim(field_name)//'_old' (see line 3405).

…_advance_scalars_mono_work

  so that they can be called with state arrays different than "scalars":

  -> in subroutine advance_scalars, modified the line:
        call mpas_pool_get_dimension(state, 'num_scalars', num_scalars)
     to
        call mpas_pool_get_dimension(state, 'num_'//trim(field_name), num_scalars)

     to expand the definition of num_scalars to state arrays different than "scalars".

  -> in subroutine atm_advance_scalars_mono_work, modified the line:
        call exchange_halo_group(block % domain, 'dynamics:scalars_old')
     to
        call exchange_halo_group(block % domain, 'dynamics:'//trim(field_name)//'_old')

     so that halo exchange can be applied to state arrays different than "scalars".
@mgduda mgduda self-requested a review April 30, 2024 19:41
@mgduda mgduda changed the base branch from master to develop April 30, 2024 19:42
@mgduda mgduda merged commit 0e1e967 into MPAS-Dev:develop May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants