#60 closed request (Done)
Support for linking to netCDF 4 libraries
Reported by: | m.hadfield | Owned by: | arango |
---|---|---|---|
Priority: | minor | Milestone: | Parallel Input/Output |
Component: | Parallelism | Version: | 3.1 |
Keywords: | make, netcdf | Cc: |
Description
As we know, ROMS will eventually move to using netCDF 4, allowing various enhancements like parallel I/O and compression. In the meantime, I have been experimenting with using netCDF 4 libraries as a direct substitute for netCDF 3 libraries. It turns out that the only change required in ROMS is to add some linker flags to link to the underlying HDF5 and Zlib libraries. For the current versions of netCDF 4 and HDF5 the flags required are:
-lnetcdf -lhdf5_hl -lhdf5 -lz
I suggest the following changes to support this:
- In makefile, add a variable USE_NETCDF4 (similar to the other USE_* variables).
- In the platform-specific makefiles, add an "ifdef USE_NETCDF4" block to set the flags.
Files are attached.
In future I expect USE_NETCDF4 will also be used to set preprocessor flags to support netCDF 4 features in the code.
Attachments (2)
Change History (4)
by , 18 years ago
comment:1 by , 18 years ago
Component: | Nonlinear → Parallelism |
---|---|
Resolution: | → Done |
Status: | new → closed |
Yes, good idea. I compiled ROMS with NetCDF-4 and it runs fine. I added also a macro definition for the location of HDF5 library. HDF5 is usually installed in a different directory.
Notice that for the NetCDF-4 to work, we need to link with both the HDF5 and MPI libraries. The parallel IO for ROMS is now on my priority list. Some changes are needed in ROMS IO structure for the parallel IO.
I also added the linking definitions for the ESMF library.
comment:2 by , 18 years ago
Milestone: | Release ROMS/TOMS 3.0 → Parallel Input/Output |
---|
ROMS make file