Skip to content

Commit

Permalink
+Moved SIS_sum_out_CS into SIS_sum_output.F90
Browse files Browse the repository at this point in the history
  Moved the control structure for the SIS_sum_output module back into
SIS_sum_output.F90 and eliminated the file SIS_sum_output_type.F90.  All answers
are bitwise identical.
  • Loading branch information
Hallberg-NOAA committed Jul 3, 2018
1 parent b196968 commit 814e437
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 119 deletions.
2 changes: 1 addition & 1 deletion src/SIS_ctrl_types.F90
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module SIS_ctrl_types
use MOM_hor_index, only : hor_index_type
use SIS_diag_mediator, only : SIS_diag_ctrl, post_data=>post_SIS_data
use SIS_diag_mediator, only : register_SIS_diag_field, register_static_field
use SIS_sum_output_type, only : SIS_sum_out_CS
use SIS_sum_output, only : SIS_sum_out_CS
! use SIS_tracer_registry, only : SIS_tracer_registry_type
use SIS_tracer_flow_control, only : SIS_tracer_flow_control_CS

Expand Down
102 changes: 61 additions & 41 deletions src/SIS_sum_output.F90
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,11 @@ module SIS_sum_output
use MOM_string_functions, only : slasher
use MOM_time_manager, only : time_type, get_time, set_time, operator(>), operator(-)
use MOM_time_manager, only : get_date, get_calendar_type, NO_CALENDAR
! use MOM_tracer_flow_control, only : tracer_flow_control_CS, call_tracer_stocks

use SIS_types, only : ice_state_type, ice_ocean_flux_type, fast_ice_avg_type
use SIS_types, only : ocean_sfc_state_type
use SIS_hor_grid, only : SIS_hor_grid_type
use ice_grid, only : ice_grid_type
use SIS2_ice_thm, only : enthalpy_liquid_freeze, get_SIS2_thermo_coefs, ice_thermo_type
use SIS_sum_output_type, only : SIS_sum_out_CS
use SIS_tracer_flow_control, only : SIS_tracer_flow_control_CS, SIS_call_tracer_stocks

use netcdf
Expand All @@ -56,50 +53,73 @@ module SIS_sum_output
#include <SIS2_memory.h>

public write_ice_statistics, accumulate_bottom_input
public SIS_sum_output_init, SIS_sum_output_end, SIS_sum_out_CS
public SIS_sum_output_init, SIS_sum_output_end
public accumulate_input_1, accumulate_input_2

!-----------------------------------------------------------------------

! integer, parameter :: NUM_FIELDS = 17

! type, public :: SIS_sum_out_CS ; private

! real :: fresh_water_input ! The total mass of fresh water added by
! ! surface fluxes since the last time that
! real :: mass_prev ! The total sea ice mass the last time that
! ! write_ice_statistics was called, in kg.
! real :: salt_prev ! The total amount of salt in the sea ice the last
! ! time that write_ice_statistics was called, in PSU kg.
! real :: net_salt_input ! The total salt added by surface fluxes since
! ! the last time that write_ice_statistics was called,
! ! in PSU kg.
! real :: heat_prev ! The total amount of heat in the sea ice the last
! ! time that write_ice_statistics was called, in Joules.
! real :: net_heat_input ! The total heat added by surface fluxes since
! ! the last time that write_ice_statistics was called,
! ! in Joules.
! type(EFP_type) :: &
! fresh_water_in_EFP, & ! These are extended fixed point versions of the
! net_salt_in_EFP, & ! correspondingly named variables above.
! net_heat_in_EFP, heat_prev_EFP, salt_prev_EFP, mass_prev_EFP
! real :: dt ! The baroclinic dynamics time step, in s.
! real :: timeunit ! The length of the units for the time
! ! axis, in s.
! type(time_type) :: Start_time ! The start time of the simulation.
! ! Start_time is set in MOM_initialization.F90
! logical :: write_stdout ! If true, periodically write sea ice statistics
! ! to stdout to allow the progress to be seen.
! logical :: write_stocks ! If true, write the integrated tracer amounts
! ! to stdout when the statistics files are written.
! integer :: previous_calls = 0 ! The number of times write_ice_statistics has been called.
! integer :: prev_n = 0 ! The value of n from the last call.
! ! integer :: statsfile_nc ! NetCDF id of the statistics file.
! integer :: statsfile_ascii ! The unit number of the ascii version of the statistics file.
! ! type(fieldtype), dimension(NUM_FIELDS+MAX_FIELDS_) :: &
! ! fields ! fieldtype variables for the output fields.
! character(len=200) :: statsfile ! The name of the statistics file with path.
! end type SIS_sum_out_CS
!> This structure contains the parameters that regulate the summed output.
type, public :: SIS_sum_out_CS ; private

