From 0721ce14a56fec6c8e029e148c7b9a71806ece68 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunke Date: Fri, 8 Jun 2018 18:45:39 -0600 Subject: [PATCH 1/2] mask restoring variables --- .../cicedynB/infrastructure/ice_restoring.F90 | 24 +++++++++++++++++-- .../scripts/options/set_nml.boxrestore | 2 +- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/cicecore/cicedynB/infrastructure/ice_restoring.F90 b/cicecore/cicedynB/infrastructure/ice_restoring.F90 index 465f6845e..641b64b98 100644 --- a/cicecore/cicedynB/infrastructure/ice_restoring.F90 +++ b/cicecore/cicedynB/infrastructure/ice_restoring.F90 @@ -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) * tmask(i,j,iblk) + vicen_rest(i,j,n,iblk) = vicen_rest(i,j,n,iblk) * tmask(i,j,iblk) + vsnon_rest(i,j,n,iblk) = vsnon_rest(i,j,n,iblk) * tmask(i,j,iblk) + do nt = 1, ntrcr + trcrn_rest(i,j,nt,n,iblk) = trcrn_rest(i,j,nt,n,iblk) & + * tmask(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 From 87d1463e8c613a5410d9567daae2e2524b1d2b5d Mon Sep 17 00:00:00 2001 From: eclare Date: Mon, 18 Jun 2018 07:16:18 -0600 Subject: [PATCH 2/2] change tmask to hm --- cicecore/cicedynB/infrastructure/ice_restoring.F90 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cicecore/cicedynB/infrastructure/ice_restoring.F90 b/cicecore/cicedynB/infrastructure/ice_restoring.F90 index 641b64b98..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 @@ -262,12 +262,12 @@ subroutine ice_HaloRestore_init 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) * tmask(i,j,iblk) - vicen_rest(i,j,n,iblk) = vicen_rest(i,j,n,iblk) * tmask(i,j,iblk) - vsnon_rest(i,j,n,iblk) = vsnon_rest(i,j,n,iblk) * tmask(i,j,iblk) + 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) & - * tmask(i,j,iblk) + * hm(i,j,iblk) enddo enddo enddo