Skip to content

Commit

Permalink
+Added continuity_CSp arg to SIS_transport_init
Browse files Browse the repository at this point in the history
  Added optional continuity_CSp argument to SIS_transport_init, which can be
used to set a pointer to the control structure of the SIS_continuity module.
All answers are bitwise identical.
  • Loading branch information
Hallberg-NOAA committed Dec 6, 2018
1 parent a04688c commit 2bb7749
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/SIS_transport.F90
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ module SIS_transport
!> This structure contains a variation of the ice model state where the variables are in
!! mass per unit ocean cell area (not per unit ice area). These are useful for conservative
!! advection, but not so useful for diagnosing ice thickness.
type, public :: cell_average_state_type ; private
type, public :: cell_average_state_type ! ; private
real, allocatable, dimension(:,:,:) :: m_ice !< The mass of ice in each thickness category
!! per unit total area in a cell, in H.
real, allocatable, dimension(:,:,:) :: m_snow !< The mass of ice in each thickness category
Expand Down Expand Up @@ -1112,15 +1112,16 @@ end subroutine get_total_enthalpy

!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
!> SIS_transport_init initializes the ice transport and sets parameters.
subroutine SIS_transport_init(Time, G, param_file, diag, CS)
subroutine SIS_transport_init(Time, G, param_file, diag, CS, continuity_CSp)
type(time_type), target, intent(in) :: Time !< The sea-ice model's clock,
!! set with the current model time.
type(SIS_hor_grid_type), intent(in) :: G !< The horizontal grid type
type(param_file_type), intent(in) :: param_file !< A structure to parse for run-time parameters
type(SIS_diag_ctrl), target, intent(inout) :: diag !< A structure that is used to regulate diagnostic output
type(SIS_transport_CS), pointer :: CS !< The control structure for this module
!! that is allocated and populated here

type(SIS_continuity_CS), optional, pointer :: continuity_CSp !< The control structure for the
!! SIS continuity module
! This subroutine sets the parameters and registers the diagnostics associated
! with the ice dynamics.

Expand Down Expand Up @@ -1193,6 +1194,8 @@ subroutine SIS_transport_init(Time, G, param_file, diag, CS)
call SIS_continuity_init(Time, G, param_file, diag, CS%continuity_CSp)
call SIS_tracer_advect_init(Time, G, param_file, diag, CS%SIS_tr_adv_CSp)

if (present(continuity_CSp)) continuity_CSp => CS%continuity_CSp

call SIS_tracer_advect_init(Time, G, param_file, diag, CS%SIS_thick_adv_CSp, scheme=scheme)

CS%id_ix_trans = register_diag_field('ice_model', 'IX_TRANS', diag%axesCu1, Time, &
Expand Down

0 comments on commit 2bb7749

Please sign in to comment.