Skip to content

Commit

Permalink
Remove eqn_of_state from generic tracer routines (mom-ocean#18)
Browse files Browse the repository at this point in the history
Remove eqn_of_state from generic tracer interfaces because the
photoacclimation mixed layer depth is now calculated in MOM6 and
passed to MOM6.

Co-authored-by: Theresa Morrison <[email protected]>
  • Loading branch information
theresa-morrison and Theresa Morrison authored Sep 12, 2024
1 parent aca7298 commit 1bedb00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions config_src/external/GFDL_ocean_BGC/generic_tracer.F90
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ end subroutine generic_tracer_coupler_accumulate
!> Calls the corresponding generic_X_update_from_source routine for each package X
subroutine generic_tracer_source(Temp,Salt,rho_dzt,dzt,hblt_depth,ilb,jlb,tau,dtts,&
grid_dat,model_time,nbands,max_wavelength_band,sw_pen_band,opacity_band,internal_heat,&
frunoff,grid_ht, current_wave_stress, sosga, geolat, eqn_of_state, photo_acc_dpth)
frunoff,grid_ht, current_wave_stress, sosga, geolat, photo_acc_dpth)
integer, intent(in) :: ilb !< Lower bounds of x extent of input arrays on data domain
integer, intent(in) :: jlb !< Lower bounds of y extent of input arrays on data domain
real, dimension(ilb:,jlb:,:), intent(in) :: Temp !< Potential temperature [deg C]
Expand All @@ -97,7 +97,6 @@ subroutine generic_tracer_source(Temp,Salt,rho_dzt,dzt,hblt_depth,ilb,jlb,tau,dt
real, dimension(ilb:,jlb:),optional , intent(in) :: current_wave_stress !< Unknown, and presently unused by MOM6
real, optional , intent(in) :: sosga !< Global average sea surface salinity [ppt]
real, dimension(ilb:,jlb:),optional, intent(in) :: geolat !< Latitude
type(EOS_type), optional, intent(in) :: eqn_of_state !< A pointer to the equation of state
real, dimension(ilb:,jlb:), optional, intent(in) :: photo_acc_dpth
end subroutine generic_tracer_source

Expand Down
6 changes: 3 additions & 3 deletions src/tracer/MOM_generic_tracer.F90
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ subroutine MOM_generic_tracer_column_physics(h_old, h_new, ea, eb, fluxes, Hml,
call generic_tracer_source(tv%T, tv%S, rho_dzt, dzt, dz_ml, G%isd, G%jsd, 1, dt, &
G%areaT, get_diag_time_end(CS%diag), &
optics%nbands, optics%max_wavelength_band, optics%sw_pen_band, optics%opacity_band, &
internal_heat=tv%internal_heat, frunoff=fluxes%frunoff, sosga=sosga, geolat=G%geolatT, eqn_of_state=tv%eqn_of_state, &
internal_heat=tv%internal_heat, frunoff=fluxes%frunoff, sosga=sosga, geolat=G%geolatT, &
photo_acc_dpth=mld_pha)
else
! tv%internal_heat is a null pointer unless DO_GEOTHERMAL = True,
Expand All @@ -652,15 +652,15 @@ subroutine MOM_generic_tracer_column_physics(h_old, h_new, ea, eb, fluxes, Hml,
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, geolat=G%geolatT, eqn_of_state=tv%eqn_of_state, &
frunoff=G%US%RZ_T_to_kg_m2s*fluxes%frunoff(:,:), sosga=sosga, geolat=G%geolatT, &
photo_acc_dpth=mld_pha*US%Z_to_m)
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, geolat=G%geolatT, eqn_of_state=tv%eqn_of_state, &
frunoff=G%US%RZ_T_to_kg_m2s*fluxes%frunoff(:,:), sosga=sosga, geolat=G%geolatT, &
photo_acc_dpth=mld_pha*US%Z_to_m)
endif
endif
Expand Down

0 comments on commit 1bedb00

Please sign in to comment.