Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update-and-replace metadata script #46

Open
corviday opened this issue Dec 10, 2020 · 0 comments
Open

Update-and-replace metadata script #46

corviday opened this issue Dec 10, 2020 · 0 comments

Comments

@corviday
Copy link
Contributor

corviday commented Dec 10, 2020

Many files in modelmeta have incorrect metadata. It is extremely laborious to update them - usually index_metadata detects a "conflict" when a file has updated metadata, so you have to remove it from the database, update it, reindex it, and re-add it to ensembles. It is slow and fussy work.

It would be easy to automate this process with a wrapper script that calls the various other tools.This script should:

  • Accept a database, a a dataset file, and a .yaml.
  • Connect to the database and note which ensembles the file is part of
  • Delete the file from the database
  • run update_metadata on the dataset file using the *.yaml
  • index the file into the database using index_netcdf
  • associate the file to all previously-noted ensembles using associate_ensemble

Alternately, index_netcdf could be updated to handle "conflicts" in a more sophisticated fashion and allow updates to dataset metadata more easily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant