diff --git a/src/SIS_ctrl_types.F90 b/src/SIS_ctrl_types.F90 index c3c55883..1790fe9f 100644 --- a/src/SIS_ctrl_types.F90 +++ b/src/SIS_ctrl_types.F90 @@ -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 diff --git a/src/SIS_sum_output.F90 b/src/SIS_sum_output.F90 index 76690280..a14fb5f5 100644 --- a/src/SIS_sum_output.F90 +++ b/src/SIS_sum_output.F90 @@ -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 @@ -56,50 +53,73 @@ module SIS_sum_output #include 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 diff --git a/src/SIS_sum_output_type.F90 b/src/SIS_sum_output_type.F90 deleted file mode 100644 index 55352032..00000000 --- a/src/SIS_sum_output_type.F90 +++ /dev/null @@ -1,76 +0,0 @@ -module SIS_sum_output_type -!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~! -! ! -! This file contains the control structure for SIS_sum_output.F90. It has ! -! been moved temporarily to its own file to avoid a predecessor cycle. ! -! ! -!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~! - -use MOM_coms, only : EFP_type -use MOM_time_manager, only : time_type - -implicit none ; private - -!> 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 - - -end module SIS_sum_output_type diff --git a/src/SIS_types.F90 b/src/SIS_types.F90 index 06d2992a..b79f14d2 100644 --- a/src/SIS_types.F90 +++ b/src/SIS_types.F90 @@ -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