<divclass="fragment"><divclass="line"><aname="l00001"></a><spanclass="lineno"> 1</span> <spanclass="comment">// Copyright 2020, the Aether Development Team (see doc/dev_team.md for members)</span></div>
<divclass="line"><aname="l00002"></a><spanclass="lineno"> 2</span> <spanclass="comment">// Full license can be found in License.md</span></div>
<divclass="line"><aname="l00010"></a><spanclass="lineno"> 10</span> <spanclass="comment"> * \brief A class for keeping track of indices (1d vectors w/time)</span></div>
<divclass="line"><aname="l00012"></a><spanclass="lineno"> 12</span> <spanclass="comment"> This is a class that allows users to read in and keep track of</span></div>
<divclass="line"><aname="l00013"></a><spanclass="lineno"> 13</span> <spanclass="comment"> indices, such as IMF Bz, Kp, AE, F107, etc. These are often needed</span></div>
<divclass="line"><aname="l00014"></a><spanclass="lineno"> 14</span> <spanclass="comment"> to drive other sub models, such as EUVAC, MSIS, Weimer, etc. Basically,</span></div>
<divclass="line"><aname="l00015"></a><spanclass="lineno"> 15</span> <spanclass="comment"> the way you use this is to:</span></div>
<divclass="line"><aname="l00016"></a><spanclass="lineno"> 16</span> <spanclass="comment"> - read a file (custom for each type of file)</span></div>
<divclass="line"><aname="l00017"></a><spanclass="lineno"> 17</span> <spanclass="comment"> - get the proper index number</span></div>
<divclass="line"><aname="l00018"></a><spanclass="lineno"> 18</span> <spanclass="comment"> - call the set_index function with the time and values array</span></div>
<divclass="line"><aname="l00019"></a><spanclass="lineno"> 19</span> <spanclass="comment"> - call the appropriate get function with time to get index value at time</span></div>
<divclass="line"><aname="l00058"></a><spanclass="lineno"> 58</span> <spanclass="comment"> \brief Print out information in the structure for debugging</span></div>
<divclass="line"><aname="l00059"></a><spanclass="lineno"><aclass="line" href="structindex__file__output__struct.html#af7dfc157cfa8f60af862626aee6811fd"> 59</a></span> <spanclass="comment"> \param contents structure containing the index file output</span></div>
<divclass="line"><aname="l00072"></a><spanclass="lineno"> 72</span> <spanclass="comment"> \brief Initialize the class</span></div>
<divclass="line"><aname="l00073"></a><spanclass="lineno"> 73</span> <spanclass="comment"> \param args info about how user has configured things</span></div>
<divclass="line"><aname="l00078"></a><spanclass="lineno"> 78</span> <spanclass="comment"> \brief get the daily f107 value at the given time</span></div>
<divclass="line"><aname="l00079"></a><spanclass="lineno"> 79</span> <spanclass="comment"> \param time time in seconds</span></div>
<divclass="line"><aname="l00084"></a><spanclass="lineno"> 84</span> <spanclass="comment"> \brief get the 81-day average f107 at the given time</span></div>
<divclass="line"><aname="l00085"></a><spanclass="lineno"> 85</span> <spanclass="comment"> \param time time in seconds</span></div>
<divclass="line"><aname="l00090"></a><spanclass="lineno"> 90</span> <spanclass="comment"> \brief a series of functions that return the internal index number</span></div>
<divclass="line"><aname="l00092"></a><spanclass="lineno"> 92</span> <spanclass="comment"> In order to keep track of which index is which, the class uses </span></div>
<divclass="line"><aname="l00093"></a><spanclass="lineno"> 93</span> <spanclass="comment"> constants. These functions return these constants. The user doesn't</span></div>
<divclass="line"><aname="l00094"></a><spanclass="lineno"> 94</span> <spanclass="comment"> really need to know about the constants, but they have to get the</span></div>
<divclass="line"><aname="l00095"></a><spanclass="lineno"> 95</span> <spanclass="comment"> constant (when reading the file, for example) and then provide that </span></div>
<divclass="line"><aname="l00096"></a><spanclass="lineno"> 96</span> <spanclass="comment"> to the set index function. Conversely, we could create a bunch of</span></div>
<divclass="line"><aname="l00097"></a><spanclass="lineno"> 97</span> <spanclass="comment"> set_ functions (such as the set_f107 function below). We figured</span></div>
<divclass="line"><aname="l00098"></a><spanclass="lineno"> 98</span> <spanclass="comment"> that this minor inconvience is easier than making a bunch of set_</span></div>
<divclass="line"><aname="l00117"></a><spanclass="lineno"> 117</span> <spanclass="comment"> \brief This function sets the f107, does an 81 day ave, sets f107a too</span></div>
<divclass="line"><aname="l00118"></a><spanclass="lineno"> 118</span> <spanclass="comment"> \param f107_contents contents from the f107 file (time, f107, etc.)</span></div>
<divclass="line"><aname="l00120"></a><spanclass="lineno"> 120</span>  <spanclass="comment">// This is the method for setting f107 specifically:</span></div>
<divclass="line"><aname="l00124"></a><spanclass="lineno"> 124</span> <spanclass="comment"> \brief set the index array into the indices class</span></div>
<divclass="line"><aname="l00125"></a><spanclass="lineno"> 125</span> <spanclass="comment"> \param index_id which index is being checked in (bx, by, kp, ae, etc)</span></div>
<divclass="line"><aname="l00126"></a><spanclass="lineno"> 126</span> <spanclass="comment"> \param time vector of time for each index value</span></div>
<divclass="line"><aname="l00127"></a><spanclass="lineno"> 127</span> <spanclass="comment"> \param values vector of values for each index value</span></div>
<divclass="line"><aname="l00128"></a><spanclass="lineno"> 128</span> <spanclass="comment"> \param missing value for missing data</span></div>
<divclass="line"><aname="l00178"></a><spanclass="lineno"> 178</span> <spanclass="comment"> \brief The general function that returns the index value at the time</span></div>
<divclass="line"><aname="l00179"></a><spanclass="lineno"> 179</span> <spanclass="comment"> \param time the time in seconds that the index is requested at</span></div>
<divclass="line"><aname="l00180"></a><spanclass="lineno"> 180</span> <spanclass="comment"> \param the index to return (i.e., one of the constants defined above)</span></div>
<divclass="ttc" id="astructindex__file__output__struct_html_af739480f6f20b99321b87bd7ec5a5fe0"><divclass="ttname"><ahref="structindex__file__output__struct.html#af739480f6f20b99321b87bd7ec5a5fe0">index_file_output_struct::missing_values</a></div><divclass="ttdeci">std::vector< float > missing_values</div><divclass="ttdoc">a vector of missing values for each variable:</div><divclass="ttdef"><b>Definition:</b> indices.h:68</div></div>
<divclass="ttc" id="astructindex__file__output__struct_html_a0af5bb97def2aa1226ffcd37138ebce6"><divclass="ttname"><ahref="structindex__file__output__struct.html#a0af5bb97def2aa1226ffcd37138ebce6">index_file_output_struct::var_names</a></div><divclass="ttdeci">std::vector< std::string > var_names</div><divclass="ttdoc">variable names as a vector of strings:</div><divclass="ttdef"><b>Definition:</b> indices.h:62</div></div>
<divclass="ttc" id="astructindex__file__output__struct_html_a14d0d33110b657930a1b45e53f700e30"><divclass="ttname"><ahref="structindex__file__output__struct.html#a14d0d33110b657930a1b45e53f700e30">index_file_output_struct::times</a></div><divclass="ttdeci">std::vector< double > times</div><divclass="ttdoc">array of times that correspond to the values:</div><divclass="ttdef"><b>Definition:</b> indices.h:56</div></div>
<divclass="ttc" id="astructindex__file__output__struct_html_a324ff368582d9b39d212c55e037bb231"><divclass="ttname"><ahref="structindex__file__output__struct.html#a324ff368582d9b39d212c55e037bb231">index_file_output_struct::index_id</a></div><divclass="ttdeci">std::vector< int > index_id</div><divclass="ttdoc">The index_id returned by the call to get_XXX_index_id:</div><divclass="ttdef"><b>Definition:</b> indices.h:71</div></div>
<divclass="ttc" id="astructindex__file__output__struct_html_a169481fcb271f9db161f02336fe02e19"><divclass="ttname"><ahref="structindex__file__output__struct.html#a169481fcb271f9db161f02336fe02e19">index_file_output_struct::nTimes</a></div><divclass="ttdeci">int64_t nTimes</div><divclass="ttdoc">number of times read in:</div><divclass="ttdef"><b>Definition:</b> indices.h:53</div></div>