Changeset 3796 for palm/trunk/SOURCE


Ignore:
Timestamp:
Mar 15, 2019 11:15:38 AM (6 years ago)
Author:
banzhafs
Message:

Unused variables removed/taken care of from/in chemistry_model_mod

File:
1 edited

Legend:

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

    r3784 r3796  
    2626! Former revisions:
    2727! -----------------
    28 ! $Id$
     28! $Id: chemistry_model_mod.f90 3784 2019-03-05 14:16:20Z banzhafs
     29! Unused variables removed/taken care of
     30!
     31!
     32! 3784 2019-03-05 14:16:20Z forkel
    2933! Replaced READ from unit 10 by CALL get_mechanismname also in chem_header
    30 ! 
    31 ! 
     34!
     35!
    3236! 3783 2019-03-05 13:23:50Z forkel
    3337! Removed forgotte write statements an some unused variables (did not touch the
     
    578582    END INTERFACE rc_rctot
    579583
    580     INTERFACE rc_comp_point_rc_eff
    581        MODULE PROCEDURE rc_comp_point_rc_eff
    582     END INTERFACE rc_comp_point_rc_eff
     584!    INTERFACE rc_comp_point_rc_eff
     585!       MODULE PROCEDURE rc_comp_point_rc_eff
     586!    END INTERFACE rc_comp_point_rc_eff
    583587
    584588    INTERFACE drydepo_aero_zhang_vd
     
    737741
    738742    USE control_parameters,                                                    & 
    739         ONLY:  air_chemistry, bc_radiation_l, bc_radiation_n, bc_radiation_r,  &
    740                bc_radiation_s               
     743        ONLY:  bc_radiation_l, bc_radiation_n, bc_radiation_r, bc_radiation_s
     744
    741745    USE indices,                                                               & 
    742746        ONLY:  nxl, nxr, nzt                             
     
    10451049    CHARACTER(len=16)    ::  spec_name
    10461050
     1051!
     1052!-- Next statement is to avoid compiler warnings about unused variables
     1053    IF ( ( i + ilen + k ) > 0  .OR.  var(1:1) == ' ' )  CONTINUE
     1054
    10471055    unit = 'illegal'
    10481056
     
    12781286    INTEGER(iwp) ::  k               !< grid index along z-direction
    12791287    INTEGER(iwp) ::  char_len        !< length of a character string
     1288
     1289!
     1290!-- Next statement is to avoid compiler warnings about unused variables
     1291    IF ( mode(1:1) == ' '  .OR.  two_d )  CONTINUE
     1292
    12801293    found = .FALSE.
    12811294    char_len  = LEN_TRIM(variable)
     
    17511764    INTEGER(iwp) ::  j !< running index y dimension
    17521765    INTEGER(iwp) ::  n !< running index for chemical species
     1766
     1767!
     1768!-- Next statement is to avoid compiler warning about unused variables
     1769    IF ( ( ilu_arable + ilu_coniferous_forest + ilu_deciduous_forest + ilu_mediterrean_scrub + &
     1770           ilu_permanent_crops + ilu_savanna + ilu_semi_natural_veg + ilu_tropical_forest +    &
     1771           ilu_urban ) == 0 )  CONTINUE
     1772         
     1773
    17531774
    17541775    IF ( do_emis )  CALL chem_emissions_init
     
    27862807    INTEGER(iwp) ::  k                             !< matching k to surface m at i,j
    27872808    INTEGER(iwp) ::  lsp                           !< running index for chem spcs.
    2788     INTEGER(iwp) ::  lu                            !< running index for landuse classes
     2809!    INTEGER(iwp) ::  lu                            !< running index for landuse classes
    27892810    INTEGER(iwp) ::  lu_palm                       !< index of PALM LSM vegetation_type at current surface element
    27902811    INTEGER(iwp) ::  lup_palm                      !< index of PALM LSM pavement_type at current surface element
     
    44964517    REAL(wp), INTENT(OUT) ::  ccomp_tot              !< total compensation point (ug/m3)
    44974518                                                     !< [= 0 for species that don't have a compensation
    4498 
    44994519    !
    45004520    !-- Local variables:
     
    45244544    LOGICAL ::  sai_present                          !< vegetation is present for current land use type
    45254545
    4526     REAL(wp) ::  laimax                              !< maximum leaf area index (-)
     4546!    REAL(wp) ::  laimax                              !< maximum leaf area index (-)
    45274547    REAL(wp) ::  gw                                  !< external leaf conductance (m/s)
    45284548    REAL(wp) ::  gstom                               !< stomatal conductance (m/s)
     
    45334553    REAL(wp) ::  csoil                               !< soil compensation point (ug/m3)
    45344554
     4555
     4556!
     4557!-- Next statement is just to avoid compiler warning about unused variable
     4558    IF ( day_of_year == 0  .OR.  ( catm + lat + ra + rb ) > 0.0_wp )  CONTINUE
    45354559
    45364560
     
    46614685                                                 !< = 1 -> constant Rc
    46624686                                                 !< = 2 -> temperature dependent Rc
     4687
     4688!
     4689!-- Next line is to avoid compiler warning about unused variable
     4690    IF ( icmp == 0 )  CONTINUE
    46634691
    46644692    !
     
    49504978    REAL(wp), PARAMETER ::  dO3 = 0.13e-4          !< diffusion coefficient of ozon (m2/s)
    49514979
     4980!
     4981!-- Next line is to avoid compiler warning about unused variables
     4982    IF ( icmp == 0 )  CONTINUE
    49524983
    49534984    SELECT CASE( TRIM(compnam) )
     
    55265557 ! -------------------------------------------------------------------------------------------
    55275558
    5528  SUBROUTINE rc_comp_point_rc_eff( ccomp_tot, catm, ra, rb, rc_tot, rc_eff )
    5529 
    5530     IMPLICIT NONE
    5531 
    5532     !
    5533     !-- Input/output variables:
    5534     REAL(wp), INTENT(IN) ::  ccomp_tot    !< total compensation point (weighed average of separate compensation points) (ug/m3)
    5535     REAL(wp), INTENT(IN) ::  catm         !< atmospheric concentration (ug/m3)
    5536     REAL(wp), INTENT(IN) ::  ra           !< aerodynamic resistance (s/m)
    5537     REAL(wp), INTENT(IN) ::  rb           !< boundary layer resistance (s/m)
    5538     REAL(wp), INTENT(IN) ::  rc_tot       !< total canopy resistance (s/m)
    5539 
    5540     REAL(wp), INTENT(OUT) ::  rc_eff      !< effective total canopy resistance (s/m)
    5541 
    5542     !
    5543     !-- Compute effective resistance:
    5544     IF (  ccomp_tot == 0.0_wp )  THEN
    5545        !
    5546        !-- trace with no compensiation point ( or compensation point equal to zero)
    5547        rc_eff = rc_tot
    5548 
    5549     ELSE IF ( ccomp_tot > 0.0_wp .AND. ( abs( catm - ccomp_tot ) < 1.e-8 ) )  THEN
    5550        !
    5551        !--surface concentration (almost) equal to atmospheric concentration
    5552        !-- no exchange between surface and atmosphere, infinite RC --> vd=0
    5553        rc_eff = 9999999999.0_wp
    5554 
    5555     ELSE IF ( ccomp_tot > 0.0_wp )  THEN
    5556        !
    5557        !-- compensation point available, calculate effective resistance
    5558        rc_eff = ( ( ra + rb ) * ccomp_tot + rc_tot * catm ) / ( catm - ccomp_tot )
    5559 
    5560     ELSE
    5561        rc_eff = -999.0_wp
    5562        message_string = 'This should not be possible, check ccomp_tot'
    5563        CALL message( 'rc_comp_point_rc_eff', 'CM0461', 1, 2, 0, 6, 0 )
    5564     ENDIF
    5565 
    5566     RETURN
    5567    
    5568  END SUBROUTINE rc_comp_point_rc_eff
     5559! SUBROUTINE rc_comp_point_rc_eff( ccomp_tot, catm, ra, rb, rc_tot, rc_eff )
     5560!
     5561!    IMPLICIT NONE
     5562!
     5563!    !
     5564!    !-- Input/output variables:
     5565!    REAL(wp), INTENT(IN) ::  ccomp_tot    !< total compensation point (weighed average of separate compensation points) (ug/m3)
     5566!    REAL(wp), INTENT(IN) ::  catm         !< atmospheric concentration (ug/m3)
     5567!    REAL(wp), INTENT(IN) ::  ra           !< aerodynamic resistance (s/m)
     5568!    REAL(wp), INTENT(IN) ::  rb           !< boundary layer resistance (s/m)
     5569!    REAL(wp), INTENT(IN) ::  rc_tot       !< total canopy resistance (s/m)
     5570!
     5571!    REAL(wp), INTENT(OUT) ::  rc_eff      !< effective total canopy resistance (s/m)
     5572!
     5573!    !
     5574!    !-- Compute effective resistance:
     5575!    IF (  ccomp_tot == 0.0_wp )  THEN
     5576!       !
     5577!       !-- trace with no compensiation point ( or compensation point equal to zero)
     5578!       rc_eff = rc_tot
     5579!
     5580!    ELSE IF ( ccomp_tot > 0.0_wp .AND. ( abs( catm - ccomp_tot ) < 1.e-8 ) )  THEN
     5581!       !
     5582!       !--surface concentration (almost) equal to atmospheric concentration
     5583!       !-- no exchange between surface and atmosphere, infinite RC --> vd=0
     5584!       rc_eff = 9999999999.0_wp
     5585!
     5586!    ELSE IF ( ccomp_tot > 0.0_wp )  THEN
     5587!       !
     5588!       !-- compensation point available, calculate effective resistance
     5589!       rc_eff = ( ( ra + rb ) * ccomp_tot + rc_tot * catm ) / ( catm - ccomp_tot )
     5590!
     5591!    ELSE
     5592!       rc_eff = -999.0_wp
     5593!       message_string = 'This should not be possible, check ccomp_tot'
     5594!       CALL message( 'rc_comp_point_rc_eff', 'CM0461', 1, 2, 0, 6, 0 )
     5595!    ENDIF
     5596!
     5597!    RETURN
     5598!   
     5599! END SUBROUTINE rc_comp_point_rc_eff
    55695600
    55705601
     
    57585789    REAL(wp), PARAMETER ::  kappa_stab = 0.35     !< von Karman constant
    57595790
     5791!
     5792!-- Next line is to avoid compiler warning about unused variable
     5793    IF ( is_water  .OR.  ( z0h + kappa_stab ) > 0.0_wp )  CONTINUE
    57605794
    57615795    !
Note: See TracChangeset for help on using the changeset viewer.