Changeset 2995 for palm


Ignore:
Timestamp:
Apr 19, 2018 12:13:16 PM (7 years ago)
Author:
Giersch
Message:

Bugfixes related to spinup and radiation model

Location:
palm/trunk/SOURCE
Files:
3 edited

Legend:

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

    r2977 r2995  
    2525! -----------------
    2626! $Id$
     27! CALL radiation_control is not necessary during initialization because
     28! calculation of radiative fluxes at model start is done in radiation_init
     29! in any case
     30!
     31! 2977 2018-04-17 10:27:57Z kanani
    2732! Implement changes from branch radiation (r2948-2971) with minor modifications
    2833! (moh.hefny):
     
    514519    USE radiation_model_mod,                                                   &
    515520        ONLY:  average_radiation,                                              &
    516                radiation_init, radiation, radiation_control, radiation_scheme, &
     521               radiation_init, radiation, radiation_scheme,                    &
    517522               radiation_calc_svf, radiation_write_svf,                        &
    518523               radiation_interaction, radiation_interactions,                  &
     
    24352440!--    Adjust radiative fluxes. In case of urban and land surfaces, also
    24362441!--    call an initial interaction.
    2437        CALL radiation_control
    24382442       IF ( radiation_interactions )  THEN
    24392443          CALL radiation_interaction
    24402444       ENDIF
    24412445    ENDIF
    2442    
     2446
    24432447!
    24442448!-- Temporary solution to add LSM and radiation time series to the default
  • palm/trunk/SOURCE/parin.f90

    r2980 r2995  
    2525! -----------------
    2626! $Id$
     27! time_since_reference_point must be calculated/initialized before the first 
     28! call of functions related to the radiation model which occur in
     29! time_integration_spinup or time_integration
     30!
     31! 2980 2018-04-17 15:19:27Z suehring
    2732! Revise message call
    2833!
     
    864869             IF ( spinup_time > 0.0_wp )  THEN
    865870                coupling_start_time = spinup_time
     871                time_since_reference_point = simulated_time - coupling_start_time
    866872                IF ( spinup_pt_mean == 9999999.9_wp )  THEN
    867873                   spinup_pt_mean = pt_surface
  • palm/trunk/SOURCE/radiation_model_mod.f90

    r2977 r2995  
    2828! -----------------
    2929! $Id$
     30! IF-statement in radiation_init removed so that the calculation of radiative
     31! fluxes at model start is done in any case, bugfix in
     32! radiation_presimulate_solar_pos (end_time is the sum of end_time and the
     33! spinup_time specified in the p3d_file ), list of variables/fields that have
     34! to be written out or read in case of restarts has been extended
     35!
     36! 2977 2018-04-17 10:27:57Z kanani
    3037! Implement changes from branch radiation (r2948-2971) with minor modifications,
    3138! plus some formatting.
     
    21622169!
    21632170!--    Calculate radiative fluxes at model start
    2164        IF (  TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
    2165 
    2166           SELECT CASE ( radiation_scheme )
    2167              CASE ( 'rrtmg' )
    2168                 CALL radiation_rrtmg
    2169              CASE ( 'clear-sky' )
    2170                 CALL radiation_clearsky
    2171              CASE ( 'constant' )
    2172                 CALL radiation_constant
    2173              CASE DEFAULT
    2174           END SELECT
    2175 
    2176        ENDIF
     2171       SELECT CASE ( TRIM( radiation_scheme ) )
     2172
     2173          CASE ( 'rrtmg' )
     2174             CALL radiation_rrtmg
     2175
     2176          CASE ( 'clear-sky' )
     2177             CALL radiation_clearsky
     2178
     2179          CASE ( 'constant' )
     2180             CALL radiation_constant
     2181
     2182          CASE DEFAULT
     2183
     2184       END SELECT
    21772185
    21782186       RETURN
     
    22092217!--    Calculate sky transmissivity
    22102218       sky_trans = 0.6_wp + 0.2_wp * zenith(0)
     2219
    22112220!
    22122221!--    Calculate value of the Exner function at model surface
     
    23022311                   exn1 = (hyp(k) / 100000.0_wp )**0.286_wp
    23032312
    2304                    surf%rad_sw_in(m)  = solar_constant * sky_trans * zenith(0)
     2313                   surf%rad_sw_in(m) = solar_constant * sky_trans * zenith(0)
     2314
    23052315!
    23062316!--                Weighted average according to surface fraction.
     
    23612371                rad_lw_out(0,j,i) = surf%rad_lw_out(m)
    23622372             ENDDO
    2363 
     2373 
    23642374          END SUBROUTINE radiation_clearsky_surf
    23652375
     
    65936603!
    65946604!--   Process simulation time
    6595       DO  it = 0, CEILING(end_time / dt_radiation)
     6605      DO  it = 0, CEILING(( end_time - spinup_time ) / dt_radiation)
    65966606         time_since_reference_point = REAL(it, wp) * dt_radiation
    65976607         CALL simulate_pos
     
    66046614      dsidir(:,:) = dsidir_tmp(:, 1:ndsidir)
    66056615      DEALLOCATE ( dsidir_tmp )
     6616
    66066617      ALLOCATE ( dsitrans(nsurfl, ndsidir) )
    66076618      ALLOCATE ( dsitransc(npcbl, ndsidir) )
     
    67526763             
    67536764 !--             read nsvfl, ncsfl
    6754               READ ( fsvf ) nsvfl, ncsfl, nsurfl_from_file
     6765              READ ( fsvf ) nsvfl, ncsfl, nsurfl_from_file, npcbl, ndsidir
    67556766              IF ( nsvfl < 0  .OR.  ncsfl < 0 )  THEN
    67566767                  WRITE( message_string, * ) 'Wrong number of SVF or CSF'
     
    67726783                 READ(fsvf) skyvf
    67736784                 READ(fsvf) skyvft
     6785                 READ(fsvf) dsitrans 
    67746786              ENDIF
    6775                
     6787             
     6788              IF ( plant_canopy  .AND.  npcbl > 0 ) THEN
     6789                 READ ( fsvf )  dsitransc
     6790              ENDIF
     6791   
    67766792              IF ( nsvfl > 0 )  THEN
    67776793                 IF ( .NOT. ALLOCATED( svf ) )      ALLOCATE( svf(ndsvf,nsvfl) )
     
    68256841
    68266842                WRITE ( fsvf )  rad_version
    6827                 WRITE ( fsvf )  nsvfl, ncsfl, nsurfl
     6843                WRITE ( fsvf )  nsvfl, ncsfl, nsurfl, npcbl, ndsidir
    68286844                IF ( nsurfl > 0 ) THEN
    68296845                   WRITE ( fsvf )  skyvf
    68306846                   WRITE ( fsvf )  skyvft
     6847                   WRITE ( fsvf )  dsitrans
     6848                ENDIF
     6849                IF ( npcbl > 0 ) THEN
     6850                   WRITE ( fsvf )  dsitransc
    68316851                ENDIF
    68326852                IF ( nsvfl > 0 ) THEN
Note: See TracChangeset for help on using the changeset viewer.