Changeset 3994


Ignore:
Timestamp:
May 22, 2019 6:08:09 PM (5 years ago)
Author:
suehring
Message:

new module for diagnostic output quantities added + output of turbulence intensity

Location:
palm/trunk/SOURCE
Files:
1 added
13 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/Makefile

    r3988 r3994  
    2525# -----------------
    2626# $Id$
     27# new module for calculation and output of diagnostic quantities added
     28#
     29# 3988 2019-05-22 11:32:37Z kanani
    2730# Add dependencies for virtual_measurement_mod
    2831#
     
    589592        data_output_tseries.f90 \
    590593        date_and_time_mod.f90 \
     594        diagnostic_output_quantities_mod.f90 \
    591595        diffusion_s.f90 \
    592596        diffusion_u.f90 \
     
    789793average_3d_data.o: \
    790794        cpulog_mod.o \
     795        diagnostic_output_quantities_mod.o \
    791796        exchange_horiz_2d.o \
    792797        mod_kinds.o \
     
    925930        chemistry_model_mod.o \
    926931        cpulog_mod.o \
     932        diagnostic_output_quantities_mod.o \
    927933        mod_kinds.o \
    928934        mod_particle_attributes.o \
     
    964970        bulk_cloud_model_mod.o \
    965971        cpulog_mod.o \
     972        diagnostic_output_quantities_mod.o \
    966973        land_surface_model_mod.o \
    967974        mod_kinds.o \
     
    976983        bulk_cloud_model_mod.o \
    977984        cpulog_mod.o \
     985        diagnostic_output_quantities_mod.o \
    978986        land_surface_model_mod.o \
    979987        mod_kinds.o \
     
    986994        urban_surface_mod.o
    987995date_and_time_mod.o: \
     996        mod_kinds.o \
     997        modules.o
     998diagnostic_output_quantities_mod.o: \
    988999        mod_kinds.o \
    9891000        modules.o
     
    14011412        cpulog_mod.o \
    14021413        date_and_time_mod.o \
     1414        diagnostic_output_quantities_mod.o \
    14031415        land_surface_model_mod.o \
    14041416        mod_kinds.o \
     
    15631575        cpulog_mod.o \
    15641576        date_and_time_mod.o \
     1577        diagnostic_output_quantities_mod.o \
    15651578        mod_kinds.o \
    15661579        model_1d_mod.o \
     
    16161629        bulk_cloud_model_mod.o \
    16171630        cpulog_mod.o \
     1631        diagnostic_output_quantities_mod.o \
    16181632        mod_kinds.o \
    16191633        module_interface.o \
     
    16811695        cpulog_mod.o \
    16821696        data_output_flight.o \
     1697        diagnostic_output_quantities_mod.o \
    16831698        disturb_heatflux.o \
    16841699        indoor_model_mod.o \
     
    18691884write_restart_data_mod.o: \
    18701885        date_and_time_mod.o \
     1886        diagnostic_output_quantities_mod.o \
    18711887        mod_kinds.o \
    18721888        mod_particle_attributes.o \
  • palm/trunk/SOURCE/average_3d_data.f90

    r3933 r3994  
    2525! -----------------
    2626! $Id$
     27! output of turbulence intensity added
     28!
     29! 3933 2019-04-25 12:33:20Z kanani
    2730! Bugfix in CASE theta_2m*, removal of redundant code
    2831!
     
    188191        ONLY:  cpu_log, log_point
    189192
     193    USE diagnostic_output_quantities_mod,                                      &
     194        ONLY:  ti_av
     195
    190196    USE indices,                                                               &
    191197        ONLY:  nbgp, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt
     
    515521             ENDIF
    516522
     523
     524          CASE ( 'ti' )
     525             IF ( ALLOCATED( ti_av ) ) THEN
     526                DO  i = nxl, nxr
     527                   DO  j = nys, nyn
     528                      DO  k = nzb, nzt+1
     529                         ti_av(k,j,i) = ti_av(k,j,i) / REAL( average_count_3d, KIND=wp )
     530                      ENDDO
     531                   ENDDO
     532                ENDDO
     533             ENDIF
     534
    517535          CASE ( 'w' )
    518536             IF ( ALLOCATED( w_av ) ) THEN
  • palm/trunk/SOURCE/check_parameters.f90

    r3933 r3994  
    2525! -----------------
    2626! $Id$
     27! output of turbulence intensity added
     28!
     29! 3933 2019-04-25 12:33:20Z kanani
    2730! Alphabetical resorting in CASE, condense settings for theta_2m* into one IF clause
    2831!
     
    30803083             CONTINUE
    30813084
     3085          CASE ( 'ti' )
     3086             unit = '1/s'
     3087
    30823088          CASE ( 'ghf*', 'lwp*', 'ol*', 'qsws*', 'r_a*',                       &
    30833089                 'shf*', 'ssws*', 't*', 'theta_2m*', 'tsurf*', 'us*',          &
  • palm/trunk/SOURCE/data_output_2d.f90

    r3987 r3994  
    2525! -----------------
    2626! $Id$
     27! output of turbulence intensity added
     28!
     29! 3987 2019-05-22 09:52:13Z kanani
    2730! Introduce alternative switch for debug output during timestepping
    2831!
     
    321324    USE cpulog,                                                                &
    322325        ONLY:  cpu_log, log_point
     326
     327    USE diagnostic_output_quantities_mod,                                      &
     328        ONLY:  ti, ti_av
    323329
    324330    USE indices,                                                               &
     
    12611267                level_z(nzb+1) = zu(nzb+1)
    12621268               
    1263                
    1264                
     1269             CASE ( 'ti_xy', 'ti_xz', 'ti_yz' )
     1270                IF ( av == 0 )  THEN
     1271                   to_be_resorted => ti
     1272                ELSE
     1273                   IF ( .NOT. ALLOCATED( ti_av ) ) THEN
     1274                      ALLOCATE( ti_av(nzb:nzt+1,nys:nyn,nxl:nxr) )
     1275                      ti_av = REAL( fill_value, KIND = wp )
     1276                   ENDIF
     1277                   to_be_resorted => ti_av
     1278                ENDIF
     1279                IF ( mode == 'xy' )  level_z = zu
     1280
    12651281             CASE ( 'w_xy', 'w_xz', 'w_yz' )
    12661282                flag_nr = 3
  • palm/trunk/SOURCE/data_output_3d.f90

    r3987 r3994  
    2525! -----------------
    2626! $Id$
     27! output of turbulence intensity added
     28!
     29! 3987 2019-05-22 09:52:13Z kanani
    2730! Introduce alternative switch for debug output during timestepping
    2831!
     
    272275    USE cpulog,                                                                &
    273276        ONLY:  log_point, cpu_log
     277
     278    USE diagnostic_output_quantities_mod,                                      &
     279        ONLY:  ti, ti_av
    274280
    275281#if defined( __parallel )
     
    697703                ENDIF
    698704                to_be_resorted => vpt_av
     705             ENDIF
     706
     707          CASE ( 'ti' )
     708             IF ( av == 0 )  THEN
     709                to_be_resorted => ti
     710             ELSE
     711                IF ( .NOT. ALLOCATED( ti_av ) ) THEN
     712                   ALLOCATE( ti_av(nzb:nzt+1,nys:nyn,nxl:nxr) )
     713                   ti_av = REAL( fill_value, KIND = wp )
     714                ENDIF
     715                to_be_resorted => ti_av
    699716             ENDIF
    700717
  • palm/trunk/SOURCE/data_output_mask.f90

    r3665 r3994  
    2525! -----------------
    2626! $Id$
     27! output of turbulence intensity added
     28!
     29! 3665 2019-01-10 08:28:24Z raasch
    2730! unused variables removed
    2831!
     
    179182    USE cpulog,                                                                &
    180183        ONLY:  cpu_log, log_point
     184
     185    USE diagnostic_output_quantities_mod,                                      &
     186        ONLY:  ti, ti_av
    181187
    182188    USE indices,                                                               &
     
    663669             ENDIF
    664670
     671          CASE ( 'ti' )
     672             IF ( av == 0 )  THEN
     673                to_be_resorted => ti
     674             ELSE
     675                to_be_resorted => ti_av
     676             ENDIF
     677
    665678          CASE ( 'w' )
    666679             grid = 'w'
  • palm/trunk/SOURCE/netcdf_data_input_mod.f90

    r3987 r3994  
    2020! Current revisions:
    2121! -----------------
    22 !
    2322!
    2423! Former revisions:
  • palm/trunk/SOURCE/netcdf_interface_mod.f90

    r3966 r3994  
    2020! Current revisions:
    2121! ------------------
    22 !
     22! output of turbulence intensity added
    2323!
    2424! Former revisions:
     
    11181118                CASE ( 'e', 'nc', 'nr', 'p', 'pc', 'pr', 'prr',                &
    11191119                       'q', 'qc', 'ql', 'ql_c', 'ql_v', 'ql_vp', 'qr', 'qv',   &
    1120                        's', 'theta', 'thetal', 'thetav' )
     1120                       's', 'theta', 'thetal', 'thetav', 'ti' )
    11211121
    11221122                   grid_x = 'x'
     
    18641864                CASE ( 'e', 'nc', 'nr', 'p', 'pc', 'pr', 'prr',   &
    18651865                       'q', 'qc', 'ql', 'ql_c', 'ql_v', 'ql_vp', 'qr', 'qv',   &
    1866                        's', 'theta', 'thetal', 'thetav' )
     1866                       's', 'theta', 'thetal', 'thetav', 'ti' )
    18671867
    18681868                   grid_x = 'x'
     
    28522852                             'ql_vp_xy', 'qr_xy', 'qv_xy',                     &
    28532853                             's_xy',                                           &
    2854                              'theta_xy', 'thetal_xy', 'thetav_xy' )
     2854                             'theta_xy', 'thetal_xy', 'thetav_xy', 'ti_xy' )
    28552855
    28562856                         grid_x = 'x'
     
    37563756                          'ql_xz', 'ql_c_xz', 'ql_v_xz', 'ql_vp_xz', 'qr_xz',  &
    37573757                          'qv_xz', 's_xz',                                     &
    3758                           'theta_xz', 'thetal_xz', 'thetav_xz'                )
     3758                          'theta_xz', 'thetal_xz', 'thetav_xz', 'ti_xz' )
    37593759
    37603760                      grid_x = 'x'
     
    46154615                          'ql_c_yz', 'ql_v_yz', 'ql_vp_yz', 'qr_yz', 'qv_yz',  &
    46164616                          's_yz',                                              &
    4617                           'theta_yz', 'thetal_yz', 'thetav_yz' )
     4617                          'theta_yz', 'thetal_yz', 'thetav_yz', 'ti_yz' )
    46184618
    46194619                      grid_x = 'x'
     
    59945994                       'q', 'qc', 'ql', 'ql_c', 'ql_v', 'ql_vp', 'qr', 'qv',   &
    59955995                       'rho_sea_water', 's', 'sa', &
    5996                        'theta', 'thetal', 'thetav', 'u', 'v' )
     5996                       'theta', 'thetal', 'thetav', 'ti', 'u', 'v' )
    59975997
    59985998                   grid_z = 'zu'
  • palm/trunk/SOURCE/palm.f90

    r3885 r3994  
    2525! -----------------
    2626! $Id$
     27! new module for calculation and output of diagnostic quantities added
     28!
     29! 3885 2019-04-11 11:29:34Z kanani
    2730! Changes related to global restructuring of location messages and introduction
    2831! of additional debug messages
     
    300303    USE date_and_time_mod,                                                     &
    301304        ONLY:  calc_date_and_time, init_date_and_time
     305
     306    USE diagnostic_output_quantities_mod,                                      &
     307        ONLY:  diagnostic_output_quantities_calculate,                         &
     308               timestep_number_at_prev_calc
    302309
    303310    USE indices,                                                               &
     
    558565!-- If required, output of initial arrays
    559566    IF ( do2d_at_begin )  THEN
     567       CALL diagnostic_output_quantities_calculate    !TODO, will be called twice
     568
    560569       CALL data_output_2d( 'xy', 0 )
    561570       CALL data_output_2d( 'xz', 0 )
     
    564573
    565574    IF ( do3d_at_begin )  THEN
     575       CALL diagnostic_output_quantities_calculate    !TODO, will be called twice
     576
    566577       CALL data_output_3d( 0 )
    567578    ENDIF
  • palm/trunk/SOURCE/read_restart_data_mod.f90

    r3988 r3994  
    2525! -----------------
    2626! $Id$
     27! output of turbulence intensity added
     28!
     29! 3988 2019-05-22 11:32:37Z kanani
    2730! + time_virtual_measurement (to enable steering of output interval)
    2831!
     
    124127    USE date_and_time_mod,                                                     &
    125128        ONLY:  day_of_year_init, time_utc_init
     129
     130    USE diagnostic_output_quantities_mod,                                      &
     131        ONLY:  ti_av
    126132
    127133    USE grid_variables,                                                        &
     
    10931099    REAL(wp), DIMENSION(:,:),   ALLOCATABLE   ::  tmp_2d      !< temporary array for storing 2D data
    10941100    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3d      !< temporary array for storing 3D data
     1101    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3d_noghost  !< temporary array for storing 3D data without ghost points
    10951102    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwul   !<
    10961103    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwun   !<
     
    12951302                        nxl_on_file-nbgp:nxr_on_file+nbgp),                    &
    12961303                 tmp_3d(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,           &
    1297                         nxl_on_file-nbgp:nxr_on_file+nbgp) )
     1304                        nxl_on_file-nbgp:nxr_on_file+nbgp),                    &
     1305                 tmp_3d_noghost(nzb:nzt+1,nys_on_file:nyn_on_file,             &
     1306                        nxl_on_file:nxr_on_file) )
    12981307
    12991308!
     
    15761585                   ssws_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp)  =         &
    15771586                      tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
    1578                  
     1587
     1588                CASE ( 'ti_av' )
     1589                   IF ( .NOT. ALLOCATED( ti_av ) )  THEN
     1590                      ALLOCATE( ti_av(nzb:nzt+1,nys:nyn,nxl:nxr) )
     1591                   ENDIF
     1592                   IF ( k == 1 )  READ ( 13 )  tmp_3d_noghost
     1593                   ti_av(:,nysc:nync,nxlc:nxrc) =                              &
     1594                      tmp_3d_noghost(:,nysf:nynf,nxlf:nxrf)
     1595
    15791596                CASE ( 'ts_av' )
    15801597                   IF ( .NOT. ALLOCATED( ts_av ) )  THEN
  • palm/trunk/SOURCE/sum_up_3d_data.f90

    r3943 r3994  
    2525! -----------------
    2626! $Id$
     27! output of turbulence intensity added
     28!
     29! 3943 2019-05-02 09:50:41Z maronga
    2730! Added output of qsws_av for green roofs.
    2831!
     
    283286    USE cpulog,                                                                &
    284287        ONLY:  cpu_log, log_point
     288
     289    USE diagnostic_output_quantities_mod,                                      &
     290        ONLY:  ti, ti_av
    285291
    286292    USE indices,                                                               &
     
    472478                ENDIF
    473479                tsurf_av = 0.0_wp
     480
     481             CASE ( 'ti' )
     482                IF ( .NOT. ALLOCATED( ti_av ) )  THEN
     483                   ALLOCATE( ti_av(nzb:nzt+1,nys:nyn,nxl:nxr) )
     484                ENDIF
     485                ti_av = 0.0_wp
    474486
    475487             CASE ( 'u' )
     
    10191031             ENDIF
    10201032
     1033          CASE ( 'ti' )
     1034             IF ( ALLOCATED( ti_av ) ) THEN
     1035                DO  i = nxl, nxr
     1036                   DO  j = nys, nyn
     1037                      DO  k = nzb, nzt+1
     1038                         ti_av(k,j,i) = ti_av(k,j,i) + ti(k,j,i)
     1039                      ENDDO
     1040                   ENDDO
     1041                ENDDO
     1042             ENDIF
     1043
    10211044          CASE ( 'u' )
    10221045             IF ( ALLOCATED( u_av ) ) THEN
  • palm/trunk/SOURCE/time_integration.f90

    r3988 r3994  
    2525! -----------------
    2626! $Id$
     27! output of turbulence intensity added
     28!
     29! 3988 2019-05-22 11:32:37Z kanani
    2730! Implement steerable output interval for virtual measurements
    2831!
     
    561564    USE date_and_time_mod,                                                                         &
    562565        ONLY:  calc_date_and_time, hour_call_emis, hour_of_year
     566
     567    USE diagnostic_output_quantities_mod,                                                          &
     568        ONLY:  diagnostic_output_quantities_calculate,                                             &
     569               timestep_number_at_prev_calc
    563570
    564571    USE flight_mod,                                                                                &
     
    16551662          time_do_sla = time_do_sla + dt_3d
    16561663          IF ( time_do_sla >= dt_averaging_input )  THEN
     1664             IF ( current_timestep_number > timestep_number_at_prev_calc )                         &
     1665                CALL diagnostic_output_quantities_calculate
     1666
    16571667             CALL sum_up_3d_data
    16581668             average_count_3d = average_count_3d + 1
     
    17331743!--    2d-data output (cross-sections)
    17341744       IF ( time_do2d_xy >= dt_do2d_xy  .AND.  time_since_reference_point >= skip_time_do2d_xy )  THEN
     1745          IF ( current_timestep_number > timestep_number_at_prev_calc )                            &
     1746             CALL diagnostic_output_quantities_calculate
     1747
    17351748          CALL data_output_2d( 'xy', 0 )
    17361749          time_do2d_xy = MOD( time_do2d_xy, MAX( dt_do2d_xy, dt_3d ) )
    17371750       ENDIF
    17381751       IF ( time_do2d_xz >= dt_do2d_xz  .AND.  time_since_reference_point >= skip_time_do2d_xz )  THEN
     1752          IF ( current_timestep_number > timestep_number_at_prev_calc )                            &
     1753
     1754             CALL diagnostic_output_quantities_calculate
    17391755          CALL data_output_2d( 'xz', 0 )
    17401756          time_do2d_xz = MOD( time_do2d_xz, MAX( dt_do2d_xz, dt_3d ) )
    17411757       ENDIF
    17421758       IF ( time_do2d_yz >= dt_do2d_yz  .AND.  time_since_reference_point >= skip_time_do2d_yz )  THEN
     1759          IF ( current_timestep_number > timestep_number_at_prev_calc )                            &
     1760             CALL diagnostic_output_quantities_calculate
     1761
    17431762          CALL data_output_2d( 'yz', 0 )
    17441763          time_do2d_yz = MOD( time_do2d_yz, MAX( dt_do2d_yz, dt_3d ) )
     
    17481767!--    3d-data output (volume data)
    17491768       IF ( time_do3d >= dt_do3d  .AND.  time_since_reference_point >= skip_time_do3d )  THEN
     1769          IF ( current_timestep_number > timestep_number_at_prev_calc )                            &
     1770             CALL diagnostic_output_quantities_calculate
     1771
    17501772          CALL data_output_3d( 0 )
    17511773          time_do3d = MOD( time_do3d, MAX( dt_do3d, dt_3d ) )
     
    17571779          IF ( time_domask(mid) >= dt_domask(mid)                                                  &
    17581780               .AND.  time_since_reference_point >= skip_time_domask(mid) )  THEN
     1781             IF ( current_timestep_number > timestep_number_at_prev_calc )                         &
     1782                CALL diagnostic_output_quantities_calculate
     1783
    17591784             CALL data_output_mask( 0 )
    17601785             time_domask(mid) = MOD( time_domask(mid), MAX( dt_domask(mid), dt_3d ) )
  • palm/trunk/SOURCE/write_restart_data_mod.f90

    r3988 r3994  
    2525! -----------------
    2626! $Id$
     27! output of turbulence intensity added
     28!
     29! 3988 2019-05-22 11:32:37Z kanani
    2730! + time_virtual_measurement (to enable steering of output interval)
    2831!
     
    9295        ONLY:  day_of_year_init, time_utc_init
    9396
     97    USE diagnostic_output_quantities_mod,                                      &
     98        ONLY:  ti_av
     99
    94100    USE grid_variables,                                                        &
    95101        ONLY:  dx, dy
     
    10761082       ENDIF
    10771083
     1084       IF ( ALLOCATED( ti_av ) )  THEN
     1085          CALL wrd_write_string( 'ti_av' )
     1086          WRITE ( 14 )  ti_av
     1087       ENDIF
     1088
    10781089       IF ( ALLOCATED( ts_av ) )  THEN
    10791090          CALL wrd_write_string( 'ts_av' )
Note: See TracChangeset for help on using the changeset viewer.