-
Notifications
You must be signed in to change notification settings - Fork 340
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
Import netcdf constants for netcdf-only builds #205
base: develop
Are you sure you want to change the base?
Import netcdf constants for netcdf-only builds #205
Conversation
We've found it necessary to make similar changes when using the MPAS-A dycore in CAM/CESM: mgduda@291176d . I'd like to see whether we can reconcile the changes in this PR with those made in commit 291176d. |
That also eliminated build errors. Can you push that to |
@amametjanov Thanks very much for checking! I'll make a PR to |
@amametjanov The problem with the change in 291176d is that it apparently doesn't work when the PIO1 library was compiled with support for only the parallel-netcdf library:
So, it seems that something a little more sophisticated may be needed to handle the various ways that the PIO1 library might be built. |
In E3SM, pio1+parallel_netcdf (no serial netcdf) option is not supported: either pio1+netcdf, or pio1+netcdf+pnetcdf only. |
We do support PIO1 + pnetcdf for stand-alone MPAS-A, so I think we'll need to come up with a solution that supports all three variants of PIO1 builds (netcdf, netcdf+pnetcdf, pnetcdf). My first thought is that we could set additional cpp macros (to be added to |
@mgduda - have you had any luck with this? We're running into a situation in E3SM in which we need this to function on some specific platforms. |
@jonbob @amametjanov Sorry for losing track of this issue. Does the E3SM build environment already define macros that would allow us to determine whether we're building within E3SM? If so, would it work for you all to wrap the |
@mgduda - thanks for jumping back in. Right now we don't define any E3SM macros for the MPAS build, though we do for CIME and some other places -- so it is possible. If you feel strongly, I can pursue adding the flags to the MPAS build as well. |
When PIO is built without pnetcdf, fill value constants NF_FILL_INT, NF_FILL_CHAR etc. are not included. This update fixes build errors in such cases.
[BFB]