Another way to save disk space that WOULD be CF-compliant would be to use the internal compression feature in NetCDF, available in NetCDF4. Many groups are starting to use just the parallel I/O and compression features of NetCDF4, using the same data model as NetCDF3.The real problem of the mask is the excessive use of disk space. The READ_WATER, WRITE_WATER options of ROMS allow to write only the sea points and are certainly nice. However, Hernan indicated me that the resulting files are not CF-compliant. What would be a better solution?
I have seen the NetCDF4 option in the ROMS makefile, but haven't tried it out yet. To enable compression, you should be able to just add a line specifying "deflation" in def_var.F (found in ROMS/Utility).
Existing code (without deflation):
Code: Select all
IF ((nVdim.eq.1).and.(Vdim(1).eq.0)) THEN
status=nf90_def_var(ncid, TRIM(Vinfo(1)), Vtype, &
& varid = Vid)
Code: Select all
status=nf90_def_var(ncid, TRIM(Vinfo(1)), Vtype, &
& varid = Vid)
status=nf90_def_var_deflate(ncid, TRIM(Vinfo(1)), &
& shuffle, deflate,deflate_level)
To access these NetCDF4 files, tools like NcVIEW (or any other tool that wanted to access the files) would just need to be relinked with the NetCDF4 libraries instead of NetCDF3 libraries. (These tools linked with the NetCDF4 libraries would still work with "classic" NetCDF3 files).
Please report back if you try this out!
-Rich