Ignore:
Timestamp:
Sep 11, 2019 1:58:14 PM (22 months ago)
Author:
suehring
Message:

Several bugfixes: profile initialization of chemical species in restart runs; Runge-Kutta tendency array not initialized in chemistry model in restart runs; fixed determination of time indices for chemical emissions (introduced with commit -4227); Update chemistry profiles in offline nesting; initialize canopy resistances for greened building walls (even if green fraction is zero)

File:
1 edited

Legend:

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

    r4227 r4230  
    2727! -----------------
    2828! $Id$
     29! Bugfix, consider that time_since_reference_point can be also negative when
     30! time indices are determined.
     31!
     32! 4227 2019-09-10 18:04:34Z gronemeier
    2933! implement new palm_date_time_mod
    3034!
     
    10911095
    10921096          CALL get_date_time( 0.0_wp, second_of_day=time_utc_init )
    1093           CALL get_date_time( time_since_reference_point, hour=hour_of_day )
    1094 
    1095           days_since_reference_point = INT( FLOOR( ( time_utc_init + time_since_reference_point ) &
     1097          CALL get_date_time( MAX( 0.0_wp, time_since_reference_point ),       &
     1098                              hour=hour_of_day )
     1099
     1100          days_since_reference_point = INT( FLOOR( (                            &
     1101                    time_utc_init + MAX( 0.0_wp, time_since_reference_point ) ) &
    10961102                                                   / seconds_per_day ) )
    10971103
     
    11241130!-- Update time indices
    11251131
    1126              CALL get_date_time( time_since_reference_point, &
     1132             CALL get_date_time( MAX( time_since_reference_point, 0.0_wp ),    &
    11271133                                 day_of_year=day_of_year, hour=hour_of_day )
    11281134             index_hh = ( day_of_year - 1_iwp ) * hour_of_day
     
    11561162!
    11571163!-- Update time indices
    1158              CALL get_date_time( time_since_reference_point, &
    1159                                  month=month_of_year,        &
    1160                                  day=day_of_month,           &
    1161                                  hour=hour_of_day,           &
     1164             CALL get_date_time( MAX( time_since_reference_point, 0.0_wp ), &
     1165                                 month=month_of_year,                       &
     1166                                 day=day_of_month,                          &
     1167                                 hour=hour_of_day,                          &
    11621168                                 day_of_week=day_of_week     )
    11631169             index_mm = month_of_year
     
    12301236!
    12311237!--       Get time-factor for specific hour
    1232           CALL get_date_time( time_since_reference_point, hour=hour_of_day )
     1238          CALL get_date_time( MAX( time_since_reference_point, 0.0_wp ),              &
     1239                              hour=hour_of_day )
    12331240
    12341241          index_hh = hour_of_day
Note: See TracChangeset for help on using the changeset viewer.