Changeset 48 for palm/trunk/SOURCE
- Timestamp:
- Mar 6, 2007 12:28:36 PM (18 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/CURRENT_MODIFICATIONS
r46 r48 4 4 new d3par-parameter netcdf_64bit_3d to switch on 64bit offset only for 3D files 5 5 6 new initializing action "by_user" calls user_init_3d_model and allows the 7 initial setting of all 3d arrays 6 new initializing action "by_user" calls user_init_3d_model and allows the initial setting of all 3d arrays 8 7 9 check_open, check_parameters, header, init_3d_model, modules, parin, user_interface 8 topography height informations are stored on arrays zu_s_inner and zw_w_inner and output to the 2d/3d NetCDF files 9 10 samples added to the user interface which show how to add user-define time series quantities. 11 12 check_open, check_parameters, header, init_3d_model, modules, netcdf, parin, user_interface 10 13 11 14 … … 14 17 15 18 Move call of user_actions( 'after_integration' ) below increment of times 16 and counters 19 and counters. user_actions is now called for each statistic region and has as an argument the number of the respective region (sr) 17 20 18 time_integration 21 d3par-parameter data_output_ts removed. Timeseries output for "profil" removed. Timeseries are now switched on by dt_dots. Timeseries data is collected in flow_statistics. 22 23 check_parameters, data_output_ts, flow_statistics, init_3d_model, modules, parin, time_integration 19 24 20 25 … … 24 29 Bugfix: preset of tendencies te_em, te_um, te_vm in init_1d_model 25 30 31 in Makefile, default suffixes removed from the suffix list to avoid calling of m2c in 32 # case of .mod files 33 34 Makefile 26 35 init_1d_model -
palm/trunk/SOURCE/Makefile
r3 r48 4 4 # Actual revisions: 5 5 # ----------------- 6 # 6 # default suffixes removed from the suffix list to avoid calling of m2c in 7 # case of .mod files 7 8 # 8 9 # Former revisions: … … 93 94 LDFLAGS = 94 95 95 .SUFFIXES: $(SUFFIXES) .f90 96 97 .SUFFIXES: 98 .SUFFIXES: .o .f90 96 99 97 100 -
palm/trunk/SOURCE/check_parameters.f90
r46 r48 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! "by_user" allowed as initializing action 6 ! "by_user" allowed as initializing action, -data_output_ts 7 7 ! 8 8 ! Former revisions: … … 1681 1681 ENDIF 1682 1682 1683 !1684 !-- Determine parameters for time series output and check whether permissible1685 i = 01686 DO WHILE ( data_output_ts(i+1) /= ' ' .AND. i+1 <= 100 )1687 1688 dots_n = dots_n + 11689 i = i + 11690 !1691 !-- Check whether time series is permissible and determine internal number1692 SELECT CASE ( TRIM( data_output_ts(i) ) )1693 1694 CASE ( 'E' )1695 dots_index(i) = 11696 CASE ( 'E*' )1697 dots_index(i) = 21698 CASE ( 'dt' )1699 dots_index(i) = 31700 CASE ( 'u*' )1701 dots_index(i) = 41702 CASE ( 'th*' )1703 dots_index(i) = 51704 CASE ( 'umax' )1705 dots_index(i) = 61706 CASE ( 'vmax' )1707 dots_index(i) = 71708 CASE ( 'wmax' )1709 dots_index(i) = 81710 CASE ( 'div_new' )1711 dots_index(i) = 91712 CASE ( 'div_old' )1713 dots_index(i) = 101714 CASE ( 'z_i_wpt' )1715 dots_index(i) = 111716 CASE ( 'z_i_pt' )1717 dots_index(i) = 121718 CASE ( 'w*' )1719 dots_index(i) = 131720 CASE ( 'w"pt"0' )1721 dots_index(i) = 141722 CASE ( 'w"pt"' )1723 dots_index(i) = 151724 CASE ( 'wpt' )1725 dots_index(i) = 161726 CASE ( 'pt(0)' )1727 dots_index(i) = 171728 CASE ( 'pt(zp)' )1729 dots_index(i) = 181730 CASE ( 'splptx' )1731 dots_index(i) = 191732 CASE ( 'splpty' )1733 dots_index(i) = 201734 CASE ( 'splptz' )1735 dots_index(i) = 211736 CASE ( 'L' )1737 dots_index(i) = 221738 1739 CASE DEFAULT1740 IF ( myid == 0 ) THEN1741 PRINT*, '+++ check_parameters: unknown time series: ', &1742 'data_output_ts = ',&1743 data_output_ts(i)1744 ENDIF1745 CALL local_stop1746 1747 END SELECT1748 1749 !1750 !-- Check, to which predefined coordinate system the time series belongs, and1751 !-- store corresponding internal number. Furthermore determine, how many and1752 !-- which graphs are being drawn into the corresponding system1753 DO k = 1, crmax1754 IF ( INDEX( cross_ts_profiles(k), ' ' // TRIM( data_output_ts(i) ) &1755 // ' ' ) /=0 ) &1756 THEN1757 dots_crossindex(i) = k1758 cross_ts_number_count(k) = cross_ts_number_count(k) + 11759 cross_ts_numbers(cross_ts_number_count(k),k) = dots_index(i)1760 EXIT1761 ENDIF1762 ENDDO1763 1764 ENDDO1765 1683 1766 1684 ! -
palm/trunk/SOURCE/data_output_tseries.f90
r4 r48 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Collection of time series quantities moved to routine flow_statistics, 7 ! output for "profil" removed 7 8 ! 8 9 ! Former revisions: … … 37 38 38 39 INTEGER :: file_id, i, j, sr 39 REAL :: ts_value(30)40 40 41 41 … … 70 70 !-- applicable) 71 71 DO sr = 0, statistic_regions 72 !73 !-- Open file for time series output.74 IF ( profil_output ) THEN75 file_id = 50 + sr76 CALL check_open( file_id )77 ENDIF78 79 !80 !-- Collect and printout all time series quantities in a single line.81 ts_value(1) = hom(nzb+4,1,var_hom,sr) ! E82 ts_value(2) = hom(nzb+5,1,var_hom,sr) ! E*83 ts_value(3) = dt_3d84 ts_value(4) = hom(nzb,1,var_hom,sr) ! u*85 ts_value(5) = hom(nzb+3,1,var_hom,sr) ! th*86 ts_value(6) = u_max87 ts_value(7) = v_max88 ts_value(8) = w_max89 ts_value(9) = hom(nzb+10,1,var_sum,sr) ! new divergence90 ts_value(10) = hom(nzb+9,1,var_hom,sr) ! old Divergence91 ts_value(11) = hom(nzb+6,1,var_hom,sr) ! z_i(1)92 ts_value(12) = hom(nzb+7,1,var_hom,sr) ! z_i(2)93 ts_value(13) = hom(nzb+8,1,var_hom,sr) ! w*94 ts_value(14) = hom(nzb,1,16,sr) ! w'pt' at k=095 ts_value(15) = hom(nzb+1,1,16,sr) ! w'pt' at k=196 ts_value(16) = hom(nzb+1,1,18,sr) ! wpt at k=197 ts_value(17) = hom(nzb,1,4,sr) ! pt(0)98 ts_value(18) = hom(nzb+1,1,4,sr) ! pt(zp)99 ts_value(19) = hom(nzb+9,1,var_hom-1,sr) ! splptx100 ts_value(20) = hom(nzb+10,1,var_hom-1,sr) ! splpty101 ts_value(21) = hom(nzb+11,1,var_hom-1,sr) ! splptz102 IF ( ts_value(5) /= 0.0 ) THEN103 ts_value(22) = ts_value(4)**2 / &104 ( kappa * g * ts_value(5) / ts_value(18) ) ! L105 ELSE106 ts_value(22) = 10000.0107 ENDIF108 72 109 73 #if defined( __netcdf ) … … 111 75 DO i = 1, dots_num 112 76 nc_stat = NF90_PUT_VAR( id_set_ts, id_var_dots(i,sr), & 113 (/ ts_value(i ) /),&77 (/ ts_value(i,sr) /), & 114 78 start = (/ dots_time_count /), & 115 79 count = (/ 1 /) ) … … 119 83 #endif 120 84 121 IF ( profil_output ) THEN 122 WRITE ( file_id, 500 ) simulated_time, ts_value(1:22) 123 ! 124 !-- y-value range of the crosses to be drawn by PROFIL 125 !-- If required, enlarge them, provided they have not yet been 126 !-- specified in 127 !-- check_parameters 128 DO i = 1, dots_n 129 130 j = dots_crossindex(i) 131 132 IF ( cross_ts_uymin(j) == 999.999 ) THEN 133 ! 134 !-- When the value range of the first line in the corresponding 135 !-- cross is determined, its value range is simply adopted. 136 IF ( cross_ts_uymin_computed(j) == 999.999 ) & 137 THEN 138 cross_ts_uymin_computed(j) = ts_value(dots_index(i)) 139 ELSE 140 cross_ts_uymin_computed(j) = & 141 MIN(cross_ts_uymin_computed(j),ts_value(dots_index(i))) 142 ENDIF 143 ENDIF 144 145 IF ( cross_ts_uymax(j) == 999.999 ) THEN 146 ! 147 !-- When the value range of the first line in the corresponding 148 !-- cross is determined, its value range is simply adopted. 149 IF ( cross_ts_uymax_computed(j) == 999.999 ) & 150 THEN 151 cross_ts_uymax_computed(j) = ts_value(dots_index(i)) 152 ELSE 153 cross_ts_uymax_computed(j) = & 154 MAX(cross_ts_uymax_computed(j),ts_value(dots_index(i))) 155 ENDIF 156 ENDIF 157 158 ENDDO 159 160 ENDIF 161 162 ENDDO ! Loop of subregions. 85 ENDDO 163 86 164 87 ENDIF -
palm/trunk/SOURCE/flow_statistics.f90
r39 r48 801 801 ENDIF 802 802 803 ! 804 !-- Collect the time series quantities 805 ts_value(1,sr) = hom(nzb+4,1,var_hom,sr) ! E 806 ts_value(2,sr) = hom(nzb+5,1,var_hom,sr) ! E* 807 ts_value(3,sr) = dt_3d 808 ts_value(4,sr) = hom(nzb,1,var_hom,sr) ! u* 809 ts_value(5,sr) = hom(nzb+3,1,var_hom,sr) ! th* 810 ts_value(6,sr) = u_max 811 ts_value(7,sr) = v_max 812 ts_value(8,sr) = w_max 813 ts_value(9,sr) = hom(nzb+10,1,var_sum,sr) ! new divergence 814 ts_value(10,sr) = hom(nzb+9,1,var_hom,sr) ! old Divergence 815 ts_value(11,sr) = hom(nzb+6,1,var_hom,sr) ! z_i(1) 816 ts_value(12,sr) = hom(nzb+7,1,var_hom,sr) ! z_i(2) 817 ts_value(13,sr) = hom(nzb+8,1,var_hom,sr) ! w* 818 ts_value(14,sr) = hom(nzb,1,16,sr) ! w'pt' at k=0 819 ts_value(15,sr) = hom(nzb+1,1,16,sr) ! w'pt' at k=1 820 ts_value(16,sr) = hom(nzb+1,1,18,sr) ! wpt at k=1 821 ts_value(17,sr) = hom(nzb,1,4,sr) ! pt(0) 822 ts_value(18,sr) = hom(nzb+1,1,4,sr) ! pt(zp) 823 ts_value(19,sr) = hom(nzb+9,1,var_hom-1,sr) ! splptx 824 ts_value(20,sr) = hom(nzb+10,1,var_hom-1,sr) ! splpty 825 ts_value(21,sr) = hom(nzb+11,1,var_hom-1,sr) ! splptz 826 IF ( ts_value(5,sr) /= 0.0 ) THEN 827 ts_value(22,sr) = ts_value(4,sr)**2 / & 828 ( kappa * g * ts_value(5,sr) / ts_value(18,sr) ) ! L 829 ELSE 830 ts_value(22,sr) = 10000.0 831 ENDIF 832 833 ! 834 !-- Calculate additional statistics provided by the user interface 835 CALL user_statistics( sr ) 836 803 837 ENDDO ! loop of the subregions 804 805 !806 !-- Calculate additional statistics provided by the user interface807 CALL user_statistics808 838 809 839 ! -
palm/trunk/SOURCE/init_3d_model.f90
r46 r48 7 7 ! Actual revisions: 8 8 ! ----------------- 9 ! New initializing action "by_user" calls user_init_3d_model 9 ! New initializing action "by_user" calls user_init_3d_model, 10 ! ts_value is allocated 10 11 ! 11 12 ! Former revisions: … … 78 79 sums_l_l(nzb:nzt+1,0:statistic_regions,0:threads_per_task-1), & 79 80 sums_up_fraction_l(10,3,0:statistic_regions), & 80 sums_wsts_bc_l(nzb:nzt+1,0:statistic_regions) ) 81 sums_wsts_bc_l(nzb:nzt+1,0:statistic_regions), & 82 ts_value(var_ts,0:statistic_regions) ) 81 83 ALLOCATE( km_damp_x(nxl-1:nxr+1), km_damp_y(nys-1:nyn+1) ) 82 84 -
palm/trunk/SOURCE/init_grid.f90
r39 r48 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! storage of topography height arrays zu_s_inner and zw_s_inner 7 7 ! 8 8 ! Former revisions: -
palm/trunk/SOURCE/modules.f90
r46 r48 5 5 ! Actual revisions: 6 6 ! ----------------- 7 ! +netcdf_64bit_3d 7 ! +netcdf_64bit_3d, zu_s_inner, zw_w_inner, id_var_zusi_*, id_var_zwwi_*, 8 ! ts_value 9 ! -data_output_ts, dots_n 10 ! arrays dots_label and dots_unit now dimensioned with dots_max 8 11 ! 9 12 ! Former revisions: … … 228 231 CHARACTER (LEN=10), DIMENSION(100) :: data_output = ' ', & 229 232 data_output_pr = ' ', & 230 data_output_ts = ' ', &231 233 data_output_user = ' ', doav = ' ' 232 234 CHARACTER (LEN=20), DIMENSION(10) :: netcdf_precision = ' ' … … 239 241 disturbance_level_ind_t, doav_n = 0, dopr_n = 0, & 240 242 dopr_time_count = 0, dopts_time_count = 0, & 241 dosp_time_count = 0, dots_ n = 0, dots_time_count = 0, &243 dosp_time_count = 0, dots_time_count = 0, & 242 244 do2d_xy_n = 0, do2d_xz_n = 0, do2d_yz_n = 0, do3d_avs_n = 0, & 243 245 dvrp_filecount = 0, dz_stretch_level_index, gamma_mg, & … … 489 491 REAL, DIMENSION(:), ALLOCATABLE :: ddx2_mg, ddy2_mg 490 492 491 REAL, DIMENSION(:,:), ALLOCATABLE :: fwxm, fwxp, fwym, fwyp, fxm, fxp, & 492 fym, fyp, wall_e_x, wall_e_y, & 493 wall_u, wall_v, wall_w_x, wall_w_y 493 REAL, DIMENSION(:,:), ALLOCATABLE :: fwxm, fwxp, fwym, fwyp, fxm, fxp, & 494 fym, fyp, wall_e_x, wall_e_y, & 495 wall_u, wall_v, wall_w_x, wall_w_y, & 496 zu_s_inner, zw_w_inner 494 497 495 498 SAVE … … 648 651 #endif 649 652 650 INTEGER, PARAMETER :: dopr_norm_num = 7, dopts_num = 26, dots_ num = 22, &653 INTEGER, PARAMETER :: dopr_norm_num = 7, dopts_num = 26, dots_max = 100, & 651 654 replace_num = 6 655 656 INTEGER :: dots_num = 22 652 657 653 658 CHARACTER, DIMENSION( replace_num ) :: & … … 677 682 'm2/s2 ', 'number2' /) 678 683 679 CHARACTER (LEN=7), DIMENSION(dots_ num) :: dots_label = &684 CHARACTER (LEN=7), DIMENSION(dots_max) :: dots_label = & 680 685 (/ 'E ', 'E* ', 'dt ', 'u* ', 'th* ', 'umax ', & 681 686 'vmax ', 'wmax ', 'div_new', 'div_old', 'z_i_wpt', 'z_i_pt ', & 682 687 'w* ', 'w"pt"0 ', 'w"pt" ', 'wpt ', 'pt(0) ', 'pt(zp) ', & 683 'splptx ', 'splpty ', 'splptz ', 'mo_L ' /) 684 685 CHARACTER (LEN=7), DIMENSION(dots_num) :: dots_unit = & 688 'splptx ', 'splpty ', 'splptz ', 'mo_L ', & 689 ( 'unknown', i9 = 1, 78) /) 690 691 CHARACTER (LEN=7), DIMENSION(dots_max) :: dots_unit = & 686 692 (/ 'm2/s2 ', 'm2/s2 ', 's ', 'm/s ', 'K ', 'm/s ', & 687 693 'm/s ', 'm/s ', 's-1 ', 's-1 ', 'm ', 'm ', & 688 694 'm/s ', 'K m/s ', 'K m/s ', 'k m/s ', 'K ', 'K ', & 689 '% ', '% ', '% ', 'm ' /) 695 '% ', '% ', '% ', 'm ', & 696 ( 'unknown', i9 = 1, 78 ) /) 690 697 691 698 CHARACTER (LEN=7), DIMENSION(100) :: dopr_unit = 'unknown' … … 737 744 id_var_xu_yz, id_var_x_3d, id_var_xu_3d, id_var_y_xy, & 738 745 id_var_yv_xy, id_var_y_xz, id_var_yv_xz, id_var_y_yz, & 739 id_var_yv_yz, id_var_y_3d, id_var_yv_3d, id_var_zu_xy, & 740 id_var_zu1_xy, id_var_zu_xz, id_var_zu_yz, id_var_zu_3d, & 746 id_var_yv_yz, id_var_y_3d, id_var_yv_3d, id_var_zusi_xy, & 747 id_var_zusi_3d, id_var_zu_xy, id_var_zu1_xy, id_var_zu_xz, & 748 id_var_zu_yz, id_var_zu_3d, id_var_zwwi_xy, id_var_zwwi_3d, & 741 749 id_var_zw_xy, id_var_zw_xz, id_var_zw_yz, id_var_zw_3d 742 750 … … 749 757 INTEGER, DIMENSION(100,0:9) :: id_dim_z_pr, id_var_dopr, & 750 758 id_var_z_pr 751 INTEGER, DIMENSION(dots_ num,0:9) :: id_var_dots759 INTEGER, DIMENSION(dots_max,0:9) :: id_var_dots 752 760 753 761 … … 1020 1028 1021 1029 CHARACTER (LEN=40) :: region(0:9) 1022 INTEGER :: statistic_regions = 0, var_hom = 80, var_sum = 80 1030 INTEGER :: statistic_regions = 0, var_hom = 80, var_sum = 80, var_ts = 100 1023 1031 INTEGER :: u_max_ijk(3), v_max_ijk(3), w_max_ijk(3) 1024 1032 LOGICAL :: flow_statistics_called = .FALSE. 1025 1033 REAL :: u_max, v_max, w_max 1026 1034 REAL, DIMENSION(:), ALLOCATABLE :: sums_divnew_l, sums_divold_l 1027 REAL, DIMENSION(:,:), ALLOCATABLE :: sums, sums_wsts_bc_l 1035 REAL, DIMENSION(:,:), ALLOCATABLE :: sums, sums_wsts_bc_l, ts_value 1028 1036 REAL, DIMENSION(:,:,:), ALLOCATABLE :: hom_sum, rmask, spectrum_x, & 1029 1037 spectrum_y, sums_l, sums_l_l, & -
palm/trunk/SOURCE/netcdf.f90
r4 r48 7 7 ! Current revisions: 8 8 ! ------------------ 9 ! 9 ! Output topography height information (zu_s_inner, zw_s_inner) to 2d-xy and 3d 10 ! datasets 10 11 ! 11 12 ! Former revisions: … … 290 291 291 292 ! 293 !-- In case of non-flat topography define 2d-arrays containing the height 294 !-- informations 295 IF ( TRIM( topography ) /= 'flat' ) THEN 296 ! 297 !-- Define zusi = zu(nzb_s_inner) 298 nc_stat = NF90_DEF_VAR( id_set_3d(av), 'zusi', NF90_DOUBLE, & 299 (/ id_dim_x_3d(av), id_dim_y_3d(av) /), & 300 id_var_zusi_3d(av) ) 301 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 413 ) 302 303 nc_stat = NF90_PUT_ATT( id_set_3d(av), id_var_zusi_3d(av), & 304 'units', 'meters' ) 305 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 414 ) 306 307 nc_stat = NF90_PUT_ATT( id_set_3d(av), id_var_zusi_3d(av), & 308 'long_name', 'zu(nzb_s_inner)' ) 309 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 415 ) 310 311 ! 312 !-- Define zwwi = zw(nzb_w_inner) 313 nc_stat = NF90_DEF_VAR( id_set_3d(av), 'zwwi', NF90_DOUBLE, & 314 (/ id_dim_x_3d(av), id_dim_y_3d(av) /), & 315 id_var_zwwi_3d(av) ) 316 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 416 ) 317 318 nc_stat = NF90_PUT_ATT( id_set_3d(av), id_var_zwwi_3d(av), & 319 'units', 'meters' ) 320 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 417 ) 321 322 nc_stat = NF90_PUT_ATT( id_set_3d(av), id_var_zwwi_3d(av), & 323 'long_name', 'zw(nzb_w_inner)' ) 324 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 418 ) 325 326 ENDIF 327 328 329 ! 292 330 !-- Define the variables 293 331 var_list = ';' … … 393 431 !-- No arrays to output 394 432 IF ( i == 1 ) RETURN 395 ! nc_stat = NF90_CLOSE( id_set_3d(av) )396 ! IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 9999 )397 ! RETURN398 ! ENDIF399 433 400 434 ! … … 468 502 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 86 ) 469 503 504 505 ! 506 !-- In case of non-flat topography write height information 507 IF ( TRIM( topography ) /= 'flat' ) THEN 508 509 nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_zusi_3d(av), & 510 zu_s_inner(0:nx+1,0:ny+1), & 511 start = (/ 1, 1 /), & 512 count = (/ nx+2, ny+2 /) ) 513 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 419 ) 514 515 nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_zwwi_3d(av), & 516 zw_w_inner(0:nx+1,0:ny+1), & 517 start = (/ 1, 1 /), & 518 count = (/ nx+2, ny+2 /) ) 519 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 420 ) 520 521 ENDIF 470 522 471 523 CASE ( '3d_ext' ) … … 742 794 743 795 ! 796 !-- In case of non-flat topography define 2d-arrays containing the height 797 !-- informations 798 IF ( TRIM( topography ) /= 'flat' ) THEN 799 ! 800 !-- Define zusi = zu(nzb_s_inner) 801 nc_stat = NF90_DEF_VAR( id_set_xy(av), 'zusi', NF90_DOUBLE, & 802 (/ id_dim_x_xy(av), id_dim_y_xy(av) /), & 803 id_var_zusi_xy(av) ) 804 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 421 ) 805 806 nc_stat = NF90_PUT_ATT( id_set_xy(av), id_var_zusi_xy(av), & 807 'units', 'meters' ) 808 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 422 ) 809 810 nc_stat = NF90_PUT_ATT( id_set_xy(av), id_var_zusi_xy(av), & 811 'long_name', 'zu(nzb_s_inner)' ) 812 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 423 ) 813 814 ! 815 !-- Define zwwi = zw(nzb_w_inner) 816 nc_stat = NF90_DEF_VAR( id_set_xy(av), 'zwwi', NF90_DOUBLE, & 817 (/ id_dim_x_xy(av), id_dim_y_xy(av) /), & 818 id_var_zwwi_xy(av) ) 819 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 424 ) 820 821 nc_stat = NF90_PUT_ATT( id_set_xy(av), id_var_zwwi_xy(av), & 822 'units', 'meters' ) 823 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 425 ) 824 825 nc_stat = NF90_PUT_ATT( id_set_xy(av), id_var_zwwi_xy(av), & 826 'long_name', 'zw(nzb_w_inner)' ) 827 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 426 ) 828 829 ENDIF 830 831 832 ! 744 833 !-- Define the variables 745 834 var_list = ';' … … 870 959 !-- No arrays to output. Close the netcdf file and return. 871 960 IF ( i == 1 ) RETURN 872 ! nc_stat = NF90_CLOSE( id_set_xy(av) )873 ! IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 9999 )874 ! RETURN875 ! ENDIF876 961 877 962 ! … … 981 1066 982 1067 DEALLOCATE( netcdf_data ) 1068 1069 ! 1070 !-- In case of non-flat topography write height information 1071 IF ( TRIM( topography ) /= 'flat' ) THEN 1072 1073 nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_zusi_xy(av), & 1074 zu_s_inner(0:nx+1,0:ny+1), & 1075 start = (/ 1, 1 /), & 1076 count = (/ nx+2, ny+2 /) ) 1077 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 427 ) 1078 1079 nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_zwwi_xy(av), & 1080 zw_w_inner(0:nx+1,0:ny+1), & 1081 start = (/ 1, 1 /), & 1082 count = (/ nx+2, ny+2 /) ) 1083 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 428 ) 1084 1085 ENDIF 983 1086 984 1087 … … 1398 1501 !-- No arrays to output. Close the netcdf file and return. 1399 1502 IF ( i == 1 ) RETURN 1400 ! nc_stat = NF90_CLOSE( id_set_xz(av) )1401 ! IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 9999 )1402 ! RETURN1403 ! ENDIF1404 1503 1405 1504 ! … … 1913 2012 !-- No arrays to output. Close the netcdf file and return. 1914 2013 IF ( i == 1 ) RETURN 1915 ! nc_stat = NF90_CLOSE( id_set_yz(av) )1916 ! IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 9999 )1917 ! RETURN1918 ! ENDIF1919 2014 1920 2015 ! -
palm/trunk/SOURCE/parin.f90
r46 r48 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! +netcdf_64bit_3d in d3par 6 ! +netcdf_64bit_3d in d3par, -data_output_ts 7 7 ! 8 8 ! Former revisions: … … 90 90 cross_normalized_y, cross_profiles, cross_ts_uymax, & 91 91 cross_ts_uymin, cross_xtext, cycle_mg, data_output, & 92 data_output_format, data_output_pr, data_output_ts,&92 data_output_format, data_output_pr, & 93 93 data_output_2d_on_each_pe, disturbance_amplitude, & 94 94 disturbance_energy_limit, disturbance_level_b, & -
palm/trunk/SOURCE/time_integration.f90
r46 r48 380 380 !-- Graphic output for time series 381 381 IF ( time_dots >= dt_dots ) THEN 382 IF ( dots_n /= 0 )CALL data_output_tseries382 CALL data_output_tseries 383 383 time_dots = MOD( time_dots, MAX( dt_dots, dt_3d ) ) 384 384 ENDIF -
palm/trunk/SOURCE/user_interface.f90
r46 r48 5 5 ! ----------------- 6 6 ! New routine user_init_3d_model which allows the initial setting of all 3d 7 ! arrays under control of the user 7 ! arrays under control of the user, 8 ! routine user_statistics now has one argument (sr), 9 ! sample for generating time series quantities added 8 10 ! 9 11 ! Former revisions: … … 174 176 ! ENDDO 175 177 ! ENDIF 178 179 ! 180 !-- Sample for user-defined time series 181 !-- For each time series quantity you have to give a label and a unit, 182 !-- which will be used for the NetCDF file. They must not contain more than 183 !-- seven characters. The value of dots_num has to be increased by the 184 !-- number of new time series quantities. Its old value has to be store in 185 !-- dots_num_palm. See routine user_statistics on how to output calculate 186 !-- and output these quantities. 187 ! dots_label(dots_num+1) = 'abs_umx' 188 ! dots_unit(dots_num+1) = 'm/s' 189 ! dots_label(dots_num+2) = 'abs_vmx' 190 ! dots_unit(dots_num+2) = 'm/s' 191 ! 192 ! dots_num_palm = dots_num 193 ! dots_num = dots_num + 2 176 194 177 195 END SUBROUTINE user_init … … 421 439 422 440 423 SUBROUTINE user_statistics 441 SUBROUTINE user_statistics( sr ) 424 442 425 443 !------------------------------------------------------------------------------! … … 428 446 ! ------------ 429 447 ! Calculation of user-defined statistics 448 ! This routine is called for every statistic region sr defined by the user, 449 ! but at least for the region "total domain" (sr=0). 430 450 !------------------------------------------------------------------------------! 431 451 … … 435 455 IMPLICIT NONE 436 456 457 INTEGER :: sr 458 459 ! 460 !-- Sample on how to add values for the user-defined time series quantities. 461 !-- These have to be defined before in routine user_init. This sample 462 !-- creates two time series for the absolut values of the horizontal 463 !-- velocities u and v. 464 ! ts_value(dots_num_palm+1,sr) = ABS( u_max ) 465 ! ts_value(dots_num_palm+2,sr) = ABS( v_max ) 437 466 438 467 END SUBROUTINE user_statistics
Note: See TracChangeset
for help on using the changeset viewer.