1 |
C $Header: /u/gcmpack/models/MITgcmUV/model/src/ini_psurf.F,v 1.4 2001/09/26 18:09:15 cnh Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "CPP_OPTIONS.h" |
5 |
|
6 |
CBOP |
7 |
C !ROUTINE: INI_PSURF |
8 |
C !INTERFACE: |
9 |
SUBROUTINE INI_PSURF( myThid ) |
10 |
|
11 |
C !DESCRIPTION: \bv |
12 |
C *==========================================================* |
13 |
C | SUBROUTINE INI_PSURF | |
14 |
C | o Set model initial free-surface height/pressure. | |
15 |
C *==========================================================* |
16 |
C | There are several options for setting the initial | |
17 |
C | surface displacement (r unit) field. | |
18 |
C | 1. Inline code | |
19 |
C | 2. Two-dimensional data from a file. | |
20 |
C *==========================================================* |
21 |
C \ev |
22 |
|
23 |
C !USES: |
24 |
IMPLICIT NONE |
25 |
C === Global variables === |
26 |
#include "SIZE.h" |
27 |
#include "EEPARAMS.h" |
28 |
#include "PARAMS.h" |
29 |
#include "GRID.h" |
30 |
#include "DYNVARS.h" |
31 |
|
32 |
C !INPUT/OUTPUT PARAMETERS: |
33 |
C == Routine arguments == |
34 |
C myThid - Number of this instance of INI_PSURF |
35 |
INTEGER myThid |
36 |
|
37 |
C !LOCAL VARIABLES: |
38 |
C == Local variables == |
39 |
C bi,bj - Loop counters |
40 |
C I,J |
41 |
INTEGER bi, bj |
42 |
INTEGER I, J |
43 |
CEOP |
44 |
|
45 |
C-- Initialise surface position anomaly to zero |
46 |
DO bj = myByLo(myThid), myByHi(myThid) |
47 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
48 |
DO J=1-Oly,sNy+Oly |
49 |
DO I=1-Olx,sNx+Olx |
50 |
etaN(I,J,bi,bj) = 0. _d 0 |
51 |
ENDDO |
52 |
ENDDO |
53 |
ENDDO |
54 |
ENDDO |
55 |
C Read an initial state |
56 |
IF (pSurfInitFile .NE. ' ') THEN |
57 |
_BEGIN_MASTER( myThid ) |
58 |
CALL READ_FLD_XY_RL( pSurfInitFile, ' ', etaN, 0, myThid ) |
59 |
_END_MASTER(myThid) |
60 |
ENDIF |
61 |
C |
62 |
_EXCH_XY_R8(etaN, myThid) |
63 |
|
64 |
#ifdef INCLUDE_CD_CODE |
65 |
C-- By default, initialize etaNm1 with etaN : |
66 |
DO bj=myByLo(myThid),myByHi(myThid) |
67 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
68 |
DO J=1-Oly,sNy+Oly |
69 |
DO I=1-Olx,sNx+Olx |
70 |
etaNm1(I,J,bi,bj) = etaN(I,J,bi,bj) |
71 |
ENDDO |
72 |
ENDDO |
73 |
ENDDO |
74 |
ENDDO |
75 |
|
76 |
C _EXCH_XY_R8(etaNm1, myThid) |
77 |
#endif |
78 |
|
79 |
#ifdef NONLIN_FRSURF |
80 |
C-- By default, initialize etaH with etaN : |
81 |
DO bj=myByLo(myThid),myByHi(myThid) |
82 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
83 |
DO J=1-Oly,sNy+Oly |
84 |
DO I=1-Olx,sNx+Olx |
85 |
etaH(I,J,bi,bj) = etaN(I,J,bi,bj) |
86 |
ENDDO |
87 |
ENDDO |
88 |
ENDDO |
89 |
ENDDO |
90 |
#endif |
91 |
|
92 |
RETURN |
93 |
END |