real :: mass_prev !< The total sea ice mass the last time that
!! write_ice_statistics was called, in kg.
real :: fresh_water_input !< The total mass of fresh water added by
!! surface fluxes since the last time that
real :: salt_prev !< The total amount of salt in the sea ice the last
!! time that write_ice_statistics was called, in PSU kg.
real :: net_salt_input !< The total salt added by surface fluxes since the last
!! time that write_ice_statistics was called, in PSU kg.
real :: heat_prev !< The total amount of heat in the sea ice the last
!! time that write_ice_statistics was called, in Joules.
real :: net_heat_input !< The total heat added by surface fluxes since the last
!! time that write_ice_statistics was called, in Joules.
real, dimension(:,:), allocatable :: &
water_in_col, & !< The water that has been input to the ice and snow in a column since
!! the last time that write_ice_statistics was called, in kg m-2.
heat_in_col, & !< The heat that has been input to the ice and snow in a column since
!! the last time that write_ice_statistics was called, in J m-2.
salt_in_col, & !< The salt that has been input to the ice and snow in a column since
!! the last time that write_ice_statistics was called, in kg m-2.
water_col_prev, & !< The column integrated water that was in the ice and snow the last
!! time that write_ice_statistics was called, in kg m-2.
heat_col_prev, & !< The column integrated heat that was in the ice and snow the last
!! time that write_ice_statistics was called, in J m-2.
salt_col_prev !< The column integrated salt that was in the ice and snow the last
!! time that write_ice_statistics was called, in kg m-2.

type(EFP_type) :: fresh_water_in_EFP !< An extended fixed point version of fresh_water_in
type(EFP_type) :: net_salt_in_EFP !< An extended fixed point version of net_salt_in
type(EFP_type) :: net_heat_in_EFP !< An extended fixed point version of net_heat_in
type(EFP_type) :: heat_prev_EFP !< An extended fixed point version of heat_prev
type(EFP_type) :: salt_prev_EFP !< An extended fixed point version of salt_prev
type(EFP_type) :: mass_prev_EFP !< An extended fixed point version of mass_prev
real :: dt !< The baroclinic dynamics time step, in s.
real :: timeunit !< The length of the units for the time axis, in s.
type(time_type) :: Start_time !< The start time of the simulation.
!< Start_time is set in SIS_initialization.F90
logical :: column_check !< If true, enable the column by column heat and
!! mass conservation check
real :: imb_tol !< The tolerance for imbalances to be flagged by
!! column_check, nondim.
integer :: maxtrunc !< The number of truncations per ice statistics
!! save interval at which the run is stopped.
logical :: write_stdout !< If true, periodically write sea ice statistics
!! to stdout to allow the progress to be seen.
logical :: write_stocks !< If true, write the integrated tracer amounts
!! to stdout when the statistics files are written.
integer :: previous_calls = 0 !< The number of times write_ice_statistics has been called.
integer :: prev_n = 0 !< The value of n from the last call.
integer, pointer :: ntrunc => NULL() !< The number of times the velocity has been truncated
!! since the last call to write_ice_statistics.
! integer :: statsfile_nc !< NetCDF id of the statistics file.
integer :: statsfile_ascii !< The unit number of the ascii version of the statistics file.
! type(fieldtype), dimension(NUM_FIELDS+MAX_FIELDS_) :: &
! fields !< fieldtype variables for the output fields.
character(len=200) :: statsfile !< The name of the statistics file with path.

end type SIS_sum_out_CS

contains

Expand Down
76 changes: 0 additions & 76 deletions src/SIS_sum_output_type.F90

This file was deleted.

1 change: 0 additions & 1 deletion src/SIS_types.F90
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ module SIS_types
use SIS_diag_mediator, only : register_SIS_diag_field, register_static_field
use SIS_debugging, only : chksum, Bchksum, hchksum, uvchksum
use SIS_debugging, only : check_redundant_B, check_redundant_C
use SIS_sum_output_type, only : SIS_sum_out_CS
use SIS_tracer_registry, only : SIS_tracer_registry_type

implicit none ; private
Expand Down

0 comments on commit 814e437

Please sign in to comment.