Changeset 1443 for trunk/libIGCM
- Timestamp:
- 04/26/18 11:45:45 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_post/xios_parser.py
r1442 r1443 210 210 def modifyDR2XML(args): 211 211 """Recursively find tree element with file tag and change the path prefix of the name attribute.""" 212 212 # Need to fine tune their freq_op and freq_offset 213 213 cospTuple=('CMIP6_albisccp', 'CMIP6_cfadDbze94', 'CMIP6_cfadLidarsr532', 'CMIP6_clcalipso2', 'CMIP6_clcalipsoice', 'CMIP6_climodis', 'CMIP6_clisccp', 'CMIP6_clmisr', 'CMIP6_cltmodis', 'CMIP6_clwmodis', 'CMIP6_jpdftaureicemodis', 'CMIP6_jpdftaureliqmodis', 'CMIP6_pctisccp', 'CMIP6_parasolRefl', 'CMIP6_clcalipso', 'CMIP6_clhcalipso', 'CMIP6_cllcalipso', 'CMIP6_clmcalipso', 'CMIP6_cltcalipso', 'CMIP6_cltisccp') 214 # Dont touch those when fine tuning cfsites field freq_op 215 excluded_field=('CMIP6_ap', 'CMIP6_b', 'CMIP6_b_bnds', 'CMIP6_ap_bnds') 214 216 215 217 # Loop over file_def files … … 240 242 elem.set('freq_offset', '0ts') 241 243 if args.verbosity >= 2: print elem.tag, elem.attrib 242 # Change someelements related to CFsubhr files244 # Change elements related to CFsubhr files 243 245 for elem in tree.iter(tag='file'): 244 246 if elem.attrib.get('id') is not None: … … 246 248 write=True 247 249 elem.set('output_freq', '2ts') 250 elem.set('split_start_offset', '2ts') 248 251 if args.verbosity >= 2: print elem.tag, elem.attrib 252 for childElem in elem.iter(tag='field'): 253 if childElem.attrib.get('field_ref') is not None: 254 if childElem.attrib.get('field_ref') not in excluded_field: 255 childElem.set('freq_op', '2ts') 256 if args.verbosity >= 2: print childElem.tag, childElem.attrib 249 257 # Ready 250 258 if write:
Note: See TracChangeset
for help on using the changeset viewer.