/[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.3 - (show annotations) (download)
Sun Nov 23 01:36:55 2003 UTC (20 years, 5 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint57m_post, checkpoint52l_pre, hrcube4, hrcube5, checkpoint57g_pre, checkpoint57s_post, checkpoint57b_post, checkpoint52d_pre, checkpoint57g_post, checkpoint56b_post, checkpoint57y_post, checkpoint52j_pre, checkpoint54d_post, checkpoint54e_post, checkpoint57r_post, checkpoint57d_post, checkpoint57i_post, checkpoint52k_post, checkpoint58, checkpoint55, checkpoint54, checkpoint57, checkpoint56, checkpoint53, checkpoint52f_post, checkpoint57n_post, checkpoint57z_post, checkpoint54f_post, checkpoint55i_post, checkpoint57l_post, checkpoint52i_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint57t_post, checkpoint55c_post, checkpoint52e_pre, checkpoint57v_post, checkpoint57f_post, checkpoint52e_post, checkpoint53d_post, checkpoint57a_post, checkpoint57h_pre, checkpoint54b_post, checkpoint57h_post, checkpoint52m_post, checkpoint57y_pre, checkpoint55g_post, checkpoint52b_post, checkpoint52c_post, checkpoint57c_post, checkpoint52f_pre, checkpoint55d_post, checkpoint54a_pre, checkpoint53c_post, checkpoint55d_pre, checkpoint57c_pre, checkpoint55j_post, checkpoint54a_post, checkpoint55h_post, checkpoint57e_post, checkpoint55b_post, checkpoint53a_post, checkpoint55f_post, checkpoint52d_post, checkpoint53g_post, checkpoint57p_post, checkpint57u_post, checkpoint57q_post, eckpoint57e_pre, checkpoint52i_post, checkpoint52h_pre, checkpoint56a_post, checkpoint53f_post, checkpoint57h_done, checkpoint52j_post, checkpoint57j_post, checkpoint57f_pre, branch-netcdf, checkpoint52l_post, checkpoint52n_post, checkpoint53b_pre, checkpoint56c_post, checkpoint57a_pre, checkpoint55a_post, checkpoint57o_post, checkpoint57k_post, checkpoint53b_post, checkpoint57w_post, checkpoint57x_post, checkpoint53d_pre, checkpoint55e_post, checkpoint54c_post
Branch point for: netcdf-sm0
Changes since 1.2: +98 -21 lines
light cleaning to make it work with new thSIce pkg.

1 C $Header: $
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, cpwv,
39 & Lvap, Lfresh,
40 & Tf0kel,
41 & cdrag_1, cdrag_2, cdrag_3,
42 & stefan, xkar, Rvap,
43 & p0,
44 & humid_fac, saltsat, gamma_blk,
45 & Lvap_ice, Rgas,
46 & atm_emissivity, ocean_emissivity,
47 & snow_emissivity, ice_emissivity,
48 & blk_taveFreq
49
50 NAMELIST /BULKF_PARM01/
51 & AirTempFile, AirHumidityFile, RainFile,
52 & SolarFile, LongwaveFile, UWindFile,
53 & VWindFile, RunoffFile, WSpeedFile, QnetFile,
54 & EmPFile, CloudFile, readwindstress, readsurface
55
56 #ifdef CONSERV_BULKF
57 c- conserving qnet, empmr
58 NAMELIST /BULKF_PARM02/
59 & qnet_off, empmr_off, conservcycle
60 #endif
61
62
63 _BEGIN_MASTER(myThid)
64
65 WRITE(msgBuf,'(A)') ' BULKF_READPARMS: opening data.blk'
66 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
67 & SQUEEZE_RIGHT , 1)
68
69
70 CALL OPEN_COPY_DATA_FILE(
71 I 'data.blk', 'BULKF_READPARMS',
72 O iUnit,
73 I myThid )
74
75 C-- Default values
76 C- Physical constant :
77 rhoa = 1.3 _d 0
78 rhofw = rhoConstFresh
79 cpair = atm_Cp
80 cpwv = 1.81 _d 3
81 Lvap = 2.5 _d 6
82 Lfresh = 3.34 _d 5
83 Tf0kel = celsius2K
84 cdrag_1= 0.0027000 _d 0
85 cdrag_2= 0.0001420 _d 0
86 cdrag_3= 0.0000764 _d 0
87 stefan = 5.67 _d -8
88 xkar = 0.4 _d 0
89 Rvap = 461. _d 0
90 p0 = atm_Po / 100.
91 humid_fac = 0.606 _d 0
92 saltsat = 0.980 _d 0
93 gamma_blk = 0.010 _d 0
94 Lvap_ice = 2.83 _d 6
95 Rgas = atm_Rd
96 atm_emissivity = .90 _d 0
97 ocean_emissivity= .985 _d 0
98 snow_emissivity = .98 _d 0
99 ice_emissivity = .98 _d 0
100
101 C- bulk-forcing parameters:
102 blk_taveFreq = taveFreq
103
104 C- Input data files names :
105 AirTempFile=' '
106 AirHumidityFile=' '
107 RainFile=' '
108 SolarFile=' '
109 LongwaveFile=' '
110 UWindFile=' '
111 VWindFile=' '
112 WspeedFile=' '
113 RunoffFile=' '
114 QnetFile=' '
115 EmPFile=' '
116 CloudFile=' '
117 SnowFile=' '
118 readwindstress=.TRUE.
119 readsurface=.TRUE.
120
121 C-- Read parameters from open data file
122 READ(UNIT=iUnit,NML=BULKF_CONST)
123 WRITE(msgBuf,'(A)') ' BULKF_READPARMS: read BULKF_CONST'
124 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
125 & SQUEEZE_RIGHT , 1)
126
127 READ(UNIT=iUnit,NML=BULKF_PARM01)
128 WRITE(msgBuf,'(A)') ' BULKF_READPARMS: read BULKF_PARM01'
129 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
130 & SQUEEZE_RIGHT , 1)
131
132 #ifdef CONSERV_BULKF
133 c -- default
134 qnet_off=0.d0
135 empmr_off=0.d0
136 READ(UNIT=iUnit,NML=BULKF_PARM02)
137 WRITE(msgBuf,'(A)') ' BULKF_READPARMS: read BULKF_PARM02'
138 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
139 & SQUEEZE_RIGHT , 1)
140
141 #endif /* CONSERV_BULKF */
142
143 C-- Close the open data file
144 CLOSE(iUnit)
145
146 C- Define other constants (from previous ones):
147 Qcoef = 6.11 _d 0 * 0.622 _d 0 / p0
148 Sha = Rgas / .286 _d 0
149
150 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
151 iUnit = standardMessageUnit
152 c iUnit=88
153 c OPEN(iUnit,file='bulkf_check_params',status='unknown')
154 WRITE(iUnit,*) 'BlkF: rhoa =',rhoa
155 WRITE(iUnit,*) 'BlkF: rhofw =',rhofw
156 WRITE(iUnit,*) 'BlkF: cpair =',cpair
157 WRITE(iUnit,*) 'BlkF: cpwv =',cpwv
158 WRITE(iUnit,*) 'BlkF: Lvap =',Lvap
159 WRITE(iUnit,*) 'BlkF: Lfresh =',Lfresh
160 WRITE(iUnit,*) 'BlkF: Tf0kel =',Tf0kel
161 WRITE(iUnit,*) 'BlkF: cdrag_1 =',cdrag_1
162 WRITE(iUnit,*) 'BlkF: cdrag_2 =',cdrag_2
163 WRITE(iUnit,*) 'BlkF: cdrag_3 =',cdrag_3
164 WRITE(iUnit,*) 'BlkF: stefan =',stefan
165 WRITE(iUnit,*) 'BlkF: xkar =',xkar
166 WRITE(iUnit,*) 'BlkF: Rvap =',Rvap
167 WRITE(iUnit,*) 'BlkF: p0 =',p0
168 WRITE(iUnit,*) 'BlkF: Qcoef =',Qcoef
169 WRITE(iUnit,*) 'BlkF: humid_fac=',humid_fac
170 WRITE(iUnit,*) 'BlkF: saltsat =',saltsat
171 WRITE(iUnit,*) 'BlkF: gamma_blk=',gamma_blk
172 WRITE(iUnit,*) 'BlkF: Lvap_ice =',Lvap_ice
173 WRITE(iUnit,*) 'BlkF: Rgas =',Rgas
174 WRITE(iUnit,*) 'BlkF: Sha =',Sha
175 WRITE(iUnit,*) 'BlkF: atm_emissivity =',atm_emissivity
176 WRITE(iUnit,*) 'BlkF: ocean_emissivity=',ocean_emissivity
177 WRITE(iUnit,*) 'BlkF: snow_emissivity =',snow_emissivity
178 WRITE(iUnit,*) 'BlkF: ice_emissivity =',ice_emissivity
179 WRITE(iUnit,*) 'BlkF: blk_taveFreq=',blk_taveFreq
180 IF (iUnit.EQ.88) CLOSE(iUnit)
181 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
182
183 _END_MASTER(myThid)
184
185 C-- Everyone else must wait for the parameters to be loaded
186 _BARRIER
187
188 #endif /* ALLOW_BULK_FORCE */
189
190 RETURN
191 END

  ViewVC Help
Powered by ViewVC 1.1.22