NCAR / ccpp-scm

CCPP Single Column Model
Other
13 stars 50 forks source link

Reduce GNU Compilation Warnings #424

Closed scrasmussen closed 2 months ago

scrasmussen commented 6 months ago

This PR fixes warnings from the w3emc library warnings because they don't use generic interfaces

The w3emc module commit is just a wrapper to the normal w3emc w3difdat and w3movdat functions but uses generic interfaces in a single file. This means the type warnings only are produced once when compiling the wrapper module, rather than in every file that calls w3difdat and w3movdat. This wrapper file module can easily be removed in the future if the w3emc library decides to move to generic interfaces.

This PR almost fulfills the GNU compiler part of the requirement "Code must compile without errors or warnings. Errors and warnings may not be suppressed, and the compiler warning level ("-W" options) must be at least the default one." as pointed out in https://github.com/ufs-community/ufs-weather-model/issues/1984#issuecomment-1799297076. It also a step towards fulfulling the goal/requirement of no warnings from -Wall, as pointed out in https://github.com/NCAR/ccpp-physics/issues/495.

scrasmussen commented 6 months ago

This PR requires CCPP-Physics PR#1048

grantfirl commented 3 months ago

@scrasmussen There has been talk for quite a while related to eliminating the dependence on any of the NCEPlibs for the SCM and CCPP. I think that the idea was to use the code in https://github.com/NOAA-EMC/NCEPLIBS?tab=readme-ov-file, write modern interfaces that don't produce any warnings, and include the code in the CCPP physics repo. There should really only be a couple hundred lines that are needed from the W3EMC and SP libs.

scrasmussen commented 2 months ago

PR #468 is a better fix to the issue that this PR fixes. Closing this PR