Ignore:
Timestamp:
Sep 10, 2019 5:03:24 PM (5 years ago)
Author:
suehring
Message:

Offline nesting: data input modularized; time variable is defined relative to time_utc_init, so that input data is correctly mapped to actual model time; checks rephrased and new checks for the time dimension added; Netcdf input: routine to retrieve dimension length renamed

File:
1 edited

Legend:

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

    r4210 r4226  
    2828! -----------------
    2929! $Id$
     30! - Netcdf input routine for dimension length renamed
     31! - Define time variable for external radiation input relative to time_utc_init
     32!
     33! 4210 2019-09-02 13:07:09Z suehring
    3034! - Revise steering of splitting diffuse and direct radiation
    3135! - Bugfixes in checks
     
    3438!
    3539! 4208 2019-09-02 09:01:07Z suehring
    36 ! Bugfix in accessing albedo_pars in the clear-sky branch (merge from branch)
     40! Bugfix in accessing albedo_pars in the clear-sky branch
     41! (merge from branch resler)
    3742!
    3843! 4198 2019-08-29 15:17:48Z gronemeier
     
    259264               close_input_file,                                               &
    260265               get_attribute,                                                  &
     266               get_dimension_length,                                           &
    261267               get_variable,                                                   &
    262268               inquire_num_variables,                                          &
     
    264270               input_file_dynamic,                                             &
    265271               input_pids_dynamic,                                             &
    266                netcdf_data_input_get_dimension_length,                         &
    267272               num_var_pids,                                                   &
    268273               pids_id,                                                        &
     
    25102515!--       Input time dimension.
    25112516          IF ( check_existence( vars_pids, 'time_rad' ) )  THEN
    2512              CALL netcdf_data_input_get_dimension_length( pids_id,             &
    2513                                                           ntime,               &
    2514                                                           'time_rad' )
     2517             CALL get_dimension_length( pids_id, ntime, 'time_rad' )
    25152518         
    25162519             ALLOCATE( time_rad_f%var1d(0:ntime-1) )
     
    26372640          ENDIF
    26382641         
    2639           IF ( time_rad_f%var1d(0) /= 0.0_wp )  THEN
     2642          IF ( time_rad_f%var1d(0) /= time_utc_init )  THEN
    26402643             message_string = 'External radiation forcing: first point in ' // &
    2641                               'time is /= 0.0.'
     2644                              'time is /= time_utc_init.'
    26422645             CALL message( 'radiation_init', 'PA0313', 1, 2, 0, 6, 0 )
    26432646          ENDIF
    26442647         
    2645           IF ( end_time - spinup_time > time_rad_f%var1d(ntime-1) )  THEN
     2648          IF ( end_time - spinup_time > time_rad_f%var1d(ntime-1)              &
     2649                                      - time_utc_init )  THEN
    26462650             message_string = 'External radiation forcing does not cover ' //  &
    26472651                              'the entire simulation time.'
     
    28322836       ELSE
    28332837          t = 0
    2834           DO WHILE ( time_rad_f%var1d(t) <= time_since_reference_point )
     2838          DO WHILE ( time_rad_f%var1d(t) <=                                    &
     2839                     time_since_reference_point + time_utc_init )
    28352840             t = t + 1
    28362841          ENDDO
     
    28382843          tm = MAX( t-1, 0 )
    28392844         
    2840           fac_dt = ( time_since_reference_point - time_rad_f%var1d(tm) + dt_3d ) &
     2845          fac_dt = ( time_since_reference_point + time_utc_init                &
     2846                   - time_rad_f%var1d(tm) + dt_3d )                            &
    28412847                 / ( time_rad_f%var1d(t)  - time_rad_f%var1d(tm) )
    28422848          fac_dt = MIN( 1.0_wp, fac_dt )
Note: See TracChangeset for help on using the changeset viewer.