for year in $(seq 1750 1781) ; do rm -f /gws/smf/j04/c3s311a_lot2/workflow/r2.0/lite/land/outputs/log/success/0/0-${year}-sub_daily-CDM_lite_SecondRelease_SZUbasel-.psv ; done
7. Recreate tables and indexes from scripts...messsy
Write SQL files, already exist!!!
$ pwd
/home/users/astephen/glamod/glamod-ingest
$ for year in $(seq 1755 1781) ; do $PSQL_PREFIX -f /gws/smf/j04/c3s311a_lot2/workflow/r2.0/lite/land/sql/outputs/0/load-0-${year}.sql ; done
I accidentally deleted some old (small) tables:
lite_2_0.observations_1754_land_0 ... lite_2_0.observations_1781_land_0
Resolved with:
regenerate them, and their indexes etc, from the scripts, I can just use the scripts in: /usr/local/database_scripts/sql/lite_2_0
repopulate them, working out which data is relevant, from:
Work out which are relevant:
So: this is the path: "sub_daily-CDM_lite_SecondRelease_SZUbasel"
How many match? Just:
Rerun with:
Checkout version that still overwrites source_id etc
$ git checkout e2683ffda9306eeec43e1f7c6a9030a1c6cf4c69
for year in $(seq 1750 1781) ; do rm -f /gws/smf/j04/c3s311a_lot2/workflow/r2.0/lite/land/outputs/log/success/0/0-${year}-sub_daily-CDM_lite_SecondRelease_SZUbasel-.psv ; done
./scripts/land/restructure-land.py -r r2.0 -b sub_daily-CDM_lite_SecondRelease_SZUbasel-
Get local version again
$ git checkout master
Write SQL files, already exist!!!
Re-add
date
column: