Skip to content

Commit

Permalink
Initialize visc%Kv_slow and update halos
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavo-marques committed Apr 13, 2018
1 parent 0c363ae commit 60f7d66
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2292,6 +2292,9 @@ subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, restart_CSp, &
if (associated(CS%visc%Kv_shear)) &
call pass_var(CS%visc%Kv_shear, G%Domain, To_All+Omit_Corners, halo=1)

if (associated(CS%visc%Kv_slow)) &
call pass_var(CS%visc%Kv_slow, G%Domain, To_All+Omit_Corners, halo=1)

call cpu_clock_end(id_clock_pass_init)

call register_obsolete_diagnostics(param_file, CS%diag)
Expand Down
4 changes: 3 additions & 1 deletion src/parameterizations/vertical/MOM_set_viscosity.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1811,7 +1811,9 @@ subroutine set_visc_register_restarts(HI, GV, param_file, visc, restart_CS)
allocate(visc%Kd_shear(isd:ied,jsd:jed,nz+1)) ; visc%Kd_shear(:,:,:) = 0.0
allocate(visc%TKE_turb(isd:ied,jsd:jed,nz+1)) ; visc%TKE_turb(:,:,:) = 0.0
allocate(visc%Kv_shear(isd:ied,jsd:jed,nz+1)) ; visc%Kv_shear(:,:,:) = 0.0
allocate(visc%Kv_slow(isd:ied,jsd:jed,nz+1)) ; visc%Kv_slow(:,:,:) = 0.0

! MOM_bkgnd_mixing is always used, so always allocate visc%Kv_slow. GMM
allocate(visc%Kv_slow(isd:ied,jsd:jed,nz+1)) ; visc%Kv_slow(:,:,:) = 0.0

vd = var_desc("Kd_shear","m2 s-1","Shear-driven turbulent diffusivity at interfaces", &
hor_grid='h', z_grid='i')
Expand Down

0 comments on commit 60f7d66

Please sign in to comment.