Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@oelbert
Copy link
Collaborator

@oelbert oelbert commented Apr 25, 2025

Description
This PR adds some features used in the SHiELD physics for surface routines, mostly namelist parameters, along with a new basic stencil for averaging fields and a tridiagonal solver.

How Has This Been Tested?
Surface physics schemes have been tested and validated with this branch

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included

Copy link
Collaborator

@romanc romanc left a comment

Choose a reason for hiding this comment

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

The linter seems unhappy 😢 Since I don't understand much of nameslists/constants and how they are used, I focused on nitpicking ;)

Would it make sense to have ndsl/stencils/solvers.py such that users can

from ndls.stencils.solvers import masked_tridiagonal_solver

write imports like the above one? If (in the future) we get to many, many solvers in the future, we could even do subfolders like

from ndsl.stencils.solvers.tridiagonal import thomas_algorithm

I'm just thinking out loud here. It might be too early to do that kind of name changes ...

I also think it would be nice to have a simple test for the tridiagonal solvers.

b: diagonal matrix coefficients
c: upper-diagonal matrix coefficients
d: Result vector
mask:
Copy link
Collaborator

Choose a reason for hiding this comment

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

description for mask is missing ...

@oelbert
Copy link
Collaborator Author

oelbert commented May 9, 2025

File "/__w/NDSL/NDSL/pace/pace/state.py", line 14, in <module> from pyFV3 import DycoreState ImportError: cannot import name 'DycoreState' from 'pyFV3' (unknown location)

what?

@fmalatino
Copy link
Contributor

File "/__w/NDSL/NDSL/pace/pace/state.py", line 14, in <module> from pyFV3 import DycoreState ImportError: cannot import name 'DycoreState' from 'pyFV3' (unknown location)

what?

@oelbert This error also popped up previously, update your base branch and you should be good, i think.

@romanc
Copy link
Collaborator

romanc commented May 10, 2025

File "/__w/NDSL/NDSL/pace/pace/state.py", line 14, in <module> from pyFV3 import DycoreState ImportError: cannot import name 'DycoreState' from 'pyFV3' (unknown location)

what?

NDSL has a hook to run tests from pace. These pace tests had issues with pip and editable installs (what Frank talked about in the last pace meeting). These issues were preliminarily resolved with NOAA-GFDL/pace#117. Your changes have nothing to do with this and just open a PR at the wrong moment. The test hook just pulls pace's latest state and with 117 merged the workflow runs again as it should. Updating the base branch of NDSL is the easiest way to re-trigger a pipeline run and this is why it seems to fix the problem. But actually, all of this has nothing to do with any (of your) changes in NDSL.

Copy link
Collaborator

@FlorianDeconinck FlorianDeconinck left a comment

Choose a reason for hiding this comment

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

LGTM

@FlorianDeconinck FlorianDeconinck merged commit 4cda272 into NOAA-GFDL:develop May 13, 2025
5 checks passed
@oelbert oelbert deleted the feature/lsm branch August 14, 2025 18:50
@oelbert oelbert restored the feature/lsm branch August 14, 2025 18:51
@oelbert oelbert deleted the feature/lsm branch August 14, 2025 18:53
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.

4 participants