# Jacchia-Bowman 2008 Atmospheric model is now available in SatelliteToolbox.jl

**URL:** <https://discourse.julialang.org/t/jacchia-bowman-2008-atmospheric-model-is-now-available-in-satellitetoolbox-jl/16375>\
**Category:** Astro/Space\
**Created:** [October 16, 2018, 12:13am UTC](https://discourse.julialang.org/t/jacchia-bowman-2008-atmospheric-model-is-now-available-in-satellitetoolbox-jl/16375 "2018-10-16T00:13:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ronis\_BR](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ronis_br/32/50999_2.png) [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Post date:** [October 16, 2018, 12:13am UTC](https://discourse.julialang.org/t/jacchia-bowman-2008-atmospheric-model-is-now-available-in-satellitetoolbox-jl/16375/1 "2018-10-16T00:13:36Z")

</div>

Hi guys! I am back!

I just want to let you know that we now have a native implementation of the [Jacchia-Bowman 2008](http://sol.spacenvironment.net/jb2008/) atmospheric model in [SatelliteToolbox.jl](https://github.com/JuliaSpace/SatelliteToolbox.jl). You just need to use `master` because I still need to implement the tests to release a new version.

I will appreciate if someone can help me to debug so that we can see if everything is working fine. The major problem with JB2008 is that, unlike NRLMSISE-00, it does not have an online version so that I can compare the numbers. I needed to download the FORTRAN source code, compile, and test.

This model requires a lot of space indices (F10.7, S10, M10, etc.). You can specify all of them by hand or just use the built-in tool to obtain them from the online database. Notice that this will only work for past days (no extrapolation is available!).

This system to obtain data from online repository was only possible due to two amazing tools create by @helgee: [RemoteFiles](https://github.com/helgee/RemoteFiles.jl) and [OptionalData](https://github.com/helgee/OptionalData.jl).

If someone wants to use it, you just need to do the following:

```julia
julia> using SatelliteToolbox

julia> init_space_indices()
[ Info: Downloading file 'DTCFILE.TXT' from 'http://sol.spacenvironment.net/jb2008/indices/DTCFILE.TXT'.
[ Info: Downloading file 'SOLFSMY.TXT' from 'http://sol.spacenvironment.net/jb2008/indices/SOLFSMY.TXT'.

julia> jb2008(DatetoJD(1999,1,1,15,30,22.5)-1+240, -45*pi/180, 45*pi/180, 700e3)

JB2008_Structure{Float64}
  nN2: Float64 1.8905348433207813e10
  nO2: Float64 3.4631546029876137e8
  nO: Float64 3.4257228669847334e12
  nAr: Float64 149275.17761131885
  nHe: Float64 1.4933237516678638e12
  nH: Float64 5.895742905596606e9
  rho: Float64 1.0183911776638961e-13
  T_exo: Float64 1218.2352652003644
  Tz: Float64 1220.3358251914033

```

Notice, however, that I am facing problems with the files on the [Space Environment Technologies](http://sol.spacenvironment.net/jb2008/) website. It seems that the format of those two files changes during the day. I have no idea what is going on, but I have already reported it to them. Thus, if something fails with the model, just wait sometime and try again with `init_space_indices(;force_download = true)`.

---

<div class="post-metadata">

**Author:** ![helgee](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/helgee/32/2022_2.png) [@helgee](https://discourse.julialang.org/u/helgee)\
**Post date:** [October 16, 2018, 6:41am UTC](https://discourse.julialang.org/t/jacchia-bowman-2008-atmospheric-model-is-now-available-in-satellitetoolbox-jl/16375/2 "2018-10-16T06:41:21Z")

</div>

> [@Ronis\_BR](#):
>
> This system to obtain data from online repository was only possible due to two amazing tools create by @helgee: [RemoteFiles](https://github.com/helgee/RemoteFiles.jl) and [OptionalData](https://github.com/helgee/OptionalData.jl).

Cool 😊 Very welcome!

---

<div class="post-metadata">

**Author:** ![helgee](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/helgee/32/2022_2.png) [@helgee](https://discourse.julialang.org/u/helgee)\
**Post date:** [October 16, 2018, 6:43am UTC](https://discourse.julialang.org/t/jacchia-bowman-2008-atmospheric-model-is-now-available-in-satellitetoolbox-jl/16375/3 "2018-10-16T06:43:25Z")

</div>

There is an implementation of Jacchia-Bowman 2008 in [Orekit](https://www.orekit.org/static/apidocs/org/orekit/forces/drag/atmosphere/JB2008.html). We could use this as an additional source of test and validation data.

EDIT: And great job BTW! 🎉

---

<div class="post-metadata">

**Author:** ![Ronis\_BR](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ronis_br/32/50999_2.png) [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Post date:** [October 18, 2018, 2:50am UTC](https://discourse.julialang.org/t/jacchia-bowman-2008-atmospheric-model-is-now-available-in-satellitetoolbox-jl/16375/4 "2018-10-18T02:50:44Z")

</div>

Hi guys!

It seems that the problem in the server was fixed (the people on Space Environment Technologies are very helpful!) and I could validate the model. The Julia implementation was compared to a lot of results obtained from the FORTRAN code with a very good precision.

I will try to tag a new version tomorrow.
