7 |
SUBROUTINE INI_PSURF( myThid ) |
SUBROUTINE INI_PSURF( myThid ) |
8 |
C /==========================================================\ |
C /==========================================================\ |
9 |
C | SUBROUTINE INI_PSURF | |
C | SUBROUTINE INI_PSURF | |
10 |
C | o Set model initial free-surface height/pressue. | |
C | o Set model initial free-surface height/pressure. | |
11 |
C |==========================================================| |
C |==========================================================| |
12 |
C | There are several options for setting the initial | |
C | There are several options for setting the initial | |
13 |
C | zonal velocity field. | |
C | surface displacement (r unit) field. | |
14 |
C | 1. Inline code | |
C | 1. Inline code | |
15 |
C | 2. Two-dimensional data from a file. | |
C | 2. Two-dimensional data from a file. | |
16 |
C \==========================================================/ |
C \==========================================================/ |
21 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
22 |
#include "PARAMS.h" |
#include "PARAMS.h" |
23 |
#include "GRID.h" |
#include "GRID.h" |
24 |
#include "CG2D.h" |
#include "DYNVARS.h" |
25 |
|
|
26 |
C == Routine arguments == |
C == Routine arguments == |
27 |
C myThid - Number of this instance of INI_UVEL |
C myThid - Number of this instance of INI_PSURF |
28 |
INTEGER myThid |
INTEGER myThid |
29 |
CEndOfInterface |
CEndOfInterface |
30 |
|
|
34 |
INTEGER bi, bj |
INTEGER bi, bj |
35 |
INTEGER I, J |
INTEGER I, J |
36 |
|
|
37 |
C-- Initialise velocity field to zero |
C-- Initialise surface position anomaly to zero |
38 |
DO bj = myByLo(myThid), myByHi(myThid) |
DO bj = myByLo(myThid), myByHi(myThid) |
39 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
DO bi = myBxLo(myThid), myBxHi(myThid) |
40 |
DO J=1,sNy |
DO J=1-Oly,sNy+Oly |
41 |
DO I=1,sNx |
DO I=1-Olx,sNx+Olx |
42 |
cg2d_x(I,J,bi,bj) = 0. _d 0 |
etaN(I,J,bi,bj) = 0. _d 0 |
43 |
ENDDO |
ENDDO |
44 |
ENDDO |
ENDDO |
45 |
ENDDO |
ENDDO |
47 |
C Read an initial state |
C Read an initial state |
48 |
IF (pSurfInitFile .NE. ' ') THEN |
IF (pSurfInitFile .NE. ' ') THEN |
49 |
_BEGIN_MASTER( myThid ) |
_BEGIN_MASTER( myThid ) |
50 |
CALL READ_FLD_XY_RL( pSurfInitFile, ' ', cg2d_x, 0, myThid ) |
CALL READ_FLD_XY_RL( pSurfInitFile, ' ', etaN, 0, myThid ) |
51 |
_END_MASTER(myThid) |
_END_MASTER(myThid) |
52 |
ENDIF |
ENDIF |
53 |
C |
C |
54 |
_EXCH_XY_R8(cg2d_x, myThid) |
_EXCH_XY_R8(etaN, myThid) |
55 |
|
|
56 |
|
#ifdef INCLUDE_CD_CODE |
57 |
|
C-- By default, initialize etaNm1 with etaN : |
58 |
|
DO bj=myByLo(myThid),myByHi(myThid) |
59 |
|
DO bi=myBxLo(myThid),myBxHi(myThid) |
60 |
|
DO J=1-Oly,sNy+Oly |
61 |
|
DO I=1-Olx,sNx+Olx |
62 |
|
etaNm1(I,J,bi,bj) = etaN(I,J,bi,bj) |
63 |
|
ENDDO |
64 |
|
ENDDO |
65 |
|
ENDDO |
66 |
|
ENDDO |
67 |
|
|
68 |
|
C _EXCH_XY_R8(etaNm1, myThid) |
69 |
|
#endif |
70 |
|
|
71 |
RETURN |
RETURN |
72 |
END |
END |