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

Reduce library dependencies in ccpp-physics #46

Open
grantfirl opened this issue Mar 2, 2023 · 2 comments
Open

Reduce library dependencies in ccpp-physics #46

grantfirl opened this issue Mar 2, 2023 · 2 comments
Labels
CCPP v7 Needed for CCPP v7 release enhancement New feature or request

Comments

@grantfirl
Copy link
Collaborator

Description

The ccpp-physics repository depends on 3 libraries in NCEPlibs: sp, w3emc, and bacio. The sp library is used by GFS_phys_time_vary.fv3.F90/gcycle/sfccycle (the actual dependency is in sfcsub.F). The dependency is something like 300 lines with comments from the sp library, but it is all contained in splat.F and lapack_gen.F in https://github.com/NOAA-EMC/NCEPLIBS-sp. lapack_gen.F contains code from Numerical Recipes for matrix inversion. splat.F does
Computes cosines of colatitude and Gaussian weights for sets of latitudes according to the comments.

Additionally, several schemes use subroutines from the w3emc library, which also has a dependency on the bacio library.

Solution

It would be relatively straightforward to remove the dependency on the sp library by including the necessary code directly in sfcsub.F, albeit duplicating from the library.

Removing the w3 dependency looks like significantly more work.

@ChunxiZhang-NOAA also mentioned a more complete refactoring of gcycle to remove the dependency.

Alternatives (optional)

Keep the dependencies.

Related to (optional)

#41

@scrasmussen
Copy link

Just making a note that I've assigned myself to work on this issue

@grantfirl
Copy link
Collaborator Author

FYI, if you search for w3movdat and w3difdat, that should give you the files with dependency on the w3 library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CCPP v7 Needed for CCPP v7 release enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants