Changeset 329
- Timestamp:
- 20/05/15 09:59:51 (6 years ago)
- Location:
- CCCC/trunk/ceda_cc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
CCCC/trunk/ceda_cc/config/specs_vocabs/drsMappings_sv0101.txt
r299 r329 7 7 realm modeling_realm 8 8 frequency frequency 9 start_date @forecast_reference_time9 start_date start_date 10 10 table @mip_id 11 11 project project_id -
CCCC/trunk/ceda_cc/config/specs_vocabs/globalAttributesInFn_sv0101.txt
r295 r329 5 5 startdate 6 6 @ensemble 7 @forecast_reference_time:4: -
CCCC/trunk/ceda_cc/utils_c4.py
r317 r329 650 650 m = [] 651 651 for i in range(len(self.globalAttributesInFn)): 652 if self.globalAttributesInFn[i] != None and self.globalAttributesInFn[i][0] != '*': 653 targVal = fnParts[i] 654 if self.globalAttributesInFn[i][0] == "@": 655 if self.globalAttributesInFn[i][1:] == "mip_id": 652 gaif = self.globalAttributesInFn[i] 653 if gaif != None and gaif[0] != '*': 654 if gaif[-1] == ':': 655 bits = string.split(gaif,':') 656 gaif0 = gaif 657 gaif = bits[0] 658 ix = int(bits[1]) 659 else: 660 ix = i 661 662 targVal = fnParts[ix] 663 if gaif[0] == "@": 664 if gaif[1:] == "mip_id": 656 665 bits = string.split( globalAts[ "table_id" ] ) 657 666 if len( bits ) > 2 and bits[0] == "Table": … … 660 669 thisVal = globalAts[ "table_id" ] 661 670 self.test( False, 'Global attribute table_id does not conform to CMOR pattern ["Table ......"]: %s' % thisVal, part=True) 662 elif self.globalAttributesInFn[i][1:] == "ensemble":671 elif gaif[1:] == "ensemble": 663 672 thisVal = "r%si%sp%s" % (globalAts["realization"],globalAts["initialization_method"],globalAts["physics_version"]) 664 673 ## following mappings are depricated -- introduced for SPECS and withdrawn --- 665 elif self.globalAttributesInFn[i][1:] == "experiment_family":674 elif gaif[1:] == "experiment_family": 666 675 thisVal = globalAts["experiment_id"][:-4] 667 elif self.globalAttributesInFn[i][1:] == "forecast_reference_time":676 elif gaif[1:] == "forecast_reference_time": 668 677 x = self.globalAts.get("forecast_reference_time",'yyyy-mm-dd Thh:mm:ssZ' ) 669 678 thisVal = "S%s%s%s" % (x[:4],x[5:7],x[8:10]) 670 elif self.globalAttributesInFn[i][1:] == "series":679 elif gaif[1:] == "series": 671 680 thisVal = 'series%s' % globalAts["series"] 672 681 else: … … 674 683 675 684 else: 676 thisVal = globalAts[ self.globalAttributesInFn[i]]685 thisVal = globalAts[gaif] 677 686 678 687 if thisVal not in [targVal,'__errorReported__']:
Note: See TracChangeset
for help on using the changeset viewer.