/[MITgcm]/MITgcm_contrib/heimbach/OpenAD/code_ad_moc/initialise_fixed.F
ViewVC logotype

Annotation of /MITgcm_contrib/heimbach/OpenAD/code_ad_moc/initialise_fixed.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Tue Nov 18 17:33:11 2008 UTC (17 years, 11 months ago) by utke
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
no longer needed here

1 utke 1.2 C $Header: /u/gcmpack/MITgcm_contrib/heimbach/OpenAD/code_ad_moc/initialise_fixed.F,v 1.1 2008/09/15 22:16:01 utke Exp $
2 utke 1.1 C $Name: $
3    
4     #include "PACKAGES_CONFIG.h"
5     #include "CPP_OPTIONS.h"
6    
7     CBOP
8     C !ROUTINE: INITIALISE_FIXED
9     C !INTERFACE:
10     SUBROUTINE INITIALISE_FIXED( myThid )
11    
12     C !DESCRIPTION: \bv
13     C *==========================================================*
14     C | SUBROUTINE INITIALISE_FIXED
15     C | o Routine for setting fixed model arrays such as
16     C | topography, grid, solver matrices, etc.
17     C *==========================================================*
18     C | INITIALISE_FIXED is invoked at the start of the model to
19     C | set fixed model arrays. It reads data from an input file
20     C | and from various binary files.
21     C | Each thread invokes an instance of this routine as does
22     C | each process in a multi-process parallel environment like
23     C | MPI.
24     C *==========================================================*
25     C \ev
26    
27     C !CALLING SEQUENCE:
28     C INITIALISE_FIXED
29     C |
30     C |-- INI_PARMS
31     C |
32     C |-- PACKAGES_BOOT
33     C |
34     C |-- PACKAGES_READPARMS
35     C | |
36     C | | - MNC_INIT + MNC_CW_INIT
37     C | |
38     C | | - ${PKG}_READPARMS
39     C |
40     C |-- SET_PARMS
41     C |
42     C |-- INI_MODEL_IO
43     C |
44     C |-- MON_INIT
45     C |
46     C |-- INI_GRID
47     C |
48     C |-- LOAD_REF_FILES
49     C |
50     C |-- INI_EOS
51     C |
52     C |-- SET_REF_STATE
53     C |
54     C |-- SET_GRID_FACTORS
55     C |
56     C |-- INI_DEPTHS
57     C |
58     C |-- INI_MASKS_ETC
59     C |
60     C |-- PACKAGES_INIT_FIXED
61     C |
62     C |-- INI_LINEAR_PHSURF
63     C |
64     C |-- INI_CORI
65     C |
66     C |-- INI_CG2D
67     C |
68     C |-- INI_CG3D
69     C |
70     C |-- CONFIG_SUMMARY
71     C |
72     C |-- PACKAGES_CHECK
73     C |
74     C |-- CONFIG_CHECK
75     C |
76     C |-- WRITE_GRID
77     C |
78     C |-- CPL_EXCH_CONFIGS
79    
80     C !USES:
81     IMPLICIT NONE
82     C == Global variables ==
83     #include "SIZE.h"
84     #include "EEPARAMS.h"
85     #include "PARAMS.h"
86    
87     C !INPUT/OUTPUT PARAMETERS:
88     C == Routine arguments ==
89     INTEGER myThid
90     CEOP
91    
92     C- here is a way to deliberately break the barrier syncronization
93     C by adding a BARRIER on thread XXX only ; Used to test BAR_CHECK.
94     c IF ( myThid.EQ.XXX ) THEN
95     c _BARRIER
96     c CALL SYSTEM('sleep 1')
97     c ENDIF
98     C-- Check barrier synchronization:
99     CALL BAR_CHECK( 2, myThid )
100    
101     C-- Set model parameters.
102     C Parameters are set to defaults and then updates are read from
103     C an input file called data.
104     CALL INI_PARMS( myThid )
105    
106     C-- Configure packages
107     CALL PACKAGES_BOOT( myThid )
108    
109     C-- Read configuration parameters for packages
110     CALL PACKAGES_READPARMS( myThid )
111    
112     C-- Set (or reset) parameters (at this point, know which packages are used);
113     C after this call, main model parameters are not supposed to be modified.
114     CALL SET_PARMS( myThid )
115    
116     C-- Write units/set precision/etc for I/O of variables/arrays belonging
117     C to the core dynamical model
118     CALL INI_MODEL_IO( myThid )
119    
120     #ifdef ALLOW_MONITOR
121     C-- Initialise MONITOR I/O streams so we can report config. info
122     CALL MON_INIT( myThid )
123     #endif
124    
125     C-- Set model grid.
126     C Variables defining model grid spacing are defined.
127     CALL OpenAD_INI_GRID( myThid )
128    
129     C-- Load reference profiles from files
130     CALL LOAD_REF_FILES( myThid )
131    
132     C-- Set equation of state parameters.
133     CALL INI_EOS( myThid )
134    
135     C-- Set reference state (vertical reference profiles)
136     CALL SET_REF_STATE( myThid )
137    
138     C-- Set remaining grid factors
139     CALL SET_GRID_FACTORS( myThid )
140    
141     C-- Initialise map of depths
142     CALL OpenAD_INI_DEPTHS( myThid )
143    
144     C-- Derive masks, lopping factors and recipricols of quantities.
145     C Volumes and areas are set according to grid and depth map.
146     CALL OpenAD_INI_MASKS_ETC( myThid )
147    
148     C-- Synchronize all threads after setting masks and before pkgs init.
149     _BARRIER
150    
151     C-- Call fixed data initialization phase of packages
152     CALL PACKAGES_INIT_FIXED( myThid )
153    
154     C-- Set Bo_surf => define the Linear Relation: Phi_surf(eta)
155     CALL OpenAD_INI_LINEAR_PHISURF( myThid )
156    
157     C-- Set coriolis operators
158     CALL OpenAD_INI_CORI( myThid )
159    
160     C-- Set laplace operators for use in 2D conjugate gradient solver.
161     CALL OpenAD_INI_CG2D( myThid )
162    
163     #ifdef ALLOW_NONHYDROSTATIC
164     C-- Set laplace operators for use in 3D conjugate gradient solver.
165     CALL INI_CG3D( myThid )
166     #endif
167    
168     C-- Finally summarise the model configuration
169     CALL CONFIG_SUMMARY( myThid )
170    
171     C-- Check packages configuration (& print summary)
172     CALL PACKAGES_CHECK( myThid )
173    
174     C-- Check parameters and model configuration
175     CALL CONFIG_CHECK( myThid )
176    
177     C-- Write grid data and geometry arrays
178     IF ( debugLevel.GE.debLevA .OR.
179     & startTime.EQ.baseTime ) CALL WRITE_GRID( myThid )
180    
181     #ifdef COMPONENT_MODULE
182     C-- Post component-model configuration information to coupler
183     C and get config. info for other component(s).
184     IF ( useCoupler ) CALL CPL_EXCH_CONFIGS( myThid )
185     #endif
186    
187     C-- Check barrier synchronization:
188     CALL BAR_CHECK( 3, myThid )
189    
190     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
191    
192     RETURN
193     END

  ViewVC Help
Powered by ViewVC 1.1.22