SUBROUTINE user_read_restart_data( nxlc, nxlf, nxl_on_file, nxrc, nxrf, & nxr_on_file, nync, nynf, nyn_on_file, & nysc, nysf, nys_on_file, tmp_2d, tmp_3d ) !------------------------------------------------------------------------------! ! Actual revisions: ! ----------------- ! Former file user_interface.f90 split into one file per subroutine ! ! Former revisions: ! ----------------- ! $Id: user_read_restart_data.f90 211 2008-11-11 04:46:24Z 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 :: nxlc, nxlf, nxl_on_file, nxrc, nxrf, nxr_on_file, nync, nynf, & nyn_on_file, nysc, nysf, nys_on_file 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 ***' ) ! ! 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 ! 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 ! ! READ ( 13 ) field_char ! ! ENDDO ! ENDIF END SUBROUTINE user_read_restart_data