Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doxygenated fv3_cap.F90 #819

Draft
wants to merge 6 commits into
base: develop
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 109 additions & 14 deletions fv3_cap.F90
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
!--------------- FV3 ATM solo model ----------------
!
!*** The FV3 atmosphere grid component nuopc cap
!
! Author: Jun [email protected]
!
! revision history
! 11 Oct 2016: J. Wang Initial code
! 18 Apr 2017: J. Wang set up fcst grid component and write grid components
! 24 Jul 2017: J. Wang initialization and time stepping changes for coupling
! 02 Nov 2017: J. Wang Use Gerhard's transferable RouteHandle
!

!> @file
!> @brief The FV3 atmosphere grid component nuopc cap.
!> @author Jun Wang @date 01/2017

!> @brief The FV3 atmosphere grid component nuopc cap.
!>
!> FV3 ATM solo model
!>
!> ## Module History
!> Date | Author | Modification
!> -----|--------|-------------
!> 11 Oct 2016 | J. Wang | Initial code
!> 18 Apr 2017 | J. Wang | set up fcst grid component and write grid components
!> 24 Jul 2017 | J. Wang | initialization and time stepping changes for coupling
!> 02 Nov 2017 | J. Wang | Use Gerhard's transferable RouteHandle
!>
!> @author Jun Wang @date 01/2017
module fv3atm_cap_mod

use ESMF
Expand Down Expand Up @@ -56,30 +60,61 @@ module fv3atm_cap_mod
!
!-----------------------------------------------------------------------
!

!> ???
type(ESMF_GridComp) :: fcstComp

!> ???
type(ESMF_State) :: fcstState

!> ???
type(ESMF_FieldBundle), allocatable :: fcstFB(:)

!> ???
integer,dimension(:), allocatable :: fcstPetList

!> ???
integer, save :: FBCount
Comment on lines +63 to +75
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these variables are local (private) variables and are not accessible outside the module. Are you going to add doxygen the every local variable in every module and subroutine? I thought we are adding doxygen just to subroutine arguments and public module variables.

Copy link
Contributor

@edwardhartnett edwardhartnett Apr 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will not be adding doxygen for any subprogram variables.

Good question about private module variables, I will investigate and get back to you. My hunch is that doxygen doesn't distinguish between different types of module variables.

We need to document all the module variables that doxygen will complain about if undocumented. This is so we can turn on warning-check and ensure that no undocumented code is committed to the repo.


!> ???
type(ESMF_GridComp), allocatable :: wrtComp(:)

!> ???
type(ESMF_State), allocatable :: wrtState(:)

!> ???
type(ESMF_FieldBundle), allocatable :: wrtFB(:,:)

!> ???
type(ESMF_RouteHandle), allocatable :: routehandle(:,:)

!> ???
type(ESMF_RouteHandle), allocatable :: gridRedistRH(:,:)

!> ???
type(ESMF_Grid), allocatable :: srcGrid(:,:), dstGrid(:,:)

!> ???
logical, allocatable :: is_moving_FB(:)

!> ???
logical :: profile_memory = .true.

!> ???
logical :: write_runtimelog = .false.

!> ???
logical :: lprint = .false.

!> ???
integer :: mype = -1

!> ???
integer :: dbug = 0

!> ???
integer :: frestart(999) = -1

!> ???
real(kind=8) :: timere, timep2re
!-----------------------------------------------------------------------

Expand All @@ -89,6 +124,12 @@ module fv3atm_cap_mod
!------------------- Solo fv3atm code starts here ----------------------
!-----------------------------------------------------------------------

!> ???
!>
!> @param gcomp ???
!> @param rc Return code.
!>
!> @author
subroutine SetServices(gcomp, rc)

type(ESMF_GridComp) :: gcomp
Expand Down Expand Up @@ -169,6 +210,12 @@ end subroutine SetServices

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

!> ???
!>
!> @param gcomp ???
!> @param rc Return code.
!>
!> @author
subroutine InitializeAdvertise(gcomp, rc)

type(ESMF_GridComp) :: gcomp
Expand Down Expand Up @@ -972,6 +1019,12 @@ end subroutine InitializeAdvertise

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

!> ???
!>
!> @param gcomp ???
!> @param rc Return code.
!>
!> @author
subroutine InitializeRealize(gcomp, rc)
type(ESMF_GridComp) :: gcomp
integer, intent(out) :: rc
Expand Down Expand Up @@ -1009,6 +1062,12 @@ end subroutine InitializeRealize

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

!> ???
!>
!> @param gcomp ???
!> @param rc Return code.
!>
!> @author
subroutine ModelAdvance(gcomp, rc)

type(ESMF_GridComp) :: gcomp
Expand Down Expand Up @@ -1038,6 +1097,12 @@ end subroutine ModelAdvance

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

!> ???
!>
!> @param gcomp ???
!> @param rc Return code.
!>
!> @author
subroutine ModelAdvance_phase1(gcomp, rc)
type(ESMF_GridComp) :: gcomp
integer, intent(out) :: rc
Expand Down Expand Up @@ -1092,6 +1157,12 @@ end subroutine ModelAdvance_phase1

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

!> ???
!>
!> @param gcomp ???
!> @param rc Return code.
!>
!> @author
subroutine ModelAdvance_phase2(gcomp, rc)
type(ESMF_GridComp) :: gcomp
integer, intent(out) :: rc
Expand Down Expand Up @@ -1229,6 +1300,12 @@ end subroutine ModelAdvance_phase2

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

!> ???
!>
!> @param gcomp ???
!> @param rc Return code.
!>
!> @author
subroutine ModelSetRunClock(gcomp, rc)

type(ESMF_GridComp) :: gcomp
Expand Down Expand Up @@ -1263,6 +1340,12 @@ end subroutine ModelSetRunClock

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

!> ???
!>
!> @param gcomp ???
!> @param rc Return code.
!>
!> @author
subroutine fv3_checkimport(gcomp, rc)

!*** Check the import state fields
Expand Down Expand Up @@ -1352,6 +1435,12 @@ end subroutine fv3_checkimport

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

!> ???
!>
!> @param gcomp ???
!> @param rc Return code.
!>
!> @author
subroutine TimestampExport_phase1(gcomp, rc)

! input arguments
Expand Down Expand Up @@ -1382,6 +1471,12 @@ end subroutine TimestampExport_phase1

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

!> ???
!>
!> @param gcomp ???
!> @param rc Return code.
!>
!> @author
subroutine ModelFinalize(gcomp, rc)

! input arguments
Expand Down
Loading