Changeset 4665 for palm/trunk/SOURCE


Ignore:
Timestamp:
Sep 3, 2020 2:04:24 PM (4 years ago)
Author:
hellstea
Message:

Interpolation and anterpolation subroutines renamed and all missing subroutine description comments added (pmc_interface_mod). Format descriptor 102 slightly modified (cpulog_mod).

Location:
palm/trunk/SOURCE
Files:
2 edited

Legend:

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

    r4577 r4665  
    1919! Current revisions:
    2020! -----------------
    21 ! 
    22 ! 
     21!
     22!
    2323! Former revisions:
    2424! -----------------
    2525! $Id$
     26! Format descriptor 102 slightly modified.
     27!
     28! 4577 2020-06-25 09:53:58Z raasch
    2629! further re-formatting concerning Fortran parameter variables
    2730!
     
    550553               &'---------------------')
    551554
    552    102 FORMAT (A25,2X,F9.3,2X,F7.2,1X,I7,2(1X,F9.3),1X,F6.2)
     555   102 FORMAT (A25,2X,F10.3,2X,F7.2,1X,I7,2(1X,F10.3),1X,F6.2)
    553556   103 FORMAT (/'Barriers are set in front of collective operations')
    554557   104 FORMAT (/'No barriers are set in front of collective operations')
  • palm/trunk/SOURCE/pmc_interface_mod.f90

    r4649 r4665  
    2525! -----------------
    2626! $Id$
     27! Interpolation and anterpolation subroutines renamed and all missing subroutine description
     28! comments added.
     29!
     30! 4649 2020-08-25 12:11:17Z raasch
    2731! File re-formatted to follow the PALM coding standard
    2832!
     
    677681! Description:
    678682! ------------
    679 !> @Todo: Missing subroutine description.
     683!> Find out if this is a nested run and if so, read and broadcast the nesting parameters and set
     684!> the communicators accordingly.
    680685!--------------------------------------------------------------------------------------------------!
    681686 SUBROUTINE pmci_init( world_comm )
     
    764769! Description:
    765770! ------------
    766 !> @Todo: Missing subroutine description.
     771!> Define the nesting setup.
    767772!--------------------------------------------------------------------------------------------------!
    768773 SUBROUTINE pmci_modelconfiguration
     
    810815! Description:
    811816! ------------
    812 !> @Todo: Missing subroutine description.
     817!> Prepare the coupling environment for the current parent domain.
    813818!--------------------------------------------------------------------------------------------------!
    814819 SUBROUTINE pmci_setup_parent
     
    11341139! Description:
    11351140! ------------
    1136 !> @Todo: Missing subroutine description.
     1141!> Create the index list
    11371142!--------------------------------------------------------------------------------------------------!
    11381143 SUBROUTINE pmci_create_index_list
     
    12411246! Description:
    12421247! ------------
    1243 !> @Todo: Missing subroutine description.
     1248!> Store the child-edge coordinates.
    12441249!--------------------------------------------------------------------------------------------------!
    12451250 SUBROUTINE pmci_set_child_edge_coords
     
    12781283! Description:
    12791284! ------------
    1280 !> @Todo: Missing subroutine description.
     1285!> Prepare the coupling environment for the current child domain.
    12811286!--------------------------------------------------------------------------------------------------!
    12821287 SUBROUTINE pmci_setup_child
     
    15101515! Description:
    15111516! ------------
    1512 !> @Todo: Missing subroutine description.
     1517!> Determine index bounds of interpolation/anterpolation area in the parent-grid index space.
    15131518!--------------------------------------------------------------------------------------------------!
    15141519 SUBROUTINE pmci_map_child_grid_to_parent_grid
    15151520
    1516 !
    1517 !-- Determine index bounds of interpolation/anterpolation area in the parent-grid index space
    15181521    IMPLICIT NONE
    15191522
     
    17101713! Description:
    17111714! ------------
    1712 !> @Todo: Missing subroutine description.
     1715!> Precomputation of the mapping between the child- and parent-grid indices.
    17131716!--------------------------------------------------------------------------------------------------!
    17141717 SUBROUTINE pmci_define_index_mapping
    1715 !
    1716 !-- Precomputation of the mapping of the child- and parent-grid indices.
    17171718
    17181719    IMPLICIT NONE
     
    20282029! Description:
    20292030! ------------
    2030 !> @Todo: Missing subroutine description.
     2031!> Check if the child domain is too small in terms of number of parent-grid cells covered so that
     2032!> anterpolation buffers fill the whole domain so that anterpolation not possible. Also, check that
     2033!> anterpolation_buffer_width is not too large to prevent anterpolation.
    20312034!--------------------------------------------------------------------------------------------------!
    20322035 SUBROUTINE pmci_check_child_domain_size
    2033 !
    2034 !-- Check if the child domain is too small in terms of number of parent-grid cells covered so that
    2035 !-- anterpolation buffers fill the whole domain so that anterpolation not possible. Also, check that
    2036 !-- anterpolation_buffer_width is not too large to prevent anterpolation.
     2036
    20372037    IMPLICIT NONE
    20382038
     
    21132113! Description:
    21142114! ------------
    2115 !> @Todo: Missing subroutine description.
     2115!> Allocate parent-grid work-arrays for interpolation.
    21162116!--------------------------------------------------------------------------------------------------!
    21172117 SUBROUTINE pmci_allocate_workarrays
    2118 !
    2119 !-- Allocate parent-grid work-arrays for interpolation
     2118 
    21202119    IMPLICIT NONE
    21212120
     
    21612160! Description:
    21622161! ------------
    2163 !> @Todo: Missing subroutine description.
     2162!> Define and create specific MPI-datatypes for the interpolation work-array exchange.
     2163!> Exhcanges are needed to make these arrays contiguous over the horizontal direction on the
     2164!> plane of the boundary.
    21642165!--------------------------------------------------------------------------------------------------!
    21652166 SUBROUTINE pmci_create_workarray_exchange_datatypes
    2166 !
    2167 !-- Define specific MPI types for workarr-exchange.
     2167
    21682168    IMPLICIT NONE
    21692169
     
    21942194! Description:
    21952195! ------------
    2196 !> @Todo: Missing subroutine description.
     2196!> Check that the grid lines of child and parent do match. Also check that the child subdomain
     2197!> width is not smaller than the parent grid spacing in the respective direction.
    21972198!--------------------------------------------------------------------------------------------------!
    21982199 SUBROUTINE pmci_check_grid_matching
    2199 !
    2200 !-- Check that the grid lines of child and parent do match.
    2201 !-- Also check that the child subdomain width is not smaller than the parent grid spacing in the
    2202 !-- respective direction.
     2200
    22032201    IMPLICIT NONE
    22042202
     
    23272325! Description:
    23282326! ------------
    2329 !> @Todo: Missing subroutine description.
     2327!> Compute the areas of the domain boundary faces: left, right, south, north and top.
    23302328!--------------------------------------------------------------------------------------------------!
    23312329 SUBROUTINE pmci_compute_face_areas
     
    24522450! Description:
    24532451! ------------
    2454 !> @Todo: Missing subroutine description.
     2452!> Translate the coordinates of the current domain into the root coordinate system and store them
     2453!> (z remains the same). 
    24552454!--------------------------------------------------------------------------------------------------!
    24562455 SUBROUTINE pmci_setup_coordinates
     
    25362535! Description:
    25372536! ------------
    2538 !> @Todo: Missing subroutine description.
     2537!> Assigns the pointer to the array to be coupled.
    25392538!--------------------------------------------------------------------------------------------------!
    25402539 SUBROUTINE pmci_set_array_pointer( name, child_id, nz_child, n )
     
    26722671! Description:
    26732672! ------------
    2674 !> @Todo: Missing subroutine description.
     2673!> Provides the child grid edge coordinates for pmc_particle_interface.
    26752674!--------------------------------------------------------------------------------------------------!
    26762675 SUBROUTINE get_child_edges( m, lx_coord, lx_coord_b, rx_coord, rx_coord_b, sy_coord, sy_coord_b,  &
     
    27112710! Description:
    27122711! ------------
    2713 !> @Todo: Missing subroutine description.
     2712!> Provides the child grid spacings for pmc_particle_interface.
    27142713!--------------------------------------------------------------------------------------------------!
    27152714 SUBROUTINE  get_child_gridspacing( m, dx, dy,dz )
     
    27402739! Description:
    27412740! ------------
    2742 !> @Todo: Missing subroutine description.
     2741!> Allocate child's parent-grid arrays for data transfer between parent and child.
    27432742!--------------------------------------------------------------------------------------------------!
    27442743 SUBROUTINE pmci_create_childs_parent_grid_arrays( name, is, ie, js, je, nzc, n  )
     
    28622861! Description:
    28632862! ------------
    2864 !> @Todo: Missing subroutine description.
     2863!> Send data for the children in order to let them create initial conditions by interpolating the
     2864!> parent-domain fields.
    28652865!--------------------------------------------------------------------------------------------------!
    28662866 SUBROUTINE pmci_parent_initialize
    2867 
    2868 !
    2869 !-- Send data for the children in order to let them create initial conditions by interpolating the
    2870 !-- parent-domain fields.
     2867 
    28712868#if defined( __parallel )
    28722869    IMPLICIT NONE
     
    28902887! Description:
    28912888! ------------
    2892 !> @Todo: Missing subroutine description.
     2889!> Create initial conditions for the current child domain by interpolating the parent-domain fields.
    28932890!--------------------------------------------------------------------------------------------------!
    28942891 SUBROUTINE pmci_child_initialize
    28952892
    2896 !
    2897 !-- Create initial conditions for the current child domain by interpolating the parent-domain fields.
    28982893#if defined( __parallel )
    28992894    IMPLICIT NONE
     
    29172912!
    29182913!--    The interpolation.
    2919        CALL pmci_interp_1sto_all ( u, uc, kcto, iflu, ifuu, jflo, jfuo, kflo, kfuo, 'u' )
    2920        CALL pmci_interp_1sto_all ( v, vc, kcto, iflo, ifuo, jflv, jfuv, kflo, kfuo, 'v' )
    2921        CALL pmci_interp_1sto_all ( w, wc, kctw, iflo, ifuo, jflo, jfuo, kflw, kfuw, 'w' )
     2914       CALL pmci_interp_all ( u, uc, kcto, iflu, ifuu, jflo, jfuo, kflo, kfuo, 'u' )
     2915       CALL pmci_interp_all ( v, vc, kcto, iflo, ifuo, jflv, jfuv, kflo, kfuo, 'v' )
     2916       CALL pmci_interp_all ( w, wc, kctw, iflo, ifuo, jflo, jfuo, kflw, kfuw, 'w' )
    29222917
    29232918       IF ( (       rans_mode_parent  .AND.         rans_mode )  .OR.                              &
    29242919            ( .NOT. rans_mode_parent  .AND.  .NOT.  rans_mode  .AND.                               &
    29252920              .NOT. constant_diffusion ) )  THEN
    2926           CALL pmci_interp_1sto_all ( e, ec, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 'e' )
     2921          CALL pmci_interp_all ( e, ec, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 'e' )
    29272922       ENDIF
    29282923
    29292924       IF ( rans_mode_parent  .AND.  rans_mode  .AND.  rans_tke_e )  THEN
    2930           CALL pmci_interp_1sto_all ( diss, dissc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 's' )
     2925          CALL pmci_interp_all ( diss, dissc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 's' )
    29312926       ENDIF
    29322927
    29332928       IF ( .NOT. neutral )  THEN
    2934           CALL pmci_interp_1sto_all ( pt, ptc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 's' )
     2929          CALL pmci_interp_all ( pt, ptc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 's' )
    29352930       ENDIF
    29362931
    29372932       IF ( humidity )  THEN
    29382933
    2939           CALL pmci_interp_1sto_all ( q, q_c, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 's' )
     2934          CALL pmci_interp_all ( q, q_c, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 's' )
    29402935
    29412936          IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
    2942              CALL pmci_interp_1sto_all ( qc, qcc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 's' )
    2943              CALL pmci_interp_1sto_all ( nc, ncc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 's' )
     2937             CALL pmci_interp_all ( qc, qcc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 's' )
     2938             CALL pmci_interp_all ( nc, ncc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 's' )
    29442939          ENDIF
    29452940
    29462941          IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
    2947              CALL pmci_interp_1sto_all ( qr, qrc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 's' )
    2948              CALL pmci_interp_1sto_all ( nr, nrc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 's' )
     2942             CALL pmci_interp_all ( qr, qrc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 's' )
     2943             CALL pmci_interp_all ( nr, nrc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 's' )
    29492944          ENDIF
    29502945
     
    29522947
    29532948       IF ( passive_scalar )  THEN
    2954           CALL pmci_interp_1sto_all ( s, sc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 's' )
     2949          CALL pmci_interp_all ( s, sc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 's' )
    29552950       ENDIF
    29562951
    29572952       IF ( air_chemistry  .AND.  nesting_chem )  THEN
    29582953          DO  n = 1, nspec
    2959              CALL pmci_interp_1sto_all ( chem_species(n)%conc, chem_spec_c(:,:,:,n),               &
     2954             CALL pmci_interp_all ( chem_species(n)%conc, chem_spec_c(:,:,:,n),               &
    29602955                                         kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 's' )
    29612956          ENDDO
     
    29642959       IF ( salsa  .AND.  nesting_salsa )  THEN
    29652960          DO  lb = 1, nbins_aerosol
    2966              CALL pmci_interp_1sto_all ( aerosol_number(lb)%conc, aerosol_number_c(:,:,:,lb),      &
     2961             CALL pmci_interp_all ( aerosol_number(lb)%conc, aerosol_number_c(:,:,:,lb),      &
    29672962                                         kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 's' )
    29682963          ENDDO
    29692964          DO  lc = 1, nbins_aerosol * ncomponents_mass
    2970              CALL pmci_interp_1sto_all ( aerosol_mass(lc)%conc, aerosol_mass_c(:,:,:,lc),          &
     2965             CALL pmci_interp_all ( aerosol_mass(lc)%conc, aerosol_mass_c(:,:,:,lc),          &
    29712966                                         kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 's' )
    29722967          ENDDO
    29732968          IF ( .NOT. salsa_gases_from_chem )  THEN
    29742969             DO  lg = 1, ngases_salsa
    2975                 CALL pmci_interp_1sto_all ( salsa_gas(lg)%conc, salsa_gas_c(:,:,:,lg),             &
     2970                CALL pmci_interp_all ( salsa_gas(lg)%conc, salsa_gas_c(:,:,:,lg),             &
    29762971                                            kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 's' )
    29772972             ENDDO
     
    30103005! Description:
    30113006! ------------
    3012 !> @Todo: Missing subroutine description.
    3013 !--------------------------------------------------------------------------------------------------!
    3014  SUBROUTINE pmci_interp_1sto_all( child_array, parent_array, kct, ifl, ifu, jfl, jfu, kfl, kfu,    &
    3015                                   var )
    3016 !
    3017 !-- Interpolation of the internal values for the child-domain initialization
     3007!> Interpolation of the internal values for the child-domain initialization.
     3008!--------------------------------------------------------------------------------------------------!
     3009 SUBROUTINE pmci_interp_all( child_array, parent_array, kct, ifl, ifu, jfl, jfu, kfl, kfu, var )
     3010
    30183011    IMPLICIT NONE
    30193012
     
    32613254    ENDIF
    32623255
    3263  END SUBROUTINE pmci_interp_1sto_all
     3256 END SUBROUTINE pmci_interp_all
    32643257
    32653258#endif
     
    32703263! Description:
    32713264! ------------
    3272 !> @Todo: Missing subroutine description.
     3265!> Check for mismatches between settings of root and child variables (e.g., all children have to
     3266!> follow the end_time settings of the root model). The root model overwrites variables in the
     3267!> other models, so these variables only need to be set once in file PARIN.
    32733268!--------------------------------------------------------------------------------------------------!
    32743269 SUBROUTINE pmci_check_setting_mismatches
    3275 !
    3276 !-- Check for mismatches between settings of root and child variables (e.g., all children have to
    3277 !-- follow the end_time settings of the root model). The root model overwrites variables in the
    3278 !-- other models, so these variables only need to be set once in file PARIN.
    32793270
    32803271#if defined( __parallel )
     
    33583349! Description:
    33593350! ------------
    3360 !> @Todo: Missing subroutine description.
     3351!> Unify the time steps for each model and synchronize using MPI_ALLREDUCE with the MPI_MIN
     3352!> operator over all processes using the global communicator MPI_COMM_WORLD.
    33613353!--------------------------------------------------------------------------------------------------!
    33623354 SUBROUTINE pmci_synchronize
    33633355
    33643356#if defined( __parallel )
    3365 !
    3366 !-- Unify the time steps for each model and synchronize using MPI_ALLREDUCE with the MPI_MIN
    3367 !-- operator over all processes using the global communicator MPI_COMM_WORLD.
    33683357
    33693358   IMPLICIT NONE
     
    33903379! Description:
    33913380! ------------
    3392 !> @Todo: Missing subroutine description.
     3381!> After each Runge-Kutta sub-timestep, alternately set buffer one or buffer two active
    33933382!--------------------------------------------------------------------------------------------------!
    33943383 SUBROUTINE pmci_set_swaplevel( swaplevel )
    3395 
    3396 !
    3397 !-- After each Runge-Kutta sub-timestep, alternately set buffer one or buffer two active
    33983384
    33993385    IMPLICIT NONE
     
    34163402! Description:
    34173403! ------------
    3418 !> @Todo: Missing subroutine description.
     3404!> This subroutine controls the nesting according to the nestpar parameter nesting_mode (two-way
     3405!> (default) or one-way) and the order of anterpolations according to the nestpar parameter
     3406!> nesting_datatransfer_mode (cascade, overlap or mixed (default)). Although nesting_mode is a
     3407!> variable of this module, pass it as an argument to allow for example to force one-way
     3408!> initialization phase. Note that interpolation ( parent_to_child ) must always be carried out
     3409!> before anterpolation ( child_to_parent ).
    34193410!--------------------------------------------------------------------------------------------------!
    34203411 SUBROUTINE pmci_datatrans( local_nesting_mode )
    3421 !
    3422 !-- This subroutine controls the nesting according to the nestpar parameter nesting_mode (two-way
    3423 !-- (default) or one-way) and the order of anterpolations according to the nestpar parameter
    3424 !-- nesting_datatransfer_mode (cascade, overlap or mixed (default)). Although nesting_mode is a
    3425 !-- variable of this model, pass it as an argument to allow for example to force one-way
    3426 !-- initialization phase. Note that interpolation ( parent_to_child ) must always be carried out
    3427 !-- before anterpolation ( child_to_parent ).
    34283412
    34293413    IMPLICIT NONE
     
    34803464! Description:
    34813465! ------------
    3482 !> @Todo: Missing subroutine description.
     3466!> Wrapper routine including the parent-side calls to all the data-transfer routines.
    34833467!--------------------------------------------------------------------------------------------------!
    34843468 SUBROUTINE pmci_parent_datatrans( direction )
     
    35433527! Description:
    35443528! ------------
    3545 !> @Todo: Missing subroutine description.
     3529!> Wrapper routine including the child-side calls to all the data-transfer and processing routines.
    35463530!--------------------------------------------------------------------------------------------------!
    35473531 SUBROUTINE pmci_child_datatrans( direction )
     
    35893573! Description:
    35903574! ------------
    3591 !> @Todo: Missing subroutine description.
     3575!> A wrapper routine for all interpolation actions.
    35923576!--------------------------------------------------------------------------------------------------!
    35933577 SUBROUTINE pmci_interpolation
    3594 
    3595 !
    3596 !-- A wrapper routine for all interpolation actions
    35973578
    35983579    IMPLICIT NONE
     
    36123593       IF ( bc_dirichlet_l )  THEN
    36133594
    3614           CALL pmci_interp_1sto_lr( u, uc, kcto, jflo, jfuo, kflo, kfuo, 'l', 'u' )
    3615           CALL pmci_interp_1sto_lr( v, vc, kcto, jflv, jfuv, kflo, kfuo, 'l', 'v' )
    3616           CALL pmci_interp_1sto_lr( w, wc, kctw, jflo, jfuo, kflw, kfuw, 'l', 'w' )
     3595          CALL pmci_interp_lr( u, uc, kcto, jflo, jfuo, kflo, kfuo, 'l', 'u' )
     3596          CALL pmci_interp_lr( v, vc, kcto, jflv, jfuv, kflo, kfuo, 'l', 'v' )
     3597          CALL pmci_interp_lr( w, wc, kctw, jflo, jfuo, kflw, kfuw, 'l', 'w' )
    36173598
    36183599          IF ( (        rans_mode_parent  .AND.         rans_mode )  .OR.                          &
    36193600               ( .NOT.  rans_mode_parent  .AND.  .NOT.  rans_mode  .AND.                           &
    36203601                 .NOT.  constant_diffusion ) )  THEN
    3621 !             CALL pmci_interp_1sto_lr( e, ec, kcto, jflo, jfuo, kflo, kfuo, 'l', 'e' )
     3602!             CALL pmci_interp_lr( e, ec, kcto, jflo, jfuo, kflo, kfuo, 'l', 'e' )
    36223603!
    36233604!--          Interpolation of e is replaced by the Neumann condition.
     
    36293610
    36303611          IF ( rans_mode_parent  .AND.  rans_mode  .AND.  rans_tke_e )  THEN
    3631              CALL pmci_interp_1sto_lr( diss, dissc, kcto, jflo, jfuo, kflo, kfuo, 'l', 's' )
     3612             CALL pmci_interp_lr( diss, dissc, kcto, jflo, jfuo, kflo, kfuo, 'l', 's' )
    36323613          ENDIF
    36333614
    36343615          IF ( .NOT. neutral )  THEN
    3635              CALL pmci_interp_1sto_lr( pt, ptc, kcto, jflo, jfuo, kflo, kfuo, 'l', 's' )
     3616             CALL pmci_interp_lr( pt, ptc, kcto, jflo, jfuo, kflo, kfuo, 'l', 's' )
    36363617          ENDIF
    36373618
    36383619          IF ( humidity )  THEN
    36393620
    3640              CALL pmci_interp_1sto_lr( q, q_c, kcto, jflo, jfuo, kflo, kfuo, 'l', 's' )
     3621             CALL pmci_interp_lr( q, q_c, kcto, jflo, jfuo, kflo, kfuo, 'l', 's' )
    36413622
    36423623             IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
    3643                 CALL pmci_interp_1sto_lr( qc, qcc, kcto, jflo, jfuo, kflo, kfuo, 'l', 's' )
    3644                 CALL pmci_interp_1sto_lr( nc, ncc, kcto, jflo, jfuo, kflo, kfuo, 'l', 's' )
     3624                CALL pmci_interp_lr( qc, qcc, kcto, jflo, jfuo, kflo, kfuo, 'l', 's' )
     3625                CALL pmci_interp_lr( nc, ncc, kcto, jflo, jfuo, kflo, kfuo, 'l', 's' )
    36453626             ENDIF
    36463627
    36473628             IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
    3648                 CALL pmci_interp_1sto_lr( qr, qrc, kcto, jflo, jfuo, kflo, kfuo, 'l', 's' )
    3649                 CALL pmci_interp_1sto_lr( nr, nrc, kcto, jflo, jfuo, kflo, kfuo, 'l', 's' )
     3629                CALL pmci_interp_lr( qr, qrc, kcto, jflo, jfuo, kflo, kfuo, 'l', 's' )
     3630                CALL pmci_interp_lr( nr, nrc, kcto, jflo, jfuo, kflo, kfuo, 'l', 's' )
    36503631             ENDIF
    36513632
     
    36533634
    36543635          IF ( passive_scalar )  THEN
    3655              CALL pmci_interp_1sto_lr( s, sc, kcto, jflo, jfuo, kflo, kfuo, 'l', 's' )
     3636             CALL pmci_interp_lr( s, sc, kcto, jflo, jfuo, kflo, kfuo, 'l', 's' )
    36563637          ENDIF
    36573638
    36583639          IF ( air_chemistry  .AND.  nesting_chem )  THEN
    36593640             DO  n = 1, nspec
    3660                 CALL pmci_interp_1sto_lr( chem_species(n)%conc, chem_spec_c(:,:,:,n),              &
    3661                                           kcto, jflo, jfuo, kflo, kfuo, 'l', 's' )
     3641                CALL pmci_interp_lr( chem_species(n)%conc, chem_spec_c(:,:,:,n),                   &
     3642                                     kcto, jflo, jfuo, kflo, kfuo, 'l', 's' )
    36623643             ENDDO
    36633644          ENDIF
     
    36653646          IF ( salsa  .AND.  nesting_salsa )  THEN
    36663647             DO  lb = 1, nbins_aerosol
    3667                 CALL pmci_interp_1sto_lr( aerosol_number(lb)%conc, aerosol_number_c(:,:,:,lb),     &
    3668                                           kcto, jflo, jfuo, kflo, kfuo, 'l', 's')
     3648                CALL pmci_interp_lr( aerosol_number(lb)%conc, aerosol_number_c(:,:,:,lb),          &
     3649                                     kcto, jflo, jfuo, kflo, kfuo, 'l', 's')
    36693650             ENDDO
    36703651             DO  lc = 1, nbins_aerosol * ncomponents_mass
    3671                 CALL pmci_interp_1sto_lr( aerosol_mass(lc)%conc, aerosol_mass_c(:,:,:,lc),         &
    3672                                           kcto, jflo, jfuo, kflo, kfuo, 'l', 's')
     3652                CALL pmci_interp_lr( aerosol_mass(lc)%conc, aerosol_mass_c(:,:,:,lc),              &
     3653                                     kcto, jflo, jfuo, kflo, kfuo, 'l', 's')
    36733654             ENDDO
    36743655             IF ( .NOT. salsa_gases_from_chem )  THEN
    36753656                DO  lg = 1, ngases_salsa
    3676                    CALL pmci_interp_1sto_lr( salsa_gas(lg)%conc, salsa_gas_c(:,:,:,lg),            &
    3677                                              kcto, jflo, jfuo, kflo, kfuo, 'l', 's')
     3657                   CALL pmci_interp_lr( salsa_gas(lg)%conc, salsa_gas_c(:,:,:,lg),                 &
     3658                                        kcto, jflo, jfuo, kflo, kfuo, 'l', 's')
    36783659                ENDDO
    36793660             ENDIF
     
    36853666       IF ( bc_dirichlet_r )  THEN
    36863667
    3687           CALL pmci_interp_1sto_lr( u, uc, kcto, jflo, jfuo, kflo, kfuo, 'r', 'u' )
    3688           CALL pmci_interp_1sto_lr( v, vc, kcto, jflv, jfuv, kflo, kfuo, 'r', 'v' )
    3689           CALL pmci_interp_1sto_lr( w, wc, kctw, jflo, jfuo, kflw, kfuw, 'r', 'w' )
     3668          CALL pmci_interp_lr( u, uc, kcto, jflo, jfuo, kflo, kfuo, 'r', 'u' )
     3669          CALL pmci_interp_lr( v, vc, kcto, jflv, jfuv, kflo, kfuo, 'r', 'v' )
     3670          CALL pmci_interp_lr( w, wc, kctw, jflo, jfuo, kflw, kfuw, 'r', 'w' )
    36903671
    36913672          IF ( (        rans_mode_parent  .AND.         rans_mode )  .OR.                          &
    36923673               ( .NOT.  rans_mode_parent  .AND.  .NOT.  rans_mode  .AND.                           &
    36933674                 .NOT.  constant_diffusion ) )  THEN
    3694 !             CALL pmci_interp_1sto_lr( e, ec, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 'r', 'e' )
     3675!             CALL pmci_interp_lr( e, ec, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, 'r', 'e' )
    36953676!
    36963677!--          Interpolation of e is replaced by the Neumann condition.
     
    37013682
    37023683          IF ( rans_mode_parent  .AND.  rans_mode  .AND.  rans_tke_e )  THEN
    3703              CALL pmci_interp_1sto_lr( diss, dissc, kcto, jflo, jfuo, kflo, kfuo, 'r', 's' )
     3684             CALL pmci_interp_lr( diss, dissc, kcto, jflo, jfuo, kflo, kfuo, 'r', 's' )
    37043685          ENDIF
    37053686
    37063687          IF (  .NOT.  neutral )  THEN
    3707              CALL pmci_interp_1sto_lr( pt, ptc, kcto, jflo, jfuo, kflo, kfuo, 'r', 's' )
     3688             CALL pmci_interp_lr( pt, ptc, kcto, jflo, jfuo, kflo, kfuo, 'r', 's' )
    37083689          ENDIF
    37093690
    37103691          IF ( humidity )  THEN
    3711              CALL pmci_interp_1sto_lr( q, q_c, kcto, jflo, jfuo, kflo, kfuo, 'r', 's' )
     3692             CALL pmci_interp_lr( q, q_c, kcto, jflo, jfuo, kflo, kfuo, 'r', 's' )
    37123693
    37133694             IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
    3714                 CALL pmci_interp_1sto_lr( qc, qcc, kcto, jflo, jfuo, kflo, kfuo, 'r', 's' )
    3715                 CALL pmci_interp_1sto_lr( nc, ncc, kcto, jflo, jfuo, kflo, kfuo, 'r', 's' )
     3695                CALL pmci_interp_lr( qc, qcc, kcto, jflo, jfuo, kflo, kfuo, 'r', 's' )
     3696                CALL pmci_interp_lr( nc, ncc, kcto, jflo, jfuo, kflo, kfuo, 'r', 's' )
    37163697             ENDIF
    37173698
    37183699             IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
    3719                 CALL pmci_interp_1sto_lr( qr, qrc, kcto, jflo, jfuo, kflo, kfuo, 'r', 's' )
    3720                 CALL pmci_interp_1sto_lr( nr, nrc, kcto, jflo, jfuo, kflo, kfuo, 'r', 's' )
     3700                CALL pmci_interp_lr( qr, qrc, kcto, jflo, jfuo, kflo, kfuo, 'r', 's' )
     3701                CALL pmci_interp_lr( nr, nrc, kcto, jflo, jfuo, kflo, kfuo, 'r', 's' )
    37213702             ENDIF
    37223703
     
    37243705
    37253706          IF ( passive_scalar )  THEN
    3726              CALL pmci_interp_1sto_lr( s, sc, kcto, jflo, jfuo, kflo, kfuo, 'r', 's' )
     3707             CALL pmci_interp_lr( s, sc, kcto, jflo, jfuo, kflo, kfuo, 'r', 's' )
    37273708          ENDIF
    37283709
    37293710          IF ( air_chemistry  .AND.  nesting_chem )  THEN
    37303711             DO  n = 1, nspec
    3731                 CALL pmci_interp_1sto_lr( chem_species(n)%conc, chem_spec_c(:,:,:,n),              &
    3732                                           kcto, jflo, jfuo, kflo, kfuo, 'r', 's' )
     3712                CALL pmci_interp_lr( chem_species(n)%conc, chem_spec_c(:,:,:,n),                    &
     3713                                     kcto, jflo, jfuo, kflo, kfuo, 'r', 's' )
    37333714             ENDDO
    37343715          ENDIF
     
    37363717          IF ( salsa  .AND.  nesting_salsa )  THEN
    37373718             DO  lb = 1, nbins_aerosol
    3738                 CALL pmci_interp_1sto_lr( aerosol_number(lb)%conc, aerosol_number_c(:,:,:,lb),     &
     3719                CALL pmci_interp_lr( aerosol_number(lb)%conc, aerosol_number_c(:,:,:,lb),           &
    37393720                                          kcto, jflo, jfuo, kflo, kfuo, 'r', 's' )
    37403721             ENDDO
    37413722             DO  lc = 1, nbins_aerosol * ncomponents_mass
    3742                 CALL pmci_interp_1sto_lr( aerosol_mass(lc)%conc, aerosol_mass_c(:,:,:,lc),         &
    3743                                           kcto, jflo, jfuo, kflo, kfuo, 'r', 's' )
     3723                CALL pmci_interp_lr( aerosol_mass(lc)%conc, aerosol_mass_c(:,:,:,lc),               &
     3724                                     kcto, jflo, jfuo, kflo, kfuo, 'r', 's' )
    37443725             ENDDO
    37453726             IF ( .NOT. salsa_gases_from_chem )  THEN
    37463727                DO  lg = 1, ngases_salsa
    3747                    CALL pmci_interp_1sto_lr( salsa_gas(lg)%conc, salsa_gas_c(:,:,:,lg),            &
    3748                                              kcto, jflo, jfuo, kflo, kfuo, 'r', 's' )
     3728                   CALL pmci_interp_lr( salsa_gas(lg)%conc, salsa_gas_c(:,:,:,lg),                  &
     3729                                        kcto, jflo, jfuo, kflo, kfuo, 'r', 's' )
    37493730                ENDDO
    37503731             ENDIF
     
    37563737       IF ( bc_dirichlet_s )  THEN
    37573738
    3758           CALL pmci_interp_1sto_sn( v, vc, kcto, iflo, ifuo, kflo, kfuo, 's', 'v' )
    3759           CALL pmci_interp_1sto_sn( w, wc, kctw, iflo, ifuo, kflw, kfuw, 's', 'w' )
    3760           CALL pmci_interp_1sto_sn( u, uc, kcto, iflu, ifuu, kflo, kfuo, 's', 'u' )
     3739          CALL pmci_interp_sn( v, vc, kcto, iflo, ifuo, kflo, kfuo, 's', 'v' )
     3740          CALL pmci_interp_sn( w, wc, kctw, iflo, ifuo, kflw, kfuw, 's', 'w' )
     3741          CALL pmci_interp_sn( u, uc, kcto, iflu, ifuu, kflo, kfuo, 's', 'u' )
    37613742
    37623743          IF ( (        rans_mode_parent  .AND.         rans_mode )  .OR.                          &
    37633744               ( .NOT.  rans_mode_parent  .AND.  .NOT.  rans_mode  .AND.                           &
    37643745                 .NOT.  constant_diffusion ) )  THEN
    3765 !             CALL pmci_interp_1sto_sn( e, ec, kcto, iflo, ifuo, kflo, kfuo, 's', 'e' )
     3746!             CALL pmci_interp_sn( e, ec, kcto, iflo, ifuo, kflo, kfuo, 's', 'e' )
    37663747!
    37673748!--          Interpolation of e is replaced by the Neumann condition.
     
    37723753
    37733754          IF ( rans_mode_parent  .AND.  rans_mode  .AND.  rans_tke_e )  THEN
    3774              CALL pmci_interp_1sto_sn( diss, dissc, kcto, iflo, ifuo, kflo, kfuo, 's', 's' )
     3755             CALL pmci_interp_sn( diss, dissc, kcto, iflo, ifuo, kflo, kfuo, 's', 's' )
    37753756          ENDIF
    37763757
    37773758          IF (  .NOT.  neutral )  THEN
    3778              CALL pmci_interp_1sto_sn( pt, ptc, kcto, iflo, ifuo, kflo, kfuo, 's', 's' )
     3759             CALL pmci_interp_sn( pt, ptc, kcto, iflo, ifuo, kflo, kfuo, 's', 's' )
    37793760          ENDIF
    37803761
    37813762          IF ( humidity )  THEN
    3782              CALL pmci_interp_1sto_sn( q, q_c, kcto, iflo, ifuo, kflo, kfuo, 's', 's' )
     3763             CALL pmci_interp_sn( q, q_c, kcto, iflo, ifuo, kflo, kfuo, 's', 's' )
    37833764
    37843765             IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
    3785                 CALL pmci_interp_1sto_sn( qc, qcc, kcto, iflo, ifuo, kflo, kfuo, 's', 's' )
    3786                 CALL pmci_interp_1sto_sn( nc, ncc, kcto, iflo, ifuo, kflo, kfuo, 's', 's' )
     3766                CALL pmci_interp_sn( qc, qcc, kcto, iflo, ifuo, kflo, kfuo, 's', 's' )
     3767                CALL pmci_interp_sn( nc, ncc, kcto, iflo, ifuo, kflo, kfuo, 's', 's' )
    37873768             ENDIF
    37883769
    37893770             IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
    3790                 CALL pmci_interp_1sto_sn( qr, qrc, kcto, iflo, ifuo, kflo, kfuo, 's', 's' )
    3791                 CALL pmci_interp_1sto_sn( nr, nrc, kcto, iflo, ifuo, kflo, kfuo, 's', 's' )
     3771                CALL pmci_interp_sn( qr, qrc, kcto, iflo, ifuo, kflo, kfuo, 's', 's' )
     3772                CALL pmci_interp_sn( nr, nrc, kcto, iflo, ifuo, kflo, kfuo, 's', 's' )
    37923773             ENDIF
    37933774
     
    37953776
    37963777          IF ( passive_scalar )  THEN
    3797              CALL pmci_interp_1sto_sn( s, sc, kcto, iflo, ifuo, kflo, kfuo, 's', 's' )
     3778             CALL pmci_interp_sn( s, sc, kcto, iflo, ifuo, kflo, kfuo, 's', 's' )
    37983779          ENDIF
    37993780
    38003781          IF ( air_chemistry  .AND.  nesting_chem )  THEN
    38013782             DO  n = 1, nspec
    3802                 CALL pmci_interp_1sto_sn( chem_species(n)%conc, chem_spec_c(:,:,:,n),              &
    3803                                           kcto, iflo, ifuo, kflo, kfuo, 's', 's' )
     3783                CALL pmci_interp_sn( chem_species(n)%conc, chem_spec_c(:,:,:,n),                   &
     3784                                     kcto, iflo, ifuo, kflo, kfuo, 's', 's' )
    38043785             ENDDO
    38053786          ENDIF
     
    38073788          IF ( salsa  .AND.  nesting_salsa )  THEN
    38083789             DO  lb = 1, nbins_aerosol
    3809                 CALL pmci_interp_1sto_sn( aerosol_number(lb)%conc, aerosol_number_c(:,:,:,lb),     &
    3810                                           kcto, iflo, ifuo, kflo, kfuo, 's', 's' )
     3790                CALL pmci_interp_sn( aerosol_number(lb)%conc, aerosol_number_c(:,:,:,lb),          &
     3791                                     kcto, iflo, ifuo, kflo, kfuo, 's', 's' )
    38113792             ENDDO
    38123793             DO  lc = 1, nbins_aerosol * ncomponents_mass
    3813                 CALL pmci_interp_1sto_sn( aerosol_mass(lc)%conc, aerosol_mass_c(:,:,:,lc),         &
    3814                                           kcto, iflo, ifuo, kflo, kfuo, 's', 's' )
     3794                CALL pmci_interp_sn( aerosol_mass(lc)%conc, aerosol_mass_c(:,:,:,lc),              &
     3795                                     kcto, iflo, ifuo, kflo, kfuo, 's', 's' )
    38153796             ENDDO
    38163797             IF ( .NOT. salsa_gases_from_chem )  THEN
    38173798                DO  lg = 1, ngases_salsa
    3818                    CALL pmci_interp_1sto_sn( salsa_gas(lg)%conc, salsa_gas_c(:,:,:,lg),            &
    3819                                              kcto, iflo, ifuo, kflo, kfuo, 's', 's' )
     3799                   CALL pmci_interp_sn( salsa_gas(lg)%conc, salsa_gas_c(:,:,:,lg),                 &
     3800                                        kcto, iflo, ifuo, kflo, kfuo, 's', 's' )
    38203801                ENDDO
    38213802             ENDIF
     
    38273808       IF ( bc_dirichlet_n )  THEN
    38283809
    3829           CALL pmci_interp_1sto_sn( v, vc, kcto, iflo, ifuo, kflo, kfuo, 'n', 'v' )
    3830           CALL pmci_interp_1sto_sn( w, wc, kctw, iflo, ifuo, kflw, kfuw, 'n', 'w' )
    3831           CALL pmci_interp_1sto_sn( u, uc, kcto, iflu, ifuu, kflo, kfuo, 'n', 'u' )
     3810          CALL pmci_interp_sn( v, vc, kcto, iflo, ifuo, kflo, kfuo, 'n', 'v' )
     3811          CALL pmci_interp_sn( w, wc, kctw, iflo, ifuo, kflw, kfuw, 'n', 'w' )
     3812          CALL pmci_interp_sn( u, uc, kcto, iflu, ifuu, kflo, kfuo, 'n', 'u' )
    38323813
    38333814          IF ( (        rans_mode_parent  .AND.         rans_mode )  .OR.                          &
    38343815               ( .NOT.  rans_mode_parent  .AND.  .NOT.  rans_mode  .AND.                           &
    38353816                 .NOT.  constant_diffusion ) )  THEN
    3836 !             CALL pmci_interp_1sto_sn( e, ec, kcto, iflo, ifuo, kflo, kfuo, 'n', 'e' )
     3817!             CALL pmci_interp_sn( e, ec, kcto, iflo, ifuo, kflo, kfuo, 'n', 'e' )
    38373818!
    38383819!--          Interpolation of e is replaced by the Neumann condition.
     
    38433824
    38443825          IF ( rans_mode_parent  .AND.  rans_mode  .AND.  rans_tke_e )  THEN
    3845              CALL pmci_interp_1sto_sn( diss, dissc, kcto, iflo, ifuo, kflo, kfuo, 'n', 's' )
     3826             CALL pmci_interp_sn( diss, dissc, kcto, iflo, ifuo, kflo, kfuo, 'n', 's' )
    38463827          ENDIF
    38473828
    38483829          IF (  .NOT.  neutral )  THEN
    3849              CALL pmci_interp_1sto_sn( pt, ptc, kcto, iflo, ifuo, kflo, kfuo, 'n', 's' )
     3830             CALL pmci_interp_sn( pt, ptc, kcto, iflo, ifuo, kflo, kfuo, 'n', 's' )
    38503831          ENDIF
    38513832
    38523833          IF ( humidity )  THEN
    3853              CALL pmci_interp_1sto_sn( q, q_c, kcto, iflo, ifuo, kflo, kfuo, 'n', 's' )
     3834             CALL pmci_interp_sn( q, q_c, kcto, iflo, ifuo, kflo, kfuo, 'n', 's' )
    38543835
    38553836             IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
    3856                 CALL pmci_interp_1sto_sn( qc, qcc, kcto, iflo, ifuo, kflo, kfuo, 'n', 's' )
    3857                 CALL pmci_interp_1sto_sn( nc, ncc, kcto, iflo, ifuo, kflo, kfuo, 'n', 's' )
     3837                CALL pmci_interp_sn( qc, qcc, kcto, iflo, ifuo, kflo, kfuo, 'n', 's' )
     3838                CALL pmci_interp_sn( nc, ncc, kcto, iflo, ifuo, kflo, kfuo, 'n', 's' )
    38583839             ENDIF
    38593840
    38603841             IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
    3861                 CALL pmci_interp_1sto_sn( qr, qrc, kcto, iflo, ifuo, kflo, kfuo, 'n', 's' )
    3862                 CALL pmci_interp_1sto_sn( nr, nrc, kcto, iflo, ifuo, kflo, kfuo, 'n', 's' )
     3842                CALL pmci_interp_sn( qr, qrc, kcto, iflo, ifuo, kflo, kfuo, 'n', 's' )
     3843                CALL pmci_interp_sn( nr, nrc, kcto, iflo, ifuo, kflo, kfuo, 'n', 's' )
    38633844             ENDIF
    38643845
     
    38663847
    38673848          IF ( passive_scalar )  THEN
    3868              CALL pmci_interp_1sto_sn( s, sc, kcto, iflo, ifuo, kflo, kfuo, 'n', 's' )
     3849             CALL pmci_interp_sn( s, sc, kcto, iflo, ifuo, kflo, kfuo, 'n', 's' )
    38693850          ENDIF
    38703851
    38713852          IF ( air_chemistry  .AND.  nesting_chem )  THEN
    38723853             DO  n = 1, nspec
    3873                 CALL pmci_interp_1sto_sn( chem_species(n)%conc, chem_spec_c(:,:,:,n),              &
    3874                                           kcto, iflo, ifuo, kflo, kfuo, 'n', 's' )
     3854                CALL pmci_interp_sn( chem_species(n)%conc, chem_spec_c(:,:,:,n),                   &
     3855                                     kcto, iflo, ifuo, kflo, kfuo, 'n', 's' )
    38753856             ENDDO
    38763857          ENDIF
     
    38783859          IF ( salsa  .AND.  nesting_salsa )  THEN
    38793860             DO  lb = 1, nbins_aerosol
    3880                 CALL pmci_interp_1sto_sn( aerosol_number(lb)%conc, aerosol_number_c(:,:,:,lb),     &
    3881                                           kcto, iflo, ifuo, kflo, kfuo, 'n', 's' )
     3861                CALL pmci_interp_sn( aerosol_number(lb)%conc, aerosol_number_c(:,:,:,lb),          &
     3862                                     kcto, iflo, ifuo, kflo, kfuo, 'n', 's' )
    38823863             ENDDO
    38833864             DO  lc = 1, nbins_aerosol * ncomponents_mass
    3884                 CALL pmci_interp_1sto_sn( aerosol_mass(lc)%conc, aerosol_mass_c(:,:,:,lc),         &
    3885                                           kcto, iflo, ifuo, kflo, kfuo, 'n', 's' )
     3865                CALL pmci_interp_sn( aerosol_mass(lc)%conc, aerosol_mass_c(:,:,:,lc),              &
     3866                                     kcto, iflo, ifuo, kflo, kfuo, 'n', 's' )
    38863867             ENDDO
    38873868             IF ( .NOT. salsa_gases_from_chem )  THEN
    38883869                DO  lg = 1, ngases_salsa
    3889                    CALL pmci_interp_1sto_sn( salsa_gas(lg)%conc, salsa_gas_c(:,:,:,lg),            &
    3890                                              kcto, iflo, ifuo, kflo, kfuo, 'n', 's' )
     3870                   CALL pmci_interp_sn( salsa_gas(lg)%conc, salsa_gas_c(:,:,:,lg),                 &
     3871                                        kcto, iflo, ifuo, kflo, kfuo, 'n', 's' )
    38913872                ENDDO
    38923873             ENDIF
     
    38983879!
    38993880!-- All PEs are top-border PEs
    3900     CALL pmci_interp_1sto_t( w, wc, kctw, iflo, ifuo, jflo, jfuo, 'w' )
    3901     CALL pmci_interp_1sto_t( u, uc, kcto, iflu, ifuu, jflo, jfuo, 'u' )
    3902     CALL pmci_interp_1sto_t( v, vc, kcto, iflo, ifuo, jflv, jfuv, 'v' )
     3881    CALL pmci_interp_t( w, wc, kctw, iflo, ifuo, jflo, jfuo, 'w' )
     3882    CALL pmci_interp_t( u, uc, kcto, iflu, ifuu, jflo, jfuo, 'u' )
     3883    CALL pmci_interp_t( v, vc, kcto, iflo, ifuo, jflv, jfuv, 'v' )
    39033884
    39043885    IF ( (        rans_mode_parent  .AND.         rans_mode )  .OR.                                &
    39053886         ( .NOT.  rans_mode_parent  .AND.  .NOT.  rans_mode  .AND.                                 &
    39063887           .NOT.  constant_diffusion ) )  THEN
    3907 !       CALL pmci_interp_1sto_t( e, ec, kcto, iflo, ifuo, jflo, jfuo, 'e' )
     3888!       CALL pmci_interp_t( e, ec, kcto, iflo, ifuo, jflo, jfuo, 'e' )
    39083889!
    39093890!--    Interpolation of e is replaced by the Neumann condition.
     
    39123893
    39133894    IF ( rans_mode_parent  .AND.  rans_mode  .AND.  rans_tke_e )  THEN
    3914        CALL pmci_interp_1sto_t( diss, dissc, kcto, iflo, ifuo, jflo, jfuo, 's' )
     3895       CALL pmci_interp_t( diss, dissc, kcto, iflo, ifuo, jflo, jfuo, 's' )
    39153896    ENDIF
    39163897
    39173898    IF ( .NOT. neutral )  THEN
    3918        CALL pmci_interp_1sto_t( pt, ptc, kcto, iflo, ifuo, jflo, jfuo, 's' )
     3899       CALL pmci_interp_t( pt, ptc, kcto, iflo, ifuo, jflo, jfuo, 's' )
    39193900    ENDIF
    39203901
    39213902    IF ( humidity )  THEN
    3922        CALL pmci_interp_1sto_t( q, q_c, kcto, iflo, ifuo, jflo, jfuo, 's' )
     3903       CALL pmci_interp_t( q, q_c, kcto, iflo, ifuo, jflo, jfuo, 's' )
    39233904       IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
    3924           CALL pmci_interp_1sto_t( qc, qcc, kcto, iflo, ifuo, jflo, jfuo, 's' )
    3925           CALL pmci_interp_1sto_t( nc, ncc, kcto, iflo, ifuo, jflo, jfuo, 's' )
     3905          CALL pmci_interp_t( qc, qcc, kcto, iflo, ifuo, jflo, jfuo, 's' )
     3906          CALL pmci_interp_t( nc, ncc, kcto, iflo, ifuo, jflo, jfuo, 's' )
    39263907       ENDIF
    39273908       IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
    3928           CALL pmci_interp_1sto_t( qr, qrc, kcto, iflo, ifuo, jflo, jfuo, 's' )
    3929           CALL pmci_interp_1sto_t( nr, nrc, kcto, iflo, ifuo, jflo, jfuo, 's' )
     3909          CALL pmci_interp_t( qr, qrc, kcto, iflo, ifuo, jflo, jfuo, 's' )
     3910          CALL pmci_interp_t( nr, nrc, kcto, iflo, ifuo, jflo, jfuo, 's' )
    39303911       ENDIF
    39313912    ENDIF
    39323913
    39333914    IF ( passive_scalar )  THEN
    3934        CALL pmci_interp_1sto_t( s, sc, kcto, iflo, ifuo, jflo, jfuo, 's' )
     3915       CALL pmci_interp_t( s, sc, kcto, iflo, ifuo, jflo, jfuo, 's' )
    39353916    ENDIF
    39363917
    39373918    IF ( air_chemistry  .AND.  nesting_chem )  THEN
    39383919       DO  n = 1, nspec
    3939           CALL pmci_interp_1sto_t( chem_species(n)%conc, chem_spec_c(:,:,:,n),                     &
    3940                                    kcto, iflo, ifuo, jflo, jfuo, 's' )
     3920          CALL pmci_interp_t( chem_species(n)%conc, chem_spec_c(:,:,:,n),                          &
     3921                              kcto, iflo, ifuo, jflo, jfuo, 's' )
    39413922       ENDDO
    39423923    ENDIF
     
    39443925    IF ( salsa  .AND.  nesting_salsa )  THEN
    39453926       DO  lb = 1, nbins_aerosol
    3946           CALL pmci_interp_1sto_t( aerosol_number(lb)%conc, aerosol_number_c(:,:,:,lb),            &
    3947                                    kcto, iflo, ifuo, jflo, jfuo, 's' )
     3927          CALL pmci_interp_t( aerosol_number(lb)%conc, aerosol_number_c(:,:,:,lb),                 &
     3928                              kcto, iflo, ifuo, jflo, jfuo, 's' )
    39483929       ENDDO
    39493930       DO  lc = 1, nbins_aerosol * ncomponents_mass
    3950           CALL pmci_interp_1sto_t( aerosol_mass(lc)%conc, aerosol_mass_c(:,:,:,lc),                &
    3951                                    kcto, iflo, ifuo, jflo, jfuo, 's' )
     3931          CALL pmci_interp_t( aerosol_mass(lc)%conc, aerosol_mass_c(:,:,:,lc),                     &
     3932                              kcto, iflo, ifuo, jflo, jfuo, 's' )
    39523933       ENDDO
    39533934       IF ( .NOT. salsa_gases_from_chem )  THEN
    39543935          DO  lg = 1, ngases_salsa
    3955              CALL pmci_interp_1sto_t( salsa_gas(lg)%conc, salsa_gas_c(:,:,:,lg),                   &
    3956                                       kcto, iflo, ifuo, jflo, jfuo, 's' )
     3936             CALL pmci_interp_t( salsa_gas(lg)%conc, salsa_gas_c(:,:,:,lg),                        &
     3937                                 kcto, iflo, ifuo, jflo, jfuo, 's' )
    39573938          ENDDO
    39583939       ENDIF
     
    39663947! Description:
    39673948! ------------
    3968 !> @Todo: Missing subroutine description.
     3949!> A wrapper routine for all anterpolation actions. Note that TKE is not anterpolated.
    39693950!--------------------------------------------------------------------------------------------------!
    39703951 SUBROUTINE pmci_anterpolation
    3971 
    3972 !
    3973 !-- A wrapper routine for all anterpolation actions.
    3974 !-- Note that TKE is not anterpolated.
     3952 
    39753953    IMPLICIT NONE
    39763954    INTEGER(iwp) ::  lb  !< Running index for aerosol size bins
     
    39803958
    39813959
    3982     CALL pmci_anterp_tophat( u,  uc,  kcto, iflu, ifuu, jflo, jfuo, kflo, kfuo, ijkfc_u, 'u' )
    3983     CALL pmci_anterp_tophat( v,  vc,  kcto, iflo, ifuo, jflv, jfuv, kflo, kfuo, ijkfc_v, 'v' )
    3984     CALL pmci_anterp_tophat( w,  wc,  kctw, iflo, ifuo, jflo, jfuo, kflw, kfuw, ijkfc_w, 'w' )
     3960    CALL pmci_anterp_var( u,  uc,  kcto, iflu, ifuu, jflo, jfuo, kflo, kfuo, ijkfc_u, 'u' )
     3961    CALL pmci_anterp_var( v,  vc,  kcto, iflo, ifuo, jflv, jfuv, kflo, kfuo, ijkfc_v, 'v' )
     3962    CALL pmci_anterp_var( w,  wc,  kctw, iflo, ifuo, jflo, jfuo, kflw, kfuw, ijkfc_w, 'w' )
    39853963!
    39863964!-- Anterpolation of TKE and dissipation rate if parent and child are in
    39873965!-- RANS mode.
    39883966    IF ( rans_mode_parent  .AND.  rans_mode )  THEN
    3989        CALL pmci_anterp_tophat( e, ec, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, ijkfc_s, 'e' )
     3967       CALL pmci_anterp_var( e, ec, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, ijkfc_s, 'e' )
    39903968!
    39913969!--    Anterpolation of dissipation rate only if TKE-e closure is applied.
    39923970       IF ( rans_tke_e )  THEN
    3993           CALL pmci_anterp_tophat( diss, dissc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo,          &
    3994                                    ijkfc_s, 'diss' )
     3971          CALL pmci_anterp_var( diss, dissc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo,              &
     3972                                ijkfc_s, 'diss' )
    39953973       ENDIF
    39963974
     
    39983976
    39993977    IF ( .NOT. neutral )  THEN
    4000        CALL pmci_anterp_tophat( pt, ptc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, ijkfc_s, 'pt' )
     3978       CALL pmci_anterp_var( pt, ptc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, ijkfc_s, 'pt' )
    40013979    ENDIF
    40023980
    40033981    IF ( humidity )  THEN
    40043982
    4005        CALL pmci_anterp_tophat( q, q_c, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, ijkfc_s, 'q' )
     3983       CALL pmci_anterp_var( q, q_c, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, ijkfc_s, 'q' )
    40063984
    40073985       IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
    40083986
    4009           CALL pmci_anterp_tophat( qc, qcc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, ijkfc_s,     &
    4010                                    'qc' )
    4011 
    4012           CALL pmci_anterp_tophat( nc, ncc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, ijkfc_s,     &
    4013                                    'nc' )
     3987          CALL pmci_anterp_var( qc, qcc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, ijkfc_s, 'qc' )
     3988
     3989          CALL pmci_anterp_var( nc, ncc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, ijkfc_s, 'nc' )
    40143990
    40153991       ENDIF
     
    40173993       IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
    40183994
    4019           CALL pmci_anterp_tophat( qr, qrc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, ijkfc_s,     &
    4020                                    'qr' )
    4021 
    4022           CALL pmci_anterp_tophat( nr, nrc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, ijkfc_s,     &
    4023                                    'nr' )
     3995          CALL pmci_anterp_var( qr, qrc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, ijkfc_s, 'qr' )
     3996
     3997          CALL pmci_anterp_var( nr, nrc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, ijkfc_s, 'nr' )
    40243998
    40253999       ENDIF
     
    40284002
    40294003    IF ( passive_scalar )  THEN
    4030        CALL pmci_anterp_tophat( s, sc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, ijkfc_s, 's' )
     4004       CALL pmci_anterp_var( s, sc, kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, ijkfc_s, 's' )
    40314005    ENDIF
    40324006
    40334007    IF ( air_chemistry  .AND.  nesting_chem )  THEN
    40344008       DO  n = 1, nspec
    4035           CALL pmci_anterp_tophat( chem_species(n)%conc, chem_spec_c(:,:,:,n),                     &
    4036                                    kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, ijkfc_s, 's' )
     4009          CALL pmci_anterp_var( chem_species(n)%conc, chem_spec_c(:,:,:,n),                        &
     4010                                kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, ijkfc_s, 's' )
    40374011       ENDDO
    40384012    ENDIF
     
    40404014    IF ( salsa  .AND.  nesting_salsa )  THEN
    40414015       DO  lb = 1, nbins_aerosol
    4042           CALL pmci_anterp_tophat( aerosol_number(lb)%conc, aerosol_number_c(:,:,:,lb),            &
    4043                                    kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, ijkfc_s, 's' )
     4016          CALL pmci_anterp_var( aerosol_number(lb)%conc, aerosol_number_c(:,:,:,lb),               &
     4017                                kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, ijkfc_s, 's' )
    40444018       ENDDO
    40454019       DO  lc = 1, nbins_aerosol * ncomponents_mass
    4046           CALL pmci_anterp_tophat( aerosol_mass(lc)%conc, aerosol_mass_c(:,:,:,lc),                &
    4047                                    kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, ijkfc_s, 's' )
     4020          CALL pmci_anterp_var( aerosol_mass(lc)%conc, aerosol_mass_c(:,:,:,lc),                   &
     4021                                kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, ijkfc_s, 's' )
    40484022       ENDDO
    40494023       IF ( .NOT. salsa_gases_from_chem )  THEN
    40504024          DO  lg = 1, ngases_salsa
    4051              CALL pmci_anterp_tophat( salsa_gas(lg)%conc, salsa_gas_c(:,:,:,lg),                   &
    4052                                       kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, ijkfc_s, 's' )
     4025             CALL pmci_anterp_var( salsa_gas(lg)%conc, salsa_gas_c(:,:,:,lg),                      &
     4026                                   kcto, iflo, ifuo, jflo, jfuo, kflo, kfuo, ijkfc_s, 's' )
    40534027          ENDDO
    40544028       ENDIF
     
    40614035! Description:
    40624036! ------------
    4063 !> @Todo: Missing subroutine description.
    4064 !--------------------------------------------------------------------------------------------------!
    4065  SUBROUTINE pmci_interp_1sto_lr( child_array, parent_array, kct, jfl, jfu, kfl, kfu, edge, var )
    4066 !
    4067 !-- Interpolation of ghost-node values used as the child-domain boundary conditions. This subroutine
    4068 !-- handles the left and right boundaries.
     4037!> Interpolation of ghost-node values used as the child-domain boundary conditions. This subroutine
     4038!> handles the left and right boundaries.
     4039!--------------------------------------------------------------------------------------------------!
     4040 SUBROUTINE pmci_interp_lr( child_array, parent_array, kct, jfl, jfu, kfl, kfu, edge, var )
     4041
    40694042    IMPLICIT NONE
    40704043
     
    42934266    ENDIF
    42944267
    4295  END SUBROUTINE pmci_interp_1sto_lr
     4268 END SUBROUTINE pmci_interp_lr
    42964269
    42974270
     
    42994272! Description:
    43004273! ------------
    4301 !> @Todo: Missing subroutine description.
    4302 !--------------------------------------------------------------------------------------------------!
    4303  SUBROUTINE pmci_interp_1sto_sn( child_array, parent_array, kct, ifl, ifu, kfl, kfu, edge, var )
    4304 !
    4305 !-- Interpolation of ghost-node values used as the child-domain boundary conditions. This subroutine
    4306 !-- handles the south and north boundaries.
     4274!> Interpolation of ghost-node values used as the child-domain boundary conditions. This subroutine
     4275!> handles the south and north boundaries.
     4276!--------------------------------------------------------------------------------------------------!
     4277 SUBROUTINE pmci_interp_sn( child_array, parent_array, kct, ifl, ifu, kfl, kfu, edge, var )
     4278 
    43074279    IMPLICIT NONE
    43084280
     
    45334505    ENDIF
    45344506
    4535  END SUBROUTINE pmci_interp_1sto_sn
     4507 END SUBROUTINE pmci_interp_sn
    45364508
    45374509
     
    45394511! Description:
    45404512! ------------
    4541 !> @Todo: Missing subroutine description.
    4542 !--------------------------------------------------------------------------------------------------!
    4543  SUBROUTINE pmci_interp_1sto_t( child_array, parent_array, kct, ifl, ifu, jfl, jfu, var )
    4544 !
    4545 !-- Interpolation of ghost-node values used as the child-domain boundary conditions. This subroutine
    4546 !-- handles the top boundary.
     4513!> Interpolation of ghost-node values used as the child-domain boundary conditions. This subroutine
     4514!> handles the top boundary.
     4515!--------------------------------------------------------------------------------------------------!
     4516 SUBROUTINE pmci_interp_t( child_array, parent_array, kct, ifl, ifu, jfl, jfu, var )
     4517 
    45474518    IMPLICIT NONE
    45484519
     
    48024773    ENDIF
    48034774
    4804  END SUBROUTINE pmci_interp_1sto_t
     4775 END SUBROUTINE pmci_interp_t
    48054776
    48064777
     
    48094780! Description:
    48104781! ------------
    4811 !> @Todo: Missing subroutine description.
    4812 !--------------------------------------------------------------------------------------------------!
    4813  SUBROUTINE pmci_anterp_tophat( child_array, parent_array, kct, ifl, ifu, jfl, jfu, kfl, kfu,      &
    4814                                 ijkfc, var )
    4815 !
    4816 !-- Anterpolation of internal-node values to be used as the parent-domain values. This subroutine is
    4817 !-- based on the first-order numerical integration of the child-grid values contained within the
    4818 !-- anterpolation cell (Clark & Farley, Journal of the Atmospheric Sciences 41(3), 1984).
     4782!> Anterpolation of internal-node values of one variable to be used as the parent-domain values.
     4783!> This subroutine is based on the first-order numerical integration of the child-grid values
     4784!> contained within the anterpolation cell (Clark & Farley, Journal of the Atmospheric
     4785!> Sciences 41(3), 1984).
     4786!--------------------------------------------------------------------------------------------------!
     4787 SUBROUTINE pmci_anterp_var( child_array, parent_array, kct, ifl, ifu, jfl, jfu, kfl, kfu,         &
     4788                             ijkfc, var )
    48194789
    48204790    IMPLICIT NONE
     
    49264896    ENDDO
    49274897
    4928  END SUBROUTINE pmci_anterp_tophat
     4898 END SUBROUTINE pmci_anterp_var
    49294899
    49304900#endif
     
    51535123! Description:
    51545124! ------------
    5155 !> @Todo: Missing subroutine description.
     5125!> Adjust the volume-flow rate through the nested boundaries so that the net volume flow through
     5126!> all boundaries of the current nest domain becomes zero.
    51565127!--------------------------------------------------------------------------------------------------!
    51575128 SUBROUTINE pmci_ensure_nest_mass_conservation
    5158 
    5159 !
    5160 !-- Adjust the volume-flow rate through the nested boundaries so that the net volume flow through
    5161 !-- all boundaries of the current nest domain becomes zero.
     5129 
    51625130    IMPLICIT NONE
    51635131
     
    53825350! Description:
    53835351! ------------
    5384 !> @Todo: Missing subroutine description.
     5352!> Adjust the volume-flow rate through the top boundary so that the net volume flow through
     5353!> all boundaries of the current nest domain becomes zero.
    53855354!--------------------------------------------------------------------------------------------------!
    53865355 SUBROUTINE pmci_ensure_nest_mass_conservation_vertical
    5387 
    5388 !
    5389 !-- Adjust the volume-flow rate through the top boundary so that the net volume flow through all
    5390 !-- boundaries of the current nest domain becomes zero.
     5356 
    53915357    IMPLICIT NONE
    53925358
Note: See TracChangeset for help on using the changeset viewer.