DLR GCR Model
Model API name: dlr-gcr
A simplified version of the GCR ISO-model (ISO, 2004) modified in order to reduce the number of free parameters to one.
Version: v1
Model developer:
Model provision:
External Input: trajectory
Trajectory data.
Input | Value |
---|---|
Model name |
trajectory
|
Model result name | trajectory |
Quantity | trajectory |
Input group: gcr_model / multiplicity: one
Input | Description | Valid values | Default | Quantity |
---|---|---|---|---|
energies | Energies |
|
[1.0, 1.1, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.5, 2.8, 3.2, 3.5, 4.0, 4.5, 5.0, 5.5, 6.3, 7.1, 8.0, 9.0, 10.0, 11.0, 12.0, 14.0, 16.0, 18.0, 20.0, 22.0, 25.0, 28.0, 32.0, 35.0, 40.0, 45.0, 50.0, 55.0, 63.0, 71.0, 80.0, 90.0, 100.0, 110.0, 120.0, 140.0, 160.0, 180.0, 200.0, 220.0, 250.0, 280.0, 320.0, 350.0, 400.0, 450.0, 500.0, 550.0, 630.0, 710.0, 800.0, 900.0, 1000.0, 1100.0, 1200.0, 1400.0, 1600.0, 1800.0, 2000.0, 2200.0, 2500.0, 2800.0, 3200.0, 3500.0, 4000.0, 4500.0, 5000.0, 5500.0, 6300.0, 7100.0, 8000.0, 9000.0, 10000.0, 11000.0, 12000.0, 14000.0, 16000.0, 18000.0, 20000.0, 30000.0, 40000.0, 50000.0, 60000.0, 70000.0, 80000.0, 90000.0, 100000.0] | energy |
attenuationSpecification | Specification of attenuation |
worst=Worst case, solar minimum ACE=ACE derived attenuation (1997.65 - 2019.3877) user_input=User input |
worst | number |
userAttenuation |
userAttenuation
Used if attenuationSpecification == user_input |
|
0 | number |
ACEDecimalDate |
Decimal date for ACE derived attenuation (1997.65 - 2019.3877)
Used if attenuationSpecification == ACE |
|
last | number |
|
None
# coding=utf-8
import matplotlib.pyplot as plt
from nom_client.nom_client import NoMClient
nom_client = NoMClient("DLR GCR example",
default_server_id="ext_rest_server",
debug_output=False)
sapre_model = nom_client.get_model('sapre')
sapre_model.set_params(orbitType="NEI")
sapre_result = nom_client.run_model(sapre_model)
print(sapre_result)
dlr_gcr_model = nom_client.get_model('dlr-gcr')
dlr_gcr_model.set_params(attenuationSpecification="user_input", userAttenuation=20)
dlr_gcr_results = nom_client.run_model(dlr_gcr_model)
print(dlr_gcr_results)
dlr_proton_spectrum = dlr_gcr_results.get_model_result_by_name(result_name="particle_spectrum")
dlr_energies = dlr_proton_spectrum.get_variable_data(variable_name="energy")
dlr_integral_fluence = dlr_proton_spectrum.get_variable_data(variable_name="integral_flux", z=1)
dlr_differential_fluence = dlr_proton_spectrum.get_variable_data(variable_name="differential_flux", z=1)
iso_gcr_model = nom_client.get_model('iso_15390')
iso_gcr_model.set_params(solarActivity=1)
iso_gcr_model.set_external_input(external_input_name="trajectory", external_input=sapre_result)
iso_gcr_results = nom_client.run_model(iso_gcr_model)
print(iso_gcr_results)
iso_proton_spectrum = iso_gcr_results.get_model_result_by_name(result_name="particle_spectrum")
iso_energies = iso_proton_spectrum.get_variable_data(variable_name="energy")
iso_integral_fluence = iso_proton_spectrum.get_variable_data(variable_name="integral_flux", species="H")
iso_differential_fluence = iso_proton_spectrum.get_variable_data(variable_name="differential_flux", species="H")
print(iso_energies)
plt.rcParams['figure.figsize'] = [15, 10]
plt.rc('font', size=18)
plt.loglog(dlr_energies.T, dlr_integral_fluence.T, '-', linewidth=2.0, markersize=12.0,
label='DLR Integral Flux')
plt.loglog(iso_energies.T, iso_integral_fluence.T, '-', linewidth=2.0, markersize=12.0,
label='ISO Integral Flux')
plt.title('GCR particle spectrum', fontsize=18)
plt.grid(True)
plt.legend(bbox_to_anchor=(0.95, 0.95), loc=1, borderaxespad=0., fancybox=True, fontsize=18, shadow=True)
plt.xlabel("Energy (MeV)")
plt.ylabel("Integral Flux")
plt.show()
plt.loglog(dlr_energies.T, dlr_differential_fluence.T, '-', linewidth=2.0, markersize=12.0,
label='DLR Differential Flux')
plt.loglog(iso_energies.T, iso_differential_fluence.T, '-', linewidth=2.0, markersize=12.0,
label='ISO Differential Flux')
plt.title('GCR particle spectrum', fontsize=18)
plt.grid(True)
plt.legend(bbox_to_anchor=(0.95, 0.95), loc=1, borderaxespad=0., fancybox=True, fontsize=18, shadow=True)
plt.xlabel("Energy (MeV)")
plt.ylabel("Differential Flux")
plt.show()
No references