From f836c7d5b39f7c3dc272ab50f6db615341110343 Mon Sep 17 00:00:00 2001 From: apcraig Date: Sat, 29 Jul 2023 15:49:04 -0600 Subject: [PATCH] Deprecate zsalinity, remove code --- .../cicedyn/analysis/ice_diagnostics_bgc.F90 | 220 ------------------ cicecore/cicedyn/analysis/ice_history_bgc.F90 | 92 -------- .../cicedyn/dynamics/ice_transport_driver.F90 | 3 - cicecore/cicedyn/general/ice_flux.F90 | 10 - cicecore/cicedyn/general/ice_flux_bgc.F90 | 6 - cicecore/cicedyn/general/ice_step_mod.F90 | 7 - .../io/io_binary/ice_restart.F90 | 9 - .../io/io_netcdf/ice_restart.F90 | 11 - .../infrastructure/io/io_pio2/ice_restart.F90 | 10 - .../drivers/standalone/cice/CICE_InitMod.F90 | 3 - .../drivers/standalone/cice/CICE_RunMod.F90 | 5 - .../unittest/gridavgchk/CICE_InitMod.F90 | 3 - .../drivers/unittest/halochk/CICE_InitMod.F90 | 3 - .../drivers/unittest/opticep/CICE_InitMod.F90 | 3 - .../drivers/unittest/opticep/CICE_RunMod.F90 | 5 - .../unittest/opticep/ice_init_column.F90 | 82 ------- .../drivers/unittest/opticep/ice_step_mod.F90 | 7 - .../drivers/unittest/sumchk/CICE_InitMod.F90 | 3 - cicecore/shared/ice_arrays_column.F90 | 23 -- cicecore/shared/ice_init_column.F90 | 82 ------- cicecore/shared/ice_restart_column.F90 | 77 ------ doc/source/user_guide/ug_case_settings.rst | 4 +- 22 files changed, 2 insertions(+), 666 deletions(-) diff --git a/cicecore/cicedyn/analysis/ice_diagnostics_bgc.F90 b/cicecore/cicedyn/analysis/ice_diagnostics_bgc.F90 index beb7c1bba..1caabab02 100644 --- a/cicecore/cicedyn/analysis/ice_diagnostics_bgc.F90 +++ b/cicecore/cicedyn/analysis/ice_diagnostics_bgc.F90 @@ -851,226 +851,6 @@ subroutine bgc_diags end subroutine bgc_diags -!======================================================================= -#ifdef tcxzsal -! -! Writes diagnostic info (max, min, global sums, etc) to standard out -! -! authors: Elizabeth C. Hunke, LANL -! Bruce P. Briegleb, NCAR -! Cecilia M. Bitz, UW -! Nicole Jeffery, LANL - - subroutine zsal_diags - - use ice_arrays_column, only: fzsal, fzsal_g, sice_rho, bTiz, & - iDi, bphi, dhbr_top, dhbr_bot, darcy_V - use ice_broadcast, only: broadcast_scalar, broadcast_array - use ice_diagnostics, only: npnt, print_points, pmloc, piloc, pjloc, & - pbloc - use ice_domain_size, only: nblyr, ncat, nilyr - use ice_state, only: aicen, aice, vice, trcr, trcrn, vicen, vsno - - ! local variables - - integer (kind=int_kind) :: & - i, j, k, n, nn, iblk - - ! fields at diagnostic points - real (kind=dbl_kind), dimension(npnt) :: & - phinS, phinS1,& - phbrn,pdh_top1,pdh_bot1, psice_rho, pfzsal, & - pfzsal_g, pdarcy_V1 - - ! vertical fields of category 1 at diagnostic points for bgc layer model - real (kind=dbl_kind), dimension(npnt,nblyr+2) :: & - pphin, pphin1 - real (kind=dbl_kind), dimension(npnt,nblyr) :: & - pSin, pSice, pSin1 - - real (kind=dbl_kind), dimension(npnt,nblyr+1) :: & - pbTiz, piDin - - real (kind=dbl_kind) :: & - rhosi, rhow, rhos - - logical (kind=log_kind) :: tr_brine - - integer (kind=int_kind) :: nt_fbri, nt_sice - character(len=*), parameter :: subname = '(zsal_diags)' - - call icepack_query_parameters(rhosi_out=rhosi, rhow_out=rhow, rhos_out=rhos) - call icepack_query_tracer_flags(tr_brine_out=tr_brine) - call icepack_query_tracer_indices(nt_fbri_out=nt_fbri, nt_sice_out=nt_sice) - call icepack_warnings_flush(nu_diag) - if (icepack_warnings_aborted()) call abort_ice(error_message=subname, & - file=__FILE__, line=__LINE__) - - !----------------------------------------------------------------- - ! salinity and microstructure of the ice - !----------------------------------------------------------------- - - if (print_points) then - - !----------------------------------------------------------------- - ! state of the ice and associated fluxes for 2 defined points - ! NOTE these are computed for the last timestep only (not avg) - !----------------------------------------------------------------- - - do n = 1, npnt - if (my_task == pmloc(n)) then - i = piloc(n) - j = pjloc(n) - iblk = pbloc(n) - - pfzsal(n) = fzsal(i,j,iblk) - pfzsal_g(n) = fzsal_g(i,j,iblk) - phinS(n) = c0 - phinS1(n) = c0 - phbrn(n) = c0 - psice_rho(n) = c0 - pdh_top1(n) = c0 - pdh_bot1(n) = c0 - pdarcy_V1(n) = c0 - do nn = 1,ncat - psice_rho(n) = psice_rho(n) + sice_rho(i,j,nn,iblk)*aicen(i,j,nn,iblk) - enddo - if (aice(i,j,iblk) > c0) & - psice_rho(n) = psice_rho(n)/aice(i,j,iblk) - if (tr_brine .and. aice(i,j,iblk) > c0) then - phinS(n) = trcr(i,j,nt_fbri,iblk)*vice(i,j,iblk)/aice(i,j,iblk) - phbrn(n) = (c1 - rhosi/rhow)*vice(i,j,iblk)/aice(i,j,iblk) & - - rhos/rhow *vsno(i,j,iblk)/aice(i,j,iblk) - endif - if (tr_brine .and. aicen(i,j,1,iblk)> c0) then - phinS1(n) = trcrn(i,j,nt_fbri,1,iblk) & - * vicen(i,j,1,iblk)/aicen(i,j,1,iblk) - pdh_top1(n) = dhbr_top(i,j,1,iblk) - pdh_bot1(n) = dhbr_bot(i,j,1,iblk) - pdarcy_V1(n) = darcy_V(i,j,1,iblk) - endif - do k = 1, nblyr+1 - pbTiz(n,k) = c0 - piDin(n,k) = c0 - do nn = 1,ncat - pbTiz(n,k) = pbTiz(n,k) + bTiz(i,j,k,nn,iblk)*vicen(i,j,nn,iblk) - piDin(n,k) = piDin(n,k) + iDi(i,j,k,nn,iblk)*vicen(i,j,nn,iblk) - enddo - if (vice(i,j,iblk) > c0) then - pbTiz(n,k) = pbTiz(n,k)/vice(i,j,iblk) - piDin(n,k) = piDin(n,k)/vice(i,j,iblk) - endif - enddo ! k - do k = 1, nblyr+2 - pphin(n,k) = c0 - pphin1(n,k) = c0 - if (aicen(i,j,1,iblk) > c0) pphin1(n,k) = bphi(i,j,k,1,iblk) - do nn = 1,ncat - pphin(n,k) = pphin(n,k) + bphi(i,j,k,nn,iblk)*vicen(i,j,nn,iblk) - enddo - if (vice(i,j,iblk) > c0) then - pphin(n,k) = pphin(n,k)/vice(i,j,iblk) - endif - enddo - do k = 1,nblyr - pSin(n,k) = c0 - pSin1(n,k) = c0 - pSin(n,k)= trcr(i,j,nt_bgc_S+k-1,iblk) - if (aicen(i,j,1,iblk) > c0) pSin1(n,k) = trcrn(i,j,nt_bgc_S+k-1,1,iblk) - enddo - do k = 1,nilyr - pSice(n,k) = trcr(i,j,nt_sice+k-1,iblk) - enddo - endif ! my_task = pmloc - - call broadcast_scalar(phinS (n), pmloc(n)) - call broadcast_scalar(phinS1 (n), pmloc(n)) - call broadcast_scalar(phbrn (n), pmloc(n)) - call broadcast_scalar(pdh_top1 (n), pmloc(n)) - call broadcast_scalar(pdh_bot1 (n), pmloc(n)) - call broadcast_scalar(psice_rho(n), pmloc(n)) - call broadcast_scalar(pfzsal_g (n), pmloc(n)) - call broadcast_scalar(pdarcy_V1(n), pmloc(n)) - call broadcast_scalar(pfzsal (n), pmloc(n)) - call broadcast_array (pbTiz (n,:), pmloc(n)) - call broadcast_array (piDin (n,:), pmloc(n)) - call broadcast_array (pphin (n,:), pmloc(n)) - call broadcast_array (pphin1 (n,:), pmloc(n)) - call broadcast_array (pSin (n,:), pmloc(n)) - call broadcast_array (pSin1 (n,:), pmloc(n)) - call broadcast_array (pSice (n,:), pmloc(n)) - enddo ! npnt - endif ! print_points - - !----------------------------------------------------------------- - ! start spewing - !----------------------------------------------------------------- - - if (my_task == master_task) then - - call flush_fileunit(nu_diag) - - !----------------------------------------------------------------- - ! diagnostics for Arctic and Antarctic points - !----------------------------------------------------------------- - - if (print_points) then - - write(nu_diag,*) ' ' - write(nu_diag,902) ' Brine height ' - write(nu_diag,900) 'hbrin = ',phinS(1),phinS(2) - write(nu_diag,900) 'hbrin cat 1 = ',phinS1(1),phinS1(2) - write(nu_diag,900) 'Freeboard = ',phbrn(1),phbrn(2) - write(nu_diag,900) 'dhbrin cat 1 top = ',pdh_top1(1),pdh_top1(2) - write(nu_diag,900) 'dhbrin cat 1 bottom = ',pdh_bot1(1),pdh_bot1(2) - write(nu_diag,*) ' ' - write(nu_diag,902) ' zSalinity ' - write(nu_diag,900) 'Avg density (kg/m^3) = ',psice_rho(1),psice_rho(2) - write(nu_diag,900) 'Salt flux (kg/m^2/s) = ',pfzsal(1),pfzsal(2) - write(nu_diag,900) 'Grav. Drain. Salt flux = ',pfzsal_g(1),pfzsal_g(2) - write(nu_diag,900) 'Darcy V cat 1 (m/s) = ',pdarcy_V1(1),pdarcy_V1(2) - write(nu_diag,*) ' ' - write(nu_diag,*) ' Top down bgc Layer Model' - write(nu_diag,*) ' ' - write(nu_diag,803) 'bTiz(1) ice temp',' bTiz(2) ice temp ' - write(nu_diag,*) '---------------------------------------------------' - write(nu_diag,802) ((pbTiz(n,k),n = 1,2), k = 1,nblyr+1) - write(nu_diag,*) ' ' - write(nu_diag,803) 'iDi(1) diffusivity ','iDi(2) diffusivity ' - write(nu_diag,*) '---------------------------------------------------' - write(nu_diag,802) ((piDin(n,k),n=1,2), k = 1,nblyr+1) - write(nu_diag,*) ' ' - write(nu_diag,803) 'bphi(1) porosity ','bphi(2) porosity ' - write(nu_diag,*) '---------------------------------------------------' - write(nu_diag,802) ((pphin(n,k),n=1,2), k = 1,nblyr+1) - write(nu_diag,*) ' ' - write(nu_diag,803) 'phi1(1) porosity ','phi1(2) porosity ' - write(nu_diag,*) '---------------------------------------------------' - write(nu_diag,802) ((pphin1(n,k),n=1,2), k = 1,nblyr+1) - write(nu_diag,*) ' ' - write(nu_diag,803) 'zsal(1) cat 1 ','zsal(2) cat 1 ' - write(nu_diag,*) '---------------------------------------------------' - write(nu_diag,802) ((pSin1(n,k),n=1,2), k = 1,nblyr) - write(nu_diag,*) ' ' - write(nu_diag,803) 'zsal(1) Avg S ','zsal(2) Avg S ' - write(nu_diag,*) '---------------------------------------------------' - write(nu_diag,802) ((pSin(n,k),n=1,2), k = 1,nblyr) - write(nu_diag,*) ' ' - write(nu_diag,803) 'Sice(1) Ice S ','Sice(2) Ice S ' - write(nu_diag,*) '---------------------------------------------------' - write(nu_diag,802) ((pSice(n,k),n=1,2), k = 1,nilyr) - write(nu_diag,*) ' ' - - endif ! print_points - endif ! my_task = master_task - - 802 format (f24.17,2x,f24.17) - 803 format (a25,2x,a25) - 900 format (a25,2x,f24.17,2x,f24.17) - 902 format (a25,10x,f6.1,1x,f6.1,9x,f6.1,1x,f6.1) - - end subroutine zsal_diags -#endif !======================================================================= end module ice_diagnostics_bgc diff --git a/cicecore/cicedyn/analysis/ice_history_bgc.F90 b/cicecore/cicedyn/analysis/ice_history_bgc.F90 index 608c6602c..1e0afcfe5 100644 --- a/cicecore/cicedyn/analysis/ice_history_bgc.F90 +++ b/cicecore/cicedyn/analysis/ice_history_bgc.F90 @@ -39,9 +39,6 @@ module ice_history_bgc f_iso = 'x', & f_faero_atm = 'x', f_faero_ocn = 'x', & f_aero = 'x', & -!tcxzsal f_fzsal = 'm', f_fzsal_ai = 'm', & -! f_fzsal_g = 'm', f_fzsal_g_ai = 'm', & -! f_zsal = 'x', & f_fbio = 'x', f_fbio_ai = 'x', & f_zaero = 'x', f_bgc_S = 'x', & f_bgc_N = 'x', f_bgc_C = 'x', & @@ -154,8 +151,6 @@ module ice_history_bgc !--------------------------------------------------------------- integer (kind=int_kind), dimension(max_nstrm), public :: & -!tcxzsal n_fzsal , n_fzsal_ai , & -! n_fzsal_g , n_fzsal_g_ai , & n_zsal integer(kind=int_kind), dimension(icepack_max_iso,max_nstrm) :: & @@ -628,25 +623,6 @@ subroutine init_hist_bgc_2D f_bgc_DMS_cat1 = f_bgc_DMS f_bgc_PON_cat1 = f_bgc_PON -!tcxzsal if (solve_zsal) then -! f_fzsal = f_fsalt -! f_fzsal_g = f_fsalt -! f_fzsal_ai = f_fsalt_ai -! f_fzsal_g_ai = f_fsalt_ai -! f_zsal = f_sice -! f_fsalt = 'x' -! f_fsalt_ai = 'x' -! f_sice = 'x' -! else -! f_fzsal = 'x' -! f_fzsal_g = 'x' -! f_fzsal_ai = 'x' -! f_fzsal_g_ai = 'x' -! f_zsal = 'x' -! f_bgc_S = 'x' - f_iki = 'x' -!tcxzsal endif - call broadcast_scalar (f_fiso_atm, master_task) call broadcast_scalar (f_fiso_ocn, master_task) call broadcast_scalar (f_iso, master_task) @@ -655,11 +631,6 @@ subroutine init_hist_bgc_2D call broadcast_scalar (f_aero, master_task) call broadcast_scalar (f_fbri, master_task) call broadcast_scalar (f_hbri, master_task) -!tcxzsal call broadcast_scalar (f_fzsal, master_task) -! call broadcast_scalar (f_fzsal_ai, master_task) -! call broadcast_scalar (f_fzsal_g, master_task) -! call broadcast_scalar (f_fzsal_g_ai, master_task) -! call broadcast_scalar (f_zsal, master_task) call broadcast_scalar (f_fNit, master_task) call broadcast_scalar (f_fNit_ai, master_task) call broadcast_scalar (f_fDOC, master_task) @@ -739,7 +710,6 @@ subroutine init_hist_bgc_2D call broadcast_scalar (f_bphi, master_task) call broadcast_scalar (f_iDi, master_task) call broadcast_scalar (f_iki, master_task) -!tcxzsal call broadcast_scalar (f_bgc_S, master_task) call broadcast_scalar (f_zfswin, master_task) call broadcast_scalar (f_PPnet, master_task) call broadcast_scalar (f_algalpeak, master_task) @@ -838,34 +808,6 @@ subroutine init_hist_bgc_2D enddo endif -! ! zsalinity -! -!tcxzsal -! call define_hist_field(n_fzsal,"fzsal","kg/m^2/s",tstr2D, tcstr, & -! "prognostic salt flux ice to ocn (cpl)", & -! "if positive, ocean gains salt", c1, c0, & -! ns, f_fzsal) -! -! call define_hist_field(n_fzsal_ai,"fzsal_ai","kg/m^2/s",tstr2D, tcstr, & -! "prognostic salt flux ice to ocean", & -! "weighted by ice area", c1, c0, & -! ns, f_fzsal_ai) -! -! call define_hist_field(n_fzsal_g,"fzsal_g","kg/m^2/s",tstr2D, tcstr, & -! "Gravity drainage salt flux ice to ocn (cpl)", & -! "if positive, ocean gains salt", c1, c0, & -! ns, f_fzsal_g) -! -! call define_hist_field(n_fzsal_g_ai,"fzsal_g_ai","kg/m^2/s",tstr2D, tcstr, & -! "Gravity drainage salt flux ice to ocean", & -! "weighted by ice area", c1, c0, & -! ns, f_fzsal_g_ai) -! -! call define_hist_field(n_zsal,"zsal_tot","g/m^2",tstr2D, tcstr, & -! "Total Salt content", & -! "In ice volume*fbri", c1, c0, & -! ns, f_zsal) - ! Aerosols if (f_aero(1:1) /= 'x') then do n=1,n_aero @@ -1888,11 +1830,6 @@ subroutine init_hist_bgc_3Db "permeability", "on bio interface grid", 1.0e6_dbl_kind, c0, & ns, f_iki) -!tcxzsal if (f_bgc_S(1:1) /= 'x') & -! call define_hist_field(n_bgc_S,"bgc_S","ppt",tstr3Db, tcstr, & -! "bulk salinity", "on bio grid", c1, c0, & -! ns, f_bgc_S) - if (f_zfswin(1:1) /= 'x') & call define_hist_field(n_zfswin,"zfswin","W/m^2",tstr3Db, tcstr, & "internal ice PAR", "on bio interface grid", c1, c0, & @@ -2043,18 +1980,6 @@ subroutine accum_hist_bgc (iblk) if (tr_iso .or. tr_aero .or. tr_brine .or. skl_bgc) then -!tcxzsal ! zsalinity -! if (f_fzsal (1:1) /= 'x') & -! call accum_hist_field(n_fzsal, iblk, fzsal(:,:,iblk), a2D) -! if (f_fzsal_ai(1:1)/= 'x') & -! call accum_hist_field(n_fzsal_ai, iblk, fzsal_ai(:,:,iblk), a2D) -! if (f_fzsal_g (1:1) /= 'x') & -! call accum_hist_field(n_fzsal_g, iblk, fzsal_g(:,:,iblk), a2D) -! if (f_fzsal_g_ai(1:1)/= 'x') & -! call accum_hist_field(n_fzsal_g_ai,iblk, fzsal_g_ai(:,:,iblk), a2D) -! if (f_zsal (1:1) /= 'x') & -! call accum_hist_field(n_zsal, iblk, zsal_tot(:,:,iblk), a2D) - ! isotopes if (f_fiso_atm(1:1) /= 'x') then do n=1,n_iso @@ -2713,21 +2638,6 @@ subroutine accum_hist_bgc (iblk) workz(:,:,1:nzblyr), a3Db) endif -!tcxzsal if (f_bgc_S (1:1) /= 'x') then -! workz(:,:,:) = c0 -! do j = jlo, jhi -! do i = ilo, ihi -! if (aice(i,j,iblk) > c0) then -! workz(i,j,1) = trcr(i,j,nt_bgc_S,iblk) -! workz(i,j,2:nblyr+1) = trcr(i,j,nt_bgc_S:nt_bgc_S+nblyr-1,iblk) -! workz(i,j,nblyr+2) = sss(i,j,iblk) -! endif -! enddo ! i -! enddo ! j -! call accum_hist_field(n_bgc_S-n3Dzcum, iblk, nzblyr, & -! workz(:,:,1:nzblyr), a3Db) -! endif - if (f_zfswin (1:1) /= 'x') then workz(:,:,:) = c0 do n = 1, ncat_hist @@ -3507,8 +3417,6 @@ subroutine init_history_bgc snow_bio_net(:,:,:,:) = c0 fbio_snoice (:,:,:,:) = c0 fbio_atmice (:,:,:,:) = c0 -!tcxzsal fzsal (:,:,:) = c0 -! fzsal_g (:,:,:) = c0 zfswin (:,:,:,:,:) = c0 fnit (:,:,:) = c0 fsil (:,:,:) = c0 diff --git a/cicecore/cicedyn/dynamics/ice_transport_driver.F90 b/cicecore/cicedyn/dynamics/ice_transport_driver.F90 index c5736444f..8ff833086 100644 --- a/cicecore/cicedyn/dynamics/ice_transport_driver.F90 +++ b/cicecore/cicedyn/dynamics/ice_transport_driver.F90 @@ -225,9 +225,6 @@ subroutine init_transport if (nt-k==nt_bgc_Nit) & write(nu_diag,1000) 'nt_bgc_Nit ',nt,depend(nt),tracer_type(nt),& has_dependents(nt) -!tcxzsal if (nt-k==nt_bgc_S) & -! write(nu_diag,1000) 'nt_bgc_S ',nt,depend(nt),tracer_type(nt),& -! has_dependents(nt) enddo write(nu_diag,*) ' ' endif ! master_task diff --git a/cicecore/cicedyn/general/ice_flux.F90 b/cicecore/cicedyn/general/ice_flux.F90 index d34ed6a42..29f5c489b 100644 --- a/cicecore/cicedyn/general/ice_flux.F90 +++ b/cicecore/cicedyn/general/ice_flux.F90 @@ -1125,7 +1125,6 @@ subroutine scale_fluxes (nx_block, ny_block, & faero_ocn, & alvdr, alidr, & alvdf, alidf, & -!tcxzsal fzsal, fzsal_g, & flux_bio, & fsurf, fcondtop, & Uref, wind, & @@ -1189,11 +1188,6 @@ subroutine scale_fluxes (nx_block, ny_block, & fsurf , & ! surface heat flux (W/m**2) fcondtop ! top surface conductive flux (W/m**2) -!tcxzsal ! zsalinity fluxes -! real (kind=dbl_kind), dimension(nx_block,ny_block), intent(inout) :: & -! fzsal , & ! salt flux to ocean with prognositic salinity (kg/m2/s) -! fzsal_g ! Gravity drainage salt flux to ocean (kg/m2/s) - ! isotopes real (kind=dbl_kind), dimension(nx_block,ny_block,icepack_max_iso), & optional, intent(inout) :: & @@ -1246,8 +1240,6 @@ subroutine scale_fluxes (nx_block, ny_block, & alidr (i,j) = alidr (i,j) * ar alvdf (i,j) = alvdf (i,j) * ar alidf (i,j) = alidf (i,j) * ar -!tcxzsal fzsal (i,j) = fzsal (i,j) * ar -! fzsal_g (i,j) = fzsal_g (i,j) * ar flux_bio (i,j,:) = flux_bio (i,j,:) * ar faero_ocn(i,j,:) = faero_ocn(i,j,:) * ar if (present(Qref_iso )) Qref_iso (i,j,:) = Qref_iso (i,j,:) * ar @@ -1278,8 +1270,6 @@ subroutine scale_fluxes (nx_block, ny_block, & alidr (i,j) = c0 alvdf (i,j) = c0 alidf (i,j) = c0 -!tcxzsal fzsal (i,j) = c0 -! fzsal_g (i,j) = c0 flux_bio (i,j,:) = c0 faero_ocn(i,j,:) = c0 if (present(Qref_iso )) Qref_iso (i,j,:) = c0 diff --git a/cicecore/cicedyn/general/ice_flux_bgc.F90 b/cicecore/cicedyn/general/ice_flux_bgc.F90 index 9b3e3b1f0..9c07971ff 100644 --- a/cicecore/cicedyn/general/ice_flux_bgc.F90 +++ b/cicecore/cicedyn/general/ice_flux_bgc.F90 @@ -44,10 +44,6 @@ module ice_flux_bgc flux_bio , & ! all bio fluxes to ocean flux_bio_ai ! all bio fluxes to ocean, averaged over grid cell -!tcxzsal real (kind=dbl_kind), dimension (:,:,:), allocatable, public :: & -! fzsal_ai, & ! salt flux to ocean from zsalinity (kg/m^2/s) -! fzsal_g_ai ! gravity drainage salt flux to ocean (kg/m^2/s) - ! internal logical (kind=log_kind), public :: & @@ -121,8 +117,6 @@ subroutine alloc_flux_bgc integer (int_kind) :: ierr allocate( & -!tcxzsal fzsal_ai (nx_block,ny_block,max_blocks), & ! salt flux to ocean from zsalinity (kg/m^2/s) -! fzsal_g_ai (nx_block,ny_block,max_blocks), & ! gravity drainage salt flux to ocean (kg/m^2/s) nit (nx_block,ny_block,max_blocks), & ! ocean nitrate (mmol/m^3) amm (nx_block,ny_block,max_blocks), & ! ammonia/um (mmol/m^3) sil (nx_block,ny_block,max_blocks), & ! silicate (mmol/m^3) diff --git a/cicecore/cicedyn/general/ice_step_mod.F90 b/cicecore/cicedyn/general/ice_step_mod.F90 index 5c6bf5202..2b1ae9ea7 100644 --- a/cicecore/cicedyn/general/ice_step_mod.F90 +++ b/cicecore/cicedyn/general/ice_step_mod.F90 @@ -660,7 +660,6 @@ subroutine step_therm2 (dt, iblk) file=__FILE__, line=__LINE__) ! nltrcr is only used as a zbgc flag in icepack (number of zbgc tracers > 0) -!tcxzsal if (z_tracers .or. solve_zsal) then if (z_tracers) then nltrcr = 1 else @@ -717,7 +716,6 @@ subroutine step_therm2 (dt, iblk) igrid = igrid, & faero_ocn = faero_ocn (i,j,:,iblk), & first_ice = first_ice (i,j,:,iblk), & -!tcxzsal fzsal = fzsal (i,j, iblk), & flux_bio = flux_bio (i,j,1:nbtrcr,iblk), & ocean_bio = ocean_bio (i,j,1:nbtrcr,iblk), & frazil_diag= frazil_diag(i,j,iblk), & @@ -1136,7 +1134,6 @@ subroutine step_dyn_ridge (dt, ndtd, iblk) aice = aice (i,j, iblk), & fsalt = fsalt (i,j, iblk), & first_ice = first_ice(i,j,:,iblk), & -!tcxzsal fzsal = fzsal (i,j, iblk), & flux_bio = flux_bio (i,j,1:nbtrcr,iblk)) endif ! tmask @@ -1717,7 +1714,6 @@ subroutine biogeochemistry (dt, iblk) iDi = iDi (i,j,:,:, iblk), & iki = iki (i,j,:,:, iblk), & zfswin = zfswin (i,j,:,:, iblk), & -!tcxzsal zsal_tot = zsal_tot (i,j, iblk), & darcy_V = darcy_V (i,j,:, iblk), & grow_net = grow_net (i,j, iblk), & PP_net = PP_net (i,j, iblk), & @@ -1736,8 +1732,6 @@ subroutine biogeochemistry (dt, iblk) snow_bio_net = snow_bio_net(i,j,1:nbtrcr, iblk), & fswthrun = fswthrun (i,j,:, iblk), & sice_rho = sice_rho (i,j,:, iblk), & -!tcxzsal fzsal = fzsal (i,j, iblk), & -! fzsal_g = fzsal_g (i,j, iblk), & meltbn = meltbn (i,j,:, iblk), & melttn = melttn (i,j,:, iblk), & congeln = congeln (i,j,:, iblk), & @@ -1757,7 +1751,6 @@ subroutine biogeochemistry (dt, iblk) aice0 = aice0 (i,j, iblk), & trcrn = trcrn (i,j,:,:, iblk), & vsnon_init = vsnon_init (i,j,:, iblk), & -!tcxzsal Rayleigh_criteria = Rayleigh_criteria(i,j,iblk), & skl_bgc = skl_bgc) enddo ! i diff --git a/cicecore/cicedyn/infrastructure/io/io_binary/ice_restart.F90 b/cicecore/cicedyn/infrastructure/io/io_binary/ice_restart.F90 index 019d0904c..cc158fccc 100644 --- a/cicecore/cicedyn/infrastructure/io/io_binary/ice_restart.F90 +++ b/cicecore/cicedyn/infrastructure/io/io_binary/ice_restart.F90 @@ -76,8 +76,6 @@ subroutine init_restart_read(ice_ic) character(len=*), parameter :: subname = '(init_restart_read)' -!tcxzsal call icepack_query_parameters( & -! solve_zsal_out=solve_zsal) call icepack_query_tracer_sizes( & nbtrcr_out=nbtrcr) call icepack_query_tracer_flags( & @@ -307,7 +305,6 @@ subroutine init_restart_read(ice_ic) endif endif -!tcxzsal if (solve_zsal .or. nbtrcr > 0) then if (nbtrcr > 0) then if (my_task == master_task) then n = index(filename0,trim(restart_file)) @@ -403,8 +400,6 @@ subroutine init_restart_write(filename_spec) character(len=*), parameter :: subname = '(init_restart_write)' -!tcxzsal call icepack_query_parameters( & -! solve_zsal_out=solve_zsal) call icepack_query_tracer_sizes( & nbtrcr_out=nbtrcr) call icepack_query_tracer_flags( & @@ -622,7 +617,6 @@ subroutine init_restart_write(filename_spec) endif -!tcxzsal if (solve_zsal .or. nbtrcr > 0) then if (nbtrcr > 0) then write(filename,'(a,a,a,i4.4,a,i2.2,a,i2.2,a,i5.5)') & @@ -818,8 +812,6 @@ subroutine final_restart() character(len=*), parameter :: subname = '(final_restart)' -!tcxzsal call icepack_query_parameters( & -! solve_zsal_out=solve_zsal) call icepack_query_tracer_sizes( & nbtrcr_out=nbtrcr) call icepack_query_tracer_flags( & @@ -843,7 +835,6 @@ subroutine final_restart() if (tr_pond_topo) close(nu_dump_pond) if (tr_snow) close(nu_dump_snow) if (tr_brine) close(nu_dump_hbrine) -!tcxzsal if (solve_zsal .or. nbtrcr > 0) & if (nbtrcr > 0) close(nu_dump_bgc) write(nu_diag,*) 'Restart read/written ',istep1,timesecs diff --git a/cicecore/cicedyn/infrastructure/io/io_netcdf/ice_restart.F90 b/cicecore/cicedyn/infrastructure/io/io_netcdf/ice_restart.F90 index 377f17059..8a648f56b 100644 --- a/cicecore/cicedyn/infrastructure/io/io_netcdf/ice_restart.F90 +++ b/cicecore/cicedyn/infrastructure/io/io_netcdf/ice_restart.F90 @@ -376,8 +376,6 @@ subroutine init_restart_write(filename_spec) endif endif !nbtrcr -!tcxzsal if (solve_zsal) call define_rest_field(ncid,'sss',dims) - deallocate(dims) !----------------------------------------------------------------- @@ -483,8 +481,6 @@ subroutine init_restart_write(filename_spec) enddo endif endif !skl_bgc -!tcxzsal if (solve_zsal) & -! call define_rest_field(ncid,'Rayleigh',dims) !----------------------------------------------------------------- ! 4D restart fields, written as layers of 3D @@ -536,13 +532,6 @@ subroutine init_restart_write(filename_spec) enddo endif -!tcxzsal if (solve_zsal) then -! do k = 1, nblyr -! write(nchar,'(i3.3)') k -! call define_rest_field(ncid,'zSalinity'//trim(nchar),dims) -! enddo -! endif - if (z_tracers) then if (tr_zaero) then do n = 1, n_zaero diff --git a/cicecore/cicedyn/infrastructure/io/io_pio2/ice_restart.F90 b/cicecore/cicedyn/infrastructure/io/io_pio2/ice_restart.F90 index e21be7ce6..9119fac27 100644 --- a/cicecore/cicedyn/infrastructure/io/io_pio2/ice_restart.F90 +++ b/cicecore/cicedyn/infrastructure/io/io_pio2/ice_restart.F90 @@ -380,8 +380,6 @@ subroutine init_restart_write(filename_spec) endif endif !nbtrcr -!tcxzsal if (solve_zsal) call define_rest_field(File,'sss',dims) - deallocate(dims) !----------------------------------------------------------------- @@ -487,8 +485,6 @@ subroutine init_restart_write(filename_spec) enddo endif endif !skl_bgc -!tcxzsal if (solve_zsal) & -! call define_rest_field(File,'Rayleigh',dims) !----------------------------------------------------------------- ! 4D restart fields, written as layers of 3D @@ -540,12 +536,6 @@ subroutine init_restart_write(filename_spec) enddo endif -!tcxzsal if (solve_zsal) then -! do k = 1, nblyr -! write(nchar,'(i3.3)') k -! call define_rest_field(File,'zSalinity'//trim(nchar),dims) -! enddo -! endif if (z_tracers) then if (tr_zaero) then do n = 1, n_zaero diff --git a/cicecore/drivers/standalone/cice/CICE_InitMod.F90 b/cicecore/drivers/standalone/cice/CICE_InitMod.F90 index a32c82d82..dc9fece6e 100644 --- a/cicecore/drivers/standalone/cice/CICE_InitMod.F90 +++ b/cicecore/drivers/standalone/cice/CICE_InitMod.F90 @@ -450,8 +450,6 @@ subroutine init_restart if (trim(runtype) == 'continue') then if (tr_brine) & restart_hbrine = .true. -!tcxzsal if (solve_zsal) & -! restart_zsal = .true. if (skl_bgc .or. z_tracers) & restart_bgc = .true. endif @@ -461,7 +459,6 @@ subroutine init_restart if (tr_brine .and. restart_hbrine) call read_restart_hbrine endif -!tcxzsal if (solve_zsal .or. skl_bgc .or. z_tracers) then ! biogeochemistry if (skl_bgc .or. z_tracers) then ! biogeochemistry if (tr_fsd) then write (nu_diag,*) 'FSD implementation incomplete for use with BGC' diff --git a/cicecore/drivers/standalone/cice/CICE_RunMod.F90 b/cicecore/drivers/standalone/cice/CICE_RunMod.F90 index 4613c1f20..42514e06c 100644 --- a/cicecore/drivers/standalone/cice/CICE_RunMod.F90 +++ b/cicecore/drivers/standalone/cice/CICE_RunMod.F90 @@ -376,7 +376,6 @@ subroutine ice_step call ice_timer_start(timer_diags) ! diagnostics if (mod(istep,diagfreq) == 0) then call runtime_diags(dt) ! log file -!tcxzsal if (solve_zsal) call zsal_diags if (skl_bgc .or. z_tracers) call bgc_diags if (tr_brine) call hbrine_diags if (my_task == master_task) then @@ -401,7 +400,6 @@ subroutine ice_step if (tr_fsd) call write_restart_fsd if (tr_iso) call write_restart_iso if (tr_aero) call write_restart_aero -!tcxzsal if (solve_zsal .or. skl_bgc .or. z_tracers) & if (skl_bgc .or. z_tracers) & call write_restart_bgc if (tr_brine) call write_restart_hbrine @@ -587,8 +585,6 @@ subroutine coupling_prep (iblk) fsalt_ai (i,j,iblk) = fsalt (i,j,iblk) fhocn_ai (i,j,iblk) = fhocn (i,j,iblk) fswthru_ai(i,j,iblk) = fswthru(i,j,iblk) -!tcxzsal fzsal_ai (i,j,iblk) = fzsal (i,j,iblk) -! fzsal_g_ai(i,j,iblk) = fzsal_g(i,j,iblk) if (nbtrcr > 0) then do k = 1, nbtrcr @@ -634,7 +630,6 @@ subroutine coupling_prep (iblk) faero_ocn(:,:,:,iblk), & alvdr (:,:,iblk), alidr (:,:,iblk), & alvdf (:,:,iblk), alidf (:,:,iblk), & -!tcxzsal fzsal (:,:,iblk), fzsal_g (:,:,iblk), & flux_bio =flux_bio (:,:,1:nbtrcr,iblk), & Qref_iso =Qref_iso (:,:,:,iblk), & fiso_evap=fiso_evap(:,:,:,iblk), & diff --git a/cicecore/drivers/unittest/gridavgchk/CICE_InitMod.F90 b/cicecore/drivers/unittest/gridavgchk/CICE_InitMod.F90 index a32c82d82..dc9fece6e 100644 --- a/cicecore/drivers/unittest/gridavgchk/CICE_InitMod.F90 +++ b/cicecore/drivers/unittest/gridavgchk/CICE_InitMod.F90 @@ -450,8 +450,6 @@ subroutine init_restart if (trim(runtype) == 'continue') then if (tr_brine) & restart_hbrine = .true. -!tcxzsal if (solve_zsal) & -! restart_zsal = .true. if (skl_bgc .or. z_tracers) & restart_bgc = .true. endif @@ -461,7 +459,6 @@ subroutine init_restart if (tr_brine .and. restart_hbrine) call read_restart_hbrine endif -!tcxzsal if (solve_zsal .or. skl_bgc .or. z_tracers) then ! biogeochemistry if (skl_bgc .or. z_tracers) then ! biogeochemistry if (tr_fsd) then write (nu_diag,*) 'FSD implementation incomplete for use with BGC' diff --git a/cicecore/drivers/unittest/halochk/CICE_InitMod.F90 b/cicecore/drivers/unittest/halochk/CICE_InitMod.F90 index a32c82d82..dc9fece6e 100644 --- a/cicecore/drivers/unittest/halochk/CICE_InitMod.F90 +++ b/cicecore/drivers/unittest/halochk/CICE_InitMod.F90 @@ -450,8 +450,6 @@ subroutine init_restart if (trim(runtype) == 'continue') then if (tr_brine) & restart_hbrine = .true. -!tcxzsal if (solve_zsal) & -! restart_zsal = .true. if (skl_bgc .or. z_tracers) & restart_bgc = .true. endif @@ -461,7 +459,6 @@ subroutine init_restart if (tr_brine .and. restart_hbrine) call read_restart_hbrine endif -!tcxzsal if (solve_zsal .or. skl_bgc .or. z_tracers) then ! biogeochemistry if (skl_bgc .or. z_tracers) then ! biogeochemistry if (tr_fsd) then write (nu_diag,*) 'FSD implementation incomplete for use with BGC' diff --git a/cicecore/drivers/unittest/opticep/CICE_InitMod.F90 b/cicecore/drivers/unittest/opticep/CICE_InitMod.F90 index a32c82d82..dc9fece6e 100644 --- a/cicecore/drivers/unittest/opticep/CICE_InitMod.F90 +++ b/cicecore/drivers/unittest/opticep/CICE_InitMod.F90 @@ -450,8 +450,6 @@ subroutine init_restart if (trim(runtype) == 'continue') then if (tr_brine) & restart_hbrine = .true. -!tcxzsal if (solve_zsal) & -! restart_zsal = .true. if (skl_bgc .or. z_tracers) & restart_bgc = .true. endif @@ -461,7 +459,6 @@ subroutine init_restart if (tr_brine .and. restart_hbrine) call read_restart_hbrine endif -!tcxzsal if (solve_zsal .or. skl_bgc .or. z_tracers) then ! biogeochemistry if (skl_bgc .or. z_tracers) then ! biogeochemistry if (tr_fsd) then write (nu_diag,*) 'FSD implementation incomplete for use with BGC' diff --git a/cicecore/drivers/unittest/opticep/CICE_RunMod.F90 b/cicecore/drivers/unittest/opticep/CICE_RunMod.F90 index 4613c1f20..42514e06c 100644 --- a/cicecore/drivers/unittest/opticep/CICE_RunMod.F90 +++ b/cicecore/drivers/unittest/opticep/CICE_RunMod.F90 @@ -376,7 +376,6 @@ subroutine ice_step call ice_timer_start(timer_diags) ! diagnostics if (mod(istep,diagfreq) == 0) then call runtime_diags(dt) ! log file -!tcxzsal if (solve_zsal) call zsal_diags if (skl_bgc .or. z_tracers) call bgc_diags if (tr_brine) call hbrine_diags if (my_task == master_task) then @@ -401,7 +400,6 @@ subroutine ice_step if (tr_fsd) call write_restart_fsd if (tr_iso) call write_restart_iso if (tr_aero) call write_restart_aero -!tcxzsal if (solve_zsal .or. skl_bgc .or. z_tracers) & if (skl_bgc .or. z_tracers) & call write_restart_bgc if (tr_brine) call write_restart_hbrine @@ -587,8 +585,6 @@ subroutine coupling_prep (iblk) fsalt_ai (i,j,iblk) = fsalt (i,j,iblk) fhocn_ai (i,j,iblk) = fhocn (i,j,iblk) fswthru_ai(i,j,iblk) = fswthru(i,j,iblk) -!tcxzsal fzsal_ai (i,j,iblk) = fzsal (i,j,iblk) -! fzsal_g_ai(i,j,iblk) = fzsal_g(i,j,iblk) if (nbtrcr > 0) then do k = 1, nbtrcr @@ -634,7 +630,6 @@ subroutine coupling_prep (iblk) faero_ocn(:,:,:,iblk), & alvdr (:,:,iblk), alidr (:,:,iblk), & alvdf (:,:,iblk), alidf (:,:,iblk), & -!tcxzsal fzsal (:,:,iblk), fzsal_g (:,:,iblk), & flux_bio =flux_bio (:,:,1:nbtrcr,iblk), & Qref_iso =Qref_iso (:,:,:,iblk), & fiso_evap=fiso_evap(:,:,:,iblk), & diff --git a/cicecore/drivers/unittest/opticep/ice_init_column.F90 b/cicecore/drivers/unittest/opticep/ice_init_column.F90 index cc40dd388..04749b98c 100644 --- a/cicecore/drivers/unittest/opticep/ice_init_column.F90 +++ b/cicecore/drivers/unittest/opticep/ice_init_column.F90 @@ -735,7 +735,6 @@ subroutine init_bgc() use ice_arrays_column, only: zfswin, trcrn_sw, & ocean_bio_all, ice_bio_net, snow_bio_net, & cgrid, igrid, bphi, iDi, bTiz, iki -!tcxzsal Rayleigh_criteria, Rayleigh_real use ice_blocks, only: block, get_block use ice_domain, only: nblocks, blocks_ice use ice_flux, only: sss @@ -756,9 +755,6 @@ subroutine init_bgc() integer (kind=int_kind) :: & max_nbtrcr, max_algae, max_don, max_doc, max_dic, max_aero, max_fe -!tcxzsal logical (kind=log_kind) :: & -! RayleighC - type (block) :: & this_block ! block information for current block @@ -768,9 +764,6 @@ subroutine init_bgc() real(kind=dbl_kind), dimension(nilyr,ncat) :: & sicen -!tcxzsal real(kind=dbl_kind) :: & -! RayleighR - integer (kind=int_kind) :: & nbtrcr, ntrcr, ntrcr_o, nt_sice @@ -800,53 +793,6 @@ subroutine init_bgc() zfswin (:,:,:,:,:) = c0 ! shortwave flux on bio grid trcrn_sw (:,:,:,:,:) = c0 ! tracers active in the shortwave calculation trcrn_bgc (:,:) = c0 -!tcxzsal RayleighR = c0 -! RayleighC = .false. -! -! !----------------------------------------------------------------- -! ! zsalinity initialization -! !----------------------------------------------------------------- -! -!tcxzsal if (solve_zsal) then ! default values -! -! !$OMP PARALLEL DO PRIVATE(iblk,i,j,k,n,ilo,ihi,jlo,jhi,this_block,trcrn_bgc) -! do iblk = 1, nblocks -! -! this_block = get_block(blocks_ice(iblk),iblk) -! ilo = this_block%ilo -! ihi = this_block%ihi -! jlo = this_block%jlo -! jhi = this_block%jhi -! -! do j = jlo, jhi -! do i = ilo, ihi -! call icepack_init_zsalinity(nblyr=nblyr, ntrcr_o=ntrcr_o, & -! Rayleigh_criteria = RayleighC, & -! Rayleigh_real = RayleighR, & -! trcrn_bgc = trcrn_bgc, & -! nt_bgc_S = nt_bgc_S, & -! ncat = ncat, & -! sss = sss(i,j,iblk)) -! if (.not. restart_zsal) then -! Rayleigh_real (i,j,iblk) = RayleighR -! Rayleigh_criteria(i,j,iblk) = RayleighC -! do n = 1,ncat -! do k = 1, nblyr -! trcrn (i,j,nt_bgc_S+k-1, n,iblk) = & -! trcrn_bgc( nt_bgc_S+k-1-ntrcr_o,n) -! enddo -! enddo -! endif -! enddo ! i -! enddo ! j -! enddo ! iblk -! !$OMP END PARALLEL DO -! call icepack_warnings_flush(nu_diag) -! if (icepack_warnings_aborted()) call abort_ice(error_message=subname, & -! file=__FILE__, line=__LINE__) -! endif ! solve_zsal -! -! if (.not. solve_zsal) restart_zsal = .false. !----------------------------------------------------------------- ! biogeochemistry initialization @@ -962,7 +908,6 @@ subroutine init_bgc() ! read restart to complete BGC initialization !----------------------------------------------------------------- -!tcxzsal if (restart_zsal .or. restart_bgc) call read_restart_bgc if (restart_bgc) call read_restart_bgc deallocate(trcrn_bgc) @@ -1470,7 +1415,6 @@ subroutine input_zbgc write(nu_diag,*) subname//' WARNING: restart = false, setting bgc restart flags to false' restart_bgc = .false. restart_hbrine = .false. -!tcxzsal restart_zsal = .false. endif if (solve_zsal) then @@ -1661,11 +1605,6 @@ subroutine input_zbgc write(nu_diag,1005) ' phi_snow = ', phi_snow endif write(nu_diag,1010) ' solve_zsal (deprecated) = ', solve_zsal -!tcxzsal if (solve_zsal) then -! write(nu_diag,1010) ' restart_zsal = ', restart_zsal -! write(nu_diag,1000) ' grid_oS = ', grid_oS -! write(nu_diag,1005) ' l_skS = ', l_skS -! endif write(nu_diag,1010) ' skl_bgc = ', skl_bgc write(nu_diag,1010) ' restart_bgc = ', restart_bgc @@ -1862,7 +1801,6 @@ subroutine count_tracers !----------------------------------------------------------------- call icepack_query_parameters( & -!tcxzsal solve_zsal_out=solve_zsal, & skl_bgc_out=skl_bgc, z_tracers_out=z_tracers) call icepack_warnings_flush(nu_diag) @@ -2040,12 +1978,6 @@ subroutine count_tracers ntrcr = ntrcr + 1 endif -! nt_bgc_S = 0 -!tcxzsal if (solve_zsal) then ! .true. only if tr_brine = .true. -! nt_bgc_S = ntrcr + 1 -! ntrcr = ntrcr + nblyr -! endif - if (skl_bgc .or. z_tracers) then if (skl_bgc) then @@ -2473,12 +2405,10 @@ subroutine init_zbgc !----------------------------------------------------------------- call icepack_query_parameters( & -!tcxzsal solve_zsal_out=solve_zsal, & skl_bgc_out=skl_bgc, z_tracers_out=z_tracers, & dEdd_algae_out=dEdd_algae, & grid_o_out=grid_o, l_sk_out=l_sk, & initbio_frac_out=initbio_frac, & -!tcxzsal grid_oS_out=grid_oS, l_skS_out=l_skS, & phi_snow_out=phi_snow, frazil_scav_out = frazil_scav) call icepack_warnings_flush(nu_diag) if (icepack_warnings_aborted()) call abort_ice(error_message=subname, & @@ -2689,18 +2619,6 @@ subroutine init_zbgc ntd = 0 ! if nt_fbri /= 0 then use fbri dependency if (nt_fbri == 0) ntd = -1 ! otherwise make tracers depend on ice volume -!tcxzsal if (solve_zsal) then ! .true. only if tr_brine = .true. -! do k = 1,nblyr -! trcr_depend(nt_bgc_S + k - 1) = 2 + nt_fbri + ntd -! trcr_base (nt_bgc_S,1) = c0 ! default: ice area -! trcr_base (nt_bgc_S,2) = c1 -! trcr_base (nt_bgc_S,3) = c0 -! n_trcr_strata(nt_bgc_S) = 1 -! nt_strata(nt_bgc_S,1) = nt_fbri -! nt_strata(nt_bgc_S,2) = 0 -! enddo -! endif - bio_index(:) = 0 bio_index_o(:) = 0 diff --git a/cicecore/drivers/unittest/opticep/ice_step_mod.F90 b/cicecore/drivers/unittest/opticep/ice_step_mod.F90 index 7f2928dd4..c291d8802 100644 --- a/cicecore/drivers/unittest/opticep/ice_step_mod.F90 +++ b/cicecore/drivers/unittest/opticep/ice_step_mod.F90 @@ -661,7 +661,6 @@ subroutine step_therm2 (dt, iblk) file=__FILE__, line=__LINE__) ! nltrcr is only used as a zbgc flag in icepack (number of zbgc tracers > 0) -!tcxzsal if (z_tracers .or. solve_zsal) then if (z_tracers) then nltrcr = 1 else @@ -718,7 +717,6 @@ subroutine step_therm2 (dt, iblk) igrid = igrid, & faero_ocn = faero_ocn (i,j,:,iblk), & first_ice = first_ice (i,j,:,iblk), & -!tcxzsal fzsal = fzsal (i,j, iblk), & flux_bio = flux_bio (i,j,1:nbtrcr,iblk), & ocean_bio = ocean_bio (i,j,1:nbtrcr,iblk), & frazil_diag= frazil_diag(i,j,iblk) & @@ -1138,7 +1136,6 @@ subroutine step_dyn_ridge (dt, ndtd, iblk) aice = aice (i,j, iblk), & fsalt = fsalt (i,j, iblk), & first_ice = first_ice(i,j,:,iblk), & -!tcxzsal fzsal = fzsal (i,j, iblk), & flux_bio = flux_bio (i,j,1:nbtrcr,iblk)) endif ! tmask @@ -1720,7 +1717,6 @@ subroutine biogeochemistry (dt, iblk) iDi = iDi (i,j,:,:, iblk), & iki = iki (i,j,:,:, iblk), & zfswin = zfswin (i,j,:,:, iblk), & -!tcxzsal zsal_tot = zsal_tot (i,j, iblk), & darcy_V = darcy_V (i,j,:, iblk), & grow_net = grow_net (i,j, iblk), & PP_net = PP_net (i,j, iblk), & @@ -1739,8 +1735,6 @@ subroutine biogeochemistry (dt, iblk) snow_bio_net = snow_bio_net(i,j,1:nbtrcr, iblk), & fswthrun = fswthrun (i,j,:, iblk), & sice_rho = sice_rho (i,j,:, iblk), & -!tcxzsal fzsal = fzsal (i,j, iblk), & -! fzsal_g = fzsal_g (i,j, iblk), & meltbn = meltbn (i,j,:, iblk), & melttn = melttn (i,j,:, iblk), & congeln = congeln (i,j,:, iblk), & @@ -1760,7 +1754,6 @@ subroutine biogeochemistry (dt, iblk) aice0 = aice0 (i,j, iblk), & trcrn = trcrn (i,j,:,:, iblk), & vsnon_init = vsnon_init (i,j,:, iblk), & -!tcxzsal Rayleigh_criteria = Rayleigh_criteria(i,j,iblk), & skl_bgc = skl_bgc) enddo ! i diff --git a/cicecore/drivers/unittest/sumchk/CICE_InitMod.F90 b/cicecore/drivers/unittest/sumchk/CICE_InitMod.F90 index a32c82d82..dc9fece6e 100644 --- a/cicecore/drivers/unittest/sumchk/CICE_InitMod.F90 +++ b/cicecore/drivers/unittest/sumchk/CICE_InitMod.F90 @@ -450,8 +450,6 @@ subroutine init_restart if (trim(runtype) == 'continue') then if (tr_brine) & restart_hbrine = .true. -!tcxzsal if (solve_zsal) & -! restart_zsal = .true. if (skl_bgc .or. z_tracers) & restart_bgc = .true. endif @@ -461,7 +459,6 @@ subroutine init_restart if (tr_brine .and. restart_hbrine) call read_restart_hbrine endif -!tcxzsal if (solve_zsal .or. skl_bgc .or. z_tracers) then ! biogeochemistry if (skl_bgc .or. z_tracers) then ! biogeochemistry if (tr_fsd) then write (nu_diag,*) 'FSD implementation incomplete for use with BGC' diff --git a/cicecore/shared/ice_arrays_column.F90 b/cicecore/shared/ice_arrays_column.F90 index cde0d79af..66f1819fa 100644 --- a/cicecore/shared/ice_arrays_column.F90 +++ b/cicecore/shared/ice_arrays_column.F90 @@ -209,27 +209,12 @@ module ice_arrays_column darcy_V ! darcy velocity positive up (m/s) real (kind=dbl_kind), dimension (:,:,:), allocatable, public :: & -!tcxzsal zsal_tot , & ! Total ice salinity in per grid cell (g/m^2) chl_net , & ! Total chla (mg chla/m^2) per grid cell NO_net ! Total nitrate per grid cell -!tcxzsal logical (kind=log_kind), dimension (:,:,:), allocatable, public :: & -! Rayleigh_criteria ! .true. means Ra_c was reached -! -! real (kind=dbl_kind), dimension (:,:,:), allocatable, public :: & -! Rayleigh_real ! .true. = c1, .false. = c0 - real (kind=dbl_kind), dimension (:,:,:,:), allocatable, public :: & sice_rho ! avg sea ice density (kg/m^3) ! ech: diagnostic only? -!tcxzsal real (kind=dbl_kind), dimension (:,:,:,:), allocatable, public :: & -! fzsaln, & ! category fzsal(kg/m^2/s) -! fzsaln_g ! salt flux from gravity drainage only -! -! real (kind=dbl_kind), dimension (:,:,:), allocatable, public :: & -! fzsal , & ! Total flux of salt to ocean at time step for conservation -! fzsal_g ! Total gravity drainage flux - real (kind=dbl_kind), dimension (:,:,:,:,:), allocatable, public :: & zfswin ! Shortwave flux into layers interpolated on bio grid (W/m^2) @@ -336,14 +321,8 @@ subroutine alloc_arrays_column grow_net (nx_block,ny_block,max_blocks), & ! Specific growth rate (/s) per grid cell PP_net (nx_block,ny_block,max_blocks), & ! Total production (mg C/m^2/s) per grid cell hbri (nx_block,ny_block,max_blocks), & ! brine height, area-averaged for comparison with hi (m) -!tcxzsal zsal_tot (nx_block,ny_block,max_blocks), & ! Total ice salinity in per grid cell (g/m^2) chl_net (nx_block,ny_block,max_blocks), & ! Total chla (mg chla/m^2) per grid cell NO_net (nx_block,ny_block,max_blocks), & ! Total nitrate per grid cell -!tcxzsal Rayleigh_criteria & -! (nx_block,ny_block,max_blocks), & ! .true. means Ra_c was reached -! Rayleigh_real(nx_block,ny_block,max_blocks), & ! .true. = c1, .false. = c0 -!tcxzsal fzsal (nx_block,ny_block,max_blocks), & ! Total flux of salt to ocean at time step for conservation -! fzsal_g (nx_block,ny_block,max_blocks), & ! Total gravity drainage flux upNO (nx_block,ny_block,max_blocks), & ! nitrate uptake rate (mmol/m^2/d) times aice upNH (nx_block,ny_block,max_blocks), & ! ammonium uptake rate (mmol/m^2/d) times aice meltsliq (nx_block,ny_block,max_blocks), & ! snow melt mass (kg/m^2) @@ -373,8 +352,6 @@ subroutine alloc_arrays_column dhbr_bot (nx_block,ny_block,ncat,max_blocks), & ! brine bottom change darcy_V (nx_block,ny_block,ncat,max_blocks), & ! darcy velocity positive up (m/s) sice_rho (nx_block,ny_block,ncat,max_blocks), & ! avg sea ice density (kg/m^3) ! ech: diagnostic only? -!tcxzsal fzsaln (nx_block,ny_block,ncat,max_blocks), & ! category fzsal(kg/m^2/s) -! fzsaln_g (nx_block,ny_block,ncat,max_blocks), & ! salt flux from gravity drainage only Iswabsn (nx_block,ny_block,nilyr,ncat,max_blocks), & ! SW radiation absorbed in ice layers (W m-2) Sswabsn (nx_block,ny_block,nslyr,ncat,max_blocks), & ! SW radiation absorbed in snow layers (W m-2) fswpenln (nx_block,ny_block,nilyr+1,ncat,max_blocks), & ! visible SW entering ice layers (W m-2) diff --git a/cicecore/shared/ice_init_column.F90 b/cicecore/shared/ice_init_column.F90 index dddc226a7..81b7e9960 100644 --- a/cicecore/shared/ice_init_column.F90 +++ b/cicecore/shared/ice_init_column.F90 @@ -735,7 +735,6 @@ subroutine init_bgc() use ice_arrays_column, only: zfswin, trcrn_sw, & ocean_bio_all, ice_bio_net, snow_bio_net, & cgrid, igrid, bphi, iDi, bTiz, iki -!tcxzsal Rayleigh_criteria, Rayleigh_real use ice_blocks, only: block, get_block use ice_domain, only: nblocks, blocks_ice use ice_flux, only: sss @@ -756,9 +755,6 @@ subroutine init_bgc() integer (kind=int_kind) :: & max_nbtrcr, max_algae, max_don, max_doc, max_dic, max_aero, max_fe -!tcxzsal logical (kind=log_kind) :: & -! RayleighC - type (block) :: & this_block ! block information for current block @@ -768,9 +764,6 @@ subroutine init_bgc() real(kind=dbl_kind), dimension(nilyr,ncat) :: & sicen -!tcxzsal real(kind=dbl_kind) :: & -! RayleighR - integer (kind=int_kind) :: & nbtrcr, ntrcr, ntrcr_o, nt_sice @@ -800,53 +793,6 @@ subroutine init_bgc() zfswin (:,:,:,:,:) = c0 ! shortwave flux on bio grid trcrn_sw (:,:,:,:,:) = c0 ! tracers active in the shortwave calculation trcrn_bgc (:,:) = c0 -!tcxzsal RayleighR = c0 -! RayleighC = .false. -! -! !----------------------------------------------------------------- -! ! zsalinity initialization -! !----------------------------------------------------------------- -! -!tcxzsal if (solve_zsal) then ! default values -! -! !$OMP PARALLEL DO PRIVATE(iblk,i,j,k,n,ilo,ihi,jlo,jhi,this_block,trcrn_bgc) -! do iblk = 1, nblocks -! -! this_block = get_block(blocks_ice(iblk),iblk) -! ilo = this_block%ilo -! ihi = this_block%ihi -! jlo = this_block%jlo -! jhi = this_block%jhi -! -! do j = jlo, jhi -! do i = ilo, ihi -! call icepack_init_zsalinity(nblyr=nblyr, ntrcr_o=ntrcr_o, & -! Rayleigh_criteria = RayleighC, & -! Rayleigh_real = RayleighR, & -! trcrn_bgc = trcrn_bgc, & -! nt_bgc_S = nt_bgc_S, & -! ncat = ncat, & -! sss = sss(i,j,iblk)) -! if (.not. restart_zsal) then -! Rayleigh_real (i,j,iblk) = RayleighR -! Rayleigh_criteria(i,j,iblk) = RayleighC -! do n = 1,ncat -! do k = 1, nblyr -! trcrn (i,j,nt_bgc_S+k-1, n,iblk) = & -! trcrn_bgc( nt_bgc_S+k-1-ntrcr_o,n) -! enddo -! enddo -! endif -! enddo ! i -! enddo ! j -! enddo ! iblk -! !$OMP END PARALLEL DO -! call icepack_warnings_flush(nu_diag) -! if (icepack_warnings_aborted()) call abort_ice(error_message=subname, & -! file=__FILE__, line=__LINE__) -! endif ! solve_zsal -! -! if (.not. solve_zsal) restart_zsal = .false. !----------------------------------------------------------------- ! biogeochemistry initialization @@ -962,7 +908,6 @@ subroutine init_bgc() ! read restart to complete BGC initialization !----------------------------------------------------------------- -!tcxzsal if (restart_zsal .or. restart_bgc) call read_restart_bgc if (restart_bgc) call read_restart_bgc deallocate(trcrn_bgc) @@ -1470,7 +1415,6 @@ subroutine input_zbgc write(nu_diag,*) subname//' WARNING: restart = false, setting bgc restart flags to false' restart_bgc = .false. restart_hbrine = .false. -!tcxzsal restart_zsal = .false. endif if (solve_zsal) then @@ -1661,11 +1605,6 @@ subroutine input_zbgc write(nu_diag,1005) ' phi_snow = ', phi_snow endif write(nu_diag,1010) ' solve_zsal (deprecated) = ', solve_zsal -!tcxzsal if (solve_zsal) then -! write(nu_diag,1010) ' restart_zsal = ', restart_zsal -! write(nu_diag,1000) ' grid_oS = ', grid_oS -! write(nu_diag,1005) ' l_skS = ', l_skS -! endif write(nu_diag,1010) ' skl_bgc = ', skl_bgc write(nu_diag,1010) ' restart_bgc = ', restart_bgc @@ -1862,7 +1801,6 @@ subroutine count_tracers !----------------------------------------------------------------- call icepack_query_parameters( & -!tcxzsal solve_zsal_out=solve_zsal, & skl_bgc_out=skl_bgc, z_tracers_out=z_tracers) call icepack_warnings_flush(nu_diag) @@ -2040,12 +1978,6 @@ subroutine count_tracers ntrcr = ntrcr + 1 endif -! nt_bgc_S = 0 -!tcxzsal if (solve_zsal) then ! .true. only if tr_brine = .true. -! nt_bgc_S = ntrcr + 1 -! ntrcr = ntrcr + nblyr -! endif - if (skl_bgc .or. z_tracers) then if (skl_bgc) then @@ -2473,12 +2405,10 @@ subroutine init_zbgc !----------------------------------------------------------------- call icepack_query_parameters( & -!tcxzsal solve_zsal_out=solve_zsal, & skl_bgc_out=skl_bgc, z_tracers_out=z_tracers, & dEdd_algae_out=dEdd_algae, & grid_o_out=grid_o, l_sk_out=l_sk, & initbio_frac_out=initbio_frac, & -!tcxzsal grid_oS_out=grid_oS, l_skS_out=l_skS, & phi_snow_out=phi_snow, frazil_scav_out = frazil_scav) call icepack_warnings_flush(nu_diag) if (icepack_warnings_aborted()) call abort_ice(error_message=subname, & @@ -2688,18 +2618,6 @@ subroutine init_zbgc ntd = 0 ! if nt_fbri /= 0 then use fbri dependency if (nt_fbri == 0) ntd = -1 ! otherwise make tracers depend on ice volume -!tcxzsal if (solve_zsal) then ! .true. only if tr_brine = .true. -! do k = 1,nblyr -! trcr_depend(nt_bgc_S + k - 1) = 2 + nt_fbri + ntd -! trcr_base (nt_bgc_S,1) = c0 ! default: ice area -! trcr_base (nt_bgc_S,2) = c1 -! trcr_base (nt_bgc_S,3) = c0 -! n_trcr_strata(nt_bgc_S) = 1 -! nt_strata(nt_bgc_S,1) = nt_fbri -! nt_strata(nt_bgc_S,2) = 0 -! enddo -! endif - bio_index(:) = 0 bio_index_o(:) = 0 diff --git a/cicecore/shared/ice_restart_column.F90 b/cicecore/shared/ice_restart_column.F90 index eb6ffb621..2c5b18c36 100644 --- a/cicecore/shared/ice_restart_column.F90 +++ b/cicecore/shared/ice_restart_column.F90 @@ -907,7 +907,6 @@ end subroutine write_restart_hbrine subroutine write_restart_bgc() -!tcxzsal use ice_arrays_column, only: Rayleigh_criteria, Rayleigh_real use ice_blocks, only: block, get_block use ice_domain, only: nblocks, blocks_ice use ice_domain_size, only: ncat, n_algae, n_doc, n_dic, & @@ -1017,49 +1016,12 @@ subroutine write_restart_bgc() if (tr_bgc_DON) don (i,j,:,iblk) = c0 if (tr_bgc_Fe ) fed (i,j,:,iblk) = c0 if (tr_bgc_Fe ) fep (i,j,:,iblk) = c0 -!tcxzsal if (solve_zsal) sss (i,j ,iblk) = c0 endif enddo enddo enddo !$OMP END PARALLEL DO - !----------------------------------------------------------------- - ! Salinity and extras - !----------------------------------------------------------------- -!tcxzsal if (solve_zsal) then -! -! do k = 1,nblyr -! write(nchar,'(i3.3)') k -! call write_restart_field(nu_dump_bgc,0,trcrn(:,:,nt_bgc_S+k-1,:,:),'ruf8', & -! 'zSalinity'//trim(nchar),ncat,diag) -! enddo -! -! call write_restart_field(nu_dump_bgc,0,sss,'ruf8','sss',1,diag) -! -! !$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block) -! do iblk = 1, nblocks -! this_block = get_block(blocks_ice(iblk),iblk) -! ilo = this_block%ilo -! ihi = this_block%ihi -! jlo = this_block%jlo -! jhi = this_block%jhi -! do j = jlo, jhi -! do i = ilo, ihi -! if (Rayleigh_criteria(i,j,iblk)) then -! Rayleigh_real (i,j,iblk) = c1 -! elseif (.NOT. Rayleigh_criteria(i,j,iblk)) then -! Rayleigh_real (i,j,iblk) = c0 -! endif -! enddo -! enddo -! enddo -! !$OMP END PARALLEL DO -! -! call write_restart_field(nu_dump_bgc,0,Rayleigh_real,'ruf8','Rayleigh',1,diag) -! -! endif ! solve_zsal - !----------------------------------------------------------------- ! Skeletal layer BGC !----------------------------------------------------------------- @@ -1351,7 +1313,6 @@ end subroutine write_restart_bgc subroutine read_restart_bgc() -!tcxzsal use ice_arrays_column, only: Rayleigh_real, Rayleigh_criteria use ice_blocks, only: block, get_block use ice_communicate, only: my_task, master_task use ice_domain, only: nblocks, blocks_ice @@ -1435,44 +1396,6 @@ subroutine read_restart_bgc() diag = .true. - !----------------------------------------------------------------- - ! Salinity and extras - !----------------------------------------------------------------- - -!tcxzsal if (restart_zsal) then -! -! if (my_task == master_task) write(nu_diag,*) subname,'zSalinity restart' -! do k = 1,nblyr -! write(nchar,'(i3.3)') k -! call read_restart_field(nu_restart_bgc,0,trcrn(:,:,nt_bgc_S+k-1,:,:),'ruf8', & -! 'zSalinity'//trim(nchar),ncat,diag,field_loc_center,field_type_scalar) -! enddo -! -! if (my_task == master_task) write(nu_diag,*) subname,'sea surface salinity' -! call read_restart_field(nu_restart_bgc,0,sss,'ruf8','sss',1,diag) -! call read_restart_field(nu_restart_bgc,0,Rayleigh_real,'ruf8','Rayleigh',1,diag) -! -! !$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block) -! do iblk = 1, nblocks -! this_block = get_block(blocks_ice(iblk),iblk) -! ilo = this_block%ilo -! ihi = this_block%ihi -! jlo = this_block%jlo -! jhi = this_block%jhi -! -! do j = jlo, jhi -! do i = ilo, ihi -! if (Rayleigh_real (i,j,iblk) .GE. c1) then -! Rayleigh_criteria (i,j,iblk) = .true. -! elseif (Rayleigh_real (i,j,iblk) < c1) then -! Rayleigh_criteria (i,j,iblk) = .false. -! endif -! enddo -! enddo -! enddo ! iblk -! !$OMP END PARALLEL DO -! endif ! restart_zsal - !----------------------------------------------------------------- ! Skeletal Layer BGC !----------------------------------------------------------------- diff --git a/doc/source/user_guide/ug_case_settings.rst b/doc/source/user_guide/ug_case_settings.rst index 516f3238d..b60f8f751 100644 --- a/doc/source/user_guide/ug_case_settings.rst +++ b/doc/source/user_guide/ug_case_settings.rst @@ -739,7 +739,7 @@ zbgc_nml "``f_exude_s``", "real", "fraction of exudation to DOC saccharids", "1.0" "``grid_o``", "real", "z biology for bottom flux", "5.0" "``grid_o_t``", "real", "z biology for top flux", "5.0" - "``grid_oS``", "real", "z salinity for bottom flux", "5.0" + "``grid_oS``", "real", "zsalinity DEPRECATED", "" "``grow_Tdep_diatoms``", "real", "temperature dependence growth diatoms per degC", "0.06" "``grow_Tdep_phaeo``", "real", "temperature dependence growth phaeocystis per degC", "0.06" "``grow_Tdep_sp``", "real", "temperature dependence growth small plankton per degC", "0.06" @@ -765,7 +765,7 @@ zbgc_nml "``K_Sil_sp``", "real", "silicate half saturation small plankton mmol/m^3", "0.0" "``kn_bac_protein``", "real", "bacterial degradation of DON per day", "0.03" "``l_sk``", "real", "characteristic diffusive scale in m", "7.0" - "``l_skS``", "real", "z salinity characteristic diffusive scale in m", "7.0" + "``l_skS``", "real", "zsalinity DEPRECATED", "" "``max_dfe_doc1``", "real", "max ratio of dFe to saccharides in the ice in nm Fe / muM C", "0.2" "``max_loss``", "real", "restrict uptake to percent of remaining value", "0.9" "``modal_aero``", "logical", "modal aerosols", "``.false.``"