Skip to content

Commit

Permalink
Merge branch 'dev/gfdl' into esmg-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
adcroft authored Jul 26, 2024
2 parents 83adcc0 + 0440ed4 commit 141a3ce
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/tracer/MOM_generic_tracer.F90
Original file line number Diff line number Diff line change
Expand Up @@ -584,13 +584,24 @@ subroutine MOM_generic_tracer_column_physics(h_old, h_new, ea, eb, fluxes, Hml,
optics%nbands, optics%max_wavelength_band, optics%sw_pen_band, optics%opacity_band, &
internal_heat=tv%internal_heat, frunoff=fluxes%frunoff, sosga=sosga)
else
call generic_tracer_source(US%C_to_degC*tv%T, US%S_to_ppt*tv%S, rho_dzt, dzt, dz_ml, G%isd, G%jsd, 1, dt, &
! tv%internal_heat is a null pointer unless DO_GEOTHERMAL = True,
! so we have to check and only do the scaling if it is associated.
if(associated(tv%internal_heat)) then
call generic_tracer_source(US%C_to_degC*tv%T, US%S_to_ppt*tv%S, rho_dzt, dzt, dz_ml, G%isd, G%jsd, 1, dt, &
G%US%L_to_m**2*G%areaT(:,:), get_diag_time_end(CS%diag), &
optics%nbands, optics%max_wavelength_band, &
sw_pen_band=G%US%QRZ_T_to_W_m2*optics%sw_pen_band(:,:,:), &
opacity_band=G%US%m_to_Z*optics%opacity_band(:,:,:,:), &
internal_heat=G%US%RZ_to_kg_m2*US%C_to_degC*tv%internal_heat(:,:), &
frunoff=G%US%RZ_T_to_kg_m2s*fluxes%frunoff(:,:), sosga=sosga)
else
call generic_tracer_source(US%C_to_degC*tv%T, US%S_to_ppt*tv%S, rho_dzt, dzt, dz_ml, G%isd, G%jsd, 1, dt, &
G%US%L_to_m**2*G%areaT(:,:), get_diag_time_end(CS%diag), &
optics%nbands, optics%max_wavelength_band, &
sw_pen_band=G%US%QRZ_T_to_W_m2*optics%sw_pen_band(:,:,:), &
opacity_band=G%US%m_to_Z*optics%opacity_band(:,:,:,:), &
frunoff=G%US%RZ_T_to_kg_m2s*fluxes%frunoff(:,:), sosga=sosga)
endif
endif

! This uses applyTracerBoundaryFluxesInOut to handle the change in tracer due to freshwater fluxes
Expand Down

0 comments on commit 141a3ce

Please sign in to comment.