Skip to content

Commit

Permalink
Merge remote-tracking branch 'gfdl/dev/gfdl' into dev/esmg
Browse files Browse the repository at this point in the history
  • Loading branch information
kshedstrom committed Nov 22, 2021
2 parents 1c02a8f + 906d26c commit 0dc7d86
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 0dc7d86

Please sign in to comment.