Changeset 4358 for palm


Ignore:
Timestamp:
Dec 30, 2019 1:03:09 PM (5 years ago)
Author:
suehring
Message:

Bugfix, time coordinate is relative to origin_time rather than to 00:00:00 UTC; Refine post-initialization check for realistically inital values of mixing ratio. Give an error message for faulty initial values, but only a warning in a restart run.

Location:
palm/trunk/SOURCE
Files:
2 edited

Legend:

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

    r4347 r4358  
    2525! -----------------
    2626! $Id$
     27! Refine post-initialization check for realistically inital values of mixing ratio. Give an error
     28! message for faulty initial values, but only a warning in a restart run.
     29!
     30! 4347 2019-12-18 13:18:33Z suehring
    2731! Implement post-initialization check for realistically inital values of mixing ratio
    2832!
     
    479483!-- not exceed the saturation mixing ratio by more than 2 percent. Please note, the check is
    480484!-- performed for each grid point (not just for a vertical profile), in order to cover also
    481 !-- three-dimensional initialization.
     485!-- three-dimensional initialization. Note, this check gives an error only for the initial run not
     486!-- for a restart run. In case there are no cloud physics considered, the mixing ratio can exceed
     487!-- the saturation moisture. This case a warning is given.
    482488    IF ( humidity  .AND.  .NOT. neutral )  THEN
    483489       DO  i = nxl, nxr
     
    502508#endif
    503509
    504        IF ( .NOT. realistic_q )  THEN
     510       IF ( .NOT. realistic_q  .AND.                                                               &
     511            TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
    505512          message_string = 'The initial mixing ratio exceeds the saturation mixing ratio.'
    506513          CALL message( 'dynamic_init_checks', 'PA0697', 2, 2, 0, 6, 0 )
     514       ELSEIF ( .NOT. realistic_q  .AND.                                                           &
     515                TRIM( initializing_actions ) == 'read_restart_data' )  THEN
     516          message_string = 'The mixing ratio exceeds the saturation mixing ratio.'
     517          CALL message( 'dynamic_init_checks', 'PA0697', 0, 1, 0, 6, 0 )
    507518       ENDIF
    508519    ENDIF
  • palm/trunk/SOURCE/nesting_offl_mod.f90

    r4346 r4358  
    2525! -----------------
    2626! $Id$
     27! Bugfix, time coordinate is relative to origin_time rather than to 00:00:00
     28! UTC.
     29!
     30! 4346 2019-12-18 11:55:56Z motisi
    2731! Introduction of wall_flags_total_0, which currently sets bits based on static
    2832! topography information used in wall_flags_static_0
     
    213217               pids_id
    214218
    215     USE palm_date_time_mod,                                                    &
    216         ONLY:  get_date_time
    217 
    218219    USE pegrid
    219220
     
    304305
    305306    REAL(wp) ::  fac_dt              !< interpolation factor
    306     REAL(wp) ::  time_utc_init       !< time in seconds-of-day of origin_date_time
    307307    REAL(wp) ::  zi_ribulk = 0.0_wp  !< boundary-layer depth according to bulk Richardson criterion, i.e. the height where Ri_bulk exceeds the critical
    308308                                     !< bulk Richardson number of 0.2
     
    433433!--    Check if dynamic driver data input is required.
    434434       IF ( nest_offl%time(nest_offl%tind_p) <=                                &
    435             MAX( time_since_reference_point, 0.0_wp) + time_utc_init  .OR.     &
     435            MAX( time_since_reference_point, 0.0_wp)  .OR.                     &
    436436            .NOT.  nest_offl%init )  THEN
    437437          CONTINUE
     
    447447!
    448448!--    Obtain time index for current point in time. Note, the time coordinate
    449 !--    in the input file is relative to time_utc_init. Since time_since_...
    450 !--    is negativ when spinup is used, use MAX function to obtain correct
    451 !--    time at the beginning.
    452        nest_offl%tind = MINLOC( ABS( nest_offl%time - (                        &
    453                                      time_utc_init +                           &
    454                                      MAX( time_since_reference_point, 0.0_wp) )&
     449!--    in the input file is always relative to the initial time in UTC, i.e.
     450!--    the time coordinate always starts at 0.0 even if the initial UTC is e.g.
     451!--    7200.0. Further, since time_since_reference_point is negativ here when
     452!--    spinup is applied, use MAX function to obtain correct time index.
     453       nest_offl%tind = MINLOC( ABS( nest_offl%time -                          &
     454                                     MAX( time_since_reference_point, 0.0_wp)  &
    455455                                   ), DIM = 1 ) - 1
    456456       nest_offl%tind_p = nest_offl%tind + 1
     
    15821582!--    t+dt can slightly exceed time(tind_p) before boundary data is updated
    15831583!--    again.
    1584        fac_dt = ( time_utc_init + time_since_reference_point                   &
     1584       fac_dt = ( time_since_reference_point                                   &
    15851585                - nest_offl%time(nest_offl%tind) + dt_3d ) /                   &
    15861586           ( nest_offl%time(nest_offl%tind_p) - nest_offl%time(nest_offl%tind) )
     
    18861886           
    18871887       INTEGER(iwp) ::  n !< running index for chemical species
    1888 
    1889 !
    1890 !--    Get time_utc_init from origin_date_time
    1891        CALL get_date_time( 0.0_wp, second_of_day = time_utc_init )
    18921888
    18931889!--    Allocate arrays for geostrophic wind components. Arrays will
Note: See TracChangeset for help on using the changeset viewer.