/[MITgcm]/MITgcm/pkg/icefront/icefront_readparms.F
ViewVC logotype

Contents of /MITgcm/pkg/icefront/icefront_readparms.F

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


Revision 1.17 - (show annotations) (download)
Wed Aug 9 15:23:37 2017 UTC (6 years, 9 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, HEAD
Changes since 1.16: +6 -2 lines
replace CLOSE(nmlfileUnit) with CLOSE(nmlfileUnit,STATUS='DELETE') to remove
scratchfiles after closing, except for SINGLE_DISK_IO, when everything
stays the same

1 C $Header: /u/gcmpack/MITgcm/pkg/icefront/icefront_readparms.F,v 1.16 2017/02/07 00:18:59 jmc Exp $
2 C $Name: BASE $
3
4 #include "ICEFRONT_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: ICEFRONT_READPARMS
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE ICEFRONT_READPARMS( myThid )
11
12 C !DESCRIPTION:
13 C Initialize ICEFRONT parameters, read in data.icefront
14
15 C !USES: ===============================================================
16 IMPLICIT NONE
17 #include "SIZE.h"
18 #include "EEPARAMS.h"
19 #include "ICEFRONT.h"
20 #include "PARAMS.h"
21 #ifdef ALLOW_SHELFICE
22 # include "SHELFICE.h"
23 #endif
24
25 C !INPUT PARAMETERS: ===================================================
26 C myThid :: my thread Id number
27 INTEGER myThid
28
29 C !OUTPUT PARAMETERS: ==================================================
30 C none
31
32 #ifdef ALLOW_ICEFRONT
33
34 C !LOCAL VARIABLES: ====================================================
35 C iUnit :: unit number for I/O
36 C msgBuf :: message buffer
37 INTEGER iUnit
38 CHARACTER*(MAX_LEN_MBUF) msgBuf
39 CEOP
40
41 NAMELIST /ICEFRONT_PARM01/
42 & rhoIcefront, ICEFRONTkappa,
43 & ICEFRONTlatentHeat, ICEFRONTHeatCapacity_Cp,
44 & ICEFRONTthetaSurface,
45 & applyIcefrontTendT,applyIcefrontTendS,
46 & ICEFRONTdepthFile, ICEFRONTlengthFile
47
48 #ifdef ALLOW_EXF
49 NAMELIST /ICEFRONT_EXF_PARM02/
50 & SGRunOffFile, SGRunOffperiod, SGRunOffStartTime,
51 & SGRunOffstartdate1, SGRunOffstartdate2,
52 & SGRunOffconst, SGRunOff_inscal,
53 & SGRunOff_remov_intercept, SGRunOff_remov_slope
54 #endif /* ALLOW_EXF */
55
56 IF ( .NOT.useICEFRONT ) THEN
57 C- pkg ICEFRONT is not used
58 _BEGIN_MASTER(myThid)
59 C- Track pkg activation status:
60 ICEFRONTisON = .FALSE.
61 C print a (weak) warning if data.icefront is found
62 CALL PACKAGES_UNUSED_MSG( 'useICEFRONT', ' ', ' ' )
63 _END_MASTER(myThid)
64 RETURN
65 ENDIF
66
67 _BEGIN_MASTER(myThid)
68
69 C This routine has been called by the main model so we set our
70 C internal flag to indicate we are in business
71 ICEFRONTisON = .TRUE.
72
73 C Set defaults values for parameters in ICEFRONT.h
74 #ifdef ALLOW_SHELFICE
75 IF (useShelfice) THEN
76 C Use the same values as in SHELFICE
77 ICEFRONTlatentHeat = SHELFICElatentHeat
78 ICEFRONTHeatCapacity_Cp = SHELFICEHeatCapacity_Cp
79 rhoIcefront = rhoShelfice
80 ICEFRONTkappa = SHELFICEkappa
81 ICEFRONTthetaSurface = SHELFICEthetaSurface
82 ELSE
83 #else /* ifndef ALLOW_SHELFICE */
84 IF (.TRUE.) THEN
85 #endif /* ALLOW_SHELFICE */
86 C Default values when SHELFICE is not used
87 ICEFRONTlatentHeat = 334.0 _d 3
88 ICEFRONTHeatCapacity_Cp = 2000.0 _d 0
89 rhoIcefront = 917.0 _d 0
90 ICEFRONTkappa = 1.54 _d -06
91 ICEFRONTthetaSurface = - 20.0 _d 0
92 ENDIF
93
94 recip_ICEFRONTlatentHeat = 0.0 _d 0
95 ICEFRONTlengthFile = ' '
96 ICEFRONTdepthFile = ' '
97 applyIcefrontTendS = .TRUE.
98 applyIcefrontTendT = .TRUE.
99
100 #ifdef ALLOW_EXF
101 SGRunOffstartdate1 = 0
102 SGRunOffstartdate2 = 0
103 SGRunOffStartTime = UNSET_RL
104 SGRunOffperiod = 0.0 _d 0
105 SGRunOffconst = 0.0 _d 0
106 SGRunOff_remov_intercept = 0.0 _d 0
107 SGRunOff_remov_slope = 0.0 _d 0
108 SGRunOff_inscal = 1.0 _d 0
109 SGRunOffFile = ' '
110 C- internal parameters (not in namelist):
111 SGRunOffmask = 'c'
112 #endif /* ALLOW_EXF */
113
114 C Open and read the data.icefront file
115 WRITE(msgBuf,'(A)') ' ICEFRONT_READPARMS: opening data.icefront'
116 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
117 & SQUEEZE_RIGHT, myThid )
118 CALL OPEN_COPY_DATA_FILE(
119 I 'data.icefront', 'ICEFRONT_READPARMS',
120 O iUnit,
121 I myThid )
122
123 WRITE(msgBuf,'(A)') ' ICEFRONT_READPARMS: reading ICEFRONT_PARM01'
124 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
125 & SQUEEZE_RIGHT, myThid )
126 READ(UNIT=iUnit,NML=ICEFRONT_PARM01)
127
128 #ifdef ALLOW_EXF
129 IF ( useEXF ) THEN
130 WRITE(msgBuf,'(A)')
131 & ' ICEFRONT_READPARMS: reading ICEFRONT_EXF_PARM02'
132 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
133 & SQUEEZE_RIGHT, myThid )
134 READ( UNIT=iUnit, NML=ICEFRONT_EXF_PARM02 )
135 ENDIF
136 #endif /* ALLOW_EXF */
137
138 WRITE(msgBuf,'(A)')
139 & ' ICEFRONT_READPARMS: finished reading data.icefront'
140 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
141 & SQUEEZE_RIGHT, myThid )
142
143 C Close the open data file
144 #ifdef SINGLE_DISK_IO
145 CLOSE(iUnit)
146 #else
147 CLOSE(iUnit,STATUS='DELETE')
148 #endif /* SINGLE_DISK_IO */
149
150 C Now set-up any remaining parameters that result from the input parameters
151 IF ( ICEFRONTlatentHeat .NE. 0. _d 0 )
152 & recip_ICEFRONTlatentHeat = 1. _d 0/ICEFRONTlatentHeat
153
154 _END_MASTER(myThid)
155 C Everyone else must wait for the parameters to be loaded
156 _BARRIER
157
158 #endif /* ALLOW_ICEFRONT */
159
160 RETURN
161 END

  ViewVC Help
Powered by ViewVC 1.1.22