Open cponder opened 1 year ago
An easy way to manage is this is (bash syntax)
if [[ ! -v ESMF_NETCDF_C ]]
then
ESMF_NETCDF_C=$ESMF_NETCDF
fi
if [[ ! -v ESMF_NETCDF_CXX ]]
then
ESMF_CXX=$ESMF_NETCDF
fi
# etc.
This way, if the libs are all in the same directory, we just point the individual paths there. Then build-scripts following the old convention will still work.
For the record, this variable seems to be enough of a workaround for now:
export ESMF_F90COMPILEOPTS="-I $NETCDF_F/include -I $MPI/include"
@cponder - ESMF's build system does support the NetCDF split for C (implementation of NetCDF), and separate Fortran bindings. Unfortunately the ESMF user's guide (https://earthsystemmodeling.org/docs/nightly/develop/ESMF_usrdoc/node10.html#SECTION000104200000000000000) does not discuss this feature to the full depth of it. However, see under the nc-config
option of ESMF_NETCDF
, where it says that nf-config
will be looked for, and if found functional will be used for the Fortran bindings of NetCDF.
Internally what happens is that the ESMF_NETCDF*
are for the C implementation of NetCDF, but there are also a set of ESMF_NETCDFF*
variables that are used for the Fortran bindings. The default of the latter INCLUDE
, LIBPATH
, and LIBS
vars the same as used to find the C implementation of NetCDF. However, if either of the variables is found in the user environment or set via nf-config
, it will be used instead.
Since NetCDF has been split into separate C/Fortran/C++/etc. distributions with disjointed versions, there are some systems where the libraries are stored in separate directories. The ESMF variables, though, don't seem to allow for this since there is only one variable to set:
Can you please split these up
but also tell me how I can add the extra paths in the meantime?