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

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

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


Revision 1.9 - (hide annotations) (download)
Wed Dec 9 16:11:52 1998 UTC (25 years, 9 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint19, checkpoint20, checkpoint21
Changes since 1.8: +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.9 C $Header: /u/gcmpack/models/MITgcmUV/model/src/ini_salt.F,v 1.8 1998/12/08 18:04:51 adcroft Exp $
2 cnh 1.1
3 cnh 1.7 #include "CPP_OPTIONS.h"
4 cnh 1.1
5     CStartOfInterface
6     SUBROUTINE INI_SALT ( myThid )
7     C /==========================================================\
8     C | SUBROUTINE INI_SALT |
9     C | o Set model initial salinity 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 S 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 salinity field we also |
19     C | set the initial salinity tendency term here. |
20     C \==========================================================/
21 adcroft 1.9 IMPLICIT NONE
22 cnh 1.1
23     C === Global variables ===
24     #include "SIZE.h"
25     #include "EEPARAMS.h"
26     #include "PARAMS.h"
27     #include "GRID.h"
28     #include "DYNVARS.h"
29    
30     C == Routine arguments ==
31     C myThid - Number of this instance of INI_SALT
32     INTEGER myThid
33     CEndOfInterface
34    
35     C == Local variables ==
36     C iC, jC - Center of domain
37     C iD, jD - Disitance from domain center.
38     C rad - Radius of initial patch
39     C rD - Radial displacement of point I,J
40     C iG, jG - Global coordinate index
41     C bi,bj - Loop counters
42     C I,J,K
43     INTEGER iC, jC, iD, jD
44     INTEGER iG, jG
45     INTEGER bi, bj
46     INTEGER I, J, K
47     REAL rad, rD
48    
49 cnh 1.3 _BARRIER
50    
51     IF ( hydrogSaltFile .EQ. ' ' ) THEN
52     C-- Initialise salinity field to the vertical reference profile
53     DO bj = myByLo(myThid), myByHi(myThid)
54     DO bi = myBxLo(myThid), myBxHi(myThid)
55 cnh 1.6 DO K=1,Nr
56 cnh 1.3 DO J=1,sNy
57     DO I=1,sNx
58     salt(I,J,K,bi,bj) = sRef(K)
59     ENDDO
60 cnh 1.1 ENDDO
61     ENDDO
62     ENDDO
63     ENDDO
64 cnh 1.3 ELSE
65     _BEGIN_MASTER( myThid )
66 cnh 1.4 CALL READ_FLD_XYZ_RL( hydrogSaltFile, ' ', salt, 0, myThid )
67 cnh 1.3 _END_MASTER(myThid)
68     ENDIF
69 cnh 1.1 C Set initial tendency terms
70     DO bj = myByLo(myThid), myByHi(myThid)
71     DO bi = myBxLo(myThid), myBxHi(myThid)
72 cnh 1.6 DO K=1,Nr
73 cnh 1.1 DO J=1,sNy
74     DO I=1,sNx
75     gs (I,J,K,bi,bj) = 0. _d 0
76     gsNM1(I,J,K,bi,bj) = 0. _d 0
77 adcroft 1.8 IF (hFacC(I,J,K,bi,bj).EQ.0) salt(I,J,K,bi,bj) = 0.
78 cnh 1.1 ENDDO
79     ENDDO
80     ENDDO
81     ENDDO
82     ENDDO
83     C
84     _EXCH_XYZ_R8(salt , myThid )
85     _EXCH_XYZ_R8(gs , myThid )
86     _EXCH_XYZ_R8(gsNM1 , myThid )
87 cnh 1.5
88 cnh 1.6 CALL PLOT_FIELD_XYZRL( salt, 'Initial Salinity' , Nr, 1, myThid )
89 cnh 1.5
90 cnh 1.1 RETURN
91     END

  ViewVC Help
Powered by ViewVC 1.1.22