SUBROUTINE print_1d !------------------------------------------------------------------------------! ! Current revisions: ! ----------------- ! ! ! Former revisions: ! ----------------- ! $Id: print_1d.f90 484 2010-02-05 07:36:54Z franke $ ! RCS Log replace by Id keyword, revision history cleaned up ! ! Revision 1.11 2006/02/23 12:50:43 raasch ! Preliminary no output of time-averaged data ! ! Revision 1.1 1997/09/19 07:45:22 raasch ! Initial revision ! ! ! Description: ! ------------ ! List output of 1D-profiles. !------------------------------------------------------------------------------! USE arrays_3d USE control_parameters USE cpulog USE indices USE interfaces USE pegrid USE statistics IMPLICIT NONE CHARACTER (LEN=20) :: period_chr INTEGER :: k, sr ! !-- If required, compute statistics. IF ( .NOT. flow_statistics_called ) CALL flow_statistics ! !-- Flow_statistics has its own cpu-time measuring. CALL cpu_log( log_point(18), 'print_1d', 'start' ) IF ( myid == 0 ) THEN ! !-- Open file for list output of profiles. CALL check_open( 16 ) ! !-- Prepare header. period_chr = ' no time-average!' ! !-- Output for the total domain (and each subregion, if applicable). DO sr = 0, statistic_regions ! !-- Write header. WRITE ( 16, 112 ) WRITE ( 16, 100 ) TRIM( run_description_header ) // ' ' // & TRIM( region( sr ) ), TRIM( period_chr ), 'uv' WRITE ( 16, 105 ) TRIM( simulated_time_chr ) ! ELSE ! WRITE ( 16, 106 ) TRIM( simulated_time_chr ), & ! averaging_interval_pr, average_count_pr ! ENDIF WRITE ( 16, 111 ) ! !-- Output of values on the scalar levels. WRITE ( 16, 120 ) WRITE ( 16, 111 ) DO k = nzt+1, nzb, -1 WRITE ( 16, 121) k, zu(k), hom(k,1,1,sr), & hom(k,1,1,sr) - hom(k,1,5,sr), & hom(k,1,2,sr), & hom(k,1,2,sr) - hom(k,1,6,sr), & hom(k,1,4,sr), & hom(k,1,4,sr) - hom(k,1,7,sr), & hom(k,1,8,sr), hom(k,1,9,sr), & hom(k,1,10,sr), hom(k,1,11,sr), zu(k), k ENDDO WRITE ( 16, 111 ) WRITE ( 16, 120 ) WRITE ( 16, 111 ) ! !-- Output of values on the w-levels. WRITE ( 16, 112 ) WRITE ( 16, 100 ) TRIM( run_description_header ) // ' ' // & TRIM( region( sr ) ), TRIM( period_chr ), 'w' WRITE ( 16, 105 ) TRIM( simulated_time_chr ) ! ELSE ! WRITE ( 16, 106 ) TRIM( simulated_time_chr ), & ! averaging_interval_pr, average_count_pr ! ENDIF WRITE ( 16, 111 ) WRITE ( 16, 130 ) WRITE ( 16, 111 ) DO k = nzt+1, nzb, -1 WRITE ( 16, 131) k, zw(k), hom(k,1,16,sr), & hom(k,1,18,sr), hom(k,1,12,sr), & hom(k,1,19,sr), hom(k,1,14,sr), & hom(k,1,20,sr), zw(k), k ENDDO WRITE ( 16, 111 ) WRITE ( 16, 130 ) WRITE ( 16, 111 ) ENDDO ENDIF CALL cpu_log( log_point(18), 'print_1d','stop', 'nobarrier' ) ! !-- Formats. 100 FORMAT (1X,A/1X,10('-')/ & ' Horizontally',A,' averaged profiles on the ',A,'-level') 105 FORMAT (' Time: ',A) 106 FORMAT (' Time: ',A,18X,'averaged over',F7.1,' s (',I4, & ' Single times)') 111 FORMAT (1X,131('-')) 112 FORMAT (/) 120 FORMAT (' k zu u du v dv pt dpt ', & 'e Km Kh l zu k') 121 FORMAT (1X,I4,1X,F7.1,1X,F6.2,1X,F5.2,1X,F6.2,1X,F5.2,2X,F6.2,1X,F5.2, & 1X,F6.4,1X,F5.2,1X,F5.2,1X,F6.2,1X,F7.1,2X,I4) 130 FORMAT (' k zw w''pt'' wpt w''u'' wu ', & ' w''v'' wv zw k') 131 FORMAT (1X,I4,1X,F7.1,6(1X,E9.3),1X,F7.1,2X,I4) END SUBROUTINE print_1d