/[MITgcm]/MITgcm/model/src/initialise_fixed.F
ViewVC logotype

Annotation of /MITgcm/model/src/initialise_fixed.F

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


Revision 1.49 - (hide annotations) (download)
Fri Sep 5 20:15:28 2008 UTC (15 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint61f, checkpoint61n, checkpoint61q, checkpoint61e, checkpoint61g, checkpoint61d, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61r, checkpoint61s, checkpoint61p
Changes since 1.48: +23 -13 lines
- add initialisation of deepFac if using Pcoords (new S/R set_grid_factors)
- move things around:
  ini_phiref.F          --> set_ref_state.F  (+ set anelastic factors)
  ini_reference_state.F --> load_ref_files.F (- set anelastic factors)

1 jmc 1.49 C $Header: /u/gcmpack/MITgcm/model/src/initialise_fixed.F,v 1.48 2008/04/07 21:12:46 jmc Exp $
2 jmc 1.11 C $Name: $
3 adcroft 1.1
4 edhill 1.13 #include "PACKAGES_CONFIG.h"
5 adcroft 1.1 #include "CPP_OPTIONS.h"
6    
7 cnh 1.8 CBOP
8     C !ROUTINE: INITIALISE_FIXED
9     C !INTERFACE:
10 jmc 1.48 SUBROUTINE INITIALISE_FIXED( myThid )
11 cnh 1.8
12     C !DESCRIPTION: \bv
13     C *==========================================================*
14 jmc 1.49 C | SUBROUTINE INITIALISE_FIXED
15     C | o Routine for setting fixed model arrays such as
16     C | topography, grid, solver matrices, etc.
17 cnh 1.8 C *==========================================================*
18 jmc 1.49 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 cnh 1.8 C *==========================================================*
25     C \ev
26    
27     C !CALLING SEQUENCE:
28     C INITIALISE_FIXED
29     C |
30 jmc 1.38 C |-- INI_PARMS
31     C |
32 edhill 1.37 C |-- PACKAGES_BOOT
33     C |
34     C |-- PACKAGES_READPARMS
35 jmc 1.38 C | |
36 jmc 1.43 C | | - MNC_INIT + MNC_CW_INIT
37 jmc 1.38 C | |
38     C | | - ${PKG}_READPARMS
39 edhill 1.32 C |
40 jmc 1.45 C |-- SET_PARMS
41     C |
42 jmc 1.43 C |-- INI_MODEL_IO
43     C |
44 cnh 1.8 C |-- MON_INIT
45     C |
46     C |-- INI_GRID
47     C |
48 jmc 1.49 C |-- LOAD_REF_FILES
49     C |
50 jmc 1.44 C |-- INI_EOS
51     C |
52 jmc 1.49 C |-- SET_REF_STATE
53     C |
54     C |-- SET_GRID_FACTORS
55 jmc 1.44 C |
56 jmc 1.38 C |-- INI_DEPTHS
57     C |
58 cnh 1.8 C |-- INI_MASKS_ETC
59     C |
60 jmc 1.15 C |-- PACKAGES_INIT_FIXED
61     C |
62 jmc 1.12 C |-- INI_LINEAR_PHSURF
63     C |
64     C |-- INI_CORI
65 cnh 1.8 C |
66     C |-- INI_CG2D
67     C |
68     C |-- INI_CG3D
69     C |
70 jmc 1.48 C |-- CONFIG_SUMMARY
71     C |
72     C |-- PACKAGES_CHECK
73     C |
74 jmc 1.9 C |-- CONFIG_CHECK
75     C |
76 adcroft 1.33 C |-- WRITE_GRID
77 jmc 1.38 C |
78     C |-- CPL_EXCH_CONFIGS
79 cnh 1.8
80     C !USES:
81 adcroft 1.1 IMPLICIT NONE
82     C == Global variables ==
83     #include "SIZE.h"
84     #include "EEPARAMS.h"
85     #include "PARAMS.h"
86    
87 cnh 1.8 C !INPUT/OUTPUT PARAMETERS:
88 adcroft 1.1 C == Routine arguments ==
89     INTEGER myThid
90 cnh 1.8 CEOP
91 adcroft 1.1
92 jmc 1.46 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 adcroft 1.1 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 adcroft 1.2 CALL INI_PARMS( myThid )
105 cnh 1.6
106 edhill 1.37 C-- Configure packages
107     CALL PACKAGES_BOOT( myThid )
108    
109     C-- Read configuration parameters for packages
110     CALL PACKAGES_READPARMS( myThid )
111 edhill 1.26
112 jmc 1.45 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 jmc 1.43 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 edhill 1.14 #ifdef ALLOW_MONITOR
121 cnh 1.6 C-- Initialise MONITOR I/O streams so we can report config. info
122     CALL MON_INIT( myThid )
123     #endif
124 adcroft 1.1
125     C-- Set model grid.
126     C Variables defining model grid spacing are defined.
127     CALL INI_GRID( myThid )
128 edhill 1.29
129 jmc 1.49 C-- Load reference profiles from files
130     CALL LOAD_REF_FILES( myThid )
131    
132 mlosch 1.10 C-- Set equation of state parameters.
133     CALL INI_EOS( myThid )
134 adcroft 1.1
135 jmc 1.49 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 jmc 1.44
141 adcroft 1.1 C-- Initialise map of depths
142     CALL 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 INI_MASKS_ETC( myThid )
147 jmc 1.47
148     C-- Synchronize all threads after setting masks and before pkgs init.
149 adcroft 1.1 _BARRIER
150 jmc 1.7
151 jmc 1.15 C-- Call fixed data initialization phase of packages
152     CALL PACKAGES_INIT_FIXED( myThid )
153    
154 jmc 1.12 C-- Set Bo_surf => define the Linear Relation: Phi_surf(eta)
155     CALL INI_LINEAR_PHISURF( myThid )
156    
157     C-- Set coriolis operators
158     CALL INI_CORI( myThid )
159    
160 adcroft 1.1 C-- Set laplace operators for use in 2D conjugate gradient solver.
161     CALL 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 jmc 1.9
168 jmc 1.48 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 jmc 1.9 CALL CONFIG_CHECK( myThid )
176 heimbach 1.3
177 adcroft 1.30 C-- Write grid data and geometry arrays
178 jmc 1.43 IF ( debugLevel.GE.debLevA .OR.
179 jmc 1.41 & startTime.EQ.baseTime ) CALL WRITE_GRID( myThid )
180 jmc 1.16
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 edhill 1.17 #endif
186    
187 jmc 1.46 C-- Check barrier synchronization:
188     CALL BAR_CHECK( 3, myThid )
189    
190 edhill 1.23 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
191 adcroft 1.1
192 jmc 1.12 RETURN
193 adcroft 1.1 END

  ViewVC Help
Powered by ViewVC 1.1.22