-
Notifications
You must be signed in to change notification settings - Fork 0
/
USAGE_amap2nco.txt
36 lines (28 loc) · 1.52 KB
/
USAGE_amap2nco.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
amap2nco.py
USAGE:
python amap2nco.py mappingsFile inputDirectoryBase outputDirectoryBase
mappingsFile: text file containing mapping information, generated by c4.py
inputDirectoryBase: initial part of the directory tree, to be replaced for corrected files
outputDirectoryBase: initial part of directory tree to be used for corrected files.
WARNING
Note that this feature will only correct errors where there is an unambiguous correct value
Users should check intermediary files to ensure that changes make sense
Example workflow
----------------
## (1) Run the checking program
python c4.py -p CORDEX -D /tmp/batch1 --ld batch1_logs
## (2) Move mapping file
## After checking, mv the amapDraft.txt file generated by c4.py
mv amapDraft.txt amap_batch1.txt
## (3) Checking in virtual substitution mode
## Run the checking program in 'virtual substition' mode, using the --aMap flag. If all errors are captured by the
## substition list generated the code will indicate that there are no remaining errors.
python c4.py -p CORDEX -D /tmp/batch1 --ld batch1_logs --aMap amap_batch1.txt
## (4) Generate a script of NCO commands
## After running in virtual mode, a list of changes per file and attribute will be in the "attributeMappingsLog.txt" file.
## Run amap2nco.py to generate a script of NCO commands:
python map2nco.py attributeMappingsLog.txt /tmp/batch1 /tmp/batch1_corrected
## (5) Run the script to update files.
bash ncoscript.sh
## (6) Check the modified files
python c4.py -p CORDEX -D /tmp/batch1_corrected --ld batch1_corrected_logs