Skip to content

Commit

Permalink
Set up auxiliary domain for unrotated grid
Browse files Browse the repository at this point in the history
  When ROTATE_INDEX is true, the model keeps both its rotated internal grid and
an unrotated grid for setting initialization and forcing.  When the model is run
in symmetric memory mode, there is an auxiliary non-symmetric domain that is
needed for reading in fields at velocity points.  The auxiliary domain in the
unrotated grid (G_in) was not being set previously, causing the model to fail to
run some cases when ROTATE_INDEX was true.  That auxiliary domain in the
unrotated grid is now being set up properly.  All answers and output are bitwise
identical for any cases that worked previously.
  • Loading branch information
Hallberg-NOAA authored and marshallward committed Mar 27, 2024
1 parent 37ff301 commit 2b59089
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2904,6 +2904,11 @@ subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, &
if (CS%rotate_index) then
G_in%ke = GV%ke

! Allocate the auxiliary non-symmetric domain for debugging or I/O purposes.
if (CS%debug .or. G_in%symmetric) then
call clone_MOM_domain(G_in%Domain, G_in%Domain_aux, symmetric=.false.)
else ; G_in%Domain_aux => G_in%Domain ; endif

allocate(u_in(G_in%IsdB:G_in%IedB, G_in%jsd:G_in%jed, nz), source=0.0)
allocate(v_in(G_in%isd:G_in%ied, G_in%JsdB:G_in%JedB, nz), source=0.0)
allocate(h_in(G_in%isd:G_in%ied, G_in%jsd:G_in%jed, nz), source=GV%Angstrom_H)
Expand Down

0 comments on commit 2b59089

Please sign in to comment.