Skip to content

Commit 5df3bc3

Browse files
committed
Added method to point ponters to members of ocean_state_type
- 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.
1 parent 57e6086 commit 5df3bc3

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

config_src/coupled_driver/ocean_model_MOM.F90

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ module ocean_model_mod
8989
public ocean_model_restart
9090
public ice_ocn_bnd_type_chksum
9191
public ocean_public_type_chksum
92-
public ocean_model_data_get
92+
public ocean_model_data_get
93+
public get_state_pointers
94+
9395
interface ocean_model_data_get
9496
module procedure ocean_model_data1D_get
9597
module procedure ocean_model_data2D_get
@@ -1083,4 +1085,13 @@ subroutine ocean_public_type_chksum(id, timestep, ocn)
10831085
100 FORMAT(" CHECKSUM::",A20," = ",Z20)
10841086
end subroutine ocean_public_type_chksum
10851087

1088+
!> Returns pointers to objects within ocean_state_type
1089+
subroutine get_state_pointers(OS, grid)
1090+
type(ocean_state_type), pointer :: OS !< Ocean state type
1091+
type(ocean_grid_type), optional, pointer :: grid !< Ocean grid
1092+
1093+
if (present(grid)) grid => OS%grid
1094+
1095+
end subroutine get_state_pointers
1096+
10861097
end module ocean_model_mod

0 commit comments

Comments
 (0)