Skip to content

Commit

Permalink
change target to pointer and check for association
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael Dussin authored and marshallward committed Dec 8, 2023
1 parent 7ef6a57 commit 40134ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/parameterizations/vertical/MOM_set_diffusivity.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2052,7 +2052,7 @@ subroutine set_diffusivity_init(Time, G, GV, US, param_file, diag, CS, int_tide_
type(diag_ctrl), target, intent(inout) :: diag !< A structure used to regulate diagnostic output.
type(set_diffusivity_CS), pointer :: CS !< pointer set to point to the module control
!! structure.
type(int_tide_CS), intent(in), target :: int_tide_CSp !< Internal tide control structure
type(int_tide_CS), pointer :: int_tide_CSp !< Internal tide control structure
integer, intent(out) :: halo_TS !< The halo size of tracer points that must be
!! valid for the calculations in set_diffusivity.
logical, intent(out) :: double_diffuse !< This indicates whether some version
Expand Down Expand Up @@ -2097,7 +2097,7 @@ subroutine set_diffusivity_init(Time, G, GV, US, param_file, diag, CS, int_tide_
isd = G%isd ; ied = G%ied ; jsd = G%jsd ; jed = G%jed

CS%diag => diag
CS%int_tide_CSp => int_tide_CSp
if (associated(int_tide_CSp)) CS%int_tide_CSp => int_tide_CSp

! These default values always need to be set.
CS%BBL_mixing_as_max = .true.
Expand Down
4 changes: 2 additions & 2 deletions src/parameterizations/vertical/MOM_tidal_mixing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ logical function tidal_mixing_init(Time, G, GV, US, param_file, int_tide_CSp, di
type(verticalGrid_type), intent(in) :: GV !< Vertical grid structure.
type(unit_scale_type), intent(in) :: US !< A dimensional unit scaling type
type(param_file_type), intent(in) :: param_file !< Run-time parameter file handle
type(int_tide_CS),target, intent(in) :: int_tide_CSp !< A pointer to the internal tides control structure
type(int_tide_CS), pointer :: int_tide_CSp !< A pointer to the internal tides control structure
type(diag_ctrl), target, intent(inout) :: diag !< Diagnostics control structure.
type(tidal_mixing_cs), intent(inout) :: CS !< This module's control structure.

Expand Down Expand Up @@ -276,7 +276,7 @@ logical function tidal_mixing_init(Time, G, GV, US, param_file, int_tide_CSp, di

CS%debug = CS%debug.and.is_root_pe()
CS%diag => diag
CS%int_tide_CSp => int_tide_CSp
if (associated(int_tide_CSp)) CS%int_tide_CSp => int_tide_CSp
CS%use_CVmix_tidal = use_CVmix_tidal
CS%int_tide_dissipation = int_tide_dissipation

Expand Down

0 comments on commit 40134ed

Please sign in to comment.