Ignore:
Timestamp:
May 15, 2019 11:02:34 AM (6 years ago)
Author:
hellstea
Message:

Child initialization extended to the redundant ghost points behind the nest boundaries

File:
1 edited

Legend:

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

    r3948 r3976  
    2525! -----------------
    2626! $Id$
     27! Child initialization also for the redundant ghost points behind the nested
     28! boundaries added (2nd and 3rd ghost-point layers and corners).
     29!
     30! 3948 2019-05-03 14:49:57Z hellstea
    2731! Some variables renamed, a little cleaning up and some commenting improvements
    2832!
     
    28782882!--    Local variables:
    28792883       INTEGER(iwp) ::  ic        !< Running child-grid index in the x-direction
     2884       INTEGER(iwp) ::  icb       !< Index pointing to the first redundant ghost point layer behind the actual boundary
     2885                                  !< ghost point layer in the x-direction
     2886       INTEGER(iwp) ::  icbc      !< Index pointing to the boundary ghost point layer in the x-direction
    28802887       INTEGER(iwp) ::  icfirst   !< Leftmost child-grid index initialized by the main loops (usually icfirst == icl_init)
    28812888       INTEGER(iwp) ::  iclast    !< Rightmost child-grid index initialized by the main loops (usually iclast == icr_init)
     
    28832890       INTEGER(iwp) ::  icr_init  !< Right child-grid index bound for initialization in the x-direction
    28842891       INTEGER(iwp) ::  jc        !< Running child-grid index in the y-direction
     2892       INTEGER(iwp) ::  jcb       !< Index pointing to the first redundant ghost point layer behind the actual boundary
     2893                                  !< ghost point layer in the y-direction
     2894       INTEGER(iwp) ::  jcbc      !< Index pointing to the boundary ghost point layer in the y-direction
    28852895       INTEGER(iwp) ::  jcfirst   !< Southmost child-grid index initialized by the main loops (usually jcfirst == jcs_init)
    28862896       INTEGER(iwp) ::  jclast    !< Northmost child-grid index initialized by the main loops (usually jclast == jcn_init)
     
    29062916       jcn_init = nyn
    29072917
     2918       icbc = -1
     2919       icb  = -2
     2920       jcbc = -1
     2921       jcb  = -2
     2922       IF ( var == 'u' )  THEN
     2923          icbc =  0
     2924          icb  = -1
     2925       ELSE IF ( var == 'v' )  THEN
     2926          jcbc =  0
     2927          jcb  = -1
     2928       ENDIF
     2929       
    29082930       IF ( nesting_mode /= 'vertical' )  THEN
    29092931          IF ( bc_dirichlet_l )  THEN
     
    30303052          ENDDO
    30313053
    3032        ENDIF  ! var
     3054       ENDIF  ! var 
    30333055!
    30343056!--    If the number of grid points in child subdomain in x- or y-direction
     
    30553077             child_array(:,jc,:) = child_array(:,jclast,:)
    30563078          ENDDO
     3079       ENDIF
     3080!
     3081!--    Finally, make sure that also the redundant 2nd and 3rd ghost-node layers
     3082!--    including the corners are properly filled up.
     3083       IF ( nys == 0 )  THEN
     3084          DO  jc = -nbgp, jcb  ! jcb = -2 if var == v, else jcb = -1
     3085             child_array(0:nzt+1,jc,nxlg:nxrg) = child_array(0:nzt+1,jcbc,nxlg:nxrg)
     3086          ENDDO         
     3087       ENDIF
     3088       IF ( nyn == ny )  THEN
     3089          DO  jc = ny+2, ny+nbgp
     3090             child_array(0:nzt+1,jc,nxlg:nxrg) = child_array(0:nzt+1,ny+1,nxlg:nxrg)
     3091          ENDDO
     3092       ENDIF
     3093       IF ( nxl == 0 )  THEN
     3094          DO  ic = -nbgp, icb  ! icb = -2 if var == u, else icb = -1
     3095             child_array(0:nzt+1,nysg:nyng,ic) = child_array(0:nzt+1,nysg:nyng,icbc)
     3096          ENDDO         
     3097       ENDIF
     3098       IF ( nxr == nx )  THEN
     3099          DO  ic = nx+2, nx+nbgp
     3100             child_array(0:nzt+1,nysg:nyng,ic) = child_array(0:nzt+1,nysg:nyng,nx+1)
     3101          ENDDO   
    30573102       ENDIF
    30583103
Note: See TracChangeset for help on using the changeset viewer.