Changeset 3592 for palm


Ignore:
Timestamp:
Dec 3, 2018 12:38:40 PM (6 years ago)
Author:
suehring
Message:

Determine number of coupled arrays dynamically

Location:
palm/trunk/SOURCE
Files:
2 edited

Legend:

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

    r3241 r3592  
    2626! -----------------
    2727! $Id$
     28! Determine number of coupled arrays dynamically.
     29!
     30! 3241 2018-09-12 15:02:00Z raasch
    2831! unused variable removed
    2932!
     
    99102    SAVE
    100103
     104    INTEGER(iwp), PUBLIC            :: pmc_max_array          !< max # of arrays which can be coupled - will be determined dynamically in pmc_interface
     105   
    101106    INTEGER(iwp), PARAMETER, PUBLIC :: da_desclen       =  8  !<
    102107    INTEGER(iwp), PARAMETER, PUBLIC :: da_namelen       = 16  !<
    103108    INTEGER(iwp), PARAMETER, PUBLIC :: pmc_da_name_err  = 10  !<
    104     INTEGER(iwp), PARAMETER, PUBLIC :: pmc_max_array    = 32  !< max # of arrays which can be coupled
    105109    INTEGER(iwp), PARAMETER, PUBLIC :: pmc_max_models   = 64  !<
    106110    INTEGER(iwp), PARAMETER, PUBLIC :: pmc_status_ok    =  0  !<
  • palm/trunk/SOURCE/pmc_interface_mod.f90

    r3524 r3592  
    2525! -----------------
    2626! $Id$
     27! Number of coupled arrays is determined dynamically (instead of a fixed value
     28! of 32)
     29!
     30! 3524 2018-11-14 13:36:44Z raasch
    2731! declaration statements rearranged to avoid compile time errors
    2832!
     
    804808    CALL pmci_setup_coordinates
    805809!
     810!-- Determine the number of coupled arrays
     811    CALL pmci_num_arrays
     812!
    806813!-- Initialize the child (must be called before pmc_setup_parent)
    807814    CALL pmci_setup_child
     
    36603667#endif
    36613668 END SUBROUTINE pmci_setup_coordinates
     3669 
     3670!------------------------------------------------------------------------------!
     3671! Description:
     3672! ------------
     3673!> In this subroutine the number of coupled arrays is determined.
     3674!------------------------------------------------------------------------------!
     3675  SUBROUTINE pmci_num_arrays 
     3676               
     3677#if defined( __parallel )
     3678    USE pmc_general,                                                           &
     3679        ONLY:  pmc_max_array
     3680
     3681    IMPLICIT NONE
     3682!
     3683!-- The number of coupled arrays depends on the model settings. At least
     3684!-- 5 arrays need to be coupled (u, v, w, e, diss).  Please note, actually
     3685!-- e and diss (TKE and dissipation rate) are only required if RANS-RANS
     3686!-- nesting is applied, but memory is allocated nevertheless. This is because
     3687!-- the information whether they are needed or not is retrieved at a later
     3688!-- point in time. In case e and diss are not needed, they are also not
     3689!-- exchanged between parent and child.
     3690    pmc_max_array = 5
     3691!
     3692!-- pt
     3693    IF ( .NOT. neutral )  pmc_max_array = pmc_max_array + 1
     3694   
     3695    IF ( humidity )  THEN
     3696!
     3697!--    q
     3698       pmc_max_array = pmc_max_array + 1
     3699!
     3700!--    qc, nc
     3701       IF ( bulk_cloud_model  .AND.  microphysics_morrison )                   &
     3702          pmc_max_array = pmc_max_array + 2
     3703!
     3704!--    qr, nr
     3705       IF ( bulk_cloud_model  .AND.  microphysics_seifert )                    &
     3706          pmc_max_array = pmc_max_array + 2
     3707    ENDIF
     3708!
     3709!-- s
     3710    IF ( passive_scalar )  pmc_max_array = pmc_max_array + 1
     3711!
     3712!-- nr_part, part_adr
     3713    IF ( particle_advection )  pmc_max_array = pmc_max_array + 2
     3714!
     3715!-- Chemistry, depends on number of species
     3716    IF ( air_chemistry  .AND.  nest_chemistry )                                &
     3717       pmc_max_array = pmc_max_array + nspec
     3718
     3719
     3720#endif
     3721 END SUBROUTINE pmci_num_arrays
    36623722
    36633723
     
    40814141       ENDIF
    40824142
    4083        IF ( air_chemistry  .AND.  nest_chemistry)  THEN
     4143       IF ( air_chemistry  .AND.  nest_chemistry )  THEN
    40844144          DO  n = 1, nspec
    40854145             CALL pmci_interp_tril_all ( chem_species(n)%conc,                 &
Note: See TracChangeset for help on using the changeset viewer.