FLUMIC 99% worst day electron flux
Model API name: flumic
Version: v1
Model example
# coding=utf-8
import os as os
import numpy as np
import nom_client as nc
from nom_client.nom_client import NoMClient
nom_client = NoMClient("FLUMIC example")
sapre_model = nom_client.get_model("sapre")
sapre_model.set_params(
planet=3,
missionDurationUnits=1,
missionDuration=10,
orbitType='GEO',
trajectoryOrbits=1, trajectoryDuration=1,
trajectoryFlag=1
)
res = nom_client.run_model(model=sapre_model)
print(res)
local_model = nom_client.get_model("flumic")
local_model.set_params(fsc=0.846, fyr=0.707)
local_model.set_external_input(
external_input_name='trajectory', external_input=res)
#
reslocal = nom_client.run_model(model=local_model)
print(reslocal)
outLocal = reslocal['orbit_averaged_electron_spectrum']
to_m2srs = 1e4 / (4 * 3.1415927)
# Flux: #/m2/sr/s
dictat4_result = np.array([ \
1.8143E+10, 1.0009E+10, 5.5220E+09, 3.0464E+09, 1.6807E+09, 9.2722E+08, \
5.1154E+08, 2.8221E+08, 1.5569E+08, 8.5895E+07, 4.7388E+07, 2.6143E+07, \
1.4423E+07, 7.9571E+06, 4.3899E+06, 2.4219E+06, 1.3361E+06, 7.3713E+05, \
4.0667E+05, 2.2436E+05]) / to_m2srs
E = outLocal.get_variable_data('energy').squeeze()
u = outLocal.get_metadata().get('variables')[1]['units']
print("{0:>8} {1:>12} {2:>12} {3:>9}".format("Energy", "FLUMICv3", "SPENVIS", "rel diff"))
print("{0:>8} {1:>12} {2:>12} {3:>9}".format("[MeV]", "[" + u + "]", "[#/cm2/s]", "[%]"))
for i, v in enumerate(outLocal.get_variable_data('integral_flux').squeeze()):
print("{0:8.3f} {1:12.4e} {2:12.4e} {3:8.3f}%".format(
E[i], v, dictat4_result[i], (v / dictat4_result[i] - 1) * 100.0))
Model references
No references