Skip to content

Commit

Permalink
Merge pull request #159 from marshallward/eos_ptr_removal
Browse files Browse the repository at this point in the history
This merged SIS2 PR needs to become the version of SIS2 pointed to by MOM6-examples before MOM6 PR#5 can be accepted.
  • Loading branch information
Hallberg-NOAA authored Nov 21, 2021
2 parents e3b5574 + 55032ff commit 906d26c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/SIS2_ice_thm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module SIS2_ice_thm
! This file is part of SIS2. See LICENSE.md for the license.

use ice_thm_mod, only : get_thermo_coefs
use MOM_EOS, only : EOS_type, EOS_init, EOS_end
use MOM_EOS, only : EOS_type, EOS_init
use MOM_error_handler, only : SIS_error=>MOM_error, FATAL, WARNING, SIS_mesg=>MOM_mesg
use MOM_file_parser, only : get_param, log_param, read_param, log_version, param_file_type
use MOM_obsolete_params, only : obsolete_logical, obsolete_real
Expand Down Expand Up @@ -1741,7 +1741,10 @@ subroutine ice_thermo_init(param_file, ITV, US, init_EOS )
endif

if (present(init_EOS)) then ; if (init_EOS) then
if (.not.associated(ITV%EOS)) call EOS_init(param_file, ITV%EOS)
if (.not.associated(ITV%EOS)) then
allocate(ITV%EOS)
call EOS_init(param_file, ITV%EOS)
endif
endif ; endif

end subroutine ice_thermo_init
Expand Down Expand Up @@ -2190,7 +2193,7 @@ end subroutine get_SIS2_thermo_coefs
subroutine ice_thermo_end(ITV)
type(ice_thermo_type), pointer :: ITV !< A pointer to the ice thermodynamic parameter structure.

if (associated(ITV%EOS)) call EOS_end(ITV%EOS)
if (associated(ITV%EOS)) deallocate(ITV%EOS)
deallocate(ITV)

end subroutine ice_thermo_end
Expand Down

0 comments on commit 906d26c

Please sign in to comment.