Skip to content

Commit ad08044

Browse files
committed
remove an allocatable pointer in transportmod
Now an allocatable pointer is replaced with a target type. All tests passed with OSX gnu 8 compilers.
1 parent 5a3249d commit ad08044

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/betr/betr_core/TransportMod.F90

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,18 +1153,14 @@ subroutine backward_advection(zi, us, dtime, zold, bstatus)
11531153
real(r8):: time
11541154
character(len=32) :: subname = 'backward_advection'
11551155
class(gbetr_type), pointer :: gtype
1156-
type(extra_type), pointer :: extra_inst
1156+
type(extra_type), target :: extra_inst
11571157
integer :: nl
11581158

11591159
call bstatus%reset()
11601160
SHR_ASSERT_ALL((size(zi) == size(us)), errMsg(filename,__LINE__),bstatus)
11611161

11621162
SHR_ASSERT_ALL((size(zi) == size(zold)+4), errMsg(filename,__LINE__), bstatus)
11631163

1164-
nullify(Extra_inst)
1165-
1166-
allocate(Extra_inst) ! => create_extra_type()
1167-
11681164
gtype=> extra_inst
11691165
nl = size(zi)
11701166
call InitAllocate(gtype, 1, nl)
@@ -1182,7 +1178,7 @@ subroutine backward_advection(zi, us, dtime, zold, bstatus)
11821178
endif
11831179

11841180
call DDeallocate(gtype)
1185-
nullify(Extra_inst)
1181+
11861182

11871183
end subroutine backward_advection
11881184

0 commit comments

Comments
 (0)