- Timestamp:
- Nov 16, 2020 10:20:49 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/UTIL/surface_output_processing/surface_output_to_vtk.f90
r4784 r4786 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Creation of in- and output filenames simplified 28 ! 29 ! 4481 2020-03-31 18:55:54Z maronga 27 30 ! - Give path to surface data directly 28 31 ! - Remove non-used input variables 29 ! - Output 5 relevant digits for the point data in order to account also for30 ! small grid spacings32 ! - Output of 5 relevant digits rather than 1 for the point data in order 33 ! to account also for small grid spacings 31 34 ! 32 35 ! 4481 2020-03-31 18:55:54Z maronga … … 388 391 !-- string. The header information must be given in each VTK file! 389 392 IF ( f == 0 ) THEN 390 IF ( simulated_time < 10.0_wp ) THEN 391 WRITE( char_dum, '(I1)' ) INT( simulated_time ) 392 ELSEIF ( simulated_time < 100.0_wp ) THEN 393 WRITE( char_dum, '(I2)' ) INT( simulated_time ) 394 ELSEIF ( simulated_time < 1000.0_wp ) THEN 395 WRITE( char_dum, '(I3)' ) INT( simulated_time ) 396 ELSEIF ( simulated_time < 10000.0_wp ) THEN 397 WRITE( char_dum, '(I4)' ) INT( simulated_time ) 398 ELSEIF ( simulated_time < 100000.0_wp ) THEN 399 WRITE( char_dum, '(I5)' ) INT( simulated_time ) 400 ELSEIF ( simulated_time < 1000000.0_wp ) THEN 401 WRITE( char_dum, '(I6)' ) INT( simulated_time ) 402 ELSEIF ( simulated_time < 10000000.0_wp ) THEN 403 WRITE( char_dum, '(I7)' ) INT( simulated_time ) 404 ELSEIF ( simulated_time < 100000000.0_wp ) THEN 405 WRITE( char_dum, '(I8)' ) INT( simulated_time ) 406 ELSEIF ( simulated_time < 1000000000.0_wp ) THEN 407 WRITE( char_dum, '(I9)' ) INT( simulated_time ) 408 ENDIF 393 WRITE( char_dum, '(I9.0)' ) INT( simulated_time ) 394 print*, char_dum, TRIM(ADJUSTL(char_dum)) 409 395 ! 410 396 !-- Copy HEADER file and open VTK file 411 397 IF ( convert_average_data ) THEN 412 398 CALL system('cp HEADER ' // & 413 TRIM( path ) // TRIM( char_dum ) //&399 TRIM( path ) // TRIM( ADJUSTL(char_dum) ) // & 414 400 '_AV_' // 's_' // TRIM( variable_name ) // '.vtk' ) 415 416 OPEN ( file_id_out, FILE = TRIM( path ) // TRIM( char_dum ) // & 401 402 OPEN ( file_id_out, FILE = TRIM( path ) // & 403 TRIM( ADJUSTL(char_dum) ) // & 417 404 '_AV_' // 's_' // TRIM( variable_name ) // '.vtk', & 418 405 FORM='FORMATTED', POSITION = 'APPEND' ) 419 406 ELSE 420 407 CALL system('cp HEADER ' // & 421 TRIM( path ) // TRIM( char_dum ) //&408 TRIM( path ) // TRIM(ADJUSTL(char_dum)) // & 422 409 's_' // TRIM( variable_name ) // '.vtk' ) 423 424 OPEN ( file_id_out, FILE = TRIM( path ) // TRIM( char_dum ) // & 410 411 OPEN ( file_id_out, FILE = TRIM( path ) // & 412 TRIM( ADJUSTL(char_dum) ) // & 425 413 's_' // TRIM( variable_name ) // '.vtk', & 426 FORM='FORMATTED', POSITION = 'APPEND' ) 414 FORM='FORMATTED', POSITION = 'APPEND' ) 427 415 ENDIF 428 416 … … 505 493 ! 506 494 !-- Create substring for the processor id and combine all substrings. 507 IF ( f < 10 ) THEN 508 WRITE( char_dum, '(I1)') f 509 myid_char = TRIM( char_av ) // '_00000' // TRIM( char_dum ) 510 ELSEIF ( f < 100 ) THEN 511 WRITE( char_dum, '(I2)') f 512 myid_char = TRIM( char_av ) // '_0000' // TRIM( char_dum ) 513 ELSEIF ( f < 1000 ) THEN 514 WRITE( char_dum, '(I3)') f 515 myid_char = TRIM( char_av ) // '_000' // TRIM( char_dum ) 516 ELSEIF ( f < 10000 ) THEN 517 WRITE( char_dum, '(I4)') f 518 myid_char = TRIM( char_av ) // '_00' // TRIM( char_dum ) 519 ELSEIF ( f < 100000 ) THEN 520 WRITE( char_dum, '(I5)') f 521 myid_char = TRIM( char_av ) // '_0' // TRIM( char_dum ) 522 ELSEIF ( f < 1000000 ) THEN 523 WRITE( char_dum, '(I6)') f 524 myid_char = TRIM( char_av ) // '_' // TRIM( char_dum ) 525 ENDIF 526 495 WRITE( char_dum, '(I6.6)') f 496 myid_char = TRIM( char_av ) // '_' // TRIM( char_dum ) 497 527 498 END SUBROUTINE surface_output_create_file_string 528 499 529 500 END PROGRAM surface_output_to_vtk 530 501
Note: See TracChangeset
for help on using the changeset viewer.