Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mask restoring variables #149

Merged
merged 2 commits into from
Jun 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions cicecore/cicedynB/infrastructure/ice_restoring.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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__)
Expand Down Expand Up @@ -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'

Expand Down
2 changes: 1 addition & 1 deletion configuration/scripts/options/set_nml.boxrestore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ice_ic = 'default'
restart = .false.
restart_ext = .false.
restart_ext = .true.
use_leap_years = .true.
ndtd = 2
kcatbound = 1
Expand Down