gui.tex 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. \section{Graphical user interface (GUI)}
  2. \label{sec_GUI}
  3. \begin{figure}
  4. \centering
  5. \includegraphics[width=8.5cm]{Pics/mostsnap}
  6. \caption[]{Screenshot of Model Starter (MoSt)}
  7. \label{mostsnap}
  8. \end{figure}
  9. The {\model} may be used in the traditional fashion,
  10. with shell scripts, batch jobs, and network queuing
  11. systems. This is acceptable for long running simulations
  12. on complex machines and number-crunchers, like vector-
  13. computers, massive-parallel-computers and workstation clusters.
  14. There is now, however, a much more convenient method by using
  15. a graphical user interface (GUI) for model setup with parameter configurations
  16. and for interaction between user and model.
  17. The {\model} is configured and setup by the first
  18. GUI module named MoSt (Model Starter, screenshot in \ref{mostsnap}).
  19. MoSt is the fastest way to get the
  20. model running. It gives access to the most important parameters of
  21. the model preset to the most frequently used values.
  22. The model can be started with a mouse click on the button
  23. labelled "Save \& Run" either with the standard paramater setting
  24. or after editing some of the parameters in the MoSt window.
  25. Some parameters, like horizontal and vertical resolution,
  26. or the number of processors, require the building
  27. (compile, link and load) of new executables. MoSt achieves
  28. this by generating and executing build scripts,
  29. that perform the necessary code changes and
  30. create the required executable.
  31. Other parameters define startup- and
  32. boundary conditions or settings for parameterisations.
  33. They can be edited in MoSt and, after a check for
  34. correct range and consistency with other parameters,
  35. are written to the model's namelist file.
  36. Depending on all settings
  37. MoSt generates a runscript for the simulation.
  38. The user has the choice of leaving MoSt and
  39. continue with the simulation under control of a GUI
  40. right away, or to exit MoSt with the scripts prepared
  41. to run. The second alternative is useful for users, who
  42. want to modify the setup beyond the scope of MoSt
  43. or want to run the Planet Simulator without GUI.
  44. There's also a simple graphical editor for topograpy.
  45. Check the box Orography and then use the mouse to mark
  46. rectangular areas in the topography display.
  47. Enter a value for rising (positive) or lowering the area
  48. and press the button labelled {\bf Preprocess}.
  49. The preprocessor will be built and executed, a new
  50. topography will be computed and written to a start file.
  51. Another editor is the mode editor for spherical harmonics.
  52. Green modes are enabled, red modes are disabled.
  53. This feature can be used to make runs with only certain
  54. modes of spherical harmonics being active.
  55. MB1, MB2, MB3 refer to the left, middle, and right mouse
  56. button. You may toggle individual modes or whole lines
  57. and columns. Currently this mode editor can only be used
  58. for {\model} in the T21 resolution.
  59. \begin{figure}
  60. \centering
  61. \includegraphics[width=8.5cm]{Pics/guisnap}
  62. \caption[]{Screenshot of Graphical User Interface (GUI)}
  63. \label{guisnap}
  64. \end{figure}
  65. The GUI for running the {\model}
  66. (screenshot in \ref{guisnap})
  67. has two main purposes. The first one is to display
  68. model arrays in suitable representations.
  69. Current implementations are:
  70. \begin{itemize}
  71. \item{Zonal mean cross sections}
  72. \item{Horizontal global fields in cylinder projection}
  73. \item{Horizontal global fields in polar projection}
  74. \item{Time-longitude (Hovmoeller) diagrams}
  75. \item{Amplitudes of coefficients of spherical harmonics}
  76. \item{Time series}
  77. \item{Numerical values}
  78. \end{itemize}
  79. In case of horizontal global grids pressing the MMB (Middle Mouse Button)
  80. toggles between cylinder and polar projection. If the grid is
  81. just one level from many of a three dimensional field like u or v,
  82. the level shown can be decreased by the LMB or increased by the RMB.
  83. For Hovmoeller and longitude height sections the LMB and RMB can
  84. be used to select the latitude.
  85. The second purpose is the interaction part of the GUI, which allows the user to change
  86. selected model variables during the model run.
  87. It is not necessary, though possible, to pause the
  88. model while changing variables. Changes to model variables
  89. are, of course, monitored in the outputfile and checked
  90. by GUI for the appropriate range of values and
  91. maximum possible change per timestep because,
  92. otherwise, a rapid parameter change or a choice of values beyond the normal
  93. range may blow up the model.
  94. All model variables, which are candidates for the display
  95. or interactive changes, have a special code to communicate
  96. with the Planet Simulator. The experienced modeller
  97. can add new code for more variables using the existing
  98. communication code as template. Thus all model fields
  99. or even fields received via coupling with other models
  100. can be put on the GUI display.
  101. Both, MoSt and GUI are implemented using the Xlib (X11R5),
  102. which is a library of routines for graphics and event communication.
  103. As this library is part of every UNIX/Linux operating system
  104. and base of all desktop environments, there is no need
  105. to install additional software for running MoSt and GUI.
  106. Another important property of Xlib is the full network transparency.
  107. The display of MoSt and GUI is not locked to the machine
  108. running the programs or the model. In fact, the best
  109. performance is obtained in running the Planet Simulator on
  110. two or four CPUs of a remote server while displaying
  111. the GUI on the user's workstation.
  112. In summarizing, the MoSt and GUI programs automate many tedious tasks,
  113. minimize the time to become familiar with the Planet Simulator,
  114. and make debugging and parameter tuning much easier.
  115. More kinds of presentations, coordinate projections
  116. and interactivity are being developed.
  117. A graphical preprocessor with editor for boundary
  118. conditions and a graphical postprocessor are future expansions
  119. to build an almost complete environment for modellers.
  120. \section{GUI configuration}
  121. On initialization the GUI reads its configuration from a file
  122. {\bf GUI.cfg} which must be present in the current directory.
  123. MoSt copies the file {\bf GUI.cfg} from the ../dat/ directory
  124. to the run directory while building the {\model}.
  125. After reading {\bf GUI.cfg} an attempt is made to read the file
  126. {\bf GUI\_last\_used.cfg}. This file is always written at the end
  127. of a GUI controlled simulation. So one may rearrange and position
  128. GUI windows during a run and the new layout will be saved to the
  129. file {\bf GUI\_last\_used.cfg}. In order to make this user
  130. layout default for following runs, just copy this file like:
  131. \begin{verbatim}
  132. Most15/plasim/run$ cp ../dat/GUI.cfg ../dat/GUI.cfg.old
  133. Most15/plasim/run$ cp GUI_last_used.cfg ../dat/GUI.cfg
  134. \end{verbatim}
  135. MoSt will then copy your new layout to the run directory at
  136. the next invocation.
  137. The {\bf GUI.cfg} is a text file that may be also edited manually.
  138. There is a section for each window (counting from 0 to 8) which
  139. looks like:
  140. \begin{verbatim}
  141. [Window 00] <- window number (0..8)
  142. Array:CSU <- array name
  143. Plot:ISOCS <- picture type
  144. Palette:U <- colour palette
  145. Title:Zonal Wind [m/s] <- window title
  146. Geometry: 529 299 2 3 <- width height left top
  147. [Window 01]
  148. Array:SPAN
  149. Plot:ISOSH
  150. Palette:AMPLI
  151. Title:Spherical Harmonics Ps
  152. Geometry: 529 299 535 3
  153. ...
  154. \end{verbatim}
  155. Possible values for these items are:
  156. \subsection{Array}
  157. \begin{tabular}{|l|l|}
  158. \hline
  159. Name & Description \\
  160. \hline
  161. CSU & Cross Section U - Zonal mean zonal wind \\
  162. CSV & Cross Section V - Zonal mean meridional wind \\
  163. CST & Cross Section T - Zonal mean temperature \\
  164. SPAN & Spherical harmonics coefficients of surface pressure \\
  165. GU & Three dimensional grid of zonal wind \\
  166. GV & Three dimensional grid of meridional wind \\
  167. GP & Grid of surface pressure \\
  168. DQVI & Vertically integrated humidity \\
  169. GUCOL & sounding of eastward wind at a grid point \\
  170. GVCOL & sounding of northward wind a grid point \\
  171. GTCOL & sounding of temperature at a grid point \\
  172. DQCOL & sounding of humidity at a grid point \\
  173. DQLCOL & sounding of liquid water at a grid point \\
  174. DCCCOL & sounding of cloud cover at a grid point \\
  175. SCALAR & Selected scalars for timeseries and tables \\
  176. \hline
  177. \end{tabular}
  178. \subsection{Plot}
  179. \begin{tabular}{|l|l|}
  180. \hline
  181. Name & Description \\
  182. \hline
  183. ISOHOR & Isolines and colouring of horizontal grids \\
  184. ISOCS & Isolines and colouring of cross sections \\
  185. ISOHOV & Colouring of Hovmoeller diagram \\
  186. ISOTS & Timeseries \\
  187. ISOTAB & Tables \\
  188. ISOSH & Coloured amplitudes \\
  189. ISOLON & Isolines and colouring of longitude height section \\
  190. ISOCOL & vertical Hovmoeller diagram for soundings \\
  191. \hline
  192. \end{tabular}
  193. \subsection{Palette}
  194. \begin{tabular}{|l|l|l|}
  195. \hline
  196. Name & Range & Description \\
  197. \hline
  198. AUTO & automatic & rainbow colours \\
  199. U & -10 .. 50 & rainbow colours \\
  200. V & -10 .. 10 & rainbow colours \\
  201. T & -50 .. 50 & blue - red \\
  202. P & 985 .. 1025 & blue - red \\
  203. Q & 0 .. 60 & rainbow colours \\
  204. DCC & 0 ..100 & rainbow colours \\
  205. MARST & -90 .. 0 & blue -red \\
  206. AMPLI & 0 .. 12 & blue - green -red \\
  207. VEG & 0 .. 100 & shades of green \\
  208. \hline
  209. \end{tabular}
  210. \subsection{Title}
  211. The title item may contain any text, but keep it short,
  212. the length of the window's title bar is limited.
  213. The words {\em Latitude} and {\em Level} have special
  214. features in conjunction with threedimensional arrays,
  215. where the user may scroll the level or latitude.
  216. The GUI will insert the level number after the world
  217. {\em Level} or the latitude after the word {\em Latitude}.
  218. \subsection{Geometry}
  219. The four integers following the geometry item describe
  220. the size and screen position of the window.
  221. The first two parameters refer to width and height in
  222. screen pixel. These are the sizes of the inner window,
  223. title bar, border and other decorations are not counted.
  224. The third and fourth parameter set the coordinates of the
  225. upper left corner of the window x and y, again without borders.
  226. If the geometry item is not defined, the GUI will
  227. initialize the window's geometry depending on the screen size.