Skip to content

Commit

Permalink
fix albedo initialization order of operations and update icepack (CIC…
Browse files Browse the repository at this point in the history
  • Loading branch information
apcraig authored Mar 6, 2020
1 parent abc7b5a commit 7e2a1d9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
23 changes: 16 additions & 7 deletions cicecore/shared/ice_init_column.F90
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,6 @@ subroutine init_shortwave

allocate(ztrcr_sw(nbtrcr_sw, ncat))

!!$OMP PARALLEL DO PRIVATE(iblk,i,j,n,ilo,ihi,jlo,jhi,this_block, &
!!$OMP l_print_point,debug,ipoint)
do iblk=1,nblocks

! Initialize
Expand Down Expand Up @@ -387,12 +385,18 @@ subroutine init_shortwave
enddo
endif

enddo ! i
enddo ! j

!-----------------------------------------------------------------
! Aggregate albedos
! Match loop order in coupling_prep for same order of operations
!-----------------------------------------------------------------

do n = 1, ncat

do n = 1, ncat
do j = jlo, jhi
do i = ilo, ihi

if (aicen(i,j,n,iblk) > puny) then

alvdf(i,j,iblk) = alvdf(i,j,iblk) &
Expand Down Expand Up @@ -422,7 +426,12 @@ subroutine init_shortwave

endif ! aicen > puny

enddo ! ncat
enddo ! i
enddo ! j
enddo ! ncat

do j = 1, ny_block
do i = 1, nx_block

!----------------------------------------------------------------
! Store grid box mean albedos and fluxes before scaling by aice
Expand All @@ -432,14 +441,14 @@ subroutine init_shortwave
alidf_ai (i,j,iblk) = alidf (i,j,iblk)
alvdr_ai (i,j,iblk) = alvdr (i,j,iblk)
alidr_ai (i,j,iblk) = alidr (i,j,iblk)

! for history averaging
!echmod? cszn = c0
!echmod if (coszen(i,j,iblk) > puny) cszn = c1
!echmod do n = 1, nstreams
!echmod albcnt(i,j,iblk,n) = albcnt(i,j,iblk,n) + cszn
!echmod enddo

!----------------------------------------------------------------
! Save net shortwave for scaling factor in scale_factor
!----------------------------------------------------------------
Expand Down

0 comments on commit 7e2a1d9

Please sign in to comment.