Skip to content

Commit

Permalink
Added method to point ponters to members of ocean_state_type
Browse files Browse the repository at this point in the history
- To initialize within the MCT coupler we need access to members
  of ocean_state_type which are private. This method allows us
  to have local pointers to those members.
  • Loading branch information
alperaltuntas committed Jul 13, 2017
1 parent 57e6086 commit 5df3bc3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion config_src/coupled_driver/ocean_model_MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ module ocean_model_mod
public ocean_model_restart
public ice_ocn_bnd_type_chksum
public ocean_public_type_chksum
public ocean_model_data_get
public ocean_model_data_get
public get_state_pointers

interface ocean_model_data_get
module procedure ocean_model_data1D_get
module procedure ocean_model_data2D_get
Expand Down Expand Up @@ -1083,4 +1085,13 @@ subroutine ocean_public_type_chksum(id, timestep, ocn)
100 FORMAT(" CHECKSUM::",A20," = ",Z20)
end subroutine ocean_public_type_chksum

!> Returns pointers to objects within ocean_state_type
subroutine get_state_pointers(OS, grid)
type(ocean_state_type), pointer :: OS !< Ocean state type
type(ocean_grid_type), optional, pointer :: grid !< Ocean grid

if (present(grid)) grid => OS%grid

end subroutine get_state_pointers

end module ocean_model_mod

0 comments on commit 5df3bc3

Please sign in to comment.