From 9630941fe6359c0630d090e54ed38e3801d3ca8e Mon Sep 17 00:00:00 2001 From: apcraig Date: Mon, 26 Aug 2024 12:31:42 -0600 Subject: [PATCH] Deprecate skl BGC option without removing code yet Refactor bgc_tracer_type initialization in CICE ice_init_column.F90, subroutine init_zbgc, fixes implementation bug --- cicecore/shared/ice_init_column.F90 | 87 +++++++++++++++-------- configuration/scripts/tests/base_suite.ts | 4 +- configuration/scripts/tests/io_suite.ts | 10 +-- 3 files changed, 66 insertions(+), 35 deletions(-) diff --git a/cicecore/shared/ice_init_column.F90 b/cicecore/shared/ice_init_column.F90 index fe54c6ccd..9922edd88 100644 --- a/cicecore/shared/ice_init_column.F90 +++ b/cicecore/shared/ice_init_column.F90 @@ -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, & @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/configuration/scripts/tests/base_suite.ts b/configuration/scripts/tests/base_suite.ts index 784a9534f..4c81d2f20 100644 --- a/configuration/scripts/tests/base_suite.ts +++ b/configuration/scripts/tests/base_suite.ts @@ -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 diff --git a/configuration/scripts/tests/io_suite.ts b/configuration/scripts/tests/io_suite.ts index e5e7feee6..33060d0e5 100644 --- a/configuration/scripts/tests/io_suite.ts +++ b/configuration/scripts/tests/io_suite.ts @@ -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 @@ -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 @@ -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 @@ -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