99 static std::string tracer_hadv_string =
"upstream3";
100 pp.query(
"tracer_horizontal_advection_scheme",tracer_hadv_string);
101 if (tracer_hadv_string ==
"centered4")
103 else if (tracer_hadv_string ==
"upstream3")
106 amrex::Error(
"Advection scheme unknown.");
109 static std::string uv_hadv_string =
"upstream3";
110 pp.query(
"uv_horizontal_advection_scheme",uv_hadv_string);
111 if (uv_hadv_string ==
"upstream3")
113 else if (uv_hadv_string ==
"centered2")
116 amrex::Error(
"UV advection scheme unknown.");
118 pp.query(
"rdrag",
rdrag);
119 pp.query(
"rdrag2",
rdrag2);
120 pp.query(
"Zos",
Zos);
121 pp.query(
"Zob",
Zob);
163 static std::string eos_type_string =
"linear";
164 pp.query(
"eos_type",eos_type_string);
165 if (eos_type_string ==
"linear" || eos_type_string ==
"Linear" ||
166 eos_type_string ==
"lin" || eos_type_string ==
"Lin") {
168 pp.query(
"Tcoef",
Tcoef);
169 pp.query(
"Scoef",
Scoef);
170 }
else if (eos_type_string ==
"nonlinear" || eos_type_string ==
"Nonlinear" ||
171 eos_type_string ==
"non-linear" || eos_type_string ==
"Non-linear" ||
172 eos_type_string ==
"nonlin" || eos_type_string ==
"Nonlin") {
175 amrex::Abort(
"Dont know this eos_type");
180 pp.query(
"rho0",
rho0);
187 pp.query(
"air_pressure",
Pair);
188 pp.query(
"air_temperature",
Tair);
189 pp.query(
"air_humidity",
Hair);
190 pp.query(
"surface_radiation_flux",
srflux);
191 pp.query(
"cloud",
cloud);
192 pp.query(
"rain",
rain);
193 pp.query(
"blk_ZQ",
blk_ZQ);
194 pp.query(
"blk_ZT",
blk_ZT);
195 pp.query(
"blk_ZW",
blk_ZW);
200 amrex::Abort(
"If evaporation minus precipitation (E-P) sea surface height correct in is on, E-P must be on as well (remora.eminusp=true)");
203 amrex::Abort(
"Evaporation minus precipitation (E-P) requires bulk flux parametrizations (remora.bulk_fluxes=true)");
210 pp.query(
"tcline",
tcline);
220 static std::string grid_scale_type_string =
"constant";
221 pp.query(
"grid_scale_type",grid_scale_type_string);
223 if (amrex::toLower(grid_scale_type_string) ==
"constant") {
225 }
else if (amrex::toLower(grid_scale_type_string) ==
"custom") {
226 amrex::Warning(
"Initialization of grid scale from prob.cpp is now called 'analytic'. 'custom' will be deprecated");
228 }
else if (amrex::toLower(grid_scale_type_string) ==
"analytic") {
231 amrex::Error(
"Don't know this grid_scale_type");
234 static std::string ic_type_string =
"analytic";
235 bool found_ic_bc = pp.query(
"ic_bc_type", ic_type_string);
236 pp.query(
"ic_type", ic_type_string);
239 amrex::Warning(
"remora.ic_bc_type is now called remora.ic_type, and will eventually be deprecated");
242 if ( amrex::toLower(ic_type_string) ==
"custom") {
243 amrex::Warning(
"Problem initialization from prob.cpp is now called 'analytic'. 'custom' will be deprecated");
245 }
else if ( amrex::toLower(ic_type_string) ==
"analytic") {
247 }
else if ( amrex::toLower(ic_type_string) ==
"netcdf") {
249 }
else if ( amrex::toLower(ic_type_string) ==
"real") {
250 amrex::Warning(
"Problem initialization from NetCDF (remora.ic_type) is now called 'netcdf'. 'real' will be deprecated");
253 amrex::Error(
"Don't know this ic_type");
257 static std::string coupling_type_string =
"TwoWay";
258 pp.query(
"coupling_type",coupling_type_string);
259 if (amrex::toLower(coupling_type_string) ==
"twoway" ||
260 amrex::toLower(coupling_type_string) ==
"two_way") {
262 }
else if (amrex::toLower(coupling_type_string) ==
"oneway" ||
263 amrex::toLower(coupling_type_string) ==
"one_way") {
266 amrex::Abort(
"Dont know this coupling_type");
271 static std::string coriolis_type_string =
"beta_plane";
272 pp.query(
"coriolis_type",coriolis_type_string);
273 if ( amrex::toLower(coriolis_type_string) ==
"custom") {
274 amrex::Warning(
"Coriolis initialization from prob.cpp is now called 'analytic'. 'custom' will be deprecated");
276 }
else if ( amrex::toLower(coriolis_type_string) ==
"analytic") {
278 }
else if ((amrex::toLower(coriolis_type_string) ==
"beta_plane") ||
279 (amrex::toLower(coriolis_type_string) ==
"betaplane")) {
281 }
else if ( (amrex::toLower(coriolis_type_string) ==
"netcdf")) {
283 }
else if ( (amrex::toLower(coriolis_type_string) ==
"real")) {
284 amrex::Warning(
"Coriolis initialization from NetCDF is now called 'netcdf'. 'real' will be deprecated");
287 amrex::Abort(
"Don't know this coriolis_type");
291 static std::string smflux_type_string =
"analytic";
292 int smflux_specified = pp.query(
"smflux_type",smflux_type_string);
293 if ( amrex::toLower(smflux_type_string) ==
"custom") {
294 amrex::Warning(
"Surface momentum flux initialization from prob.cpp is now called 'analytic'. 'custom' will be deprecated");
296 }
else if ( amrex::toLower(smflux_type_string) ==
"analytic") {
298 }
else if ( amrex::toLower(smflux_type_string) ==
"netcdf") {
301 amrex::Abort(
"Don't know this smflux_type");
304 static std::string wind_type_string =
"analytic";
305 int wind_specified = pp.query(
"wind_type",wind_type_string);
306 if ( amrex::toLower(wind_type_string) ==
"custom") {
307 amrex::Warning(
"Surface wind initialization from prob.cpp is now called 'analytic'. 'custom' will be deprecated");
309 }
else if ( amrex::toLower(wind_type_string) ==
"analytic") {
311 }
else if ( amrex::toLower(wind_type_string) ==
"netcdf") {
314 amrex::Abort(
"Don't know this smflux_type");
317 if (wind_specified && smflux_specified) {
318 amrex::Abort(
"Cannot specify both wind and surface momentum flux");
321 static std::string mask_type_string =
"none";
324 mask_type_string =
"netcdf";
326 pp.query(
"mask_type", mask_type_string);
327 if (amrex::toLower(mask_type_string) ==
"none") {
329 }
else if (amrex::toLower(mask_type_string) ==
"analytic") {
331 }
else if (amrex::toLower(mask_type_string) ==
"netcdf") {
334 amrex::Abort(
"Don't know this mask_type");
337 static std::string bottom_stress_type_string =
"linear";
338 pp.query(
"bottom_stress_type", bottom_stress_type_string);
339 if (amrex::toLower(bottom_stress_type_string) ==
"linear") {
341 }
else if (amrex::toLower(bottom_stress_type_string) ==
"quadratic") {
343 }
else if (amrex::toLower(bottom_stress_type_string) ==
"logarithmic") {
346 amrex::Abort(
"Don't know this bottom_stress_type");
349 amrex::Real tnu2_salt = amrex::Real(0.0);
350 amrex::Real tnu2_temp = amrex::Real(0.0);
351 amrex::Real tnu2_scalar = amrex::Real(0.0);
352 static std::string horiz_mixing_type_string =
"analytic";
353 pp.query(
"horizontal_mixing_type", horiz_mixing_type_string);
354 if (amrex::toLower(horiz_mixing_type_string) ==
"analytical" ||
355 amrex::toLower(horiz_mixing_type_string) ==
"analytic") {
357 }
else if (amrex::toLower(horiz_mixing_type_string) ==
"constant") {
360 amrex::Abort(
"Don't know this horizontal mixing type");
362 pp.query(
"visc2",
visc2);
363 pp.query(
"tnu2_salt",tnu2_salt);
364 pp.query(
"tnu2_temp",tnu2_temp);
365 pp.query(
"tnu2_scalar",tnu2_scalar);
370 tnu2[2] = tnu2_scalar;
373 tnu2[1] = tnu2_scalar;
378 static std::string vert_mixing_type_string =
"analytic";
379 static std::string gls_stability_type_string =
"Canuto_A";
380 pp.query(
"vertical_mixing_type", vert_mixing_type_string);
381 pp.query(
"gls_stability_type", gls_stability_type_string);
382 if (amrex::toLower(vert_mixing_type_string) ==
"analytical" ||
383 amrex::toLower(vert_mixing_type_string) ==
"analytic") {
385 }
else if (amrex::toLower(vert_mixing_type_string) ==
"gls") {
387 if (amrex::toLower(gls_stability_type_string) ==
"canuto_a") {
390 else if (amrex::toLower(gls_stability_type_string) ==
"canuto_b") {
393 else if (amrex::toLower(gls_stability_type_string) ==
"galperin") {
397 amrex::Abort(
"Don't know this GLS stability type");
400 amrex::Abort(
"Don't know this vertical mixing type");
404 pp.query(
"gls_P",
gls_p);
405 pp.query(
"gls_M",
gls_m);
406 pp.query(
"gls_N",
gls_n);
411 pp.query(
"gls_c1",
gls_c1);
412 pp.query(
"gls_c2",
gls_c2);
420 gls_L1 = amrex::Real(0.107);
421 gls_L2 = amrex::Real(0.0032);
422 gls_L3 = amrex::Real(0.0864);
423 gls_L4 = amrex::Real(0.12);
424 gls_L5 = amrex::Real(11.9);
425 gls_L6 = amrex::Real(0.4);
426 gls_L7 = amrex::Real(0.0);
427 gls_L8 = amrex::Real(0.48);
431 gls_L1 = amrex::Real(0.127);
432 gls_L2 = amrex::Real(0.00336);
433 gls_L3 = amrex::Real(0.0906);
434 gls_L4 = amrex::Real(0.101);
435 gls_L5 = amrex::Real(11.2);
436 gls_L6 = amrex::Real(0.4);
437 gls_L7 = amrex::Real(0.0);
438 gls_L8 = amrex::Real(0.318);
447 amrex::Real tnudg = amrex::Real(0.0);
448 amrex::Real znudg = amrex::Real(0.0);
449 amrex::Real m2nudg = amrex::Real(0.0);
450 amrex::Real m3nudg = amrex::Real(0.0);
451 pp.query(
"tnudg",tnudg);
452 pp.query(
"znudg",znudg);
453 pp.query(
"m2nudg",m2nudg);
454 pp.query(
"m3nudg",m3nudg);
455 pp.query(
"obcfac",
obcfac);
458 nudg_coeff[
BdyVars::u ] = (m3nudg > 0.0) ? amrex::Real(1.0) / (m3nudg * amrex::Real(86400.0)) : 0.0;
459 nudg_coeff[
BdyVars::v ] = (m3nudg > 0.0) ? amrex::Real(1.0) / (m3nudg * amrex::Real(86400.0)) : 0.0;
460 nudg_coeff[
BdyVars::t ] = ( tnudg > 0.0) ? amrex::Real(1.0) / ( tnudg * amrex::Real(86400.0)) : 0.0;
461 nudg_coeff[
BdyVars::s ] = ( tnudg > 0.0) ? amrex::Real(1.0) / ( tnudg * amrex::Real(86400.0)) : 0.0;
474#ifndef REMORA_USE_NETCDF
476 amrex::Abort(
"Climatology nudging requires building with NetCDF");