Skip to content

Commit

Permalink
Refactor boxslotcyl advection test to use icepack parameters (#358)
Browse files Browse the repository at this point in the history
* Refactor boxslotcyl initialization to use icepack parameters

* Fix documentation typo

* Correct use statement rename syntax

* Change days_to_s to secday
  • Loading branch information
phil-blain authored and eclare108213 committed Aug 30, 2019
1 parent 804b703 commit 1a38c6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions cicecore/cicedynB/general/ice_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1927,9 +1927,10 @@ subroutine boxslotcyl_data_vel(i, j, &
iglob, jglob, &
uvel, vvel)

use ice_constants, only: c1, c4, c2, c12, p5, cm_to_m
use ice_constants, only: c2, c12, p5, cm_to_m
use ice_domain_size, only: nx_global, ny_global
use ice_grid, only: dxrect
use icepack_parameters, only: secday, pi

integer (kind=int_kind), intent(in) :: &
i, j, & ! local indices
Expand All @@ -1946,15 +1947,11 @@ subroutine boxslotcyl_data_vel(i, j, &
max_vel , & ! max velocity
domain_length , & ! physical domain length
period ! rotational period

real (kind=dbl_kind), parameter :: &
pi = c4*atan(c1), & ! pi
days_to_s = 86400._dbl_kind

character(len=*), parameter :: subname = '(boxslotcyl_data_vel)'

domain_length = dxrect*cm_to_m*nx_global
period = c12*days_to_s ! 12 days rotational period
period = c12*secday ! 12 days rotational period
max_vel = pi*domain_length/period

uvel(i,j) = c2*max_vel*(real(jglob(j), kind=dbl_kind) - p5) &
Expand Down
2 changes: 1 addition & 1 deletion doc/source/user_guide/ug_testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ Below is an example of a step-by-step procedure for testing a code change that m
# Create a baseline dataset (only necessary if no baseline exists on the system)
# git clone the baseline code
./cice.setup -m onyx -e intel --suite base_suite --testid base0 -bgen cice.my.baseline
./cice.setup -m onyx -e intel --suite base_suite --testid base0 --bgen cice.my.baseline
# Run the test suite with the new code
# git clone the new code
Expand Down

0 comments on commit 1a38c6d

Please sign in to comment.