cedadev / ceda-cc

CEDA File Compliance Checker
1 stars 3 forks source link

Configure for use with CCMI #8

Closed martinjuckes closed 3 years ago

martinjuckes commented 3 years ago

See https://github.com/cedadev/ccmi-2022/issues/6

Currently read MIP tables from text files (CMIP5 format) .. would be preferable to update to read JSON format. The MipTableScan class in /ceda_cc_config/utils_config.py should be replaced. Code should be much simpler than parsing of ad-hoc text format.

Experiment and model vocabularies also need updating. Should also migrate to using json.

A block of code is needed in config_c4.py to adapt:

    elif project == 'CCMI':
      lrdr = readVocab( 'ccmi_vocabs/')
      self.requiredGlobalAttributes = [ 'creation_date', 'tracking_id', 'forcing', 'model_id', 'parent_experiment_id', 'parent_experiment_rip', 'branch_time', 'contact', 'institute_id' ]
      self.requiredGlobalAttributes = lrdr.getSimpleList( 'globalAts.txt', bit=0 )
      self.controlledGlobalAttributes = [ 'experiment_id', 'project', 'frequency' ]
      self.globalAttributesInFn = [None,'@mip_id','model_id','experiment_id','@ensemble']
      self.requiredVarAttributes = ['long_name', 'units']
      self.drsMappings = {'variable':'@var', 'institute':'institute_id', 'product':'product', 'experiment':'experiment_id', \
                        'ensemble':'@ensemble', 'model':'model_id', 'realm':'modeling_realm', \
                        'frequency':'frequency',  'table':'@mip_id',
                        'project':'project_id'}
charliepascoe commented 3 years ago

/datacentre/arrivals/users/erozanov/ccmi-2022/v20210319

martinjuckes commented 3 years ago

@variant check added .. filename variant_label is checked both against global attribute and the indices.

martinjuckes commented 3 years ago

Could do with unit test for above

martinjuckes commented 3 years ago

Code now being used for CCMI 2022