modules.tex 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034
  1. In the following, the purposes of the
  2. individual modules is given and the general structure and possible
  3. input and output opportunities (namelist and files) are explained.
  4. %------------------------------------------------------------------------
  5. \begin{center}
  6. \begin{tabular}{|p{15cm}|}
  7. \hline
  8. \vspace{-5mm} \section{fluxmod.f90} \vspace{-5mm} \\
  9. \hline
  10. \vspace{1mm} {\bf General} The module {\module fluxmod.f90} contains subroutines to
  11. compute the different surface fluxes and to perform the vertical diffusion. The interface to the
  12. main PUMA module {\module puma.f90} is given by the subroutines {\sub fluxini}, {\sub
  13. fluxstep} and {\sub fluxstop} which are called in {\module puma.f90} from the subroutines
  14. {\sub prolog}, {\sub gridpointd} and {\sub epilog}, respectively. \vspace{3mm} \\
  15. \hline
  16. \vspace{1mm} {\bf Input/Output} {\module fluxmod.f90} does not use any extra input file or
  17. output file and is controlled by the namelist {\nam fluxpar} which is part of the namelist file
  18. {\file puma$\_$namelist}:
  19. \vspace{1mm}
  20. \begin{center}
  21. \begin{tabular}{l l p{7cm} c} % {p{3cm} p{2cm} p{6cm} p{2cm}}
  22. Parameter & Type & Purpose & Default \\
  23. &&&\\
  24. NEVAP & Integer & Switch for surface evaporation (0~=~off, 1~=~ on) & 1 \\
  25. NSHFL & Integer &Switch for surface sensible heat flux (0~=~off, 1~=~ on) & 1 \\
  26. NSTRESS & Integer & Switch for surface wind stress (0~=~off, 1~=~on) & 1 \\
  27. NTSA & Integer & Switch for computing the near surface air temperature which is used for the
  28. Richardson number (1~=~potential temperature, 2~=~virtual potential temperature)& 2 \\
  29. NVDIFF & Integer & Switch for vertical diffusion (0~=~off, 1~=~on) & 1 \\
  30. VDIFF$\_$LAMM & Real & Tuning parameter for vertical diffusion & 160. \\
  31. VDIFF$\_$B & Real &Tuning parameter for vertical diffusion & 5. \\
  32. VDIFF$\_$C & Real &Tuning parameter for vertical diffusion & 5. \\
  33. VDIFF$\_$D & Real &Tuning parameter for vertical diffusion & 5. \\
  34. ZUMIN$\_$D & Real &Minimum surface wind speed (m/s) & 1. \\
  35. \end{tabular}
  36. \end{center}
  37. \vspace{3mm} \\
  38. \hline
  39. \vspace{2mm} {\bf Structure} Internally, {\module fluxmod.f90} uses the FORTRAN-90
  40. module {\modu fluxmod}, which uses the global common module {\modu pumamod} from
  41. {\module pumamod.f90}. Subroutine {\sub fluxini} reads the namelist and, if the parallel
  42. version
  43. is used, distributes the namelist parameters to the different processes. Subroutine {\sub
  44. fluxstep}
  45. calls the subroutine {\sub surflx} to compute the surface fluxes and calls the subroutine {\sub
  46. vdiff} to do the vertical diffusion. Subroutine {\sub fluxstop} is a dummy subroutine since there
  47. is nothing to do to finalize the computations in {\module fluxmod.f90}. The computation of the
  48. surface fluxes in {\sub surflx} is spitted into several parts. After initializing the stability
  49. dependent transfer coefficients, the subroutines {\sub mkstress}, {\sub mkshfl} and {\sub
  50. mkevap} do the computations which are related to the surface wind stress, the surface sensible
  51. heat flux and the surface evaporation, respectively. \vspace{3mm} \\
  52. \hline
  53. \end{tabular}
  54. \end{center}
  55. \newpage
  56. %--------------------------------------------------------------------------------
  57. \begin{center}
  58. \begin{tabular}{|p{15cm}|}
  59. \hline
  60. \vspace{-5mm} \section{miscmod.f90} \vspace{-5mm} \\
  61. \hline
  62. \vspace{1mm} {\bf General} The module {\module miscmod.f90} contains
  63. miscellaneous subroutines which do not fit well to other modules.
  64. The interface to the main module {\module plasim.f90} is given by
  65. the subroutines {\sub miscini}, {\sub miscstep} and {\sub miscstop}
  66. which are called in {\module puma.f90} from the subroutines {\sub prolog},
  67. {\sub gridpointd} and {\sub epilog}, respectively.
  68. A subroutine to eliminate spurious negative humidity and an optional
  69. subroutine to relax the upper level temperature towards a prescribed
  70. distribution is included in {\module miscmod.f90}. \vspace{3mm} \\
  71. \hline
  72. \vspace{1mm} {\bf Input/Output} {\module miscmod.f90}
  73. does not use any extra output file.
  74. If the relaxation is switched on, a climatological annual cycle
  75. of the prescribed upper level temperature distribution [K] is read
  76. from the external file {\file surface.txt}.
  77. The file format is formatted SERVICE format with (8I10) for the headers
  78. and (8E12.6) for the temperature fields. To assign the field,
  79. the header needs to have the header information code 130,
  80. level 1 and a date identifier of the form {\it yymmdd} or
  81. {\it mmdd} where {\it mm} goes from 1 to 12 (January to December)
  82. or from 0 to 14 (including the December of the previous year and
  83. the January of the following year).
  84. Fields which are not needed will be skipped. The module is
  85. controlled by the namelist {\nam miscpar} which is part of the
  86. namelist file {\file puma$\_$namelist}:
  87. \vspace{1mm}
  88. \begin{center}
  89. \begin{tabular}{l l p{5cm} c} % {p{3cm} p{2cm} p{6cm} p{2cm}}
  90. Parameter & Type & Purpose & default \\
  91. &&& \\
  92. NFIXER & Integer & Switch for correction of negative moisture (0 = off , 1= on) & 1 \\
  93. NUDGE & Integer & Switch for temperature relaxation in the uppermost level (0 = off , 1= on)
  94. & 0 \\
  95. TNUDGE& Real & Time scale [d] of the temperature relaxation & 10. \\
  96. \end{tabular}
  97. \end{center}
  98. \vspace{3mm} \\
  99. \hline
  100. \vspace{2mm} {\bf Structure} Internally, {\module miscmod.f90} uses the FORTRAN-90
  101. module {\modu miscmod}, which uses the global common module {\modu pumamod} from
  102. {\module pumamod.f90}. Subroutine {\sub miscini} reads the namelist and, if the parallel
  103. version is used, distributes the namelist parameters to the different processes. If the relaxation
  104. is
  105. switched on, the climatological temperature is read from {\file surface.txt} and distributed
  106. to the processors. Subroutine {\sub miscstep} calls the subroutine {\sub fixer} to eliminate
  107. spurious negative humidity arising from the spectral method and, if the relaxation is switched
  108. on,
  109. calls the subroutine {\sub mknudge} to do the temperature nudging. Subroutine {\sub miscstop}
  110. is a dummy subroutine since there is nothing to do to finalize the computations in {\module
  111. miscmod.f90}. \vspace{3mm} \\
  112. \hline
  113. \end{tabular}
  114. \end{center}
  115. \newpage
  116. %--------------------------------------------------------------------------------
  117. \clearpage
  118. \begin{center}
  119. \begin{tabular}{|p{15cm}|}
  120. \hline
  121. \vspace{-5mm} \section{surfmod.f90} \vspace{-5mm} \\
  122. \hline
  123. \vspace{1mm} {\bf General} The module {\module surfmod.f90}
  124. deals as an interface between
  125. the atmospheric part of the model and modules, or models, for the land and the oceans. The
  126. interface to the main PUMA module {\module puma.f90} is given by the subroutines {\sub
  127. surfini}, {\sub surfstep} and {\sub surfstop} which are called in {\module puma.f90} from the
  128. subroutines {\sub prolog}, {\sub gridpointd} and {\sub epilog}, respectively. Calls to
  129. subroutines
  130. named {\sub landini}, {\sub landstep} and {\sub landstop} and {\sub seaini}, {\sub seastep} and
  131. {\sub seastop} provide the interface to land and the ocean modules, respectively.
  132. \vspace{3mm}
  133. \\
  134. \hline
  135. \vspace{1mm} {\bf Input/Output} {\module surfmod.f90} reads the
  136. land-sea mask and the orography (surface geopotential) [m$^2$/s$^2$]
  137. from file {\file surface.txt}.
  138. The file format is formatted SERVICE format with (8I10) for the headers
  139. and (8E12.6) for the fields. To assign
  140. the fields, the headers need to have the header information
  141. code 129 for the surface geopotential
  142. and 172 for the land-sea mask (1.0 = land; 0.0 = sea).
  143. Fractional land-sea-masks containing other values than 1.0 and 0.0
  144. will be converted with values $>$ 0.5 set to 1.0 and all other to 0.0.
  145. {\module surfmod.f90} is controlled by the namelist {\nam surfpar} which is part of the
  146. namelist file {\file puma$\_$namelist}:
  147. \vspace{1mm}
  148. \begin{center}
  149. \begin{tabular}{l l p{5cm} c} %{p{3cm} p{2cm} p{6cm} p{2cm}}
  150. Parameter & Type & Purpose & default \\
  151. &&&\\
  152. NSURF & Integer & Debug switch & not active \\
  153. NOROMAX & Integer & Resolution of orography & NTRU \\
  154. OROSCALE & Real & Scaling factor for orography & 1.0 \\
  155. \end{tabular}
  156. \end{center}
  157. \vspace{3mm} \\
  158. \hline
  159. \vspace{2mm} {\bf Structure} Internally, {\module surfmod.f90}
  160. uses the FORTRAN-90 module {\modu surfmod}, which uses the global
  161. common module {\modu pumamod} from {\module pumamod.f90}.
  162. Subroutine {\sub surfini} reads the namelist and, if the parallel version
  163. is used, distributes the namelist parameters to the different processes.
  164. If the run is not started from a restart file, the
  165. land-sea-mask and the
  166. orography are read from file {\file surface.txt}.
  167. According to the namelist input, the orography
  168. is scaled by OROSCALE, transfered into spectral space and truncated
  169. to NOROMAX. Calls to subroutines {\sub landini} and {\sub seaini}
  170. are the interfaces to the respective initialization
  171. routines contained in the land and ocean modules.
  172. During the run, the interface to land and ocean
  173. is given by calls to the external subroutines {\sub landstep}
  174. and {\sub seastep}, which are called by {\sub surfstep}.
  175. At the end of the integration, interface subroutines
  176. {\sub landstop} and {\sub
  177. seastop} are called by {\sub surfstop}. \vspace{3mm} \\
  178. \hline
  179. \end{tabular}
  180. \end{center}
  181. \newpage
  182. %-----------------------------------------------------------------------------
  183. \begin{center}
  184. \begin{tabular}{|p{15cm}|}
  185. \hline
  186. \vspace{-5mm} \section{fftmod.f90 / fft991mod.f90} \vspace{-5mm} \\
  187. \hline
  188. \vspace{1mm} {\bf General} The module {\module fftmod.f90}
  189. contains all subroutines
  190. necessary to perform the fast fourier transformation and its inverse.
  191. The interface to the main module {\module \modir.f90}
  192. is given by the subroutines {\sub gp2fc} and {\sub
  193. fc2gp} which are called in {\module \modir.f90} from the subroutine {\sub gridpoint}. \vspace{3mm} \\
  194. \hline
  195. \vspace{1mm} {\bf Input/Output} {\module fftmod.f90} does not use any extra input file or
  196. output file. No namelist input is required. \vspace{3mm} \\
  197. \hline
  198. \vspace{2mm} {\bf Structure} Internally, {\module fftmod.f90} uses the FORTRAN-90 module
  199. {\module fftmod}, which uses no other modules. Subroutine {\sub gp2fc} performs the
  200. transformation from grid point space into fourier space while the subroutine {\sub fc2gp} does
  201. the transformation from fourier space into grid point space. Both routines use several
  202. subroutines
  203. to do the direct or indirect transformation for different factors. When {\sub gp2fc} or {\sub
  204. fc2gp} is called for the first time, {\sub fftini} is called
  205. to do the initialization of the FFT.
  206. \vspace{3mm} \\
  207. \hline
  208. \vspace{2mm} The alternate module {\module fft991mod.f90} may be used
  209. instead of {\module fftmod.f90}. While {\module fftmod.f90} runs faster
  210. {\module fft991mod.f90} can be used for resolutions, that are not supported by {\module fftmod.f90}, e.g. T63 or T106.
  211. Edit the file {\bf \most/\modir/src/make\_\modir } for module selection.
  212. Use either
  213. \begin{verbatim}
  214. FFTMOD=fftmod
  215. \end{verbatim}
  216. or
  217. \begin{verbatim}
  218. FFTMOD=fft991mod
  219. \end{verbatim}
  220. \vspace{3mm} \\
  221. \hline
  222. \end{tabular}
  223. \end{center}
  224. \newpage
  225. %-----------------------------------------------------------------------------
  226. \begin{center}
  227. \begin{tabular}{|p{15cm}|}
  228. \hline
  229. \vspace{-5mm} \section{landmod.f90} \vspace{-5mm} \\
  230. \hline
  231. \vspace{1mm} {\bf General} The module {\module landmod.f90} contains parameterizations
  232. for
  233. land surface and soil processes which include the simple biome model SIMBA and a model for
  234. the river runoff. The interface to the {\model} is given via the module {\module surfmod.f90} by the
  235. subroutines {\sub landini}, {\sub landstep} and {\sub landstop} which are called in {\module
  236. surfmod.f90} from the subroutines {\sub surfini}, {\sub surfstep} and {\sub surfstop},
  237. respectively. \vspace{3mm} \\
  238. \hline
  239. \vspace{1mm} {\bf Input/Output} {\module landmod.f90} reads several surface and soil
  240. parameters either from the initial file {\file surface.txt}
  241. or from the restart file {\file \modir\_restart} which is written at
  242. the end of an integration.
  243. {\file surface.txt} contains several surface fields which are needed
  244. for initialization. The file format is formatted
  245. SERVICE
  246. format with (8I10) for the header and (8E12.6) for the fields.
  247. The file may include the following fields:
  248. surface
  249. geopotential (orography) [m$^2$/s$^2$], land-sea mask [1.0,0.0],
  250. surface roughness [m],
  251. background albedo [frac.], glacier mask [frac.], bucket size [m], soil temperature [K],
  252. climatological annual cycle of the surface temperature [K], climatological annual cycle of the
  253. soil wetness [m]. To assign the fields, the headers need to have the header information code
  254. 129
  255. for surface geopotential, code 172 for the land-sea mask (1.~=~land; 0.~=~sea), 173 for the
  256. surface
  257. roughness, 174 for the background albedo, 232 for the glacier mask (1.~=~glacier; 0.~=~no
  258. glacier),
  259. 229 for the bucket size, 209 for the soil temperature, 169 for the surface temperature and 140
  260. for
  261. the soil wetness. for the climatological annual cycles of surface temperature and soil wetness,
  262. a
  263. date identifier of the form {\it yymmdd} or {\it mmdd} where {\it mm}
  264. goes from 1 to 12 (January to December) is required.
  265. Two additional months with mm=0 indicating the December of the
  266. preceding year an mm=13 for the January of the following year
  267. may be included for interpolation during transient simulations.
  268. If there are some fields not present in the {\file surface.txt}
  269. default values will be used which can be set in the
  270. namelist. The use of some fields depend on the setting of some namelist parameters. The
  271. restart
  272. file {\file \modir\_restart} is an unformatted file which contains
  273. all variables needed to continue the run.
  274. {\module landmod.f90} is controlled by the namelist {\nam landpar}
  275. given in the namelist file {\file land\_namelist}:
  276. \vspace{1mm}
  277. \begin{center}
  278. \begin{tabular}{l l p{5cm} c} %{p{3cm} p{2cm} p{6cm} p{2cm}}
  279. Parameter & Type & Purpose & Default \\
  280. &&&\\
  281. NLANDT & Integer & Switch for surface temperature (1~=~computed; 0~=~climatology) &
  282. 1 \\
  283. NLANDW & Integer & Switch for soil wetness (1~=~computed; 0~=~climatology) & 1 \\
  284. NBIOME & Integer & Switch for biome model SIMBA (1~=~on ; 0~=~off) & 0 \\
  285. ALBLAND & Real & Background albedo & 0.2 \\
  286. DZ0LAND & Real & Roughnesslength [m]& 2.0 \\
  287. DRHSLAND & Real & Wetness factor & 0.25 \\
  288. ALBSMIN & Real& Minimum albedo for snow & 0.4 \\
  289. ALBSMAX & Real& Maximum albedo for snow & 0.8
  290. \end{tabular}
  291. \end{center}
  292. \vspace{3mm} \\
  293. \hline
  294. \end{tabular}
  295. \end{center}
  296. \newpage
  297. \begin{center}
  298. \begin{tabular}{|p{15cm}|}
  299. \hline
  300. \begin{center}
  301. \begin{tabular}{l l p{5cm} c} %{p{3cm} p{2cm} p{6cm} p{2cm}}
  302. Parameter & Type & Purpose & Default \\
  303. &&&\\
  304. NWATCINI & Integer& Switch to initialize soil water content manually (1~=~on;0~=~off) & 0 \\
  305. DWATCINI & Real& Soil water content (m) for manual initialization & 0.0 \\
  306. ALBGMIN & Real& Minimum albedo for glaciers & 0.6 \\
  307. ALBGMAX & Real& Maximum albedo for glaciers & 0.8 \\
  308. WSMAX & Real& Maximum field capacity of soil water (bucket size) [m] & 0.5 \\
  309. DRHSFULL & Real& Threshold above which wetness factor is 1 & 0.4 \\
  310. DZGLAC &Real& Threshold of orography to be glacier (-1.0~=~none) [m] & -1.0 \\
  311. DZTOP &Real& Thickness of the uppermost soil layer [m] & 0.2 \\
  312. DSOILZ(5) & Real Array & Soil layer thicknesses [m] & 0.4,0.8,1.6,3.2,6.4\\
  313. \end{tabular}
  314. \end{center}
  315. \vspace{3mm} \\
  316. \hline
  317. \vspace{2mm} {\bf Structure} Internally, {\module landmod.f90} uses the FORTRAN-90
  318. module {\modu landmod}, which uses the global common module {\modu pumamod} from
  319. {\module plasimmod.f90}. Subroutine {\sub landini} reads the namelist and, if the parallel
  320. version is used, distributes the namelist parameters to the different
  321. processes. If the run is not started from a restart file,
  322. the initialization file
  323. {\file surface.txt} is being read. The soil and the river runoff are initialized via {\sub
  324. soilini}
  325. and {\sub roffini} and different variables are set according to the
  326. values given by the namelist or the {\file surface.txt}.
  327. Additionally, the climatological surface temperatures and soil
  328. wetnesses are updated from {\file surface.txt} if NRESTART~=~2. If NRESTART~=~3
  329. (special application) the bucket size, the roughness length and the albedo are set to the values
  330. given in the namelist. Subroutine {\sub landstep} computes new surface and soil values via
  331. {\sub soilstep} which calls {\sub tands} and {\sub wandr} for the heat and water budgets,
  332. respectively. If NLANDT and/or NLANDW are set to 0, climatological values are used for
  333. the
  334. surface temperature and the soil wetness. Via {\sub roffstep} the river runoff is computed.
  335. Finally
  336. the biome model {\sub simbastep} is called. The land model is finalized by {\sub landstop}
  337. which writes the restart record to {\file \modir\_restart}. \vspace{3mm} \\
  338. \hline
  339. \end{tabular}
  340. \end{center}
  341. \newpage
  342. %----------------------------------------------------------------------------
  343. \begin{center}
  344. \begin{tabular}{|p{14cm}|}
  345. \hline
  346. \vspace{-5mm} \section{legmod.f90} \vspace{-5mm} \\
  347. \hline
  348. \vspace{1mm} {\bf General} The module {\module legmod.f90}
  349. contains all subroutines
  350. necessary to perform the Legendre transformation and its inverse.
  351. The interface to the main
  352. module {\module \modir.f90} is given by the subroutines {\sub legini}, {\sub
  353. inigau}, {\sub fc2sp}, {\sub fc3sp}, and {\sub sp2gp}
  354. which are called in {\module \modir.f90}
  355. from the subroutines {\sub prolog} and {\sub gridpoint}
  356. \vspace{3mm} \\
  357. \hline
  358. \vspace{1mm} {\bf Input/Output} {\module legmod.f90}
  359. does not use any extra input file or
  360. output file. No namelist input is required \vspace{3mm} \\
  361. \hline
  362. \vspace{1mm}
  363. The following subroutines are included in {\module legmod.f90}:
  364. \begin{center}
  365. \begin{tabular}{l p{2cm} l}
  366. Subroutine & &Purpose \\
  367. && \\
  368. {\sub inigau} && compute Gaussian abscissas and weights \\
  369. {\sub legini} && compute Legendre polynomials \\
  370. {\sub fs2sp} && Fourier to Spectral transformation \\
  371. {\sub sp2fc} && Spectral to Fourier transformation \\
  372. {\sub sp3fc} && Simultaneous transformation of T, Div., and Vort. \\
  373. {\sub dirlega} && Compute and transform adiabatic tendencies \\
  374. {\sub dirlegd} && Compute and transform diabatic tendencies \\
  375. {\sub invlega} && Spectral to Fourier - adiabatic part \\
  376. {\sub invlegd} && Spectral to Fourier - diabatic part \\
  377. \end{tabular}
  378. \end{center}
  379. \vspace{3mm} \\
  380. \hline
  381. \end{tabular}
  382. \end{center}
  383. \newpage
  384. %-----------------------------------------------------------------------------
  385. \begin{center}
  386. \begin{tabular}{|p{15cm}|}
  387. \hline
  388. \vspace{-5mm} \section{mpimod.f90 / mpimod\_stub.f90} \vspace{-5mm}
  389. \\
  390. \hline
  391. \vspace{1mm} {\bf General} The module {\module mpimod.f90} contains interface
  392. subroutines to the MPI (Message Passing Interface) needed for
  393. (massive) parallel computing. Several MPI routines are called
  394. from the module. The interface to other modules are given by numerous
  395. subroutines which names starts with {\sub mp}.
  396. Subroutines from {\module mpimod.f90} are
  397. called in sveral other modules. There are no direct calls to MPI other than
  398. in {\module mpimod.f90}. This encapsulation makes it possible to
  399. use {\module mpimod\_stub.f90} for single CPU runs without
  400. changing any other part of the model code.
  401. The selection is done automatically by using MoSt or manually
  402. by editing "Most15/\modir/src/make\_\modir". \vspace{3mm}
  403. \\
  404. \hline
  405. \vspace{1mm} {\bf Input/Output} {\module mpimod.f90} and
  406. {\module mpimod\_stub} do not use any extra input file or output file.
  407. No namelist input is required \vspace{3mm} \\
  408. \hline
  409. \vspace{2mm} {\bf Structure} Internally, {\module mpimod.f90}
  410. uses the FORTRAN-90 module
  411. {\module mpimod}, which uses the global common module {\module pumamod} from
  412. {\module \modir mod.f90} and the MPI module {\module mpi}.
  413. The following subroutines are included in {\module mpimod.f90}:
  414. \begin{center}
  415. \begin{tabular}{l p{2cm} l}
  416. Subroutine & &Purpose \\
  417. && \\
  418. {\sub mpbci} && broadcast 1 integer \\
  419. {\sub mpbcin} & &broadcast n integers \\
  420. {\sub mpbcr} & &broadcast 1 real \\
  421. {\sub mpbcrn} & &broadcast n reals \\
  422. {\sub mpbcl} && broadcast 1 logical \\
  423. {\sub mpscin} & &scatter n integers \\
  424. {\sub mpscrn} && scatter n reals \\
  425. {\sub mpscgp} && scatter grid point field \\
  426. {\sub mpgagp} && gather grid point field \\
  427. {\sub mpgallgp} && gather grid point field to all \\
  428. {\sub mpscsp} & &scatter spectral field \\
  429. {\sub mpgasp} && gather spectral field \\
  430. {\sub mpgacs} && gather cross section \\
  431. {\sub mpgallsp} && gather spectral field to all \\
  432. {\sub mpsum} && sum spectral field \\
  433. {\sub mpsumsc} && sum and scatter spectral field \\
  434. {\sub mpsumr} && sum n reals \\
  435. {\sub mpsumbcr}& & sum and broadcast n reals \\
  436. {\sub mpstart} & &initialize MPI \\
  437. {\sub mpstop} & &finalize MPI \\
  438. \end{tabular}
  439. \end{center}
  440. \vspace{3mm} \\
  441. \hline
  442. \end{tabular}
  443. \end{center}
  444. \newpage
  445. \begin{center}
  446. \begin{tabular}{|p{15cm}|}
  447. \hline
  448. \begin{center}
  449. \begin{tabular}{l p{2cm} l}
  450. Subroutine & &Purpose \\
  451. && \\
  452. {\sub mpreadgp}& & read and scatter grid point field \\
  453. {\sub mpwritegp}& & gather and write grid point field \\
  454. {\sub mpwritegph} && gather and write (with header) grid point field \\
  455. {\sub mpreadsp} & &read and scatter spectral field \\
  456. {\sub mpwritesp} &&gather and write spectral field \\
  457. {\sub mpi\_info} && give information about setup \\
  458. {\sub mpgetsp} && read spectral array from restart file \\
  459. {\sub mpgetgp} && read gridpoint array from restart file \\
  460. {\sub mpputsp} && write spectral array to restart file \\
  461. {\sub mpputgp} && write gridpoint array to restart file \\
  462. {\sub mpmaxval} && compute maximum value of an array \\
  463. {\sub mpsumval} && compute sum of all array elements \\
  464. \end{tabular}
  465. \end{center}
  466. \vspace{3mm} \\
  467. \hline
  468. \end{tabular}
  469. \end{center}
  470. \newpage
  471. %-----------------------------------------------------------------------------
  472. \begin{center}
  473. \begin{tabular}{|p{15cm}|}
  474. \hline
  475. \vspace{-5mm} \section{outmod.f90} \vspace{-5mm} \\
  476. \hline
  477. \vspace{1mm} {\bf General} The module {\module outmod.f90} controls the data output of
  478. the
  479. model. The interface to the main
  480. PUMA module {\module puma.f90} is given by the subroutines {\sub outini}, {\sub outgp},
  481. {\sub outsp}, {\sub outreset} and {\sub outaccu} which are called in {\module puma.f90}
  482. from
  483. the subroutines {\sub prolog} and {\sub
  484. master}. \vspace{3mm} \\
  485. \hline
  486. \vspace{1mm} {\bf Input/Output} {\module outmod.f90} writes the output data to the file
  487. {\file
  488. puma\_output} which is an unformatted file.
  489. {\file puma\_output} is designed to be post processed by the
  490. program {\bf burn} (see section \ref{Pumaburner}), which converts
  491. the model variables to useful output in user friendly format. There is no separate namelist for
  492. {\module outmod.f90} but some parameter of namelist {\nam inp}
  493. of {\module \modir.f90}
  494. are used to control the format and the output interval. \vspace{3mm} \\
  495. \hline
  496. \vspace{2mm} {\bf Structure} Internally, {\module outmod.f90} uses the global common
  497. module {\modu pumamod} from
  498. {\module \modir mod.f90} in several subroutines.
  499. Subroutine {\sub outini} does the
  500. initialization. Subroutines {\sub outgp} and {\sub outsp} write the grid point and the spectral
  501. fields to the output file {\file puma\_output}. {\sub outaccu} accumulates some
  502. output variables over the output interval. {\sub outreset} resets the accumulated arrays to
  503. zero.
  504. \vspace{3mm} \\
  505. \hline
  506. \end{tabular}
  507. \end{center}
  508. \newpage
  509. %--------------------------------------------------------------------------------
  510. \begin{center}
  511. \begin{tabular}{|p{15cm}|}
  512. \hline
  513. \vspace{-5mm} \section{plasim.f90} \vspace{-5mm} \\
  514. \hline
  515. \vspace{1mm} {\bf General} The module {\module plasim.f90}
  516. is the main module of the model. It includes the main program
  517. {\sub plasim} and controls the run.
  518. From {\module plasim.f90} the interface routines to the modules
  519. {\module miscmod.f90}, {\module fluxmod.f90}, {\module radmod.f90},
  520. {\module rainmod.f90}, {\module surfmod.f90} are
  521. called. The output is done by calling the interface routines to
  522. {\module outmod.f90}. In addition, the adiabatic tendencies and
  523. the horizontal diffusion are computed in {\module plasim.f90}.
  524. To do the necessary transformations, calls to the modules
  525. {\module fftmod.f90} and {\module legmod.f90} are used. \vspace{3mm} \\
  526. \hline
  527. \vspace{1mm} {\bf Input/Output} {\module plasim.f90} does not use
  528. any extra input file or output file.
  529. A diagnostic print out is written on standard output.
  530. {\module plasim.f90} is controlled by the namelist {\nam inp}
  531. which is part of the namelist file {\file puma$\_$namelist}:
  532. \vspace{1mm}
  533. \begin{center}
  534. \begin{tabular}{l l p{5cm} c} % {p{3cm} p{2cm} p{6cm} p{2cm}}
  535. Parameter & Type & Purpose & Default \\
  536. &&&\\
  537. COLUMN & Integer & 1: Set all parameters for default column mode & 0 \\
  538. KICK & Integer & Switch for initial white noise disturbance on surface pressure (0~=~none;
  539. 1~=~global; 2~=~hemispherically symmetric; 3~=~one wavenumber only) & 1 \\
  540. NWPD & Integer & Number of Writes Per Day (for output data) & 1 \\
  541. NADV & Integer & Switch for advection (0~=~off;1~=~on) & 1 \\
  542. NCOEFF & Integer &Number of spectral coefficients in diagnostic print out & 0 \\
  543. NDEL(NLEV) & Integer Array & Order of the horizontal diffusion & NLEV $\cdot$ 2 \\
  544. NDIAG & Integer & Time interval for diagnostic print out [time steps] & 12\\
  545. NKITS & Integer & Number of initial explicit Euler time steps & 3 \\
  546. N\_RUN\_YEARS & Integer & Number of years to run & 1 \\
  547. N\_RUN\_MONTHS & Integer & Number of months to run & 0 \\
  548. N\_RUN\_DAYS & Integer & Number of days to run (for short test runs) & -1 \\
  549. N\_START\_YEAR & Integer & Start year & 1 \\
  550. N\_START\_MONTH & Integer & Start month & 1 \\
  551. N\_DAYS\_PER\_YEAR & Integer & 365: use real calendar with leap years,
  552. 360: use simple calendar with 12 months of equal length & 360 \\
  553. N\_DAYS\_PER\_MONTH & Integer & Number of days per month for simple calendar
  554. & 30 \\
  555. \end{tabular}
  556. \end{center}
  557. \vspace{3mm} \\
  558. \hline
  559. \end{tabular}
  560. \end{center}
  561. \newpage
  562. \begin{center}
  563. \begin{tabular}{|p{15cm}|}
  564. \hline
  565. \begin{center}
  566. \begin{tabular}{l l p{5cm} c} %{p{3cm} p{2cm} p{6cm} p{2cm}}
  567. Parameter & Type & Purpose & Default \\
  568. &&&\\
  569. MPSTEP & Integer & Minutes per step $=$ length of timestep & 45 \\
  570. NEQSIG & Integer & Switch for non equally spaced sigma levels (1~=~non equally spaced;
  571. 1~=~equally spaced) & 1 \\
  572. NPRINT & Integer & Switch for extended debug print out (0~=~off; 1~=~on; 2~=~very
  573. extended) & 0\\
  574. NPRHOR & Integer & Number of the grid point to be used for very extended debug print out
  575. &
  576. 0 \\
  577. NPACKSP & Integer & Switch for spectral output (0~=~normal; 1~=~compressed) & 1 \\
  578. NPACKGP & Integer & Switch for grid point output (0~=~normal; 1~=~compressed) & 1 \\
  579. NRAD & Integer & Switch for radiation (0~=~off; 1~=~on) & 1 \\
  580. NFLUX & Integer & Switch for surface fluxes and vertical diffuson (0~=~off; 1~=~on) & 1
  581. \\
  582. NDIAGGP & Integer & Switch for additional diagnostic grid point output (0~=~off; 1~=~on)
  583. & 0\\
  584. NDIAGSP & Integer & Switch for additional diagnostic spectral output (0~=~off; 1~=~on) &
  585. 0 \\
  586. NDIAGCF & Integer & Switch for additional cloud forcing diagnostic (0~=~off; 1~=~on) &
  587. 0
  588. \\
  589. NDIAGGP2D & Integer & Number of additional diagnostic 2-d grid point output (0~=~off;
  590. 1~=~on) & 0 \\
  591. NDIAGGP3D & Integer & Number of additional diagnostic 3-d grid point output (0~=~off;
  592. 1~=~on) & 0 \\
  593. NDIAGSP2D & Integer & Number of additional diagnostic 2-d spectral output (0~=~off;
  594. 1~=~on) & 0 \\
  595. NDIAGSP3D & Integer & Number of additional diagnostic 3-d spectral output (0~=~off;
  596. 1~=~on) & 0 \\
  597. \end{tabular}
  598. \end{center}
  599. \vspace{3mm} \\
  600. \hline
  601. \end{tabular}
  602. \end{center}
  603. \newpage
  604. \begin{center}
  605. \begin{tabular}{|p{15cm}|}
  606. \hline
  607. \begin{center}
  608. \begin{tabular}{l l p{5cm} c} %{p{3cm} p{2cm} p{6cm} p{2cm}}
  609. Parameter & Type & Purpose & Default \\
  610. &&&\\
  611. NDL(NLEV) & Integer Array & Switch for diagnostic print out of a level (0~=~off; 1~=~on)
  612. & NLEV $\cdot$ 0 \\
  613. NHDIFF & Integer & Cut off wave number for horizontal diffusion & 15 \\
  614. NHORDIF & Integer & Switch for horizontal diffusion (0~=~off;1~=~on) & 1 \\
  615. NTIME & Integer & Switch for CPU time diagnostics (0~=~off; 1~=~on) & 0 \\
  616. NPERPETUAL & Integer & Switch for perpetual simulations (0~=~annual cycle;
  617. $>$0~=~day
  618. of the year) & 0 \\
  619. DTEP & Real & Equator to pole temperature difference [K] for Newtonian cooling (usually
  620. not used) & 0.0 \\
  621. DTNS & Real & North pole to south pole temperature difference [K] for Newtonian cooling
  622. (usually not used) & 0.0 \\
  623. DTROP & Real & Tropopause height [m] for Newtonian cooling (usually not used) &
  624. 12000.0 \\
  625. DTTRP & Real & Smoothing of the tropopause [K] for Newtonian cooling (usually not used)
  626. & 2 \\
  627. TGR & Real & Surface temperature [K] for Newtonian cooling (usually not used) & 280 \\
  628. TDISSD(NLEV) & Real Array & time scale [d] for the horizontal diffusion of divergence&
  629. NLEV $\cdot$ 0.2 \\
  630. TDISSZ(NLEV) & Real Array & time scale [d] for the horizontal diffusion of vorticity&
  631. NLEV $\cdot$ 1.1 \\
  632. TDISST(NLEV) & Real Array & time scale [d] for the horizontal diffusion of temperature &
  633. NLEV $\cdot$ 5.6 \\
  634. TDISSQ(NLEV) & Real Array & time scale [d] for the horizontal diffusion of moisture&
  635. NLEV $\cdot$ 5.6 \\
  636. PSURF & Real & Global mean sea level pressure [Pa] & 101100.00 \\
  637. RESTIM(NLEV) & Real Array & Time scale [d] for Newtonian cooling (usually not used)
  638. & NLEV $\cdot$ 0.0 \\
  639. \end{tabular}
  640. \end{center}
  641. \vspace{3mm} \\
  642. \hline
  643. \end{tabular}
  644. \end{center}
  645. \newpage
  646. \begin{center}
  647. \begin{tabular}{|p{15cm}|}
  648. \hline
  649. \begin{center}
  650. \begin{tabular}{l l p{5cm} c}
  651. Parameter & Type & Purpose & Default \\
  652. &&&\\
  653. MARS & Integer & 1: Set all parameters for Mars atmosphere & 0 \\
  654. NGUI & Integer & Run with (1) or without (0) GUI & 0 \\
  655. NOUTPUT & Integer & Global witch for enabling (1) or disabling (0)
  656. output to file {\file puma\_output} & 1 \\
  657. SELLON & Real & Longitude of soundings in the GUI & 0.0 \\
  658. T0(NLEV) & Real Array& Reference temperature used in the discretization scheme & NLEV
  659. $\cdot$ 250.0 \\
  660. TFRC(NLEV) & Real Array & Time scale [d] for Rayleigh friction (0.0~=~off)& NLEV
  661. $\cdot$ 0.0
  662. \end{tabular}
  663. \end{center}
  664. \vspace{3mm} \\
  665. \hline
  666. \vspace{2mm} {\bf Structure} Internally, {\module plasim.f90}
  667. uses the FORTRAN-90 global common module {\modu pumamod} from
  668. {\module plasimmod.f90}. After starting MPI, the main program
  669. {\sub plasim} calls {\sub prolog} for initializing the model.
  670. Then, {\sub master} is called to do the time stepping.
  671. Finally, subroutine {\sub epilog} finishes the run.
  672. In subroutine {\sub prolog}, calls to different subroutines,
  673. which are part of {\module plasim.f90} or are provided by other
  674. modules, initialize various parts of the model: {\sub gauaw}
  675. and {\sub inilat} build the grid, {\sub readnl} reads the namelist
  676. and sets some parameter according to the namelist input,
  677. {\sub initpm} and {\sub initsi} initialize some parameter
  678. for the physics and the semi implicit scheme, respectively.
  679. {\sub outini} starts the output. If a file named
  680. {\file plasim\_restart} exists all variables and arrays are read
  681. by {\sub restart}, otherwise {\sub initfd} sets the prognostic variables
  682. to their initial values. Calls to {\sub miscini} {\sub fluxini},
  683. {\sub radini}, {\sub rainini} and {\sub surfini}
  684. start the initialization of the respective external modules.i
  685. Finally, the global mean surface pressure is set according to PSURF
  686. (the observed value is 1011 hPa (Trenberth 1981) while 1013 is the
  687. ICAO standard) and the orography.
  688. Subroutine {\sub master} controls the time stepping.
  689. First, if its not a restart, initial NKITS explicit forward timesteps are
  690. performed.
  691. The main loop is defined by calling {\sub gridpointa} for the adiabatic
  692. tendencies, {\sub spectrala} to add the adiabatic tendencies,
  693. {\sub gridpointd} for the diabatic tendencies (which are computed
  694. by the external modules), {\sub spectrald} to add the diabatic tendencies and
  695. the interface routines to the output module {\module outmod.f90}.
  696. The run is finalized by subroutine {\sub epilog} which writes the
  697. restart records and calls the respective interface routines of the
  698. external modules. \vspace{3mm} \\
  699. \hline
  700. \end{tabular}
  701. \end{center}
  702. \newpage
  703. %---------------------------------------------------------------------------
  704. \begin{center}
  705. \begin{tabular}{|p{15cm}|}
  706. \hline
  707. \vspace{-5mm} \section{plasimmod.f90} \vspace{-5mm} \\
  708. \hline
  709. \vspace{1mm} {\bf General} The file {\file plasimmod.f90}
  710. contains the module {\module pumamod.f90} which declares
  711. all parameters and variables which may be used to share
  712. information between {\module plasim.f90} and other
  713. modules. No subroutines or programs are included. \vspace{3mm} \\
  714. \hline
  715. \vspace{1mm} {\bf Input/Output} {\module pumamod.f90}
  716. does not use any extra input file or
  717. output file. No namelist input is required \vspace{3mm} \\
  718. \hline
  719. \vspace{2mm} {\bf Structure} Internally, {\module plasimmod.f90} is a FORTRAN-90
  720. module named {\modu pumamod}. Names for global parameters, scalars and arrays are
  721. declared and, if possible, values are preset.\vspace{3mm} \\
  722. \hline
  723. \end{tabular}
  724. \end{center}
  725. \newpage
  726. %--------------------------------------------------------------------------
  727. % \clearpage
  728. \begin{center}
  729. \begin{tabular}{|p{15cm}|}
  730. \hline
  731. \vspace{-5mm} \section{radmod.f90} \vspace{-5mm} \\
  732. \hline
  733. \vspace{1mm} {\bf General} The module {\module radmod.f90} contains subroutines to
  734. compute radiative energy fluxes and the temperature tendencies due to long wave and short
  735. wave radiation. The interface to the
  736. main PLASIM module {\module plasim.f90} is given by the subroutines {\sub radini}, {\sub
  737. radstep} and {\sub radstop} which are called in {\module plasim.f90} from the subroutines
  738. {\sub prolog}, {\sub gridpointd} and {\sub epilog}, respectively. \vspace{3mm} \\
  739. \hline
  740. \vspace{1mm} {\bf Input/Output} {\module radmod.f90} does not use an extra output file. If
  741. the Switch for ozone (NO3, see namelist) is set to 2 (externally prescribed), the
  742. climatological
  743. cycle of the ozone distribution is read from the external file {\file surface.txt} which name
  744. is given in the namelist. The file format is formatted SERVICE format with (8I10) for the
  745. header and (8E12.6) for the fields. To assign the fields, the headers need to have the header
  746. information code
  747. 200, level going from 1 to NLEV and a date identifier of the form {\it yymmdd} or {\it
  748. mmdd}
  749. where {\it mm} goes from 01 to 12 (January to December).
  750. {\module radmod.f90} is controlled by the namelist {\nam radpar} which is part of the
  751. namelist
  752. file {\file puma$\_$namelist}:
  753. \vspace{1mm}
  754. \begin{center}
  755. \begin{tabular}{l l p{5cm} c} % {p{3cm} p{2cm} p{6cm} p{2cm}}
  756. Parameter & Type & Purpose & Default \\
  757. &&&\\
  758. NDCYCLE & Integer & Switch for diurnal cycle of insolation (0~=~off, 1~=~ on) & 0 \\
  759. NO3 & Integer &Switch for ozone (0~=~off, 1~=~idealized distribution, 2~=~externally
  760. presrcibed) & 1 \\
  761. CO2 & Real & CO$_2$ concentration [ppmv] & 360.0 \\
  762. GSOL0 & Real & Solar constant [W/m$^2$] & 1367.0 \\
  763. IYRBP & Integer & Year PB (reference is 1950) to calculate orbit from & -50 \\
  764. NSWR& Integer & Switch for short wave radiation (0~=~off, 1~=~ on) & 1 \\
  765. NLWR& Integer & Switch for long wave radiation (0~=~off, 1~=~ on) & 1 \\
  766. NSOL& Integer & Switch for incoming solar radiation (0~=~off, 1~=~ on) & 1 \\
  767. NSWRCL& Integer & Switch for computed short wave cloud properties (0~=~off, 1~=~ on)
  768. & 1 \\
  769. NRSCAT& Integer & Switch for Rayleigh scattering (0~=~off, 1~=~ on) & 1 \\
  770. RCL1(3) & Real Array & Prescribed cloud albedos [frac.] for high, middle and low level
  771. clouds
  772. (spectral range 1)& 0.15,0.30.0.60 \\
  773. \end{tabular}
  774. \end{center}
  775. \vspace{3mm} \\
  776. \hline
  777. \end{tabular}
  778. \end{center}
  779. \newpage
  780. \begin{center}
  781. \begin{tabular}{|p{15cm}|}
  782. \hline
  783. \begin{center}
  784. \begin{tabular}{l l p{5cm} c} %{p{3cm} p{2cm} p{6cm} p{2cm}}
  785. Parameter & Type & Purpose & Default \\
  786. &&&\\
  787. RCL2(3) & Real Array & Prescribed cloud albedos [frac.] for high, middle and low level
  788. clouds
  789. (spectral range 2) &0.15,0.30.0.60 \\
  790. ACL2(3) & Real Array & Prescribed cloud absorptivities [frac.] for high, middle and low
  791. level
  792. clouds (spectral range 2) &0.05,0.10.0.20 \\
  793. CLGRAY & Real & Prescribed grayness of clouds (-1.0~=~computed) & -1.0 \\
  794. TPOFMT& Real & Tuning for point of mean transmission & 0.15 \\
  795. ACLLWR& Real & Mass absorption coefficient for clouds (long wave) & 0.1 \\
  796. TSWR1 & Real & Tuning of cloud albedo (spectral range 1) & 0.035 \\
  797. TSWR2 & Real & Tuning of cloud back scattering (spectral range 2) & 0.04 \\
  798. TSWR3 & Real & Tuning of cloud single scattering albedo (spectral range 2) & 0.006 \\
  799. DAWN & Real & Threshold for zenith angle & 0.0 \\
  800. \end{tabular}
  801. \end{center}
  802. \vspace{3mm} \\
  803. \hline
  804. \vspace{2mm} {\bf Structure} Internally, {\module radmod.f90}
  805. uses the FORTRAN-90 module {\modu radmod}, which uses the global
  806. common module {\modu pumamod} from {\module plasimmod.f90}.
  807. Additionally, the FORTRAN-90 module {\modu orbparam} is used.
  808. Subroutine {\sub radini} reads the namelist and, if the
  809. parallel version is used, distributes the namelist parameters to
  810. the different processes.
  811. Orbital parameters are computed by calling {\sub orb$\_$params}.
  812. If NO3 is set to 2, the ozone distribution is read from
  813. {\file surface.txt}. Subroutine {\sub radstep} calls the subroutines
  814. {\sub solang} and {\sub mko3} to compute the cosine of the solar angle
  815. and the ozone distribution, respectively.
  816. The short wave radiative fluxes are calculate in {\sub swr} while
  817. the long wave radiative fluxes are computed in {\sub lwr}.
  818. Subroutine {\sub radstop} is a dummy subroutine since there is
  819. nothing to do to finalize the computations in {\module radmod.f90}.
  820. \vspace{3mm} \\
  821. \hline
  822. \end{tabular}
  823. \end{center}
  824. \newpage
  825. %-----------------------------------------------------
  826. % \clearpage
  827. \begin{center}
  828. \begin{tabular}{|p{15cm}|}
  829. \hline
  830. \vspace{-5mm} \section{rainmod.f90} \vspace{-5mm} \\
  831. \hline
  832. \vspace{1mm} {\bf General} The module {\module rainmod.f90} contains subroutines to
  833. compute large scale and convective precipitation and the related temperature tendencies. In
  834. addition, a parameterization of dry convective mixing of temperature and moisture is
  835. included
  836. and cloud cover is diagnosed. The interface to the main PLASIM module {\module plasim.f90}
  837. is
  838. given by the subroutines {\sub rainini}, {\sub rainstep} and {\sub rainstop} which are called
  839. in
  840. {\module puma.f90} from the subroutines {\sub prolog}, {\sub gridpointd} and {\sub
  841. epilog},
  842. respectively. \vspace{3mm} \\
  843. \hline
  844. \vspace{1mm} {\bf Input/Output} {\module rainmod.f90} does not use any extra input or
  845. output file and is controlled by the namelist {\nam rainpar} which is part of the namelist file
  846. {\file puma$\_$namelist}:
  847. \vspace{1mm}
  848. \begin{center}
  849. \begin{tabular}{l l p{5cm} c} % {p{3cm} p{2cm} p{6cm} p{2cm}}
  850. Parameter & Type & Purpose & Default \\
  851. &&&\\
  852. KBETTA & Integer & Switch for betta in Kuo parameterization (0~=~off, 1~=~ on) & 1 \\
  853. NPRL & Integer &Switch for large scale precipitation (0~=~off, 1~=~on) & 1 \\
  854. NPRC & Integer &Switch for convective precipitation (0~=~off, 1~=~on) & 1 \\
  855. NDCA & Integer &Switch for dry convective adjustment (0~=~off, 1~=~on) & 1 \\
  856. NSHALLOW & Integer &Switch for shallow convection (0~=~off, 1~=~on) & 1 \\
  857. RCRIT(NLEV) & Real Array & Critical relative humidity for cloud formation & computed \\
  858. CLWCRIT1 & Real & Critical vertical velocity for cloud formation [Pa/s] (not active if
  859. CLWCRIT2~$>$~CLWCRIT1) & -0.1 \\
  860. CLWCRIT2 & Real & Critical vertical velocity for cloud formation [Pa/s] (not active if
  861. CLWCRIT2~$>$~CLWCRIT1) & 0.0
  862. \end{tabular}
  863. \end{center}
  864. \vspace{3mm} \\
  865. \hline
  866. \vspace{2mm} {\bf Structure} Internally, {\module rainmod.f90} uses the FORTRAN-90
  867. module {\modu rainmod}, which uses the global common module {\modu pumamod} from
  868. {\module plasimmod.f90}. Subroutine {\sub rainini} reads the namelist and, if the parallel
  869. version is used, distributes the namelist parameters to the different processes. Subroutine
  870. {\sub
  871. rainstep} calls the subroutine {\sub mkdqdtgp} to obtain the adiabatic moisture tendencies in
  872. grid point space, which are needed for the Kuo parameterization. {\sub kuo} is called to
  873. compute the convective precipitation and the respective tendencies. Dry convective
  874. adjustment
  875. is performed in {\sub mkdca}. Large scale precipitation is computed in {\sub mklsp}. Finally,
  876. diagnostic clouds are calculated in {\sub mkclouds}. Subroutine {\sub radstop} is a
  877. dummy subroutine since there is nothing to do to finalize the computations in {\module
  878. radmod.f90}. \vspace{3mm} \\
  879. \hline
  880. \end{tabular}
  881. \end{center}
  882. \newpage
  883. %------------------------------------------------------------------
  884. % \clearpage
  885. \begin{center}
  886. \begin{tabular}{|p{15cm}|}
  887. \hline
  888. \vspace{-5mm} \section{seamod.f90} \vspace{-5mm} \\
  889. \hline
  890. \vspace{1mm} {\bf General} The module {\module seamod.f90} is the interface from the
  891. atmosphere to the ocean and the sea ice. The interface to the main PLASIM module {\module
  892. puma.f90} is given by the subroutines {\sub seaini}, {\sub seastep} and {\sub seastop} which
  893. are called in {\module puma.f90} from the subroutines {\sub prolog}, {\sub gridpointd} and
  894. {\sub epilog} respectively. \vspace{3mm} \\
  895. \hline
  896. \vspace{1mm} {\bf Input/Output} {\module seamod.f90} reads different surface
  897. parameters either from the file {\file surface.txt} (see namelist) and the file {\file
  898. ocean$\_$parameter} or from the restart file
  899. {\file sea\_restart} which is written at the end of an integration.. The files formats
  900. are unformatted for the restart file, formatted
  901. SERVICE format with (8I10) for the header and (8E12.6) for the fields for {\file surface.txt}
  902. and formatted
  903. EXTRA format with (4I10) for the header and (6(1X,E12.6)) for the fields for {\file
  904. ocean$\_$parameter}.
  905. The file {\file surface.txt} may include the following fields: The
  906. climatological annual cycle of the surface temperature [K] and the climatological annual
  907. cycle
  908. of the sea ice compactness [frac.]. To assign the fields, the headers need to have the header
  909. information code 169
  910. for surface temperature and code 210 for the compactness (1~=~ice; 0.~=~open water).
  911. a date identifier of the form {\it yymmdd} or {\it mmdd} where {\it mm} goes from 1 to 12
  912. (January to December) is required. Fields which are not needed will be skipped. The file
  913. {\file
  914. ocean$\_$parameter} includes the following fields: The
  915. climatological annual cycle of the sea surface temperature [K], the climatological annual
  916. cycle
  917. of the mixed layer depth [m] and the climatological average of the deep ocean temperature
  918. [m].
  919. To assign the fields, the order must be as described above (no header information is used).
  920. The
  921. restart file {\file sea\_restart} contains all variables needed to
  922. continue the run. {\module seamod.f90} is controlled by the namelist {\nam seapar} given in
  923. the namelist file {\file sea\_namelist}:
  924. \vspace{1mm}
  925. \begin{center}
  926. \begin{tabular}{l l p{5cm} c} % {p{3cm} p{2cm} p{6cm} p{2cm}}
  927. Parameter & Type & Purpose & Default \\
  928. &&&\\
  929. ALBSEA & Real & Albedo for ice free ocean & 0.069 \\
  930. ALBICE & Real & Maximum albedo for sea ice & 0.7 \\
  931. DZ0SEA & Real & Minimum roughness length [m] for ice free ocean & 1.0 $\cdot$
  932. 10$^{-5}$
  933. \\
  934. DZ0ICE & Real & Roughness length [m] for sea ice & 1.0 $\cdot$ 10$^{-3}$ \\
  935. DRHSSEA& Real & Wetness factor for ice free ocean & 1.0 \\
  936. DRHSICE& Real & Wetness factor for sea ice & 1.0 \\
  937. NOCEAN & Integer & Switch for ocean model (0~=~climatological SST, 1~=~ocean model)
  938. & 1 \\
  939. NICE & Integer & Switch for sea ice model (0~=~climatological, 1~=~sea ice model) & 1 \\
  940. \end{tabular}
  941. \end{center}
  942. \vspace{3mm} \\
  943. \hline
  944. \end{tabular}
  945. \end{center}
  946. \newpage
  947. \begin{center}
  948. \begin{tabular}{|p{15cm}|}
  949. \hline
  950. \begin{center}
  951. \begin{tabular}{l l p{5cm} c} %{p{3cm} p{2cm} p{6cm} p{2cm}}
  952. Parameter & Type & Purpose & Default \\
  953. &&&\\
  954. NCPL$\_$ICE$\_$OCEAN& Integer & ice-ocean coupling time steps & 32 \\
  955. NCPL$\_$ATMOS$\_$ICE & Integer & ice atmosphere coupling time steps & 1 \\
  956. TDEEPSEA & Real &Homogeneous deep ocean temperature [K] & 0.0 \\
  957. DHICEMIN & Real & Minimum sea ice thickness [m] & 0.1 \\
  958. \end{tabular}
  959. \end{center}
  960. \vspace{3mm} \\
  961. \hline
  962. \vspace{2mm} {\bf Structure} Internally, {\module seamod.f90} uses the FORTRAN-90
  963. module {\modu seamod}, which uses the global common module {\modu pumamod} from
  964. {\module plasimmod.f90}. Subroutine {\sub seaini} reads the namelist and, if the parallel
  965. version is used, distributes the namelist parameters to the different processes.
  966. If it is not a restart (i.e.~if NRESTART from {\nam inp} of {\module plasimmod.f90} is 0), the files
  967. {\file surface.txt} and {\file ocean$\_$parameter} are being read. The climatological sea ice
  968. compactness is converted to a sea ice thickness as initial condition and additional surface
  969. parameters are set. If it is a restart, the restart file {\file sea$\_$restart} is read. Subroutine
  970. {\sub
  971. seastep} accumulates the variables used for the coupling between the atmosphere and the
  972. ocean.
  973. The coupling is done via the sea ice model. There is no direct connection between
  974. atmosphere
  975. and ocean model. If there is no sea ice, the coupling quantities are passed through the ice
  976. model without changes.
  977. Subroutine {\sub seastop} finalizes the run and writes the restart records.
  978. \vspace{3mm} \\
  979. \hline
  980. \end{tabular}
  981. \end{center}
  982. \newpage