/[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.7.2.2 - (show annotations) (download)
Wed May 16 20:54:49 2001 UTC (23 years ago) by jmc
Branch: pre38
CVS Tags: pre38-close
Changes since 1.7.2.1: +2 -1 lines
write out horizontal mesh area of every Tracer grid points

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

  ViewVC Help
Powered by ViewVC 1.1.22