Changeset 1435 for trunk/libIGCM


Ignore:
Timestamp:
04/11/18 16:10:20 (6 years ago)
Author:
sdipsl
Message:
  • Need to fine tune dr2xml_LMDZ.xml before using it. Find below the current state of play of the required fine tuning.

Reading dr2xml_def_xml= dr2xml_LMDZ.xml
context {'id': 'LMDZ'}

field {'operation': 'average', 'field_ref': 'CMIP6_albisccp', 'id': 'CMIP6_albisccp_average', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'average', 'field_ref': 'CMIP6_cfadDbze94', 'id': 'CMIP6_cfadDbze94_average', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'instant', 'field_ref': 'CMIP6_cfadDbze94', 'id': 'CMIP6_cfadDbze94_instant', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'average', 'field_ref': 'CMIP6_cfadLidarsr532', 'id': 'CMIP6_cfadLidarsr532_average', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'instant', 'field_ref': 'CMIP6_cfadLidarsr532', 'id': 'CMIP6_cfadLidarsr532_instant', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'instant', 'field_ref': 'CMIP6_clcalipso2', 'id': 'CMIP6_clcalipso2_instant', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'average', 'field_ref': 'CMIP6_clcalipso', 'id': 'CMIP6_clcalipso_average', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'instant', 'field_ref': 'CMIP6_clcalipso', 'id': 'CMIP6_clcalipso_instant', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'average', 'field_ref': 'CMIP6_clcalipsoice', 'id': 'CMIP6_clcalipsoice_average', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'average', 'field_ref': 'CMIP6_clcalipsoliq', 'id': 'CMIP6_clcalipsoliq_average', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'grid_ref': 'grid_glo_Scalp220', 'freq_offset': '0ts', 'detect_missing_value': 'true', 'freq_op': '3h', 'operation': 'instant', 'id': 'CMIP6_clhcalipso_Scalp220'}
field {'operation': 'average', 'field_ref': 'CMIP6_clhcalipso_Scalp220', 'id': 'CMIP6_clhcalipso_Scalp220_average', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'instant', 'field_ref': 'CMIP6_clhcalipso_Scalp220', 'id': 'CMIP6_clhcalipso_Scalp220_instant', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'average', 'field_ref': 'CMIP6_climodis', 'id': 'CMIP6_climodis_average', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'average', 'field_ref': 'CMIP6_clisccp', 'id': 'CMIP6_clisccp_average', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'instant', 'field_ref': 'CMIP6_clisccp', 'id': 'CMIP6_clisccp_instant', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'grid_ref': 'grid_glo_Scalp840', 'freq_offset': '0ts', 'detect_missing_value': 'true', 'freq_op': '3h', 'operation': 'instant', 'id': 'CMIP6_cllcalipso_Scalp840'}
field {'operation': 'average', 'field_ref': 'CMIP6_cllcalipso_Scalp840', 'id': 'CMIP6_cllcalipso_Scalp840_average', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'instant', 'field_ref': 'CMIP6_cllcalipso_Scalp840', 'id': 'CMIP6_cllcalipso_Scalp840_instant', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'grid_ref': 'grid_glo_Scalp560', 'freq_offset': '0ts', 'detect_missing_value': 'true', 'freq_op': '3h', 'operation': 'instant', 'id': 'CMIP6_clmcalipso_Scalp560'}
field {'operation': 'average', 'field_ref': 'CMIP6_clmcalipso_Scalp560', 'id': 'CMIP6_clmcalipso_Scalp560_average', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'instant', 'field_ref': 'CMIP6_clmcalipso_Scalp560', 'id': 'CMIP6_clmcalipso_Scalp560_instant', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'average', 'field_ref': 'CMIP6_clmisr', 'id': 'CMIP6_clmisr_average', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'instant', 'field_ref': 'CMIP6_clmisr', 'id': 'CMIP6_clmisr_instant', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'average', 'field_ref': 'CMIP6_cltcalipso', 'id': 'CMIP6_cltcalipso_average', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'instant', 'field_ref': 'CMIP6_cltcalipso', 'id': 'CMIP6_cltcalipso_instant', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'average', 'field_ref': 'CMIP6_cltisccp', 'id': 'CMIP6_cltisccp_average', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'average', 'field_ref': 'CMIP6_cltmodis', 'id': 'CMIP6_cltmodis_average', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'average', 'field_ref': 'CMIP6_clwmodis', 'id': 'CMIP6_clwmodis_average', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'average', 'field_ref': 'CMIP6_jpdftaureicemodis', 'id': 'CMIP6_jpdftaureicemodis_average', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'instant', 'field_ref': 'CMIP6_jpdftaureicemodis', 'id': 'CMIP6_jpdftaureicemodis_instant', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'average', 'field_ref': 'CMIP6_jpdftaureliqmodis', 'id': 'CMIP6_jpdftaureliqmodis_average', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'instant', 'field_ref': 'CMIP6_jpdftaureliqmodis', 'id': 'CMIP6_jpdftaureliqmodis_instant', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'average', 'field_ref': 'CMIP6_parasolRefl', 'id': 'CMIP6_parasolRefl_average', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'instant', 'field_ref': 'CMIP6_parasolRefl', 'id': 'CMIP6_parasolRefl_instant', 'freq_offset': '0ts', 'freq_op': '3h'}
field {'operation': 'average', 'field_ref': 'CMIP6_pctisccp', 'id': 'CMIP6_pctisccp_average', 'freq_offset': '0ts', 'freq_op': '3h'}

Writing dr2xml_def_xml= modified.dr2xml_LMDZ.xml
(dataRequest)sdipsl@ciclad-ng:~/DataRequest?.CMIP6/test.output/DR2XML_DUMMY_FULL.HEAVY> ~/libIGCM/libIGCM_post/xios_parser.py -vvv modifyDR2XML --file dr2xml_nemo.xml

Reading dr2xml_def_xml= dr2xml_nemo.xml
context {'id': 'nemo'}

field {'grid_ref': 'grid_T_2D_Scaltypesi', 'freq_offset': '0ts', 'detect_missing_value': 'true', 'freq_op': '2ts', 'operation': 'instant', 'id': 'CMIP6_siconc_Scaltypesi'}

Writing dr2xml_def_xml= modified.dr2xml_nemo.xml

File:
1 edited

Legend:

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

    r1434 r1435  
    211211    """Recursively find tree element with file tag and change the path prefix of the name attribute.""" 
    212212 
     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     
    213215    # Loop over file_def files 
    214216    for inputFile in args.file: 
     
    227229        # Change file name prefix to point where we want 
    228230        for elem in tree.iter(tag='field'): 
    229             if elem.attrib.get('id') == 'CMIP6_siconc_Scaltypesi': 
    230                 write=True 
    231                 elem.set('freq_op', '2ts') 
    232                 elem.set('freq_offset', '0ts') 
    233                 if args.verbosity >= 2: print elem.tag, elem.attrib 
     231            if elem.attrib.get('id') is not None: 
     232                if elem.attrib.get('id') == 'CMIP6_siconc_Scaltypesi': 
     233                    write=True 
     234                    elem.set('freq_op', '2ts') 
     235                    elem.set('freq_offset', '0ts') 
     236                    if args.verbosity >= 2: print elem.tag, elem.attrib 
     237                elif (elem.attrib.get('id').startswith(cospTuple)): 
     238                    write=True 
     239                    elem.set('freq_op', '3h') 
     240                    elem.set('freq_offset', '0ts') 
     241                    if args.verbosity >= 2: print elem.tag, elem.attrib 
    234242 
    235243        if write: 
Note: See TracChangeset for help on using the changeset viewer.