marbl-ecosys / MARBL

Marine Biogeochemistry Library
https://marbl-ecosys.github.io
Other
13 stars 21 forks source link

Lig_photochem is a 3D field but is only non-zero in the surface layer #431

Open mnlevy1981 opened 1 year ago

mnlevy1981 commented 1 year ago

Lig_photochem(:) is set in compute_Lig_terms():

      !----------------------------------------------------------------------
      !  Ligand losses due to photochemistry in first ocean layer
      !  ligand photo-oxidation a function of PAR (2/5/2015)
      !----------------------------------------------------------------------

      Lig_photochem(:) = c0

      ! Initialize top level
      rate_per_sec = c0
      do subcol_ind = 1, PAR_nsubcols
        if ((PAR_col_frac(subcol_ind) > c0) .and. (PAR%interface(0,subcol_ind) > 1.0_r8)) then
          rate_per_sec_subcol = (log(PAR%interface(0,subcol_ind))*0.4373_r8)*(10.0e2_r8/dz1)*((12.0_r8/3.0_r8)*yps) ! 1/(3 months)
          rate_per_sec = rate_per_sec + PAR_col_frac(subcol_ind) * rate_per_sec_subcol
        endif
      end do
      Lig_photochem(1) = Lig_loc(1) * rate_per_sec

Unless there are plans to extend this below the surface, I think we can remove the depth dimension here and in the corresponding diagnostic. We would have to make one small change elsewhere in that subroutine that might introduce a round-off level answer change due to a change in the order of operations:

- Lig_loss(:) = Lig_scavenge(:) + 0.20_r8*sum(photoFe(:,:),dim=1) + Lig_photochem(:) + Lig_deg(:)
+ Lig_loss(:) = Lig_scavenge(:) + 0.20_r8*sum(photoFe(:,:),dim=1) + Lig_deg(:)
+ Lig_loss(1) = Lig_loss(1) + Lig_photochem