REMORA
Regional Modeling of Oceans Refined Adaptively
Loading...
Searching...
No Matches
REMORA_bulk_flux.cpp
Go to the documentation of this file.
1#include <REMORA.H>
2
3using namespace amrex;
4
5/**
6 * @param[in ] lev level to operate on
7 * @param[in ] mf_cons scalar data: temperature, salinity, passsive scalar, etc
8 * @param[in ] mf_uwind u-direction wind dvelocity
9 * @param[in ] mf_vwind v-direction wind dvelocity
10 * @param[in ] mf_Tair air temperature [°C]
11 * @param[in ] mf_qair specific humidity [kg/kg]
12 * @param[in ] mf_Pair air pressure [mb]
13 * @param[in ] mf_srflx shortwave radiation flux [W/m²]
14 * @param[in ] mf_longwave_down longwave radiation flux [W/m²]
15 * @param[inout] mf_evap evaporation rate
16 * @param[ out] mf_sustr u-direction surface momentum stress
17 * @param[ out] mf_svstr v-direction surface momentum stress
18 * @param[ out] mf_stflux surface scalar flux (temperature, salinity)
19 * @param[ out] mf_lrflx longwave radiation flux
20 * @param[inout] mf_lhflx latent heat flux
21 * @param[inout] mf_shflx sensible heat flux
22 * @param[in ] N number of vertical levels
23 */
24void
25REMORA::bulk_fluxes (int lev, MultiFab* mf_cons, MultiFab* mf_uwind, MultiFab* mf_vwind,
26 MultiFab* mf_Tair, MultiFab* mf_qair, MultiFab* mf_Pair,
27 MultiFab* mf_srflx,
28 MultiFab* mf_longwave_down,
29 MultiFab* mf_evap, MultiFab* mf_sustr, MultiFab* mf_svstr,
30 MultiFab* mf_stflux, MultiFab* mf_lrflx, MultiFab* mf_lhflx,
31 MultiFab* mf_shflx,
32 const int N)
33{
34 BL_PROFILE("REMORA::bulk_fluxes()");
35 const int IterMax = 3;
36 const BoxArray& ba = mf_cons->boxArray();
37 const DistributionMapping& dm = mf_cons->DistributionMap();
38 MultiFab mf_Taux(ba, dm, 1, IntVect(NGROW,NGROW,0));
39 MultiFab mf_Tauy(ba, dm, 1, IntVect(NGROW,NGROW,0));
40
41 // temps: Taux, Tauy,
42 for ( MFIter mfi(*mf_cons, TilingIfNotGPU()); mfi.isValid(); ++mfi) {
43 Array4<Real const> const& uwind = mf_uwind->const_array(mfi);
44 Array4<Real const> const& vwind = mf_vwind->const_array(mfi);
45 Array4<Real const> const& Tair_arr = mf_Tair->const_array(mfi);
46 Array4<Real const> const& qair_arr = mf_qair->const_array(mfi);
47 Array4<Real const> const& Pair_arr = mf_Pair->const_array(mfi);
48 Array4<Real const> const& srflx_arr = mf_srflx->const_array(mfi);
49 Array4<Real const> longwave_down_arr;
50 if (mf_longwave_down != nullptr) {
51 longwave_down_arr = mf_longwave_down->const_array(mfi);
52 }
53 Array4<Real const> const& cons = mf_cons->const_array(mfi);
54 Array4<Real> const& sustr = mf_sustr->array(mfi);
55 Array4<Real> const& svstr = mf_svstr->array(mfi);
56 Array4<Real> const& stflux = mf_stflux->array(mfi);
57 Array4<Real> const& lrflx = mf_lrflx->array(mfi);
58 Array4<Real> const& lhflx = mf_lhflx->array(mfi);
59 Array4<Real> const& shflx = mf_shflx->array(mfi);
60 Array4<Real> const& evap = mf_evap->array(mfi);
61 Array4<Real> const& Taux = mf_Taux.array(mfi);
62 Array4<Real> const& Tauy = mf_Tauy.array(mfi);
63
64 Array4<const Real> const& mskr = vec_mskr[lev]->const_array(mfi);
65 Array4<const Real> const& msku = vec_msku[lev]->const_array(mfi);
66 Array4<const Real> const& mskv = vec_mskv[lev]->const_array(mfi);
67 Array4<const Real> const& rain = vec_rain[lev]->const_array(mfi);
68 Array4<const Real> const& EminusP = vec_EminusP[lev]->const_array(mfi);
69 Array4<const Real> const& cloud_arr = vec_cloud[lev]->const_array(mfi);
70
71 Real Hscale = solverChoice.rho0 * Cp;
72 Real Hscale2 = 1.0_rt / (solverChoice.rho0 * Cp);
73 Real blk_ZQ = solverChoice.blk_ZQ;
74 Real blk_ZT = solverChoice.blk_ZT;
75 Real blk_ZW = solverChoice.blk_ZW;
76
77 bool use_longwave_down = solverChoice.longwave_down;
78 bool longwave_netcdf_is_net = solverChoice.longwave_netcdf_is_net;
79 bool have_longwave_from_file = (mf_longwave_down != nullptr);
80 bool use_EminusP_from_file = solverChoice.eminusp && solverChoice.EminusP_from_netcdf;
81
82 Real eps = 1e-20_rt;
83
84 Box bx = mfi.tilebox();
85 Box ubx = mfi.grownnodaltilebox(0,IntVect(NGROW-1,NGROW-1,0));
86 Box vbx = mfi.grownnodaltilebox(1,IntVect(NGROW-1,NGROW-1,0));
87 Box gbx1 = bx; gbx1.grow(IntVect(NGROW,NGROW,0));
88
89 ParallelFor(makeSlab(gbx1,2,0), [=] AMREX_GPU_DEVICE (int i, int j, int ) {
90 // Get spatially-varying atmospheric forcing from input arrays
91 Real PairM = Pair_arr(i,j,0); // Air pressure [mb]
92 Real TairC = Tair_arr(i,j,0); // Air temperature [°C]
93 Real TairK = TairC + 273.16_rt; // Air temperature [K]
94 Real Hair = qair_arr(i,j,0); // Specific humidity [kg/kg] or RH [fraction]
95 Real RH = Hair;
96 Real srflux = srflx_arr(i,j,0); // Shortwave radiation flux [W/m²]
97 Real cloud = cloud_arr(i,j,0); // Cloud cover fraction [0-1]
98
99 // Input bulk parametrization fields
100 Real wind_mag = std::sqrt(uwind(i,j,0)*uwind(i,j,0) + vwind(i,j,0) * vwind(i,j,0)) + eps;
101 Real TseaK = cons(i,j,N,Temp_comp) + 273.16_rt;
102
103 // Initialize
104 Real delTc = 0.0_rt;
105 Real delQc = 0.0_rt;
106 Real cff = 0.0_rt;
107
108 Real LHeat = lhflx(i,j,0) * Hscale;
109 Real SHeat = shflx(i,j,0) * Hscale;
110 Real Taur = 0.0_rt;
111 Taux(i,j,0) = 0.0_rt;
112 Tauy(i,j,0) = 0.0_rt;
113 Real LRad;
114
115 /*-----------------------------------------------------------------------
116 Compute outward or net longwave radiation (W/m2), LRad.
117 -----------------------------------------------------------------------
118 If given downward longwave radiation, compute net longwave radiation as
119 Ldown - Lemit, where Lemit is computed from the model SST and an emissivity.
120 Or use Berliand (1952) formula to calculate net longwave radiation.
121 The equation for saturation vapor pressure is from Gill (Atmosphere-
122 Ocean Dynamics, pp 606). Here the coefficient in the cloud term
123 is assumed constant, but it is a function of latitude varying from
124 1.0 at poles to 0.5 at the Equator).
125
126 */
127 if (have_longwave_from_file && longwave_netcdf_is_net) {
128 // File provides net longwave directly (W/m2), no additional conversion.
129 LRad = longwave_down_arr(i,j,0);
130 } else if (use_longwave_down) {
131 Real Ldown = longwave_down_arr(i,j,0);
132 Real Lemit = emmiss * StefBo * std::pow(TseaK,4);
133 LRad = Ldown - Lemit;
134 } else {
135 // Original Berliand parameterization
136 cff=(0.7859_rt+0.03477_rt*TairC)/(1.0_rt+0.00412_rt*TairC);
137 Real e_sat=std::pow(10.0_rt,cff);
138 Real vap_p=e_sat*RH;
139 Real cff2=TairK*TairK*TairK;
140 Real cff1=cff2*TairK;
141
142 LRad=-emmiss*StefBo*
143 (cff1*(0.39_rt-0.05_rt*std::sqrt(vap_p))*
144 (1.0_rt-0.6823_rt*cloud*cloud)+
145 cff2*4.0_rt*(TseaK-TairK));
146 }
147 /*
148 -----------------------------------------------------------------------
149 Compute specific humidities (kg/kg).
150
151 note that Qair is the saturation specific humidity at Tair
152 Q is the actual specific humidity
153 Qsea is the saturation specific humidity at Tsea
154
155 Saturation vapor pressure in mb is first computed and then
156 converted to specific humidity in kg/kg
157
158 The saturation vapor pressure is computed from Teten formula
159 using the approach of Buck (1981):
160
161 Esat(mb) = (1.0007_rt+3.46E-6_rt*PairM(mb))*6.1121_rt*
162 EXP(17.502_rt*TairC(C)/(240.97_rt+TairC(C)))
163
164 The ambient vapor is found from the definition of the
165 Relative humidity:
166
167 RH = W/Ws*100 ~ E/Esat*100 E = RH/100*Esat if RH is in %
168 E = RH*Esat if RH fractional
169
170 The specific humidity is then found using the relationship:
171
172 Q = 0.622 E/(P + (0.622-1)e)
173
174 Q(kg/kg) = 0.62197_rt*(E(mb)/(PairM(mb)-0.378_rt*E(mb)))
175
176 -----------------------------------------------------------------------
177 */
178
179 // Compute air saturation vapor pressure (mb), using Teten formula.
180
181 Real cff_saturation_air=(1.0007_rt+3.46E-6_rt*PairM)*6.1121_rt*
182 std::exp(17.502_rt*TairC/(240.97_rt+TairC));
183
184 // Compute specific humidity at Saturation, Qair (kg/kg).
185
186 Real Qair = 0.62197_rt*(cff_saturation_air/(PairM-0.378_rt*cff_saturation_air+eps));
187
188 // Compute specific humidity, Q (kg/kg).
189 Real Q;
190 if (RH < 2.0) {
191 Real cff_Q = cff_saturation_air*RH; //Vapor pressure (mb)
192 Q=0.62197_rt*(cff_Q/(PairM-0.378_rt*cff_Q+eps)); //Spec hum (kg/kg)
193 } else { // RH input was actually specific humidity in g/kg
194 Q=RH/1000.0_rt; //!Spec Hum (kg/kg)
195 }
196
197 // Compute water saturation vapor pressure (mb), using Teten formula.
198
199 Real cff_saturation_water=(1.0007_rt+3.46E-6_rt*PairM)*6.1121_rt*
200 std::exp(17.502_rt*cons(i,j,N,Temp_comp)/(240.97_rt+cons(i,j,N,Temp_comp)));
201
202 // Compute water saturation vapor pressure (mb), using Teten formula.
203 // Vapor Pressure reduced for salinity (Kraus and Businger, 1994, pp42).
204 Real cff_vp=cff_saturation_water*0.98_rt;
205
206 // Compute Qsea (kg/kg) from vapor pressure.
207 // NOTE: ROMS does not have the small-value guard here, but does for
208 // Q and Qair
209
210 Real Qsea=0.62197_rt*(cff_vp/(PairM-0.378_rt*cff_vp+eps));
211 //
212 // -----------------------------------------------------------------------
213 // Compute Monin-Obukhov similarity parameters for wind (Wstar),
214 // heat (Tstar), and moisture (Qstar), Liu et al. (1979).
215 // -----------------------------------------------------------------------
216 //
217 // Moist air density (kg/m3).
218
219 Real rhoAir=PairM*100.0_rt/(blk_Rgas*TairK*(1.0_rt+0.61_rt*Q));
220
221 // Kinematic viscosity of dry air (m2/s), Andreas (1989).
222
223 Real VisAir=1.326E-5_rt*(1.0_rt+TairC*(6.542E-3_rt+TairC*
224 (8.301E-6_rt-4.84E-9_rt*TairC)));
225
226 // Compute latent heat of vaporization (J/kg) at sea surface, Hlv.
227
228 Real Hlv = (2.501_rt-0.00237_rt*cons(i,j,N,Temp_comp))*1.0e6_rt;
229
230 // Assume that wind is measured relative to sea surface and include
231 // gustiness.
232
233 Real Wgus=0.5_rt;
234 Real delW=std::sqrt(wind_mag*wind_mag+Wgus*Wgus);
235 Real delQ=Qsea-Q;
236 Real delT=cons(i,j,N,Temp_comp)-TairC;
237
238 // Neutral coefficients.
239 Real ZoW=0.0001_rt;
240 Real u10=delW*std::log(10.0_rt/ZoW)/std::log(blk_ZW/ZoW);
241 Real Wstar=0.035_rt * u10;
242 Real Zo10=0.011_rt*Wstar*Wstar/g+0.11_rt*VisAir/Wstar;
243 Real Cd10 =(vonKar/std::log(10.0_rt/Zo10));
244 Cd10 = Cd10 * Cd10;
245 Real Ch10 =0.00115_rt;
246 Real Ct10 = Ch10/std::sqrt(Cd10);
247 Real ZoT10=10.0_rt/std::exp(vonKar/Ct10);
248 Real Cd=(vonKar/std::log(blk_ZW/Zo10));
249 Cd = Cd * Cd;
250
251 // Compute Richardson number.
252 Real Ct=vonKar/std::log(blk_ZT/ZoT10); // T transfer coefficient
253 Real CC=vonKar*Ct/Cd;
254
255 Real Ribcu = -blk_ZW/(blk_Zabl*0.004_rt*blk_beta*blk_beta*blk_beta);
256 Real Ri = -g*blk_ZW*((delT-delTc)+0.61_rt*TairK*delQ)/
257 (TairK*delW*delW+eps);
258 Real Zetu;
259 if (Ri < 0.0) {
260 Zetu=CC*Ri/(1.0_rt+Ri/Ribcu); // Unstable
261 } else {
262 Zetu=CC*Ri/(1.0_rt+3.0_rt*Ri/CC); // Stable
263 }
264 Real L10 = blk_ZW/Zetu;
265
266 // First guesses for Monon-Obukhov similarity scales.
267 Wstar=delW*vonKar/(std::log(blk_ZW/Zo10)-
268 bulk_psiu(blk_ZW/L10));
269 Real Tstar=-(delT-delTc)*vonKar/(std::log(blk_ZT/ZoT10)-
270 bulk_psit(blk_ZT/L10));
271 Real Qstar=-(delQ-delQc)*vonKar/(std::log(blk_ZQ/ZoT10)-
272 bulk_psit(blk_ZQ/L10));
273
274 // Modify Charnock for high wind speeds. The 0.125 factor below is for
275 // 1.0/(18.0-10.0).
276
277 Real charn;
278 if (delW > 18.0_rt) {
279 charn=0.018_rt;
280 } else if ((10.0_rt < delW) and (delW <= 18.0_rt)) {
281 charn=0.011_rt+0.125_rt*(0.018_rt-0.011_rt)*(delW-10.0_rt);
282 } else {
283 charn=0.011_rt;
284 }
285
286 // Iterate until convergence. It usually converges within 3 iterations.
287 for (int it=0; it<IterMax; it++) {
288 ZoW=charn*Wstar*Wstar/g+0.11_rt*VisAir/(Wstar+eps);
289 Real Rr=ZoW*Wstar/VisAir;
290 // Compute Monin-Obukhov stability parameter, Z/L.
291 Real ZoQ=std::min(1.15e-4_rt,5.5e-5_rt/std::pow(Rr,0.6_rt));
292 Real ZoT=ZoQ;
293 Real ZoL=vonKar*g*blk_ZW*(Tstar*(1.0_rt+0.61_rt*Q)+
294 0.61_rt*TairK*Qstar)/
295 (TairK*Wstar*Wstar*(1.0_rt+0.61_rt*Q)+eps);
296 Real L=blk_ZW/(ZoL+eps);
297
298 // Evaluate stability functions at Z/L.
299 Real Wpsi=bulk_psiu(ZoL);
300 Real Tpsi=bulk_psit(blk_ZT/L);
301 Real Qpsi=bulk_psit(blk_ZQ/L);
302
303 // Compute wind scaling parameters, Wstar.
304 Wstar=std::max(eps,delW*vonKar/(std::log(blk_ZW/ZoW)-Wpsi));
305 Tstar=-(delT-delTc)*vonKar/(std::log(blk_ZT/ZoT)-Tpsi);
306 Qstar=-(delQ-delQc)*vonKar/(std::log(blk_ZQ/ZoQ)-Qpsi);
307
308 // Compute gustiness in wind speed.
309 Real Bf=-g/TairK*Wstar*(Tstar+0.61_rt*TairK*Qstar);
310 if (Bf>0.0_rt) {
311 Wgus=blk_beta*std::pow(Bf*blk_Zabl,1.0_rt/3.0_rt);
312 } else {
313 Wgus=0.2_rt;
314 }
315 delW=std::sqrt(wind_mag*wind_mag+Wgus*Wgus);
316 }
317
318 // Compute transfer coefficients for momentum (Cd).
319 Real Wspeed=std::sqrt(wind_mag*wind_mag+Wgus*Wgus);
320 Cd=Wstar*Wstar/(Wspeed*Wspeed+eps);
321
322 // Compute turbulent sensible heat flux (W/m2), Hs.
323 Real Hs=-blk_Cpa*rhoAir*Wstar*Tstar;
324
325 // Compute sensible heat flux (W/m2) due to rainfall (kg/m2/s), Hsr.
326 Real diffw=2.11E-5_rt*std::pow(TairK/273.16_rt,1.94_rt);
327 Real diffh=0.02411_rt*(1.0_rt+TairC*
328 (3.309E-3_rt-1.44E-6_rt*TairC))/
329 (rhoAir*blk_Cpa+eps);
330 cff=Qair*Hlv/(blk_Rgas*TairK*TairK);
331 Real wet_bulb=1.0_rt/(1.0_rt+0.622_rt*(cff*Hlv*diffw)/
332 (blk_Cpa*diffh));
333 Real Hsr=rain(i,j,0)*wet_bulb*blk_Cpw*
334 ((cons(i,j,N,Temp_comp)-TairC)+(Qsea-Q)*Hlv/blk_Cpa);
335 SHeat=(Hs+Hsr) * mskr(i,j,0);
336
337 // Compute turbulent latent heat flux (W/m2), Hl.
338
339 Real Hl=-Hlv*rhoAir*Wstar*Qstar;
340
341 // Compute Webb correction (Webb effect) to latent heat flux, Hlw.
342 Real upvel=-1.61_rt*Wstar*Qstar-
343 (1.0_rt+1.61_rt*Q)*Wstar*Tstar/TairK;
344 Real Hlw=rhoAir*Hlv*upvel*Q;
345 LHeat=(Hl+Hlw) * mskr(i,j,0);
346
347 // Compute momentum flux (N/m2) due to rainfall (kg/m2/s).
348 Taur=0.85_rt*rain(i,j,0)*wind_mag;
349
350 // Compute wind stress components (N/m2), Tau.
351 cff=rhoAir*Cd*Wspeed;
352 // amrex::Print() << "rhoAir: " << rhoAir << " Cd: " << Cd << " Wspeed: " << Wspeed << " cff: " << cff << "\n";
353 Real sign_u = (uwind(i,j,0) >= 0.0_rt) ? 1 : -1;
354 Real sign_v = (vwind(i,j,0) >= 0.0_rt) ? 1 : -1;
355 Taux(i,j,0)=(cff*uwind(i,j,0)+Taur*sign_u) * mskr(i,j,0);
356 Tauy(i,j,0)=(cff*vwind(i,j,0)+Taur*sign_v) * mskr(i,j,0);
357 // amrex::Print() << "Taux: " << Taux(i,j,0) << " Tauy: " << Tauy(i,j,0) << "\n";
358
359 //=======================================================================
360 // Compute surface net heat flux and surface wind stress.
361 //=======================================================================
362 //
363 // Compute kinematic, surface, net heat flux (degC m/s). Notice that
364 // the signs of latent and sensible fluxes are reversed because fluxes
365 // calculated from the bulk formulations above are positive out of the
366 // ocean.
367 //
368 // For EMINUSP option, EVAP = LHeat (W/m2) / Hlv (J/kg) = kg/m2/s
369 // PREC = rain = kg/m2/s
370 //
371 // To convert these rates to m/s divide by freshwater density, rhow.
372 //
373 // Note that when the air is undersaturated in water vapor (Q < Qsea)
374 // the model will evaporate and LHeat > 0:
375 //
376 // LHeat positive out of the ocean
377 // evap positive out of the ocean
378 //
379 // Note that if evaporating, the salt flux is positive
380 // and if raining, the salt flux is negative
381 //
382 // Note that stflux(:,:,isalt) is the E-P flux. The fresh water flux
383 // is positive out of the ocean and the salt flux is positive into the
384 // ocean. It is multiplied by surface salinity when computing state
385 // variable stflx(:,:,isalt) in "set_vbc.F".
386
387// Real one_over_rhow=1.0_rt/rhow;
388 lrflx(i,j,0) = LRad*Hscale2;
389 lhflx(i,j,0) = -LHeat*Hscale2;
390 shflx(i,j,0) = -SHeat*Hscale2;
391 // Note: srflx from NetCDF is in W/m², convert to degC m/s by multiplying by Hscale2
392 stflux(i,j,0,Temp_comp)=(srflux*Hscale2 + lrflx(i,j,0) + lhflx(i,j,0) + shflx(i,j,0)) * mskr(i,j,0);
393 evap(i,j,0) = (LHeat / Hlv+eps) * mskr(i,j,0);
394 if (use_EminusP_from_file) {
395 // Match ROMS BULK_FLUXES + !EMINUSP behavior: use NetCDF E-P directly (m/s).
396 stflux(i,j,0,Salt_comp) = mskr(i,j,0) * EminusP(i,j,0);
397 } else {
398 stflux(i,j,0,Salt_comp) = mskr(i,j,0) * (evap(i,j,0)-rain(i,j,0)) / rhow;
399 }
400 });
401
402 Real cff_rho = 0.5_rt / solverChoice.rho0;
403 ParallelFor(makeSlab(ubx,2,0), [=] AMREX_GPU_DEVICE (int i, int j, int ) {
404 sustr(i,j,0) = cff_rho*(Taux(i-1,j,0) + Taux(i,j,0)) * msku(i,j,0);
405 });
406 ParallelFor(makeSlab(vbx,2,0), [=] AMREX_GPU_DEVICE (int i, int j, int ) {
407 svstr(i,j,0) = cff_rho*(Tauy(i,j-1,0) + Tauy(i,j,0)) * mskv(i,j,0);
408 });
409 }
410
411}
constexpr amrex::Real blk_Zabl
constexpr amrex::Real g
constexpr amrex::Real vonKar
constexpr amrex::Real rhow
constexpr amrex::Real blk_Rgas
constexpr amrex::Real blk_beta
constexpr amrex::Real emmiss
constexpr amrex::Real Cp
constexpr amrex::Real StefBo
constexpr amrex::Real blk_Cpa
constexpr amrex::Real blk_Cpw
#define NGROW
#define Temp_comp
#define Salt_comp
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_EminusP
evaporation minus precipitation [kg/m^2/s], defined at rho-points
Definition REMORA.H:438
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_mskr
land/sea mask at cell centers (2D)
Definition REMORA.H:480
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_rain
precipitation rate [kg/m^2/s]
Definition REMORA.H:432
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_msku
land/sea mask at x-faces (2D)
Definition REMORA.H:482
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_mskv
land/sea mask at y-faces (2D)
Definition REMORA.H:484
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real bulk_psiu(amrex::Real ZoL)
Evaluate stability function psi for wind speed.
Definition REMORA.H:1757
static SolverChoice solverChoice
Container for algorithmic choices.
Definition REMORA.H:1537
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_cloud
cloud cover fraction [0-1], defined at rho-points
Definition REMORA.H:436
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real bulk_psit(amrex::Real ZoL)
Evaluate stability function psi for moisture and heat.
Definition REMORA.H:1789
void bulk_fluxes(int lev, amrex::MultiFab *mf_cons, amrex::MultiFab *mf_uwind, amrex::MultiFab *mf_vwind, amrex::MultiFab *mf_Tair, amrex::MultiFab *mf_qair, amrex::MultiFab *mf_Pair, amrex::MultiFab *mf_srflx, amrex::MultiFab *mf_longwave_down, amrex::MultiFab *mf_evap, amrex::MultiFab *mf_sustr, amrex::MultiFab *mf_svstr, amrex::MultiFab *mf_stflux, amrex::MultiFab *mf_lrflx, amrex::MultiFab *mf_lhflx, amrex::MultiFab *mf_shflx, const int N)
Calculate bulk temperature, salinity, wind fluxes.
amrex::Real blk_ZT
amrex::Real blk_ZW
amrex::Real blk_ZQ