Changeset 4026 for palm/trunk


Ignore:
Timestamp:
Jun 12, 2019 4:50:15 PM (5 years ago)
Author:
suehring
Message:

Improve albedo initialization in land-surface model by setting always some default albedo types, in order to be independent on any user settings; Mask topography at boundary grid cells in nesting mass conservation

Location:
palm/trunk/SOURCE
Files:
2 edited

Legend:

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

    r4024 r4026  
    2525! -----------------
    2626! $Id$
     27! Further revision of last commit in order to avoid any side effects when
     28! albedo type is not set in namelist and default albedo type changes.
     29!
     30! 4024 2019-06-12 14:06:46Z suehring
    2731! Bugfix in albedo initialization, caused crashes in rrtmg calls
    2832!
     
    27922796       ALLOCATE ( surf_lsm_h%albedo_type(0:2,1:surf_lsm_h%ns) )
    27932797       ALLOCATE ( surf_lsm_h%emissivity(0:2,1:surf_lsm_h%ns) )
    2794        surf_lsm_h%albedo_type = albedo_type     
     2798!
     2799!--    Initialize albedo type according to its default type, in order to set values
     2800!--    independent on default albedo_type in radiation model.
     2801       surf_lsm_h%albedo_type(ind_veg_wall,:)  =                               &
     2802                             INT( vegetation_pars(ind_v_at,vegetation_type) )
     2803       surf_lsm_h%albedo_type(ind_wat_win,:)   =                               &
     2804                             INT( water_pars(ind_w_at,water_type)           )
     2805       surf_lsm_h%albedo_type(ind_pav_green,:) =                               &
     2806                             INT( pavement_pars(ind_p_at,pavement_type)     )
    27952807       surf_lsm_h%emissivity  = emissivity
    27962808       DO  l = 0, 3
    27972809          ALLOCATE ( surf_lsm_v(l)%albedo_type(0:2,1:surf_lsm_v(l)%ns) )
    27982810          ALLOCATE ( surf_lsm_v(l)%emissivity(0:2,1:surf_lsm_v(l)%ns)  )
    2799           surf_lsm_v(l)%albedo_type = albedo_type
     2811!
     2812!--       Initialize albedo type according to its default type, in order to
     2813!--       set values independent on default albedo_type in radiation model.
     2814          surf_lsm_v(l)%albedo_type(ind_veg_wall,:)  =                         &
     2815                             INT( vegetation_pars(ind_v_at,vegetation_type) )
     2816          surf_lsm_v(l)%albedo_type(ind_wat_win,:)   =                         &
     2817                             INT( water_pars(ind_w_at,water_type)           )
     2818          surf_lsm_v(l)%albedo_type(ind_pav_green,:) =                         &
     2819                             INT( pavement_pars(ind_p_at,pavement_type)     )
    28002820          surf_lsm_v(l)%emissivity  = emissivity
    28012821       ENDDO
  • palm/trunk/SOURCE/pmc_interface_mod.f90

    r4011 r4026  
    2525! -----------------
    2626! $Id$
     27! Masked topography at boundary grid points in mass conservation, in order to
     28! avoid that mean velocities within topography are imposed
     29!
     30! 4011 2019-05-31 14:34:03Z hellstea
    2731! Mass (volume) flux correction included to ensure global mass conservation for child domains.
    2832!
     
    52885292          DO  j = nys, nyn
    52895293             DO  k = nzb + 1, nzt
    5290                 u(k,j,i) = u(k,j,i) + u_corr_left
     5294                u(k,j,i) = u(k,j,i) + u_corr_left                              &
     5295                     * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 1 ) )
    52915296             ENDDO
    52925297          ENDDO
     
    52995304          DO  j = nys, nyn
    53005305             DO  k = nzb + 1, nzt
    5301                 u(k,j,i) = u(k,j,i) + u_corr_right
     5306                u(k,j,i) = u(k,j,i) + u_corr_right                              &
     5307                      * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 1 ) )
    53025308             ENDDO
    53035309          ENDDO
     
    53105316          DO  j = nysg, nys
    53115317             DO  k = nzb + 1, nzt
    5312                 v(k,j,i) = v(k,j,i) + v_corr_south
     5318                v(k,j,i) = v(k,j,i) + v_corr_south                              &
     5319                      * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 2 ) )
    53135320             ENDDO
    53145321          ENDDO
     
    53215328          DO  j = nyn+1, nyng
    53225329             DO  k = nzb + 1, nzt
    5323                 v(k,j,i) = v(k,j,i) + v_corr_north
     5330                v(k,j,i) = v(k,j,i) + v_corr_north                              &
     5331                      * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 2 ) )
    53245332             ENDDO
    53255333          ENDDO
Note: See TracChangeset for help on using the changeset viewer.