Ignore:
Timestamp:
Dec 16, 2025, 4:39:24 PM (4 weeks ago)
Author:
jbclement
Message:

PEM:
Apply documentation template everywhere: standardized headers format with short description, separators between functions/subroutines, normalized code sections, aligned dependencies/arguments/variables declaration.
JBC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/evolution/tracers.F90

    r3989 r3991  
    11MODULE tracers
     2!-----------------------------------------------------------------------
     3! NAME
     4!     tracers
     5!
     6! DESCRIPTION
     7!     Tracer species management for tracking.
     8!
     9! AUTHORS & DATE
     10!     JB Clement, 12/2025
     11!
     12! NOTES
     13!
     14!-----------------------------------------------------------------------
    215
     16! DECLARATION
     17! -----------
    318implicit none
    419
    5 ! Indices for tracers taken from the PCM
    6 integer :: iPCM_qh2o
     20! MODULE VARIABLES
     21! ----------------
     22integer                         :: iPCM_qh2o ! Index for H2O vapor tracer from PCM
     23real, dimension(:), allocatable :: mmol      ! Molar masses of tracers [g/mol]
    724
    8 ! Molar masses of tracers
    9 real, dimension(:), allocatable :: mmol
    10 
    11 !=======================================================================
    1225contains
    13 !=======================================================================
     26!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    1427
    1528!=======================================================================
    1629SUBROUTINE ini_tracers_id(nqtot,noms)
     30!-----------------------------------------------------------------------
     31! NAME
     32!     ini_tracers_id
     33!
     34! DESCRIPTION
     35!     Initialize tracer indices from PCM tracer names.
     36!
     37! AUTHORS & DATE
     38!     JB Clement, 12/2025
     39!
     40! NOTES
     41!
     42!-----------------------------------------------------------------------
    1743
     44! DECLARATION
     45! -----------
    1846implicit none
    1947
    20 ! Arguments
    21 !----------
    22 integer,                        intent(in) :: nqtot
    23 character(*), dimension(nqtot), intent(in) :: noms
     48! ARGUMENTS
     49! ---------
     50integer,                        intent(in) :: nqtot ! Total number of tracers
     51character(*), dimension(nqtot), intent(in) :: noms  ! Names of tracers
    2452
    25 ! Local variables
    26 !----------------
     53! LOCAL VARIABLES
     54! ---------------
    2755integer :: i
    2856
    29 ! Code
    30 !-----
     57! CODE
     58! ----
    3159! Allocation
    3260call ini_tracers(nqtot)
     
    5179!=======================================================================
    5280SUBROUTINE ini_tracers(nqtot)
     81!-----------------------------------------------------------------------
     82! NAME
     83!     ini_tracers
     84!
     85! DESCRIPTION
     86!     Allocate tracer molar mass array.
     87!
     88! AUTHORS & DATE
     89!     JB Clement, 12/2025
     90!
     91! NOTES
     92!
     93!-----------------------------------------------------------------------
    5394
     95! DECLARATION
     96! -----------
    5497implicit none
    5598
    56 ! Arguments
    57 !----------
    58 integer, intent(in) :: nqtot
     99! ARGUMENTS
     100! ---------
     101integer, intent(in) :: nqtot ! Total number of tracers
    59102
    60 ! Local variables
    61 !----------------
    62 
    63 ! Code
    64 !-----
     103! CODE
     104! ----
    65105if (.not. allocated(mmol)) allocate(mmol(nqtot))
    66106
     
    70110!=======================================================================
    71111SUBROUTINE end_tracers()
     112!-----------------------------------------------------------------------
     113! NAME
     114!     end_tracers
     115!
     116! DESCRIPTION
     117!     Deallocate tracer molar mass array.
     118!
     119! AUTHORS & DATE
     120!     JB Clement, 12/2025
     121!
     122! NOTES
     123!
     124!-----------------------------------------------------------------------
    72125
     126! DECLARATION
     127! -----------
    73128implicit none
    74129
    75 ! Arguments
    76 !----------
    77 
    78 ! Local variables
    79 !----------------
    80 
    81 ! Code
    82 !-----
     130! CODE
     131! ----
    83132if (allocated(mmol)) deallocate(mmol)
    84133
Note: See TracChangeset for help on using the changeset viewer.