pumaburn.tex 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. \section{Introduction}
  2. The {\bf Pumaburner} is a postprocessor for the {\bf Planet Simulator}
  3. and the {\bf PUMA} model family.
  4. It is the only interface between the {\it raw} model output data
  5. and the diagnostics, graphics, and user software.
  6. The output data of {\bf PUMA} is stored as
  7. packed binary (16 bit) values using the model representation.
  8. Prognostic variables such as temperature, divergence, vorticity,
  9. pressure and humidity are stored as coefficients of spherical harmonics
  10. on $\sigma$ levels. Variables like radiation,
  11. precipitation, evaporation, clouds and other fields of the
  12. parameterization package are stored on Gaussian grids.
  13. The tasks of the {\bf Pumaburner} are:
  14. \begin{itemize}
  15. \item Unpack the {\it raw} data to full real representation.
  16. \item Transform variables from the model's representation
  17. to a user selectable format, e.g. grids,
  18. zonal mean cross sections, and Fourier coefficients.
  19. \item Calculate diagnostic variables, such as vertical velocity,
  20. geopotential height, wind components, etc.
  21. \item Transfrom variables from $\sigma$ levels to user
  22. selectable pressure levels.
  23. \item Compute monthly means and standard deviations.
  24. \item Write selected data either in SERVICE or NetCDF format
  25. for further processing.
  26. \end{itemize}
  27. \section{Installation / Compilation}
  28. The Pumaburner doesn't have to be installed, in most cases a compilation
  29. of the source code and the storage of the executable in a "bin" directory
  30. is sufficient. E.g.:
  31. \begin{verbatim}
  32. c++ -O2 -o burn6 burn6.cpp -lm -lnetcdf_c++ -lnetcdf
  33. \end{verbatim}
  34. The NetCDF library version 3 or higher must be installed on the computer,
  35. otherwise the above command will fail with an error.
  36. On some computer sites NetCDF might be installed, but the include or
  37. library search paths may lack the right configuration. In those cases either
  38. ask your administrator to update the configuration or specify the
  39. necessary locations on the compiler command using "-I" to specify the path
  40. for "Include" files and "-L" for library files. Of course other C++ compilers,
  41. like g++ for example may be used as well. If you're not the admin of your
  42. system, put the executable burn6 into your \$HOME/bin directory.
  43. This is normally part of your search path.
  44. \section{Usage}
  45. \begin{verbatim}
  46. burn6 [options] InputFile OutputFile <namelist >printout
  47. option -h : help (this output)
  48. option -c : print available codes and names
  49. option -d : debug mode (verbose output)
  50. option -g : write GRADS control file for SERVICE data file
  51. option -n : NetCDF output (override namelist option)
  52. option -m : Mean=1 output (override namelist option)
  53. InputFile : Planet Simulator or PUMA data file
  54. OutputFile : SERVICE or NetCDF format file
  55. namelist : redirected <stdin>
  56. printout : redirected <stdout>
  57. \end{verbatim}
  58. \section{Namelist}
  59. The namelist values control the selection, coordinate system
  60. and output format of the postprocessed variables.
  61. Names and values are not case sensitive.
  62. Values can be assigned to the following names: \vspace{0.4cm}
  63. \begin{tabular}{|l|c|l|l|l|}
  64. \hline
  65. Name & Def. & Type & Description & Example \\
  66. \hline
  67. {\bf HTYPE }& S & char & Horizontal type & HTYPE=G \\
  68. {\bf VTYPE }& S & char & Vertical type & VTYPE=P \\
  69. {\bf MODLEV }& 0 & int & Model levels & MODLEV=2,3,4 \\
  70. {\bf hPa }& 0 & real & Pressure levels & hPa=500,1000 \\
  71. {\bf LATS }& 0 & int & No. of latitudes for output grid & LATS=40 \\
  72. {\bf LONS }& 0 & int & No. of longitudes for output grid & LONS=80 \\
  73. {\bf CODE }& 0 & int & ECMWF field code & CODE=130,152 \\
  74. {\bf NETCDF }& 0 & int & NetCDF output selector & NETCDF=1 \\
  75. {\bf CYCLICAL }& 0 & int & Add data for longitude=360 & CYCLICAL=0 \\
  76. {\bf MEAN }& 1 & int & Compute monthly means & MEAN=0 \\
  77. {\bf HHMM }& 1 & int & Time format in Service format & HHMM=0 \\
  78. {\bf HEAD7 }& 0 & int & User parameter & HEAD7=0815 \\
  79. {\bf MARS }& 0 & int & Use constants for planet Mars & MARS=1 \\
  80. {\bf MULTI }& 0 & int & Process multiple input files & MULTI=12 \\
  81. \hline
  82. \end{tabular}
  83. \section{HTYPE}
  84. {\bf HTYPE} accepts the first character of the following string.
  85. The following settings are equivalent: HTYPE = S, HTYPE=Spherical Harmonics
  86. HTYPE = Something. Blanks and the equals sign are optional. \\
  87. Possible Values are: \vspace{0.4cm}
  88. \begin{tabular}{|l|l|l|}
  89. \hline
  90. Setting & Description & Dimension for T21 resolution \\
  91. \hline
  92. HTYPE = S & Spherical Harmonics & (506):(22 * 23 coefficients) \\
  93. HTYPE = F & Fourier Coefficients & (32,42):(latitudes,wavenumber) \\
  94. HTYPE = Z & Zonal Means & (32,levels):(latitudes,levels) \\
  95. HTYPE = G & Gaussian Grid & (64,32):(longitudes,latitudes) \\
  96. \hline
  97. \end{tabular}
  98. \section{VTYPE}
  99. {\bf VTYPE} accepts the first character of the following string.
  100. The following settings are equivalent: VTYPE = S, VTYPE=Sigma,
  101. VTYPE = Super. Blanks and the equals sign are optional. \\
  102. Possible Values are: \vspace{0.4cm}
  103. \begin{tabular}{|l|l|l|}
  104. \hline
  105. Setting & Description & Remark \\
  106. \hline
  107. VTYPE = S & Sigma (model) levels & Some derived variables are not available \\
  108. VTYPE = P & Pressure levels & Interpolation to pressure levels \\
  109. \hline
  110. \end{tabular}
  111. \section{MODLEV}
  112. {\bf MODLEV} is used in combination with {\bf VTYPE = S}.
  113. If VTYPE is not set to ``Sigma'', the contents of MODLEV are ignored.
  114. MODLEV is an integer array that can have as many values as there are
  115. levels in the model output. The levels are numbered from the top of
  116. the atmosphere to the bottom. The number of levels and the
  117. corresponding $\sigma$ values are listed in the Pumaburner printout.
  118. The levels are ordered in the output file according to the MODLEV values.
  119. MODLEV=1,2,3,4,5 produces an output file of five model levels
  120. sorted from top to bottom, while MODLEV=5,4,3,2,1 sorts them
  121. from bottom to top.
  122. \section{hPa}
  123. {\bf hPa} is used in combination with {\bf VTYPE = P}.
  124. If VTYPE is not set to ``Pressure'', the contents of hPa are ignored.
  125. hPa is a real array that accepts pressure values with the
  126. units hectoPascal or millibar. All output variables will be
  127. interpolated to the selected pressure levels.
  128. There is no extrapolation at the top of the atmosphere.
  129. For pressure values, which are lower than that at the model's
  130. top level, the top level value of the variable is taken.
  131. The variables, temperature and geopotential height, are extrapolated
  132. if the selected pressure is higher than the surface pressure.
  133. All other variables are set to the value of the lowest mode level
  134. for this case. The outputfile contains the levels in the same order
  135. as they are set in hPa. For example: hpa = 100,300,500,700,850,900,1000.
  136. \section{LATS and LONS}
  137. The Pumaburner defaults to the dimension of the model run.
  138. E.g. $Lats=32$ and $Lons=64$ for a T21 resolution.
  139. Note however, that this results in Gaussian grids with
  140. non equidistant latitudes.
  141. Selecting for Lats and Lons values, that are different from
  142. the internal resolution produces equidistant lat-lon grids.
  143. Lats sets the number of latitudes from north to south,
  144. with the North Pole at index 1 and the South Pole at index Lats.
  145. Delta Phi is therefore 180 degrees / (Lats - 1).
  146. Lons sets the number of gridpoints on every latitude circle.
  147. Delta Lambda is 360 / Lons.
  148. Index 1 is on the Greewich Meridian (0 degrees), while the last index
  149. denotes the point (360 degrees - Delta Lambda).
  150. Technical note:
  151. Variables that are stored as spherical harmonics
  152. (Temperature, vorticity, divergence, etc.) are calculated
  153. on the user grid by setting up the Legendre Transformation
  154. and the FFT accordingly. Variables, that are stored on
  155. Gaussian grids are interpolated with a bilinear interpolation.
  156. Note: Lats $>= 8$ and Lons $>= 16$ due to technical reasons.
  157. \section{MEAN}
  158. {\bf MEAN} can be used to compute monthly means and/or deviations.
  159. The Pumaburner reads date and time information from the model file
  160. and handles different lengths of months and output intervals correctly.
  161. \vspace{0.4cm}
  162. \begin{tabular}{|l|p{12cm}|}
  163. \hline
  164. Setting & Description \\
  165. \hline
  166. MEAN = 0 & Do not average - all terms are processed. \\
  167. MEAN = 1 & Compute and write monthly mean fields.
  168. Not for spherical harmonics, Fourier coefficients, or
  169. zonal means on sigma levels. \\
  170. MEAN = 2 & Compute and write monthly deviations.
  171. Not for spherical harmonics, Fourier coefficients, or
  172. zonal means on sigma levels.
  173. Deviations are not available for NetCDF output. \\
  174. MEAN = 3 & A combination of MEAN=1 and MEAN=2.
  175. Each mean field is followed by a deviation
  176. field with an identical header record.
  177. Not for spherical harmonics, Fourier coefficients, or
  178. zonal means on sigma levels.
  179. Deviations are not available for NetCDF output. \\
  180. \hline
  181. \end{tabular}
  182. \section{Format of output data}
  183. The {\bf Pumaburner} supports two different output formats:
  184. \begin{itemize}
  185. \item {\bf NetCDF} (Network Common Data Format)
  186. \item {\bf Service} Format for user readable data (see below).
  187. \end{itemize}
  188. For more detailed descriptions see for example:
  189. {\url{http://www.nws.noaa.gov/om/ord/iob/NOAAPORT/resources/}}
  190. \begin{tabular}{|l|p{10cm}|}
  191. \hline
  192. Setting & Description \\
  193. \hline
  194. NetCDF = 1 & The output file is written in NetCDF format. \\
  195. NetCDF = 0 & The output file is written in Service format. \\
  196. \hline
  197. \end{tabular}
  198. \section{SERVICE format}
  199. The SERVICE format uses the following structure:
  200. The whole file consists of pairs of
  201. header and data records.
  202. The header record is an integer array of 8 elements.
  203. \begin{verbatim}
  204. head(1) = ECMWF field code
  205. head(2) = model level or pressure in [Pa]
  206. head(3) = date [yymmdd] (yymm00 for monthly means)
  207. head(4) = time [hhmm] or [hh] for HHMM=0
  208. head(5) = 1. dimension of data array
  209. head(6) = 2. dimension of data array
  210. head(7) = may be set with the parameter HEAD7
  211. head(8) = experiment number (extracted from filename)
  212. Example for reading the SERVICE format (NETCDF=0)
  213. INTEGER HEAD(8)
  214. REAL FIELD(64,32) ! dimensions for T21 grids
  215. READ (10,ERR=888,END=999) HEAD
  216. READ (10,ERR=888,END=999) FIELD
  217. ....
  218. 888 STOP 'I/O ERR'
  219. 999 STOP 'EOF'
  220. ....
  221. \end{verbatim}
  222. A new command line parameter "-g" was added for users of the GRADS
  223. graphics software. Using -g in conjunction with SERVICE output
  224. creates a GRADS control file describing the contents of the SERVICE
  225. data file. GRADS can now be used to process the SERVICE data without
  226. using converters or utilities (see chapter 7).
  227. \section{HHMM}
  228. \begin{tabular}{|l|p{12cm}|}
  229. \hline
  230. Setting & Description \\
  231. \hline
  232. HHMM = 0 & head(4) shows the time in hours (HH). \\
  233. HHMM = 1 & head(4) shows the time in hours and minutes (HHMM). \\
  234. \hline
  235. \end{tabular}
  236. \section{HEAD7}
  237. The 7th element of the header is reserved for the user.
  238. It may be used for experiment numbers, flags or anything else.
  239. Setting HEAD7 to a number exports this number to every header record
  240. in the output file (SERVICE format only).
  241. \section{MARS}
  242. This parameter is used for processing simulations of the Martian atmosphere.
  243. Setting MARS=1 switches gravity, gas constant and planet radius
  244. to the correct values for the planet Mars.
  245. \section{MULTI}
  246. The parameter MULTI can be used to process a series of input data during
  247. one run of the Pumaburner. Setting MULTI to a number (n)
  248. tells the Pumaburner to process (n) input files.
  249. The input files must follow one of these two rules:
  250. \begin{itemize}
  251. \item YYMM rule: The last four characters of the filename
  252. contain the date in the form YYMM.
  253. \item .NNN rule: The last four characters of the filename
  254. consist of a dot followed by a three digit sequence number.
  255. \end{itemize}
  256. \begin{verbatim}
  257. Examples:
  258. Namelist contains MULTI=3
  259. Command: pumaburn <namelist >printout run.005 out
  260. Result: Pumaburn processes the files <run.005> <run.006> <run.007>
  261. Namelist contains MULTI=4
  262. Command: pumaburn <namelist >printout exp0211 out
  263. Result: Pumaburn processes the files <exp0211> <exp0212> <exp0301> <exp0302>
  264. \end{verbatim}
  265. \section{Namelist example}
  266. \begin{verbatim}
  267. VTYPE = Pressure
  268. HTYPE = Grid
  269. CODE = 130,131,132
  270. hPa = 200,500,700,850,1000
  271. MEAN = 0
  272. NETCDF = 0
  273. \end{verbatim}
  274. This namelist will write Temperature(130), u(131) and v(132)
  275. to the pressure levels 200hPa, 500hPa, 700hPa, 850hPa and 1000hPa.
  276. The output interval is the same as that found on the model data,
  277. e.g. every 12 or every 6 hours (MEAN=0). The output format
  278. is the SERVICE format.
  279. \section{Troubleshooting}
  280. If the Pumaburner reports an error or does not produce
  281. the expected results, try the following:
  282. \begin{itemize}
  283. \item Check your namelist, especially for invalid codes, types and levels.
  284. \item Run the Pumaburner in debug-mode by using the option -d.
  285. For example:
  286. \begin{verbatim}
  287. pumaburn <namelist >printout -d data.in data.out
  288. \end{verbatim}
  289. This will print out details such as the parameters and the memory allocation used
  290. during the run. This additional information may help to diagnose the problem.
  291. \item Not all combinations of HTYPE, VTYPE, and CODE are valid.
  292. Try using HTYPE=Grid and VTYPE=Pressure before switching to more
  293. exotic parameter combinations.
  294. \end{itemize}