27 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
28 |
#include "PARAMS.h" |
#include "PARAMS.h" |
29 |
#include "GRID.h" |
#include "GRID.h" |
30 |
|
#include "INI_DEPTHS.h" |
31 |
|
|
32 |
C == Routine arguments == |
C == Routine arguments == |
33 |
C myThid - Number of this instance of INI_DEPTHS |
C myThid - Number of this instance of INI_DEPTHS |
38 |
C iG, jG - Global coordinate index |
C iG, jG - Global coordinate index |
39 |
C bi,bj - Loop counters |
C bi,bj - Loop counters |
40 |
C I,J,K |
C I,J,K |
41 |
|
C H - Depth of base of fluid from upper surface f[X,Y] (m). |
42 |
C Hdefault - default r-coordinate of the lower boundary (=ground) |
C Hdefault - default r-coordinate of the lower boundary (=ground) |
43 |
C (=minus(Total_depth) in the ocean model) |
C (=minus(Total_depth) in the ocean model) |
44 |
C (=Total Pressure at Sea Level in the atmos model) |
C (=Total Pressure at Sea Level in the atmos model) |
45 |
|
C-------------------- |
46 |
|
C NOTE: will change soon: 2 separed files for r_lower and r_surface boudaries |
47 |
|
C and for the atmosphere, topography will be defined in term of height |
48 |
|
C-------------------- |
49 |
C oldPrec - Temporary used in controlling binary input dataset precision |
C oldPrec - Temporary used in controlling binary input dataset precision |
50 |
INTEGER iG, jG |
INTEGER iG, jG |
51 |
INTEGER bi, bj |
INTEGER bi, bj |
52 |
INTEGER I, J, K |
INTEGER I, J |
53 |
_RL Hdefault |
_RL Hdefault |
54 |
|
|
55 |
_BARRIER |
_BARRIER |
58 |
C H is the basic variable from which other terms are derived. It |
C H is the basic variable from which other terms are derived. It |
59 |
C is the term that would be set from an external file for a |
C is the term that would be set from an external file for a |
60 |
C realistic problem. |
C realistic problem. |
61 |
Hdefault = rF(1) |
IF (groundAtK1) THEN |
62 |
IF (.NOT. groundAtK1) THEN |
Hdefault = Ro_SeaLevel |
63 |
DO K = 1, Nr |
ELSE |
64 |
Hdefault = Hdefault - rkfac*drF(K) |
Hdefault = rF(Nr+1) |
|
ENDDO |
|
65 |
ENDIF |
ENDIF |
66 |
DO bj = myByLo(myThid), myByHi(myThid) |
DO bj = myByLo(myThid), myByHi(myThid) |
67 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
DO bi = myBxLo(myThid), myBxHi(myThid) |
95 |
|
|
96 |
_EXCH_XY_R4( H, myThid ) |
_EXCH_XY_R4( H, myThid ) |
97 |
|
|
98 |
IF (usingSphericalPolarGrid) THEN |
C |
99 |
|
C CALL PLOT_FIELD_XYRS(H,'Model depths (ini_depths)',1,myThid) |
100 |
|
C |
101 |
|
IF (groundAtK1) THEN |
102 |
DO bj = myByLo(myThid), myByHi(myThid) |
DO bj = myByLo(myThid), myByHi(myThid) |
103 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
DO bi = myBxLo(myThid), myBxHi(myThid) |
104 |
DO j=1-Oly,sNy+Oly |
DO j=1-Oly,sNy+Oly |
105 |
DO i=1-Olx,sNx+Olx |
DO i=1-Olx,sNx+Olx |
106 |
IF (abs(yC(I,J,bi,bj)).GE.90.) H(I,J,bi,bj)=0. |
R_low(I,J,bi,bj) = rF(Nr+1) |
107 |
|
Ro_surf(I,J,bi,bj) = H(I,J,bi,bj) |
108 |
|
IF (usingSphericalPolarGrid .AND. abs(yC(I,J,bi,bj)).GE.90. ) |
109 |
|
& THEN |
110 |
|
Ro_surf(I,J,bi,bj) = 0. |
111 |
|
ENDIF |
112 |
|
ENDDO |
113 |
|
ENDDO |
114 |
|
ENDDO |
115 |
|
ENDDO |
116 |
|
ELSE |
117 |
|
DO bj = myByLo(myThid), myByHi(myThid) |
118 |
|
DO bi = myBxLo(myThid), myBxHi(myThid) |
119 |
|
DO j=1-Oly,sNy+Oly |
120 |
|
DO i=1-Olx,sNx+Olx |
121 |
|
R_low(I,J,bi,bj) = H(I,J,bi,bj) |
122 |
|
Ro_surf(I,J,bi,bj) = Ro_SeaLevel |
123 |
|
IF (usingSphericalPolarGrid .AND. abs(yC(I,J,bi,bj)).GE.90. ) |
124 |
|
& THEN |
125 |
|
R_low(I,J,bi,bj) = 0. |
126 |
|
ENDIF |
127 |
ENDDO |
ENDDO |
128 |
ENDDO |
ENDDO |
129 |
ENDDO |
ENDDO |
130 |
ENDDO |
ENDDO |
131 |
ENDIF |
ENDIF |
132 |
C |
|
|
CALL PLOT_FIELD_XYRS(H,'Model depths (ini_depths)',1,myThid) |
|
|
C |
|
133 |
RETURN |
RETURN |
134 |
END |
END |