Пример #1
0
 def _process_coord(section_name, d, temp_d):
     # build two-stage lookup table (by axis type, then standard name)
     section_d = d.pop(section_name, dict())
     for k, v in section_d.items():
         ax = v['axis']
         entry = data_model.coordinate_from_struct(v, name=k)
         d['axes'][k] = entry
         temp_d[ax][entry.standard_name] = entry
     return (d, temp_d)
Пример #2
0
 def _pod_dimension_from_struct(name, dd, v_settings):
     class_dict = {
         'X': VarlistLongitudeCoordinate,
         'Y': VarlistLatitudeCoordinate,
         'Z': VarlistVerticalCoordinate,
         'T': VarlistPlaceholderTimeCoordinate,
         'OTHER': VarlistCoordinate
     }
     try:
         return data_model.coordinate_from_struct(
             dd, class_dict=class_dict, name=name,
             **(v_settings.time_settings)
         )
     except Exception:
         raise ValueError(f"Couldn't parse dimension entry for {name}: {dd}")