Skip to content

Commit

Permalink
Deprecate skl BGC option without removing code yet
Browse files Browse the repository at this point in the history
Refactor bgc_tracer_type initialization in CICE ice_init_column.F90,
subroutine init_zbgc, fixes implementation bug
  • Loading branch information
apcraig committed Aug 26, 2024
1 parent 4ecfd8c commit 9630941
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 35 deletions.
87 changes: 59 additions & 28 deletions cicecore/shared/ice_init_column.F90
Original file line number Diff line number Diff line change
Expand Up @@ -55,27 +55,6 @@ module ice_init_column
nitratetype , ammoniumtype , silicatetype, &
dmspptype , dmspdtype , humtype

real (kind=dbl_kind), dimension(icepack_max_dic) :: &
dictype

real (kind=dbl_kind), dimension(icepack_max_algae) :: &
algaltype ! tau_min for both retention and release

real (kind=dbl_kind), dimension(icepack_max_doc) :: &
doctype

real (kind=dbl_kind), dimension(icepack_max_don) :: &
dontype

real (kind=dbl_kind), dimension(icepack_max_fe) :: &
fedtype

real (kind=dbl_kind), dimension(icepack_max_fe) :: &
feptype

real (kind=dbl_kind), dimension(icepack_max_aero) :: &
zaerotype

real (kind=dbl_kind) :: &
grid_o, l_sk, grid_o_t, initbio_frac, &
frazil_scav, grid_oS, l_skS, &
Expand Down Expand Up @@ -1419,6 +1398,16 @@ subroutine input_zbgc
! biogeochemistry
!-----------------------------------------------------------------

! deprecate skl bgc (Aug 2024)
! no skl code removed yet
if (skl_bgc) then
if (my_task == master_task) then
write(nu_diag,*) 'ERROR: skl_bgc is not validate and temporarily DEPRECATED'
write(nu_diag,*) 'ERROR: if you would like to use skl_bgc, please contact the Consortium'
abort_flag = 102
endif
endif

if (.not. tr_brine) then
if (solve_zbgc) then
if (my_task == master_task) then
Expand Down Expand Up @@ -2399,6 +2388,27 @@ subroutine init_zbgc
tr_bgc_DON, tr_bgc_Fe, tr_zaero, &
tr_bgc_hum

real (kind=dbl_kind), dimension(icepack_max_dic) :: &
dictype

real (kind=dbl_kind), dimension(icepack_max_algae) :: &
algaltype ! tau_min for both retention and release

real (kind=dbl_kind), dimension(icepack_max_doc) :: &
doctype

real (kind=dbl_kind), dimension(icepack_max_don) :: &
dontype

real (kind=dbl_kind), dimension(icepack_max_fe) :: &
fedtype

real (kind=dbl_kind), dimension(icepack_max_fe) :: &
feptype

real (kind=dbl_kind), dimension(icepack_max_aero) :: &
zaerotype

