Changeset 141 for CCCC/trunk/README.txt


Ignore:
Timestamp:
31/03/14 16:07:37 (7 years ago)
Author:
mjuckes
Message:

Updated virtual test and correction script generation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CCCC/trunk/README.txt

    r137 r141  
    2121  --blfmode <mode>      # set mode for batch log file -- see log file modes 
    2222  --flfmode <mode>      # set mode for file-level log file -- see log file modes 
     23  --aMap                # Read in some attribute mappings and run tests with virtual substitutions, see also map2nco.py 
    2324 
    2425 
     
    7172"git clone git://uv-cdat.llnl.gov/gitweb/cordex-cmor-tables.git" 
    7273 
     74VIRTUAL MODE 
     75------------ 
     76 
     77The virtual mode can be used to validate substituions before adjusting systems which have been used to generate data, or as the first step of a procedure for repairing some classes of errors. 
     78 
     79To use this mode, a mapping file is needed. This can be generated by an initial run of the checker with no virtual substitutions. A file naemd "amapDraft.txt" will be generated. This file should be inspected to ensure that suggested changes make sense. 
     80 
     81A typical directive will be of the form: 
     82@var=rlus;standard_name=surface_upward_longwave_flux_in_air|standard_name=surface_upwelling_longwave_flux_in_air 
     83 
     84The meaning is: for variable "rlus", set the attribute "standard_name" to "surface_upwelling_longwave_flux_in_air" where the input file has "surface_upward_longwave_flux_in_air". 
     85 
     86If run with the --aMap flag, the checker will test attributes after making virtual substituions. I.e. there are no changes made to the files at this stage, but results of the tests apply as if changes have been made. 
     87 
     88After running in virtual mode, c4.py will generate a file named "attributeMappingsLog.txt" which contains a record for every change to every file. If the results of running in virtual mode are positive, this file can be used to create a script to modify the files, by running "amap2nco.py": 
     89 
     90python amap2nco.py attributeMappingsLog.txt /tmp/batch1 /tmp/batch1_corrected 
     91## this will generate a list of NCO commands in "ncoscript.sh", which will apply the changes and create new files in "/tmp/batch1_corrected". 
     92 
     93It is recommended that the data values in the corrected files should be checked after running this script. 
     94 
     95By default, the amap2nco.py program will generate commands to modify the tracking_id and creation_date global attributes at the same time as making other changed. The "history" attribute is modified by the NCO library.  
     96 
    7397EXCEPTIONS 
    7498---------- 
Note: See TracChangeset for help on using the changeset viewer.