Changeset 4286 for palm/trunk


Ignore:
Timestamp:
Oct 30, 2019 4:01:14 PM (5 years ago)
Author:
resler
Message:

Merge branch resler into trunk

Location:
palm/trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk

  • palm/trunk/SOURCE

  • palm/trunk/SOURCE/Makefile

  • palm/trunk/SOURCE/biometeorology_mod.f90

  • palm/trunk/SOURCE/check_parameters.f90

  • palm/trunk/SOURCE/init_3d_model.f90

  • palm/trunk/SOURCE/nesting_offl_mod.f90

    r4273 r4286  
    2525! -----------------
    2626! $Id$
     27! Fix wrong checks of time from dynamic driver in nesting_offl_mod
     28!
     29! 4273 2019-10-24 13:40:54Z monakurppa
    2730! Add a logical switch nesting_offline_chem
    2831!
     
    20322035!--    not for the soil/wall spinup. However, as the spinup time is added
    20332036!--    to the end_time, this must be considered here.
    2034        IF ( end_time - spinup_time >                                           &
    2035             nest_offl%time(nest_offl%nt-1) - time_utc_init )  THEN
     2037       IF ( end_time - spinup_time > nest_offl%time(nest_offl%nt-1) )  THEN
    20362038          message_string = 'end_time of the simulation exceeds the ' //        &
    20372039                           'time dimension in the dynamic input file.'
    20382040          CALL message( 'nesting_offl_init', 'PA0183', 1, 2, 0, 6, 0 )
    2039        ENDIF
    2040 
    2041        IF ( nest_offl%time(0) /= time_utc_init )  THEN
    2042           message_string = 'Offline nesting: time dimension must start at ' // &
    2043                            ' time_utc_init.'
    2044           CALL message( 'nesting_offl_init', 'PA0676', 1, 2, 0, 6, 0 )
    20452041       ENDIF
    20462042!
  • palm/trunk/SOURCE/radiation_model_mod.f90

    r4271 r4286  
    2828! -----------------
    2929! $Id$
     30! - Fix wrong treating of time_rad during interpolation in radiation_model_mod
     31! - Fix wrong checks of time_rad from dynamic driver in radiation_model_mod
     32! - Add new directional model of human body for MRT: ellipsoid
     33!
     34! 4271 2019-10-23 10:46:41Z maronga
    3035! Bugfix: missing parentheses in calculation of snow albedo
    3136!
     
    670675    LOGICAL                                        ::  mrt_skip_roof = .TRUE.             !< do not calculate MRT above roof surfaces
    671676    LOGICAL                                        ::  mrt_include_sw = .TRUE.            !< should MRT calculation include SW radiation as well?
    672     LOGICAL                                        ::  mrt_geom_human = .TRUE.            !< MRT direction weights simulate human body instead of a sphere
     677    INTEGER(wp)                                    ::  mrt_geom = 1                       !< method for MRT direction weights simulating a sphere or a human body
     678    REAL(wp), DIMENSION(2)                         ::  mrt_geom_params = (/ .12_wp, .88_wp /)   !< parameters for the selected method
    673679    INTEGER(iwp)                                   ::  nrefsteps = 3                      !< number of reflection steps to perform
    674680    REAL(wp), PARAMETER                            ::  ext_coef = 0.6_wp                  !< extinction coefficient (a.k.a. alpha)
     
    967973!-- Public variables and constants / NEEDS SORTING
    968974    PUBLIC albedo, albedo_type, decl_1, decl_2, decl_3, dots_rad, dt_radiation,&
    969            emissivity, force_radiation_call, lat, lon, mrt_geom_human,         &
     975           emissivity, force_radiation_call, lat, lon, mrt_geom,               &
     976           mrt_geom_params,                                                    &
    970977           mrt_include_sw, mrt_nlevels, mrtbl, mrtinsw, mrtinlw, nmrtbl,       &
    971978           rad_net_av, radiation, radiation_scheme, rad_lw_in,                 &
     
    29492956          CALL get_date_time( 0.0_wp, second_of_day=second_of_day )
    29502957
    2951           IF ( ABS( time_rad_f%var1d(0) - second_of_day ) > 1E-6_wp )  THEN
    2952              message_string = 'External radiation forcing: first point in ' // &
    2953                               'time is /= origin_date_time.'
    2954              CALL message( 'radiation_init', 'PA0313', 1, 2, 0, 6, 0 )
    2955           ENDIF
    2956          
    2957           IF ( end_time - spinup_time > time_rad_f%var1d(ntime-1)              &
    2958                                       - second_of_day )  THEN
     2958          IF ( end_time - spinup_time > time_rad_f%var1d(ntime-1) )  THEN
    29592959             message_string = 'External radiation forcing does not cover ' //  &
    29602960                              'the entire simulation time.'
     
    31473147          CALL get_date_time( 0.0_wp, second_of_day=second_of_day_init )
    31483148          t = 0
    3149           DO WHILE ( time_rad_f%var1d(t) <=                                    &
    3150                      time_since_reference_point + second_of_day_init )
     3149          DO WHILE ( time_rad_f%var1d(t) <= time_since_reference_point )
    31513150             t = t + 1
    31523151          ENDDO
     
    31543153          tm = MAX( t-1, 0 )
    31553154         
    3156           fac_dt = ( time_since_reference_point + second_of_day_init           &
     3155          fac_dt = ( time_since_reference_point                                &
    31573156                   - time_rad_f%var1d(tm) + dt_3d )                            &
    31583157                 / ( time_rad_f%var1d(t)  - time_rad_f%var1d(tm) )
     
    38443843                                  constant_albedo, dt_radiation, emissivity,    &
    38453844                                  lw_radiation, max_raytracing_dist,            &
    3846                                   min_irrf_value, mrt_geom_human,               &
     3845                                  min_irrf_value, mrt_geom, mrt_geom_params,    &
    38473846                                  mrt_include_sw, mrt_nlevels,                  &
    38483847                                  mrt_skip_roof, net_radiation, nrefsteps,      &
     
    38603859                                  constant_albedo, dt_radiation, emissivity,    &
    38613860                                  lw_radiation, max_raytracing_dist,            &
    3862                                   min_irrf_value, mrt_geom_human,               &
     3861                                  min_irrf_value, mrt_geom, mrt_geom_params,    &
    38633862                                  mrt_include_sw, mrt_nlevels,                  &
    38643863                                  mrt_skip_roof, net_radiation, nrefsteps,      &
     
    77207719           zbdry(:) = (/( zn0+REAL(izn,wp)*zns, izn=0, nzn )/)
    77217720           vffrac0(:) = (COS(zbdry(0:nzn-1)) - COS(zbdry(1:nzn))) / 2._wp / REAL(naz, wp)
    7722            !
    7723            !--Modify direction weights to simulate human body (lower weight for top-down)
    7724            IF ( mrt_geom_human )  THEN
    7725               vffrac0(:) = vffrac0(:) * MAX(0._wp, SIN(zcent(:))*0.88_wp + COS(zcent(:))*0.12_wp)
     7721!
     7722!--        Modify direction weights to simulate human body (lower weight for
     7723!--        irradiance from zenith, higher from sides) depending on selection.
     7724!--        For mrt_geom=0, no weighting is done (simulates spherical globe
     7725!--        thermometer).
     7726           SELECT CASE ( mrt_geom )
     7727
     7728           CASE ( 1 )
     7729              vffrac0(:) = vffrac0(:) * MAX(0._wp, SIN(zcent(:))*mrt_geom_params(2) &
     7730                                                   + COS(zcent(:))*mrt_geom_params(1))
    77267731              vffrac0(:) = vffrac0(:) / (SUM(vffrac0) * REAL(naz, wp))
    7727            ENDIF
     7732
     7733           CASE ( 2 )
     7734              vffrac0(:) = vffrac0(:)                                          &
     7735                           * SQRT( ( mrt_geom_params(1) * COS(zcent(:)) ) ** 2 &
     7736                                 + ( mrt_geom_params(2) * SIN(zcent(:)) ) ** 2 )
     7737              vffrac0(:) = vffrac0(:) / (SUM(vffrac0) * REAL(naz, wp))
     7738
     7739           END SELECT
    77287740
    77297741           DO  imrt = 1, nmrtbl
  • palm/trunk/SOURCE/salsa_mod.f90

    r4280 r4286  
    2626! -----------------
    2727! $Id$
     28!
     29!
     30! 4280 2019-10-29 14:34:15Z monakurppa
    2831! Corrected a bug in boundary conditions and fac_dt in offline nesting
    2932!
  • palm/trunk/SOURCE/surface_data_output_mod.f90

    r4205 r4286  
    2525! -----------------
    2626! $Id$
     27! Fix wrongly declared nc_stat variable in surface_data_output_mod
     28!
     29! 4205 2019-08-30 13:25:00Z suehring
    2730! - Correct x,y-coordinates of vertical surfaces in netcdf output
    2831! - Change definition of azimuth angle, reference is north 0 degree
     
    119122
    120123   USE netcdf_interface,                                                       &
    121        ONLY:  netcdf_create_att, netcdf_create_dim, netcdf_create_file,        &
    122               netcdf_create_global_atts, netcdf_create_var, netcdf_data_format,&
    123               netcdf_handle_error
     124       ONLY:  nc_stat, netcdf_create_att, netcdf_create_dim,                   &
     125              netcdf_create_file, netcdf_create_global_atts,                   &
     126              netcdf_create_var, netcdf_data_format, netcdf_handle_error
    124127
    125128   USE pegrid
     
    163166   INTEGER(iwp) ::  dosurf_no(0:1) = 0       !< number of surface output quantities
    164167#if defined( __netcdf4_parallel )
    165    INTEGER(iwp) :: nc_stat                   !< error code for netcdf routines
    166168   INTEGER(iwp) ::  oldmode                  !< save old set-fill-mode of netcdf file (not needed, but required for routine call)
    167169
  • palm/trunk/UTIL

Note: See TracChangeset for help on using the changeset viewer.