From 1c1962bd45b9bcd64a87005cf585d6473e428c84 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunke Date: Wed, 30 Dec 2020 10:44:35 -0700 Subject: [PATCH] zsalinity bug fix --- columnphysics/icepack_zbgc.F90 | 9 ++++----- configuration/driver/icedrv_init_column.F90 | 19 ++++++++++--------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/columnphysics/icepack_zbgc.F90 b/columnphysics/icepack_zbgc.F90 index a21fc2c42..077268797 100644 --- a/columnphysics/icepack_zbgc.F90 +++ b/columnphysics/icepack_zbgc.F90 @@ -78,9 +78,9 @@ subroutine add_new_ice_bgc (dt, nblyr, & integer (kind=int_kind), intent(in) :: & nblyr , & ! number of bio layers - ncat , & ! number of thickness categories - nilyr , & ! number of ice layers - nltrcr, & ! number of zbgc tracers + ncat , & ! number of thickness categories + nilyr , & ! number of ice layers + nltrcr , & ! number of zbgc tracers nbtrcr , & ! number of biology tracers ntrcr ! number of tracers in use @@ -525,7 +525,7 @@ subroutine adjust_tracer_profile (nbtrcr, dt, ntrcr, & do k = 1, nilyr trcrn(nt_sice+k-1) = trtmp(nt_sice+k-1) enddo !k - endif ! solve_zsal + endif ! solve_zsal endif ! location @@ -534,7 +534,6 @@ end subroutine adjust_tracer_profile !======================================================================= !autodocument_start icepack_init_bgc ! - subroutine icepack_init_bgc(ncat, nblyr, nilyr, ntrcr_o, & cgrid, igrid, ntrcr, nbtrcr, & sicen, trcrn, sss, ocean_bio_all) diff --git a/configuration/driver/icedrv_init_column.F90 b/configuration/driver/icedrv_init_column.F90 index 582f17a5e..d8deade79 100644 --- a/configuration/driver/icedrv_init_column.F90 +++ b/configuration/driver/icedrv_init_column.F90 @@ -480,15 +480,6 @@ subroutine init_bgc() do i = 1, nx - do n = 1, ncat - do k = 1, nilyr - sicen(k,n) = trcrn(i,nt_sice+k-1,n) - enddo - do k = ntrcr_o+1, ntrcr - trcrn_bgc(k-ntrcr_o,n) = trcrn(i,k,n) - enddo - enddo - call icepack_load_ocean_bio_array(max_nbtrcr=max_nbtrcr, & max_algae=max_algae, max_don=max_don, max_doc=max_doc, & max_aero =max_aero, max_dic=max_dic, max_fe =max_fe, & @@ -504,6 +495,16 @@ subroutine init_bgc() enddo ! i do i = 1, nx + + do n = 1, ncat + do k = 1, nilyr + sicen(k,n) = trcrn(i,nt_sice+k-1,n) + enddo + do k = ntrcr_o+1, ntrcr + trcrn_bgc(k-ntrcr_o,n) = trcrn(i,k,n) + enddo + enddo + call icepack_init_bgc(ncat=ncat, nblyr=nblyr, nilyr=nilyr, ntrcr_o=ntrcr_o, & cgrid=cgrid, igrid=igrid, ntrcr=ntrcr, nbtrcr=nbtrcr, & sicen=sicen(:,:), trcrn=trcrn_bgc(:,:), &