1 |
C $Header: /u/gcmpack/MITgcm/pkg/gridalt/gridalt_initialise.F,v 1.5 2004/05/05 00:39:21 edhill Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
subroutine gridalt_initialise (myThid) |
5 |
c----------------------------------------------------------------------- |
6 |
c Routine to initialise the gridalt package. |
7 |
c |
8 |
c Input: myThid - Process number calling this routine |
9 |
c |
10 |
c Notes: |
11 |
c When used with fizhi, this routine is the interface |
12 |
c to make_phys_grid |
13 |
c Calls: make_phys_grid (define the physics grid and mappings) |
14 |
c when diagnostics are used, call gridalt_diagnostics_init |
15 |
c----------------------------------------------------------------------- |
16 |
implicit none |
17 |
#include "PACKAGES_CONFIG.h" |
18 |
#include "CPP_OPTIONS.h" |
19 |
#include "SIZE.h" |
20 |
#include "EEPARAMS.h" |
21 |
#include "PARAMS.h" |
22 |
#include "GRID.h" |
23 |
#include "fizhi_SIZE.h" |
24 |
#include "gridalt_mapping.h" |
25 |
#include "SURFACE.h" |
26 |
|
27 |
integer myThid |
28 |
|
29 |
integer nlph |
30 |
integer bi, bj |
31 |
integer im1, im2, jm1, jm2, idim1, idim2, jdim1, jdim2 |
32 |
|
33 |
im1 = 1-OLx |
34 |
im2 = sNx+OLx |
35 |
jm1 = 1-OLy |
36 |
jm2 = sNy+OLy |
37 |
idim1 = 1 |
38 |
idim2 = sNx |
39 |
jdim1 = 1 |
40 |
jdim2 = sNy |
41 |
|
42 |
#ifdef ALLOW_FIZHI |
43 |
if(usefizhi) then |
44 |
do bj = myByLo(myThid), myByHi(myThid) |
45 |
do bi = myBxLo(myThid), myBxHi(myThid) |
46 |
|
47 |
call make_phys_grid(drF,hfacC,im1,im2,jm1,jm2,Nr,Nsx,Nsy, |
48 |
. 1,sNx,1,sNy,bi,bj,Nrphys,ksurfC,dpphys0,nlph,nlperdyn) |
49 |
|
50 |
if( NrPhys.ne.nlph ) then |
51 |
print *,' ERROR CONDITION - Model has been brought down ' |
52 |
print *,' Physics dimension in fizhi_size is ',Nrphys, |
53 |
. ' New grid has ',nlph,' levels ' |
54 |
stop |
55 |
endif |
56 |
|
57 |
enddo |
58 |
enddo |
59 |
endif |
60 |
|
61 |
#ifdef ALLOW_DIAGNOSTICS |
62 |
if ( useDiagnostics ) then |
63 |
call gridalt_diagnostics_init( myThid ) |
64 |
endif |
65 |
#endif |
66 |
|
67 |
#endif |
68 |
|
69 |
return |
70 |
end |