Ignore:
Timestamp:
Mar 20, 2014 8:40:49 AM (10 years ago)
Author:
raasch
Message:

ONLY-attribute added to USE-statements,
kind-parameters added to all INTEGER and REAL declaration statements,
kinds are defined in new module kinds,
old module precision_kind is removed,
revision history before 2012 removed,
comment fields (!:) to be used for variable explanations added to all variable declaration statements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/plant_canopy_model.f90

    r1310 r1320  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! ONLY-attribute added to USE-statements,
     23! kind-parameters added to all INTEGER and REAL declaration statements,
     24! kinds are defined in new module kinds,
     25! old module precision_kind is removed,
     26! revision history before 2012 removed,
     27! comment fields (!:) to be used for variable explanations added to
     28! all variable declaration statements
    2329!
    2430! Former revisions:
     
    2834! 1036 2012-10-22 13:43:42Z raasch
    2935! code put under GPL (PALM 3.9)
    30 !
    31 ! 257 2009-03-11 15:17:42Z heinze
    32 ! Output of messages replaced by message handling routine.
    33 ! Bugfix: remove IF statement in plant_canopy_model_ij
    34 !
    35 ! 153 2008-03-19 09:41:30Z steinfeld
    36 ! heat sources within the forest canopy are added, which represent the
    37 ! rate of heat input into the air from the forest leaves, evaluation of sinks
    38 ! and sources for scalar concentration due to canopy elements
    3936!
    4037! 138 2007-11-28 10:03:58Z letzel
     
    6360    SUBROUTINE plant_canopy_model( component )
    6461
    65        USE arrays_3d
    66        USE control_parameters
    67        USE indices
    68        USE pegrid
     62       USE arrays_3d,                                                          &
     63           ONLY:  canopy_heat_flux, cdc, dzw, e, lad_s, lad_u, lad_v, lad_w,   &
     64                  q, sec, sls, tend, u, v, w
     65
     66       USE control_parameters,                                                 &
     67           ONLY:  pch_index, message_string
     68
     69       USE indices,                                                            &
     70           ONLY:  nxl, nxlu, nxr, nys, nysv, nyn, nzb_s_inner, nzb_u_inner,    &
     71                  nzb_v_inner, nzb_w_inner
     72
     73       USE kinds
    6974
    7075       IMPLICIT NONE
    7176
    72        INTEGER ::  component, i, j, k
     77       INTEGER(iwp) ::  component  !:
     78       INTEGER(iwp) ::  i          !:
     79       INTEGER(iwp) ::  j          !:
     80       INTEGER(iwp) ::  k          !:
    7381 
    7482!
     
    154162                DO  j = nys, nyn
    155163                   DO  k = nzb_s_inner(j,i)+1, pch_index
    156                       tend(k,j,i) = tend(k,j,i) +                     &
     164                      tend(k,j,i) = tend(k,j,i) +                   &
    157165                                    ( canopy_heat_flux(k,j,i) -     &
    158166                                      canopy_heat_flux(k-1,j,i) ) / &
     
    221229    SUBROUTINE plant_canopy_model_ij( i, j, component )
    222230
    223        USE arrays_3d
    224        USE control_parameters
    225        USE indices
    226        USE pegrid
     231       USE arrays_3d,                                                          &
     232           ONLY:  canopy_heat_flux, cdc, dzw, e, lad_s, lad_u, lad_v, lad_w,   &
     233                  q, sec, sls, tend, u, v, w
     234
     235       USE control_parameters,                                                 &
     236           ONLY:  pch_index, message_string
     237
     238       USE indices,                                                            &
     239           ONLY:  nxl, nxlu, nxr, nys, nysv, nyn, nzb_s_inner, nzb_u_inner,    &
     240                  nzb_v_inner, nzb_w_inner
     241
     242       USE kinds
    227243
    228244       IMPLICIT NONE
    229245
    230        INTEGER ::  component, i, j, k
    231 
    232 !
    233 !--    Compute drag for the three velocity components
     246       INTEGER(iwp) ::  component  !:
     247       INTEGER(iwp) ::  i          !:
     248       INTEGER(iwp) ::  j          !:
     249       INTEGER(iwp) ::  k          !:
     250
     251!
     252!--    Compute drag for the three velocity components
    234253       SELECT CASE ( component )
    235254
     
    238257       CASE ( 1 )
    239258          DO  k = nzb_u_inner(j,i)+1, pch_index
    240              tend(k,j,i) = tend(k,j,i) -                  &
     259             tend(k,j,i) = tend(k,j,i) -                     &
    241260                              cdc(k,j,i) * lad_u(k,j,i) *    &   
    242261                              SQRT(     u(k,j,i)**2 +        &
     
    258277       CASE ( 2 )
    259278          DO  k = nzb_v_inner(j,i)+1, pch_index
    260              tend(k,j,i) = tend(k,j,i) -                  &
     279             tend(k,j,i) = tend(k,j,i) -                     &
    261280                              cdc(k,j,i) * lad_v(k,j,i) *    &
    262281                              SQRT( ( ( u(k,j-1,i)   +       &
     
    278297       CASE ( 3 )
    279298          DO  k = nzb_w_inner(j,i)+1, pch_index
    280              tend(k,j,i) = tend(k,j,i) -                  &
     299             tend(k,j,i) = tend(k,j,i) -                     &
    281300                              cdc(k,j,i) * lad_w(k,j,i) *    &
    282301                              SQRT( ( ( u(k,j,i)    +        & 
     
    299318          CASE ( 4 )
    300319             DO  k = nzb_s_inner(j,i)+1, pch_index
    301                 tend(k,j,i) = tend(k,j,i) +                     &
     320                tend(k,j,i) = tend(k,j,i) +                   &
    302321                              ( canopy_heat_flux(k,j,i) -     &
    303322                                canopy_heat_flux(k-1,j,i) ) / &
     
    328347       CASE ( 6 )
    329348          DO  k = nzb_s_inner(j,i)+1, pch_index   
    330              tend(k,j,i) = tend(k,j,i) -                     &
     349             tend(k,j,i) = tend(k,j,i) -                        &
    331350                              2.0 * cdc(k,j,i) * lad_s(k,j,i) * &
    332351                              SQRT( ( ( u(k,j,i)           +    &
Note: See TracChangeset for help on using the changeset viewer.