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

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

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


Revision 1.1 - (hide annotations) (download)
Fri Mar 17 16:12:55 2006 UTC (18 years, 2 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint58e_post, checkpoint58h_post, checkpoint58j_post, checkpoint58f_post, checkpoint58d_post, checkpoint58c_post, checkpoint58i_post, checkpoint58g_post, checkpoint58k_post
New S/R "SET_PARMS" (pieces of code from INI_PARMS):
 set parameters that might depend on the use of some pkgs;
 called from INITIALISE_FIXED, after INI_PARMS & PACKAGES_READPARAMS
 NOTES: After leaving this S/R, parameters will not change anymore.

1 jmc 1.1 C $Header: $
2     C $Name: $
3    
4     c #include "PACKAGES_CONFIG.h"
5     #include "CPP_OPTIONS.h"
6    
7     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
8     CBOP
9     C !ROUTINE: SET_PARMS
10     C !INTERFACE:
11     SUBROUTINE SET_PARMS( myThid )
12    
13     C !DESCRIPTION:
14     C Set model "parameters" that might depend on the use of some pkgs;
15     C called from INITIALISE_FIXED, after INI_PARMS & PACKAGES_READPARAMS
16     C NOTES: After leaving this S/R, parameters will not change anymore.
17    
18     C !USES:
19     IMPLICIT NONE
20     #include "SIZE.h"
21     #include "EEPARAMS.h"
22     #include "PARAMS.h"
23    
24     C !INPUT/OUTPUT PARAMETERS:
25     C myThid - Number of this instance of SET_PARMS
26     INTEGER myThid
27    
28     C !LOCAL VARIABLES:
29     CHARACTER*(MAX_LEN_MBUF) msgBuf
30     c INTEGER IL, iUnit
31     c INTEGER ILNBLNK
32     c EXTERNAL ILNBLNK
33    
34     CEOP
35    
36     _BEGIN_MASTER(myThid)
37    
38     IF ( useOffLine ) THEN
39     WRITE(msgBuf,'(A,A)') 'S/R SET_PARMS: ',
40     & ' Off-Line => turn off Temp,Salt & Mom_Stepping flags'
41     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
42     & SQUEEZE_RIGHT , 1)
43     tempStepping = .FALSE.
44     saltStepping = .FALSE.
45     momStepping = .FALSE.
46     ENDIF
47    
48     C-- Set (or reset) On/Off flags :
49    
50     C-- On/Off flags for each terms of the momentum equation
51     nonHydrostatic = momStepping .AND. nonHydrostatic
52     quasiHydrostatic = momStepping .AND. quasiHydrostatic
53     momAdvection = momStepping .AND. momAdvection
54     momViscosity = momStepping .AND. momViscosity
55     momForcing = momStepping .AND. momForcing
56     useCoriolis = momStepping .AND. useCoriolis
57     useCDscheme = momStepping .AND. useCDscheme
58     momPressureForcing= momStepping .AND. momPressureForcing
59     implicitIntGravWave=momPressureForcing .AND. implicitIntGravWave
60     momImplVertAdv = momAdvection .AND. momImplVertAdv
61     implicitViscosity= momViscosity .AND. implicitViscosity
62     use3Dsolver = nonHydrostatic.OR. implicitIntGravWave
63     C-- Momentum viscosity on/off flag.
64     IF ( momViscosity ) THEN
65     vfFacMom = 1.D0
66     ELSE
67     vfFacMom = 0.D0
68     ENDIF
69     C-- Momentum advection on/off flag.
70     IF ( momAdvection ) THEN
71     afFacMom = 1.D0
72     ELSE
73     afFacMom = 0.D0
74     ENDIF
75     C-- Momentum forcing on/off flag.
76     IF ( momForcing ) THEN
77     foFacMom = 1.D0
78     ELSE
79     foFacMom = 0.D0
80     ENDIF
81     C-- Coriolis term on/off flag.
82     IF ( useCoriolis ) THEN
83     cfFacMom = 1.D0
84     ELSE
85     cfFacMom = 0.D0
86     ENDIF
87     C-- Pressure term on/off flag.
88     IF ( momPressureForcing ) THEN
89     pfFacMom = 1.D0
90     ELSE
91     pfFacMom = 0.D0
92     ENDIF
93     C-- Metric terms on/off flag.
94     IF ( metricTerms ) THEN
95     mTFacMom = 1.D0
96     ELSE
97     mTFacMom = 0.D0
98     ENDIF
99    
100     C-- Advection and Forcing for Temp and salt on/off flags
101     tempAdvection = tempStepping .AND. tempAdvection
102     tempForcing = tempStepping .AND. tempForcing
103     saltAdvection = saltStepping .AND. saltAdvection
104     saltForcing = saltStepping .AND. saltForcing
105     tempImplVertAdv = tempAdvection .AND. tempImplVertAdv
106     saltImplVertAdv = saltAdvection .AND. saltImplVertAdv
107    
108     C-- When using the dynamical pressure in EOS (with Z-coord.),
109     C needs to activate specific part of the code (restart & exchange)
110     c useDynP_inEos_Zc = .FALSE.
111     useDynP_inEos_Zc = ( fluidIsWater .AND. usingZCoords
112     & .AND. ( eosType .EQ. 'JMD95P' .OR.
113     & eosType .EQ. 'UNESCO' .OR.
114     & eosType .EQ. 'MDJWF' ) )
115    
116     C-- After this point, main model parameters are not supposed to be modified.
117     WRITE(msgBuf,'(A,A)') 'SET_PARMS: done'
118     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
119     & SQUEEZE_RIGHT , 1)
120    
121     _END_MASTER(myThid)
122    
123     C-- Everyone else must wait for the parameters to be set
124     _BARRIER
125    
126     RETURN
127     END

  ViewVC Help
Powered by ViewVC 1.1.22