Skip to content

Commit

Permalink
fixed whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
japham0 committed Jul 2, 2024
1 parent f953b42 commit 7797123
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Docs/sphinx_doc/CouplingToWW3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Coupling To WW3
===============

Coupling with WaveWatch III is currently a work in progress.
Currently, we have a one-way coupling between ERF and WaveWatch III (WW3), where WW3 sends ERF Hwave (significant wave height) and Lwave (mean wavelength) over a grid.
Currently, we have a one-way coupling between ERF and WaveWatch III (WW3), where WW3 sends ERF Hwave (significant wave height) and Lwave (mean wavelength) over a grid.

One-way coupling WW3 to ERF
---------------------------
Expand Down
4 changes: 2 additions & 2 deletions Exec/ABL/inputs_mpmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ amrex.fpe_trap_invalid = 0
fabarray.mfiter_tile_size = 1024 1024 1024

# PROBLEM SIZE & GEOMETRY
geometry.prob_extent = 191000 91000 1024
amr.n_cell = 191 91 4
geometry.prob_extent = 191 91 1024
amr.n_cell = 191 91 4

geometry.is_periodic = 1 1 0

Expand Down
8 changes: 4 additions & 4 deletions Source/ERF_read_waves.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,19 +171,19 @@ ERF::send_waves (int lev)
magnitude(i,j,k) = std::sqrt( pow(u(i,j,k), 2) + pow(v(i,j,k), 2) );

double u_val = u(i, j, k);

double v_val = v(i, j, k);
if ( u_val == 0 ) {
u_val = std::max( u_val, 1e-15 ); // Ensure u_val is non-zero
}


if ( u(i,j,k) < 0 && v(i,j,k) > 0 || u(i,j,k) < 0 && v(i,j,k) < 0 ) {
if ( u_val < 0 && v_val > 0 || u_val < 0 && v_val < 0 ) {

theta(i,j,k) = PI + ( atan( v(i,j,k) / u(i,j,k) ) );
theta(i,j,k) = PI + ( atan( v_val / u_val ) );

} else {

theta(i,j,k) = atan ( v(i,j,k) / u(i,j,k) );
theta(i,j,k) = atan ( v_val / u_val );
}


Expand Down

0 comments on commit 7797123

Please sign in to comment.