From ec631ef65375de78c35a1891e67502b49b230507 Mon Sep 17 00:00:00 2001 From: Yi-Cheng Teng - NOAA GFDL <143743249+yichengt900@users.noreply.github.com> Date: Mon, 22 Jan 2024 14:32:16 -0500 Subject: [PATCH] Add check (#6) --- generic_tracers/generic_COBALT.F90 | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/generic_tracers/generic_COBALT.F90 b/generic_tracers/generic_COBALT.F90 index d3ccec3..e3d578e 100644 --- a/generic_tracers/generic_COBALT.F90 +++ b/generic_tracers/generic_COBALT.F90 @@ -9764,12 +9764,14 @@ subroutine generic_COBALT_update_from_source(tracer_list,Temp,Salt,tv,rho_dzt,dz ! ! Iceberg and "Coastal" iron and other nutrient input ! - do j = jsc, jec ; do i = isc, iec - cobalt%jfe_iceberg(i,j,1) = cobalt%jfe_iceberg_ratio*max(frunoff(i,j),0.0)/rho_dzt(i,j,1) - cobalt%jno3_iceberg(i,j,1) = cobalt%jno3_iceberg_ratio*max(frunoff(i,j),0.0)/rho_dzt(i,j,1) - cobalt%jpo4_iceberg(i,j,1) = cobalt%jpo4_iceberg_ratio*max(frunoff(i,j),0.0)/rho_dzt(i,j,1) - cobalt%jfe_coast(i,j,1) = cobalt%fe_coast * mask_coast(i,j) * grid_tmask(i,j,1) / & - sqrt(grid_dat(i,j)) + do j = jsc, jec ; do i = isc, iec !{ + if (grid_kmt(i,j) .gt. 0) then !{ + cobalt%jfe_iceberg(i,j,1) = cobalt%jfe_iceberg_ratio*max(frunoff(i,j),0.0)/rho_dzt(i,j,1) + cobalt%jno3_iceberg(i,j,1) = cobalt%jno3_iceberg_ratio*max(frunoff(i,j),0.0)/rho_dzt(i,j,1) + cobalt%jpo4_iceberg(i,j,1) = cobalt%jpo4_iceberg_ratio*max(frunoff(i,j),0.0)/rho_dzt(i,j,1) + cobalt%jfe_coast(i,j,1) = cobalt%fe_coast * mask_coast(i,j) * grid_tmask(i,j,1) / & + sqrt(grid_dat(i,j)) + endif !} enddo; enddo !} i,j do k = 2, nk ; do j = jsc, jec ; do i = isc, iec !{ cobalt%jfe_coast(i,j,k) = cobalt%fe_coast * mask_coast(i,j) * grid_tmask(i,j,k) / &