Changeset 3524 for palm/trunk


Ignore:
Timestamp:
Nov 14, 2018 1:36:44 PM (3 years ago)
Author:
raasch
Message:

unused variables removed, missing working precision added, missing preprocessor directives added, bugfix concerning allocation of t_surf_wall_v in nopointer case, declaration statements rearranged to avoid compile time errors, mpi_abort arguments replaced to avoid compile errors

Location:
palm/trunk/SOURCE
Files:
13 edited

Legend:

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

    r3458 r3524  
    2727! -----------------
    2828! $Id$
     29! working precision added to make code Fortran 2008 conform
     30!
     31! 3458 2018-10-30 14:51:23Z kanani
    2932! from chemistry branch r3443, banzhafs, basit:
    3033! replace surf_lsm_h%qv1(m) by q(k,j,i) for mixing ratio in chem_depo
     
    47804783
    47814784         ! vapour pressure deficit influence
    4782          F_vpd = min(1.,((1.-F_min(lu))*(vpd_min(lu)-vpd)/(vpd_min(lu)-vpd_max(lu)) + F_min(lu) ))
     4785         F_vpd = MIN( 1.0_wp, ((1.0_wp-F_min(lu))*(vpd_min(lu)-vpd)/(vpd_min(lu)-vpd_max(lu)) + F_min(lu) ) )
    47834786         F_vpd = max(F_vpd,F_min(lu))
    47844787
     
    48614864
    48624865      ! Compute visible and near-infrared radiation
    4863       rv=max(0.1,rdu+rdv)
    4864       rn=max(0.01,rdm+rdn)
     4866      rv = MAX( 0.1_wp, rdu+rdv )
     4867      rn = MAX( 0.01_wp, rdm+rdn )
    48654868
    48664869      ! Compute ratio between input global radiation and total radiation computed here
    4867       ratio=min(0.9,glrad/(rv+rn))
     4870      ratio = MIN( 0.9_wp, glrad/(rv+rn) )
    48684871
    48694872      !     Calculate total visible radiation
     
    48714874
    48724875      !     Calculate fraction of PAR in the direct beam
    4873       fv=min(0.99, (0.9-ratio)/0.7)            ! help variable
    4874       fv=max(0.01,rdu/rv*(1.0-fv**0.6667))     ! fraction of PAR in the direct beam
     4876      fv = MIN( 0.99_wp, (0.9_wp-ratio)/0.7_wp )            ! help variable
     4877      fv = MAX( 0.01_wp, rdu/rv*(1.0_wp-fv**0.6667_wp) )     ! fraction of PAR in the direct beam
    48754878
    48764879      ! Compute direct and diffuse parts of PAR
  • palm/trunk/SOURCE/header.f90

    r3467 r3524  
    2525! -----------------
    2626! $Id$
     27! unused variables removed
     28!
     29! 3467 2018-10-30 19:05:21Z suehring
    2730! Implementation of a new aerosol module salsa.
    2831!
     
    402405
    403406    USE basic_constants_and_equations_mod,                                     &
    404         ONLY:  g, kappa, l_v, r_d
     407        ONLY:  g, kappa, l_v
    405408
    406409    USE biometeorology_mod,                                                    &
  • palm/trunk/SOURCE/indoor_model_mod.f90

    r3469 r3524  
    2626! -----------------
    2727! $Id$
     28! working precision added to make code Fortran 2008 conform
     29!
     30! 3469 2018-10-30 20:05:07Z kanani
    2831! Initial revision (tlang, suehring, kanani, srissman)
    2932!
     
    979982!--          not less than 0.01 W/K to provide division by 0 in further calculations
    980983!--          with heat capacity of air 0.33 Wh/m2K
    981              h_ve   = MAX( 0.01 , ( air_change * indoor_volume_per_facade *      &
    982                                     0.33 * (1 - eta_ve ) ) )    !< [W/K] from ISO 13789 Eq.(10)
     984             h_ve   = MAX( 0.01_wp , ( air_change * indoor_volume_per_facade *      &
     985                                    0.33_wp * (1 - eta_ve ) ) )    !< [W/K] from ISO 13789 Eq.(10)
    983986
    984987!--          Heat transfer coefficient auxiliary variables
     
    11711174!--          not less than 0.01 W/K to provide division by 0 in further calculations
    11721175!--          with heat capacity of air 0.33 Wh/m2K
    1173              h_ve   = MAX( 0.01 , ( air_change * indoor_volume_per_facade *      &
    1174                                     0.33 * (1 - eta_ve ) ) )                    !< [W/K] from ISO 13789 Eq.(10)
     1176             h_ve   = MAX( 0.01_wp , ( air_change * indoor_volume_per_facade *      &
     1177                                    0.33_wp * (1 - eta_ve ) ) )                    !< [W/K] from ISO 13789 Eq.(10)
    11751178                                   
    11761179!--          Heat transfer coefficient auxiliary variables
  • palm/trunk/SOURCE/init_3d_model.f90

    r3473 r3524  
    2525! -----------------
    2626! $Id$
     27! preprocessor directive added to avoid the compiler to complain about unused
     28! variable
     29!
     30! 3473 2018-10-30 20:50:15Z suehring
    2731! Add virtual measurement module
    2832!
     
    615619        ONLY:  pcm_init
    616620
     621#if defined( __parallel )
    617622    USE pmc_interface,                                                         &
    618623        ONLY:  nested_run
     624#endif
    619625
    620626    USE radiation_model_mod,                                                   &
  • palm/trunk/SOURCE/lpm_init.f90

    r3361 r3524  
    2525! -----------------
    2626! $Id$
     27! added missing working precision
     28!
     29! 3361 2018-10-16 20:39:37Z knoop
    2730! ocean renamed ocean_mode
    2831!
     
    804807!
    805808!--                            Determine the grid indices of the particle position
    806                                ip = tmp_particle%x * ddx
    807                                jp = tmp_particle%y * ddy
    808                                kp = tmp_particle%z / dz(1) + 1 + offset_ocean_nzt                               
     809                               ip = INT( tmp_particle%x * ddx )
     810                               jp = INT( tmp_particle%y * ddy )
     811                               kp = INT( tmp_particle%z / dz(1) + 1 + offset_ocean_nzt )
    809812                               DO WHILE( zw(kp) < tmp_particle%z )
    810813                                  kp = kp + 1
     
    11841187                IF ( particles(n)%weight_factor - FLOOR(particles(n)%weight_factor,KIND=wp) &
    11851188                     .GT. random_function( iran_part ) )  THEN
    1186                    particles(n)%weight_factor = FLOOR(particles(n)%weight_factor,KIND=wp) + 1.0
     1189                   particles(n)%weight_factor = FLOOR(particles(n)%weight_factor,KIND=wp) + 1.0_wp
    11871190                ELSE
    11881191                   particles(n)%weight_factor = FLOOR(particles(n)%weight_factor,KIND=wp)
  • palm/trunk/SOURCE/palm.f90

    r3494 r3524  
    2525! -----------------
    2626! $Id$
     27! unused variable removed
     28!
     29! 3494 2018-11-06 14:51:27Z suehring
    2730! Last actions for surface output added
    2831!
     
    281284    USE control_parameters,                                                    &
    282285        ONLY:  air_chemistry, constant_diffusion, child_domain,                &
    283                coupling_char, coupling_mode, do2d_at_begin, do3d_at_begin,     &
    284                humidity, initializing_actions, io_blocks, io_group,            &
    285                message_string,                                                 &
     286               coupling_char, do2d_at_begin, do3d_at_begin, humidity,          &
     287               initializing_actions, io_blocks, io_group, message_string,      &
    286288               neutral, passive_scalar, runnr, simulated_time_chr, spinup,     &
    287289               time_since_reference_point, user_interface_current_revision,    &
     
    392394#if defined( __parallel )
    393395    CALL MPI_COMM_RANK( comm_palm, myid, ierr )
    394 !
    395 !-- TEST OUTPUT (TO BE REMOVED)
    396     WRITE(9,*) '*** coupling_mode = "', TRIM( coupling_mode ), '"'
    397     FLUSH( 9 )
    398     IF ( TRIM( coupling_mode ) /= 'uncoupled' )  THEN
    399        PRINT*, '*** PE', myid, ' Global target PE:', target_id, &
    400                TRIM( coupling_mode )
    401     ENDIF
    402396#endif
    403397
  • palm/trunk/SOURCE/plant_canopy_model_mod.f90

    r3498 r3524  
    2727! -----------------
    2828! $Id$
     29! working precision added to make code Fortran 2008 conform
     30!
     31! 3498 2018-11-07 10:53:03Z gronemeier
    2932! corrected revisions section
    3033!
     
    403406     temp = pt(k,j,i) * exner(k) - degc_to_k
    404407!--  Coefficient for conversion of radiation to grid to radiation to unit leaves surface
    405      v_lad = 1.0_wp / ( MAX(lad_s(kk,j,i), 1.0e-10) * dx * dy * dz(1) )
     408     v_lad = 1.0_wp / ( MAX( lad_s(kk,j,i), 1.0e-10_wp ) * dx * dy * dz(1) )
    406409!--  Magnus formula for the saturation pressure (see Ngao, Adam and Saudreau (2017) eq. 1)
    407410!--  There are updated formulas available, kept consistent with the rest of the parametrization
  • palm/trunk/SOURCE/pmc_interface_mod.f90

    r3484 r3524  
    2525! -----------------
    2626! $Id$
     27! declaration statements rearranged to avoid compile time errors
     28!
     29! 3484 2018-11-02 14:41:25Z hellstea
    2730! Introduction of reversibility correction to the interpolation routines in order to
    2831! guarantee mass and scalar conservation through the nest boundaries. Several errors
     
    54165419      IMPLICIT NONE
    54175420
     5421      INTEGER(iwp) ::  nzt_topo_nestbc   !<
     5422
    54185423      REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                      &
    54195424                                      INTENT(INOUT) ::  f       !<
     
    54485453!AH      INTEGER(iwp), DIMENSION(0:kct,jcs:jcn,icl:icr), INTENT(IN) :: ijkfc !< number of child grid points contributing to a parent grid box
    54495454      INTEGER(iwp), DIMENSION(0:cg%nz+1,jcs:jcn,icl:icr), INTENT(IN) :: ijkfc !< number of child grid points contributing to a parent grid box
    5450 
    5451       INTEGER(iwp) ::  nzt_topo_nestbc   !<
    54525455
    54535456      CHARACTER(LEN=1), INTENT(IN) ::  edge   !<
     
    57065709      IMPLICIT NONE
    57075710
     5711      INTEGER(iwp) ::  nzt_topo_nestbc   !<
     5712
    57085713      REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                      &
    57095714                                      INTENT(INOUT) ::  f             !<
     
    57375742!AH      INTEGER(iwp), DIMENSION(0:kct,jcs:jcn,icl:icr), INTENT(IN) :: ijkfc !< number of child grid points contributing to a parent grid box
    57385743      INTEGER(iwp), DIMENSION(0:cg%nz+1,jcs:jcn,icl:icr), INTENT(IN) :: ijkfc !< number of child grid points contributing to a parent grid box
    5739 
    5740       INTEGER(iwp) ::  nzt_topo_nestbc   !<
    57415744
    57425745      CHARACTER(LEN=1), INTENT(IN) ::  edge   !<
  • palm/trunk/SOURCE/poismg_mod.f90

    r3241 r3524  
    2525! -----------------
    2626! $Id$
     27! mpi_abort arguments replaced to avoid compile errors
     28!
     29! 3241 2018-09-12 15:02:00Z raasch
    2730! unused variables removed
    2831!
     
    11911194             IF ( ind /= ind_even_odd )  THEN
    11921195                WRITE (0,*) 'ERROR ==> illegal ind_even_odd ',ind,ind_even_odd,l
    1193                 CALL MPI_ABORT(MPI_COMM_WORLD,i,j)
     1196                CALL MPI_ABORT( MPI_COMM_WORLD, 9999, ierr )
    11941197             ENDIF
    11951198#endif
  • palm/trunk/SOURCE/radiation_model_mod.f90

    r3495 r3524  
    2828! -----------------
    2929! $Id$
     30! missing cpp-directives added
     31!
     32! 3495 2018-11-06 15:22:17Z kanani
    3033! Resort control_parameters ONLY list,
    3134! From branch radiation@3491 moh.hefny:
     
    23072310!--       Calculate initial surface albedo for different surfaces
    23082311          IF ( .NOT. constant_albedo )  THEN
     2312#if defined( __netcdf )
    23092313!
    23102314!--          Horizontally aligned natural and urban surfaces
     
    23172321                CALL calc_albedo( surf_usm_v(l) )
    23182322             ENDDO
     2323#endif
    23192324          ELSE
    23202325!
     
    30893094!--    Calculate surface albedo. In case average radiation is applied,
    30903095!--    this is not required.
     3096#if defined( __netcdf )
    30913097       IF ( .NOT. constant_albedo )  THEN
    30923098!
     
    31013107          ENDDO
    31023108       ENDIF
     3109#endif
    31033110
    31043111!
  • palm/trunk/SOURCE/salsa_mod.f90

    r3483 r3524  
    2525! -----------------
    2626! $Id$
     27! missing comma separator inserted
     28!
     29! 3483 2018-11-02 14:19:26Z raasch
    2730! bugfix: directives added to allow compilation without netCDF
    2831!
     
    87587814  FORMAT  (/'       dry deposition (on vegetation = ', L1,                   &
    876879              '          and on topography = ', L1, ')')             
    877 8   FORMAT  (/'    Aerosol bin subrange limits (in metres): ',  3(ES10.2E3) / &
     8808   FORMAT  (/'    Aerosol bin subrange limits (in metres): ',  3(ES10.2E3), / &
    878881              '    Number of size bins for each aerosol subrange: ', 2I3,/     &
    879882              '    Aerosol bin limits (in metres): ', *(ES10.2E3))
  • palm/trunk/SOURCE/time_integration.f90

    r3484 r3524  
    2525! -----------------
    2626! $Id$
     27! unused variables removed
     28!
     29! 3484 2018-11-02 14:41:25Z hellstea
    2730! pmci_ensure_nest_mass_conservation is premanently removed
    2831!
     
    422425
    423426    USE chem_modules,                                                          &
    424         ONLY:  bc_cs_t_val, call_chem_at_all_substeps, cs_name,                &
    425                constant_csflux, do_emis, nspec, nspec_out
     427        ONLY:  bc_cs_t_val, cs_name, do_emis, nspec, nspec_out
    426428
    427429    USE chemistry_model_mod,                                                   &
  • palm/trunk/SOURCE/urban_surface_mod.f90

    r3502 r3524  
    2828! -----------------
    2929! $Id$
     30! bugfix concerning allocation of t_surf_wall_v
     31!
     32! 3502 2018-11-07 14:45:23Z suehring
    3033! Disable initialization of building roofs with ground-floor-level properties,
    3134! since this causes strong oscillations of surface temperature during the
     
    73737376                IF ( k == 1 )  THEN
    73747377                   IF ( .NOT.  ALLOCATED( t_surf_wall_v(0)%t ) )                    &
    7375                       ALLOCATE( t_surf_v(0)%t(1:surf_usm_v(0)%ns) )
     7378                      ALLOCATE( t_surf_wall_v(0)%t(1:surf_usm_v(0)%ns) )
    73767379                   READ ( 13 )  tmp_surf_wall_v(0)%t
    73777380                ENDIF
Note: See TracChangeset for help on using the changeset viewer.