Difference between revisions of "GENIE Main"

From SourceWiki
Jump to navigation Jump to search
Line 1: Line 1:
==Philosophy==
+
==Philosophy & Design==
  
Central location for '''shared''' stuff'Linchpin' for coupling together model components.
+
GENIE (Grid ENabled Integrated Earth system model) is comprised of a number of state-of-the-art components contributed by various authors.  '''genie-main''' acts as the linchpin and couples together the other components.  GENIE has a strict hierarchical designAnything which is common or shared between components should reside in genie-main.  Maintenance of this hierarchy promotes clarity for and significantly benefits the task of extending and improving the model over time.
  
All values exchanged between components for the coupling process should pass through genie-main.  No 'secret passages' or 'trap doors', which can be a sideffect of using common blocks. 
+
<diagram>
  
Avoid duplicationMaintain a clear, hierarchical relationship.  This significantly enhances clarity and correspondingly the process of extending and improving the model.
+
Values are exchanged between coupled components by '''argument passing'''They are declared in genie-main and passed to the relevant components through subroutine calls.  This significantly aids traceability and debugging and avoids the pitfalls of 'spaghetti code', which may use common blocks as 'secret passages' between components--the source of many a debugging headache!
  
 
==Default Settings==
 
==Default Settings==

Revision as of 13:47, 21 June 2007

Philosophy & Design

GENIE (Grid ENabled Integrated Earth system model) is comprised of a number of state-of-the-art components contributed by various authors. genie-main acts as the linchpin and couples together the other components. GENIE has a strict hierarchical design. Anything which is common or shared between components should reside in genie-main. Maintenance of this hierarchy promotes clarity for and significantly benefits the task of extending and improving the model over time.

<diagram>

Values are exchanged between coupled components by argument passing. They are declared in genie-main and passed to the relevant components through subroutine calls. This significantly aids traceability and debugging and avoids the pitfalls of 'spaghetti code', which may use common blocks as 'secret passages' between components--the source of many a debugging headache!

Default Settings

runtime_defaults.sh

vanilla

Configuration Files

genie-main/configs

morph vanilla into flavours

Note compile-time and run-time settings

Compile

user.mak makefile.arc makefile (testing.mak)

calls sub-makefiles

Run the Model

user.sh

genie_example.job

namelists.sh

Source Code

  • genie_control.f90
    • flags to control the component coupling
  • genie_global.f90
    • any common variables (i.e. those used during coupling)
    • constants, e.g. Pi

(** functions or subroutines which shold be common--put in a different module)

  • genie.F
    • the overall coupling logic and time loop: do this, then that, then the other, if, then, else.

argument passing.

(genie_ini_wrappers.f90, genie_loop_wrappers.f90)

The Future