pumaburn.tex 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. \section{Introduction}
  2. The {\bf Pumaburner} is a postprocessor for the {\bf Planet Simulator}
  3. and the {\bf PUMA} model family.
  4. It's the only interface between {\it raw} model data output
  5. and diagnostics, graphics, and user software.
  6. The output data of the {\bf Planet Simulator} are stored as
  7. packed binary (16 bit) values using the model representation.
  8. Prognostic variables like 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, fourier coefficients.
  19. \item Calculate diagnostic variables, like 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, GRIB, or NetCDF format
  25. for further processing.
  26. \end{itemize}
  27. \section{Usage}
  28. \begin{verbatim}
  29. pumaburn4 [options] InputFile OutputFile <namelist >printout
  30. option -h : help (this output)
  31. option -c : print available codes and names
  32. option -d : debug mode (verbose output)
  33. option -g : Grib output (override namelist option)
  34. option -n : NetCDF output (override namelist option)
  35. option -m : Mean=1 output (override namelist option)
  36. InputFile : Planet Simulator or PUMA data file
  37. OutputFile : GRIB, SERVICE, or NetCDF format file
  38. namelist : redirected <stdin>
  39. printout : redirected <stdout>
  40. \end{verbatim}
  41. \section{Namelist}
  42. The namelist values control the selection, coordinate system
  43. and output format of the postprocessed variables.
  44. Names and values are not case sensitive.
  45. You can assign values to the following names: \vspace{0.4cm}
  46. \begin{tabular}{|l|c|l|l|l|}
  47. \hline
  48. Name & Def. & Type & Description & Example \\
  49. \hline
  50. {\bf HTYPE }& S & char & Horizontal type & HTYPE=G \\
  51. {\bf VTYPE }& S & char & Vertical type & VTYPE=P \\
  52. {\bf MODLEV }& 0 & int & Model levels & MODLEV=2,3,4 \\
  53. {\bf hPa }& 0 & real & Pressure levels & hPa=500,1000 \\
  54. {\bf CODE }& 0 & int & ECMWF field code & CODE=130,152 \\
  55. {\bf GRIB }& 0 & int & GRIB output selector & GRIB=1 \\
  56. {\bf NETCDF }& 0 & int & NetCDF output selector & NETCDF=1 \\
  57. {\bf MEAN }& 1 & int & Compute monthly means & MEAN=0 \\
  58. {\bf HHMM }& 1 & int & Time format in Service format & HHMM=0 \\
  59. {\bf HEAD7 }& 0 & int & User parameter & HEAD7=0815 \\
  60. {\bf MARS }& 0 & int & Use constants for planet Mars & MARS=1 \\
  61. {\bf MULTI }& 0 & int & Process multiple input files & MULTI=12 \\
  62. \hline
  63. \end{tabular}
  64. \section{HTYPE}
  65. {\bf HTYPE} accepts the first character of the following string.
  66. Following settings are equivalent: HTYPE = S, HTYPE=Spherical Harmonics
  67. HTYPE = Something. Blanks and the equal-sign are optional. \\
  68. Possible Values are:
  69. \begin{tabular}{|l|l|l|}
  70. \hline
  71. Setting & Description & Dimension for T21 resolution \\
  72. \hline
  73. HTYPE = S & Spherical Harmonics & (506):(22 * 23 coefficients) \\
  74. HTYPE = F & Fourier Coefficients & (32,42):(latitudes,wavenumber) \\
  75. HTYPE = Z & Zonal Means & (32,levels):(latitudes,levels) \\
  76. HTYPE = G & Gauss Grid & (64,32):(longitudes,latitudes) \\
  77. \hline
  78. \end{tabular}
  79. \section{VTYPE}
  80. {\bf VTYPE} accepts the first character of the following string.
  81. Following settings are equivalent: VTYPE = S, VTYPE=Sigma
  82. VTYPE = Super. Blanks and the equal-sign are optional. \\
  83. Possible Values are:
  84. \begin{tabular}{|l|l|l|}
  85. \hline
  86. Setting & Description & Remark \\
  87. \hline
  88. VTYPE = S & Sigma (model) levels & Some derived variables are not available \\
  89. VTYPE = P & Pressure levels & Interpolation to pressure levels \\
  90. \hline
  91. \end{tabular}
  92. \section{MODLEV}
  93. {\bf MODLEV} is used in combination with {\bf VTYPE = S}.
  94. If VTYPE is not set to Sigma, the contents of MODLEV are ignored.
  95. MODLEV is an integer array that can get as many values as there are
  96. levels in the model output. The levels are numbered from top of
  97. the atmosphere to the bottom. The number of levels and the
  98. corresponding sigma values are listed in the pumaburner printout.
  99. The outputfile orders the level according to the MODLEV values.
  100. MODLEV=1,2,3,4,5 produces an output file of five model levels
  101. sorted from top to bottom, while MODLEV=5,4,3,2,1 sorts them
  102. from bottom to top.
  103. \section{hPa}
  104. {\bf hPa} is used in combination with {\bf VTYPE = P}.
  105. If VTYPE is not set to Pressure, the contents of hPa are ignored.
  106. hPa is a real array that accepts pressure values with the
  107. units hectoPascal or millibar. All output variables will be
  108. interpolated to the selected pressure levels.
  109. There is no extrapolation on the top of the atmosphere.
  110. For pressure values, that are lower than that of the model's
  111. top level, the top level value of the variable is taken.
  112. The variables temperature and geopotential height are extrapolated
  113. if the selected pressure is higher than the surface pressure.
  114. All other variables are set to the value of the lowest mode level
  115. for this case. The outputfile contains the levels in the same order
  116. as set in hPa. Example: hpa = 100,300,500,700,850,900,1000.
  117. \section{MEAN}
  118. {\bf MEAN} can be used to compute montly means and/or deviations.
  119. The Pumaburner reads date and time information from the model file
  120. and handles different lengths of months and output intervals correctly.
  121. \begin{tabular}{|l|p{12cm}|}
  122. \hline
  123. Setting & Description \\
  124. \hline
  125. MEAN = 0 & Do no averaging - all terms are processed. \\
  126. MEAN = 1 & Compute and write monthly mean fields.
  127. Not for spherical harmonics, Fourier coefficients or
  128. zonal means on sigma levels. \\
  129. MEAN = 2 & Compute and write monthly deviations.
  130. Not for spherical harmonics, Fourier coefficients or
  131. zonal means on sigma levels.
  132. Deviations are not available for NetCDF output. \\
  133. MEAN = 3 & Combination of MEAN=1 and MEAN=2.
  134. Each mean field is followed by a deviation
  135. field with an identical header record.
  136. Not for spherical harmonics, Fourier coefficients or
  137. zonal means on sigma levels. \\
  138. \hline
  139. \end{tabular}
  140. \section{Format of output data}
  141. The {\bf pumaburner} supports three different output formats:
  142. \begin{itemize}
  143. \item {\bf GRIB} (GRIdded Binary) WMO standard for gridded data.
  144. \item {\bf NetCDF} (Network Common Data Format)
  145. \item {\bf Service} Format for user readable data (see below).
  146. \end{itemize}
  147. For more detailed descriptions see for example:
  148. {\url{http://www.nws.noaa.gov/om/ord/iob/NOAAPORT/resources/}}
  149. \begin{tabular}{|l|l|p{10cm}|}
  150. \hline
  151. Setting & Description \\
  152. \hline
  153. GRIB = 1 & NetCDF = 0 & The output file is written GRIB format.
  154. This option can be used only for
  155. HTYPE=Spherical Harmonics or HTYPE=Gauss Grid. \\
  156. GRIB = 0 & NetCDF = 1 & The output file is written in NetCDF format.
  157. This option can be used for HTYPE=Gauss Grid only. \\
  158. GRIB = 0 & NetCDF = 0 & The output file is written in Service format.
  159. This is the preferred format for user programs.
  160. For a detailed description see the following section. \\
  161. GRIB = 1 & NetCDF = 1 & Illegal combination. \\
  162. \hline
  163. \end{tabular}
  164. \section{SERVICE format}
  165. The SERVICE format uses the following structure:
  166. The whole file consists of pairs of
  167. header records and data records.
  168. The header record is an integer array of 8 elements.
  169. \begin{verbatim}
  170. head(1) = ECMWF field code
  171. head(2) = modellevel or pressure in [Pa]
  172. head(3) = date [yymmdd] (yymm00 for monthly means)
  173. head(4) = time [hhmm] or [hh] for HHMM=0
  174. head(5) = 1. dimension of data array
  175. head(6) = 2. dimension of data array
  176. head(7) = may be set with the parameter HEAD7
  177. head(8) = experiment number (extracted from filename)
  178. Example for reading the SERVICE format (GRIB=0 , NETCDF=0)
  179. INTEGER HEAD(8)
  180. REAL FIELD(64,32) ! dimensions for T21 grids
  181. READ (10,ERR=888,END=999) HEAD
  182. READ (10,ERR=888,END=999) FIELD
  183. ....
  184. 888 STOP 'I/O ERR'
  185. 999 STOP 'EOF'
  186. ....
  187. \end{verbatim}
  188. \section{HHMM}
  189. \begin{tabular}{|l|p{12cm}|}
  190. \hline
  191. Setting & Description \\
  192. \hline
  193. HHMM = 0 & head(4) shows the time in hours (HH). \\
  194. HHMM = 1 & head(4) shows the time in hours and minutes (HHMM). \\
  195. \hline
  196. \end{tabular}
  197. \section{HEAD7}
  198. The 7th. element of the header is reserved for the user.
  199. It may be used for experiment numbers, flags or anything else.
  200. Setting HEAD7 to a number exports this number to every header record
  201. in the output file (SERVICE format only).
  202. \section{MARS}
  203. This parameter is used for processing simulations of the Mars atmosphere.
  204. Setting MARS=1 switches gravity, gas constant and planet radius
  205. to the correct values for the planet Mars.
  206. \section{MULTI}
  207. The parameter MULTI can bes used to process a series of input data
  208. within one run of the pumaburner. Setting MULTI to a number (n)
  209. tells the pumaburner to procees (n) input files.
  210. The input files must follow one of the following two rules:
  211. \begin{itemize}
  212. \item YYMM rule: The last four characters of the filename
  213. contain the data in the form YYMM.
  214. \item .NNN rule: The last four characters of the filename
  215. consist of a dot followed ny a 3-digit sequence number.
  216. \end{itemize}
  217. \begin{verbatim}
  218. Examples:
  219. Namelist contains MULTI=3
  220. Command: pumaburn <namelist >printout run.005 out
  221. pumaburn processes the files <run.005> <run.006> <run.007>
  222. Namelist contains MULTI=4
  223. Command: pumaburn <namelist >printout exp0211 out
  224. pumaburn processes the files <exp0211> <exp0212> <exp0301> <exp0302>
  225. \end{verbatim}
  226. \section{Namelist example}
  227. \begin{verbatim}
  228. VTYPE = Pressure
  229. HTYPE = Grid
  230. CODE = 130,131,132
  231. hPa = 200,500,700,850,1000
  232. MEAN = 0
  233. GRIB = 0
  234. NETCDF = 0
  235. \end{verbatim}
  236. This namelist will write Temperature(130), u(130) and v(131)
  237. on pressure levels 200hPa, 500hPa, 700hPa, 850hPa and 1000hPa.
  238. The output interval is the same as found on the model data,
  239. e.g. every 12 or every 6 hours (MEAN=0). The output format
  240. is SERVICE format.
  241. \section{Troubleshooting}
  242. If the pumaburner reports an error or doesn't produce
  243. the expected results, try the following:
  244. \begin{itemize}
  245. \item Check your namelist, especially for invalid codes, types and levels.
  246. \item Run the pumaburner in debug-mode by using the option -d.
  247. Example:
  248. \begin{verbatim}
  249. pumaburn <namelist >printout -d data.in data.out
  250. \end{verbatim}
  251. This will print out some details like parameters and memory allocation
  252. during the run. The additional information may help to detect
  253. the problem.
  254. \item Not all combinations of HTYPE, VTYPE, and CODE are valid.
  255. Try to use HTYPE=Grid and VTYPE=Pressure before switching to
  256. exotic parameter combinations.
  257. \end{itemize}