1 |
cnh |
1.11 |
C $Header: /u/gcmpack/models/MITgcmUV/model/src/ini_vertical_grid.F,v 1.10 2001/02/02 21:04:48 adcroft Exp $ |
2 |
|
|
C $Name: $ |
3 |
adcroft |
1.1 |
|
4 |
cnh |
1.7 |
#include "CPP_OPTIONS.h" |
5 |
adcroft |
1.1 |
|
6 |
|
|
CStartOfInterface |
7 |
|
|
SUBROUTINE INI_VERTICAL_GRID( myThid ) |
8 |
|
|
C /==========================================================\ |
9 |
|
|
C | SUBROUTINE INI_VERTICAL_GRID | |
10 |
|
|
C | o Initialise vertical gridding arrays | |
11 |
|
|
C |==========================================================| |
12 |
|
|
C | | |
13 |
|
|
C \==========================================================/ |
14 |
adcroft |
1.8 |
IMPLICIT NONE |
15 |
adcroft |
1.1 |
|
16 |
|
|
C === Global variables === |
17 |
|
|
#include "SIZE.h" |
18 |
|
|
#include "EEPARAMS.h" |
19 |
|
|
#include "PARAMS.h" |
20 |
|
|
#include "GRID.h" |
21 |
|
|
|
22 |
|
|
C == Routine arguments == |
23 |
|
|
C myThid - Number of this instance of INI_DEPTHS |
24 |
|
|
INTEGER myThid |
25 |
|
|
CEndOfInterface |
26 |
|
|
|
27 |
|
|
C == Local variables == |
28 |
|
|
C K |
29 |
|
|
INTEGER K |
30 |
|
|
|
31 |
|
|
C Calculate depths of centers and interfaces |
32 |
adcroft |
1.10 |
rF(1) = Ro_SeaLevel |
33 |
cnh |
1.4 |
DO K=1,Nr |
34 |
cnh |
1.5 |
drF(K) = delR(K) |
35 |
|
|
rF(K+1) = rF(K)-rkFac*delR(K) |
36 |
adcroft |
1.1 |
ENDDO |
37 |
cnh |
1.5 |
drC(1) = delR(1) * 0.5 _d 0 |
38 |
|
|
rC(1) = rf(1)-rkFac*delR(1) * 0.5 _d 0 |
39 |
cnh |
1.4 |
DO K=2,Nr |
40 |
cnh |
1.5 |
drC(K) = 0.5 _d 0 *(delR(K-1)+delR(K)) |
41 |
|
|
rC(K) = rC(K-1) - rkFac*drC(K) |
42 |
adcroft |
1.1 |
ENDDO |
43 |
cnh |
1.4 |
DO K=1,Nr |
44 |
cnh |
1.6 |
saFac(K) = 1. _d 0 |
45 |
cnh |
1.4 |
recip_drC(K) = 1. _d 0/drC(K) |
46 |
|
|
recip_drF(K) = 1. _d 0/drF(K) |
47 |
adcroft |
1.1 |
ENDDO |
48 |
|
|
C |
49 |
|
|
RETURN |
50 |
|
|
END |