/[MITgcm]/MITgcm/model/src/ini_depths.F
ViewVC logotype

Annotation of /MITgcm/model/src/ini_depths.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.16 - (hide annotations) (download)
Fri Nov 6 22:44:47 1998 UTC (25 years, 7 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint18
Changes since 1.15: +2 -2 lines
Changes to allow for atmospheric integration builds of the code

1 cnh 1.16 C $Header: /u/gcmpack/models/MITgcmUV/model/src/ini_depths.F,v 1.15 1998/10/28 03:11:37 cnh Exp $
2 cnh 1.1
3 cnh 1.16 #include "CPP_OPTIONS.h"
4 cnh 1.1
5     CStartOfInterface
6     SUBROUTINE INI_DEPTHS( myThid )
7     C /==========================================================\
8     C | SUBROUTINE INI_DEPTHS |
9     C | o Initialise map of model depths |
10     C |==========================================================|
11     C | The depths of the bottom of the model is specified in |
12     C | terms of an XY map with one depth for each column of |
13     C | grid cells. Depths do not have to coincide with the |
14 cnh 1.15 C | model levels. The model lopping algorithm makes it |
15 cnh 1.1 C | possible to represent arbitrary depths. |
16     C | The mode depths map also influences the models topology |
17     C | By default the model domain wraps around in X and Y. |
18     C | This default doubly periodic topology is "supressed" |
19     C | if a depth map is defined which closes off all wrap |
20     C | around flow. |
21     C \==========================================================/
22    
23     C === Global variables ===
24     #include "SIZE.h"
25     #include "EEPARAMS.h"
26     #include "PARAMS.h"
27     #include "GRID.h"
28    
29     C == Routine arguments ==
30     C myThid - Number of this instance of INI_DEPTHS
31     INTEGER myThid
32     CEndOfInterface
33    
34     C == Local variables ==
35     C iG, jG - Global coordinate index
36     C bi,bj - Loop counters
37     C I,J,K
38 adcroft 1.9 C phi - total depth of model
39 cnh 1.13 C oldPrec - Temporary used in controlling binary input dataset precision
40 cnh 1.1 INTEGER iG, jG
41     INTEGER bi, bj
42     INTEGER I, J, K
43 cnh 1.13 INTEGER oldPrec
44 adcroft 1.9 _RL phi
45 cnh 1.1
46     _BARRIER
47 cnh 1.4 IF ( bathyFile .EQ. ' ' ) THEN
48     C Set up a flat bottom box with doubly periodic topology.
49     C H is the basic variable from which other terms are derived. It
50     C is the term that would be set from an external file for a
51     C realistic problem.
52 cnh 1.12 phi = rF(Nr+1)
53 cnh 1.4 DO bj = myByLo(myThid), myByHi(myThid)
54     DO bi = myBxLo(myThid), myBxHi(myThid)
55     DO j=1,sNy
56     DO i=1,sNx
57     iG = myXGlobalLo-1+(bi-1)*sNx+I
58     jG = myYGlobalLo-1+(bj-1)*sNy+J
59     C Default depth of full domain
60     H(i,j,bi,bj) = phi
61     C Test for eastern edge
62     IF ( iG .EQ. nX ) H(i,j,bi,bj) = 0.
63     C Test for northern edge
64     IF ( jG .EQ. nY ) H(i,j,bi,bj) = 0.
65     C Island
66     IF ( iG .EQ. 1 .AND.
67     & jG .EQ. 24 ) H(i,j,bi,bj) = 0.75*phi
68     ENDDO
69 cnh 1.1 ENDDO
70     ENDDO
71     ENDDO
72 cnh 1.4 ELSE
73     _BEGIN_MASTER( myThid )
74 cnh 1.13
75     CcnhDebugStarts
76     C Force 64-bit IO
77     oldPrec = readBinaryPrec
78     readBinaryPrec = precFloat64
79     CcnhDEbugEnds
80 cnh 1.4 CALL READ_FLD_XY_RS( bathyFile, ' ', H, 0, myThid )
81 cnh 1.13 CcnhDebugStarts
82     readBinaryPrec = oldPrec
83     CcnhdDebugEnds
84    
85 cnh 1.4 _END_MASTER(myThid)
86     ENDIF
87 cnh 1.14
88 cnh 1.4 _EXCH_XY_R4( H, myThid )
89 cnh 1.5 C
90 cnh 1.7 CALL PLOT_FIELD_XYRS( H, 'Model depths' , 1, myThid )
91 cnh 1.1 C
92     RETURN
93     END

  ViewVC Help
Powered by ViewVC 1.1.22