Changeset 340


Ignore:
Timestamp:
05/06/15 15:35:25 (5 years ago)
Author:
mjuckes
Message:

updates to iso 8601 check and esa-cci config

Location:
CCCC/trunk/ceda_cc
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • CCCC/trunk/ceda_cc/config/esacci_vocabs/cciProject.txt

    r307 r340  
    1212Sea Surface Temperature GHRSST 
    1313Soil Moisture SOILMOISTURE 
    14 GLOB SNOW  GlobSnow 
     14Snow cover  GlobSnow 
  • CCCC/trunk/ceda_cc/config/esacci_vocabs/procLevel01.txt

    r307 r340  
    1212IND 
    1313L3A 
     14L3B 
  • CCCC/trunk/ceda_cc/config/esacci_vocabs/sensors.txt

    r302 r340  
    6666Poseidon-1 
    6767TMI 
     68SSMIS 
  • CCCC/trunk/ceda_cc/config/esacci_vocabs/variableInFile.txt

    r307 r340  
    66OC_PRODUCTS chlor_a mass_concentration_of_chlorophyll_a_in_sea_water 
    77SWE SWE lwe_thickness_of_surface_snow_amount 
     8SWE_max SWE_max lwe_thickness_of_surface_snow_amount 
     9SWEweekly SWE_avg lwe_thickness_of_surface_snow_amount 
  • CCCC/trunk/ceda_cc/config/esacci_vocabs/variables.txt

    r307 r340  
    6868Soil water index degree of saturation anomalies SWISA 
    6969Snow Water Equivalent SWE 
     70Snow Water Equivalent SWE_max 
  • CCCC/trunk/ceda_cc/config_c4.py

    r326 r340  
    462462               'time_coverage_duration':utils.patternControl( 'time_coverage_duration',  'ISO8601 duration', cls='ISO',examples=['P1Y'] ), \ 
    463463               'spatial_resolution':utils.patternControl( 'spatial_resolution',  '([0-9]+(.[0-9]+){0,1})[\s]*(km|m|degree).*', examples=['20km','1 km at nadir'] ), \ 
    464                'project':utils.listControl( 'project', ['Climate Change Initiative - European Space Agency','CLIPC'] ), \ 
     464               'project':utils.listControl( 'project', ['Climate Change Initiative - European Space Agency','CLIPC','ESA GlobSnow-2'] ), \ 
    465465               'cciProject':utils.listControl( 'cciproject', cciProjectList ), \ 
    466466               'var':utils.listControl( 'var', lrdr.getSimpleList( 'variables.txt', bit=-1 ) ) \ 
  • CCCC/trunk/ceda_cc/unitTestsS1.py

    r317 r340  
    285285 
    286286 
    287  
     287testId = '#06.001' 
     288pc = utils_c4.patternControl( 'pattern test', 'ISO8601 duration', cls='ISO' ) 
     289res = pc.check( 'P1Z' ) 
     290if res: 
     291  print 'Failed: [%s] Invalid value passed' % (testId) 
     292else: 
     293  print 'OK: [%s] Invalid value rejected %s' % (testId,str(res)) 
     294res = pc.check( 'P1W' ) 
     295if res: 
     296  print 'OK: [%s] Valid value passed' % (testId) 
     297else: 
     298  print 'Failed: [%s] Valid value rejected %s' % (testId,str(res)) 
     299 
  • CCCC/trunk/ceda_cc/utils_c4.py

    r331 r340  
    334334        if len(bits) == 8: 
    335335          self.fnDict['additional'] = bits[-3] 
    336          
     336 
     337           
     338     
    337339    if self.pcfg.groupIndex != None: 
    338340      self.group = self.fnParts[self.pcfg.groupIndex] 
     
    353355 
    354356    self.var = self.fnParts[self.pcfg.varIndex] 
     357    print self.fnDict 
     358    if self.pcfg.projectV.id in ['ESA-CCI']: 
     359      if  self.fnDict['project'] == 'GlobSnow': 
     360        if self.fnDict['additional'] == 'weekly': 
     361          self.var += 'weekly' 
    355362 
    356363    if self.pcfg.fnvdict != None: 
     
    10651072        assert pattern in ['ISO8601 duration'], 'value of pattern [%s] for ISO constraint not recognised' % pattern 
    10661073        if pattern == 'ISO8601 duration': 
    1067           thispat = '^(P([0-9]+Y){0,1}([0-9]+M){0,1}([0-9]+D){0,1}(T([0-9]+H){0,1}([0-9]+M){0,1}([0-9]+(.[0-9]+){0,1}S){0,1}){0,1})$' 
     1074          thispat = '^(P([0-9]+Y){0,1}([0-9]+M){0,1}([0-9]+D){0,1}(T([0-9]+H){0,1}([0-9]+M){0,1}([0-9]+(.[0-9]+){0,1}S){0,1}){0,1})$|^(P[0-9]+W)$' 
    10681075        self.re_pat = re.compile( thispat ) 
    10691076        self.pattern = thispat 
Note: See TracChangeset for help on using the changeset viewer.