/[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.12 - (hide annotations) (download)
Fri Feb 15 21:25:09 2002 UTC (22 years, 3 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint51k_post, checkpoint47e_post, checkpoint44e_post, checkpoint46l_post, checkpoint46g_pre, checkpoint47c_post, checkpoint50c_post, checkpoint46f_post, checkpoint48e_post, checkpoint50c_pre, checkpoint44f_post, checkpoint46b_post, checkpoint51o_pre, checkpoint51l_post, checkpoint48i_post, checkpoint46l_pre, chkpt44d_post, checkpoint51, checkpoint50, checkpoint50d_post, checkpoint50b_pre, checkpoint44e_pre, checkpoint51f_post, checkpoint48b_post, checkpoint51d_post, checkpoint48c_pre, checkpoint47d_pre, checkpoint51n_post, checkpoint47a_post, checkpoint48d_pre, checkpoint51j_post, checkpoint47i_post, checkpoint51n_pre, checkpoint47d_post, checkpoint46d_pre, checkpoint48d_post, checkpoint48f_post, checkpoint45d_post, checkpoint46j_pre, checkpoint51l_pre, checkpoint44h_pre, checkpoint48h_post, checkpoint51q_post, checkpoint51b_pre, checkpoint46a_post, checkpoint47g_post, checkpoint46j_post, checkpoint51h_pre, checkpoint46k_post, checkpoint48a_post, checkpoint45a_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, ecco_c44_e18, ecco_c44_e17, checkpoint47j_post, branch-exfmods-tag, checkpoint44g_post, branchpoint-genmake2, checkpoint46e_pre, checkpoint51r_post, checkpoint48c_post, checkpoint45b_post, checkpoint46b_pre, checkpoint51i_post, release1_final_v1, checkpoint51b_post, checkpoint51c_post, checkpoint46c_pre, checkpoint46, checkpoint47b_post, checkpoint46h_pre, checkpoint46m_post, checkpoint46a_pre, checkpoint50g_post, checkpoint45c_post, checkpoint44h_post, checkpoint46g_post, checkpoint50h_post, checkpoint50e_pre, checkpoint50i_post, checkpoint51i_pre, checkpoint47f_post, checkpoint50e_post, checkpoint46i_post, checkpoint46c_post, checkpoint50d_pre, checkpoint46e_post, checkpoint51e_post, checkpoint47, checkpoint45, checkpoint48, checkpoint49, checkpoint46h_post, checkpoint51o_post, checkpoint51f_pre, checkpoint48g_post, checkpoint47h_post, checkpoint44f_pre, checkpoint51g_post, checkpoint46d_post, checkpoint50b_post, checkpoint51m_post, checkpoint51a_post, checkpoint51p_post
Branch point for: branch-exfmods-curt, release1_final, branch-genmake2, branch-nonh, tg2-branch, checkpoint51n_branch
Changes since 1.11: +4 -1 lines
Added missing EXCLUDE_MONITOR flags.

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

  ViewVC Help
Powered by ViewVC 1.1.22