Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change target to pointer and check for association #530

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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