Ignore:
Timestamp:
Nov 25, 2020 3:55:14 PM (3 years ago)
Author:
suehring
Message:

mesoscale nesting: bugfix in obtaining the correct timestamp in case of restart runs; virtual measurements: add missing control flags

File:
1 edited

Legend:

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

    r4724 r4795  
    2525! -----------------
    2626! $Id$
     27! Bugfix in obtaining the correct timestamp in case of restart runs
     28!
     29! 4724 2020-10-06 17:20:39Z suehring
    2730! - Enable LOD=1 input of boundary conditions
    2831! - Minor bugfix - add missing initialization of the top boundary
     
    300303       INTEGER(iwp) ::  nzu               !< number of vertical levels on scalar grid in dynamic input file
    301304       INTEGER(iwp) ::  nzw               !< number of vertical levels on w grid in dynamic input file
    302        INTEGER(iwp) ::  tind              !< time index for reference time in mesoscale-offline nesting
    303        INTEGER(iwp) ::  tind_p            !< time index for following time in mesoscale-offline nesting
     305       INTEGER(iwp) ::  tind = 0          !< time index for reference time in mesoscale-offline nesting
     306       INTEGER(iwp) ::  tind_p = 0        !< time index for following time in mesoscale-offline nesting
    304307
    305308       LOGICAL      ::  init = .FALSE.    !< flag indicating that offline nesting is already initialized
     
    502505       ENDIF
    503506!
    504 !--    CPU measurement
     507!--    Start of CPU measurement
    505508       CALL cpu_log( log_point_s(86), 'NetCDF input forcing', 'start' )
    506 
    507509!
    508510!--    Obtain time index for current point in time. Note, the time coordinate
     
    511513!--    7200.0. Further, since time_since_reference_point is negativ here when
    512514!--    spinup is applied, use MAX function to obtain correct time index.
    513        nest_offl%tind = MINLOC( ABS( nest_offl%time -                                              &
    514                                      MAX( time_since_reference_point, 0.0_wp)                      &
    515                                    ), DIM = 1 ) - 1
     515       nest_offl%tind = MINLOC( ABS( nest_offl%time - MAX( time_since_reference_point, 0.0_wp) ),  &
     516                                DIM = 1 ) - 1
     517!
     518!--    Note, in case of restart runs, the time index for the boundary data may indicate a time
     519!--    in the future. This needs to be checked and corrected.
     520       IF ( TRIM( initializing_actions ) == 'read_restart_data'  .AND.                             &
     521            nest_offl%time(nest_offl%tind) > time_since_reference_point )  THEN
     522          nest_offl%tind = nest_offl%tind - 1
     523       ENDIF
    516524       nest_offl%tind_p = nest_offl%tind + 1
    517525!
Note: See TracChangeset for help on using the changeset viewer.