From dcbe9aaea1b01b74f0ffc793a76590daa48f40f4 Mon Sep 17 00:00:00 2001 From: Chris Eldred Date: Tue, 7 Nov 2023 13:45:33 -0700 Subject: [PATCH 1/4] horiz-vert splitting in diffusion, also vort-div splitting for velocity diffusion --- dynamics/spam/src/extrudedmodel-common.h | 11 +- dynamics/spam/src/models/extrudedmodel.h | 103 ++++++++++-------- .../pamc_input_extruded_densitycurrent.yaml | 8 +- 3 files changed, 71 insertions(+), 51 deletions(-) diff --git a/dynamics/spam/src/extrudedmodel-common.h b/dynamics/spam/src/extrudedmodel-common.h index 6b8800c7..00cf7240 100644 --- a/dynamics/spam/src/extrudedmodel-common.h +++ b/dynamics/spam/src/extrudedmodel-common.h @@ -101,9 +101,14 @@ class ModelParameters : public Parameters { bool dycore_tracer_pos[ntracers_dycore + GPU_PAD]; bool acoustic_balance; bool uniform_vertical; - real scalar_diffusion_coeff; - real scalar_diffusion_subtract_refstate; - real velocity_diffusion_coeff; + real scalar_horiz_diffusion_coeff; + real scalar_vert_diffusion_coeff; + real velocity_vort_horiz_diffusion_coeff; + real velocity_vort_vert_diffusion_coeff; + real velocity_div_horiz_diffusion_coeff; + real velocity_div_vert_diffusion_coeff; + bool scalar_diffusion_subtract_refstate; + // forces reference state to be in perfect hydrostatic balance by subtracting // the hydrostatic balance equation evaluated at the reference state in // the velocity tendency diff --git a/dynamics/spam/src/models/extrudedmodel.h b/dynamics/spam/src/models/extrudedmodel.h index f9274206..57be8e97 100644 --- a/dynamics/spam/src/models/extrudedmodel.h +++ b/dynamics/spam/src/models/extrudedmodel.h @@ -349,9 +349,13 @@ struct TotalDensityFunctor { // ******* Tendencies ***********// class ModelTendencies : public ExtrudedTendencies { - real scalar_diffusion_coeff; + real scalar_horiz_diffusion_coeff; + real scalar_vert_diffusion_coeff; real scalar_diffusion_subtract_refstate; - real velocity_diffusion_coeff; + real velocity_vort_horiz_diffusion_coeff; + real velocity_vort_vert_diffusion_coeff; + real velocity_div_horiz_diffusion_coeff; + real velocity_div_vert_diffusion_coeff; bool force_refstate_hydrostatic_balance; bool check_anelastic_constraint; #if defined PAMC_AN || defined PAMC_MAN @@ -366,12 +370,15 @@ class ModelTendencies : public ExtrudedTendencies { const Geometry &dual_geom) { ExtrudedTendencies::initialize(params, equations, primal_geom, dual_geom); - scalar_diffusion_coeff = params.scalar_diffusion_coeff; - scalar_diffusion_subtract_refstate = - params.scalar_diffusion_subtract_refstate; - velocity_diffusion_coeff = params.velocity_diffusion_coeff; - force_refstate_hydrostatic_balance = - params.force_refstate_hydrostatic_balance; + scalar_horiz_diffusion_coeff = params.scalar_horiz_diffusion_coeff; + scalar_vert_diffusion_coeff = params.scalar_vert_diffusion_coeff; + velocity_vort_horiz_diffusion_coeff = params.velocity_vort_horiz_diffusion_coeff; + velocity_vort_vert_diffusion_coeff = params.velocity_vort_vert_diffusion_coeff; + velocity_div_horiz_diffusion_coeff = params.velocity_div_horiz_diffusion_coeff; + velocity_div_vert_diffusion_coeff = params.velocity_div_vert_diffusion_coeff; + + scalar_diffusion_subtract_refstate = params.scalar_diffusion_subtract_refstate; + force_refstate_hydrostatic_balance = params.force_refstate_hydrostatic_balance; check_anelastic_constraint = params.check_anelastic_constraint; #if defined PAMC_AN || defined PAMC_MAN @@ -1272,7 +1279,7 @@ class ModelTendencies : public ExtrudedTendencies { yakl::timer_stop("compute_recons"); } - void add_scalar_diffusion(real scalar_diffusion_coeff, real5d denstendvar, + void add_scalar_diffusion(real scalar_horiz_diffusion_coeff, real scalar_vert_diffusion_coeff, real5d denstendvar, const real5d densvar, const real5d dens0var, const real5d Fdiffvar, const real5d FWdiffvar, FieldSet &auxiliary_vars) { @@ -1373,8 +1380,7 @@ class ModelTendencies : public ExtrudedTendencies { primal_geometry, dual_geometry, pis, pjs, pks, i, j, k, n); for (int d = 0; d < VS::ndensity_diffused; ++d) { - const real diff_tend = -scalar_diffusion_coeff * rho * Hn1bar_diag * - (hdiv(d) + vdiv(d)); + const real diff_tend = -scalar_horiz_diffusion_coeff * rho * Hn1bar_diag * hdiv(d) + -scalar_vert_diffusion_coeff * rho * Hn1bar_diag * vdiv(d); int dens_id = varset.diffused_dens_ids(d); denstendvar(dens_id, k + pks, j + pjs, i + pis, n) += diff_tend; } @@ -1384,7 +1390,8 @@ class ModelTendencies : public ExtrudedTendencies { } void add_velocity_diffusion_2d( - real velocity_coeff, real5d Vtendvar, real5d Wtendvar, const real5d Vvar, + real velocity_vort_horiz_diffusion_coeff, real velocity_vort_vert_diffusion_coeff, real velocity_div_horiz_diffusion_coeff, real velocity_div_vert_diffusion_coeff, + real5d Vtendvar, real5d Wtendvar, const real5d Vvar, const real5d Wvar, const real5d qhzedgereconvar, const real5d qhzvar, const real5d dens0var, const real5d Kvar, const real5d Fvar, const real5d FWvar, FieldSet &auxiliary_vars) { @@ -1465,21 +1472,21 @@ class ModelTendencies : public ExtrudedTendencies { SimpleBounds<4>(primal_topology.ni, primal_topology.n_cells_y, primal_topology.n_cells_x, primal_topology.nens), YAKL_LAMBDA(int k, int j, int i, int n) { - // *d(*d) + // *d(*d) = vort const real Dvert = compute_D0bar_vert<1>(qhzvar, dis, djs, dks, i, j, k, n); SArray Hnm11bar_diag; Hnm11bar_diagonal(Hnm11bar_diag, primal_geometry, dual_geometry, dis, djs, dks, i, j, k, n); Vtendvar(0, k + pks, j + pjs, i + pis, n) -= - velocity_coeff * Dvert * Hnm11bar_diag(0); + velocity_vort_horiz_diffusion_coeff * Dvert * Hnm11bar_diag(0); - // d(*d*) + // d(*d*) = div SArray vdiff; compute_D0<1>(vdiff, dens0var, pis, pjs, pks, i, j, k, n); for (int d = 0; d < ndims; ++d) { Vtendvar(d, pks + k, pjs + j, pis + i, n) -= - velocity_coeff * vdiff(0, d); + velocity_div_horiz_diffusion_coeff * vdiff(0, d); } }); @@ -1488,26 +1495,27 @@ class ModelTendencies : public ExtrudedTendencies { SimpleBounds<4>(primal_topology.nl, primal_topology.n_cells_y, primal_topology.n_cells_x, primal_topology.nens), YAKL_LAMBDA(int k, int j, int i, int n) { - // *d(*d) + // *d(*d) = vort SArray Dhorz; compute_D0bar_ext<1>(Dhorz, qhzvar, dis, djs, dks, i, j, k + 1, n); const real Hn0bar_diag = Hn0bar_diagonal( primal_geometry, dual_geometry, dis, djs, dks, i, j, k, n); Wtendvar(0, k + pks, j + pjs, i + pis, n) -= - velocity_coeff * Dhorz(0) * Hn0bar_diag; + velocity_vort_vert_diffusion_coeff * Dhorz(0) * Hn0bar_diag; - // d(*d*) + // d(*d*) = div SArray wdiff; compute_D0_vert<1>(wdiff, dens0var, pis, pjs, pks, i, j, k, n); Wtendvar(0, pks + k, pjs + j, pis + i, n) -= - velocity_coeff * wdiff(0); + velocity_div_vert_diffusion_coeff * wdiff(0); }); yakl::timer_stop("add_velocity_diffusion"); } void add_velocity_diffusion_3d( - real velocity_coeff, real5d Vtendvar, real5d Wtendvar, const real5d Vvar, + real velocity_vort_horiz_diffusion_coeff, real velocity_vort_vert_diffusion_coeff, real velocity_div_horiz_diffusion_coeff, real velocity_div_vert_diffusion_coeff, + real5d Vtendvar, real5d Wtendvar, const real5d Vvar, const real5d Wvar, const real5d qhzedgereconvar, const real5d qhzvar, const real5d dens0var, const real5d Kvar, const real5d Fvar, const real5d FWvar, const real5d qxyedgereconvar, const real5d qxyvar, @@ -2483,17 +2491,17 @@ class ModelTendencies : public ExtrudedTendencies { : std::nullopt); } - if (scalar_diffusion_coeff > 0) { + if (scalar_horiz_diffusion_coeff > 0 or scalar_vert_diffusion_coeff > 0) { add_scalar_diffusion( - scalar_diffusion_coeff, xtend.fields_arr[DENSVAR].data, + scalar_horiz_diffusion_coeff, scalar_vert_diffusion_coeff, xtend.fields_arr[DENSVAR].data, x.fields_arr[DENSVAR].data, auxiliary_vars.fields_arr[DENS0VAR].data, auxiliary_vars.fields_arr[FDIFFVAR].data, auxiliary_vars.fields_arr[FWDIFFVAR].data, auxiliary_vars); } - if (velocity_diffusion_coeff > 0) { + if (velocity_vort_horiz_diffusion_coeff > 0 or velocity_vort_vert_diffusion_coeff > 0 or velocity_div_horiz_diffusion_coeff > 0 or velocity_div_vert_diffusion_coeff > 0) { if (ndims == 1) { add_velocity_diffusion_2d( - velocity_diffusion_coeff, xtend.fields_arr[VVAR].data, + velocity_vort_horiz_diffusion_coeff, velocity_vort_vert_diffusion_coeff, velocity_div_horiz_diffusion_coeff, velocity_div_vert_diffusion_coeff, xtend.fields_arr[VVAR].data, xtend.fields_arr[WVAR].data, x.fields_arr[VVAR].data, x.fields_arr[WVAR].data, auxiliary_vars.fields_arr[QHZEDGERECONVAR].data, @@ -2504,7 +2512,7 @@ class ModelTendencies : public ExtrudedTendencies { auxiliary_vars.fields_arr[FWVAR].data, auxiliary_vars); } else { add_velocity_diffusion_3d( - velocity_diffusion_coeff, xtend.fields_arr[VVAR].data, + velocity_vort_horiz_diffusion_coeff, velocity_vort_vert_diffusion_coeff, velocity_div_horiz_diffusion_coeff, velocity_div_vert_diffusion_coeff, xtend.fields_arr[VVAR].data, xtend.fields_arr[WVAR].data, x.fields_arr[VVAR].data, x.fields_arr[WVAR].data, auxiliary_vars.fields_arr[QHZEDGERECONVAR].data, @@ -3785,17 +3793,18 @@ void read_model_params_file(std::string inFile, ModelParameters ¶ms, params.acoustic_balance = config["balance_initial_density"].as(false); params.uniform_vertical = (config["vcoords"].as() == "uniform"); // Read diffusion coefficients - params.scalar_diffusion_coeff = config["scalar_diffusion_coeff"].as(0); - params.scalar_diffusion_subtract_refstate = - config["scalar_diffusion_subtract_refstate"].as(true); - params.velocity_diffusion_coeff = - config["velocity_diffusion_coeff"].as(0); + params.scalar_horiz_diffusion_coeff = config["scalar_horiz_diffusion_coeff"].as(0); + params.scalar_vert_diffusion_coeff = config["scalar_vert_diffusion_coeff"].as(0); + params.velocity_vort_horiz_diffusion_coeff = config["velocity_vort_horiz_diffusion_coeff"].as(0); + params.velocity_vort_vert_diffusion_coeff = config["velocity_vort_vert_diffusion_coeff"].as(0); + params.velocity_div_horiz_diffusion_coeff = config["velocity_div_horiz_diffusion_coeff"].as(0); + params.velocity_div_vert_diffusion_coeff = config["velocity_div_vert_diffusion_coeff"].as(0); + + params.scalar_diffusion_subtract_refstate = config["scalar_diffusion_subtract_refstate"].as(true); // Read the data initialization options params.init_data = config["init_data"].as(); - params.force_refstate_hydrostatic_balance = - config["force_refstate_hydrostatic_balance"].as(false); - params.check_anelastic_constraint = - config["check_anelastic_constraint"].as(false); + params.force_refstate_hydrostatic_balance = config["force_refstate_hydrostatic_balance"].as(false); + params.check_anelastic_constraint = config["check_anelastic_constraint"].as(false); for (int i = 0; i < ntracers_dycore; i++) { params.init_dycore_tracer[i] = @@ -3825,9 +3834,13 @@ void read_model_params_coupler(ModelParameters ¶ms, Parallel &par, params.acoustic_balance = false; params.uniform_vertical = false; - params.scalar_diffusion_coeff = 0; + params.scalar_horiz_diffusion_coeff = 0; + params.scalar_vert_diffusion_coeff = 0; + params.velocity_vort_horiz_diffusion_coeff = 0; + params.velocity_vort_vert_diffusion_coeff = 0; + params.velocity_div_horiz_diffusion_coeff = 0; + params.velocity_div_vert_diffusion_coeff = 0; params.scalar_diffusion_subtract_refstate = true; - params.velocity_diffusion_coeff = 0; params.init_data = "coupler"; params.force_refstate_hydrostatic_balance = true; params.check_anelastic_constraint = false; @@ -3853,15 +3866,13 @@ void check_and_print_model_parameters(const ModelParameters ¶ms, serial_print("acoustically balanced: " + std::to_string(params.acoustic_balance), par.masterproc); - serial_print("scalar_diffusion_coeff: " + - std::to_string(params.scalar_diffusion_coeff), - par.masterproc); - serial_print("scalar_diffusion_subtract_refstate: " + - std::to_string(params.scalar_diffusion_subtract_refstate), - par.masterproc); - serial_print("velocity_diffusion_coeff: " + - std::to_string(params.velocity_diffusion_coeff), - par.masterproc); + serial_print("scalar_horiz_diffusion_coeff: " + std::to_string(params.scalar_horiz_diffusion_coeff), par.masterproc); + serial_print("scalar_vert_diffusion_coeff: " + std::to_string(params.scalar_vert_diffusion_coeff), par.masterproc); + serial_print("velocity_vort_horiz_diffusion_coeff: " + std::to_string(params.velocity_vort_horiz_diffusion_coeff), par.masterproc); + serial_print("velocity_vort_vert_diffusion_coeff: " + std::to_string(params.velocity_vort_vert_diffusion_coeff), par.masterproc); + serial_print("velocity_div_horiz_diffusion_coeff: " + std::to_string(params.velocity_div_horiz_diffusion_coeff), par.masterproc); + serial_print("velocity_div_vert_diffusion_coeff: " + std::to_string(params.velocity_div_vert_diffusion_coeff), par.masterproc); + serial_print("scalar_diffusion_subtract_refstate: " + std::to_string(params.scalar_diffusion_subtract_refstate), par.masterproc); for (int i = 0; i < ntracers_dycore; i++) { serial_print("Dycore Tracer" + std::to_string(i) + diff --git a/standalone/mmf_simplified/inputs/pamc_idealized/pamc_input_extruded_densitycurrent.yaml b/standalone/mmf_simplified/inputs/pamc_idealized/pamc_input_extruded_densitycurrent.yaml index 2db965cd..d20af5d0 100644 --- a/standalone/mmf_simplified/inputs/pamc_idealized/pamc_input_extruded_densitycurrent.yaml +++ b/standalone/mmf_simplified/inputs/pamc_idealized/pamc_input_extruded_densitycurrent.yaml @@ -4,8 +4,12 @@ verbose : true # Simulation time in seconds sim_time : 900 -scalar_diffusion_coeff : 75 -velocity_diffusion_coeff : 75 +scalar_horiz_diffusion_coeff : 75 +scalar_vert_diffusion_coeff : 75 +velocity_vort_horiz_diffusion_coeff : 75 +velocity_vort_vert_diffusion_coeff : 75 +velocity_div_horiz_diffusion_coeff : 75 +velocity_div_vert_diffusion_coeff : 75 # Number of cells to use crm_nx : 256 From 3cf8b842a3a049de871edd1a1a657e35a4f0ab9f Mon Sep 17 00:00:00 2001 From: Chris Eldred Date: Tue, 7 Nov 2023 13:53:24 -0700 Subject: [PATCH 2/4] fix 3D velocity diffusion --- dynamics/spam/src/models/extrudedmodel.h | 12 ++++++------ .../build/vcoords_equal_50_20km.nc | Bin 8600 -> 0 bytes .../mmf_simplified/pam-c/set_pamc_cmakevars.sh | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 standalone/mmf_simplified/build/vcoords_equal_50_20km.nc diff --git a/dynamics/spam/src/models/extrudedmodel.h b/dynamics/spam/src/models/extrudedmodel.h index 57be8e97..95a573a0 100644 --- a/dynamics/spam/src/models/extrudedmodel.h +++ b/dynamics/spam/src/models/extrudedmodel.h @@ -1537,7 +1537,7 @@ class ModelTendencies : public ExtrudedTendencies { YAKL_SCOPE(primal_geometry, this->primal_geometry); YAKL_SCOPE(dual_geometry, this->dual_geometry); - // *d*d + // *d*d = vort parallel_for( "Velocity diffusion 1", SimpleBounds<4>(primal_topology.nl, primal_topology.n_cells_y, @@ -1607,7 +1607,7 @@ class ModelTendencies : public ExtrudedTendencies { i, j, k, n); for (int d = 0; d < ndims; ++d) { Vtendvar(d, k + pks, j + pjs, i + pis, n) += - velocity_coeff * vdiff(d); + velocity_vort_horiz_diffusion_coeff * vdiff(d); } }); @@ -1621,10 +1621,10 @@ class ModelTendencies : public ExtrudedTendencies { wdiff, FWvar, primal_geometry, dual_geometry, pis, pjs, pks, i, j, k, n); Wtendvar(0, k + pks, j + pjs, i + pis, n) += - velocity_coeff * wdiff(0); + velocity_vort_vert_diffusion_coeff * wdiff(0); }); - // d*d* + // d*d* = div parallel_for( "Velocity diffusion 7", SimpleBounds<4>(dual_topology.nl, dual_topology.n_cells_y, @@ -1679,7 +1679,7 @@ class ModelTendencies : public ExtrudedTendencies { compute_D0<1>(vdiff, dens0var, pis, pjs, pks, i, j, k, n); for (int d = 0; d < ndims; ++d) { Vtendvar(d, pks + k, pjs + j, pis + i, n) -= - velocity_coeff * vdiff(0, d); + velocity_div_horiz_diffusion_coeff * vdiff(0, d); } }); @@ -1691,7 +1691,7 @@ class ModelTendencies : public ExtrudedTendencies { SArray wdiff; compute_D0_vert<1>(wdiff, dens0var, pis, pjs, pks, i, j, k, n); Wtendvar(0, pks + k, pjs + j, pis + i, n) -= - velocity_coeff * wdiff(0); + velocity_div_vert_diffusion_coeff * wdiff(0); }); yakl::timer_stop("add_velocity_diffusion"); diff --git a/standalone/mmf_simplified/build/vcoords_equal_50_20km.nc b/standalone/mmf_simplified/build/vcoords_equal_50_20km.nc deleted file mode 100644 index e7e7104d0323c838d47a5a4a6121e332cac19086..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8600 zcmeI1O>7%Q6vv;vcI1X_o6w>FYQ>~Q93Zlsl7=1#IM~jIaGelW6(A&QW3TI#?6tAi z5#hoqQhRGFgu;bNd`J`_HB?YUTU0|oft0TbsmEN9$`Oe}ZsomwGj^ILQaK{cbG$## z?99Bk|MzBOE5|01V_Ul)?+!*HpzN-+#eVLI$s4!-xpZ@CA~_S>dO8r?<98ZCc~8w* z&+Z@uXh=^FUH_KDU!ewB7lW>5k*)@q5P=Xt!EWU1PR(W@t zZ0AVH6ZvYjUT|E?vm4@w?b>zxR1mZC?M7}+&d8PRIlJ75*5;$;Ucj&n*uuVwO*h|m z6qb(cH=9=3e4e}-_}YmtcsmBY;zgW97KfpSVCb%aBLZlCA1!;YnJ>^o84#8$c-7i} zTjS`hxH$|c39VsL6fQmp^k5Jwj*a~9lVL23ZyDgEK_GyWIofCCT}5Lj1>W2L1WAu3 zpf3V_@8GAfpFpFV6L_7}K|9HSM|SxWj1a6(ylR`z&`<+2?WZ-79?fR`gi=9JLX(pR zQ)7T zdNAcbV;mQufDVe zrBx#j(;OoJf(WoECz}bbzfDf3Jvfwtp5Q~NS`^Bc$lK+z=r}afB%T4=p@;Tzr~1>A z*+cLcu0b2458srmjdr#lk$;?$f&i<3+^MV$UG2POyhmo1mB$!)oJozPW>T3%D(8C~ z#;|Fzg5_Ba+v~V)mncN&tZDDB4f3f(^xffQ>BMs(ibxex*XE}K9_wL$Tl=R&E|Zw9 zS8H@&+guGwSd^2t%gDX~+(EeWM~0#YqJsmaLUI4dV017R9d6|>f2;z~)CyXW8cKr5gX&41=HndqF=p$eY`@QppOXC_GFLuf!fB@XoEbmEjD5juon=mc$z1u0S^Js^ z-!PA#XNrr=rEi(>OUzP>8T*d8D%tv;+ea@mr>`&{y~ Date: Tue, 7 Nov 2023 14:18:32 -0700 Subject: [PATCH 3/4] fix run scripts --- dynamics/spam/CMakeLists.txt | 3 -- .../pam-c/debug_run_extruded_script.sh | 7 ---- .../pam-c/debug_run_layer_script.sh | 7 ---- .../mmf_simplified/pam-c/make_debug_script.sh | 4 --- .../mmf_simplified/pam-c/make_script.sh | 4 --- .../pam-c/run_extruded_script.sh | 33 ++++++++++++++++--- .../mmf_simplified/pam-c/run_layer_script.sh | 24 ++++++++++++-- .../pam-c/set_pamc_cmakevars.sh | 9 ----- 8 files changed, 50 insertions(+), 41 deletions(-) delete mode 100755 standalone/mmf_simplified/pam-c/debug_run_extruded_script.sh delete mode 100755 standalone/mmf_simplified/pam-c/debug_run_layer_script.sh delete mode 100755 standalone/mmf_simplified/pam-c/make_debug_script.sh delete mode 100755 standalone/mmf_simplified/pam-c/make_script.sh delete mode 100644 standalone/mmf_simplified/pam-c/set_pamc_cmakevars.sh diff --git a/dynamics/spam/CMakeLists.txt b/dynamics/spam/CMakeLists.txt index d696e871..736a37a8 100644 --- a/dynamics/spam/CMakeLists.txt +++ b/dynamics/spam/CMakeLists.txt @@ -14,7 +14,6 @@ target_include_directories(dycore INTERFACE src/operators) target_include_directories(dycore INTERFACE src/timesteppers) target_include_directories(dycore INTERFACE src/hamiltonians) target_include_directories(dycore INTERFACE src/grids) -target_include_directories(dycore INTERFACE src/common) target_include_directories(dycore INTERFACE src/io) target_include_directories(dycore INTERFACE src/core) @@ -84,5 +83,3 @@ endif() if ("${PAMC_IO}" STREQUAL "none") target_compile_definitions(dycore INTERFACE -DPAMC_NOIO) endif() - - diff --git a/standalone/mmf_simplified/pam-c/debug_run_extruded_script.sh b/standalone/mmf_simplified/pam-c/debug_run_extruded_script.sh deleted file mode 100755 index b54ccda3..00000000 --- a/standalone/mmf_simplified/pam-c/debug_run_extruded_script.sh +++ /dev/null @@ -1,7 +0,0 @@ -rm *.png *.nc -cd ../build -rm driver -./../pam-c/make_debug_script.sh $3 -mpirun.mpich -n $3 ./driver ../inputs/pamc_input_extruded_$2.yaml -cd ../pam-c -mv ../build/*.nc . diff --git a/standalone/mmf_simplified/pam-c/debug_run_layer_script.sh b/standalone/mmf_simplified/pam-c/debug_run_layer_script.sh deleted file mode 100755 index 2eebc10f..00000000 --- a/standalone/mmf_simplified/pam-c/debug_run_layer_script.sh +++ /dev/null @@ -1,7 +0,0 @@ -rm *.png *.nc -cd ../build -rm driver -./../pam-c/make_debug_script.sh -mpirun.mpich -n $3 ./driver ../inputs/pamc_input_layer_$2.yaml -cd ../pam-c -mv ../build/*.nc . diff --git a/standalone/mmf_simplified/pam-c/make_debug_script.sh b/standalone/mmf_simplified/pam-c/make_debug_script.sh deleted file mode 100755 index 2fc51469..00000000 --- a/standalone/mmf_simplified/pam-c/make_debug_script.sh +++ /dev/null @@ -1,4 +0,0 @@ -cd ../build -source ../../machines/linux_laptop_gnu_mpi_cpu_debug.env -./cmakescript_pamc.sh ../pam-c/set_pamc_cmakevars.sh -make -j $1 diff --git a/standalone/mmf_simplified/pam-c/make_script.sh b/standalone/mmf_simplified/pam-c/make_script.sh deleted file mode 100755 index 306b8166..00000000 --- a/standalone/mmf_simplified/pam-c/make_script.sh +++ /dev/null @@ -1,4 +0,0 @@ -cd ../build -source ../../machines/linux_laptop_gnu_mpi_cpu.env -./cmakescript_pamc.sh ../pam-c/set_pamc_cmakevars.sh -make -j $1 diff --git a/standalone/mmf_simplified/pam-c/run_extruded_script.sh b/standalone/mmf_simplified/pam-c/run_extruded_script.sh index 138658fe..5ea4e10e 100755 --- a/standalone/mmf_simplified/pam-c/run_extruded_script.sh +++ b/standalone/mmf_simplified/pam-c/run_extruded_script.sh @@ -1,9 +1,34 @@ +#clean up any existing files rm *.png *.nc cd ../build rm driver -./../pam-c/make_script.sh $3 -mpirun.mpich -n $3 ./driver ../inputs/pamc_input_extruded_$2.yaml + +#build model +source ../../machines/linux_laptop_gnu_mpi_cpu.env +./cmakescript_pamc.sh PAM_SGS=none PAM_MICRO=none PAMC_MODEL=extrudedmodel PAMC_HAMIL=an PAMC_THERMO=idealgaspottemp PAMC_IO=serial +make -j 4 + +#linux_laptop_gnu_mpi_cpu_debug linux_laptop_gnu_mpi_cpu +#p3 none +#shoc none +#ce mce_rho an man +#idealgaspottemp constkappavirpottemp + + +#run model +mpirun.mpich -n $1 ./driver ../inputs/pamc_idealized/pamc_input_extruded_densitycurrent.yaml cd ../pam-c mv ../build/*.nc . -python3 plot_extrudedmodel2D.py $1 -#python3 plot_extrudedmodel2D_parallel.py $1 ../inputs/pamc_input_extruded_$2.yaml $3 + +#pamc_input_extruded_densitycurrent +#pamc_input_extruded_gravitywave +#pamc_input_extruded_largerisingbubble +#pamc_input_extruded_moistrisingbubble +#pamc_input_extruded_risingbubble +#pamc_input_extruded_twobubbles + + +#plot model +python3 plot_extrudedmodel2D.py an + +#an ce man mce diff --git a/standalone/mmf_simplified/pam-c/run_layer_script.sh b/standalone/mmf_simplified/pam-c/run_layer_script.sh index 8bf08767..520f40e7 100755 --- a/standalone/mmf_simplified/pam-c/run_layer_script.sh +++ b/standalone/mmf_simplified/pam-c/run_layer_script.sh @@ -1,8 +1,26 @@ +#clean up any existing files rm *.png *.nc cd ../build rm driver -./../pam-c/make_script.sh $3 -mpirun.mpich -n $3 ./driver ../inputs/pamc_input_layer_$2.yaml + +#build model +source ../../machines/linux_laptop_gnu_mpi_cpu.env +./cmakescript_pamc.sh PAM_SGS=none PAM_MICRO=none PAMC_MODEL=layermodel PAMC_HAMIL=tswe PAMC_THERMO=none PAMC_IO=serial +make -j 4 + +#linux_laptop_gnu_mpi_cpu_debug linux_laptop_gnu_mpi_cpu +#swe tswe + +#run model +mpirun.mpich -n $1 ./driver ../inputs/pamc_idealized/pamc_input_layer_doublevortex.yaml cd ../pam-c mv ../build/*.nc . -python3 plot_layermodel2D.py $1 + +#pamc_input_layer_bickleyjet +#pamc_input_layer_doublevortex + + +#plot model +python3 plot_layermodel2D.py tswe + +#swe tswe diff --git a/standalone/mmf_simplified/pam-c/set_pamc_cmakevars.sh b/standalone/mmf_simplified/pam-c/set_pamc_cmakevars.sh deleted file mode 100644 index 6a13aac8..00000000 --- a/standalone/mmf_simplified/pam-c/set_pamc_cmakevars.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -add_cmake_vars=" -DPAMC_MODEL=extrudedmodel " -add_cmake_vars+=" -DPAMC_HAMIL=an " -add_cmake_vars+=" -DPAMC_THERMO=idealgaspottemp " -add_cmake_vars+=" -DPAMC_IO=serial " - -#ce mce_rho an man -#idealgaspottemp constkappavirpottemp From d77c5cb16efb47f359cd1c356ebacd23b48cd834 Mon Sep 17 00:00:00 2001 From: Chris Eldred Date: Tue, 7 Nov 2023 14:31:20 -0700 Subject: [PATCH 4/4] restore missing vcoords file --- .../build/vcoords_equal_50_20km.nc | Bin 0 -> 8600 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 standalone/mmf_simplified/build/vcoords_equal_50_20km.nc diff --git a/standalone/mmf_simplified/build/vcoords_equal_50_20km.nc b/standalone/mmf_simplified/build/vcoords_equal_50_20km.nc new file mode 100644 index 0000000000000000000000000000000000000000..e7e7104d0323c838d47a5a4a6121e332cac19086 GIT binary patch literal 8600 zcmeI1O>7%Q6vv;vcI1X_o6w>FYQ>~Q93Zlsl7=1#IM~jIaGelW6(A&QW3TI#?6tAi z5#hoqQhRGFgu;bNd`J`_HB?YUTU0|oft0TbsmEN9$`Oe}ZsomwGj^ILQaK{cbG$## z?99Bk|MzBOE5|01V_Ul)?+!*HpzN-+#eVLI$s4!-xpZ@CA~_S>dO8r?<98ZCc~8w* z&+Z@uXh=^FUH_KDU!ewB7lW>5k*)@q5P=Xt!EWU1PR(W@t zZ0AVH6ZvYjUT|E?vm4@w?b>zxR1mZC?M7}+&d8PRIlJ75*5;$;Ucj&n*uuVwO*h|m z6qb(cH=9=3e4e}-_}YmtcsmBY;zgW97KfpSVCb%aBLZlCA1!;YnJ>^o84#8$c-7i} zTjS`hxH$|c39VsL6fQmp^k5Jwj*a~9lVL23ZyDgEK_GyWIofCCT}5Lj1>W2L1WAu3 zpf3V_@8GAfpFpFV6L_7}K|9HSM|SxWj1a6(ylR`z&`<+2?WZ-79?fR`gi=9JLX(pR zQ)7T zdNAcbV;mQufDVe zrBx#j(;OoJf(WoECz}bbzfDf3Jvfwtp5Q~NS`^Bc$lK+z=r}afB%T4=p@;Tzr~1>A z*+cLcu0b2458srmjdr#lk$;?$f&i<3+^MV$UG2POyhmo1mB$!)oJozPW>T3%D(8C~ z#;|Fzg5_Ba+v~V)mncN&tZDDB4f3f(^xffQ>BMs(ibxex*XE}K9_wL$Tl=R&E|Zw9 zS8H@&+guGwSd^2t%gDX~+(EeWM~0#YqJsmaLUI4dV017R9d6|>f2;z~)CyXW8cKr5gX&41=HndqF=p$eY`@QppOXC_GFLuf!fB@XoEbmEjD5juon=mc$z1u0S^Js^ z-!PA#XNrr=rEi(>OUzP>8T*d8D%tv;+ea@mr>`&{y~