94 static std::string tracer_hadv_string =
"upstream3";
95 pp.query(
"tracer_horizontal_advection_scheme",tracer_hadv_string);
96 if (tracer_hadv_string ==
"centered4")
98 else if (tracer_hadv_string ==
"upstream3")
101 amrex::Error(
"Advection scheme unknown.");
104 static std::string uv_hadv_string =
"upstream3";
105 pp.query(
"uv_horizontal_advection_scheme",uv_hadv_string);
106 if (uv_hadv_string ==
"upstream3")
108 else if (uv_hadv_string ==
"centered2")
111 amrex::Error(
"UV advection scheme unknown.");
113 pp.query(
"rdrag",
rdrag);
114 pp.query(
"rdrag2",
rdrag2);
115 pp.query(
"Zos",
Zos);
116 pp.query(
"Zob",
Zob);
158 static std::string eos_type_string =
"linear";
159 pp.query(
"eos_type",eos_type_string);
160 if (eos_type_string ==
"linear" || eos_type_string ==
"Linear" ||
161 eos_type_string ==
"lin" || eos_type_string ==
"Lin") {
163 pp.query(
"Tcoef",
Tcoef);
164 pp.query(
"Scoef",
Scoef);
165 }
else if (eos_type_string ==
"nonlinear" || eos_type_string ==
"Nonlinear" ||
166 eos_type_string ==
"non-linear" || eos_type_string ==
"Non-linear" ||
167 eos_type_string ==
"nonlin" || eos_type_string ==
"Nonlin") {
170 amrex::Abort(
"Dont know this eos_type");
175 pp.query(
"rho0",
rho0);
182 pp.query(
"air_pressure",
Pair);
183 pp.query(
"air_temperature",
Tair);
184 pp.query(
"air_humidity",
Hair);
185 pp.query(
"surface_radiation_flux",
srflux);
186 pp.query(
"cloud",
cloud);
187 pp.query(
"rain",
rain);
188 pp.query(
"blk_ZQ",
blk_ZQ);
189 pp.query(
"blk_ZT",
blk_ZT);
190 pp.query(
"blk_ZW",
blk_ZW);
195 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)");
198 amrex::Abort(
"Evaporation minus precipitation (E-P) requires bulk flux parametrizations (remora.bulk_fluxes=true)");
205 pp.query(
"tcline",
tcline);
215 static std::string grid_scale_type_string =
"constant";
216 pp.query(
"grid_scale_type",grid_scale_type_string);
218 if (amrex::toLower(grid_scale_type_string) ==
"constant") {
220 }
else if (amrex::toLower(grid_scale_type_string) ==
"custom") {
221 amrex::Warning(
"Initialization of grid scale from prob.cpp is now called 'analytic'. 'custom' will be deprecated");
223 }
else if (amrex::toLower(grid_scale_type_string) ==
"analytic") {
226 amrex::Error(
"Don't know this grid_scale_type");
229 static std::string ic_bc_type_string =
"analytic";
230 pp.query(
"ic_bc_type", ic_bc_type_string);
232 if ( amrex::toLower(ic_bc_type_string) ==
"custom") {
233 amrex::Warning(
"Problem initialization from prob.cpp is now called 'analytic'. 'custom' will be deprecated");
235 }
else if ( amrex::toLower(ic_bc_type_string) ==
"analytic") {
237 }
else if ( amrex::toLower(ic_bc_type_string) ==
"netcdf") {
239 }
else if ( amrex::toLower(ic_bc_type_string) ==
"real") {
240 amrex::Warning(
"Problem initialization from NetCDF (remora.ic_bc_type) is now called 'netcdf'. 'real' will be deprecated");
243 amrex::Error(
"Don't know this ic_bc_type");
247 static std::string coupling_type_string =
"TwoWay";
248 pp.query(
"coupling_type",coupling_type_string);
249 if (amrex::toLower(coupling_type_string) ==
"twoway" ||
250 amrex::toLower(coupling_type_string) ==
"two_way") {
252 }
else if (amrex::toLower(coupling_type_string) ==
"oneway" ||
253 amrex::toLower(coupling_type_string) ==
"one_way") {
256 amrex::Abort(
"Dont know this coupling_type");
261 static std::string coriolis_type_string =
"beta_plane";
262 pp.query(
"coriolis_type",coriolis_type_string);
263 if ( amrex::toLower(coriolis_type_string) ==
"custom") {
264 amrex::Warning(
"Coriolis initialization from prob.cpp is now called 'analytic'. 'custom' will be deprecated");
266 }
else if ( amrex::toLower(coriolis_type_string) ==
"analytic") {
268 }
else if ((amrex::toLower(coriolis_type_string) ==
"beta_plane") ||
269 (amrex::toLower(coriolis_type_string) ==
"betaplane")) {
271 }
else if ( (amrex::toLower(coriolis_type_string) ==
"netcdf")) {
273 }
else if ( (amrex::toLower(coriolis_type_string) ==
"real")) {
274 amrex::Warning(
"Coriolis initialization from NetCDF is now called 'netcdf'. 'real' will be deprecated");
277 amrex::Abort(
"Don't know this coriolis_type");
281 static std::string smflux_type_string =
"analytic";
282 int smflux_specified = pp.query(
"smflux_type",smflux_type_string);
283 if ( amrex::toLower(smflux_type_string) ==
"custom") {
284 amrex::Warning(
"Surface momentum flux initialization from prob.cpp is now called 'analytic'. 'custom' will be deprecated");
286 }
else if ( amrex::toLower(smflux_type_string) ==
"analytic") {
288 }
else if ( amrex::toLower(smflux_type_string) ==
"netcdf") {
291 amrex::Abort(
"Don't know this smflux_type");
294 static std::string wind_type_string =
"analytic";
295 int wind_specified = pp.query(
"wind_type",wind_type_string);
296 if ( amrex::toLower(wind_type_string) ==
"custom") {
297 amrex::Warning(
"Surface wind initialization from prob.cpp is now called 'analytic'. 'custom' will be deprecated");
299 }
else if ( amrex::toLower(wind_type_string) ==
"analytic") {
301 }
else if ( amrex::toLower(wind_type_string) ==
"netcdf") {
304 amrex::Abort(
"Don't know this smflux_type");
307 if (wind_specified && smflux_specified) {
308 amrex::Abort(
"Cannot specify both wind and surface momentum flux");
311 static std::string bottom_stress_type_string =
"linear";
312 pp.query(
"bottom_stress_type", bottom_stress_type_string);
313 if (amrex::toLower(bottom_stress_type_string) ==
"linear") {
315 }
else if (amrex::toLower(bottom_stress_type_string) ==
"quadratic") {
317 }
else if (amrex::toLower(bottom_stress_type_string) ==
"logarithmic") {
320 amrex::Abort(
"Don't know this bottom_stress_type");
323 amrex::Real tnu2_salt = amrex::Real(0.0);
324 amrex::Real tnu2_temp = amrex::Real(0.0);
325 amrex::Real tnu2_scalar = amrex::Real(0.0);
326 static std::string horiz_mixing_type_string =
"analytic";
327 pp.query(
"horizontal_mixing_type", horiz_mixing_type_string);
328 if (amrex::toLower(horiz_mixing_type_string) ==
"analytical" ||
329 amrex::toLower(horiz_mixing_type_string) ==
"analytic") {
331 }
else if (amrex::toLower(horiz_mixing_type_string) ==
"constant") {
334 amrex::Abort(
"Don't know this horizontal mixing type");
336 pp.query(
"visc2",
visc2);
337 pp.query(
"tnu2_salt",tnu2_salt);
338 pp.query(
"tnu2_temp",tnu2_temp);
339 pp.query(
"tnu2_scalar",tnu2_scalar);
344 tnu2[2] = tnu2_scalar;
347 tnu2[1] = tnu2_scalar;
352 static std::string vert_mixing_type_string =
"analytic";
353 static std::string gls_stability_type_string =
"Canuto_A";
354 pp.query(
"vertical_mixing_type", vert_mixing_type_string);
355 pp.query(
"gls_stability_type", gls_stability_type_string);
356 if (amrex::toLower(vert_mixing_type_string) ==
"analytical" ||
357 amrex::toLower(vert_mixing_type_string) ==
"analytic") {
359 }
else if (amrex::toLower(vert_mixing_type_string) ==
"gls") {
361 if (amrex::toLower(gls_stability_type_string) ==
"canuto_a") {
364 else if (amrex::toLower(gls_stability_type_string) ==
"canuto_b") {
367 else if (amrex::toLower(gls_stability_type_string) ==
"galperin") {
371 amrex::Abort(
"Don't know this GLS stability type");
374 amrex::Abort(
"Don't know this vertical mixing type");
378 pp.query(
"gls_P",
gls_p);
379 pp.query(
"gls_M",
gls_m);
380 pp.query(
"gls_N",
gls_n);
385 pp.query(
"gls_c1",
gls_c1);
386 pp.query(
"gls_c2",
gls_c2);
394 gls_L1 = amrex::Real(0.107);
395 gls_L2 = amrex::Real(0.0032);
396 gls_L3 = amrex::Real(0.0864);
397 gls_L4 = amrex::Real(0.12);
398 gls_L5 = amrex::Real(11.9);
399 gls_L6 = amrex::Real(0.4);
400 gls_L7 = amrex::Real(0.0);
401 gls_L8 = amrex::Real(0.48);
405 gls_L1 = amrex::Real(0.127);
406 gls_L2 = amrex::Real(0.00336);
407 gls_L3 = amrex::Real(0.0906);
408 gls_L4 = amrex::Real(0.101);
409 gls_L5 = amrex::Real(11.2);
410 gls_L6 = amrex::Real(0.4);
411 gls_L7 = amrex::Real(0.0);
412 gls_L8 = amrex::Real(0.318);
421 amrex::Real tnudg = amrex::Real(0.0);
422 amrex::Real znudg = amrex::Real(0.0);
423 amrex::Real m2nudg = amrex::Real(0.0);
424 amrex::Real m3nudg = amrex::Real(0.0);
425 pp.query(
"tnudg",tnudg);
426 pp.query(
"znudg",znudg);
427 pp.query(
"m2nudg",m2nudg);
428 pp.query(
"m3nudg",m3nudg);
429 pp.query(
"obcfac",
obcfac);
432 nudg_coeff[
BdyVars::u ] = (m3nudg > 0.0) ? amrex::Real(1.0) / (m3nudg * amrex::Real(86400.0)) : 0.0;
433 nudg_coeff[
BdyVars::v ] = (m3nudg > 0.0) ? amrex::Real(1.0) / (m3nudg * amrex::Real(86400.0)) : 0.0;
434 nudg_coeff[
BdyVars::t ] = ( tnudg > 0.0) ? amrex::Real(1.0) / ( tnudg * amrex::Real(86400.0)) : 0.0;
435 nudg_coeff[
BdyVars::s ] = ( tnudg > 0.0) ? amrex::Real(1.0) / ( tnudg * amrex::Real(86400.0)) : 0.0;
448#ifndef REMORA_USE_NETCDF
450 amrex::Abort(
"Climatology nudging requires building with NetCDF");