Changeset 1327 for palm/trunk/SOURCE/check_open.f90
- Timestamp:
- Mar 21, 2014 11:00:16 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/check_open.f90
r1321 r1327 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! parts concerning iso2d and avs output removed 23 23 ! 24 24 ! Former revisions: … … 76 76 77 77 USE control_parameters, & 78 ONLY: avs_data_file, avs_output, coupling_char, & 79 data_output_2d_on_each_pe, do3d_compress, host, iso2d_output, & 78 ONLY: avs_data_file, coupling_char, data_output_2d_on_each_pe, host, & 80 79 message_string, mid, netcdf_data_format, nz_do3d, openfile, & 81 80 return_addres, return_username, run_description_header, runnr … … 231 230 ENDIF 232 231 233 CASE ( 27, 28, 29, 31, 3 2, 33, 71:73, 90:99 )232 CASE ( 27, 28, 29, 31, 33, 71:73, 90:99 ) 234 233 235 234 ! … … 372 371 DEALLOCATE( eta, ho, hu ) 373 372 374 !375 !-- Create output file for local parameters376 IF ( iso2d_output ) THEN377 OPEN ( 27, FILE='PLOT2D_XY_LOCAL'//coupling_char, &378 FORM='FORMATTED', DELIM='APOSTROPHE' )379 openfile(27)%opened = .TRUE.380 ENDIF381 382 373 ENDIF 383 374 … … 400 391 ENDIF 401 392 ! 402 !-- Determine and write ISO2D coordi ante header393 !-- Determine and write ISO2D coordinate header 403 394 ALLOCATE( eta(0:nz+1), ho(0:nx+1), hu(0:nx+1) ) 404 395 hu = 0.0 … … 412 403 WRITE (22) dx,eta,hu,ho 413 404 DEALLOCATE( eta, ho, hu ) 414 !415 !-- Create output file for local parameters416 OPEN ( 28, FILE='PLOT2D_XZ_LOCAL'//coupling_char, &417 FORM='FORMATTED', DELIM='APOSTROPHE' )418 openfile(28)%opened = .TRUE.419 405 420 406 ENDIF … … 450 436 WRITE (23) dx,eta,hu,ho 451 437 DEALLOCATE( eta, ho, hu ) 452 !453 !-- Create output file for local parameters454 OPEN ( 29, FILE='PLOT2D_YZ_LOCAL'//coupling_char, &455 FORM='FORMATTED', DELIM='APOSTROPHE' )456 openfile(29)%opened = .TRUE.457 438 458 439 ENDIF … … 468 449 ! 469 450 !-- Specifications for combine_plot_fields 470 IF ( .NOT. do3d_compress ) THEN 471 WRITE ( 30 ) -nbgp,nx+nbgp,-nbgp,ny+nbgp, 0 ,nz_do3d 472 WRITE ( 30 ) 0,nx+1,0,ny+1,0,nz_do3d 473 ENDIF 451 WRITE ( 30 ) -nbgp,nx+nbgp,-nbgp,ny+nbgp, 0 ,nz_do3d 452 WRITE ( 30 ) 0,nx+1,0,ny+1,0,nz_do3d 474 453 #endif 475 !476 !-- Write coordinate file for AVS:477 !-- First determine file names (including cyle numbers) of AVS files on478 !-- target machine (to which the files are to be transferred).479 !-- Therefore path information has to be obtained first.480 IF ( avs_output ) THEN481 iaddres = LEN_TRIM( return_addres )482 iusern = LEN_TRIM( return_username )483 484 OPEN ( 3, FILE='OUTPUT_FILE_CONNECTIONS', FORM='FORMATTED' )485 DO WHILE ( .NOT. avs_coor_file_found .OR. &486 .NOT. avs_data_file_found )487 488 READ ( 3, '(A)', END=1 ) line489 490 SELECT CASE ( line(1:11) )491 492 CASE ( 'PLOT3D_COOR' )493 READ ( 3, '(A/A)' ) avs_coor_file_catalog, &494 avs_coor_file_localname495 avs_coor_file_found = .TRUE.496 497 CASE ( 'PLOT3D_DATA' )498 READ ( 3, '(A/A)' ) avs_data_file_catalog, &499 avs_data_file_localname500 avs_data_file_found = .TRUE.501 502 CASE DEFAULT503 READ ( 3, '(A/A)' ) line, line504 505 END SELECT506 507 ENDDO508 !509 !-- Now the cycle numbers on the remote machine must be obtained510 !-- using batch_scp511 1 CLOSE ( 3 )512 IF ( .NOT. avs_coor_file_found .OR. &513 .NOT. avs_data_file_found ) THEN514 message_string= 'no filename for AVS-data-file ' // &515 'found in MRUN-config-file' // &516 ' &filename in FLD-file set to "unknown"'517 CALL message( 'check_open', 'PA0169', 0, 1, 0, 6, 0 )518 519 avs_coor_file = 'unknown'520 avs_data_file = 'unknown'521 ELSE522 get_filenames = .TRUE.523 IF ( TRIM( host ) == 'hpmuk' .OR. &524 TRIM( host ) == 'lcmuk' ) THEN525 batch_scp = '/home/raasch/pub/batch_scp'526 ELSEIF ( TRIM( host ) == 'nech' ) THEN527 batch_scp = '/ipf/b/b323011/pub/batch_scp'528 ELSEIF ( TRIM( host ) == 'ibmh' .OR. &529 TRIM( host ) == 'ibmb' ) THEN530 batch_scp = '/home/h/niksiraa/pub/batch_scp'531 ELSEIF ( TRIM( host ) == 't3eb' ) THEN532 batch_scp = '/home/nhbksira/pub/batch_scp'533 ELSE534 message_string= 'no path for batch_scp on host "' // &535 TRIM( host ) // '"'536 CALL message( 'check_open', 'PA0170', 0, 1, 0, 6, 0 )537 get_filenames = .FALSE.538 ENDIF539 540 IF ( get_filenames ) THEN541 !542 !-- Determine the coordinate file name.543 !-- /etc/passwd serves as Dummy-Datei, because it is not544 !-- really transferred.545 command = TRIM( batch_scp ) // ' -n -u ' // &546 return_username(1:iusern) // ' ' // &547 return_addres(1:iaddres) // ' /etc/passwd "' // &548 TRIM( avs_coor_file_catalog ) // '" ' // &549 TRIM( avs_coor_file_localname ) // ' > REMOTE_FILENAME'550 551 CALL local_system( command )552 OPEN ( 3, FILE='REMOTE_FILENAME', FORM='FORMATTED' )553 READ ( 3, '(A)' ) avs_coor_file554 CLOSE ( 3 )555 !556 !-- Determine the data file name557 command = TRIM( batch_scp ) // ' -n -u ' // &558 return_username(1:iusern) // ' ' // &559 return_addres(1:iaddres) // ' /etc/passwd "' // &560 TRIM( avs_data_file_catalog ) // '" ' // &561 TRIM( avs_data_file_localname ) // ' > REMOTE_FILENAME'562 563 CALL local_system( command )564 OPEN ( 3, FILE='REMOTE_FILENAME', FORM='FORMATTED' )565 READ ( 3, '(A)' ) avs_data_file566 CLOSE ( 3 )567 568 ELSE569 570 avs_coor_file = 'unknown'571 avs_data_file = 'unknown'572 573 ENDIF574 575 ENDIF576 577 !578 !-- Output of the coordinate file description for FLD-file579 OPEN ( 33, FILE='PLOT3D_FLD_COOR', FORM='FORMATTED' )580 openfile(33)%opened = .TRUE.581 WRITE ( 33, 3300 ) TRIM( avs_coor_file ), &582 TRIM( avs_coor_file ), (nx+2*nbgp)*4, &583 TRIM( avs_coor_file ), (nx+2*nbgp)*4+(ny+2*nbgp)*4584 585 586 ALLOCATE( xkoor(0:nx+1), ykoor(0:ny+1), zkoor(0:nz_do3d) )587 DO i = 0, nx+1588 xkoor(i) = i * dx589 ENDDO590 DO j = 0, ny+1591 ykoor(j) = j * dy592 ENDDO593 DO k = 0, nz_do3d594 zkoor(k) = zu(k)595 ENDDO596 597 !598 !-- Create and write on AVS coordinate file599 OPEN ( 31, FILE='PLOT3D_COOR', FORM='UNFORMATTED' )600 openfile(31)%opened = .TRUE.601 602 WRITE (31) xkoor, ykoor, zkoor603 DEALLOCATE( xkoor, ykoor, zkoor )604 605 !606 !-- Create FLD file (being written on in close_file)607 OPEN ( 32, FILE='PLOT3D_FLD', FORM='FORMATTED' )608 openfile(32)%opened = .TRUE.609 610 !611 !-- Create flag file for compressed 3D output,612 !-- influences output commands in mrun613 IF ( do3d_compress ) THEN614 OPEN ( 3, FILE='PLOT3D_COMPRESSED', FORM='FORMATTED' )615 WRITE ( 3, '(1X)' )616 CLOSE ( 3 )617 ENDIF618 619 ENDIF620 621 ENDIF622 623 !624 !-- In case of data compression output of the coordinates of the625 !-- corresponding partial array of a PE only once at the top of the file626 IF ( avs_output .AND. do3d_compress ) THEN627 WRITE ( 30 ) nxlg, nxrg, nysg, nyng, nzb, nz_do3d628 454 ENDIF 629 455
Note: See TracChangeset
for help on using the changeset viewer.