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

Determine number of coupled arrays dynamically

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.