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.
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)
https://github.com/ufs-community/ccpp-physics/pull/41