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

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

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


Revision 1.18 - (show annotations) (download)
Tue Dec 15 00:20:34 1998 UTC (25 years, 5 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint19, checkpoint20
Changes since 1.17: +3 -17 lines
 o Added "natural BCs" as alternative to "virtual salt flux"
 o Re-difined precFloat32 and precFloat64 to be 32 and 64
   so that their values can be meaningfuly set in the data file
 o Modified read_write.F to create an exception if readBinaryPrec
   is not set
 o Replaced CPP control of viscous BCs with run-time control
 o Tidied up input-data precision (ie. ini_depths cnh_dbg...)
 o ini_forcing.F now initialises *all* forcing arrays to zero
 o Definitively tested verification experiments 0,1,2 and 4
   (3 is atmospheric set-up which is in a state of flux)

1 C $Header: /u/gcmpack/models/MITgcmUV/model/src/ini_depths.F,v 1.17 1998/12/09 16:11:52 adcroft Exp $
2
3 #include "CPP_OPTIONS.h"
4
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 C | model levels. The model lopping algorithm makes it |
15 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 IMPLICIT NONE
23
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 C phi - total depth of model
40 C oldPrec - Temporary used in controlling binary input dataset precision
41 INTEGER iG, jG
42 INTEGER bi, bj
43 INTEGER I, J, K
44 _RL phi
45
46 _BARRIER
47 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 phi = rF(Nr+1)
53 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 C IF ( iG .EQ. nX ) H(i,j,bi,bj) = 0.
63 C Test for northern edge
64 C IF ( jG .EQ. nY ) H(i,j,bi,bj) = 0.
65 ENDDO
66 ENDDO
67 ENDDO
68 ENDDO
69 ELSE
70 _BEGIN_MASTER( myThid )
71 CALL READ_FLD_XY_RS( bathyFile, ' ', H, 0, myThid )
72 _END_MASTER(myThid)
73 ENDIF
74
75 _EXCH_XY_R4( H, myThid )
76 C
77 CALL PLOT_FIELD_XYRS( H, 'Model depths' , 1, myThid )
78 C
79 RETURN
80 END

  ViewVC Help
Powered by ViewVC 1.1.22