class TestComposedModelDiffConstrained(TestCase, ComposedModelTestMixIn): parameters = ("time", "location") options = {"scale": [1, 1, -1]} components = [ (load_model_shc_combined(CHAOS6_STATIC, CHAOS6_CORE_LATEST, to_mjd2000=decimal_year_to_mjd2000_simple), 1.0, { "max_degree": 15 }), (load_model_shc(CHAOS6_CORE_LATEST, to_mjd2000=decimal_year_to_mjd2000_simple), -1.0, { "min_degree": 5, "max_degree": 15 }), ] reference_values = (6201.125, (30.0, 40.0, 6400.0), (31512.85733779784, 2660.412538490814, 30567.851101678763)) validity = (-1058.4945, 7195.49805)
def load(self): return load_model_shc(CHAOS6_CORE_LATEST, validity_start=2000.0, validity_end=2018.0)
def load(self): return load_model_shc(CHAOS6_CORE_LATEST)
def load(self): return load_model_shc(CHAOS6_STATIC)
def load(self): return load_model_shc(MF7)
def load(self): return load_model_shc(LCS1)
def load(self): return load_model_shc(SIFM)
def load(self): return load_model_shc(IGRF12, interpolate_in_decimal_years=True)
mjd2000_to_year_fraction) from geoist.magmod.util import datetime_to_decimal_year, vnorm from geoist.magmod.magnetic_model.parser_mio import parse_swarm_mio_file from geoist.magmod.magnetic_model.tests.data import SWARM_MIO_SHA_2_TEST_DATA import geoist.magmod._pymm as pymm print(SWARM_MIO_SHA_2_TEST_DATA) #DIFI4 is a type of MIO SHA model print(mjd2000_to_decimal_year(7305)) print(mjd2000_to_decimal_year([5479., 7305., 6392.0])) d1 = dt.datetime(2015, 1, 1) # import time , location(lat, lon) d11 = datetime_to_decimal_year(d1) # datetime to decimal year loc = (30.0, 40.0, 1000.0) wmm2015 = load_model_wmm(WMM_2015) #load wmm2015 model igrf11 = load_model_igrf(IGRF11) #load igrf11 model igrf12 = load_model_shc(IGRF12, interpolate_in_decimal_years=True) #load igrf12 model igrf13 = load_model_igrf(IGRF13) wmm2020 = load_model_wmm(WMM_2020) emm = load_model_emm(EMM_2010_STATIC, EMM_2010_SECVAR) #load emm model options = {"scale": [1, 1, -1]} #-1 is Z direction ## renew for the IGRF13 and WMM2020 models on 2020-03-22 d2 = 2022.5 loc1 = (80.0, 0.0, 100.0) wmm2020.eval(decimal_year_to_mjd2000(d2), loc1, 0, 0, **options) igrf13.eval(decimal_year_to_mjd2000(d2), loc1, 0, 0, **options) ## the result has been checked with WMM2020testvalues.pdf wmm2015.eval(decimal_year_to_mjd2000(d11), loc, 0, 0,
def model(self): if not hasattr(self, "_model"): self._model = load_model_shc(IGRF12, interpolate_in_decimal_years=True) return self._model