/[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.17 - (hide annotations) (download)
Wed Dec 9 16:11:52 1998 UTC (25 years, 6 months ago) by adcroft
Branch: MAIN
Changes since 1.16: +2 -1 lines
Added IMPLICIT NONE in a lot of subroutines.
Also corrected the recip_Rhonil bug: we didn't set it in ini_parms.F

1 adcroft 1.17 C $Header: /u/gcmpack/models/MITgcmUV/model/src/ini_depths.F,v 1.16 1998/11/06 22:44:47 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 adcroft 1.17 IMPLICIT NONE
23 cnh 1.1
24     C === Global variables ===
25     #include "SIZE.h"
26     #include "EEPARAMS.h"
27     #include "PARAMS.h"
28     #include "GRID.h"
29    
30     C == Routine arguments ==
31     C myThid - Number of this instance of INI_DEPTHS
32     INTEGER myThid
33     CEndOfInterface
34    
35     C == Local variables ==
36     C iG, jG - Global coordinate index
37     C bi,bj - Loop counters
38     C I,J,K
39 adcroft 1.9 C phi - total depth of model
40 cnh 1.13 C oldPrec - Temporary used in controlling binary input dataset precision
41 cnh 1.1 INTEGER iG, jG
42     INTEGER bi, bj
43     INTEGER I, J, K
44 cnh 1.13 INTEGER oldPrec
45 adcroft 1.9 _RL phi
46 cnh 1.1
47     _BARRIER
48 cnh 1.4 IF ( bathyFile .EQ. ' ' ) THEN
49     C Set up a flat bottom box with doubly periodic topology.
50     C H is the basic variable from which other terms are derived. It
51     C is the term that would be set from an external file for a
52     C realistic problem.
53 cnh 1.12 phi = rF(Nr+1)
54 cnh 1.4 DO bj = myByLo(myThid), myByHi(myThid)
55     DO bi = myBxLo(myThid), myBxHi(myThid)
56     DO j=1,sNy
57     DO i=1,sNx
58     iG = myXGlobalLo-1+(bi-1)*sNx+I
59     jG = myYGlobalLo-1+(bj-1)*sNy+J
60     C Default depth of full domain
61     H(i,j,bi,bj) = phi
62     C Test for eastern edge
63     IF ( iG .EQ. nX ) H(i,j,bi,bj) = 0.
64     C Test for northern edge
65     IF ( jG .EQ. nY ) H(i,j,bi,bj) = 0.
66     C Island
67     IF ( iG .EQ. 1 .AND.
68     & jG .EQ. 24 ) H(i,j,bi,bj) = 0.75*phi
69     ENDDO
70 cnh 1.1 ENDDO
71     ENDDO
72     ENDDO
73 cnh 1.4 ELSE
74     _BEGIN_MASTER( myThid )
75 cnh 1.13
76     CcnhDebugStarts
77     C Force 64-bit IO
78     oldPrec = readBinaryPrec
79     readBinaryPrec = precFloat64
80     CcnhDEbugEnds
81 cnh 1.4 CALL READ_FLD_XY_RS( bathyFile, ' ', H, 0, myThid )
82 cnh 1.13 CcnhDebugStarts
83     readBinaryPrec = oldPrec
84     CcnhdDebugEnds
85    
86 cnh 1.4 _END_MASTER(myThid)
87     ENDIF
88 cnh 1.14
89 cnh 1.4 _EXCH_XY_R4( H, myThid )
90 cnh 1.5 C
91 cnh 1.7 CALL PLOT_FIELD_XYRS( H, 'Model depths' , 1, myThid )
92 cnh 1.1 C
93     RETURN
94     END

  ViewVC Help
Powered by ViewVC 1.1.22