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

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

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


Revision 1.2 - (hide annotations) (download)
Fri Apr 24 02:05:41 1998 UTC (26 years, 1 month ago) by cnh
Branch: MAIN
CVS Tags: redigm, checkpoint5, checkpoint4, checkpoint6, checkpoint1, checkpoint3, checkpoint2, kloop1, kloop2
Changes since 1.1: +1 -1 lines
Further $Id to $Header conversions

1 cnh 1.2 C $Header: ini_theta.F,v 1.1.1.1 1998/04/22 19:15:30 cnh Exp $
2 cnh 1.1
3     #include "CPP_EEOPTIONS.h"
4    
5     CStartOfInterface
6     SUBROUTINE INI_THETA( myThid )
7     C /==========================================================\
8     C | SUBROUTINE INI_THETA |
9     C | o Set model initial temperature field. |
10     C |==========================================================|
11     C | There are several options for setting the initial |
12     C | temperature file |
13     C | 1. Inline code |
14     C | 2. Vertical profile ( uniform T in X and Y ) |
15     C | 3. Three-dimensional data from a file. For example from |
16     C | Levitus or from a checkpoint file from a previous |
17     C | integration. |
18     C | In addition to setting the temperature field we also |
19     C | set the initial temperature tendency term here. |
20     C \==========================================================/
21    
22     C === Global variables ===
23     #include "SIZE.h"
24     #include "EEPARAMS.h"
25     #include "PARAMS.h"
26     #include "GRID.h"
27     #include "DYNVARS.h"
28    
29     C == Routine arguments ==
30     C myThid - Number of this instance of INI_THETA
31     INTEGER myThid
32     CEndOfInterface
33    
34     C == Local variables ==
35     C iC, jC - Center of domain
36     C iD, jD - Disitance from domain center.
37     C rad - Radius of initial patch
38     C rD - Radial displacement of point I,J
39     C iG, jG - Global coordinate index
40     C bi,bj - Loop counters
41     C I,J,K
42     INTEGER iC, jC, iD, jD
43     INTEGER iG, jG
44     INTEGER bi, bj
45     INTEGER I, J, K
46     REAL rad, rD
47    
48     C-- Initialise temperature field to a circular patch.
49     iC = Nx/2
50     jC = Ny/2
51     rad = MIN(Ny/8,Nx/8)
52     DO bj = myByLo(myThid), myByHi(myThid)
53     DO bi = myBxLo(myThid), myBxHi(myThid)
54     DO K=1,Nz
55     DO J=1,sNy
56     DO I=1,sNx
57     theta(I,J,K,bi,bj) = 0. _d 0
58     iG = myXGlobalLo-1+(bi-1)*sNx+I
59     jG = myYGlobalLo-1+(bj-1)*sNy+J
60     iD = iG-iC
61     jD = jG-jC
62     rD = SQRT(FLOAT(iD*iD+jD*jD))
63     IF ( rD .LT. rad ) theta(I,J,K,bi,bj) = 1. _d 0
64     ENDDO
65     ENDDO
66     ENDDO
67     ENDDO
68     ENDDO
69     C-- Initialise temperature field to the vertical reference profile
70     DO bj = myByLo(myThid), myByHi(myThid)
71     DO bi = myBxLo(myThid), myBxHi(myThid)
72     DO K=1,Nz
73     DO J=1,sNy
74     DO I=1,sNx
75     theta(I,J,K,bi,bj) = tRef(K)
76     ENDDO
77     ENDDO
78     ENDDO
79     ENDDO
80     ENDDO
81     C Set initial tendency terms
82     DO bj = myByLo(myThid), myByHi(myThid)
83     DO bi = myBxLo(myThid), myBxHi(myThid)
84     DO K=1,Nz
85     DO J=1,sNy
86     DO I=1,sNx
87     gt (I,J,K,bi,bj) = 0. _d 0
88     gtNM1(I,J,K,bi,bj) = 0. _d 0
89     ENDDO
90     ENDDO
91     ENDDO
92     ENDDO
93     ENDDO
94     C
95     _EXCH_XYZ_R8(theta , myThid )
96     _EXCH_XYZ_R8(gt , myThid )
97     _EXCH_XYZ_R8(gtNM1 , myThid )
98     RETURN
99     END

  ViewVC Help
Powered by ViewVC 1.1.22