Ignore:
Timestamp:
Aug 30, 2018 4:06:58 PM (3 years ago)
Author:
kanani
Message:

Fix for progress bar, minor changes

File:
1 edited

Legend:

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

    r2726 r3224  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! Increase printed length of run identifier,
     23! bugfix for restarts
    2324!
    2425! Former revisions:
     
    6162
    6263    USE control_parameters,                                                    &
    63         ONLY : end_time, run_identifier, simulated_time,                      &
     64        ONLY : end_time, initializing_actions, run_identifier, simulated_time, &
    6465               simulated_time_at_begin, spinup_time, time_restart
    6566
     
    106107            time_restart > simulated_time_at_begin )  THEN
    107108          time_to_be_simulated = time_restart - simulated_time_at_begin
     109       ELSEIF ( initializing_actions == 'read_restart_data' )  THEN
     110          time_to_be_simulated = end_time     - simulated_time_at_begin
    108111       ELSE
    109112          time_to_be_simulated = end_time     - simulated_time_at_begin        &
     
    114117
    115118          CALL check_open ( 117 )
    116           WRITE ( 117, FMT='(A20,/)' ) run_identifier
     119          WRITE ( 117, FMT='(A34,/)' ) run_identifier
    117120
    118121       ELSE
     
    156159       IF ( .NOT. initialized )  CALL init_progress_bar
    157160
    158 
    159        remaining_time_in_percent =                                             &
    160           ( simulated_time - simulated_time_at_begin - spinup_time )           &
    161           / time_to_be_simulated
    162 
    163        remaining_time_in_percent_total = ( ( simulated_time - spinup_time )    &
    164                                          / ( end_time       - spinup_time ) )
     161       IF ( initializing_actions == 'read_restart_data' )  THEN
     162          remaining_time_in_percent =                                             &
     163             ( simulated_time - simulated_time_at_begin )                         &
     164             / time_to_be_simulated
     165
     166          remaining_time_in_percent_total = simulated_time / end_time
     167       ELSE
     168          remaining_time_in_percent =                                             &
     169             ( simulated_time - simulated_time_at_begin - spinup_time )           &
     170             / time_to_be_simulated
     171
     172          remaining_time_in_percent_total = ( ( simulated_time - spinup_time )    &
     173                                            / ( end_time       - spinup_time ) )
     174       ENDIF
    165175
    166176!
Note: See TracChangeset for help on using the changeset viewer.