Skip to content

Commit

Permalink
Bringing config_src updates from esmg (#2)
Browse files Browse the repository at this point in the history
- otherwise it doesn't compile without linking to COBALT due to
   COBALT interface updates.
  • Loading branch information
kshedstrom authored Jan 19, 2024
1 parent 2ea5995 commit 574766e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
11 changes: 9 additions & 2 deletions config_src/external/GFDL_ocean_BGC/generic_tracer.F90
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ module generic_tracer

use g_tracer_utils, only : g_tracer_type, g_diag_type

use MOM_variables, only : thermo_var_ptrs

implicit none ; private

public generic_tracer_register
Expand All @@ -32,7 +34,8 @@ subroutine generic_tracer_register
end subroutine generic_tracer_register

!> Initialize generic tracers
subroutine generic_tracer_init(isc,iec,jsc,jec,isd,ied,jsd,jed,nk,ntau,axes,grid_tmask,grid_kmt,init_time)
subroutine generic_tracer_init(isc,iec,jsc,jec,isd,ied,jsd,jed,nk,ntau,axes,grid_tmask,grid_kmt,init_time, &
geolon,geolat)
integer, intent(in) :: isc !< Computation start index in i direction
integer, intent(in) :: iec !< Computation end index in i direction
integer, intent(in) :: jsc !< Computation start index in j direction
Expand All @@ -47,6 +50,8 @@ subroutine generic_tracer_init(isc,iec,jsc,jec,isd,ied,jsd,jed,nk,ntau,axes,grid
type(time_type), intent(in) :: init_time !< Time
real, dimension(:,:,:),target, intent(in) :: grid_tmask !< Mask
integer, dimension(:,:) , intent(in) :: grid_kmt !< Number of wet cells in column
real, dimension(:,:),target, intent(in) :: geolon !< Longitude
real, dimension(:,:),target, intent(in) :: geolat !< Latitude
end subroutine generic_tracer_init

!> Unknown
Expand All @@ -66,13 +71,15 @@ subroutine generic_tracer_coupler_accumulate(IOB_struc, weight, model_time)
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,&
subroutine generic_tracer_source(Temp,Salt,tv,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)
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]
real, dimension(ilb:,jlb:,:), intent(in) :: Salt !< Salinity [psu]
type(thermo_var_ptrs), intent(in) :: tv !< structure containing pointers to available
!! thermodynamic fields
real, dimension(ilb:,jlb:,:), intent(in) :: rho_dzt !< Mass per unit area of each layer [kg m-2]
real, dimension(ilb:,jlb:,:), intent(in) :: dzt !< Ocean layer thickness [m]
real, dimension(ilb:,jlb:), intent(in) :: hblt_depth !< Boundary layer depth [m]
Expand Down
5 changes: 4 additions & 1 deletion config_src/external/GFDL_ocean_BGC/generic_tracer_utils.F90
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ subroutine g_tracer_set_csdiag(diag_CS)
type(g_diag_ctrl), target,intent(in) :: diag_CS !< Unknown
end subroutine g_tracer_set_csdiag

subroutine g_tracer_set_common(isc,iec,jsc,jec,isd,ied,jsd,jed,nk,ntau,axes,grid_tmask,grid_kmt,init_time)
subroutine g_tracer_set_common(isc,iec,jsc,jec,isd,ied,jsd,jed,nk,ntau,axes,grid_tmask,grid_kmt,init_time, &
geolon,geolat)
integer, intent(in) :: isc !< Computation start index in i direction
integer, intent(in) :: iec !< Computation end index in i direction
integer, intent(in) :: jsc !< Computation start index in j direction
Expand All @@ -123,6 +124,8 @@ subroutine g_tracer_set_common(isc,iec,jsc,jec,isd,ied,jsd,jed,nk,ntau,axes,grid
real, dimension(isd:,jsd:,:),intent(in) :: grid_tmask !< Unknown
integer,dimension(isd:,jsd:),intent(in) :: grid_kmt !< Unknown
type(time_type), intent(in) :: init_time !< Unknown
real, dimension(isd:,jsd:), intent(in) :: geolon !< Longitude
real, dimension(isd:,jsd:), intent(in) :: geolat !< Latitude
end subroutine g_tracer_set_common

subroutine g_tracer_get_common(isc,iec,jsc,jec,isd,ied,jsd,jed,nk,ntau,&
Expand Down

0 comments on commit 574766e

Please sign in to comment.