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

Mixed fs limiter #459

Merged
merged 12 commits into from
Dec 12, 2023
Merged

Mixed fs limiter #459

merged 12 commits into from
Dec 12, 2023

Conversation

ta440
Copy link
Collaborator

@ta440 ta440 commented Nov 14, 2023

This pull request adds the ability to apply individual limiters to specific prognostic variables. It does so through a MixedFSLimiter object in gusto/limiters.py which stores a dictionary with user defined sublimiters for certain prognostic variables. A test is of this new functionality is added to the integration-tests/transport/test_limiters.py file.

@ta440 ta440 marked this pull request as ready for review November 16, 2023 02:47
Copy link
Contributor

@tommbendall tommbendall left a comment

Choose a reason for hiding this comment

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

Thanks Tim, this looks really good and very neatly implemented.

I think the choice of DG1 and DG1 equispaced for the different spaces in the test makes sense, and it's good to demonstrate that this will in theory work when the tracers are in different spaces.

I have two very very trivial suggestions about docstrings, then this will be good to go on



class MixedFSLimiter(object):
"""An object to hold a dictionary that defines limiters for transported prognostic
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"""An object to hold a dictionary that defines limiters for transported prognostic
"""
An object to hold a dictionary that defines limiters for transported prognostic

When the docstrings go over more than one line, I think we should generally put the open quotation marks on their own line

def __init__(self, equation, sublimiters):
"""
Args:
equation (:class: 'PrognosticEquationSet'): the prognostic equation(s)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
equation (:class: 'PrognosticEquationSet'): the prognostic equation(s)
equation (:class:`PrognosticEquationSet`): the prognostic equation(s)

I think we need a back quotation here and not forward ones!

Copy link
Contributor

@tommbendall tommbendall left a comment

Choose a reason for hiding this comment

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

Looks great Tim, thanks and sorry it's taken a while to get this approved!

@tommbendall tommbendall merged commit 64dc08c into main Dec 12, 2023
4 checks passed
@tommbendall tommbendall deleted the mixed_fs_limiter branch December 28, 2023 12:39
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