Changeset 2817 for palm/trunk


Ignore:
Timestamp:
Feb 19, 2018 4:32:21 PM (6 years ago)
Author:
knoop
Message:

Preliminary gust module interface implemented

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

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/Makefile

    r2802 r2817  
    2525# -----------------
    2626# $Id$
     27# Preliminary gust module interface implemented
     28#
     29# 2802 2018-02-14 16:21:39Z thiele
    2730# Changed lpm from subroutine to module.
    2831# Introduce particle transfer in nested models.
     
    420423        disturb_heatflux.f90 eqn_state_seawater.f90 exchange_horiz.f90 \
    421424        exchange_horiz_2d.f90 fft_xy_mod.f90 flow_statistics.f90 \
    422         global_min_max.f90 header.f90 \
     425        global_min_max.f90 gust_mod.f90 header.f90 \
    423426        inflow_turbulence.f90 init_3d_model.f90 \
    424427        init_advec.f90 init_cloud_physics.f90 init_coupling.f90 init_dvrp.f90 \
     
    571574                   large_scale_forcing_nudging_mod.o netcdf_interface_mod.o radiation_model_mod.o surface_mod.o
    572575global_min_max.o: modules.o mod_kinds.o
     576gust_mod.o: modules.o mod_kinds.o
    573577header.o: modules.o cpulog_mod.o mod_kinds.o date_and_time_mod.o large_scale_forcing_nudging_mod.o netcdf_interface_mod.o \
    574578   land_surface_model_mod.o microphysics_mod.o model_1d_mod.o plant_canopy_model_mod.o pmc_handle_communicator_mod.o \
  • palm/trunk/SOURCE/average_3d_data.f90

    r2797 r2817  
    2525! -----------------
    2626! $Id$
     27! Preliminary gust module interface implemented
     28!
     29! 2797 2018-02-08 13:24:35Z suehring
    2730! Enable output of ground-heat flux also at urban surfaces.
    2831!
     
    142145        ONLY:  cpu_log, log_point
    143146
     147    USE gust_mod,                                                              &
     148        ONLY:  gust_3d_data_averaging, gust_module_enabled
     149
    144150    USE indices,                                                               &
    145151        ONLY:  nbgp, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt
     
    526532             ENDIF
    527533!
     534!--          Gust module quantities
     535             IF ( gust_module_enabled )  THEN
     536                CALL gust_3d_data_averaging( 'average', doav(ii) )
     537             ENDIF
     538!
    528539!--          Chemistry quantity
    529540             IF ( air_chemistry )  THEN
  • palm/trunk/SOURCE/check_parameters.f90

    r2798 r2817  
    2525! -----------------
    2626! $Id$
     27! Preliminary gust module interface implemented
     28!
     29! 2798 2018-02-09 17:16:39Z suehring
    2730! Consider also default-type surfaces for surface temperature output.
    2831!
     
    602605    USE dvrp_variables
    603606    USE grid_variables
     607    USE gust_mod,                                                              &
     608        ONLY: gust_check_data_output, gust_check_data_output_pr,               &
     609              gust_check_parameters, gust_module_enabled
    604610    USE indices
    605611    USE land_surface_model_mod,                                                &
     
    14131419    IF ( radiation )  CALL radiation_check_parameters
    14141420!
     1421!-- When gust module is used, perform additional checks
     1422    IF ( gust_module_enabled )  CALL gust_check_parameters
     1423!
    14151424!-- When large-scale forcing or nudging is used, peform addtional checks
    14161425    IF ( large_scale_forcing  .OR.  nudging )  CALL lsf_nudging_check_parameters
     
    30993108                                                     unit, dopr_unit(i) )
    31003109             ENDIF
     3110!
     3111!--          Block of gust module profile outputs
     3112             IF ( unit == 'illegal'  .AND.  gust_module_enabled  )  THEN
     3113                   CALL gust_check_data_output_pr( data_output_pr(i), i, unit, &
     3114                                                   dopr_unit(i) )
     3115             ENDIF
    31013116
    31023117             IF ( unit == 'illegal' )  THEN                                       
     
    34183433             IF ( unit == 'illegal' )  THEN
    34193434                CALL radiation_check_data_output( var, unit, i, ilen, k )
     3435             ENDIF
     3436
     3437!
     3438!--          Block of gust module outputs
     3439             IF ( unit == 'illegal'  .AND.  gust_module_enabled  )  THEN
     3440                CALL gust_check_data_output ( var, unit )
    34203441             ENDIF
    34213442
  • palm/trunk/SOURCE/data_output_2d.f90

    r2805 r2817  
    2525! -----------------
    2626! $Id$
     27! Preliminary gust module interface implemented
     28!
     29! 2805 2018-02-14 17:00:09Z suehring
    2730! Consider also default-type surfaces for surface temperature output.
    2831!
     
    229232    USE grid_variables,                                                        &
    230233        ONLY:  dx, dy
     234
     235    USE gust_mod,                                                              &
     236        ONLY:  gust_data_output_2d, gust_module_enabled
    231237       
    232238    USE indices,                                                               &
     
    12481254                   CALL radiation_data_output_2d( av, do2d(av,if), found, grid,&
    12491255                                                  mode, local_pf, two_d  )
     1256                ENDIF
     1257
     1258!
     1259!--             Gust module quantities
     1260                IF ( .NOT. found  .AND.  gust_module_enabled )  THEN
     1261                   CALL gust_data_output_2d( av, do2d(av,if), found, grid,     &
     1262                                             local_pf, two_d, nzb_do, nzt_do )
    12501263                ENDIF
    12511264
  • palm/trunk/SOURCE/data_output_3d.f90

    r2766 r2817  
    2525! -----------------
    2626! $Id$
     27! Preliminary gust module interface implemented
     28!
     29! 2766 2018-01-22 17:17:47Z kanani
    2730! Removed preprocessor directive __chem
    2831!
     
    203206    USE cpulog,                                                                &
    204207        ONLY:  log_point, cpu_log
     208
     209    USE gust_mod,                                                              &
     210        ONLY: gust_data_output_3d, gust_module_enabled
    205211       
    206212    USE indices,                                                               &
     
    680686
    681687!
     688!--          Gust module quantities
     689             IF ( .NOT. found  .AND.  gust_module_enabled )  THEN
     690                CALL gust_data_output_3d( av, do3d(av,if), found, local_pf,    &
     691                                          nzb_do, nzt_do )
     692                resorted = .TRUE.
     693             ENDIF
     694
     695!
    682696!--          Chemistry model output
    683697             IF ( .NOT. found  .AND.  air_chemistry )  THEN
  • palm/trunk/SOURCE/flow_statistics.f90

    r2773 r2817  
    2525! -----------------
    2626! $Id$
     27! Preliminary gust module interface implemented
     28!
     29! 2773 2018-01-30 14:12:54Z suehring
    2730! Timeseries output of surface temperature.
    2831!
     
    283286    USE grid_variables,                                                        &
    284287        ONLY:   ddx, ddy
     288
     289    USE gust_mod,                                                              &
     290        ONLY:  gust_module_enabled, gust_statistics
    285291       
    286292    USE indices,                                                               &
     
    297303
    298304    USE netcdf_interface,                                                      &
    299         ONLY:  dots_rad, dots_soil
     305        ONLY:  dots_rad, dots_soil, dots_max
    300306
    301307    USE pegrid
     
    17421748             ENDDO
    17431749          ENDDO
     1750       ENDIF
     1751!
     1752!--    Calculate the gust module profiles
     1753       IF ( gust_module_enabled )  THEN
     1754          CALL gust_statistics( 'profiles', sr, tn, dots_max )
    17441755       ENDIF
    17451756!
     
    21562167
    21572168!
     2169!--    Calculate additional statistics provided by the gust module
     2170       IF ( gust_module_enabled )  THEN
     2171          CALL gust_statistics( 'time_series', sr, 0, dots_max )
     2172       ENDIF
     2173
     2174!
    21582175!--    Calculate additional statistics provided by the user interface
    21592176       CALL user_statistics( 'time_series', sr, 0 )
  • palm/trunk/SOURCE/header.f90

    r2776 r2817  
    2525! -----------------
    2626! $Id$
     27! Preliminary gust module interface implemented
     28!
     29! 2776 2018-01-31 10:44:42Z Giersch
    2730! Variable synthetic_turbulence_generator has been abbreviated
    2831!
     
    371374    USE grid_variables,                                                        &
    372375        ONLY:  dx, dy
     376
     377    USE gust_mod,                                                              &
     378        ONLY: gust_header, gust_module_enabled
    373379       
    374380    USE indices,                                                               &
     
    10231029
    10241030    IF ( radiation )  CALL radiation_header ( io )
     1031
     1032    IF ( gust_module_enabled )  CALL gust_header ( io )
    10251033
    10261034!
  • palm/trunk/SOURCE/init_3d_model.f90

    r2776 r2817  
    2525! -----------------
    2626! $Id$
     27! Preliminary gust module interface implemented
     28!
     29! 2776 2018-01-31 10:44:42Z Giersch
    2730! Variable use_synthetic_turbulence_generator has been abbreviated
    2831!
     
    433436    USE grid_variables,                                                        &
    434437        ONLY:  dx, dy, ddx2_mg, ddy2_mg
     438
     439    USE gust_mod,                                                              &
     440        ONLY:  gust_init, gust_init_arrays, gust_module_enabled
    435441   
    436442    USE indices
     
    455461
    456462    USE netcdf_interface,                                                      &
    457         ONLY:  dots_max, dots_num
     463        ONLY:  dots_max, dots_num, dots_unit, dots_label
    458464
    459465    USE netcdf_data_input_mod,                                                  &
     
    10291035       CALL wtm_init_arrays
    10301036    ENDIF
    1031    
     1037!
     1038!-- Allocate gust module arrays
     1039    IF ( gust_module_enabled )  THEN
     1040       CALL gust_init_arrays
     1041    ENDIF
     1042
    10321043!
    10331044!-- Initialize virtual flight measurements
     
    23772388    ENDIF
    23782389
     2390!
     2391!-- If required, initialize quantities needed for the gust module
     2392    IF ( gust_module_enabled )  THEN
     2393       CALL gust_init( dots_label, dots_unit, dots_num, dots_max )
     2394    ENDIF
    23792395
    23802396!
  • palm/trunk/SOURCE/netcdf_interface_mod.f90

    r2769 r2817  
    2525! -----------------
    2626! $Id$
     27! Preliminary gust module interface implemented
     28!
     29! 2769 2018-01-25 09:22:24Z raasch
    2730! bugfix for calculating number of required output time levels in case of output
    2831! at the beginning of a restart run
     
    514517        ONLY:  dx, dy, zu_s_inner, zw_w_inner
    515518
     519    USE gust_mod,                                                              &
     520        ONLY: gust_define_netcdf_grid, gust_module_enabled
     521
    516522    USE indices,                                                               &
    517523        ONLY:  nx, nxl, nxr, ny, nys, nyn, nz ,nzb, nzt
     
    934940
    935941!
     942!--                Check for gust module quantities
     943                   IF ( .NOT. found  .AND.  gust_module_enabled )  THEN
     944                      CALL gust_define_netcdf_grid( domask(mid,av,i), found,   &
     945                                                    grid_x, grid_y, grid_z )
     946                   ENDIF
     947
     948!
    936949!--                Check for chemistry quantities                   
    937950                   IF ( .NOT. found  .AND.  air_chemistry )  THEN
     
    14731486                                                         grid_x, grid_y,       &
    14741487                                                         grid_z )
     1488                   ENDIF
     1489
     1490!--                Check for gust module quantities
     1491                   IF ( .NOT. found  .AND.  gust_module_enabled )  THEN
     1492                      CALL gust_define_netcdf_grid( do3d(av,i), found, grid_x, &
     1493                                                    grid_y, grid_z )
    14751494                   ENDIF
    14761495
     
    21282147                                                         found, grid_x, grid_y,&
    21292148                                                         grid_z )
     2149                         ENDIF
     2150
     2151!
     2152!--                      Check for gust module quantities
     2153                         IF ( .NOT. found  .AND.  gust_module_enabled )  THEN
     2154                            CALL gust_define_netcdf_grid( do2d(av,i), found,   &
     2155                                                          grid_x, grid_y,      &
     2156                                                          grid_z )
    21302157                         ENDIF
    21312158
     
    28512878
    28522879!
     2880!--                   Check for gust module quantities
     2881                      IF ( .NOT. found  .AND.  gust_module_enabled )  THEN
     2882                         CALL gust_define_netcdf_grid( do2d(av,i), found,      &
     2883                                                       grid_x, grid_y, grid_z )
     2884                      ENDIF
     2885
     2886!
    28532887!--                   Check for chemistry quantities
    28542888                      IF ( .NOT. found  .AND.  air_chemistry )  THEN
     
    35203554
    35213555!
     3556!--                   Check for gust module quantities
     3557                      IF ( .NOT. found  .AND.  gust_module_enabled )  THEN
     3558                         CALL gust_define_netcdf_grid( do2d(av,i), found,      &
     3559                                                       grid_x, grid_y, grid_z )
     3560                      ENDIF
     3561
     3562!
    35223563!--                   Check for chemistry quantities
    35233564                      IF ( .NOT. found  .AND.  air_chemistry )  THEN
  • palm/trunk/SOURCE/parin.f90

    r2773 r2817  
    2525! -----------------
    2626! $Id$
     27! Preliminary gust module interface implemented
     28!
     29! 2773 2018-01-30 14:12:54Z suehring
    2730! Nesting for chemical species implemented
    2831!
     
    357360    USE grid_variables,                                                        &
    358361        ONLY:  dx, dy
     362
     363    USE gust_mod,                                                              &
     364        ONLY: gust_parin
    359365
    360366    USE indices,                                                               &
     
    724730!--       Check if radiation model is used and read &radiation_par if required
    725731          CALL radiation_parin
     732
     733!
     734!--       Check if gust module is used and read &gust_par if required
     735          CALL gust_parin
    726736 
    727737 
  • palm/trunk/SOURCE/read_3d_binary.f90

    r2797 r2817  
    2525! -----------------
    2626! $Id$
     27! Preliminary gust module interface implemented
     28!
     29! 2797 2018-02-08 13:24:35Z suehring
    2730! Enable restarts for land- and urban-surface variables ghf_av, r_a_av and
    2831! tsurf_av.
     
    171174    USE cpulog,                                                                &
    172175        ONLY:  cpu_log, log_point_s
     176
     177    USE gust_mod,                                                              &
     178        ONLY :  gust_module_enabled, gust_read_restart_data
    173179
    174180    USE indices,                                                               &
     
    11051111
    11061112       ENDDO  ! loop over variables
     1113
     1114!
     1115!--    Read gust model restart data
     1116       IF ( gust_module_enabled )  THEN
     1117          CALL gust_read_restart_data
     1118       ENDIF
    11071119!
    11081120!--    Read surface related variables
  • palm/trunk/SOURCE/sum_up_3d_data.f90

    r2798 r2817  
    2525! -----------------
    2626! $Id$
     27! Preliminary gust module interface implemented
     28!
     29! 2798 2018-02-09 17:16:39Z suehring
    2730! Consider also default-type surfaces for surface temperature output.
    2831!
     
    199202        ONLY:  cpu_log, log_point
    200203
     204    USE gust_mod,                                                              &
     205        ONLY:  gust_3d_data_averaging, gust_module_enabled
     206
    201207    USE indices,                                                               &
    202208        ONLY:  nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt
     
    512518                IF ( radiation )  THEN
    513519                   CALL radiation_3d_data_averaging( 'allocate', doav(ii) )
     520                ENDIF
     521
     522!
     523!--             Gust module quantities
     524                IF ( gust_module_enabled )  THEN
     525                   CALL gust_3d_data_averaging( 'allocate', doav(ii) )
    514526                ENDIF
    515527
     
    10641076
    10651077!
     1078!--          Gust module quantities
     1079             IF ( gust_module_enabled )  THEN
     1080                CALL gust_3d_data_averaging( 'sum', doav(ii) )
     1081             ENDIF
     1082
     1083!
    10661084!--          Chemical quantity
    10671085             IF ( air_chemistry  .AND.  trimvar(1:3) == 'kc_')  THEN
  • palm/trunk/SOURCE/swap_timelevel.f90

    r2766 r2817  
    2525! -----------------
    2626! $Id$
     27! Preliminary gust module interface implemented
     28!
     29! 2766 2018-01-22 17:17:47Z kanani
    2730! Removed preprocessor directive __chem
    2831!
     
    148151               passive_scalar, timestep_count, urban_surface
    149152
     153    USE gust_mod,                                                              &
     154        ONLY: gust_module_enabled, gust_swap_timelevel
     155
    150156    USE indices,                                                               &
    151157        ONLY:  nxlg, nxrg, nyng, nysg, nzb, nzt
     
    214220    ENDIF
    215221
     222    IF ( gust_module_enabled )  THEN
     223       CALL gust_swap_timelevel ( 0 )
     224    ENDIF
     225
    216226
    217227    CALL cpu_log( log_point(28), 'swap_timelevel (nop)', 'stop' )
     
    293303    ENDIF
    294304
     305    IF ( gust_module_enabled )  THEN
     306       CALL gust_swap_timelevel ( MOD( timestep_count, 2) )
     307    ENDIF
     308
    295309!
    296310!-- Set the swap level for steering the pmc data transfer
  • palm/trunk/SOURCE/time_integration.f90

    r2801 r2817  
    2525! -----------------
    2626! $Id$
     27! Preliminary gust module interface implemented
     28!
     29! 2801 2018-02-14 16:01:55Z thiele
    2730! Changed lpm from subroutine to module.
    2831! Introduce particle transfer in nested models.
     
    375378        ONLY:  flight_measurement
    376379
     380    USE gust_mod,                                                              &
     381        ONLY:  gust_actions, gust_module_enabled
    377382
    378383    USE indices,                                                               &
     
    559564          IF ( force%time(force%tind_p) <= simulated_time )                    &
    560565             CALL netcdf_data_input_lsf
     566       ENDIF
     567
     568!
     569!--    Execute the gust module actions
     570       IF ( gust_module_enabled )  THEN
     571          CALL gust_actions( 'before_timestep' )
    561572       ENDIF
    562573
     
    11001111
    11011112!
     1113!--    Execute the gust module actions
     1114       IF ( gust_module_enabled )  THEN
     1115          CALL gust_actions( 'after_integration' )
     1116       ENDIF
     1117
     1118!
    11021119!--    Execute user-defined actions
    11031120       CALL user_actions( 'after_integration' )
     
    12871304
    12881305!
     1306!--    Execute the gust module actions
     1307       IF ( gust_module_enabled )  THEN
     1308          CALL gust_actions( 'after_timestep' )
     1309       ENDIF
     1310
     1311!
    12891312!--    Execute user-defined actions
    12901313       CALL user_actions( 'after_timestep' )
  • palm/trunk/SOURCE/write_3d_binary.f90

    r2798 r2817  
    2525! -----------------
    2626! $Id$
     27! Preliminary gust module interface implemented
     28!
     29! 2798 2018-02-09 17:16:39Z suehring
    2730! Consider also default-type surfaces for surface temperature output.
    2831!
     
    145148               land_surface, microphysics_morrison, microphysics_seifert,      &
    146149               ocean, passive_scalar, topography, urban_surface
    147                
     150
     151    USE gust_mod,                                                              &
     152        ONLY :  gust_module_enabled, gust_write_restart_data
     153
    148154    USE indices,                                                               &
    149155        ONLY:  nxl, nxr, nys, nyn, nzb, nzt
     
    402408    WRITE ( 14 )  '*** end ***         '
    403409
     410    IF ( gust_module_enabled )  THEN
     411       CALL gust_write_restart_data
     412    ENDIF
     413
    404414    CALL surface_write_restart_data
    405415
Note: See TracChangeset for help on using the changeset viewer.