real (kind=dbl_kind) :: &
initbio_frac, &
frazil_scav
Expand Down Expand Up @@ -2501,13 +2511,29 @@ subroutine init_zbgc
stat=ierr)
if (ierr/=0) call abort_ice(subname//' Out of Memory')

R_C2N(1) = ratio_C2N_diatoms
R_C2N(2) = ratio_C2N_sp
R_C2N(3) = ratio_C2N_phaeo

R_chl2N(1) = ratio_chl2N_diatoms
R_chl2N(2) = ratio_chl2N_sp
R_chl2N(3) = ratio_chl2N_phaeo
R_C2N(1) = ratio_C2N_diatoms
R_C2N(2) = ratio_C2N_sp
R_C2N(3) = ratio_C2N_phaeo

R_chl2N(1) = ratio_chl2N_diatoms
R_chl2N(2) = ratio_chl2N_sp
R_chl2N(3) = ratio_chl2N_phaeo

algaltype(1) = algaltype_diatoms
algaltype(2) = algaltype_sp
algaltype(3) = algaltype_phaeo
dictype(:) = -c1
doctype(1) = doctype_s
doctype(2) = doctype_l
dontype(1) = dontype_protein
fedtype(1) = fedtype_1
feptype(1) = feptype_1
zaerotype(1) = zaerotype_bc1
zaerotype(2) = zaerotype_bc2
zaerotype(3) = zaerotype_dust1
zaerotype(4) = zaerotype_dust2
zaerotype(5) = zaerotype_dust3
zaerotype(6) = zaerotype_dust4

!-----------------------------------------------------------------
! assign tracer dependencies
Expand Down Expand Up @@ -2837,6 +2863,7 @@ subroutine init_zbgc
write(nu_diag,1000) ' frazil_scav = ', frazil_scav

endif ! skl_bgc or solve_bgc
call flush_fileunit(nu_diag)
endif ! master_task

1000 format (a30,2x,f9.2) ! a30 to align formatted, unformatted statements
Expand Down Expand Up @@ -2897,6 +2924,10 @@ subroutine init_bgc_trcr(nk, nt_fbri, &

bgc_tracer_type(nlt_bgc) = bgctype

if (my_task == master_task) then
write(nu_diag,*) subname,'bgc_tracer_type',nlt_bgc,bgc_tracer_type(nlt_bgc)
endif

if (nk > 1) then ! include vertical bgc in snow
do k = nk, nk+1
trcr_depend (nt_bgc + k ) = 2 ! snow volume
Expand Down
4 changes: 2 additions & 2 deletions configuration/scripts/tests/base_suite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ restart gx3 8x2 modal
smoke gx3 8x2 bgcz,diag1,run5day
smoke gx3 8x2 jra55do
smoke gx3 8x2 bgczm,diag1,debug
smoke gx3 8x1 bgcskl,diag1,debug
#smoke gx3 8x1 bgcskl,diag1,debug
#smoke gx3 4x1 bgcz,thread smoke_gx3_8x2_bgcz
restart gx1 4x2 bgcsklclim,medium
#restart gx1 4x2 bgcsklclim,medium
restart gx1 8x1 bgczclim,medium
smoke gx1 24x1 medium,run90day,yi2008
smoke gx1 24x1 medium,run90day,yi2008,jra55do
Expand Down
10 changes: 5 additions & 5 deletions configuration/scripts/tests/io_suite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ restart gx3 8x4 gx3ncarbulk,alt04,histall,iobinary,precision8
restart gx3 4x4 gx3ncarbulk,alt05,histall,iobinary
restart gx3 14x2 gx3ncarbulk,alt06,histall,iobinary,precision8
restart gx3 14x2 gx3ncarbulk,alt07,histall,iobinary,precision8
restart gx3 32x1 gx3ncarbulk,bgcz,histall,iobinary,precision8
restart gx3 16x2 gx3ncarbulk,bgcskl,histall,iobinary
#restart gx3 32x1 gx3ncarbulk,bgcz,histall,iobinary,precision8
#restart gx3 16x2 gx3ncarbulk,bgczm,histall,iobinary
restart gx3 14x2 gx3ncarbulk,isotope,histall,iobinary,precision8
restart gx3 16x2 gx3ncarbulk,fsd12,histall,iobinary
restart gx3 8x4 gx3ncarbulk,debug,histall,iobinary,precision8,histinst
Expand All @@ -24,7 +24,7 @@ restart gx3 8x4 alt05,histall,ionetcdf,iocdf2
restart gx3 16x2 alt06,histall,ionetcdf,iocdf5,precision8
restart gx3 16x2 alt07,histall,ionetcdf,iohdf5,precision8
restart gx3 30x1 bgczm,histall,ionetcdf,iocdf1
restart gx3 15x2 bgcskl,histall,ionetcdf,iocdf2,precision8
restart gx3 15x2 bgcz,histall,ionetcdf,iocdf2,precision8
restart gx3 31x1 isotope,histall,ionetcdf,iocdf5,precision8
restart gx3 14x2 fsd12,histall,ionetcdf,iohdf5
restart gx3 32x1 debug,histall,ionetcdf,iohdf5,histinst
Expand All @@ -39,7 +39,7 @@ restart gx3 8x4 alt05,histall,iopio1,iopnetcdf5,precision8
restart gx3 32x1 alt06,histall,iopio1,iocdf1
restart gx3 32x1 alt07,histall,iopio1,iocdf2,precision8
restart gx3 16x2 bgczm,histall,iopio1,iocdf5,precision8
restart gx3 30x1 bgcskl,histall,iopio1,iohdf5,precision8
restart gx3 30x1 bgcz,histall,iopio1,iohdf5,precision8
restart gx3 8x4 isotope,histall,iopio1,iopnetcdf1
restart gx3 12x2 fsd12,histall,iopio1,iopnetcdf2
restart gx3 16x2 debug,histall,iopio1,iopnetcdf5,histinst
Expand All @@ -54,7 +54,7 @@ restart gx3 8x4 alt05,histall,iopio2,iocdf5
restart gx3 16x2 alt06,histall,iopio2,iohdf5,iohdf5opts
restart gx3 16x2 alt07,histall,iopio2,iopnetcdf1
restart gx3 16x2 bgczm,histall,iopio2,iopnetcdf2
restart gx3 30x1 bgcskl,histall,iopio2,iopnetcdf5
restart gx3 30x1 bgcz,histall,iopio2,iopnetcdf5
restart gx3 8x4 isotope,histall,iopio2,iohdf5,precision8
restart gx3 12x2 fsd12,histall,iopio2,iocdf1,precision8
restart gx3 16x2 debug,histall,iopio2,iocdf2,histinst,precision8
Expand Down

0 comments on commit 9630941

Please sign in to comment.