From 838de5293681c0d8e16f22d50232a6bc1646f67c Mon Sep 17 00:00:00 2001 From: alperaltuntas Date: Tue, 17 Jul 2018 14:44:39 -0600 Subject: [PATCH] improve mct cap doxumentation --- config_src/mct_driver/MOM_ocean_model.F90 | 23 ++++++++----------- config_src/mct_driver/MOM_surface_forcing.F90 | 2 ++ config_src/mct_driver/ocn_cap_methods.F90 | 17 +++++++------- config_src/mct_driver/ocn_comp_mct.F90 | 2 +- 4 files changed, 21 insertions(+), 23 deletions(-) diff --git a/config_src/mct_driver/MOM_ocean_model.F90 b/config_src/mct_driver/MOM_ocean_model.F90 index 78b90ff7bf..c894f42270 100644 --- a/config_src/mct_driver/MOM_ocean_model.F90 +++ b/config_src/mct_driver/MOM_ocean_model.F90 @@ -105,8 +105,8 @@ module MOM_ocean_model end interface !> This type is used for communication with other components via the FMS coupler. -! The element names and types can be changed only with great deliberation, hence -! the persistnce of things like the cutsy element name "avg_kount". +!! The element names and types can be changed only with great deliberation, hence +!! the persistnce of things like the cutsy element name "avg_kount". type, public :: ocean_public_type type(domain2d) :: Domain !< The domain for the surface fields. logical :: is_ocean_pe !! .true. on processors that run the ocean model. @@ -821,19 +821,14 @@ subroutine convert_state_to_ocean_type(state, Ocean_sfc, G, patm, press_to_z) end subroutine convert_state_to_ocean_type -!======================================================================= -! -! -! -! This subroutine extracts the surface properties from the ocean's internal -! state and stores them in the ocean type returned to the calling ice model. -! It has to be separate from the ocean_initialization call because the coupler -! module allocates the space for some of these variables. -! - +!> This subroutine extracts the surface properties from the ocean's internal +!! state and stores them in the ocean type returned to the calling ice model. +!! It has to be separate from the ocean_initialization call because the coupler +!! module allocates the space for some of these variables. subroutine ocean_model_init_sfc(OS, Ocean_sfc) - type(ocean_state_type), pointer :: OS - type(ocean_public_type), intent(inout) :: Ocean_sfc + type(ocean_state_type), pointer :: OS !< A pointer to the structure containing the + !! internal ocean state (in). + type(ocean_public_type), intent(inout) :: Ocean_sfc !< Ocean surface state integer :: is, ie, js, je diff --git a/config_src/mct_driver/MOM_surface_forcing.F90 b/config_src/mct_driver/MOM_surface_forcing.F90 index 07bf80d54a..5c4a43bfc0 100644 --- a/config_src/mct_driver/MOM_surface_forcing.F90 +++ b/config_src/mct_driver/MOM_surface_forcing.F90 @@ -760,6 +760,7 @@ end subroutine convert_IOB_to_forces !======================================================================= +!> Allocates ice-ocean boundary type containers and sets to 0. subroutine IOB_allocate(IOB, isc, iec, jsc, jec) type(ice_ocean_boundary_type), intent(inout) :: IOB !< An ice-ocean boundary type with fluxes to drive integer, intent(in) :: isc, iec, jsc, jec !< The ocean's local grid size @@ -1277,6 +1278,7 @@ end subroutine surface_forcing_init !======================================================================= +!> Finalizes surface forcing: deallocate surface forcing control structure subroutine surface_forcing_end(CS, fluxes) type(surface_forcing_CS), pointer :: CS type(forcing), optional, intent(inout) :: fluxes diff --git a/config_src/mct_driver/ocn_cap_methods.F90 b/config_src/mct_driver/ocn_cap_methods.F90 index 587433b4fe..cc214306f0 100644 --- a/config_src/mct_driver/ocn_cap_methods.F90 +++ b/config_src/mct_driver/ocn_cap_methods.F90 @@ -21,15 +21,16 @@ module ocn_cap_methods contains !======================================================================= + !> Maps incomping ocean data to MOM6 data structures subroutine ocn_import(x2o, ind, grid, ice_ocean_boundary, ocean_public, logunit, Eclock, c1, c2, c3, c4) - real(kind=8) , intent(in) :: x2o(:,:) ! incoming data - type(cpl_indices_type) , intent(in) :: ind ! Structure with MCT attribute vects and indices - type(ocean_grid_type) , intent(in) :: grid ! Ocean model grid - type(ice_ocean_boundary_type) , intent(inout) :: ice_ocean_boundary ! Ocean boundary forcing - type(ocean_public_type) , intent(in) :: ocean_public ! Ocean surface state - integer , intent(in) :: logunit ! Unit for stdout output - type(ESMF_Clock) , intent(in) :: EClock ! Time and time step ? \todo Why must this - real(kind=8), optional , intent(in) :: c1, c2, c3, c4 ! Coeffs. used in the shortwave decomposition + real(kind=8) , intent(in) :: x2o(:,:) !< incoming data + type(cpl_indices_type) , intent(in) :: ind !< Structure with MCT attribute vects and indices + type(ocean_grid_type) , intent(in) :: grid !< Ocean model grid + type(ice_ocean_boundary_type) , intent(inout) :: ice_ocean_boundary !< Ocean boundary forcing + type(ocean_public_type) , intent(in) :: ocean_public !< Ocean surface state + integer , intent(in) :: logunit !< Unit for stdout output + type(ESMF_Clock) , intent(in) :: EClock !< Time and time step ? \todo Why must this + real(kind=8), optional , intent(in) :: c1, c2, c3, c4 !< Coeffs. used in the shortwave decomposition ! Local variables integer :: i, j, ig, jg, isc, iec, jsc, jec ! Grid indices diff --git a/config_src/mct_driver/ocn_comp_mct.F90 b/config_src/mct_driver/ocn_comp_mct.F90 index 81aee619c6..63a24b153d 100644 --- a/config_src/mct_driver/ocn_comp_mct.F90 +++ b/config_src/mct_driver/ocn_comp_mct.F90 @@ -723,7 +723,7 @@ end subroutine ocn_domain_mct !======================================================================= -!! It has to be separate from the ocean_initialization call because the coupler +!> It has to be separate from the ocean_initialization call because the coupler !! module allocates the space for some of these variables. subroutine ocean_model_init_sfc(OS, Ocean_sfc) type(ocean_state_type), pointer :: OS