From f309506bb6ae92eb205d358576b311f48013ebe9 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunke Date: Tue, 19 Jun 2018 16:50:21 -0600 Subject: [PATCH] mask restoring variables (#149) * mask restoring variables * change tmask to hm --- .../cicedynB/infrastructure/ice_restoring.F90 | 26 ++++++++++++++++--- .../scripts/options/set_nml.boxrestore | 2 +- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/cicecore/cicedynB/infrastructure/ice_restoring.F90 b/cicecore/cicedynB/infrastructure/ice_restoring.F90 index 465f6845e..67edd6f44 100644 --- a/cicecore/cicedynB/infrastructure/ice_restoring.F90 +++ b/cicecore/cicedynB/infrastructure/ice_restoring.F90 @@ -58,7 +58,7 @@ subroutine ice_HaloRestore_init use ice_communicate, only: my_task, master_task use ice_domain, only: ew_boundary_type, ns_boundary_type, & nblocks, blocks_ice - use ice_grid, only: tmask + use ice_grid, only: tmask, hm use ice_flux, only: sst, Tf, Tair, salinz, Tmltz use ice_restart_shared, only: restart_ext @@ -86,8 +86,8 @@ subroutine ice_HaloRestore_init if (icepack_warnings_aborted()) call abort_ice(error_message="subname", & file=__FILE__, line=__LINE__) - if (ew_boundary_type == 'open' .and. & - ns_boundary_type == 'open' .and. .not.(restart_ext)) then + if ((ew_boundary_type == 'open' .or. & + ns_boundary_type == 'open') .and. .not.(restart_ext)) then if (my_task == master_task) write (nu_diag,*) 'ERROR: restart_ext=F and open boundaries' call abort_ice(error_message="subname"//'open boundary and restart_ext=F', & file=__FILE__, line=__LINE__) @@ -254,6 +254,26 @@ subroutine ice_HaloRestore_init endif ! restore_ic + !----------------------------------------------------------------- + ! Impose land mask + !----------------------------------------------------------------- + + do iblk = 1, nblocks + do n = 1, ncat + do j = 1, ny_block + do i = 1, nx_block + aicen_rest(i,j,n,iblk) = aicen_rest(i,j,n,iblk) * hm(i,j,iblk) + vicen_rest(i,j,n,iblk) = vicen_rest(i,j,n,iblk) * hm(i,j,iblk) + vsnon_rest(i,j,n,iblk) = vsnon_rest(i,j,n,iblk) * hm(i,j,iblk) + do nt = 1, ntrcr + trcrn_rest(i,j,nt,n,iblk) = trcrn_rest(i,j,nt,n,iblk) & + * hm(i,j,iblk) + enddo + enddo + enddo + enddo + enddo + if (my_task == master_task) & write (nu_diag,*) 'ice restoring timescale = ',trestore,' days' diff --git a/configuration/scripts/options/set_nml.boxrestore b/configuration/scripts/options/set_nml.boxrestore index 130220cc1..40d3c4e52 100644 --- a/configuration/scripts/options/set_nml.boxrestore +++ b/configuration/scripts/options/set_nml.boxrestore @@ -1,6 +1,6 @@ ice_ic = 'default' restart = .false. -restart_ext = .false. +restart_ext = .true. use_leap_years = .true. ndtd = 2 kcatbound = 1