source: CCCC/branches/branch-apm/USAGE_amap2nco.txt @ 143

Subversion URL: http://proj.badc.rl.ac.uk/svn/exarch/CCCC/branches/branch-apm/USAGE_amap2nco.txt@557
Revision 143, 1.5 KB checked in by mjuckes, 7 years ago (diff)

extended attribute mapping support to prompt for missing global attriutes

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