def _processALL(self, fld): if fld.iscentered("face") or fld.iscentered("edge"): if not fld.has_info(viscid.PREPROCESSED_KEY): crd_system = fld.find_info("crd_system", "").lower() if self.find_info("_viscid_do_mhd_to_gse_on_read", False): fld.set_info(viscid.FLIP_KEY, [True, True, False]) fld.set_info(viscid.PREPROCESSED_KEY, False) fld = viscid.make_ecfc_field_leading(fld, trim_leading=True) return fld
def _ecfc_vector_setmeta(self, center, fld): # toggle stagger for Fortran/C3/... stepper as well as mhd->gse transform center = center.title() mhd_type = fld.find_info("ggcm_mhd_fld_mhd_type_str", "UNKNOWN").upper() crd_system = fld.find_info("crd_system", "").lower() stagger = [viscid.STAGGER_LEADING] * 3 if mhd_type.endswith("_GGCM"): stagger = [1 - s for s in stagger] if self.find_info("_viscid_do_mhd_to_gse_on_read", False): fld.set_info(viscid.FLIP_KEY, [True, True, False]) fld.center = center.title() fld.set_info(viscid.STAGGER_KEY, stagger) fld.set_info(viscid.PREPROCESSED_KEY, False) return viscid.make_ecfc_field_leading(fld)