Ignore:
Timestamp:
Nov 25, 2020 3:55:14 PM (4 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/salsa_mod.f90

    r4785 r4795  
    2626! -----------------
    2727! $Id$
     28! Bugfix in obtaining the correct timestamp in case of restart runs
     29!
     30! 4785 2020-11-15 20:11:14Z monakurppa
    2831! Fixing a segmentation fault in initialising aerosol and gas emissions
    2932!
     
    328331        ONLY:  air_chemistry, bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r, bc_dirichlet_s,      &
    329332               bc_lr, bc_lr_cyc, bc_ns, bc_ns_cyc, bc_radiation_l, bc_radiation_n, bc_radiation_r, &
    330                bc_radiation_s, coupling_char, debug_output, dt_3d, intermediate_timestep_count,    &
     333               bc_radiation_s, coupling_char, debug_output, dt_3d,                                 &
     334               initializing_actions,                                                               &
     335               intermediate_timestep_count,                                                        &
    331336               intermediate_timestep_count_max, land_surface, max_pr_salsa, message_string,        &
    332337               monotonic_limiter_z, plant_canopy, pt_surface, restart_data_format_output, salsa,   &
     
    779784       INTEGER(iwp) ::  nt          !< number of time levels in dynamic input file
    780785       INTEGER(iwp) ::  nzu         !< number of vertical levels on scalar grid in dynamic input file
    781        INTEGER(iwp) ::  tind        !< time index for reference time in mesoscale-offline nesting
    782        INTEGER(iwp) ::  tind_p      !< time index for following time in mesoscale-offline nesting
     786       INTEGER(iwp) ::  tind = 0    !< time index for reference time in mesoscale-offline nesting
     787       INTEGER(iwp) ::  tind_p = 0  !< time index for following time in mesoscale-offline nesting
    783788
    784789       INTEGER(iwp), DIMENSION(maxspec) ::  cc_in2mod = 0  !< to transfer chemical composition from input to model
     
    1375913764!-- Obtain time index for current point in time.
    1376013765    salsa_nest_offl%tind = MINLOC( ABS( salsa_nest_offl%time -                                     &
    13761                                    MAX( time_since_reference_point, 0.0_wp ) ), DIM = 1 ) - 1
     13766                                        MAX( time_since_reference_point, 0.0_wp ) ), DIM = 1 ) - 1
     13767!
     13768!-- Note, in case of restart runs, the time index for the boundary data may indicate a time
     13769!-- in the future. This needs to be checked and corrected.
     13770    IF ( TRIM( initializing_actions ) == 'read_restart_data'  .AND.                                &
     13771         salsa_nest_offl%time(salsa_nest_offl%tind) > time_since_reference_point )  THEN
     13772       salsa_nest_offl%tind = salsa_nest_offl%tind - 1
     13773    ENDIF
    1376213774    salsa_nest_offl%tind_p = salsa_nest_offl%tind + 1
    1376313775!
Note: See TracChangeset for help on using the changeset viewer.