/[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.23 - (hide annotations) (download)
Thu Feb 5 19:38:55 2004 UTC (20 years, 3 months ago) by edhill
Branch: MAIN
CVS Tags: hrcube4, checkpoint52j_pre, checkpoint52k_post, hrcube_3, checkpoint52j_post
Changes since 1.22: +23 -6 lines
 o add MNC functionality to:
   - write all the per-tile grid information
   - mimic the functionality already in WRITE_STATE()

1 edhill 1.23 C $Header: /u/u3/gcmpack/MITgcm/model/src/initialise_fixed.F,v 1.22 2004/02/05 05:42:07 edhill 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 adcroft 1.1 SUBROUTINE INITIALISE_FIXED(myThid)
11 cnh 1.8
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 |-- MON_INIT
33     C |
34     C |-- INI_GRID
35     C |
36 mlosch 1.10 C |-- INI_EOS
37     C |
38 cnh 1.8 C |-- INI_DEPTHS
39     C |
40     C |-- INI_MASKS_ETC
41     C |
42     C |-- PACKAGES_BOOT
43     C |
44     C |-- PACKAGES_READPARMS
45     C |
46 jmc 1.15 C |-- PACKAGES_INIT_FIXED
47     C |
48 cnh 1.8 C |-- PACKAGES_CHECK
49     C |
50 jmc 1.12 C |-- INI_LINEAR_PHSURF
51     C |
52     C |-- INI_CORI
53 cnh 1.8 C |
54     C |-- INI_CG2D
55     C |
56     C |-- INI_CG3D
57     C |
58 jmc 1.9 C |-- CONFIG_CHECK
59     C |
60 cnh 1.8 C |-- CONFIG_SUMMARY
61 edhill 1.17 C |
62 edhill 1.19 C |-- MNC_INIT
63 cnh 1.8
64     C !USES:
65 adcroft 1.1 IMPLICIT NONE
66     C == Global variables ==
67     #include "SIZE.h"
68     #include "EEPARAMS.h"
69     #include "PARAMS.h"
70    
71 cnh 1.8 C !INPUT/OUTPUT PARAMETERS:
72 adcroft 1.1 C == Routine arguments ==
73     INTEGER myThid
74 cnh 1.8 CEOP
75 adcroft 1.1
76     C-- Set model parameters.
77     C Parameters are set to defaults and then updates are read from
78     C an input file called data.
79 adcroft 1.2 CALL INI_PARMS( myThid )
80 adcroft 1.1 _BARRIER
81 cnh 1.6
82 edhill 1.14 #ifdef ALLOW_MONITOR
83 cnh 1.6 C-- Initialise MONITOR I/O streams so we can report config. info
84     CALL MON_INIT( myThid )
85     _BARRIER
86     #endif
87    
88 adcroft 1.1
89     C-- Set model grid.
90     C Variables defining model grid spacing are defined.
91     CALL INI_GRID( myThid )
92 mlosch 1.10 _BARRIER
93    
94     C-- Set equation of state parameters.
95     CALL INI_EOS( myThid )
96 adcroft 1.1 _BARRIER
97    
98     C-- Initialise map of depths
99     CALL INI_DEPTHS( myThid )
100     _BARRIER
101    
102     C-- Derive masks, lopping factors and recipricols of quantities.
103     C Volumes and areas are set according to grid and depth map.
104     CALL INI_MASKS_ETC( myThid )
105     _BARRIER
106 jmc 1.7
107 adcroft 1.4 C-- Configure packages
108     CALL PACKAGES_BOOT( myThid )
109    
110     C-- Read configuration parameters for packages
111     CALL PACKAGES_READPARMS( myThid )
112    
113 jmc 1.15 C-- Call fixed data initialization phase of packages
114     CALL PACKAGES_INIT_FIXED( myThid )
115    
116 adcroft 1.4 C-- Check dependances between packages
117     CALL PACKAGES_CHECK( myThid )
118 adcroft 1.1
119 jmc 1.12 C-- Set Bo_surf => define the Linear Relation: Phi_surf(eta)
120     CALL INI_LINEAR_PHISURF( myThid )
121    
122     C-- Set coriolis operators
123     CALL INI_CORI( myThid )
124    
125 adcroft 1.1 C-- Set laplace operators for use in 2D conjugate gradient solver.
126     CALL INI_CG2D( myThid )
127    
128     #ifdef ALLOW_NONHYDROSTATIC
129     C-- Set laplace operators for use in 3D conjugate gradient solver.
130 edhill 1.13 ceh3 needs an IF ( useNONHYDROSTATIC ) THEN
131 adcroft 1.1 CALL INI_CG3D( myThid )
132     #endif
133 jmc 1.9
134     C-- Check parameters and model cofiguration
135     CALL CONFIG_CHECK( myThid )
136 heimbach 1.3
137 adcroft 1.1 C-- Finally summarise the model cofiguration
138     CALL CONFIG_SUMMARY( myThid )
139 jmc 1.16
140     #ifdef COMPONENT_MODULE
141     C-- Post component-model configuration information to coupler
142     C and get config. info for other component(s).
143     IF ( useCoupler ) CALL CPL_EXCH_CONFIGS( myThid )
144 edhill 1.17 #endif
145    
146 edhill 1.23 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
147    
148 edhill 1.18 #ifdef ALLOW_MNC
149 edhill 1.23
150     C Initialize the MNC package
151 edhill 1.18 CALL MNC_INIT(myThid)
152 edhill 1.20 CALL MNC_CW_INIT(myThid, sNx,sNy, OLx,OLy, nSx,nSy, nPx,nPy, Nr)
153    
154 edhill 1.23 C Write the grid information
155     CALL MNC_CW_WRITE_GRID_INFO(myThid, 'grid')
156    
157     C Create MNC definitions for DYNVARS.h variables
158 edhill 1.21 CALL MNC_CW_ADD_VNAME(myThid, 'iter', '-_-_--__-__t', 0,0)
159 edhill 1.23 CALL MNC_CW_ADD_VATTR_TEXT(myThid,'iter',1,
160     & 'long_name','iteration_count')
161 edhill 1.21
162     CALL MNC_CW_ADD_VNAME(myThid, 'U', 'U_xy_Hn__C__t', 4,5)
163 edhill 1.22 CALL MNC_CW_ADD_VATTR_TEXT(myThid,'U',1,'units','m/s')
164    
165     CALL MNC_CW_ADD_VNAME(myThid, 'V', 'V_xy_Hn__C__t', 4,5)
166     CALL MNC_CW_ADD_VATTR_TEXT(myThid,'V',1,'units','m/s')
167    
168     CALL MNC_CW_ADD_VNAME(myThid, 'T', 'Cen_xy_Hn__C__t', 4,5)
169     CALL MNC_CW_ADD_VATTR_TEXT(myThid,'T',1,'units','degC')
170     CALL MNC_CW_ADD_VATTR_TEXT(myThid,'T',1,'long_name',
171     & 'potential_temperature')
172    
173     CALL MNC_CW_ADD_VNAME(myThid, 'S', 'Cen_xy_Hn__C__t', 4,5)
174 edhill 1.23 CALL MNC_CW_ADD_VATTR_TEXT(myThid,'S',1,'long_name',
175 edhill 1.22 & 'salinity')
176    
177     CALL MNC_CW_ADD_VNAME(myThid, 'Eta', 'Cen_xy_Hn__-__t', 3,4)
178 edhill 1.23 CALL MNC_CW_ADD_VATTR_TEXT(myThid,'Eta',1,'long_name',
179     & 'free-surface_r-anomaly')
180 edhill 1.22
181     CALL MNC_CW_ADD_VNAME(myThid, 'W', 'Cen_xy_Hn__C__t', 4,5)
182 edhill 1.23 CALL MNC_CW_ADD_VATTR_TEXT(myThid,'W',1,'units','m/s')
183    
184     CALL MNC_CW_ADD_VNAME(myThid, 'totPhiHyd', 'Cen_xy_Hn__C__t', 4,5)
185     CALL MNC_CW_ADD_VNAME(myThid, 'phiHydLow', 'Cen_xy_Hn__-__t', 3,4)
186     CALL MNC_CW_ADD_VNAME(myThid, 'phi_nh', 'Cen_xy_Hn__C__t', 4,5)
187    
188     CALL MNC_CW_ADD_VNAME(myThid, 'tr1', 'Cen_xy_Hn__C__t', 4,5)
189     CALL MNC_CW_ADD_VATTR_TEXT(myThid,'tr1',1,
190     & 'long_name','passive_tracer_1')
191 jmc 1.16 #endif
192 adcroft 1.1
193 jmc 1.12 RETURN
194 adcroft 1.1 END

  ViewVC Help
Powered by ViewVC 1.1.22