1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
---|
2 | <html><head> |
---|
3 | |
---|
4 | <meta content="text/html; charset=windows-1252" http-equiv="CONTENT-TYPE"><title>PALM chapter 4.5.1</title> |
---|
5 | <meta content="StarOffice 7 (Win32)" name="GENERATOR"> |
---|
6 | <meta content="Siegfried Raasch" name="AUTHOR"> <meta content="20041022;12155949" name="CREATED"> <meta content="20041117;11232134" name="CHANGED"> <meta content="parallel LES model" name="KEYWORDS"> <style> |
---|
7 | <!-- |
---|
8 | @page { size: 21cm 29.7cm } |
---|
9 | --> |
---|
10 | </style></head><body style="direction: ltr;" lang="en-US"><h4 style="line-height: 100%;"><font size="4">4.5.1 |
---|
11 | NetCDF data output <span style="color: rgb(255, 0, 0);"></span></font></h4> |
---|
12 | <p style="line-height: 100%;">The standard data output of |
---|
13 | PALM is NetCDF (<span style="font-weight: bold;">Net</span>work |
---|
14 | <span style="font-weight: bold;">C</span>ommon <span style="font-weight: bold;">D</span>ata <span style="font-weight: bold;">F</span>orm) in 64-bit offset format. NetCDF is an |
---|
15 | interface to a library of data access functions for |
---|
16 | storing and retrieving data in the form of arrays. NetCDF is an |
---|
17 | abstraction that supports a view of data as a collection of |
---|
18 | self-describing, <span style="font-weight: bold;">portable</span> |
---|
19 | objects that can be accessed through a simple interface (protable means |
---|
20 | that NetCDF data files can be read on any machine regardless of where |
---|
21 | they |
---|
22 | have been created). Array values may be accessed directly, without |
---|
23 | knowing details of how the data are stored. Auxiliary information about |
---|
24 | the data, such as what units are used, may be stored with the data. |
---|
25 | Generic utilities and application programs can access NetCDF datasets |
---|
26 | (files) and transform, combine, analyze, or display specified fields of |
---|
27 | the data, e.g. the contents of a NetCDF dataset can be viewed using the |
---|
28 | command <span style="font-family: monospace;">ncdump</span> |
---|
29 | (see <a href="#ncdump">further below</a>). |
---|
30 | Many (public domain) graphic software has built in interfaces to read |
---|
31 | NetCDF datasets (e.g. <span style="font-weight: bold;">ferret</span> |
---|
32 | or <span style="font-weight: bold;">NCL</span>). |
---|
33 | The complete NetCDF documentation |
---|
34 | is available from the <a href="http://www.unidata.ucar.edu/packages/netcdf/docs.html">NetCDF |
---|
35 | homepage</a>. The NetCDF tutorial for FORTRAN90 can also be found |
---|
36 | on <a href="http://www.muk.uni-hannover.de/%7Eraasch/PALM_group/manual/netcdf/netcdf-3_f90_tutorial.pdf">our |
---|
37 | web server</a>.</p><p style="line-height: 100%;">The |
---|
38 | general output format of PALM data is determined by the runtime-parameter <a href="chapter_4.2.html#data_output_format">data_output_format</a> |
---|
39 | (<span style="font-weight: bold;">data_output_format</span> |
---|
40 | = <span style="font-style: italic;">'netcdf'</span>, |
---|
41 | by default). For historical reasons, some alternative formats can be |
---|
42 | selected (see <a href="chapter_4.2.html#data_output_format">data_output_format</a>). |
---|
43 | The accuracy of the NetCDF output data can be set with parameter <a href="chapter_4.1.html#netcdf_precision">netcdf_precision</a>. |
---|
44 | By default, data have single (4 byte) precision. Runtime-parameter <a href="chapter_4.2.html#netcdf_data_format">netcdf_data_format</a> |
---|
45 | can be used to choose between the different NetCDF file formats |
---|
46 | (classic, 64-bit offset, NetCDF4/HDF5). The 64-bit offset format allows |
---|
47 | creating large files (file size only limited by the underlying file |
---|
48 | system), but each output variable (array) is still limited to 2GB. In |
---|
49 | NetCDF4 format, there is no limit for the size of variables, and it |
---|
50 | also allows parallel I/O into one output file. However, some (graphic) |
---|
51 | software still does not support NetCDF4 format.<br></p>PALM allows the output of |
---|
52 | various |
---|
53 | data (e.g. cross sections, vertical profiles, timeseries, etc.) into |
---|
54 | different files. The following table gives an overview about the |
---|
55 | different kind of NetCDF output data offered by PALM. Beside the local |
---|
56 | names of the files, the table also lists the minimum parameter settings |
---|
57 | which |
---|
58 | are necessary to switch on the output, as well as the parameters to be |
---|
59 | used to control the output.<br><br><table style="text-align: left; width: 750px; height: 226px;" border="1" cellpadding="2" cellspacing="2"><tbody><tr><td align="left" valign="top"><span style="font-weight: bold;">kind of data</span></td><td align="left" valign="top"><span style="font-weight: bold;">local filename</span></td><td align="left" valign="top"><span style="font-weight: bold;">parameter settings necessary to |
---|
60 | switch on output</span></td><td align="left" valign="top"><span style="font-weight: bold;">further |
---|
61 | parameters for output control</span></td></tr><tr><td align="left" valign="top">vertical profiles</td><td align="left" valign="top"><a href="chapter_3.4.html#DATA_1D_PR_NETCDF">DATA_1D_PR_NETCDF</a></td><td align="left" valign="top"><a href="chapter_4.2.html#data_output_pr">data_output_pr</a>, |
---|
62 | <a href="chapter_4.2.html#dt_data_output">dt_data_output</a> |
---|
63 | (or <a href="chapter_4.2.html#dt_dopr">dt_dopr</a>)</td><td align="left" valign="top"><a href="chapter_4.2.html#averaging_interval">averaging_interval</a>, |
---|
64 | (or <a href="chapter_4.2.html#averaging_interval_pr">averaging_interval_pr</a>), |
---|
65 | <a href="chapter_4.2.html#data_output_format">data_output_format</a>, |
---|
66 | <a href="chapter_4.2.html#dt_averaging_input">dt_averaging_input</a>, |
---|
67 | <a href="chapter_4.2.html#dt_averaging_input_pr">dt_averaging_input_pr</a>, |
---|
68 | <a href="chapter_4.2.html#skip_time_data_output">skip_time_data_output</a> |
---|
69 | (or <a href="chapter_4.2.html#skip_time_dopr">skip_time_dopr</a>), |
---|
70 | <a href="chapter_4.1.html#statistic_regions">statistic_regions</a></td></tr><tr><td align="left" valign="top">timeseries</td><td align="left" valign="top"><a href="chapter_3.4.html#DATA_1D_TS_NETCDF">DATA_1D_TS_NETCDF</a></td><td align="left" valign="top"><a href="chapter_4.2.html#dt_dots">dt_dots</a></td><td align="left" valign="top"><a href="chapter_4.2.html#data_output_format">data_output_format</a>, |
---|
71 | <a href="chapter_4.1.html#statistic_regions">statistic_regions</a></td></tr><tr><td align="left" valign="top">spectra</td><td align="left" valign="top"><a href="chapter_3.4.html#DATA_1D_SP_NETCDF">DATA_1D_SP_NETCDF</a></td><td align="left" valign="top"><a href="chapter_4.2.html#comp_spectra_level">comp_spectra_level</a>, |
---|
72 | <a href="chapter_4.2.html#data_output_sp">data_output_sp</a>, |
---|
73 | <a href="chapter_4.2.html#dt_data_output">dt_data_output</a> |
---|
74 | (or <a href="chapter_4.2.html#dt_dosp">dt_dosp</a>), |
---|
75 | <a href="chapter_4.2.html#spectra_direction">spectra_direction</a></td><td align="left" valign="top"><a href="chapter_4.2.html#averaging_interval">averaging_interval</a> (or |
---|
76 | <a href="chapter_4.2.html#averaging_interval_sp">averaging_interval_sp</a>), |
---|
77 | <a href="chapter_4.2.html#data_output_format">data_output_format</a>, |
---|
78 | <a href="chapter_4.2.html#dt_averaging_input_pr">dt_averaging_input_pr</a>, |
---|
79 | <a href="chapter_4.2.html#skip_time_data_output">skip_time_data_output</a> |
---|
80 | (or <a href="chapter_4.2.html#skip_time_dosp">skip_time_dosp)</a></td></tr><tr><td align="left" valign="top">2d cross section (xy)</td><td align="left" valign="top"><a href="chapter_3.4.html#DATA_2D_XY_NETCDF">DATA_2D_XY_NETCDF</a></td><td align="left" valign="top"><a href="chapter_4.2.html#data_output">data_output</a> |
---|
81 | (or <a href="chapter_4.3.html#data_output_user">data_output_user</a>), |
---|
82 | <a href="chapter_4.2.html#dt_data_output">dt_data_output</a> |
---|
83 | (or <a href="chapter_4.2.html#dt_do2d_xy">dt_do2d_xy</a>), |
---|
84 | <a href="chapter_4.2.html#section_xy">section_xy</a></td><td align="left" valign="top"><a href="chapter_4.2.html#data_output_format">data_output_format</a>, |
---|
85 | <a href="chapter_4.2.html#data_output_2d_on_each_pe">data_output_2d_on_each_pe</a>, |
---|
86 | <a href="chapter_4.2.html#do2d_at_begin">do2d_at_begin</a>, |
---|
87 | <a href="chapter_4.2.html#skip_time_data_output">skip_time_data_output</a> |
---|
88 | (or <a href="chapter_4.2.html#skip_time_do2d_xy">skip_time_do2d_xy</a>)</td></tr><tr><td align="left" valign="top">2d cross section (xy), |
---|
89 | time-averaged</td><td align="left" valign="top"><a href="chapter_3.4.html#DATA_2D_XY_AV_NETCDF">DATA_2D_XY_AV_NETCDF</a></td><td align="left" valign="top"><a href="chapter_4.2.html#data_output">data_output</a> |
---|
90 | (or <a href="chapter_4.3.html#data_output_user">data_output_user</a>), |
---|
91 | <a href="chapter_4.2.html#dt_data_output">dt_data_output</a> |
---|
92 | (or <a href="chapter_4.2.html#dt_data_output_av">dt_data_output_av</a> or |
---|
93 | <a href="chapter_4.2.html#dt_do2d_xy">dt_do2d_xy</a>), |
---|
94 | <a href="chapter_4.2.html#section_xy">section_xy</a></td><td align="left" valign="top"><a href="chapter_4.2.html#averaging_interval">averaging_interval</a>, |
---|
95 | <a href="chapter_4.2.html#dt_averaging_input">dt_averaging_input</a>, |
---|
96 | <a href="chapter_4.2.html#data_output_format">data_output_format</a>, |
---|
97 | <a href="chapter_4.2.html#data_output_2d_on_each_pe">data_output_2d_on_each_pe</a>, |
---|
98 | <a href="chapter_4.2.html#do2d_at_begin">do2d_at_begin</a>, |
---|
99 | <a href="chapter_4.2.html#skip_time_data_output">skip_time_data_output</a> |
---|
100 | (or <a href="chapter_4.2.html#skip_time_data_output_av">skip_time_data_output_av</a>, |
---|
101 | or <a href="chapter_4.2.html#skip_time_do2d_xy">skip_time_do2d_xy</a>)</td></tr><tr><td align="left" valign="top">2d cross section (xz)</td><td align="left" valign="top"><a href="chapter_3.4.html#DATA_2D_XZ_NETCDF">DATA_2D_XZ_NETCDF</a></td><td align="left" valign="top"><a href="chapter_4.2.html#data_output">data_output</a> |
---|
102 | (or <a href="chapter_4.3.html#data_output_user">data_output_user</a>), |
---|
103 | <a href="chapter_4.2.html#dt_data_output">dt_data_output</a> |
---|
104 | (or <a href="chapter_4.2.html#dt_do2d_xz">dt_do2d_xz</a>), |
---|
105 | <a href="chapter_4.2.html#section_xz">section_xz</a></td><td align="left" valign="top"><a href="chapter_4.2.html#data_output_format">data_output_format</a>, |
---|
106 | <a href="chapter_4.2.html#data_output_2d_on_each_pe">data_output_2d_on_each_pe</a>, |
---|
107 | <a href="chapter_4.2.html#do2d_at_begin">do2d_at_begin</a>, |
---|
108 | <a href="chapter_4.2.html#skip_time_data_output">skip_time_data_output</a> |
---|
109 | (or <a href="chapter_4.2.html#skip_time_do2d_xz">skip_time_do2d_xz</a>)</td></tr><tr><td align="left" valign="top">2d cross section (xz), |
---|
110 | time-averaged</td><td align="left" valign="top"><a href="chapter_3.4.html#DATA_2D_XZ_AV_NETCDF">DATA_2D_XZ_AV_NETCDF</a></td><td align="left" valign="top"><a href="chapter_4.2.html#data_output">data_output</a> |
---|
111 | (or <a href="chapter_4.3.html#data_output_user">data_output_user</a>), |
---|
112 | <a href="chapter_4.2.html#dt_data_output">dt_data_output</a> |
---|
113 | (or <a href="chapter_4.2.html#dt_data_output_av">dt_data_output_av</a> or |
---|
114 | <a href="chapter_4.2.html#dt_do2d_xz">dt_do2d_xz</a>), |
---|
115 | <a href="chapter_4.2.html#section_xz">section_xz</a></td><td align="left" valign="top"><a href="chapter_4.2.html#averaging_interval">averaging_interval</a>, |
---|
116 | <a href="chapter_4.2.html#dt_averaging_input">dt_averaging_input</a>, |
---|
117 | <a href="chapter_4.2.html#data_output_format">data_output_format</a>, |
---|
118 | <a href="chapter_4.2.html#data_output_2d_on_each_pe">data_output_2d_on_each_pe</a>, |
---|
119 | <a href="chapter_4.2.html#do2d_at_begin">do2d_at_begin</a>, |
---|
120 | <a href="chapter_4.2.html#skip_time_data_output">skip_time_data_output</a> |
---|
121 | (or <a href="chapter_4.2.html#skip_time_data_output_av">skip_time_data_output_av</a>, |
---|
122 | or <a href="chapter_4.2.html#skip_time_do2d_xz">skip_time_do2d_xz</a>)</td></tr><tr><td align="left" valign="top">2d cross section (yz)</td><td align="left" valign="top"><a href="chapter_3.4.html#DATA_2D_YZ_NETCDF">DATA_2D_YZ_NETCDF</a></td><td align="left" valign="top"><a href="chapter_4.2.html#data_output">data_output</a> |
---|
123 | (or <a href="chapter_4.3.html#data_output_user">data_output_user</a>), |
---|
124 | <a href="chapter_4.2.html#dt_data_output">dt_data_output</a> |
---|
125 | (or <a href="chapter_4.2.html#dt_do2d_yz">dt_do2d_yz</a>), |
---|
126 | <a href="chapter_4.2.html#section_yz">section_yz</a></td><td align="left" valign="top"><a href="chapter_4.2.html#data_output_format">data_output_format</a>, |
---|
127 | <a href="chapter_4.2.html#data_output_2d_on_each_pe">data_output_2d_on_each_pe</a>, |
---|
128 | <a href="chapter_4.2.html#do2d_at_begin">do2d_at_begin</a>, |
---|
129 | <a href="chapter_4.2.html#skip_time_data_output">skip_time_data_output</a> |
---|
130 | (or <a href="chapter_4.2.html#skip_time_do2d_yz">skip_time_do2d_yz</a>)</td></tr><tr><td align="left" valign="top">2d cross section (yz), |
---|
131 | time-averaged</td><td align="left" valign="top"><a href="chapter_3.4.html#DATA_2D_YZ_AV_NETCDF">DATA_2D_YZ_AV_NETCDF</a></td><td align="left" valign="top"><a href="chapter_4.2.html#data_output">data_output</a> |
---|
132 | (or <a href="chapter_4.3.html#data_output_user">data_output_user</a>), |
---|
133 | <a href="chapter_4.2.html#dt_data_output">dt_data_output</a> |
---|
134 | (or <a href="chapter_4.2.html#dt_data_output_av">dt_data_output_av</a> or |
---|
135 | <a href="chapter_4.2.html#dt_do2d_yz">dt_do2d_yz</a>), |
---|
136 | <a href="chapter_4.2.html#section_yz">section_yz</a></td><td align="left" valign="top"><a href="chapter_4.2.html#averaging_interval">averaging_interval</a>, |
---|
137 | <a href="chapter_4.2.html#dt_averaging_input">dt_averaging_input</a>, |
---|
138 | <a href="chapter_4.2.html#data_output_format">data_output_format</a>, |
---|
139 | <a href="chapter_4.2.html#data_output_2d_on_each_pe">data_output_2d_on_each_pe</a>, |
---|
140 | <a href="chapter_4.2.html#do2d_at_begin">do2d_at_begin</a>, |
---|
141 | <a href="chapter_4.2.html#skip_time_data_output">skip_time_data_output</a> |
---|
142 | (or <a href="chapter_4.2.html#skip_time_data_output_av">skip_time_data_output_av</a>, |
---|
143 | or <a href="chapter_4.2.html#skip_time_do2d_yz">skip_time_do2d_yz</a>)</td></tr><tr><td align="left" valign="top">3d volume</td><td align="left" valign="top"><a href="chapter_3.4.html#DATA_3D_NETCDF">DATA_3D_NETCDF</a></td><td align="left" valign="top"><a href="chapter_4.2.html#data_output">data_output</a> |
---|
144 | (or <a href="chapter_4.3.html#data_output_user">data_output_user</a>), |
---|
145 | <a href="chapter_4.2.html#dt_data_output">dt_data_output</a> |
---|
146 | (or <a href="chapter_4.2.html#dt_do3d">dt_do3d</a>)</td><td align="left" valign="top"><a href="chapter_4.2.html#data_output_format">data_output_format</a>, |
---|
147 | <a href="chapter_4.2.html#do3d_at_begin">do3d_at_begin</a>, |
---|
148 | <a href="chapter_4.2.html#nz_do3d">nz_do3d</a>, <a href="chapter_4.2.html#skip_time_data_output">skip_time_data_output</a> |
---|
149 | (or <a href="chapter_4.2.html#skip_time_do3d">skip_time_do3d</a>)</td></tr><tr><td align="left" valign="top">3d volume, time-averaged</td><td align="left" valign="top"><a href="chapter_3.4.html#DATA_3D_AV_NETCDF">DATA_3D_AV_NETCDF</a></td><td align="left" valign="top"><a href="chapter_4.2.html#data_output">data_output</a> |
---|
150 | (or <a href="chapter_4.3.html#data_output_user">data_output_user</a>), |
---|
151 | <a href="chapter_4.2.html#dt_data_output">dt_data_output</a> |
---|
152 | (or <a href="chapter_4.2.html#dt_data_output_av">dt_data_output_av</a> or |
---|
153 | <a href="chapter_4.2.html#dt_do3d">dt_do3d</a>)</td><td align="left" valign="top"><a href="chapter_4.2.html#averaging_interval">averaging_interval</a>, |
---|
154 | <a href="chapter_4.2.html#dt_averaging_input">dt_averaging_input</a>, |
---|
155 | <a href="chapter_4.2.html#data_output_format">data_output_format</a>, <a href="chapter_4.2.html#do3d_at_begin">do3d_at_begin</a>, |
---|
156 | <a href="chapter_4.2.html#nz_do3d">nz_do3d</a>, <a href="chapter_4.2.html#skip_time_data_output">skip_time_data_output</a> |
---|
157 | (or <a href="chapter_4.2.html#skip_time_data_output_av">skip_time_data_output_av</a>, |
---|
158 | or <a href="chapter_4.2.html#skip_time_do3d">skip_time_do3d</a>)</td></tr><tr><td align="undefined" valign="undefined">particle |
---|
159 | timeseries</td><td style="vertical-align: top;"><a href="chapter_3.4.html#DATA_1D_PTS_NETCDF">DATA_1D_PTS_NETCDF</a></td><td style="vertical-align: top;"><a href="chapter_4.2.html#dt_data_output">dt_data_output</a> |
---|
160 | (or <a href="chapter_4.2.html#dt_dopts">dt_dopts</a>)</td><td align="undefined" valign="undefined"><br> |
---|
161 | </td></tr><tr><td align="left" valign="top">particle attributes</td><td align="left" valign="top"><a href="chapter_3.4.html#DATA_PRT_NETCDF">DATA_PRT_NETCDF</a></td><td align="left" valign="top"><a href="chapter_4.2.html#dt_write_particle_data">dt_write_particle_data</a></td><td align="left" valign="top"><br> |
---|
162 | </td></tr></tbody></table><br><br><span style="font-weight: bold;">Creating, contents and |
---|
163 | post-processing of a PALM NetCDF file</span><br><br>This |
---|
164 | section describes, step-by-step, the creation, storage, and |
---|
165 | post-processing of PALM NetCDF datasets considering the output of 2d |
---|
166 | horizontal (xy) cross sections as example. The parameter settings |
---|
167 | described below are those of the <a href="http://www.muk.uni-hannover.de/%7Eraasch/PALM_group/INSTALL/example_p3d">example |
---|
168 | parameter file</a> (see <a href="chapter_4.4.1.html">chapter |
---|
169 | 4.4.1</a>) so this parameter file can be used to retrace the |
---|
170 | following explanations.<br><br><ol><li>Output |
---|
171 | of xy cross |
---|
172 | sections requires to set at least three parameters: first, the temporal |
---|
173 | interval of the output time (run parameter <a href="chapter_4.2.html#dt_data_output">dt_data_output</a> |
---|
174 | or <a href="chapter_4.2.html#dt_do2d_xy"><u>dt_do2d_xy)</u></a><span style="text-decoration: none;">, second<span style="text-decoration: none;"></span>, |
---|
175 | the names of the quantities for which cross section output is wanted</span><span style="text-decoration: none;"><span style="text-decoration: none;"> (<a href="chapter_4.2.html#data_output">data_output</a></span></span>), |
---|
176 | and third, the position (height level given as gridpoint index) of the |
---|
177 | cross sections (<a href="chapter_4.2.html#section_xy">section_xy</a>). |
---|
178 | The string <span style="font-style: italic;">'_xy'</span> |
---|
179 | must be appended to the name strings assigned to <span style="font-weight: bold;">data_output</span> in |
---|
180 | either case. Output times |
---|
181 | cannot be defined |
---|
182 | directly but only via the output time interval, starting from the |
---|
183 | beginning of the initial 3d run (t=0, but no cross sections are |
---|
184 | written at the time t=0; exceptions see <a href="chapter_4.2.html#do2d_at_begin">do2d_at_begin</a>). |
---|
185 | As an exception, the first output time can be set independently with |
---|
186 | parameter <a href="chapter_4.2.html#skip_time_data_output">skip_time_data_output</a> |
---|
187 | (or <a href="chapter_4.2.html#skip_time_do2d_xy">skip_time_do2d_xy</a>).<br><br><span style="font-weight: bold;">Very important:</span><br>If |
---|
188 | no values have been assigned to <b>data_output</b> , <span style="font-weight: bold;">dt_data_output</span> (or <span style="font-weight: bold;">dt_do2d_xy</span>), and <b>section_xy</b>, |
---|
189 | or |
---|
190 | if the values given for <span style="font-weight: bold;">dt_data_output</span> |
---|
191 | (or <b>dt_do2d_xy</b>) or <span style="font-weight: bold;">skip_time_data_output</span> |
---|
192 | (or <span style="font-weight: bold;">skip_time_do2d_xy</span>) |
---|
193 | are |
---|
194 | larger than the simulated time (see <a href="chapter_4.1.html#end_time">end_time</a>), |
---|
195 | <b>then there will be no output!<br><br></b>For |
---|
196 | output of time-averaged data, the string <span style="font-style: italic;">'_av'</span> has to be |
---|
197 | additionally appended to the respective name string (see <a href="chapter_4.2.html#data_output">data_output</a>).<br><br><br></li><li> |
---|
198 | <p style="line-height: 100%;">Instantaneous data are |
---|
199 | output in NetCDF |
---|
200 | format |
---|
201 | into the |
---|
202 | local file <a href="chapter_3.4.html#DATA_2D_XY_NETCDF">DATA_2D_XY_NETCDF</a>. |
---|
203 | This file must be linked with a permanent file by |
---|
204 | using a file connection statement in the <b>mrun</b> |
---|
205 | configuration |
---|
206 | file (see e.g. <a href="chapter_3.2.html">chapter |
---|
207 | 3.2</a>). At the end of the run the local file is copied to this |
---|
208 | file. Such a statement can look like this:<br><br><span style="font-family: monospace;"> |
---|
209 | DATA_2D_XY_NETCDF out:loc:tr xy# |
---|
210 | ~/$fname/OUTPUT/$fname _xy nc .</span><br><br>If |
---|
211 | the respective <b>mrun</b> call is |
---|
212 | like<br><br><span style="font-family: monospace;"> |
---|
213 | mrun -d test -r xy# ... </span><br style="font-family: monospace;"><br>then the local |
---|
214 | file <tt><font style="font-size: 10pt;" size="2">DATA_2D_XY_NETCDF</font></tt> |
---|
215 | is copied to the permanent file <tt><font style="font-size: 10pt;" size="2">~/test/OUTPUT/test/test_xy.nc</font> |
---|
216 | </tt>. However, the character string <span style="font-family: mon; font-style: italic;">'</span><tt style="font-style: italic;"><font style="font-size: 10pt;" size="2">xy#</font></tt><span style="font-style: italic;">'</span> activating the |
---|
217 | file connection statement (see third column of the |
---|
218 | statement) must be given in the <b>mrun</b> call as |
---|
219 | argument of the |
---|
220 | option -r (and/or -o)<b>.</b> <span style="text-decoration: none;">If |
---|
221 | t</span>his is forgotten by mistake, the model outputs the data |
---|
222 | to |
---|
223 | the local file, but this is not copied to the permanent file and thus |
---|
224 | the data are not available for the user after the run has finished.<br><br>The |
---|
225 | last (6th) column of the file connection statement, which defines the |
---|
226 | additional file suffix, should be the string <span style="font-style: italic;">'nc'</span>, because many |
---|
227 | application programs expect NetCDF files to have the file extension <span style="font-style: italic;">'.nc'</span>. (This |
---|
228 | additional suffix given in the 6th column is always put at the very end |
---|
229 | of the filename, even |
---|
230 | in case of cycle numbers.)<br><br>Time averaged data are |
---|
231 | output into local file <a href="chapter_3.4.html#DATA_2D_XY_AV_NETCDF">DATA_2D_XY_AV_NETCDF</a> |
---|
232 | which requires an additional file connection statement<br><br><span style="font-family: monospace;"> |
---|
233 | DATA_2D_XY_AV_NETCDF out:loc:tr xy# |
---|
234 | ~/$fname/OUTPUT/$fname _xy_av nc .</span><br></p></li><li>Using <a href="chapter_4.2.html#netcdf_data_format">netcdf_data_format</a> > <span style="font-style: italic;">2</span> or <a href="chapter_4.2.html#data_output_2d_on_each_pe">data_output_2d_on_each_pe</a> = <span style="font-style: italic;">.F.</span> generates a single NetCDF file containing data from all propcessors. However, with |
---|
235 | parallel runs and choice of <a href="chapter_4.2.html#data_output_2d_on_each_pe">data_output_2d_on_each_pe</a> |
---|
236 | = <i>.T.</i> |
---|
237 | each PE outputs the data of its subdomain |
---|
238 | not directly to the NetCDF file but to a separate file with the name |
---|
239 | PLOT2D_XY_<processor-Id>, |
---|
240 | where <processor-Id> is a four digit number (e.g. |
---|
241 | PLOT2D_XY_0000). These files have FORTRAN binary format. After PALM has |
---|
242 | finished, their content is merged into the final local destination file |
---|
243 | DATA_2D_XY_NETCDF by the program <span style="font-family: monospace;">combine_plot_fields</span>. <span style="font-weight: bold;"></span>This is done by |
---|
244 | adding the following output command to the configuration file:<br><br><span style="font-family: monospace;"> OC:[[$ |
---|
245 | ( echo $localhost | cut -c1-3 ) = imbh ]] && |
---|
246 | combine_plot_fields.x .</span><br><br>Using |
---|
247 | this call, possibly existing |
---|
248 | files of the other cross sections (xz, yz) and of 3d volume data are |
---|
249 | also merged to their respective NetCDF files. The tool writes |
---|
250 | informative messages about the actions accomplished into the job |
---|
251 | protocol, even if no files were found (i.e. the output command |
---|
252 | may remain in the configuration file, even if no appropriate files |
---|
253 | are created during the simulation). <br><br><br></li><li><a name="ncdump"></a>The contents of a NetCDF dataset can |
---|
254 | be simply analyzed with the tool <span style="font-family: monospace;">ncdump</span> |
---|
255 | (which is part of the NetCDF software). It can be used to display the |
---|
256 | dimension (coordinate) names and lengths; variable names, types, and |
---|
257 | shapes; attribute names and values; and optionally,<br>the values |
---|
258 | of |
---|
259 | data for all variables or selected variables in a netCDF dataset. The |
---|
260 | file content (without displaying the gridpoint data of the quantities) |
---|
261 | can be displayed with the command<br><br><span style="font-family: monospace;"> ncdump |
---|
262 | -c <filename> .</span><br><br>Usage |
---|
263 | of the <span style="font-family: monospace;">ncdump</span> |
---|
264 | command requires that the path to the NetCDF software is appropriately |
---|
265 | set. On the IMUK-Linux-cluster this path is set by default, on the |
---|
266 | HLRN-IBM-Regatta, the user has to execute the command<br><br><span style="font-family: monospace;"> module |
---|
267 | load netcdf .</span><br><br>Please |
---|
268 | refer to the system documentation or system administrator on |
---|
269 | how |
---|
270 | to setup the correct NetCDF path on the respective host.<br><br>An |
---|
271 | example how to interpret the <span style="font-family: monospace;">ncdump</span>-output |
---|
272 | will be given <a href="#NetCDF_example">further below</a>.<br><br></li><li>There |
---|
273 | are several application programs which can be used for graphical |
---|
274 | display of NetCDF datasets. One of the easiest ways to display the PALM |
---|
275 | data is the <a style="font-family: monospace;" href="http://ferret.wrc.noaa.gov/Ferret/">ferret</a> |
---|
276 | graphical user interface (GUI). On the IMUK-Linux-cluster, this can be |
---|
277 | called by |
---|
278 | executing the command<br><br><span style="font-family: monospace;"> ferret |
---|
279 | -gui .</span><br><br><span style="font-family: monospace;">ferret</span> is also |
---|
280 | available at <a href="http://www.hlrn.de/doc/ferret/index.html">HLRN</a>. |
---|
281 | Another possible tool is <span style="font-family: monospace;">ncview</span>, |
---|
282 | which is also available at HLRN (see the <a href="http://www.hlrn.de/doc/ncview/index.html">HLRN |
---|
283 | documentation</a>). Beside these general tools, the PALM group |
---|
284 | will develop a graphical interface based on <a href="http://www.ncl.ucar.edu/">NCL</a> |
---|
285 | (NCAR Command Language). This interface will be specially |
---|
286 | designed |
---|
287 | to display the PALM Data. A detailed documentation will be linked here |
---|
288 | as soon as available.<br><br><br></li><li><a name="netcdf_example_program"></a>One |
---|
289 | of the most flexible general ways for postprocessing NetCDF data |
---|
290 | is reading these data into a FORTRAN program. The <a href="http://www.muk.uni-hannover.de/%7Eraasch/PALM_group/INSTALL/read_palm_netcdf_data.f90"><font color="#000080">example program</font></a> shows |
---|
291 | how to read 2d or 3d NetCDF datasets created by PALM. Compiling this |
---|
292 | program requires that the |
---|
293 | NetCDF library is installed (if neccessary, please ask your system |
---|
294 | administrator). Some compilation instructions are given in the header |
---|
295 | of the |
---|
296 | example program.<br><br><br></li><li>By |
---|
297 | default, each PALM job creates its own NetCDF files. If permanent files |
---|
298 | with respective filenames are already existing, then new files with |
---|
299 | higher cycle numbers will be created. However, in case of a job chain, |
---|
300 | it is possible to extend the NetCDF datasets created by the initial |
---|
301 | run with data from the restart run(s). As a result, data of |
---|
302 | all |
---|
303 | output times of the complete job chain are contained in one file and |
---|
304 | the number of data files to be handled by the user may be reduced |
---|
305 | significantly.<br>To extend a NetCDF dataset (created by a |
---|
306 | previous run |
---|
307 | of a job chain) with data from the current run requires that this |
---|
308 | dataset must be provided as an INPUT file. This may be difficult in |
---|
309 | case that PALM is running on a remote host because typically the output |
---|
310 | data files from the previous run have been already transferred by <span style="font-weight: bold;">mrun</span> to the local |
---|
311 | workstation with a file connection statement like<br><br><span style="font-family: monospace;"> |
---|
312 | DATA_2D_XY_NETCDF |
---|
313 | out:loc:tr xy#:xyf |
---|
314 | ~/palm/current_version/JOBS/$fname/OUTPUT |
---|
315 | _xy nc</span><br><br>and thus |
---|
316 | they are not available on the remote host any more. <br>A |
---|
317 | workaround for solving this problem is to create an additional copy of |
---|
318 | the output file on the remote machine by adding the file connection |
---|
319 | statement<br><br><span style="font-family: monospace;"> |
---|
320 | DATA_2D_XY_NETCDF out:loc xy#:xyf |
---|
321 | ~/palm/current_version/JOBS/$fname/OUTPUT _xy nc</span><br><br>This |
---|
322 | additional copy can then be accessed from a restart job as an input |
---|
323 | file using the file connection statement<br><br><span style="font-family: monospace;"> |
---|
324 | DATA_2D_XY_NETCDF in:locopt xyf |
---|
325 | ~/palm/current_version/JOBS/$fname/OUTPUT _xy nc</span><br><br>Here |
---|
326 | the file attribut <span style="font-family: monospace;">locopt</span> |
---|
327 | (2nd column) guarantees that the job continues if a permanent file does |
---|
328 | not exist (e.g. in case of an initial run). Otherwise, the job would be |
---|
329 | aborted.<br>Although the dataset created by the last run of a job |
---|
330 | chain |
---|
331 | will contain data from all selected time levels of the complete job |
---|
332 | chain, the main disadvantage of this workaround is that the datasets |
---|
333 | created by the remaining jobs (with lower cycle numbers) still exist |
---|
334 | and may consume large disc space. They have to be deleted "by hand" by |
---|
335 | the user on the local machine as well as on the remote |
---|
336 | machine because they only contain redundant data from the |
---|
337 | earlier |
---|
338 | time levels which are already contained in the dataset created |
---|
339 | by |
---|
340 | the last job of the job chain.<br><br><span style="font-weight: bold;">Note:</span><br>Extension |
---|
341 | of PALM NetCDF datasets of 2d horizontal cross sections requires that |
---|
342 | parameters <a href="chapter_4.2.html#data-output">data_output</a> |
---|
343 | and <a href="chapter_4.2.html#section_xy">section_xy</a> |
---|
344 | for the restart runs are set identical to the initial run. In case of a |
---|
345 | value mismatch between initial and restart runs, a warning is issued in |
---|
346 | the job protocol file and the dataset will contain only data from those |
---|
347 | timelevels calculated within the restart run.<br>Similar |
---|
348 | restrictions apply for all other PALM NetCDF datasets (i.e. profiles, |
---|
349 | vertical cross sections, volume data, etc.).</li></ol><br> <br><span style="font-weight: bold;"><a name="NetCDF_example"></a>Example |
---|
350 | of a PALM NetCDF dataset</span><br><br>The |
---|
351 | NetCDF dataset described here contains data of instantaneous horizontal |
---|
352 | cross sections and has been created using the settings of the <a href="http://www.muk.uni-hannover.de/%7Eraasch/PALM_group/INSTALL/example_p3d">example |
---|
353 | parameter file</a> (see <a href="chapter_4.4.1.html">chapter |
---|
354 | 4.4.1</a>), |
---|
355 | i.e. it contains section data of the w-velocity-component and of the |
---|
356 | potential temperature for vertical grid levels with index <span style="font-family: monospace;">k = 2</span> and <span style="font-family: monospace;">k = 10</span>, |
---|
357 | selected by the respective parameter settings <a href="chapter_4.2.html#data_output">data_output</a> = <span style="font-style: italic;">'w_xy'</span>, <span style="font-style: italic;">'pt_xy'</span>, and <a href="chapter_4.2.html#section_xy">section_xy</a> = <span style="font-style: italic;">2</span>, <span style="font-style: italic;">10</span>. Output has been |
---|
358 | created after every 900 s (<a href="chapter_4.2.html#dt_data_output">dt_data_output</a> |
---|
359 | = <span style="font-style: italic;">900.0</span>). |
---|
360 | Because of <a href="chapter_4.2.html#end_time">end_time</a> |
---|
361 | = <span style="font-style: italic;">3600.0</span>, |
---|
362 | the file contains data of 4 time levels (t = 900, 1800, 2700, 3600 s).<br>Supposed |
---|
363 | that the name of the NetCDF dataset is <span style="font-family: monospace;">example_xy.nc</span>, |
---|
364 | an analysis of the file contents using the command<br><br><span style="font-family: monospace;"> ncdump |
---|
365 | -c example_xy.nc</span><br><br>will create the |
---|
366 | following output. The original ncdump output is displayed using <span style="font-family: monospace;">fixed spacing</span>, |
---|
367 | additional explanations are given in <span style="font-style: italic; font-family: monospace;">italian</span>.<br><br><div style="margin-left: 40px;"><span style="font-family: monospace;">netcdf example_xy { |
---|
368 | |
---|
369 | <span style="font-style: italic;">! filename</span></span><br style="font-family: monospace;"><span style="font-family: monospace;">dimensions: |
---|
370 | |
---|
371 | |
---|
372 | <span style="font-style: italic;">! |
---|
373 | 41 gridpoints along x and y, 4 timelevels</span></span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
374 | time = UNLIMITED ; // (4 currently) <span style="font-style: italic;">! unlimited means |
---|
375 | that additional time levels can be added (e.g. by</span></span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
376 | |
---|
377 | |
---|
378 | |
---|
379 | |
---|
380 | <span style="font-style: italic;">! restart jobs)</span><br> |
---|
381 | zu_xy = 2 ; |
---|
382 | |
---|
383 | <span style="font-style: italic;">! |
---|
384 | vertical dimension (2, because two cross sections are selected);</span></span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
385 | zw_xy = 2 ; |
---|
386 | |
---|
387 | <span style="font-style: italic;">! |
---|
388 | there are two different vertical dimensions zu and zw because due</span></span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
389 | zu1_xy = 1 ; |
---|
390 | |
---|
391 | <span style="font-style: italic;">! |
---|
392 | to the staggered grid the z-levels of variables are those of the</span></span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
393 | x = 41 ; |
---|
394 | |
---|
395 | <span style="font-style: italic;">! u- or the w-component of the |
---|
396 | velocity</span></span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
397 | y = 41 ;</span><br style="font-family: monospace;"><span style="font-family: monospace;">variables: |
---|
398 | |
---|
399 | |
---|
400 | <span style="font-style: italic;">! |
---|
401 | precision, dimensions, and units of the variables</span></span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
402 | double time(time) ; |
---|
403 | <span style="font-style: italic;">! the variables containing the |
---|
404 | time levels and grid point coordinates</span></span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
405 | time:units = "seconds" ; |
---|
406 | <span style="font-style: italic;">! have the same names as the |
---|
407 | respective dimensions</span></span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
408 | double zu_xy(zu_xy) ;</span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
409 | zu_xy:units = "meters" ;</span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
410 | double zw_xy(zw_xy) ;</span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
411 | zw_xy:units = "meters" ;</span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
412 | double zu1_xy(zu1_xy) ;</span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
413 | zu1_xy:units = "meters" ;</span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
414 | double ind_z_xy(zu_xy) ;</span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
415 | ind_z_xy:units = "gridpoints" ;</span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
416 | double x(x) ;</span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
417 | x:units = "meters" ;</span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
418 | double y(y) ;</span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
419 | y:units = "meters" ;</span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
420 | float w_xy(time, zw_xy, y, x) ; |
---|
421 | <span style="font-style: italic;">! array of the |
---|
422 | vertical velocity; it has 4 dimensions: x and y,</span></span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
423 | w_xy:long_name = "w_xy" ; |
---|
424 | <span style="font-style: italic;">! because it is a horizontal |
---|
425 | cross section, zw_xy, which defines</span></span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
426 | w_xy:units = "m/s" ; |
---|
427 | <span style="font-style: italic;">! the vertical levels of the |
---|
428 | sections, and time, for the time levels</span></span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
429 | float pt_xy(time, zu_xy, y, x) ; <span style="font-style: italic;">! array of the potential |
---|
430 | temperature, which is defined on the u-grid</span></span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
431 | pt_xy:long_name = "pt_xy" ;</span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
432 | pt_xy:units = "K" ;</span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;">// global attributes:</span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
433 | :Conventions = "COARDS" ;</span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
434 | :title = "PALM |
---|
435 | 3.0 run: |
---|
436 | example.00 host: ibmh 13-04-06 15:12:43" ; |
---|
437 | <span style="font-style: italic;">! PALM |
---|
438 | run-identifier</span></span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
439 | :VAR_LIST = ";w_xy;pt_xy;" ; |
---|
440 | <span style="font-style: italic;">! |
---|
441 | the list of output quantities contained in this dataset;</span></span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
442 | |
---|
443 | |
---|
444 | |
---|
445 | |
---|
446 | <span style="font-style: italic;">! this global |
---|
447 | attribute can be used by FORTRAN programs to identify</span><br> |
---|
448 | |
---|
449 | |
---|
450 | |
---|
451 | |
---|
452 | <span style="font-style: italic;">! and read the |
---|
453 | quantities contained in the file</span><br>data:</span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;"> time = 905.3, |
---|
454 | 1808.98, 2711.98, 3603.59 ; <span style="font-style: italic;">! |
---|
455 | values of the four time levels</span></span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;"> zu_xy = 75, 475 ; |
---|
456 | |
---|
457 | <span style="font-style: italic;">! heights of the two selected |
---|
458 | cross sections (u-grid)</span></span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;"> zw_xy = 100, 500 ;</span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;"> zu1_xy = 25 ;</span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;"> x = 0, 50, 100, |
---|
459 | 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, <span style="font-style: italic;">! x-coordinates of the gridpoints</span></span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
460 | 750, 800, 850, 900, 950, 1000, 1050, 1100, 1150, 1200, 1250, 1300, |
---|
461 | 1350, </span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
462 | 1400, 1450, 1500, 1550, 1600, 1650, 1700, 1750, 1800, 1850, 1900, 1950, |
---|
463 | </span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
464 | 2000 ;</span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;"> y = 0, 50, 100, |
---|
465 | 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, </span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
466 | 750, 800, 850, 900, 950, 1000, 1050, 1100, 1150, 1200, 1250, 1300, |
---|
467 | 1350, </span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
468 | 1400, 1450, 1500, 1550, 1600, 1650, 1700, 1750, 1800, 1850, 1900, 1950, |
---|
469 | </span><br style="font-family: monospace;"><span style="font-family: monospace;"> |
---|
470 | 2000 ;</span><br style="font-family: monospace;"><span style="font-family: monospace;">}</span><br></div><br>If |
---|
471 | the option <span style="font-family: monospace;">-c</span> |
---|
472 | is omitted in the <span style="font-family: monospace;">ncdump</span> |
---|
473 | call, then also the complete grid point data of all quantities are |
---|
474 | output to the terminal.<br><br>The <a href="http://www.muk.uni-hannover.de/%7Eraasch/PALM_group/INSTALL/read_palm_netcdf_data.f90"><font color="#000080">example program</font></a><span style="font-weight: bold;"></span> shows how to read |
---|
475 | this 2d |
---|
476 | horizontal cross section dataset from a FORTRAN program (<a href="#netcdf_example_program">see above</a>).<br><hr> |
---|
477 | <p style="line-height: 100%;"><br><font color="#000080"><font color="#000080"><a href="chapter_4.5.html"><font color="#000080"><img name="Grafik1" src="left.gif" align="bottom" border="2" height="32" width="32"></font></a><a href="index.html"><font color="#000080"><img name="Grafik2" src="up.gif" align="bottom" border="2" height="32" width="32"></font></a><a href="chapter_4.5.2.html"><font color="#000080"><img style="border: 2px solid ; width: 32px; height: 32px;" alt="" name="Grafik3" src="right.gif"></font></a></font></font></p><p style="line-height: 100%;"><span style="font-style: italic;">Last |
---|
478 | change:</span> $Id: chapter_4.5.1.html 493 2010-03-01 08:30:24Z raasch $ </p> |
---|
479 | </body></html> |
---|