Changeset 4669 for palm/trunk/SOURCE


Ignore:
Timestamp:
Sep 9, 2020 1:43:47 PM (4 years ago)
Author:
pavelkrc
Message:

Fix multiple issues with radiation call times

Location:
palm/trunk/SOURCE
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/land_surface_model_mod.f90

    r4666 r4669  
    2020! Current revisions:
    2121! -----------------
    22 ! 
    23 ! 
     22!
     23!
    2424! Former revisions:
    2525! -----------------
    2626! $Id$
     27! Fix calculation of force_radiation_call
     28!
     29! 4666 2020-09-04 19:22:56Z maronga
    2730! Bugfix: wrong value for g_d for vegetation_type = 7 (0.13 -> 0.03)
    2831!
     
    21962199         == intermediate_timestep_count_max-1 )  THEN
    21972200#if defined( __parallel )
    2198        IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
    2199        CALL MPI_ALLREDUCE( force_radiation_call_l, force_radiation_call,       &
    2200                            1, MPI_LOGICAL, MPI_LOR, comm2d, ierr )
     2201       IF ( .NOT. force_radiation_call ) THEN
     2202          IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
     2203          CALL MPI_ALLREDUCE( force_radiation_call_l, force_radiation_call,       &
     2204                              1, MPI_LOGICAL, MPI_LOR, comm2d, ierr )
     2205       ENDIF
    22012206#else
    2202        force_radiation_call = force_radiation_call_l
     2207       force_radiation_call = force_radiation_call .OR. force_radiation_call_l
    22032208#endif
    22042209       force_radiation_call_l = .FALSE.
  • palm/trunk/SOURCE/time_integration.f90

    r4668 r4669  
    2525! -----------------
    2626! $Id$
     27! - Fix missing call of radiation after spinup
     28! - Fix calculation of force_radiation_call
     29! - Fix calculation of radiation times
     30!
     31! 4668 2020-09-09 13:00:16Z pavelkrc
    2732! Improve debug messages during timestepping
    2833!
     
    11941199!
    11951200!--    If required, calculate radiative fluxes and heating rates
    1196        IF ( radiation  .AND.  time_since_reference_point > skip_time_do_radiation )  THEN
     1201       IF ( radiation  .AND.  time_since_reference_point >= skip_time_do_radiation )  THEN
    11971202
    11981203          time_radiation = time_radiation + dt_3d
     
    12021207             CALL cpu_log( log_point(50), 'radiation', 'start' )
    12031208
    1204              IF ( .NOT. force_radiation_call )  THEN
     1209             IF ( time_radiation >= dt_radiation )  THEN
    12051210                time_radiation = time_radiation - dt_radiation
    12061211             ENDIF
     
    12111216!--          solar positions
    12121217             time_since_reference_point_save = time_since_reference_point
    1213              time_since_reference_point = REAL( FLOOR( time_since_reference_point /             &
    1214                                                        dt_radiation ), wp ) * dt_radiation
     1218             time_since_reference_point = time_since_reference_point -                            &
     1219                                          MODULO(time_since_reference_point, dt_radiation)
    12151220
    12161221             CALL radiation_control
     
    12251230!--          Return the current time to its original value
    12261231             time_since_reference_point = time_since_reference_point_save
     1232!
     1233!--          Reset forcing of radiation call
     1234             force_radiation_call = .FALSE.
    12271235
    12281236             CALL cpu_log( log_point(50), 'radiation', 'stop' )
  • palm/trunk/SOURCE/time_integration_spinup.f90

    r4668 r4669  
    2525! -----------------
    2626! $Id$
     27! - Fix missing call of radiation after spinup
     28! - Fix calculation of force_radiation_call
     29! - Fix calculation of radiation times
     30!
     31! 4668 2020-09-09 13:00:16Z pavelkrc
    2732! Improve debug messages during timestepping
    2833!
     
    481486                CALL radiation_interaction
    482487             ENDIF
     488!
     489!--          Reset forcing of radiation call
     490             force_radiation_call = .FALSE.
     491
    483492          ENDIF
    484493       ENDIF
     
    632641!-- Reset time step
    633642    dt_3d = dt_save
     643!-- Force radiation step in time zero
     644!-- It is performed at the end of init_radiation in case of run without spinup
     645    time_radiation = dt_radiation
    634646
    635647    DEALLOCATE(pt_save)
  • palm/trunk/SOURCE/urban_surface_mod.f90

    r4668 r4669  
    2727! -----------------
    2828! $Id$
     29! Fix calculation of force_radiation_call
     30!
     31! 4668 2020-09-09 13:00:16Z pavelkrc
    2932! Limit vertical r_a similarly to horizontal
    3033!
     
    84278430      IF ( intermediate_timestep_count == intermediate_timestep_count_max-1 )  THEN
    84288431#if defined( __parallel )
    8429         IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
    8430         CALL MPI_ALLREDUCE( force_radiation_call_l, force_radiation_call,                          &
    8431                             1, MPI_LOGICAL, MPI_LOR, comm2d, ierr )
     8432        IF ( .NOT. force_radiation_call ) THEN
     8433           IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
     8434           CALL MPI_ALLREDUCE( force_radiation_call_l, force_radiation_call,                      &
     8435                               1, MPI_LOGICAL, MPI_LOR, comm2d, ierr )
     8436        ENDIF
    84328437#else
    8433         force_radiation_call = force_radiation_call_l
     8438        force_radiation_call = force_radiation_call .OR. force_radiation_call_l
    84348439#endif
    84358440        force_radiation_call_l = .FALSE.
Note: See TracChangeset for help on using the changeset viewer.