SUBROUTINE user_read_restart_data( nxlfa, nxl_on_file, nxrfa, nxr_on_file, & nynfa, nyn_on_file, nysfa, nys_on_file, & offset_xa, offset_ya, overlap_count, & tmp_2d, tmp_3d ) !------------------------------------------------------------------------------! ! Actual revisions: ! ----------------- ! reading mechanism revised (subdomain/total domain size can vary arbitrarily ! between current and previous run), ! former file user_interface.f90 split into one file per subroutine ! ! Former revisions: ! ----------------- ! $Id: user_read_restart_data.f90 216 2008-11-25 07:12:43Z raasch $ ! ! Description: ! ------------ ! Reading restart data from file(s) ! Subdomain index limits on file are given by nxl_on_file, etc. ! Indices nxlc, etc. indicate the range of gridpoints to be mapped from the ! subdomain on file (f) to the subdomain of the current PE (c). They have been ! calculated in routine read_3d_binary. !------------------------------------------------------------------------------! USE control_parameters USE indices USE pegrid USE user IMPLICIT NONE CHARACTER (LEN=20) :: field_char INTEGER :: k, nxlc, nxlf, nxl_on_file, nxrc, nxrf, nxr_on_file, nync, & nynf, nyn_on_file, nysc, nysf, nys_on_file, overlap_count INTEGER, DIMENSION(numprocs_previous_run,1000) :: nxlfa, nxrfa, nynfa, & nysfa, offset_xa, & offset_ya REAL, DIMENSION(nys_on_file-1:nyn_on_file+1,nxl_on_file-1:nxr_on_file+1) ::& tmp_2d REAL, DIMENSION(nzb:nzt+1,nys_on_file-1:nyn_on_file+1, & nxl_on_file-1:nxr_on_file+1) :: & tmp_3d ! !-- Here the reading of user-defined restart data follows: !-- Sample for user-defined output ! ! IF ( initializing_actions == 'read_restart_data' ) THEN ! READ ( 13 ) field_char ! DO WHILE ( TRIM( field_char ) /= '*** end user ***' ) ! ! DO k = 1, overlap_count ! ! nxlf = nxlfa(i,k) ! nxlc = nxlfa(i,k) + offset_xa(i,k) ! nxrf = nxrfa(i,k) ! nxrc = nxrfa(i,k) + offset_xa(i,k) ! nysf = nysfa(i,k) ! nysc = nysfa(i,k) + offset_ya(i,k) ! nynf = nynfa(i,k) ! nync = nynfa(i,k) + offset_ya(i,k) ! ! ! SELECT CASE ( TRIM( field_char ) ) ! ! CASE ( 'u2_av' ) ! IF ( .NOT. ALLOCATED( u2_av ) ) THEN ! ALLOCATE( u2_av(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) ) ! ENDIF ! IF ( k == 1 ) READ ( 13 ) tmp_3d ! u2_av(:,nysc-1:nync+1,nxlc-1:nxrc+1) = & ! tmp_3d(:,nysf-1:nynf+1,nxlf-1:nxrf+1) ! ! CASE DEFAULT ! PRINT*, '+++ user_init: unknown variable named "', & ! TRIM( field_char ), '" found in' ! PRINT*, ' data from prior run on PE ', myid ! CALL local_stop ! ! END SELECT ! ! ENDDO ! ! READ ( 13 ) field_char ! ! ENDDO ! ENDIF END SUBROUTINE user_read_restart_data