Welcome back to AWIPS Tips!
This week we dive back into more details about managing your own EDEX server! If you are currently running and maintaining an EDEX of your own, and you haven’t already, please check out our existing AWIPS Tips for EDEX. Today, we’re going to talk about how to remove individual grib datasets from your EDEX immediately. This can be particularly helpful when troubleshooting the process of adding new model data to your EDEX, as described in one of our earlier AWIPS Tips.
NOTE: If you’re not in a hurry, or don’t have a particular testing need where this functionality is necessary, you can just wait until the normal EDEX purging mechanism removes the old data. Customizing EDEX purging settings is described in more detail in this blog.
In order to remove a specific dataset from your EDEX (and therefore CAVE), we need to do the following:
- Stop ingesting data
- Remove decoded HDF5 data
- Remove decoded database entries
- Clear cached data on CAVE machine
- Relaunch CAVE
Stop Ingest of Desired Data
Ensure no new grib files for the model of interest are being submitted to EDEX. This can be accomplished in two different ways.
- Modify the ldmd.conf (/awips2/ldm/etc/) to have a “REQUEST” regex that is specific enough to not include the data you wish to exclude. Once that change is made, a restart of LDM is required and can be done by running:
ldmadmin restartThis will eliminate the data from your incoming LDM feed altogether.
- Modify the pqact.conf (/awips2/ldm/etc/) to not have any lines that match the data you want to exclude. In order to implement this change, you must run:
ldmadmin pqactHUPThis eliminates the data being passed off to EDEX to decode and ingest.
Remove Decoded HDF5 Data
Delete the corresponding data in the HDF5 directory: /awips2/edex/data/hdf5/grid/[model]...
Remove Decoded Database Data
Delete the corresponding psql database entries by following these instructions as the awips user:
- Enter the psql environment:
- In the psql environment, view all the dataset ids:
- Make note of the datasetid of the one you wish to remove, we will refer to that id as [DATASETID]
- Delete the related data from the grid table:
- Delete the related data from the grid_info table:
- Verify the data is gone:
psql -U metadata
select distinct datasetid from grid_info;
NOTE: For all psql commands you must include the ; at the end of the command in order for it to run.
delete from grid where info_id in (select id from grid_info where datasetid ilike '[DATASETID]';
NOTE: Do not include [ ], these are just place holders to show where your selected datasetid goes
delete from grid_info where datasetid ilike '[DATASETID]';
NOTE: These two delete commands must be run in this order, otherwise they will fail
select count(*) from grid_info where datasetid ilike '[DATASETID]';
Clear Cached Data on CAVE
On any machines that run CAVE and are connected to EDEX, you’ll need to clear the cache by removing caveData. First, make sure CAVE is shut down and not running. Then, if this is a Linux machine, you can run rm -rf ~/caveData. For all operating systems, see this section in our Common Problems page for instructions.
Launch CAVE and there should be no entries in the Product Browser, under the Grid menu for the model you just removed.
We hope you learned something about how to successfully purge your EDEX of specific model data from this edition of AWIPS Tips. Please check back in two weeks for the next blog post.
Thanks for joining us to learn more about EDEX. Check back in two weeks for the next blog post!
To view archived blogs, visit the AWIPS Tips blog tag, and get notified of the latest updates from the AWIPS team by signing up for the AWIPS mailing list. Questions or suggestions for the team on future topics? Let us know at firstname.lastname@example.org