Changeset 291 for palm/trunk/SOURCE


Ignore:
Timestamp:
Apr 16, 2009 12:07:26 PM (15 years ago)
Author:
raasch
Message:

changes for coupling with independent precursor runs; z_i calculation with Sullivan criterion

Location:
palm/trunk/SOURCE
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/CURRENT_MODIFICATIONS

    r288 r291  
    88and are controlled with existing parameters slicer_range_limits.
    99(set_slicer_attributes_dvrp)
     10
     11Ocean atmosphere coupling allows to use independent precursor runs in order
     12to account for different spin-up times. The time when coupling has to be
     13started is given by new inipar parameter coupling_start_time. The precursor
     14ocean run has to be started using new mrun option "-y" in order to add
     15appendix "_O" to all output files.
     16(check_for_restart, check_parameters, data_output_2d, data_output_3d,
     17data_output_profiles, data_output_ptseries, data_output_spectra,
     18data_output_tseries, header, init_coupling, modules, mrun,
     19parin, read_var_list, surface_coupler, time_integration, write_var_list)
    1020
    1121Polygon reduction for topography and ground plate isosurface. Reduction level
     
    2232write_var_list)
    2333
    24 check_parameters, data_output_dvrp, init_dvrp, init_grid, init_3d_model, header, modules, package_parin, parin, prognostic_equations, read_var_list, user_check_parameters, user_data_output_dvrp, user_header, user_init_grid, write_var_list
     34check_for_restart, check_parameters, data_output_2d, data_output_3d, data_output_dvrp, data_output_profiles, data_output_ptseries, data_output_spectra, data_output_tseries, init_coupling, init_dvrp, init_grid, init_3d_model, header, modules, mrun, package_parin, parin, prognostic_equations, read_var_list, surface_coupler, time_integration, user_check_parameters, user_data_output_dvrp, user_header, user_init_grid, write_var_list
    2535
    2636New: set_particle_attributes, set_slicer_attributes_dvrp
     
    2838Changed:
    2939-------
     40Temperature gradient criterion for estimating the boundary layer height
     41replaced by the gradient criterion of Sullivan et al. (1998). (flow_statistics)
     42
    3043NetCDF unit attribute in timeseries output in case of statistic regions added
    3144(netcdf.90)
  • palm/trunk/SOURCE/check_for_restart.f90

    r274 r291  
    44! Current revisions:
    55! -----------------
     6! Coupling with independent precursor runs.
    67! Output of messages replaced by message handling routine
    78!
     
    9697!
    9798!-- Set the stop flag also, if restart is forced by user
    98     IF ( time_restart /= 9999999.9  .AND.  time_restart < simulated_time ) &
    99     THEN
     99    IF ( time_restart /= 9999999.9  .AND.  &
     100         time_restart < time_since_reference_point )  THEN
     101
    100102!
    101103!--    Restart is not neccessary, if the end time of the run (given by
  • palm/trunk/SOURCE/check_parameters.f90

    r264 r291  
    44! Actual revisions:
    55! -----------------
     6! Coupling with independent precursor runs.
    67! Check particle_color, particle_dvrpsize, color_interval, dvrpsize_interval
    78! Bugfix: pressure included for profile output
     
    115116         position, prec
    116117    LOGICAL ::  found, ldum
    117     REAL    ::  gradient, maxn, maxp, remote = 0.0
     118    REAL    ::  gradient, maxn, maxp, remote = 0.0, &
     119                simulation_time_since_reference
    118120
    119121!
     
    188190       ENDIF
    189191
    190        CALL MPI_SEND( end_time, 1, MPI_REAL, target_id, 14, comm_inter, ierr )
     192       simulation_time_since_reference = end_time - coupling_start_time
     193       CALL MPI_SEND( simulation_time_since_reference, 1, MPI_REAL, target_id, &
     194                      14, comm_inter, ierr )
    191195       CALL MPI_RECV( remote, 1, MPI_REAL, target_id, 14, comm_inter, &
    192196                      status, ierr )
    193        IF ( end_time /= remote )  THEN
     197       IF ( simulation_time_since_reference /= remote )  THEN
    194198          WRITE( message_string, * ) 'coupling mode "', TRIM( coupling_mode ), &
    195                  '": end_time = ', end_time, '& is not equal to ',             &
    196                  'end_time_remote = ', remote
     199                 '": simulation_time_since_reference = ',                      &
     200                 simulation_time_since_reference, '& is not equal to ',        &
     201                 'simulation_time_since_reference_remote = ', remote
    197202          CALL message( 'check_parameters', 'PA0008', 1, 2, 0, 6, 0 )
    198203       ENDIF
     
    383388
    384389!
     390!-- Check whether an (uncoupled) atmospheric run has been declared as an
     391!-- ocean run (this setting is done via mrun-option -y)
     392    IF ( TRIM( coupling_mode ) == 'uncoupled'  .AND.  &
     393         TRIM( coupling_char ) == '_O' )  THEN
     394       message_string = 'ocean = .F. does not allow coupling_char = "' // &
     395                        TRIM( coupling_char ) // '" set by mrun-option "-y"'
     396       CALL message( 'check_parameters', 'PA0317', 1, 2, 0, 6, 0 )
     397    ENDIF
     398
     399!
    385400!-- Check whether there are any illegal values
    386401!-- Pressure solver:
     
    10271042
    10281043!
     1044!-- Store reference time for coupled runs and change the coupling flag,
     1045!-- if ...
     1046    IF ( simulated_time == 0.0 )  THEN
     1047       IF ( coupling_start_time == 0.0 )  THEN
     1048          time_since_reference_point = 0.0
     1049       ELSEIF ( time_since_reference_point < 0.0 )  THEN
     1050          run_coupled = .FALSE.
     1051       ENDIF
     1052    ENDIF
     1053
     1054!
    10291055!-- Set wind speed in the Galilei-transformed system
    10301056    IF ( galilei_transformation )  THEN
     
    28132839!-- internal parameter for steering restart events)
    28142840    IF ( restart_time /= 9999999.9 )  THEN
    2815        IF ( restart_time > simulated_time )  time_restart = restart_time
     2841       IF ( restart_time > time_since_reference_point )  THEN
     2842          time_restart = restart_time
     2843       ENDIF
    28162844    ELSE
    28172845!
  • palm/trunk/SOURCE/data_output_2d.f90

    r274 r291  
    44! Current revisions:
    55! -----------------
     6! simulated_time in NetCDF output replaced by time_since_reference_point.
    67! Output of NetCDF messages with aid of message handling routine.
    78! Output of messages replaced by message handling routine.
     
    567568                            nc_stat = NF90_PUT_VAR( id_set_xy(av),             &
    568569                                                    id_var_time_xy(av),        &
    569                                                     (/ simulated_time /),      &
     570                                             (/ time_since_reference_point /), &
    570571                                         start = (/ do2d_xy_time_count(av) /), &
    571572                                                    count = (/ 1 /) )
     
    753754                            nc_stat = NF90_PUT_VAR( id_set_xz(av),             &
    754755                                                    id_var_time_xz(av),        &
    755                                                     (/ simulated_time /),      &
     756                                             (/ time_since_reference_point /), &
    756757                                         start = (/ do2d_xz_time_count(av) /), &
    757758                                                    count = (/ 1 /) )
     
    960961                            nc_stat = NF90_PUT_VAR( id_set_yz(av),             &
    961962                                                    id_var_time_yz(av),        &
    962                                                     (/ simulated_time /),      &
     963                                             (/ time_since_reference_point /), &
    963964                                         start = (/ do2d_yz_time_count(av) /), &
    964965                                                    count = (/ 1 /) )
  • palm/trunk/SOURCE/data_output_3d.f90

    r274 r291  
    44! Current revisions:
    55! -----------------
     6! simulated_time in NetCDF output replaced by time_since_reference_point.
    67! Output of NetCDF messages with aid of message handling routine.
    78! Output of messages replaced by message handling routine.
     
    9394    IF ( myid == 0  .AND.  netcdf_output )  THEN
    9495       nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_time_3d(av), &
    95                                (/ simulated_time /),              &
     96                               (/ time_since_reference_point /),  &
    9697                               start = (/ do3d_time_count(av) /), &
    9798                               count = (/ 1 /) )
  • palm/trunk/SOURCE/data_output_profiles.f90

    r274 r291  
    44! Current revisions:
    55! -----------------
     6! simulated_time in NetCDF output replaced by time_since_reference_point.
    67! Output of NetCDF messages with aid of message handling routine.
    78! Output of messages replaced by message handling routine.
     
    356357!
    357358!--       Store time to time axis         
    358           nc_stat = NF90_PUT_VAR( id_set_pr, id_var_time_pr,     &
    359                                   (/ simulated_time /),          &
    360                                   start = (/ dopr_time_count /), &
     359          nc_stat = NF90_PUT_VAR( id_set_pr, id_var_time_pr,        &
     360                                  (/ time_since_reference_point /), &
     361                                  start = (/ dopr_time_count /),    &
    361362                                  count = (/ 1 /) )
    362363          CALL handle_netcdf_error( 'data_output_profiles', 338 )
  • palm/trunk/SOURCE/data_output_ptseries.f90

    r263 r291  
    44! Current revisions:
    55! -----------------
     6! simulated_time in NetCDF output replaced by time_since_reference_point.
    67! Output of NetCDF messages with aid of message handling routine.
    78!
     
    5556!
    5657!--    Update the particle time series time axis
    57        nc_stat = NF90_PUT_VAR( id_set_pts, id_var_time_pts,    &
    58                                (/ simulated_time /),          &
     58       nc_stat = NF90_PUT_VAR( id_set_pts, id_var_time_pts,      &
     59                               (/ time_since_reference_point /), &
    5960                               start = (/ dopts_time_count /), count = (/ 1 /) )
    6061       CALL handle_netcdf_error( 'data_output_ptseries', 391 )
  • palm/trunk/SOURCE/data_output_spectra.f90

    r263 r291  
    44! Current revisions:
    55! -----------------
     6! simulated_time in NetCDF output replaced by time_since_reference_point.
    67! Output of NetCDF messages with aid of message handling routine.
    78! Output of messages replaced by message handling routine.
     
    6566!
    6667!--    Update the spectra time axis
    67        nc_stat = NF90_PUT_VAR( id_set_sp, id_var_time_sp, (/ simulated_time /),&
     68       nc_stat = NF90_PUT_VAR( id_set_sp, id_var_time_sp,        &
     69                               (/ time_since_reference_point /), &
    6870                               start = (/ dosp_time_count /), count = (/ 1 /) )
    6971       CALL handle_netcdf_error( 'data_output_spectra', 47 )
  • palm/trunk/SOURCE/data_output_tseries.f90

    r263 r291  
    44! Current revisions:
    55! -----------------
     6! simulated_time in NetCDF output replaced by time_since_reference_point.
    67! Output of NetCDF messages with aid of message handling routine.
    78!
     
    6364!
    6465!--       Update the time series time axis
    65           nc_stat = NF90_PUT_VAR( id_set_ts, id_var_time_ts,     &
    66                                   (/ simulated_time /),          &
    67                                   start = (/ dots_time_count /), &
     66          nc_stat = NF90_PUT_VAR( id_set_ts, id_var_time_ts,        &
     67                                  (/ time_since_reference_point /), &
     68                                  start = (/ dots_time_count /),    &
    6869                                  count = (/ 1 /) )
    6970          CALL handle_netcdf_error( 'data_output_tseries', 350 )
  • palm/trunk/SOURCE/flow_statistics.f90

    r274 r291  
    44! Current revisions:
    55! -----------------
     6! Temperature gradient criterion for estimating the boundary layer height
     7! replaced by the gradient criterion of Sullivan et al. (1998).
    68! Output of messages replaced by message handling routine.
    79!
     
    8385    INTEGER ::  i, j, k, omp_get_thread_num, sr, tn
    8486    LOGICAL ::  first
    85     REAL    ::  height, pts, sums_l_eper, sums_l_etot, ust, ust2, u2, vst, &
    86                 vst2, v2, w2, z_i(2)
     87    REAL    ::  dptdz_threshold, height, pts, sums_l_eper, sums_l_etot, ust, &
     88                ust2, u2, vst, vst2, v2, w2, z_i(2)
     89    REAL    ::  dptdz(nzb+1:nzt+1)
    8790    REAL    ::  sums_ll(nzb:nzt+1,2)
    8891
     
    949952
    950953!
    951 !--    Second scheme: Starting from the top/bottom model boundary, look for
    952 !--    the first characteristic kink in the temperature profile, where the
    953 !--    originally stable stratification notably weakens.
     954!--    Second scheme: Gradient scheme from Sullivan et al. (1998), modified
     955!--    by Uhlenbrock(2006). The boundary layer height is the height with the
     956!--    maximal local temperature gradient: starting from the second (the last
     957!--    but one) vertical gridpoint, the local gradient must be at least
     958!--    0.2K/100m and greater than the next four gradients.
     959!--    WARNING: The threshold value of 0.2K/100m must be adjusted for the
     960!--             ocean case!
    954961       z_i(2) = 0.0
     962       DO  k = nzb+1, nzt+1
     963          dptdz(k) = ( hom(k,1,4,sr) - hom(k-1,1,4,sr) ) * ddzu(k)
     964       ENDDO
     965       dptdz_threshold = 0.2 / 100.0
     966
    955967       IF ( ocean )  THEN
    956           DO  k = nzb+1, nzt-1
    957              IF ( ( hom(k,1,4,sr) - hom(k-1,1,4,sr) ) > &
    958                   2.0 * ( hom(k+1,1,4,sr) - hom(k,1,4,sr) ) )  THEN
    959                 z_i(2) = zu(k)
     968          DO  k = nzt+1, nzb+5, -1
     969             IF ( dptdz(k) > dptdz_threshold  .AND.                           &
     970                  dptdz(k) > dptdz(k-1)  .AND.  dptdz(k) > dptdz(k-2)  .AND.  &
     971                  dptdz(k) > dptdz(k-3)  .AND.  dptdz(k) > dptdz(k-4) )  THEN
     972                z_i(2) = zw(k-1)
    960973                EXIT
    961974             ENDIF
    962975          ENDDO
    963976       ELSE
    964           DO  k = nzt-1, nzb+1, -1
    965              IF ( ( hom(k+1,1,4,sr) - hom(k,1,4,sr) ) > &
    966                   2.0 * ( hom(k,1,4,sr) - hom(k-1,1,4,sr) ) )  THEN
    967                 z_i(2) = zu(k)
     977          DO  k = nzb+1, nzt-3
     978             IF ( dptdz(k) > dptdz_threshold  .AND.                           &
     979                  dptdz(k) > dptdz(k+1)  .AND.  dptdz(k) > dptdz(k+2)  .AND.  &
     980                  dptdz(k) > dptdz(k+3)  .AND.  dptdz(k) > dptdz(k+4) )  THEN
     981                z_i(2) = zw(k-1)
    968982                EXIT
    969983             ENDIF
  • palm/trunk/SOURCE/header.f90

    r256 r291  
    44! Current revisions:
    55! -----------------
     6! Coupling with independent precursor runs.
    67! Output of messages replaced by message handling routine.
    78! Output of cluster_size
     
    105106
    106107    INTEGER ::  av, bh, blx, bly, bxl, bxr, byn, bys, ch, cwx, cwy, cxl, cxr, &
    107          cyn, cys, i, ihost, io, j, l, ll
     108                cyn, cys, i, ihost, io, j, l, ll, mpi_type
    108109    REAL    ::  cpuseconds_per_simulated_second
    109110
     
    151152    ver_rev = TRIM( version ) // '  ' // TRIM( revision )
    152153    WRITE ( io, 100 )  ver_rev, TRIM( run_classification )
    153     IF ( coupling_mode /= 'uncoupled' )  WRITE ( io, 101 )  coupling_mode
     154    IF ( TRIM( coupling_mode ) /= 'uncoupled' )  THEN
     155#if defined( __mpi2 )
     156       mpi_type = 2
     157#else
     158       mpi_type = 1
     159#endif
     160       WRITE ( io, 101 )  mpi_type, coupling_mode
     161    ENDIF
    154162    WRITE ( io, 102 )  run_date, run_identifier, run_time, runnr, &
    155163                       ADJUSTR( host_chr )
     
    344352          ENDIF
    345353       ENDIF
     354    ENDIF
     355
     356!
     357!-- Start time for coupled runs, if independent precursor runs for atmosphere
     358!-- and ocean are used. In this case, coupling_start_time defines the time
     359!-- when the coupling is switched on.
     360    IF ( coupling_start_time /= 0.0 )  THEN
     361       IF ( coupling_start_time >= simulated_time_at_begin )  THEN
     362          char1 = 'Precursor run for a coupled atmosphere-ocean run'
     363       ELSE
     364          char1 = 'Coupled atmosphere-ocean run following independent ' // &
     365                  'precursor runs'
     366       ENDIF
     367       WRITE ( io, 207 )  char1, coupling_start_time
    346368    ENDIF
    347369
     
    13511373            1X,'* ',A,' *',9X,A/                               &
    13521374            1X,'***************************',9X,42('-'))
    1353 101 FORMAT (37X,'coupled run: ',A/ &
     1375101 FORMAT (37X,'coupled run using MPI-',I1,': ',A/ &
    13541376            37X,42('-'))
    13551377102 FORMAT (/' Date:              ',A8,9X,'Run:       ',A20/      &
     
    14481470             '                                   per second of simulated tim', &
    14491471               'e: ',F9.3,' s')
     1472207 FORMAT ( A/' Coupling start time:',F9.3,' s')
    14501473250 FORMAT (//' Computational grid and domain size:'/ &
    14511474              ' ----------------------------------'// &
  • palm/trunk/SOURCE/init_coupling.f90

    r226 r291  
    44! Actual revisions:
    55! -----------------
    6 !
     6! Coupling with independent precursor runs.
    77!
    88! Former revisions:
     
    2727!-- Local variables
    2828    INTEGER               ::  i, inter_color
    29     INTEGER, DIMENSION(:) ::  bc_data(0:2) = 0
     29    INTEGER, DIMENSION(:) ::  bc_data(0:3) = 0
    3030
    3131!
     
    4848       READ (*,*,ERR=10,END=10)  coupling_mode, bc_data(1), bc_data(2)
    494910     CONTINUE
    50 
    5150#if defined( __mpi2 )
    5251       IF ( TRIM( coupling_mode ) == 'atmosphere_to_ocean' )  THEN
     
    6463       ENDIF
    6564#endif
    66     bc_data(0) = i
     65       bc_data(0) = i
     66
     67!
     68!--    Check if '_O' has to be used as file extension in an uncoupled ocean
     69!--    run. This is required, if this run shall be continued as a coupled run.
     70       IF ( TRIM( coupling_mode ) == 'precursor_ocean' )  bc_data(3) = 1
     71
    6772    ENDIF
    6873
    69     CALL MPI_BCAST( bc_data(0), 3, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr )
     74    CALL MPI_BCAST( bc_data(0), 4, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr )
    7075    i = bc_data(0)
    7176
     
    114119#endif
    115120
    116     IF ( coupling_mode == 'ocean_to_atmosphere' )  coupling_char = '_O'
     121!
     122!-- In case of a precursor ocean run (followed by a coupled run), or a
     123!-- coupled atmosphere-ocean run, set the file extension for the ocean files
     124    IF ( TRIM( coupling_mode ) == 'ocean_to_atmosphere' .OR. bc_data(3) == 1 ) &
     125    THEN
     126       coupling_char = '_O'
     127    ENDIF
    117128
    118129 END SUBROUTINE init_coupling
  • palm/trunk/SOURCE/modules.f90

    r288 r291  
    1111! topography color in dvrp_variables,
    1212! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
    13 ! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b,
    14 ! dp_level_ind_b, dp_smooth, dp_smooth_factor, dpdxy, u_bulk, v_bulk in
    15 ! control_parameters
     13! canyon_wall_south, conserve_volume_flow_mode, coupling_start_time,
     14! dp_external, dp_level_b, dp_level_ind_b, dp_smooth, dp_smooth_factor, dpdxy,
     15! run_coupled, time_since_reference_point, u_bulk, v_bulk in control_parameters
    1616!
    1717! Former revisions:
     
    380380                profil_output = .FALSE., radiation = .FALSE., &
    381381                random_heatflux = .FALSE., run_control_header = .FALSE., &
    382                 sloping_surface = .FALSE., stop_dt = .FALSE., &
    383                 terminate_run = .FALSE., turbulent_inflow = .FALSE., &
     382                run_coupled = .TRUE., sloping_surface = .FALSE., &
     383                stop_dt = .FALSE., terminate_run = .FALSE., &
     384                turbulent_inflow = .FALSE., &
    384385                use_prior_plot1d_parameters = .FALSE., use_reference = .FALSE.,&
    385386                use_surface_fluxes = .FALSE., use_top_fluxes = .FALSE., &
     
    401402             canyon_width_x = 9999999.9, canyon_width_y = 9999999.9, &
    402403             canyon_wall_left = 9999999.9, canyon_wall_south = 9999999.9, &
    403              cthf = 0.0, cfl_factor = -1.0, &
    404              cos_alpha_surface, disturbance_amplitude = 0.25, &
     404             cthf = 0.0, cfl_factor = -1.0, cos_alpha_surface, &
     405             coupling_start_time, disturbance_amplitude = 0.25, &
    405406             disturbance_energy_limit = 0.01, &
    406407             disturbance_level_b = -9999999.9, &
     
    454455             time_do_av = 0.0, time_do_sla = 0.0, time_dvrp = 0.0, &
    455456             time_prel = 0.0, time_restart = 9999999.9, time_run_control = 0.0,&
    456              top_heatflux = 9999999.9, top_momentumflux_u = 9999999.9, &
     457             time_since_reference_point, top_heatflux = 9999999.9, &
     458             top_momentumflux_u = 9999999.9, &
    457459             top_momentumflux_v = 9999999.9, top_salinityflux = 9999999.9, &
    458460             ug_surface = 0.0, u_bulk = 0.0, u_gtrans = 0.0, &
  • palm/trunk/SOURCE/parin.f90

    r274 r291  
    77! Output of messages replaced by message handling routine.
    88! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
    9 ! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b,
    10 ! dp_smooth, dpdxy, u_bulk, v_bulk in inipar
     9! canyon_wall_south, conserve_volume_flow_mode, coupling_start_time,
     10! dp_external, dp_level_b, dp_smooth, dpdxy, u_bulk, v_bulk in inipar
    1111! topography_grid_convention moved from userpar
    1212!
     
    9494             canyon_wall_left, canyon_wall_south, cloud_droplets, &
    9595             cloud_physics, conserve_volume_flow, conserve_volume_flow_mode, &
    96              cthf, cut_spline_overshoot, &
     96             coupling_start_time, cthf, cut_spline_overshoot, &
    9797             damp_level_1d, dissipation_1d, dp_external, dp_level_b, &
    9898             dp_smooth, dpdxy, drag_coefficient, dt, dt_pr_1d, &
  • palm/trunk/SOURCE/prandtl_fluxes.f90

    r198 r291  
    44! Actual revisions:
    55! -----------------
    6 !
     6! Saturation condition at (sea) surface is not used in precursor runs (only
     7! in the following coupled runs)
    78!
    89! Former revisions:
     
    278279
    279280!
    280 !--             assume saturation for atmosphere coupled to ocean
    281                 IF ( coupling_mode == 'atmosphere_to_ocean' )  THEN
     281!--             Assume saturation for atmosphere coupled to ocean (but not
     282!--             in case of precursor runs)
     283                IF ( coupling_mode == 'atmosphere_to_ocean' .AND. run_coupled )&
     284                THEN
    282285                   e_q = 6.1 * &
    283286                        EXP( 0.07 * ( MIN(pt(0,j,i),pt(1,j,i)) - 273.15 ) )
  • palm/trunk/SOURCE/read_var_list.f90

    r274 r291  
    66! Output of messages replaced by message handling routine.
    77! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
    8 ! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b,
    9 ! dp_smooth, dpdxy, topography_grid_convention, u_bulk, v_bulk
     8! canyon_wall_south, conserve_volume_flow_mode, coupling_start_time,
     9! dp_external, dp_level_b, dp_smooth, dpdxy, run_coupled,
     10! time_since_reference_point, topography_grid_convention, u_bulk, v_bulk
    1011!
    1112! Former revisions:
     
    242243          CASE ( 'conserve_volume_flow_mode' )
    243244             READ ( 13 )  conserve_volume_flow_mode
     245          CASE ( 'coupling_start_time' )
     246             READ ( 13 )  coupling_start_time
    244247          CASE ( 'cthf' )
    245248             READ ( 13 )  cthf
     
    428431          CASE ( 'runnr' )
    429432             READ ( 13 )  runnr
     433          CASE ( 'run_coupled' )
     434             READ ( 13 )  run_coupled
    430435          CASE ( 'sa_init' )
    431436             READ ( 13 )  sa_init
     
    492497          CASE ( 'time_run_control' )
    493498             READ ( 13 )  time_run_control
     499          CASE ( 'time_since_reference_point' )
     500             READ ( 13 )  time_since_reference_point
    494501          CASE ( 'time_sort_particles' )
    495502             READ ( 13 )  time_sort_particles
  • palm/trunk/SOURCE/surface_coupler.f90

    r274 r291  
    44! Current revisions:
    55! -----------------
     6! Coupling with independent precursor runs.
    67! Output of messages replaced by message handling routine.
    78!
     
    3536    INTEGER ::  i, j, k
    3637
    37     REAL    ::  simulated_time_remote
     38    REAL    ::  time_since_reference_point_rem
    3839
    3940#if defined( __parallel )
     
    6566       RETURN
    6667    ENDIF
     68
    6769!
    6870!-- Exchange the current simulated time between the models,
    6971!-- currently just for testing
    70     CALL MPI_SEND( simulated_time, 1, MPI_REAL, target_id, 11, &
     72    CALL MPI_SEND( time_since_reference_point, 1, MPI_REAL, target_id, 11, &
    7173                   comm_inter, ierr )
    72     CALL MPI_RECV( simulated_time_remote, 1, MPI_REAL, target_id, 11, &
     74    CALL MPI_RECV( time_since_reference_point_rem, 1, MPI_REAL, target_id, 11, &
    7375                   comm_inter, status, ierr )
    74     WRITE ( 9, * )  simulated_time, ' remote: ', simulated_time_remote
     76    WRITE ( 9, * ) 'simulated time: ', simulated_time
     77    WRITE ( 9, * ) 'time since start of coupling: ', &
     78                   time_since_reference_point, ' remote: ', &
     79                   time_since_reference_point_rem
    7580    CALL local_flush( 9 )
    7681
  • palm/trunk/SOURCE/time_integration.f90

    r253 r291  
    44! Actual revisions:
    55! -----------------
    6 ! Bugfix: output if particle time series only if particle advection is switched
     6! Coupling with independent precursor runs.
     7! Bugfix: output of particle time series only if particle advection is switched
    78!         on
    89!
     
    8889!-- Data exchange between coupled models in case that a call has been omitted
    8990!-- at the end of the previous run of a job chain.
    90     IF ( coupling_mode /= 'uncoupled' )  THEN
     91    IF ( coupling_mode /= 'uncoupled'  .AND.  run_coupled )  THEN
    9192!
    9293!--    In case of model termination initiated by the local model the coupler
     
    295296!
    296297!--    Increase simulation time and output times
    297        current_timestep_number = current_timestep_number + 1
    298        simulated_time     = simulated_time   + dt_3d
    299        simulated_time_chr = time_to_string( simulated_time )
     298       current_timestep_number    = current_timestep_number + 1
     299       simulated_time             = simulated_time   + dt_3d
     300       simulated_time_chr         = time_to_string( simulated_time )
     301       time_since_reference_point = simulated_time - coupling_start_time
     302
    300303       IF ( simulated_time >= skip_time_data_output_av )  THEN
    301304          time_do_av         = time_do_av       + dt_3d
     
    329332!
    330333!--    Data exchange between coupled models
    331        IF ( coupling_mode /= 'uncoupled' )  THEN
     334       IF ( coupling_mode /= 'uncoupled'  .AND.  run_coupled )  THEN
    332335          time_coupling = time_coupling + dt_3d
    333336!
  • palm/trunk/SOURCE/write_var_list.f90

    r256 r291  
    55! -----------------
    66! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
    7 ! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b,
    8 ! dp_smooth, dpdxy, topography_grid_convention, u_bulk, v_bulk
     7! canyon_wall_south, conserve_volume_flow_mode, coupling_start_time,
     8! dp_external, dp_level_b, dp_smooth, dpdxy, run_coupled,
     9! time_since_reference_point, topography_grid_convention, u_bulk, v_bulk
    910!
    1011! Former revisions:
     
    171172    WRITE ( 14 )  'conserve_volume_flow_mode     '
    172173    WRITE ( 14 )  conserve_volume_flow_mode
     174    WRITE ( 14 )  'coupling_start_time           '
     175    WRITE ( 14 )  coupling_start_time
    173176    WRITE ( 14 )  'current_timestep_number       '
    174177    WRITE ( 14 )  current_timestep_number
     
    353356    WRITE ( 14 )  'runnr                         '
    354357    WRITE ( 14 )  runnr
     358    WRITE ( 14 )  'run_coupled                   '
     359    WRITE ( 14 )  run_coupled
    355360    WRITE ( 14 )  'sa_init                       '
    356361    WRITE ( 14 )  sa_init
     
    417422    WRITE ( 14 )  'time_run_control              '
    418423    WRITE ( 14 )  time_run_control
     424    WRITE ( 14 )  'time_since_reference_point    '
     425    WRITE ( 14 )  time_since_reference_point
    419426    WRITE ( 14 )  'time_sort_particles           '
    420427    WRITE ( 14 )  time_sort_particles
Note: See TracChangeset for help on using the changeset viewer.