GRIB2FLEXPART_8F90_source.html 35.4 KB
Newer Older
Don Morton's avatar
Don Morton committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>FLEXPART v9.3.0: /home/morton/git/ctbto/flexpart_code/GRIB2FLEXPART.F90 Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">FLEXPART v9.3.0
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Types&#160;List</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_9bec7083027963d9f9ceae2cc7474de5.html">git</a></li><li class="navelem"><a class="el" href="dir_a295f9ccddb599bffa789ddac6a02012.html">ctbto</a></li><li class="navelem"><a class="el" href="dir_03e0bc1be62025a6d159c3d63144fc0b.html">flexpart_code</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">GRIB2FLEXPART.F90</div>  </div>
</div><!--header-->
<div class="contents">
<a href="GRIB2FLEXPART_8F90.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">!**********************************************************************</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">! Copyright 1998,1999,2000,2001,2002,2005,2007,2008,2009,2010         *</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">! Andreas Stohl, Petra Seibert, A. Frank, Gerhard Wotawa,             *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">! Caroline Forster, Sabine Eckhardt, John Burkhart, Harald Sodemann   *</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">!                                                                     *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">! This file is part of FLEXPART.                                      *</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">!                                                                     *</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">! FLEXPART is free software: you can redistribute it and/or modify    *</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">! it under the terms of the GNU General Public License as published by*</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">! the Free Software Foundation, either version 3 of the License, or   *</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">! (at your option) any later version.                                 *</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">!                                                                     *</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">! FLEXPART is distributed in the hope that it will be useful,         *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">! but WITHOUT ANY WARRANTY; without even the implied warranty of      *</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the       *</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">! GNU General Public License for more details.                        *</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">!                                                                     *</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">! You should have received a copy of the GNU General Public License   *</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment">! along with FLEXPART.  If not, see &lt;http://www.gnu.org/licenses/&gt;.   *</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment">!**********************************************************************</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div>
<div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="GRIB2FLEXPART_8F90.html#abbfb0433bc57e6922ca5fe7a516af4cb">   22</a></span>&#160;<span class="keyword">program</span> <a class="code" href="GRIB2FLEXPART_8F90.html#abbfb0433bc57e6922ca5fe7a516af4cb">grib2flexpart</a></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;  <span class="comment">!*****************************************************************************</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;  <span class="comment">!                                                                            *</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;  <span class="comment">!     This is the GRIB 2 FP conversion routine                               *</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;  <span class="comment">!                                                                            *</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;  <span class="comment">!     Author: M. Harustak                                                    *</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;  <span class="comment">!                                                                            *</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;  <span class="comment">!     05 October 2015                                                        *</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;  <span class="comment">!                                                                            *</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;  <span class="comment">!*****************************************************************************</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;  <span class="comment">!                                                                            *</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;  <span class="comment">! Variables:                                                                 *</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;  <span class="comment">!                                                                            *</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;  <span class="comment">! Constants:                                                                 *</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;  <span class="comment">!                                                                            *</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;  <span class="comment">!*****************************************************************************</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;  <span class="keywordtype">use </span><a class="code" href="classpoint__mod.html">point_mod</a></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;  <span class="keywordtype">use </span><a class="code" href="classpar__mod.html">par_mod</a></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;  <span class="keywordtype">use </span><a class="code" href="classcom__mod.html">com_mod</a></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;  <span class="keywordtype">use </span><a class="code" href="classconv__mod.html">conv_mod</a></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;  <span class="keywordtype">implicit none</span></div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;  <span class="keywordtype">integer</span> :: metdata_format = unknown_metdata</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;  <span class="keywordtype">integer</span> :: itime, nstop1</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;  <span class="keywordtype">integer</span> :: i</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;  <span class="keywordtype">character(len=256)</span> :: arg</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;  <span class="keywordtype">character(len=512)</span> :: dumppath</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;  <span class="keywordtype">character(len=512)</span> :: inputfilename</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;  <span class="keywordtype">character(len=512)</span> :: nestedfilename</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;  <span class="keywordtype">character(len=32)</span> :: lsubgridtxt</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;  <span class="keywordtype">integer</span> :: useavailable = 0</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;  <span class="comment">! Print the GPL License statement</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  <span class="comment">!*******************************************************</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;  print*,<span class="stringliteral">&#39;Welcome to GRIB2FLEXPART Version 1.0&#39;</span></div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;  print*,<span class="stringliteral">&#39;FLEXPART is free software released under the GNU Genera&#39;</span>// &amp;</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;       <span class="stringliteral">&#39;l Public License.&#39;</span></div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;  <span class="comment">! no argument =&gt; error</span></div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;  <span class="keywordflow">if</span> (( iargc().lt.2 ).or.( iargc().eq.3)) <span class="keywordflow">then</span></div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    print *,<span class="stringliteral">&#39; &#39;</span></div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    print *,<span class="stringliteral">&#39;Usage in use-available mode: grib2flexpart useAvailable &lt;output directory&gt;&#39;</span></div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    print *,<span class="stringliteral">&#39;Usage in command line mode: grib2flexpart forward|backward subgrid &lt;output directory&gt; &lt;source file&gt; [&lt;source file&gt;...]&#39;</span></div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    print *,<span class="stringliteral">&#39; &#39;</span></div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    stop <span class="stringliteral">&#39;Error: Missing arguments&#39;</span></div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;  <span class="keywordflow">elseif</span> ( iargc().eq.2 ) <span class="keywordflow">then</span></div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    call getarg(1,arg)</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="keywordflow">if</span> ( arg.eq.<span class="stringliteral">&quot;useAvailable&quot;</span> ) <span class="keywordflow">then</span></div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;      print *,<span class="stringliteral">&#39;Running in use-available mode&#39;</span></div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;      useavailable = 1</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;      print *,<span class="stringliteral">&#39; &#39;</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;      print *,<span class="stringliteral">&#39;Usage in use-available mode: grib2flexpart useAvailable &lt;output directory&gt;&#39;</span></div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;      print *,<span class="stringliteral">&#39;Usage in command line mode: grib2flexpart forward|backward subgrid &lt;output directory&gt; &amp;</span></div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="stringliteral"></span><span class="stringliteral"> &lt;source file&gt; [&lt;source file&gt;...]&#39;</span></div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;      print *,<span class="stringliteral">&#39; &#39;</span></div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;      stop <span class="stringliteral">&#39;Error: Incorrect arguments&#39;</span></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <span class="keywordflow">endif</span></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;  <span class="keywordflow">else</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    <span class="comment">! 2 and more arguments =&gt; ok, parse arguments</span></div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    call getarg(1,arg)</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <span class="keywordflow">if</span> ( arg.eq.<span class="stringliteral">&quot;forward&quot;</span>) <span class="keywordflow">then</span></div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;      ldirect = 1</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( arg.eq.<span class="stringliteral">&quot;backward&quot;</span>) <span class="keywordflow">then</span></div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;      ldirect = -1</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;      print *,<span class="stringliteral">&#39; &#39;</span></div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;      print *,<span class="stringliteral">&#39;Usage in use-available mode: grib2flexpart useAvailable &lt;output directory&gt;&#39;</span></div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;      print *,<span class="stringliteral">&#39;Usage in command line mode: grib2flexpart forward|backward subgrid &lt;output directory&gt; &amp;</span></div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;<span class="stringliteral"></span><span class="stringliteral">&lt;source file&gt; [&lt;source file&gt;...]&#39;</span></div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;      print *,<span class="stringliteral">&#39; &#39;</span></div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;      stop <span class="stringliteral">&#39;Error: Incorrect arguments&#39;</span></div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <span class="keywordflow">endif</span></div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    print *,<span class="stringliteral">&#39;Running in command line mode&#39;</span></div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    useavailable = 0</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;  <span class="keywordflow">endif</span></div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;  <span class="keywordflow">if</span> ( useavailable.eq.0 ) <span class="keywordflow">then</span></div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    call getarg(2,lsubgridtxt)</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    <span class="keyword">read</span> (lsubgridtxt, <span class="stringliteral">&#39;(i10)&#39;</span>) lsubgrid</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    lsubgrid=1</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    call getarg(3,dumppath)</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    <span class="keywordflow">do</span> i=4,iargc()</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;      call getarg(i,inputfilename)</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;      numbwf = i - 4 + 1</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;      <span class="keywordflow">if</span> ( ldirect.eq.1 ) <span class="keywordflow">then</span></div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        wfname(i-4+1) = inputfilename</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;      <span class="keywordflow">else</span></div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        wfname(iargc()+1-i) = inputfilename</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;      <span class="keywordflow">endif</span></div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <span class="keywordflow">end do</span></div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;  <span class="keywordflow">else</span></div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    call getarg(2,dumppath)</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    call <a class="code" href="readpaths_8f90.html#a79e2555e5666fcf4c48697134255c72e">readpaths</a></div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    call <a class="code" href="readcommand_8F90.html#aa0e7ab9831d147a26fd28eedad471f1b">readcommand</a></div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    call <a class="code" href="readavailable_8f90.html#ab4d8571bdd00f78a5769e8715f152f01">readavailable</a></div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;  <span class="keywordflow">endif</span></div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;<span class="comment">! Reset the times of the wind fields that are kept in memory to no time</span></div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160; <span class="comment">!**********************************************************************</span></div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;  <span class="keywordflow">do</span> i=1,2</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    memind(i)=i</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    memtime(i)=999999999</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;  <span class="keywordflow">end do</span></div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;  <span class="comment">! Detect metdata format</span></div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;  call <a class="code" href="detectformat_8f90.html#ac5d997da580f575df95318cb1040a312">detectformat</a>(metdata_format)</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;  <span class="keywordflow">if</span> (metdata_format.eq.ecmwf_metdata) <span class="keywordflow">then</span></div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    print*,<span class="stringliteral">&#39;ECMWF metdata detected&#39;</span></div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;  <span class="keywordflow">elseif</span> (metdata_format.eq.gfs_metdata) <span class="keywordflow">then</span></div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    print*,<span class="stringliteral">&#39;NCEP metdata detected&#39;</span></div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;  <span class="keywordflow">else</span></div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    stop <span class="stringliteral">&#39;Unknown metdata format&#39;</span></div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;  <span class="keywordflow">endif</span></div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;  <span class="comment">! Read the model grid specifications,</span></div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;  <span class="comment">! both for the mother domain and eventual nests</span></div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;  <span class="comment">!**********************************************</span></div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;  <span class="keywordflow">if</span> (metdata_format.eq.ecmwf_metdata) call <a class="code" href="gridcheck_8F90.html#a3f852ce7370995de195a6d97d71ad58b">gridcheck_ecmwf</a></div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;  <span class="keywordflow">if</span> (metdata_format.eq.gfs_metdata) call <a class="code" href="gridcheck__gfs_8F90.html#aff791a73553c933e7404317b6f1bde9c">gridcheck_gfs</a></div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;  call <a class="code" href="gridcheck__nests_8F90.html#a84a632cdbc908dd87e35d693b78430e7">gridcheck_nests</a></div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;  <span class="keywordflow">do</span> i=1,numbwf</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    <span class="keywordflow">if</span> ( ( useavailable.eq.0 ).or.(numbwf.eq.1) ) <span class="keywordflow">then</span></div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;      print *,<span class="stringliteral">&#39; &#39;</span></div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;      print *,wfname(i)</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;      call <a class="code" href="convertfields_8F90.html#aa5624cfa548f8c277437c2b4e5c67658">convertfields</a>( i, metdata_format, dumppath)</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;       <span class="keywordflow">if</span> (((ldirect*wftime(i).le.0).and. &amp;</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;             (ldirect*wftime(i+1).gt.0)).or. &amp; </div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;          (ldirect*wftime(i).gt.0)) <span class="keywordflow">then</span></div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;          print *,<span class="stringliteral">&#39; &#39;</span></div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;          print *,wfname(i)</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;          call <a class="code" href="convertfields_8F90.html#aa5624cfa548f8c277437c2b4e5c67658">convertfields</a>( i, metdata_format, dumppath)</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;       <span class="keywordflow">endif</span></div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    <span class="keywordflow">endif</span></div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;  <span class="keywordflow">end do</span></div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;  <span class="keyword">write</span>(*,*) <span class="stringliteral">&#39;CONGRATULATIONS: YOU HAVE SUCCESSFULLY COMPLETED A GRIB2FLE&amp;</span></div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;<span class="stringliteral"></span><span class="stringliteral">       &amp;XPART PREPROCESSING RUN!&#39;</span></div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;<span class="keyword">end program </span><a class="code" href="GRIB2FLEXPART_8F90.html#abbfb0433bc57e6922ca5fe7a516af4cb">grib2flexpart</a></div>
<div class="ttc" id="readpaths_8f90_html_a79e2555e5666fcf4c48697134255c72e"><div class="ttname"><a href="readpaths_8f90.html#a79e2555e5666fcf4c48697134255c72e">readpaths</a></div><div class="ttdeci">subroutine readpaths</div><div class="ttdef"><b>Definition:</b> <a href="readpaths_8f90_source.html#l00022">readpaths.f90:22</a></div></div>
<div class="ttc" id="convertfields_8F90_html_aa5624cfa548f8c277437c2b4e5c67658"><div class="ttname"><a href="convertfields_8F90.html#aa5624cfa548f8c277437c2b4e5c67658">convertfields</a></div><div class="ttdeci">subroutine convertfields(ind, metdata_format, dumpPath)</div><div class="ttdef"><b>Definition:</b> <a href="convertfields_8F90_source.html#l00001">convertfields.F90:1</a></div></div>
<div class="ttc" id="GRIB2FLEXPART_8F90_html_abbfb0433bc57e6922ca5fe7a516af4cb"><div class="ttname"><a href="GRIB2FLEXPART_8F90.html#abbfb0433bc57e6922ca5fe7a516af4cb">grib2flexpart</a></div><div class="ttdeci">program grib2flexpart</div><div class="ttdef"><b>Definition:</b> <a href="GRIB2FLEXPART_8F90_source.html#l00022">GRIB2FLEXPART.F90:22</a></div></div>
<div class="ttc" id="readavailable_8f90_html_ab4d8571bdd00f78a5769e8715f152f01"><div class="ttname"><a href="readavailable_8f90.html#ab4d8571bdd00f78a5769e8715f152f01">readavailable</a></div><div class="ttdeci">subroutine readavailable</div><div class="ttdef"><b>Definition:</b> <a href="readavailable_8f90_source.html#l00022">readavailable.f90:22</a></div></div>
<div class="ttc" id="readcommand_8F90_html_aa0e7ab9831d147a26fd28eedad471f1b"><div class="ttname"><a href="readcommand_8F90.html#aa0e7ab9831d147a26fd28eedad471f1b">readcommand</a></div><div class="ttdeci">subroutine readcommand</div><div class="ttdef"><b>Definition:</b> <a href="readcommand_8F90_source.html#l00022">readcommand.F90:22</a></div></div>
<div class="ttc" id="gridcheck_8F90_html_a3f852ce7370995de195a6d97d71ad58b"><div class="ttname"><a href="gridcheck_8F90.html#a3f852ce7370995de195a6d97d71ad58b">gridcheck_ecmwf</a></div><div class="ttdeci">subroutine gridcheck_ecmwf</div><div class="ttdef"><b>Definition:</b> <a href="gridcheck_8F90_source.html#l00022">gridcheck.F90:22</a></div></div>
<div class="ttc" id="classpar__mod_html"><div class="ttname"><a href="classpar__mod.html">par_mod</a></div><div class="ttdef"><b>Definition:</b> <a href="par__mod_8F90_source.html#l00034">par_mod.F90:34</a></div></div>
<div class="ttc" id="gridcheck__nests_8F90_html_a84a632cdbc908dd87e35d693b78430e7"><div class="ttname"><a href="gridcheck__nests_8F90.html#a84a632cdbc908dd87e35d693b78430e7">gridcheck_nests</a></div><div class="ttdeci">subroutine gridcheck_nests</div><div class="ttdef"><b>Definition:</b> <a href="gridcheck__nests_8F90_source.html#l00022">gridcheck_nests.F90:22</a></div></div>
<div class="ttc" id="detectformat_8f90_html_ac5d997da580f575df95318cb1040a312"><div class="ttname"><a href="detectformat_8f90.html#ac5d997da580f575df95318cb1040a312">detectformat</a></div><div class="ttdeci">subroutine detectformat(metdata_format)</div><div class="ttdef"><b>Definition:</b> <a href="detectformat_8f90_source.html#l00022">detectformat.f90:22</a></div></div>
<div class="ttc" id="gridcheck__gfs_8F90_html_aff791a73553c933e7404317b6f1bde9c"><div class="ttname"><a href="gridcheck__gfs_8F90.html#aff791a73553c933e7404317b6f1bde9c">gridcheck_gfs</a></div><div class="ttdeci">subroutine gridcheck_gfs</div><div class="ttdef"><b>Definition:</b> <a href="gridcheck__gfs_8F90_source.html#l00022">gridcheck_gfs.F90:22</a></div></div>
<div class="ttc" id="classconv__mod_html"><div class="ttname"><a href="classconv__mod.html">conv_mod</a></div><div class="ttdef"><b>Definition:</b> <a href="conv__mod_8f90_source.html#l00011">conv_mod.f90:11</a></div></div>
<div class="ttc" id="classpoint__mod_html"><div class="ttname"><a href="classpoint__mod.html">point_mod</a></div><div class="ttdef"><b>Definition:</b> <a href="point__mod_8f90_source.html#l00022">point_mod.f90:22</a></div></div>
<div class="ttc" id="classcom__mod_html"><div class="ttname"><a href="classcom__mod.html">com_mod</a></div><div class="ttdef"><b>Definition:</b> <a href="com__mod_8f90_source.html#l00013">com_mod.f90:13</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun May 29 2016 21:54:32 for FLEXPART v9.3.0 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>