With the UnreferencedNcFilesCleaner NetCDF files are deleted that are no longer referenced by the FEWS database. 

NetCDF files can be imported by reference with the NETCDF-CF_GRID_REFERENCES type. Only the metadata from the nc-file/opendap is imported in this case When the grid is accessed the data is read from the NetCDF file instead from the database. When the imported time series expires the nc files are no longer needed by the FEWS database.  The minimal age prevents that files are deleted while the import or MC-MC synchronization is pending.

To prevent all files are deleted on a configuration error the deletion only occurs when at least one referenced nc-file is found in the specified dir.

Best to run this module once a day. The module will catch up the deletion the next day when the configured dir is temporary unreachable. You can add this module to your daily amalgamate/maintenance workflow.





<?xml version="1.0" encoding="UTF-8"?>
<unreferencedNcFilesCleaner xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews https://fewsdocs.deltares.nl/schemas/version1.0/unreferencedNcFilesCleaner.xsd">
   <minimalAgeNcFile unit="hour" multiplier="0"/>
   <rootDir urlPrefix="$PREFIX$" path="$TEST_DIR$"/>
</unreferencedNcFilesCleaner>
  • No labels