SAPPHIRE total fluence
Model API name: sapphire-total-fluence
SAPPHIRE total fluence model.
Version: v1
Model developer:
Model provision:
Model references:
External Input: trajectory
Input | Value |
---|---|
Model name |
sapre
sapre_upload
|
trajectory
|
Model result name | trajectory |
Quantity | trajectory |
Input group: sep / multiplicity: one
Input | Description | Valid values | Default | Quantity |
---|---|---|---|---|
lowestIonSpecies |
Atomic number of lightest ion.
Must be less than highestIonSpecies |
min: 1 max: 92 note: Must be less than highestIonSpecies |
1 | number |
highestIonSpecies |
Atomic number of heaviest ion.
Must be greater than lowestIonSpecies |
min: 1 max: 92 note: Must be greater than lowestIonSpecies |
92 | number |
predictionPeriodFlag |
Prediction period flag.
0: Automatic, 1: manual entry |
0=Automatic 1=Override |
0 | number |
predictionPeriod |
Prediction period
Used if predictionPeriodFlag==1 |
|
1.0 | number |
solarCycleOffsetFlag |
Offset in solar cycle.
Automatic: 0, manual entry: 1 |
0=Automatic 1=Override |
0 | number |
solarCycleOffset |
Solar cycle offset
Used if solarCycleOffsetFlag==1 |
0=0 1=1 3=3 4=4 5=5 6=6 7=7 |
0 | number |
confidenceLevel |
Confidence level
The probability (in %) that the predicted proton fluences will not be exceeded |
min: 10 max: 95 note: |
95.0 | number |
distanceFromSun | Distance from the Sun (AU). |
min: 0 max: unbounded |
1.0 | number |
dataSet | Dataset to use |
sapphire=SAPPHIRE sapphire-hex=SAPPHIRE-HEX |
sapphire | number |
geomagnetic shielding
Input | Description | Valid values | Default | Quantity |
---|---|---|---|---|
useGeomagneticShielding | Include geomagnetic shielding |
0=No 1=Yes |
0 | number |
arrivalDirection |
Specify arrival direction (only when using geomagnetic shielding).
The rigidity cut-off is either calculated by integrating over all incoming directions or only for vertical arrival Used if useGeomagneticShielding==1 |
0=All directions 1=Vertical only |
0 | number |
magnetosphereState |
State of the magnetosphere (only when using geomagnetic shielding).
The condition of the magnetosphere can be set to quiet or stormy Used if useGeomagneticShielding==1 |
0=Quiet 1=Stormy |
0 | number |
method |
Method (only when using geomagnetic shielding).
Used if useGeomagneticShielding==1 |
0=Stormer with eccentric dipole 1=Smart and Shea (1967) with IGRF 2=Stormer upgrade |
0 | number |
magneticFieldMoment |
Magnetic field moment.
Only when using geomagnetic shielding. Used if useGeomagneticShielding==1 |
0=McIlwain 1=Unchanged -1=CREME-86 -2=CREME-96 |
1 | number |
|
None
# coding=utf-8
import numpy as np
import matplotlib.pyplot as plt
from nom_client.nom_client import NoMClient
nom_client = NoMClient("SAPPHIRE total fluence example")
sapre_model_gto = nom_client.get_model('sapre')
sapre_model_gto.set_params(orbitType="GEN")
sapre_gto_result = nom_client.run_model(sapre_model_gto)
print(sapre_gto_result)
# Get the model specification from the server.
sapphire_model = nom_client.get_model('sapphire-total-fluence')
sapphire_model.set_external_input(external_input_name="trajectory", external_input=sapre_gto_result)
# Geomagnetic shielding
sapphire_results_no_geo_sheilding = nom_client.run_model(sapphire_model)
sapphire_model.set_params(useGeomagneticShielding=1)
sapphire_results_geo_sheilding = nom_client.run_model(sapphire_model)
sep_proton_spectrum_no_geo_sheilding = sapphire_results_no_geo_sheilding.get_model_result_by_name(result_name="sep_proton_spectrum")
differential_fluence_no_geo_sheilding = sep_proton_spectrum_no_geo_sheilding.get_variable_data(variable_name="differential_fluence")
sep_proton_spectrum_geo_sheilding = sapphire_results_geo_sheilding.get_model_result_by_name(result_name="sep_proton_spectrum")
differential_fluence_geo_sheilding = sep_proton_spectrum_geo_sheilding.get_variable_data(variable_name="differential_fluence")
energy = sep_proton_spectrum_no_geo_sheilding.get_variable_data(variable_name="energy")[0] # same energies with or without geo shielding
energy = np.array(energy)
fig, ax = plt.subplots()
flux_units = sep_proton_spectrum_no_geo_sheilding['differential_fluence'].units
for fl_data in [differential_fluence_no_geo_sheilding, differential_fluence_geo_sheilding]:
plt.loglog(energy, fl_data.T, '-', linewidth=2.0, markersize=12.0)
plt.rc('font', size=12)
plt.grid(True)
plt.legend(labels=["No shielding (default)", "Shielding"])
plt.xlabel("Energy")
plt.ylabel(f"Flux ({flux_units})")
plt.show()
# Datasets
datasets = ["sapphire", "sapphire-hex"]
dataset_labels = ["sapphire (default)", "sapphire-hex"]
flux_results_per_dataset = []
for dataset in datasets:
sapphire_model.set_params(dataSet=dataset)
results = nom_client.run_model(sapphire_model)
sep_proton_spectrum = results.get_model_result_by_name(result_name="sep_proton_spectrum")
flux = sep_proton_spectrum.get_variable_data(variable_name="differential_fluence")
flux_results_per_dataset.append(flux)
for fl_data in flux_results_per_dataset:
plt.loglog(energy, fl_data.T, '-', linewidth=2.0, markersize=12.0)
plt.rc('font', size=12)
plt.grid(True)
plt.legend(labels=dataset_labels)
plt.xlabel("Energy")
plt.ylabel(f"Flux ({flux_units})")
plt.show()
# Confience levels
confidence_levels = [50, 70, 95, 99]
confidence_levels_labels = ["50%", "70%", "95% (default)", "99%"]
flux_results_per_conflevel = []
for confidence_level in confidence_levels:
sapphire_model.set_params(confidenceLevel=confidence_level)
results = nom_client.run_model(sapphire_model)
sep_proton_spectrum = results.get_model_result_by_name(result_name="sep_proton_spectrum")
flux = sep_proton_spectrum.get_variable_data(variable_name="differential_fluence")
flux_results_per_conflevel.append(flux)
for fl_data in flux_results_per_conflevel:
plt.loglog(energy, fl_data.T, '-', linewidth=2.0, markersize=12.0)
plt.rc('font', size=12)
plt.grid(True)
plt.legend(labels=confidence_levels_labels)
plt.xlabel("Energy")
plt.ylabel(f"Flux ({flux_units})")
plt.show()
Updated Model of the Solar Energetic Proton Environment in Space,
P. Jiggens, D. Heynderickx, I. Sandberg, P. Truscott, O. Raukunen, R. Vainio,
J. Space Weather Space Climate,year = 2018,volume = 8,pages = "A31"},
P. Jiggens, D. Heynderickx, I. Sandberg, P. Truscott, O. Raukunen, R. Vainio,
J. Space Weather Space Climate,year = 2018,volume = 8,pages = "A31"},