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

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

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


Revision 1.12 - (show annotations) (download)
Sun Feb 4 14:38:47 2001 UTC (23 years, 4 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint38, c37_adj, checkpoint39, checkpoint37, checkpoint36, checkpoint35
Branch point for: pre38
Changes since 1.11: +2 -1 lines
Made sure each .F and .h file had
the CVS keywords Header and Name at its start.
Most had header but very few currently have Name, so
lots of changes!

1 C $Header: /u/gcmpack/models/MITgcmUV/model/src/ini_salt.F,v 1.11 2000/03/27 22:25:44 adcroft Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 CStartOfInterface
7 SUBROUTINE INI_SALT ( myThid )
8 C /==========================================================\
9 C | SUBROUTINE INI_SALT |
10 C | o Set model initial salinity field. |
11 C |==========================================================|
12 C | There are several options for setting the initial |
13 C | temperature file |
14 C | 1. Inline code |
15 C | 2. Vertical profile ( uniform S in X and Y ) |
16 C | 3. Three-dimensional data from a file. For example from |
17 C | Levitus or from a checkpoint file from a previous |
18 C | integration. |
19 C | In addition to setting the salinity field we also |
20 C | set the initial salinity tendency term here. |
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 #include "DYNVARS.h"
30
31 C == Routine arguments ==
32 C myThid - Number of this instance of INI_SALT
33 INTEGER myThid
34 CEndOfInterface
35
36 C == Local variables ==
37 C bi,bj - Loop counters
38 C I,J,K
39 INTEGER bi, bj
40 INTEGER I, J, K
41
42 _BARRIER
43
44 IF ( hydrogSaltFile .EQ. ' ' ) THEN
45 C-- Initialise salinity field to the vertical reference profile
46 DO bj = myByLo(myThid), myByHi(myThid)
47 DO bi = myBxLo(myThid), myBxHi(myThid)
48 DO K=1,Nr
49 DO J=1,sNy
50 DO I=1,sNx
51 salt(I,J,K,bi,bj) = sRef(K)
52 ENDDO
53 ENDDO
54 ENDDO
55 ENDDO
56 ENDDO
57 ELSE
58 _BEGIN_MASTER( myThid )
59 CALL READ_FLD_XYZ_RL( hydrogSaltFile, ' ', salt, 0, myThid )
60 _END_MASTER(myThid)
61 ENDIF
62 C Set initial tendency terms
63 DO bj = myByLo(myThid), myByHi(myThid)
64 DO bi = myBxLo(myThid), myBxHi(myThid)
65 DO K=1,Nr
66 DO J=1,sNy
67 DO I=1,sNx
68 gs (I,J,K,bi,bj) = 0. _d 0
69 gsNM1(I,J,K,bi,bj) = 0. _d 0
70 IF (hFacC(I,J,K,bi,bj).EQ.0) salt(I,J,K,bi,bj) = 0.
71 ENDDO
72 ENDDO
73 ENDDO
74 ENDDO
75 ENDDO
76 C
77 _EXCH_XYZ_R8(salt , myThid )
78 _EXCH_XYZ_R8(gs , myThid )
79 _EXCH_XYZ_R8(gsNM1 , myThid )
80
81 CALL PLOT_FIELD_XYZRL( salt, 'Initial Salinity' , Nr, 1, myThid )
82
83 RETURN
84 END

  ViewVC Help
Powered by ViewVC 1.1.22