Ignore:
Timestamp:
Nov 25, 2008 7:12:43 AM (13 years ago)
Author:
raasch
Message:

reading mechanism for restart files completely revised

File:
1 edited

Legend:

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

    r211 r216  
    1  SUBROUTINE user_read_restart_data( nxlc, nxlf, nxl_on_file, nxrc, nxrf,  &
    2                                     nxr_on_file, nync, nynf, nyn_on_file, &
    3                                     nysc, nysf, nys_on_file, tmp_2d, tmp_3d )
     1 SUBROUTINE user_read_restart_data( nxlfa, nxl_on_file, nxrfa, nxr_on_file, &
     2                                    nynfa, nyn_on_file, nysfa, nys_on_file, &
     3                                    offset_xa, offset_ya, overlap_count,    &
     4                                    tmp_2d, tmp_3d )
    45
    56!------------------------------------------------------------------------------!
    67! Actual revisions:
    78! -----------------
    8 ! Former file user_interface.f90 split into one file per subroutine
     9! reading mechanism revised (subdomain/total domain size can vary arbitrarily
     10! between current and previous run),
     11! former file user_interface.f90 split into one file per subroutine
    912!
    1013! Former revisions:
     
    3033    CHARACTER (LEN=20) :: field_char
    3134
    32     INTEGER ::  nxlc, nxlf, nxl_on_file, nxrc, nxrf, nxr_on_file, nync, nynf, &
    33                 nyn_on_file, nysc, nysf, nys_on_file
     35    INTEGER ::  k, nxlc, nxlf, nxl_on_file, nxrc, nxrf, nxr_on_file, nync, &
     36                nynf, nyn_on_file, nysc, nysf, nys_on_file, overlap_count
     37
     38    INTEGER, DIMENSION(numprocs_previous_run,1000) ::  nxlfa, nxrfa, nynfa, &
     39                                                       nysfa, offset_xa, &
     40                                                       offset_ya
    3441
    3542    REAL, DIMENSION(nys_on_file-1:nyn_on_file+1,nxl_on_file-1:nxr_on_file+1) ::&
     
    4855!       DO  WHILE ( TRIM( field_char ) /= '*** end user ***' )
    4956!
    50 !          SELECT CASE ( TRIM( field_char ) )
     57!          DO  k = 1, overlap_count
    5158!
    52 !             CASE ( 'u2_av' )
    53 !                IF ( .NOT. ALLOCATED( u2_av ) ) THEN
    54 !                   ALLOCATE( u2_av(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) )
    55 !                ENDIF
    56 !                READ ( 13 )  tmp_3d
    57 !                u2_av(:,nysc-1:nync+1,nxlc-1:nxrc+1) = &
     59!             nxlf = nxlfa(i,k)
     60!             nxlc = nxlfa(i,k) + offset_xa(i,k)
     61!             nxrf = nxrfa(i,k)
     62!             nxrc = nxrfa(i,k) + offset_xa(i,k)
     63!             nysf = nysfa(i,k)
     64!             nysc = nysfa(i,k) + offset_ya(i,k)
     65!             nynf = nynfa(i,k)
     66!             nync = nynfa(i,k) + offset_ya(i,k)
     67!
     68!
     69!             SELECT CASE ( TRIM( field_char ) )
     70!
     71!                CASE ( 'u2_av' )
     72!                   IF ( .NOT. ALLOCATED( u2_av ) ) THEN
     73!                      ALLOCATE( u2_av(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) )
     74!                   ENDIF
     75!                   IF ( k == 1 )  READ ( 13 )  tmp_3d
     76!                   u2_av(:,nysc-1:nync+1,nxlc-1:nxrc+1) = &
    5877!                                          tmp_3d(:,nysf-1:nynf+1,nxlf-1:nxrf+1)
    5978!
    60 !             CASE DEFAULT
    61 !                PRINT*, '+++ user_init: unknown variable named "', &
    62 !                        TRIM( field_char ), '" found in'
    63 !                PRINT*, '               data from prior run on PE ', myid
    64 !                CALL local_stop
     79!                CASE DEFAULT
     80!                   PRINT*, '+++ user_init: unknown variable named "', &
     81!                           TRIM( field_char ), '" found in'
     82!                   PRINT*, '               data from prior run on PE ', myid
     83!                   CALL local_stop
    6584!
    66 !          END SELECT
     85!             END SELECT
     86!
     87!          ENDDO
    6788!
    6889!          READ ( 13 )  field_char
Note: See TracChangeset for help on using the changeset viewer.