Add NETCDFF_CONFIG flag to support NetCDF > 4.9.1 #1072
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Summary
Updates executable generation to support NetCDF > 4.9.1
Description
As of
netcdf-c 4.9.2
the ability to accessnf-config
values vianc-config
is no longer supported. For example, the commandsnc-config --flibs
ornc-config --fc
no longer work. See this outdated documentation for more examples.This behavior is currently hardcoded into the generation of the WW3 NetCDF pre- and post-processing executables. This PR adds a new environment variable
NETCDFF_CONFIG
whose value should be the path ofnf-config
. This environment variable will be required for versions of NetCDF-c > 4.9.1. If using a version of NetCDF-c < 4.9.1,NETCDFF_CONFIG
is optional and it's value will be set to the provided value forNETCDF_CONFIG
, and thus this change is backwards compatible.Issue(s) addressed
No specific issues, although may help with #392.
Commit Message
Add NETCDFF_CONFIG flag to support NetCDF > 4.9.1
Check list
Testing
I would appreciate some guidance on how to test these changes -- I have tested this locally extensively by building and running WW3 (specifically by compiling the netcdf executables with
./model/bin/w3_automake ww3_ounf ww3_prnc ww3_ounp
as well asww3_multi
with the same command), but I am new to the WW3 test frameworks and am unclear which (if any) of the tests in this repo would appropriate to run.