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

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

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


Revision 1.20 - (hide annotations) (download)
Fri Jul 9 14:24:19 2004 UTC (19 years, 10 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint54d_post, checkpoint54e_post, checkpoint54c_post
Changes since 1.19: +2 -17 lines
Grid files were being written twice, the first time in the wrong place.
Also fixed call tree in comments.

1 adcroft 1.20 C $Header: /u/gcmpack/MITgcm/model/src/ini_grid.F,v 1.19 2004/07/06 14:40:30 jmc Exp $
2 adcroft 1.8 C $Name: $
3 cnh 1.1
4 jmc 1.19 #include "PACKAGES_CONFIG.h"
5 cnh 1.5 #include "CPP_OPTIONS.h"
6 cnh 1.1
7 cnh 1.10 CBOP
8     C !ROUTINE: INI_GRID
9     C !INTERFACE:
10 cnh 1.1 SUBROUTINE INI_GRID( myThid )
11 cnh 1.10 C !DESCRIPTION: \bv
12     C *==========================================================*
13     C | SUBROUTINE INI_GRID
14     C | o Initialise model grid
15     C *==========================================================*
16     C | These arrays are used throughout the code in evaluating
17     C | gradients, integrals and spatial avarages. This routine
18     C | is called separately by each thread and initialise only
19     C | the region of the domain it is "responsible" for.
20     C | Notes:
21     C | Two examples are shown in this code. One illustrates the
22     C | initialisation of a cartesian grid. The other shows the
23     C | inialisation of a spherical polar grid. Other orthonormal
24     C | grids can be fitted into this design. In this case
25     C | custom metric terms also need adding to account for the
26     C | projections of velocity vectors onto these grids.
27     C | The structure used here also makes it possible to
28     C | implement less regular grid mappings. In particular
29     C | o Schemes which leave out blocks of the domain that are
30     C | all land could be supported.
31     C | o Multi-level schemes such as icosohedral or cubic
32     C | grid projectedions onto a sphere can also be fitted
33     C | within the strategy we use.
34     C | Both of the above also require modifying the support
35     C | routines that map computational blocks to simulation
36     C | domain blocks.
37     C *==========================================================*
38     C \ev
39    
40     C !USES:
41 adcroft 1.6 IMPLICIT NONE
42 cnh 1.1 C === Global variables ===
43     #include "SIZE.h"
44     #include "EEPARAMS.h"
45     #include "PARAMS.h"
46     #include "GRID.h"
47    
48 cnh 1.10 C !INPUT/OUTPUT PARAMETERS:
49 cnh 1.1 C == Routine arguments ==
50     C myThid - Number of this instance of INI_GRID
51     INTEGER myThid
52    
53 cnh 1.10 C !LOCAL VARIABLES:
54 cnh 1.1 C == Local variables ==
55     C msgBuf - Used for informational I/O.
56     CHARACTER*(MAX_LEN_MBUF) msgBuf
57 cnh 1.10 CEOP
58 cnh 1.1
59 adcroft 1.4 C-- Set up vertical grid and coordinate system
60     CALL INI_VERTICAL_GRID( myThid )
61    
62     C-- Set up horizontal grid and coordinate system
63 cnh 1.1 IF ( usingCartesianGrid ) THEN
64     CALL INI_CARTESIAN_GRID( myThid )
65     ELSEIF ( usingSphericalPolarGrid ) THEN
66     CALL INI_SPHERICAL_POLAR_GRID( myThid )
67 adcroft 1.8 ELSEIF ( usingCurvilinearGrid ) THEN
68     CALL INI_CURVILINEAR_GRID( myThid )
69 afe 1.17 ELSEIF ( usingCylindricalGrid ) THEN
70     CALL INI_CYLINDER( myThid )
71 cnh 1.1 ELSE
72     _BEGIN_MASTER(myThid)
73     WRITE(msgBuf,'(A)')
74     & 'S/R INI_GRID: No grid coordinate system has been selected'
75     CALL PRINT_ERROR( msgBuf , myThid)
76     STOP 'ABNORMAL END: S/R INI_GRID'
77     _END_MASTER(myThid)
78     ENDIF
79 dimitri 1.15
80 adcroft 1.20 #ifdef ALLOW_MONITOR
81 adcroft 1.9 C-- Print out statistics of each horizontal grid array (helps when debugging)
82     CALL MON_PRINTSTATS_RS(1,XC,'XC',myThid)
83     CALL MON_PRINTSTATS_RS(1,XG,'XG',myThid)
84     CALL MON_PRINTSTATS_RS(1,DXC,'DXC',myThid)
85     CALL MON_PRINTSTATS_RS(1,DXF,'DXF',myThid)
86     CALL MON_PRINTSTATS_RS(1,DXG,'DXG',myThid)
87     CALL MON_PRINTSTATS_RS(1,DXV,'DXV',myThid)
88     CALL MON_PRINTSTATS_RS(1,YC,'YC',myThid)
89     CALL MON_PRINTSTATS_RS(1,YG,'YG',myThid)
90     CALL MON_PRINTSTATS_RS(1,DYC,'DYC',myThid)
91     CALL MON_PRINTSTATS_RS(1,DYF,'DYF',myThid)
92     CALL MON_PRINTSTATS_RS(1,DYG,'DYG',myThid)
93     CALL MON_PRINTSTATS_RS(1,DYU,'DYU',myThid)
94     CALL MON_PRINTSTATS_RS(1,RA,'RA',myThid)
95     CALL MON_PRINTSTATS_RS(1,RAW,'RAW',myThid)
96     CALL MON_PRINTSTATS_RS(1,RAS,'RAS',myThid)
97     CALL MON_PRINTSTATS_RS(1,RAZ,'RAZ',myThid)
98 heimbach 1.12 #endif
99 adcroft 1.8
100 cnh 1.1 RETURN
101     END

  ViewVC Help
Powered by ViewVC 1.1.22