Ignore:
Timestamp:
Nov 16, 2012 3:28:04 PM (8 years ago)
Author:
raasch
Message:

bugfix for mg-solver

File:
1 edited

Legend:

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

    r1042 r1056  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! Indices for arrays n.._mg start from zero due to definition of arrays f2 and
     23! p2 as automatic arrays in recursive subroutine next_mg_level
    2324!
    2425! Former revisions:
     
    860861       ENDIF
    861862
    862        ALLOCATE( grid_level_count(maximum_grid_level),                   &
    863                  nxl_mg(maximum_grid_level), nxr_mg(maximum_grid_level), &
    864                  nyn_mg(maximum_grid_level), nys_mg(maximum_grid_level), &
    865                  nzt_mg(maximum_grid_level) )
     863       ALLOCATE( grid_level_count(maximum_grid_level),                       &
     864                 nxl_mg(0:maximum_grid_level), nxr_mg(0:maximum_grid_level), &
     865                 nyn_mg(0:maximum_grid_level), nys_mg(0:maximum_grid_level), &
     866                 nzt_mg(0:maximum_grid_level) )
    866867
    867868       grid_level_count = 0
     869!
     870!--    Index zero required as dummy due to definition of arrays f2 and p2 in
     871!--    recursive subroutine next_mg_level
     872       nxl_mg(0) = 0; nxr_mg(0) = 0; nyn_mg(0) = 0; nys_mg(0) = 0; nzt_mg(0) = 0
    868873
    869874       nxl_l = nxl; nxr_l = nxr; nys_l = nys; nyn_l = nyn; nzt_l = nzt
Note: See TracChangeset for help on using the changeset viewer.