Ignore:
Timestamp:
Jul 29, 2019 1:31:44 PM (5 years ago)
Author:
suehring
Message:

Enable netcdf parallel input for lateral boundary conditions in dynamic input file

File:
1 edited

Legend:

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

    r4079 r4125  
    2525! -----------------
    2626! $Id$
     27! In order to enable netcdf parallel access, allocate dummy arrays for the
     28! lateral boundary data on cores that actually do not belong to these
     29! boundaries.
     30!
     31! 4079 2019-07-09 18:04:41Z suehring
    2732! - Set boundary condition for w at nzt+1 at the lateral boundaries, even
    2833!   though these won't enter the numerical solution. However, due to the mass
     
    11971202       ALLOCATE( nest_offl%vg(0:1,1:nzt) )
    11981203!
    1199 !--    Allocate arrays for reading boundary values. Arrays will incorporate 2
    1200 !--    time levels in order to interpolate in between.
     1204!--    Allocate arrays for reading left/right boundary values. Arrays will
     1205!--    incorporate 2  time levels in order to interpolate in between. If the core has
     1206!--    no boundary, allocate a dummy array, in order to enable netcdf parallel
     1207!--    access. Dummy arrays will be allocated with dimension length zero.
    12011208       IF ( bc_dirichlet_l )  THEN
    12021209          ALLOCATE( nest_offl%u_left(0:1,nzb+1:nzt,nys:nyn)  )
     
    12071214          IF ( air_chemistry )  ALLOCATE( nest_offl%chem_left(0:1,nzb+1:nzt,nys:nyn,&
    12081215                                          1:UBOUND( chem_species, 1 )) )
     1216       ELSE
     1217          ALLOCATE( nest_offl%u_left(1:1,1:1,1:1)  )
     1218          ALLOCATE( nest_offl%v_left(1:1,1:1,1:1)  )
     1219          ALLOCATE( nest_offl%w_left(1:1,1:1,1:1)  )
     1220          IF ( humidity )       ALLOCATE( nest_offl%q_left(1:1,1:1,1:1)  )
     1221          IF ( .NOT. neutral )  ALLOCATE( nest_offl%pt_left(1:1,1:1,1:1)  )
     1222          IF ( air_chemistry )  ALLOCATE( nest_offl%chem_left(1:1,1:1,1:1,     &
     1223                                          1:UBOUND( chem_species, 1 )) )
    12091224       ENDIF
    12101225       IF ( bc_dirichlet_r )  THEN
     
    12161231          IF ( air_chemistry )  ALLOCATE( nest_offl%chem_right(0:1,nzb+1:nzt,nys:nyn,&
    12171232                                          1:UBOUND( chem_species, 1 )) )
    1218        ENDIF
     1233       ELSE
     1234          ALLOCATE( nest_offl%u_right(1:1,1:1,1:1)  )
     1235          ALLOCATE( nest_offl%v_right(1:1,1:1,1:1)  )
     1236          ALLOCATE( nest_offl%w_right(1:1,1:1,1:1)  )
     1237          IF ( humidity )       ALLOCATE( nest_offl%q_right(1:1,1:1,1:1)  )
     1238          IF ( .NOT. neutral )  ALLOCATE( nest_offl%pt_right(1:1,1:1,1:1)  )
     1239          IF ( air_chemistry )  ALLOCATE( nest_offl%chem_right(1:1,1:1,1:1,    &
     1240                                          1:UBOUND( chem_species, 1 )) )
     1241       ENDIF
     1242!
     1243!--    Allocate arrays for reading north/south boundary values. Arrays will
     1244!--    incorporate 2  time levels in order to interpolate in between. If the core has
     1245!--    no boundary, allocate a dummy array, in order to enable netcdf parallel
     1246!--    access. Dummy arrays will be allocated with dimension length zero.
    12191247       IF ( bc_dirichlet_n )  THEN
    12201248          ALLOCATE( nest_offl%u_north(0:1,nzb+1:nzt,nxlu:nxr) )
     
    12251253          IF ( air_chemistry )  ALLOCATE( nest_offl%chem_north(0:1,nzb+1:nzt,nxl:nxr,&
    12261254                                          1:UBOUND( chem_species, 1 )) )
     1255       ELSE
     1256          ALLOCATE( nest_offl%u_north(1:1,1:1,1:1)  )
     1257          ALLOCATE( nest_offl%v_north(1:1,1:1,1:1)  )
     1258          ALLOCATE( nest_offl%w_north(1:1,1:1,1:1)  )
     1259          IF ( humidity )       ALLOCATE( nest_offl%q_north(1:1,1:1,1:1)  )
     1260          IF ( .NOT. neutral )  ALLOCATE( nest_offl%pt_north(1:1,1:1,1:1)  )
     1261          IF ( air_chemistry )  ALLOCATE( nest_offl%chem_north(1:1,1:1,1:1,    &
     1262                                          1:UBOUND( chem_species, 1 )) )
    12271263       ENDIF
    12281264       IF ( bc_dirichlet_s )  THEN
     
    12341270          IF ( air_chemistry )  ALLOCATE( nest_offl%chem_south(0:1,nzb+1:nzt,nxl:nxr,&
    12351271                                          1:UBOUND( chem_species, 1 )) )
    1236        ENDIF
    1237        
     1272       ELSE
     1273          ALLOCATE( nest_offl%u_south(1:1,1:1,1:1)  )
     1274          ALLOCATE( nest_offl%v_south(1:1,1:1,1:1)  )
     1275          ALLOCATE( nest_offl%w_south(1:1,1:1,1:1)  )
     1276          IF ( humidity )       ALLOCATE( nest_offl%q_south(1:1,1:1,1:1)  )
     1277          IF ( .NOT. neutral )  ALLOCATE( nest_offl%pt_south(1:1,1:1,1:1)  )
     1278          IF ( air_chemistry )  ALLOCATE( nest_offl%chem_south(1:1,1:1,1:1,    &
     1279                                          1:UBOUND( chem_species, 1 )) )
     1280       ENDIF
     1281!
     1282!--    Allocate arrays for reading data at the top boundary. In contrast to the
     1283!--    lateral boundaries, every core reads these data so that no dummy
     1284!--    arrays need to be allocated.
    12381285       ALLOCATE( nest_offl%u_top(0:1,nys:nyn,nxlu:nxr) )
    12391286       ALLOCATE( nest_offl%v_top(0:1,nysv:nyn,nxl:nxr) )
Note: See TracChangeset for help on using the changeset viewer.