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

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

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


Revision 1.5 - (show annotations) (download)
Fri Nov 6 22:44:47 1998 UTC (25 years, 7 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint18
Changes since 1.4: +2 -2 lines
Changes to allow for atmospheric integration builds of the code

1 C $Header: /u/gcmpack/models/MITgcmUV/model/src/ini_grid.F,v 1.4 1998/07/02 14:16:24 adcroft Exp $
2
3 #include "CPP_OPTIONS.h"
4
5 CStartOfInterface
6 SUBROUTINE INI_GRID( myThid )
7 C /==========================================================\
8 C | SUBROUTINE INI_GRID |
9 C | o Initialise model grid |
10 C |==========================================================|
11 C | These arrays are used throughout the code in evaluating |
12 C | gradients, integrals and spatial avarages. This routine |
13 C | is called separately by each thread and initialise only |
14 C | the region of the domain it is "responsible" for. |
15 C | Notes: |
16 C | Two examples are shown in this code. One illustrates the |
17 C | initialisation of a cartesian grid. The other shows the |
18 C | inialisation of a spherical polar grid. Other orthonormal|
19 C | grids can be fitted into this design. In this case |
20 C | custom metric terms also need adding to account for the |
21 C | projections of velocity vectors onto these grids. |
22 C | The structure used here also makes it possible to |
23 C | implement less regular grid mappings. In particular |
24 C | o Schemes which leave out blocks of the domain that are |
25 C | all land could be supported. |
26 C | o Multi-level schemes such as icosohedral or cubic |
27 C | grid projectedions onto a sphere can also be fitted |
28 C | within the strategy we use. |
29 C | Both of the above also require modifying the support |
30 C | routines that map computational blocks to simulation |
31 C | domain blocks. |
32 C \==========================================================/
33
34 C === Global variables ===
35 #include "SIZE.h"
36 #include "EEPARAMS.h"
37 #include "PARAMS.h"
38 #include "GRID.h"
39
40 C == Routine arguments ==
41 C myThid - Number of this instance of INI_GRID
42 INTEGER myThid
43 CEndOfInterface
44
45 C == Local variables ==
46 C msgBuf - Used for informational I/O.
47 CHARACTER*(MAX_LEN_MBUF) msgBuf
48
49 C-- Set up vertical grid and coordinate system
50 CALL INI_VERTICAL_GRID( myThid )
51
52 C-- Set up horizontal grid and coordinate system
53 IF ( usingCartesianGrid ) THEN
54 CALL INI_CARTESIAN_GRID( myThid )
55 ELSEIF ( usingSphericalPolarGrid ) THEN
56 CALL INI_SPHERICAL_POLAR_GRID( myThid )
57 ELSE
58 _BEGIN_MASTER(myThid)
59 WRITE(msgBuf,'(A)')
60 & 'S/R INI_GRID: No grid coordinate system has been selected'
61 CALL PRINT_ERROR( msgBuf , myThid)
62 STOP 'ABNORMAL END: S/R INI_GRID'
63 _END_MASTER(myThid)
64 ENDIF
65 C
66 RETURN
67 END

  ViewVC Help
Powered by ViewVC 1.1.22