Changeset 1443 for trunk/libIGCM


Ignore:
Timestamp:
04/26/18 11:45:45 (6 years ago)
Author:
sdipsl
Message:
  • r1442 was not sufficient to fine tune cfsites output.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_post/xios_parser.py

    r1442 r1443  
    210210def modifyDR2XML(args): 
    211211    """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 
    213213    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') 
    214216     
    215217    # Loop over file_def files 
     
    240242                    elem.set('freq_offset', '0ts') 
    241243                    if args.verbosity >= 2: print elem.tag, elem.attrib 
    242         # Change some elements related to CFsubhr files 
     244        # Change elements related to CFsubhr files 
    243245        for elem in tree.iter(tag='file'): 
    244246            if elem.attrib.get('id') is not None: 
     
    246248                    write=True 
    247249                    elem.set('output_freq', '2ts') 
     250                    elem.set('split_start_offset', '2ts') 
    248251                    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 
    249257        # Ready 
    250258        if write: 
Note: See TracChangeset for help on using the changeset viewer.