-
Notifications
You must be signed in to change notification settings - Fork 3
/
readBUFR.html
215 lines (147 loc) · 10.5 KB
/
readBUFR.html
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
<html>
<head>
<title>Help for reading BUFR and PREPBUFR files in WRFDA</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="KEYWORDS" content="meteorology, mesoscale, microscale, weather modeling, forecasting weather, weather prediction, predictability, cloud systems, boundary layers, surface-atmosphere interactions, convective cloud systems, atmospheric chemistry, precipitating weather systems, wildfire research, National Center for Atmospheric Research">
<meta name="DESCRIPTION" content="WRF Mesoscale Model Users homepage">
<meta name="ROBOTS" content="INDEX,FOLLOW">
<meta name="resource-type" content="document">
<meta http-equiv="expires" content="0">
<meta name="author" content="MMM Webmaster">
<meta name="copyright" content="Copyright (c) 2016 by UCAR">
<meta name="revisit-after" content="1 days">
<meta name="distribution" content="Global">
<meta name="rating" content="General">
<SCRIPT language=JavaScript src="scripts/menu_array.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="scripts/mmenu.js" type=text/javascript></SCRIPT>
<link href="images/wrfstyle.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" link="#000099" vlink="#000099" alink="#FF3300" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#000000">
<td height="10" bgcolor="#000000"><div align="left"><img src="images/transgif.gif" width="1" height="1"></div>
</td>
</tr>
<tr valign="top">
<td height="10" bgcolor="#DDFFDD"><img src="images/header_new_cropped.png" height="56" border="0"></td>
</tr>
<tr bgcolor="#FFCC33">
<td height="6" background="images/goldrule.jpg" bgcolor="#009933"><img src="images/goldrule.jpg" width="1" height="1"></td>
</tr>
<tr>
<td height="34" bgcolor="#009933"> </td>
</tr>
<tr>
<td height="2" bgcolor="#ffcc66"><img src="images/transgif.gif" width="1" height="1"></td>
</tr>
</table>
<table width="100%" height="89%" border="0" cellpadding="0" cellspacing="0" class="background">
<tr>
<td width="100%" height="573" valign="top" bgcolor="#CBFFCD"><table width="780" height="851" border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="117" height="731" bordercolor="#009933" bgcolor="#009933"><p> </p>
<table width="117" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><p align="center"><a href="publications.html" class="leftnavlink">WRFDA Publications</a></p>
<p align="center"><a href="technotes.html" class="leftnavlink">Technical Notes</a></p>
<p align="center"><a href="code_viewer/index.html" class="leftnavlink">WRFDA Code Browser</a></p>
<p align="center"><a href="Docs/user_guide_V3.8.1/WRFDA_Users_Guide.html" class="leftnavlink">User's Guide V3.8.1</a></p>
<p align="center"><a href="Docs/user_guide_V3.8/WRFDA_Users_Guide.html" class="leftnavlink">User's Guide V3.8</a></p>
<p align="center"><a href="Docs/user_guide_V3.7.1/WRFDA_Users_Guide.html" class="leftnavlink">User's Guide V3.7.1</a></p>
<p align="center"><a href="Docs/user_guide_V3.7/WRFDA_Users_Guide.html" class="leftnavlink">User's Guide V3.7</a></p>
<p align="center"><a href="Docs/user_guide_V3.6.1/WRFDA_Users_Guide.html" class="leftnavlink">User's Guide V3.6.1</a></p>
<p align="center"><a href="Docs/user_guide_V3.6/WRFDA_Users_Guide.html" class="leftnavlink">User's Guide V3.6</a></p>
<p align="center"><a href="Docs/user_guide_V3.5.1/WRFDA_Users_Guide.html" class="leftnavlink">User's Guide V3.5.1</a></p>
<p align="center"><a href="Docs/user_guide_V3.5/WRFDA_Users_Guide.html" class="leftnavlink">User's Guide V3.5</a></p>
<p align="center"><a href="Docs/user_guide_V3.4.1/users_guide_chap6.htm" class="leftnavlink">User's Guide V3.4.1</a></p>
<p align="center"><a href="Docs/user_guide_V3.4/users_guide_chap6.htm" class="leftnavlink">User's Guide V3.4</a></p>
<p align="center"><a href="Docs/user_guide_V3.3/users_guide_chap6.htm" class="leftnavlink">User's Guide V3.3</a></p>
<p align="center"><a href="Docs/older_usersguides.html" class="leftnavlink">Older versions</a></p>
<p align="center"><a href="OnlineTutorial/index.html" class="leftnavlink">WRFDA Online Tutorial</a></p>
<p align="center"><a href="how_to_compile.html" class="leftnavlink">How to compile WRFDA</a></p>
<p align="center"><a href="yellowstone.html" class="leftnavlink">WRFDA on Yellowstone</a></p>
<p align="center" style="border-width: 5px;border-style: solid;border-color: #CBFFCD;background-color: #CBFFCD;font-family: Arial; line-height: 10pt;font-weight: bold;">Reading BUFR files</p>
</td>
</tr>
</table>
<p> </p> <p> </p> <img src="images/shim112.gif" width="112" height="1"></td>
<td bgcolor="#CBFFCD"><p> </p>
<p style="padding-right: 35px;padding-left: 35px;"><table width="100%" border="1" class="bodytable"><tr><td><b>With WRFDA Version 3.5.1 and later you should not experience these problems. <br><br>If you are using Version 3.5.1 or later and have trouble assimilating BUFR or PREPBUFR files, <a href="wrfhelp.html">contact wrfhelp</a>.</b></td></tr></table></p>
<p> </p>
<h1>Issues with reading PREPBUFR and BUFR radiance data with gfortran and intel compilers</h1>
<h2><strong>Symptoms</strong></h2>
<p class="bodytext">WRFDA compiled with gfortran or ifort to read BUFR files will likely return the following error message when trying to read a file which has been unblocked and re-blocked by the "cwordsh" program:</p>
<p class="bodytext">**************BUFR ARCHIVE LIBRARY ABORT*****************<br>
BUFRLIB: OPENBF - ERROR READING INPUT FILE CONNECTED TO UNIT 26 WHEN<br>
CHECKING FOR 'BUFR' IN FIRST 4 BYTES OF RECORD<br>
**************BUFR ARCHIVE LIBRARY ABORT*****************</p>
<h2><strong>For WRFDA 3.3 through 3.5</strong> : Set environment variable</h2>
<p class="bodytext">GFORTRAN_CONVERT_UNIT (gfortran) and F_UFMTENDIAN (ifort) environment variables will override the CONVERT specifier in the open statement.
This serves to reserve and fix the units used to open BUFR files. It is not necessary to amend the open statement for other compilers.</p>
<p class="bodytext">For csh</p>
<p class="bodytext">gfortran: setenv GFORTRAN_CONVERT_UNIT "little_endian:94-99"<br>
ifort: setenv F_UFMTENDIAN "little:94-99"<br>
</p>
<p class="bodytext">For bash</p>
<p class="bodytext">gfortran: export GFORTRAN_CONVERT_UNIT="little_endian:94-99"<br>
ifort: export F_UFMTENDIAN="little:94-99"<br>
</p>
<p class="bodytext">Side effect: In order not to interfere with other applications, it is good practice to unset the environment<br>
variable after da_wrfvar.exe is completed. <br>
</p>
<p class="bodytext">For the reblocking utility, reblock.c writen by Baoyu YIN is recommended. <br>
(http://www.math.ucdavis.edu/~cheung/PROJECTS/DAO_Projects/halem/iret/reblock.c)<br>
It reads a blocked BUFR file, byteswap the f77 control words and <br>
writes out the file directly, no bufrlib is needed.</p>
<h2><strong>For WRFDA v3.2.1 or earlier</strong>: Adding convert='little_endian' to the open statement</h2>
<p class="bodytext">1. da/da_obs_io/da_read_obs_bufr.inc</p>
<p class="bodytext">At the section "bufrfile:", add convert='little_endian' to the open statement</p>
<p class="bodytext">open(unit = iunit, FILE = trim(filename), &<br>
iostat = iost, form = 'unformatted', STATUS = 'OLD' &<br>
convert='little_endian')</p>
<p class="bodytext">2. da/da_radiance/da_read_obs_bufrairs.inc</p>
<p class="bodytext">At the section "Open BUFR file" , add convert='little_endian' to the open statement<br>
<br>
open(unit = lnbufr, FILE = trim(infile), &<br>
form = 'unformatted', iostat = iost, &<br>
convert='little_endian')</p>
<p class="bodytext">3. da/da_radiance/da_read_obs_bufrtovs.inc</p>
<p class="bodytext">At the section "! 0.0 Open unit to satellite bufr file and read file header", add convert='little_endian' to the open statement<br>
<br>
open(unit = lnbufr, FILE = trim(infile), &<br>
form = 'unformatted', iostat = iost, status = 'old', &<br>
convert='little_endian')</p>
<p class="bodytext">4. da/da_radiance/da_read_obs_bufrssmis.inc </p>
<p class="bodytext">At the section "! 0.0 Open unit to satellite bufr file and read file header", add convert='little_endian' to the open statement<br>
<br>
open(unit = lnbufr, FILE = trim(infile), &<br>
form = 'unformatted', iostat = iost, status = 'old', &<br>
convert='little_endian')<br>
</p>
<p class="bodytext">5. da/da_obs_io/da_read_obs_bufrgpsro.inc</p>
<p class="bodytext">At the section "! open file " add convert='little_endian' to the open statement<br>
<br>
open(unit = iunit, FILE = trim(filename), &<br>
iostat = iost, form = 'unformatted', STATUS ='OLD' , & <br>
convert='little_endian')<br>
</p>
<p class="bodytext">Side effect: After the modification, the code will work just for gfortran and ifort compilers<br>
</p>
<p align="center" class="detailtextRed">
<script language="JavaScript">
<!--
document.write("updated " + document.lastModified);
// -->
</script>
</p>
<p class="bodytext"> </p>
<br> <br> <img src="images/transgif.gif" width="1" height="1"><img src="images/shim162.gif" width="162" height="1"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="50" bgcolor="#009933" class="detailtext"> </td>
</tr>
</table>
</body>
</html>