/[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.10.2.2 - (show annotations) (download)
Mon Apr 8 20:10:37 2002 UTC (22 years, 1 month ago) by heimbach
Branch: release1
CVS Tags: release1_p13_pre, release1_p13, release1_p8, release1_p9, release1_p1, release1_p2, release1_p3, release1_p4, release1_p5, release1_p6, release1_p7, release1_chkpt44d_post, release1_p11, release1_p12, release1_p10, release1_p16, release1_p17, release1_p14, release1_p15, release1_p12_pre
Branch point for: release1_50yr
Changes since 1.10.2.1: +5 -2 lines
Changes encapsulated by checkpoint43a-release1mods and chkpt44d_post
on the main trunk.
These are:

 o added missing EXCLUDE_MONITOR flags
 o changed "e" to "_d" in gmredi_slope_limit, gmredi_slope_psi
   (incompatible typ in MIN/MAX expressions caused problems
   on IBM SP3)
 o in genmake added variable MAKEDEPEND
   plus resetting for case SunOS
 o added timer_stats.c routine for IBM SP3
 o removed variables in dynamics
 o real fresh water flux implemented with non-linear free-surface.
 o few fix (mask in shap_s2, EmPmR in external_field_load,
   USE_NATURAL_BCS in solve_for_P);
 o add arguments myIter & myTime to S/R obcs_calc & solve_for_P
 o merge of relevant stuff from the ecco-branch:
   - genmake: removed $S64 overwrite for case SunOS
   - pkg/exf: update and corrections for field swapping and obcs
   - pkg/ecco: parameter lists for the_model_main, the_main_loop
               harmonized between ECCO and MITgcm
   - pkg/autodiff: added flow directives for obcs, mdsio_gl_slice
                   updated checkpointing_lev... lists for obcs
   - model/src: minor changes in forward_step, plot_field
                added directive for divided adjoint in the_main_loop
   - pkg/mdsio: added mdsio_gl_slice
 o check parameters & config (chkpt44a_pre,post)
 o OBC and NonLin_FrSurf.
 o fix bug in mom_vi_del2uv
 o select when filters are applied ; add options to zonal_filter (data.zonfilt)
 o gmredi: fix Pb in the adiabatic form ; add options (.e.g. Bolus advection)
 o update AIM experiments (NCEP input files)
 o improve and extend diagnostics (Monitor, TimeAve with NonLin-FrSurf)
 o added some stuff for AD

These were merged with
cvs co -r release1 -P MITgcm
cd MITgcm
cvs update -kk
cvs update -j checkpoint43a-release1mods -j chkpt44d_post -d -P -kk

1 C $Header$
2 C $Name$
3
4 #include "CPP_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: INI_GRID
8 C !INTERFACE:
9 SUBROUTINE INI_GRID( myThid )
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 IMPLICIT NONE
41 C === Global variables ===
42 #include "SIZE.h"
43 #include "EEPARAMS.h"
44 #include "PARAMS.h"
45 #include "GRID.h"
46
47 C !INPUT/OUTPUT PARAMETERS:
48 C == Routine arguments ==
49 C myThid - Number of this instance of INI_GRID
50 INTEGER myThid
51
52 C !LOCAL VARIABLES:
53 C == Local variables ==
54 C msgBuf - Used for informational I/O.
55 CHARACTER*(MAX_LEN_MBUF) msgBuf
56 CEOP
57
58 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 IF ( usingCartesianGrid ) THEN
63 CALL INI_CARTESIAN_GRID( myThid )
64 ELSEIF ( usingSphericalPolarGrid ) THEN
65 CALL INI_SPHERICAL_POLAR_GRID( myThid )
66 ELSEIF ( usingCurvilinearGrid ) THEN
67 CALL INI_CURVILINEAR_GRID( myThid )
68 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
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 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
91 C-- Print out statistics of each horizontal grid array (helps when debugging)
92
93 #ifndef EXCLUDE_MONITOR
94 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 #endif
111
112 RETURN
113 END

  ViewVC Help
Powered by ViewVC 1.1.22