Skip to content

Commit 883ef69

Browse files
committed
Merging trunk r277:281 into release, including bug fix in ice_history.F90 for
allocatable arrays.
1 parent 2f9149d commit 883ef69

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

drivers/cice4/CICE_RunMod.F90_debug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@
411411
enddo ! i
412412
enddo ! j
413413

414-
if (calc_Tsfc .or. calc_strair .and. icells > 0) then
414+
if ((calc_Tsfc .or. calc_strair) .and. icells > 0) then
415415

416416
!-----------------------------------------------------------------
417417
! Atmosphere boundary layer calculation; compute coefficients

source/ice_history.F90

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,11 +1344,11 @@ subroutine init_hist (dt)
13441344
!-----------------------------------------------------------------
13451345
! initialize the history arrays
13461346
!-----------------------------------------------------------------
1347-
a2D(:,:,:,:) = c0
1348-
a3Dc(:,:,:,:,:) = c0
1349-
a3Dz(:,:,:,:,:) = c0
1350-
a4Di(:,:,:,:,:,:) = c0
1351-
a4Ds(:,:,:,:,:,:) = c0
1347+
if (allocated(a2D)) a2D (:,:,:,:) = c0
1348+
if (allocated(a3Dc)) a3Dc(:,:,:,:,:) = c0
1349+
if (allocated(a3Dz)) a3Dz(:,:,:,:,:) = c0
1350+
if (allocated(a4Di)) a4Di(:,:,:,:,:,:) = c0
1351+
if (allocated(a4Ds)) a4Ds(:,:,:,:,:,:) = c0
13521352
avgct(:) = c0
13531353
albcnt(:,:,:,:) = c0
13541354

@@ -1982,11 +1982,11 @@ subroutine ice_write_hist (dt)
19821982
! reset to zero
19831983
!------------------------------------------------------------
19841984
if (write_ic) then
1985-
a2D(:,:,:,:) = c0
1986-
a3Dc(:,:,:,:,:) = c0
1987-
a3Dz(:,:,:,:,:) = c0
1988-
a4Di(:,:,:,:,:,:) = c0
1989-
a4Ds(:,:,:,:,:,:) = c0
1985+
if (allocated(a2D)) a2D (:,:,:,:) = c0
1986+
if (allocated(a3Dc)) a3Dc(:,:,:,:,:) = c0
1987+
if (allocated(a3Dz)) a3Dz(:,:,:,:,:) = c0
1988+
if (allocated(a4Di)) a4Di(:,:,:,:,:,:) = c0
1989+
if (allocated(a4Ds)) a4Ds(:,:,:,:,:,:) = c0
19901990
avgct(:) = c0
19911991
albcnt(:,:,:,:) = c0
19921992
write_ic = .false. ! write initial condition once at most

0 commit comments

Comments
 (0)