Skip to content

Commit

Permalink
dOxyGenized subroutines in SIS types modules
Browse files Browse the repository at this point in the history
  Added dOxyGenized comments for all of the subroutines, functions and arguments
in ice_type.F90, SIS_types.F90, ice_boundary_types.F90, and SIS_ctrl_types.F90.
All answers are bitwise identical.
  • Loading branch information
Hallberg-NOAA committed Jul 2, 2018
1 parent 1851761 commit 43217cd
Show file tree
Hide file tree
Showing 4 changed files with 362 additions and 305 deletions.
40 changes: 24 additions & 16 deletions src/SIS_ctrl_types.F90
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,19 @@ module SIS_ctrl_types
!> ice_diagnostics_init does the registration for a variety of sea-ice model
!! diagnostics and saves several static diagnotic fields.
subroutine ice_diagnostics_init(IOF, OSS, FIA, G, IG, diag, Time, Cgrid)
type(ice_ocean_flux_type), intent(inout) :: IOF
type(ocean_sfc_state_type), intent(inout) :: OSS
type(fast_ice_avg_type), intent(inout) :: FIA
type(SIS_hor_grid_type), intent(inout) :: G
type(ice_grid_type), intent(in) :: IG
type(SIS_diag_ctrl), intent(in) :: diag
type(time_type), intent(inout) :: Time
logical, optional, intent(in) :: Cgrid
type(ice_ocean_flux_type), intent(inout) :: IOF !< A structure containing fluxes from the ice to
!! the ocean that are calculated by the ice model.
type(ocean_sfc_state_type), intent(inout) :: OSS !< A structure containing the arrays that describe
!! the ocean's surface state for the ice model.
type(fast_ice_avg_type), intent(inout) :: FIA !< A type containing averages of fields
!! (mostly fluxes) over the fast updates
type(SIS_hor_grid_type), intent(inout) :: G !< The horizontal grid type
type(ice_grid_type), intent(in) :: IG !< The sea-ice specific grid type
type(SIS_diag_ctrl), intent(in) :: diag !< A structure that is used to regulate diagnostic output
type(time_type), intent(inout) :: Time !< The sea-ice model's clock,
!! set with the current model time.
logical, optional, intent(in) :: Cgrid !< If true, use a C-grid discretization for the
!! sea ice velocities. The default is true.

real, dimension(G%isc:G%iec,G%jsc:G%jec) :: tmp_diag ! A temporary diagnostic array
real :: I_area_Earth ! The inverse of the area of the sphere, in m-2.
Expand Down Expand Up @@ -368,12 +373,14 @@ end subroutine ice_diagnostics_init
!> ice_diags_fast_init does the registration for a variety of sea-ice model
!! diagnostics associated with the rapid physics updates.
subroutine ice_diags_fast_init(Rad, G, IG, diag, Time, component)
type(ice_rad_type), intent(inout) :: Rad
type(SIS_hor_grid_type), intent(inout) :: G
type(ice_grid_type), intent(in) :: IG
type(SIS_diag_ctrl), intent(in) :: diag
type(time_type), intent(inout) :: Time
character(len=*), optional, intent(in) :: component
type(ice_rad_type), intent(inout) :: Rad !< A structure with fields related to the absorption,
!! reflection and transmission of shortwave radiation.
type(SIS_hor_grid_type), intent(inout) :: G !< The horizontal grid type
type(ice_grid_type), intent(in) :: IG !< The sea-ice specific grid type
type(SIS_diag_ctrl), intent(in) :: diag !< A structure that is used to regulate diagnostic output
type(time_type), intent(inout) :: Time !< The sea-ice model's clock,
!! set with the current model time.
character(len=*), optional, intent(in) :: component !< An optional alternate component name

real, parameter :: missing = -1e34 ! The fill value for missing data.
integer :: i, j, k, isc, iec, jsc, jec, n, nLay
Expand Down Expand Up @@ -429,9 +436,10 @@ subroutine ice_diags_fast_init(Rad, G, IG, diag, Time, component)

end subroutine ice_diags_fast_init

!> Allocate an array of integer diagnostic arrays and set them to -1, if they are not already allocated
subroutine safe_alloc_ids_1d(ids, nids)
integer, allocatable :: ids(:)
integer, intent(in) :: nids
integer, allocatable, intent(inout) :: ids(:) !< An array of diagnostic IDs to allocate
integer, intent(in) :: nids !< The number of IDs to allocate

if (.not.ALLOCATED(ids)) then
allocate(ids(nids)) ; ids(:) = -1
Expand Down
Loading

0 comments on commit 43217cd

Please sign in to comment.