/[MITgcm]/MITgcm_contrib/verification_other/shelfice_remeshing/code/shelfice_readparms.F
ViewVC logotype

Annotation of /MITgcm_contrib/verification_other/shelfice_remeshing/code/shelfice_readparms.F

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


Revision 1.6 - (hide annotations) (download)
Thu May 5 18:16:04 2016 UTC (9 years, 2 months ago) by dgoldberg
Branch: MAIN
CVS Tags: checkpoint65x, checkpoint65w
Changes since 1.5: +6 -5 lines
renaming files, merged  shelfice_thermodynamics, added CPP directives

1 dgoldberg 1.6 C $Header: /u/gcmpack/MITgcm_contrib/verification_other/shelfice_remeshing/code/shelfice_readparms.F,v 1.5 2016/04/04 12:53:15 dgoldberg Exp $
2 dgoldberg 1.1 C $Name: $
3    
4     #include "SHELFICE_OPTIONS.h"
5    
6     CBOP
7     C !ROUTINE: SHELFICE_READPARMS
8    
9     C !INTERFACE: ==========================================================
10     SUBROUTINE SHELFICE_READPARMS( myThid )
11    
12     C !DESCRIPTION:
13     C Initialize SHELFICE parameters, read in data.shelfice
14    
15     C !USES: ===============================================================
16     IMPLICIT NONE
17     #include "SIZE.h"
18     #include "EEPARAMS.h"
19     #include "PARAMS.h"
20     #include "SHELFICE.h"
21     #ifdef ALLOW_COST
22     # include "SHELFICE_COST.h"
23     #endif /* ALLOW_COST */
24     #ifdef ALLOW_MNC
25     # include "MNC_PARAMS.h"
26     #endif
27    
28     C !INPUT PARAMETERS: ===================================================
29     C myThid :: thread number
30     INTEGER myThid
31    
32     C !OUTPUT PARAMETERS: ==================================================
33     C none
34    
35     #ifdef ALLOW_SHELFICE
36    
37     C !LOCAL VARIABLES: ====================================================
38     C iUnit :: unit number for I/O
39     C msgBuf :: message buffer
40     INTEGER iUnit
41     CHARACTER*(MAX_LEN_MBUF) msgBuf
42     CEOP
43    
44     NAMELIST /SHELFICE_PARM01/
45     & SHELFICEheatTransCoeff,
46     & SHELFICEsaltTransCoeff,
47     & SHELFICEMassStepping,
48     & rhoShelfice, SHELFICEkappa,
49     & SHELFICElatentHeat, SHELFICEHeatCapacity_Cp,
50     & SHELFICEDragLinear, SHELFICEDragQuadratic,
51     & SHELFICEthetaSurface,
52     & useISOMIPTD, no_slip_shelfice,
53     & SHELFICEconserve, SHELFICEboundaryLayer,
54     & SHELFICErealFWflux,
55     & SHELFICEwriteState,
56     & SHELFICE_dumpFreq,
57     & SHELFICE_taveFreq,
58     & SHELFICE_tave_mnc,
59     & SHELFICE_dump_mnc,
60 dgoldberg 1.4 & SHELFICEtopoFile,
61 dgoldberg 1.1 & SHELFICEmassFile, SHELFICEloadAnomalyFile,
62 dgoldberg 1.4 & SHELFICEMassDynTendFile,
63 dgoldberg 1.1 & SHELFICEDynMassOnly,
64     & SHELFICEadvDiffHeatFlux,
65     & SHELFICEuseGammaFrict,
66     & SHELFICERemeshFrequency,
67     & SHELFICESplitThreshold,
68     & SHELFICEMergeThreshold,
69     & shiCdrag, shiZetaN, shiRc,
70 dgoldberg 1.3 & shiPrandtl, shiSchmidt, shiKinVisc,
71     & shelficeEtaSponge, ShelficeEtaRelax,
72 dgoldberg 1.5 & shelfice_etarestore_spongewidth,
73 dgoldberg 1.6 & SHELFICE_dig_ice,
74     C KS16 add conserve_ssh
75     & conserve_ssh
76 dgoldberg 1.1 #ifdef ALLOW_COST
77     & , mult_shelfice
78     & , mult_shifwflx, wshifwflx0, shifwflx_errfile
79     #endif
80    
81     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
82    
83     IF ( .NOT.useShelfIce ) THEN
84     C- pkg SHELFICE is not used
85     _BEGIN_MASTER(myThid)
86     C- Track pkg activation status:
87     SHELFICEisOn = .FALSE.
88     C print a (weak) warning if data.shelfice is found
89     CALL PACKAGES_UNUSED_MSG( 'useShelfIce', ' ', ' ' )
90     _END_MASTER(myThid)
91     RETURN
92     ENDIF
93    
94     _BEGIN_MASTER(myThid)
95    
96     C This routine has been called by the main model so we set our
97     C internal flag to indicate we are in business
98     SHELFICEisOn = .TRUE.
99    
100     C Set defaults values for parameters in SHELFICE.h
101     useISOMIPTD = .FALSE.
102     SHELFICEconserve = .FALSE.
103     SHELFICEboundaryLayer = .FALSE.
104     SHELFICErealFWflux = .FALSE.
105     SHELFICEMassStepping = .FALSE.
106     SHELFICEDynMassOnly = .FALSE.
107     SHELFICEtopoFile = ' '
108     SHELFICEmassFile = ' '
109     SHELFICEloadAnomalyFile = ' '
110     SHELFICEMassDynTendFile = ' '
111     SHELFICElatentHeat = 334.0 _d 3
112     SHELFICEHeatCapacity_Cp = 2000.0 _d 0
113     rhoShelfIce = 917.0 _d 0
114     SHELFICEheatTransCoeff = 1.0 _d -04
115     SHELFICEsaltTransCoeff = UNSET_RL
116     SHELFICEkappa = 1.54 _d -06
117     SHELFICEthetaSurface = - 20.0 _d 0
118     no_slip_shelfice = no_slip_bottom
119     SHELFICEDragLinear = bottomDragLinear
120     SHELFICEDragQuadratic = UNSET_RL
121     SHELFICEselectDragQuadr = -1
122     SHELFICEwriteState = .FALSE.
123     SHELFICE_dumpFreq = dumpFreq
124     SHELFICE_taveFreq = taveFreq
125     SHELFICEadvDiffHeatFlux = .FALSE.
126     SHELFICEuseGammaFrict = .FALSE.
127     SHELFICERemeshFrequency = 2592000.
128     SHELFICESplitThreshold = 5
129     SHELFICEMergeThreshold = -8
130 dgoldberg 1.3 shelficeEtaRelax = 0.
131     shelfice_etarestore_spongewidth = 0
132     shelficeEtaSponge = .false.
133 dgoldberg 1.5 SHELFICE_dig_ice = .true.
134 dgoldberg 1.6 C KS16 initiliase conserve_ssh
135     conserve_ssh = .false.
136 dgoldberg 1.1 C these params. are default of Holland and Jenkins (1999)
137     shiCdrag = 0.0015 _d 0
138     shiZetaN = 0.052 _d 0
139     shiRc = 0.2 _d 0
140     shiPrandtl = 13.8 _d 0
141     shiSchmidt = 2432.0 _d 0
142     shiKinVisc = 1.95 _d -6
143     #ifdef ALLOW_COST
144     mult_shelfice = 0. _d 0
145     mult_shifwflx = 0. _d 0
146     wshifwflx0 = 0. _d 0
147     shifwflx_errfile = ' '
148     #endif
149     #ifdef ALLOW_MNC
150     SHELFICE_tave_mnc = timeave_mnc
151     SHELFICE_dump_mnc = snapshot_mnc
152     #else
153     SHELFICE_tave_mnc = .FALSE.
154     SHELFICE_dump_mnc = .FALSE.
155     #endif
156    
157     C Open and read the data.shelfice file
158     WRITE(msgBuf,'(A)') ' SHELFICE_READPARMS: opening data.shelfice'
159     CALL PRINT_MESSAGE(msgBuf, standardMessageUnit,
160     & SQUEEZE_RIGHT, myThid )
161     CALL OPEN_COPY_DATA_FILE(
162     I 'data.shelfice', 'SHELFICE_READPARMS',
163     O iUnit,
164     I myThid )
165     READ(UNIT=iUnit,NML=SHELFICE_PARM01)
166     WRITE(msgBuf,'(A)')
167     & ' SHELFICE_READPARMS: finished reading data.shelfice'
168     CALL PRINT_MESSAGE(msgBuf, standardMessageUnit,
169     & SQUEEZE_RIGHT, myThid )
170    
171     C Close the open data file
172     CLOSE(iUnit)
173    
174     C Now set-up any remaining parameters that result from the input parameters
175     IF ( SHELFICEsaltTransCoeff .EQ. UNSET_RL )
176     & SHELFICEsaltTransCoeff =
177     & 5.05 _d -3 *SHELFICEheatTransCoeff
178    
179     C Set quadratic bottom drag depending on choices:
180     IF ( SHELFICEDragQuadratic .EQ. UNSET_RL) THEN
181     IF ( SHELFICEuseGammaFrict ) THEN
182     SHELFICEDragQuadratic = shiCdrag
183     ELSE
184     SHELFICEDragQuadratic = bottomDragQuadratic
185     ENDIF
186     ENDIF
187     IF ( SHELFICEDragQuadratic.EQ.0. _d 0 ) THEN
188     SHELFICEselectDragQuadr = -1
189     ELSEIF ( SHELFICEselectDragQuadr.EQ.-1 ) THEN
190     SHELFICEselectDragQuadr = MAX( 0, selectBotDragQuadr )
191     ENDIF
192    
193     C- Set Output type flags :
194     SHELFICE_tave_mdsio = .TRUE.
195     SHELFICE_dump_mdsio = .TRUE.
196     #ifdef ALLOW_MNC
197     IF (useMNC) THEN
198     IF ( .NOT.outputTypesInclusive
199     & .AND. SHELFICE_tave_mnc ) SHELFICE_tave_mdsio = .FALSE.
200     IF ( .NOT.outputTypesInclusive
201     & .AND. SHELFICE_dump_mnc ) SHELFICE_dump_mdsio = .FALSE.
202     ENDIF
203     #endif
204    
205     _END_MASTER(myThid)
206     C Everyone else must wait for the parameters to be loaded
207     _BARRIER
208    
209     #endif /* ALLOW_SHELFICE */
210    
211     RETURN
212     END

  ViewVC Help
Powered by ViewVC 1.1.22