/[MITgcm]/MITgcm/pkg/bulk_force/bulkf_readparms.F
ViewVC logotype

Contents of /MITgcm/pkg/bulk_force/bulkf_readparms.F

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


Revision 1.6 - (show annotations) (download)
Thu May 25 17:30:53 2006 UTC (17 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62c, checkpoint59, checkpoint58f_post, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint58y_post, checkpoint58t_post, checkpoint58m_post, checkpoint64, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint58w_post, checkpoint58o_post, checkpoint58p_post, checkpoint58q_post, mitgcm_mapl_00, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint58r_post, checkpoint58n_post, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint58k_post, checkpoint62b, checkpoint58v_post, checkpoint64x, checkpoint58l_post, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint61f, checkpoint58g_post, checkpoint58x_post, checkpoint61n, checkpoint58h_post, checkpoint58j_post, checkpoint61q, checkpoint61z, checkpoint61e, checkpoint58i_post, checkpoint58u_post, checkpoint58s_post, checkpoint61g, checkpoint61d, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61x, checkpoint61y
Changes since 1.5: +69 -47 lines
cleaning up: add comments, remove unused variables, add some parameters
 to read from data.blk

1 C $Header: /u/gcmpack/MITgcm/pkg/bulk_force/bulkf_readparms.F,v 1.5 2006/03/14 15:57:31 jmc Exp $
2 C $Name: $
3
4 #include "BULK_FORCE_OPTIONS.h"
5
6 SUBROUTINE BULKF_READPARMS( myThid )
7 C /==========================================================\
8 C | SUBROUTINE BULKF_READPARMS |
9 C | o Routine to initialize BULKF variables and constants. |
10 C |==========================================================|
11 C | Initialize BULKF parameters, read in data.blk |
12 C \==========================================================/
13 IMPLICIT NONE
14
15 C === Global variables ===
16 #include "SIZE.h"
17 #include "EEPARAMS.h"
18 #include "PARAMS.h"
19 #include "BULKF_PARAMS.h"
20 #include "BULKF.h"
21 #ifdef CONSERV_BULKF
22 #include "BULKF_CONSERV.h"
23 #endif
24
25 C === Routine arguments ===
26 INTEGER myThid
27
28 #ifdef ALLOW_BULK_FORCE
29 C === Local variables ===
30 C msgBuf - Informational/error meesage buffer
31 C iUnit - Work variable for IO unit number
32 CHARACTER*(MAX_LEN_MBUF) msgBuf
33 INTEGER iUnit
34
35 C-- Bulk Formula parameter
36 NAMELIST /BULKF_CONST/
37 & rhoA, rhoFW,
38 & cpAir, Lvap, Lfresh,
39 & Tf0kel, Rgas, xkar, stefan,
40 & zref, zwd, zth,
41 & cDrag_1, cDrag_2, cDrag_3,
42 & cStantonS, cStantonU, cDalton,
43 & umin, humid_fac, saltQsFac, gamma_blk,
44 & atm_emissivity, ocean_emissivity,
45 & snow_emissivity, ice_emissivity,
46 #ifdef ALLOW_FORMULA_AIM
47 & FWIND0, CHS, VGUST, DTHETA, dTstab, FSTAB,
48 #endif
49 & ocean_albedo
50
51 NAMELIST /BULKF_PARM01/
52 & useFluxFormula_AIM, blk_nIter, calcWindStress,
53 & blk_taveFreq,
54 & AirTempFile, AirHumidityFile, RainFile,
55 & SolarFile, LongwaveFile, UWindFile,
56 & VWindFile, RunoffFile, WSpeedFile, QnetFile,
57 & EmPFile, CloudFile, airPotTempFile
58
59 #ifdef CONSERV_BULKF
60 c- conserving qnet, empmr
61 NAMELIST /BULKF_PARM02/
62 & qnet_off, empmr_off, conservcycle
63 #endif
64
65
66 _BEGIN_MASTER(myThid)
67
68 CALL OPEN_COPY_DATA_FILE(
69 I 'data.blk', 'BULKF_READPARMS',
70 O iUnit,
71 I myThid )
72
73 C-- Default values
74 C- Physical constant :
75 c slp0 = atm_Po / 100. ! reference sea-level atmospheric pressure [mb]
76 rhoA = 1.3 _d 0
77 rhoFW = rhoConstFresh
78 cpAir = atm_Cp
79 c cpwv = 1.81 _d 3
80 Lvap = 2.5 _d 6
81 Lfresh = 3.34 _d 5
82 c Lvap_ice = 2.83 _d 6
83 Tf0kel = celsius2K
84 Rgas = atm_Rd
85 c Rvap = 461. _d 0
86 xkar = 0.4 _d 0
87 stefan = 5.67 _d -8
88 zref = 10.0 _d 0
89 zwd = zref
90 zth = zref
91 cDrag_1 = 2.70 _d -3
92 cDrag_2 = 0.142 _d -3
93 cDrag_3 = 0.0764 _d -3
94 cStantonS = 18.0 _d -3
95 cStantonU = 32.7 _d -3
96 cDalton = 34.6 _d -3
97 umin = 1.0 _d 0
98 humid_fac = 0.606 _d 0
99 saltQsFac = 0.980 _d 0
100 gamma_blk = 0.010 _d 0
101 atm_emissivity = .90 _d 0
102 ocean_emissivity= .985 _d 0
103 snow_emissivity = .98 _d 0
104 ice_emissivity = .98 _d 0
105 ocean_albedo = .10 _d 0
106 #ifdef ALLOW_FORMULA_AIM
107 FWIND0 = 0.6 _d 0
108 CHS = 0.8 _d -3
109 VGUST = 5. _d 0
110 DTHETA = 3. _d 0
111 dTstab = 1. _d 0
112 FSTAB = 0.67 _d 0
113 #endif
114
115 C- bulk-forcing parameters:
116 useFluxFormula_AIM = .FALSE.
117 blk_nIter = 5
118 calcWindStress = zonalWindFile .EQ. ' '
119 & .AND. meridWindFile .EQ. ' '
120 blk_taveFreq = taveFreq
121
122 C- Input data files names :
123 AirTempFile=' '
124 AirHumidityFile=' '
125 RainFile=' '
126 SolarFile=' '
127 LongwaveFile=' '
128 UWindFile=' '
129 VWindFile=' '
130 WspeedFile=' '
131 RunoffFile=' '
132 QnetFile=' '
133 EmPFile=' '
134 CloudFile=' '
135 SnowFile=' '
136 airPotTempFile=' '
137
138 C-- Read parameters from open data file
139 WRITE(msgBuf,'(A)')' BULKF_READPARMS: starts to read BULKF_CONST'
140 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
141 & SQUEEZE_RIGHT , myThid)
142 READ(UNIT=iUnit,NML=BULKF_CONST)
143 WRITE(msgBuf,'(A)') ' BULKF_READPARMS: read BULKF_CONST : OK'
144 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
145 & SQUEEZE_RIGHT , myThid)
146
147 WRITE(msgBuf,'(A)')' BULKF_READPARMS: starts to read BULKF_PARM01'
148 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
149 & SQUEEZE_RIGHT , myThid)
150 READ(UNIT=iUnit,NML=BULKF_PARM01)
151 WRITE(msgBuf,'(A)') ' BULKF_READPARMS: read BULKF_PARM01 : OK'
152 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
153 & SQUEEZE_RIGHT , myThid)
154
155 #ifdef CONSERV_BULKF
156 c -- default
157 qnet_off=0.d0
158 empmr_off=0.d0
159 WRITE(msgBuf,'(A)')' BULKF_READPARMS: starts reading BULKF_PARM02'
160 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
161 & SQUEEZE_RIGHT , myThid)
162 READ(UNIT=iUnit,NML=BULKF_PARM02)
163 WRITE(msgBuf,'(A)') ' BULKF_READPARMS: read BULKF_PARM02 : OK'
164 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
165 & SQUEEZE_RIGHT , myThid)
166
167 #endif /* CONSERV_BULKF */
168
169 C-- Close the open data file
170 CLOSE(iUnit)
171
172 C- check that CPP option is "defined" when running-flag parameter is on:
173 #ifndef ALLOW_FORMULA_AIM
174 IF ( useFluxFormula_AIM ) THEN
175 WRITE(msgBuf,'(2A)') ' BULKF_READPARMS: ',
176 & 'useFluxFormula_AIM is TRUE and #undef ALLOW_FORMULA_AIM'
177 CALL PRINT_ERROR( msgBuf , myThid)
178 WRITE(msgBuf,'(2A)') ' BULKF_READPARMS: => recompile with',
179 & ' #define ALLOW_FORMULA_AIM in BULK_FORCE_OPTIONS.h'
180 CALL PRINT_ERROR( msgBuf , myThid)
181 STOP 'ABNORMAL END: S/R CONFIG_CHECK'
182 ENDIF
183 #endif
184
185 C- Define other constants (from previous ones):
186 c Qcoef = 6.11 _d 0 * 0.622 _d 0 / p0
187 c Sha = Rgas / .286 _d 0
188
189 useQnetch = QnetFile .NE. ' '
190 useEmPch = EmPFile .NE. ' '
191
192 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
193 iUnit = standardMessageUnit
194 c iUnit=88
195 c OPEN(iUnit,file='bulkf_check_params',status='unknown')
196 c WRITE(iUnit,*) 'BlkF: slp0 =',slp0
197 WRITE(iUnit,*) 'BlkF: rhoA =',rhoA
198 WRITE(iUnit,*) 'BlkF: rhoFW =',rhoFW
199 WRITE(iUnit,*) 'BlkF: cpAir =',cpAir
200 c WRITE(iUnit,*) 'BlkF: cpwv =',cpwv
201 WRITE(iUnit,*) 'BlkF: Lvap =',Lvap
202 WRITE(iUnit,*) 'BlkF: Lfresh =',Lfresh
203 c WRITE(iUnit,*) 'BlkF: Lvap_ice =',Lvap_ice
204 c WRITE(iUnit,*) 'BlkF: Sha =',Sha
205 WRITE(iUnit,*) 'BlkF: Tf0kel =',Tf0kel
206 WRITE(iUnit,*) 'BlkF: Rgas =',Rgas
207 c WRITE(iUnit,*) 'BlkF: Rvap =',Rvap
208 WRITE(iUnit,*) 'BlkF: xkar =',xkar
209 WRITE(iUnit,*) 'BlkF: stefan =',stefan
210 WRITE(iUnit,*) 'BlkF: zref =',zref
211 WRITE(iUnit,*) 'BlkF: zwd =',zwd
212 WRITE(iUnit,*) 'BlkF: zth =',zth
213 WRITE(iUnit,*) 'BlkF: cDrag_1 =',cDrag_1
214 WRITE(iUnit,*) 'BlkF: cDrag_2 =',cDrag_2
215 WRITE(iUnit,*) 'BlkF: cDrag_3 =',cDrag_3
216 WRITE(iUnit,*) 'BlkF: cStantonS=',cStantonS
217 WRITE(iUnit,*) 'BlkF: cStantonU=',cStantonU
218 WRITE(iUnit,*) 'BlkF: cDalton =',cDalton
219 WRITE(iUnit,*) 'BlkF: umin =',umin
220 WRITE(iUnit,*) 'BlkF: humid_fac=',humid_fac
221 WRITE(iUnit,*) 'BlkF: saltQsFac=',saltQsFac
222 WRITE(iUnit,*) 'BlkF: gamma_blk=',gamma_blk
223 WRITE(iUnit,*) 'BlkF: atm_emissivity =',atm_emissivity
224 WRITE(iUnit,*) 'BlkF: ocean_emissivity=',ocean_emissivity
225 WRITE(iUnit,*) 'BlkF: snow_emissivity =',snow_emissivity
226 WRITE(iUnit,*) 'BlkF: ice_emissivity =',ice_emissivity
227 WRITE(iUnit,*) 'BlkF: ocean_albedo =',ocean_albedo
228 #ifdef ALLOW_FORMULA_AIM
229 WRITE(iUnit,*) 'BlkF: FWIND0 =', FWIND0
230 WRITE(iUnit,*) 'BlkF: CHS =', CHS
231 WRITE(iUnit,*) 'BlkF: VGUST =', VGUST
232 WRITE(iUnit,*) 'BlkF: DTHETA =', DTHETA
233 WRITE(iUnit,*) 'BlkF: dTstab =', dTstab
234 WRITE(iUnit,*) 'BlkF: FSTAB =', FSTAB
235 #endif
236 WRITE(iUnit,*) 'BlkF: useFluxFormula_AIM=',useFluxFormula_AIM
237 WRITE(iUnit,*) 'BlkF: calcWindStress =', calcWindStress
238 WRITE(iUnit,*) 'BlkF: useQnetch =', useQnetch
239 WRITE(iUnit,*) 'BlkF: useEmPch =', useEmPch
240 WRITE(iUnit,*) 'BlkF: blk_nIter =',blk_nIter
241 WRITE(iUnit,*) 'BlkF: blk_taveFreq=', blk_taveFreq
242 IF (iUnit.EQ.88) CLOSE(iUnit)
243 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
244
245 _END_MASTER(myThid)
246
247 C-- Everyone else must wait for the parameters to be loaded
248 _BARRIER
249
250 #endif /* ALLOW_BULK_FORCE */
251
252 RETURN
253 END

  ViewVC Help
Powered by ViewVC 1.1.22