Changeset 153 for palm/trunk/SOURCE


Ignore:
Timestamp:
Mar 19, 2008 9:41:30 AM (16 years ago)
Author:
steinfeld
Message:

Update for the plant canopy model

Location:
palm/trunk/SOURCE
Files:
9 edited

Legend:

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

    r151 r153  
    44! Actual revisions:
    55! -----------------
     6! Leaf area density (LAD) explicitly set to its surface value at k=0
    67! Case of reading data for recycling included in initializing_actions,
    78! check of turbulent_inflow and calculation of recycling_plane
     
    955956
    956957          IF ( .NOT. ocean ) THEN
     958
     959             lad(0) = lad_surface
    957960 
    958961             lad_vertical_gradient_level_ind(1) = 0
  • palm/trunk/SOURCE/header.f90

    r151 r153  
    371371
    372372       WRITE ( io, 280 ) canopy_mode, pch_index, drag_coefficient
     373       IF ( passive_scalar ) THEN
     374          WRITE ( io, 281 ) scalar_exchange_coefficient,   &
     375                            leaf_surface_concentration
     376       ENDIF
     377
     378!
     379!--    Heat flux at the top of vegetation
     380       WRITE ( io, 282 ) cthf
    373381
    374382!
     
    397405       ENDDO
    398406
    399        WRITE ( io, 281 )  TRIM( coordinates ), TRIM( learde ), &
     407       WRITE ( io, 283 )  TRIM( coordinates ), TRIM( learde ), &
    400408                          TRIM( gradients ), TRIM( slices )
    401409
     
    13791387              ' Canopy top: ',I4 / &
    13801388              ' Leaf drag coefficient: ',F6.2 /)
    1381 281 FORMAT (/ ' Characteristic levels of the leaf area density:'// &
     1389281 FORMAT (/ ' Scalar_exchange_coefficient: ',F6.2 / &
     1390              ' Scalar concentration at leaf surfaces in kg/m**3: ',F6.2 /)
     1391282 FORMAT (' Predefined constant heatflux at the top of the vegetation: ',F6.2,' K m/s')
     1392283 FORMAT (/ ' Characteristic levels of the leaf area density:'// &
    13821393              ' Height:              ',A,'  m'/ &
    13831394              ' Leaf area density:   ',A,'  m**2/m**3'/ &
  • palm/trunk/SOURCE/init_3d_model.f90

    r152 r153  
    77! Actual revisions:
    88! -----------------
     9! Further amendments to and modifications in the initialisation of the plant
     10! canopy model
    911! Allocation of hom_sum moved to parin, initialization of spectrum_x|y directly
    1012! after allocating theses arrays,
     
    9092    INTEGER, DIMENSION(:,:), ALLOCATABLE ::  ngp_2dh_outer_l,  &
    9193         ngp_2dh_s_inner_l
     94
     95    REAL ::  a, b
    9296
    9397    REAL, DIMENSION(1:2) ::  volume_flow_area_l, volume_flow_initial_l
     
    248252                  lad_w(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),  &
    249253                  cdc(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) )
     254
     255       IF ( passive_scalar ) THEN
     256          ALLOCATE ( sls(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),   &
     257                     sec(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) )
     258       ENDIF
     259
     260       IF ( cthf /= 0.0 ) THEN
     261          ALLOCATE ( lai(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),   &
     262                     canopy_heat_flux(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) )
     263       ENDIF
     264
    250265    ENDIF
    251266
     
    10781093                   lad_s(:,j,i) = lad(:)
    10791094                   cdc(:,j,i)   = drag_coefficient
     1095                   IF ( passive_scalar ) THEN
     1096                      sls(:,j,i) = leaf_surface_concentration
     1097                      sec(:,j,i) = scalar_exchange_coefficient
     1098                   ENDIF
    10801099                ENDDO
    10811100             ENDDO
     
    10961115       CALL exchange_horiz( cdc )
    10971116
     1117       IF ( passive_scalar ) THEN
     1118          CALL exchange_horiz( sls )
     1119          CALL exchange_horiz( sec )
     1120       ENDIF
     1121
     1122!
     1123!--    Sharp boundaries of the plant canopy in horizontal directions
     1124!--    In vertical direction the interpolation is retained, as the leaf
     1125!--    area density is initialised by prescribing a vertical profile
     1126!--    consisting of piecewise linear segments. The upper boundary
     1127!--    of the plant canopy is now defined by lad_w(pch_index,:,:) = 0.0.
     1128
    10981129       DO  i = nxl, nxr
    10991130          DO  j = nys, nyn
    11001131             DO  k = nzb, nzt+1
    1101                 lad_u(k,j,i) = 0.5 * ( lad_s(k,j,i-1) + lad_s(k,j,i) )
    1102                 lad_v(k,j,i) = 0.5 * ( lad_s(k,j-1,i) + lad_s(k,j,i) )
     1132                IF ( lad_s(k,j,i) > 0.0 ) THEN
     1133                   lad_u(k,j,i)   = lad_s(k,j,i)
     1134                   lad_u(k,j,i+1) = lad_s(k,j,i)
     1135                   lad_v(k,j,i)   = lad_s(k,j,i)
     1136                   lad_v(k,j+1,i) = lad_s(k,j,i)
     1137                ENDIF
    11031138             ENDDO
    11041139             DO  k = nzb, nzt
     
    11081143       ENDDO
    11091144
    1110        lad_w(nzt+1,:,:) = lad_w(nzt,:,:)
     1145       lad_w(pch_index,:,:) = 0.0
     1146       lad_w(nzt+1,:,:)     = lad_w(nzt,:,:)
    11111147
    11121148       CALL exchange_horiz( lad_u )
    11131149       CALL exchange_horiz( lad_v )
    11141150       CALL exchange_horiz( lad_w )
    1115  
     1151
     1152!
     1153!--    Initialisation of the canopy heat source distribution
     1154       IF ( cthf /= 0.0 ) THEN
     1155!
     1156!--       Piecewise evaluation of the leaf area index by
     1157!--       integration of the leaf area density
     1158          lai(:,:,:) = 0.0
     1159          DO  i = nxl-1, nxr+1
     1160             DO  j = nys-1, nyn+1
     1161                DO  k = pch_index-1, 0, -1
     1162                   lai(k,j,i) = lai(k+1,j,i) +                   &
     1163                                ( 0.5 * ( lad_w(k+1,j,i) +       &
     1164                                          lad_s(k+1,j,i) ) *     &
     1165                                  ( zw(k+1) - zu(k+1) ) )  +     &
     1166                                ( 0.5 * ( lad_w(k,j,i)   +       &
     1167                                          lad_s(k+1,j,i) ) *     &
     1168                                  ( zu(k+1) - zw(k) ) )
     1169                ENDDO
     1170             ENDDO
     1171          ENDDO
     1172
     1173!
     1174!--       Evaluation of the upward kinematic vertical heat flux within the
     1175!--       canopy
     1176          DO  i = nxl-1, nxr+1
     1177             DO  j = nys-1, nyn+1
     1178                DO  k = 0, pch_index
     1179                   canopy_heat_flux(k,j,i) = cthf *                    &
     1180                                             exp( -0.6 * lai(k,j,i) )
     1181                ENDDO
     1182             ENDDO
     1183          ENDDO
     1184
     1185!
     1186!--       The near surface heat flux is derived from the heat flux
     1187!--       distribution within the canopy
     1188          shf(:,:) = canopy_heat_flux(0,:,:)
     1189
     1190          IF ( ASSOCIATED( shf_m ) ) shf_m = shf
     1191
     1192       ENDIF
     1193
    11161194    ENDIF
    11171195
  • palm/trunk/SOURCE/modules.f90

    r151 r153  
    55! Actual revisions:
    66! -----------------
     7! +canopy_heat_flux, cthf, lai,
     8! +leaf_surface_concentration, scalar_exchange_coefficient, sec, sls
    79! +hor_index_bounds, hor_index_bounds_previous_run, id_inflow,
    810! inflow_damping_*, mean_inflow_profiles, numprocs_previous_run, nx_on_file,
     
    135137
    136138    REAL, DIMENSION(:,:,:), ALLOCATABLE ::                                     &
    137           cdc, d, diss, lad_s, lad_u, lad_v, lad_w, l_wall, tend,              &
    138           u_m_l, u_m_n, u_m_r, u_m_s, v_m_l, v_m_n, v_m_r, v_m_s, w_m_l,       &
    139           w_m_n, w_m_r, w_m_s
     139          canopy_heat_flux, cdc, d, diss, lad_s, lad_u, lad_v, lad_w, lai,     &
     140          l_wall, sec, sls, tend, u_m_l, u_m_n, u_m_r, u_m_s, v_m_l, v_m_n,    &
     141          v_m_r, v_m_s, w_m_l, w_m_n, w_m_r, w_m_s
    140142
    141143    REAL, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::                             &
     
    375377             building_height = 50.0, building_length_x = 50.0, &
    376378             building_length_y = 50.0, building_wall_left = 9999999.9, &
    377              building_wall_south = 9999999.9, cfl_factor = -1.0, &
     379             building_wall_south = 9999999.9, cthf = 0.0, cfl_factor = -1.0, &
    378380             cos_alpha_surface, disturbance_amplitude = 0.25, &
    379381             disturbance_energy_limit = 0.01, &
     
    396398             f = 0.0, fs = 0.0, g = 9.81, inflow_damping_height = 9999999.9, &
    397399             inflow_damping_width = 9999999.9, kappa = 0.4, km_constant = -1.0,&
    398              km_damp_max = -1.0, lad_surface = 0.0, long_filter_factor = 0.0, &
     400             km_damp_max = -1.0, lad_surface = 0.0,  &
     401             leaf_surface_concentration = 0.0, long_filter_factor = 0.0, &
    399402             maximum_cpu_time_allowed = 0.0, molecular_viscosity = 1.461E-5, &
    400403             old_dt = 1.0E-10, omega = 7.29212E-5, omega_sor = 1.8, &
     
    412415             rif_max = 1.0, &
    413416             rif_min = -5.0, roughness_length = 0.1, sa_surface = 35.0, &
     417             scalar_exchange_coefficient = 0.0, &
    414418             simulated_time = 0.0, simulated_time_at_begin, sin_alpha_surface, &
    415419             skip_time_data_output = 0.0, skip_time_data_output_av = 9999999.9,&
  • palm/trunk/SOURCE/parin.f90

    r151 r153  
    44! Actual revisions:
    55! -----------------
     6! +cthf
     7! +leaf_surface_concentration, scalar_exchange_coefficient
    68! +inflow_damping_height, inflow_damping_width, recycling_width,
    79! turbulent_inflow in inipar
     
    8284             building_length_y, building_wall_left, &
    8385             building_wall_south, canopy_mode, cloud_droplets, cloud_physics, &
    84              conserve_volume_flow, cut_spline_overshoot, damp_level_1d, &
     86             conserve_volume_flow, cthf, cut_spline_overshoot, damp_level_1d, &
    8587             dissipation_1d, drag_coefficient, dt, dt_pr_1d, &
    8688             dt_run_control_1d, dx, dy, dz, dz_max, dz_stretch_factor, &
     
    9193             initializing_actions, km_constant, km_damp_max, lad_surface, &
    9294             lad_vertical_gradient, lad_vertical_gradient_level, &
    93              long_filter_factor, loop_optimization, mixing_length_1d, &
    94              momentum_advec, netcdf_precision, nsor_ini, nx, ny, &
     95             leaf_surface_concentration, long_filter_factor, &
     96             loop_optimization, mixing_length_1d, momentum_advec, &
     97             netcdf_precision, nsor_ini, nx, ny, &
    9598             nz, ocean, omega, outflow_damping_width, overshoot_limit_e, &
    9699             overshoot_limit_pt, overshoot_limit_u, overshoot_limit_v, &
     
    102105             random_generator, random_heatflux, recycling_width, rif_max, &
    103106             rif_min, roughness_length, sa_surface, sa_vertical_gradient, &
    104              sa_vertical_gradient_level, scalar_advec, statistic_regions, &
     107             sa_vertical_gradient_level, scalar_advec, &
     108             scalar_exchange_coefficient, statistic_regions, &
    105109             surface_heatflux, surface_pressure, surface_scalarflux, &
    106110             surface_waterflux, s_surface, s_surface_initial_change, &
  • palm/trunk/SOURCE/plant_canopy_model.f90

    r142 r153  
    44! Actual revisions:
    55! -----------------
     6! Consideration of heat sources within the forest canopy which represent the
     7! rate of heat input into the air from the forest leaves
     8!
     9! Evaluation of sinks and sources for scalar concentration due to canopy
     10! elements
     11!
    612! Bugfix: remove IF statement in plant_canopy_model_ij
    713!
     
    1521! Description:
    1622! ------------
    17 ! Evaluation of the drag due to vegetation
     23! Evaluation of sinks and sources of momentum, heat and scalar concentration
     24! due to canopy elements
    1825!------------------------------------------------------------------------------!
    1926
     
    5966                                              v(k,j,i)        +  &
    6067                                              v(k,j+1,i)      +  &
    61                                               v(k,j+1,i+1) )     &
     68                                              v(k,j+1,i-1) )     &
    6269                                            / 4.0 )**2        +  &
    6370                                          ( ( w(k-1,j,i-1)    +  &
     
    120127
    121128!
     129!--       potential temperature
     130          CASE ( 4 )
     131             DO  i = nxl, nxr
     132                DO  j = nys, nyn
     133                   DO  k = nzb_s_inner(j,i)+1, pch_index
     134                      tend(k,j,i) = tend(k,j,i) +                     &
     135                                    ( canopy_heat_flux(k,j,i) -     &
     136                                      canopy_heat_flux(k-1,j,i) ) / &
     137                                      dzw(k)
     138                   ENDDO
     139                ENDDO
     140             ENDDO
     141
     142!
     143!--       scalar concentration
     144          CASE ( 5 )
     145             DO  i = nxl, nxr
     146                DO  j = nys, nyn
     147                   DO  k = nzb_s_inner(j,i)+1, pch_index
     148                      tend(k,j,i) = tend(k,j,i) -                     &
     149                                    sec(k,j,i) * lad_s(k,j,i) *       &
     150                                    SQRT( ( ( u(k,j,i)        +       &
     151                                              u(k,j,i+1) )            &
     152                                            / 2.0 )**2        +       &
     153                                          ( ( v(k,j,i)        +       &
     154                                              v(k,j+1,i) )            &
     155                                            / 2.0 )**2        +       &
     156                                          ( ( w(k-1,j,i)      +       &
     157                                              w(k,j,i) )              &
     158                                            / 2.0 )**2 )      *       &
     159                                    ( q(k,j,i) - sls(k,j,i) )
     160                   ENDDO
     161                ENDDO
     162             ENDDO
     163
     164!
    122165!--       sgs-tke
    123           CASE ( 4 )
     166          CASE ( 6 )
    124167             DO  i = nxl, nxr
    125168                DO  j = nys, nyn
     
    180223                                        v(k,j,i)    +        &
    181224                                        v(k,j+1,i)  +        &
    182                                         v(k,j+1,i+1) )       &
     225                                        v(k,j+1,i-1) )       &
    183226                                      / 4.0 )**2    +        &
    184227                                    ( ( w(k-1,j,i-1) +       &
     
    232275
    233276!
     277!--       potential temperature
     278          CASE ( 4 )
     279             DO  k = nzb_s_inner(j,i)+1, pch_index
     280                tend(k,j,i) = tend(k,j,i) +                     &
     281                              ( canopy_heat_flux(k,j,i) -     &
     282                                canopy_heat_flux(k-1,j,i) ) / &
     283                                dzw(k)
     284             ENDDO
     285
     286
     287!
     288!--       scalar concentration
     289          CASE ( 5 )
     290             DO  k = nzb_s_inner(j,i)+1, pch_index
     291                tend(k,j,i) = tend(k,j,i) -                     &
     292                              sec(k,j,i) * lad_s(k,j,i) *       &
     293                              SQRT( ( ( u(k,j,i)        +       &
     294                                        u(k,j,i+1) )            &
     295                                      / 2.0 )**2        +       &
     296                                    ( ( v(k,j,i)        +       &
     297                                        v(k,j+1,i) )            &
     298                                      / 2.0 )**2        +       &
     299                                    ( ( w(k-1,j,i)      +       &
     300                                        w(k,j,i) )              &
     301                                      / 2.0 )**2 )      *       &
     302                              ( q(k,j,i) - sls(k,j,i) )
     303             ENDDO   
     304
     305!
    234306!--       sgs-tke
    235        CASE ( 4 )
     307       CASE ( 6 )
    236308          DO  k = nzb_s_inner(j,i)+1, pch_index   
    237309             tend(k,j,i) = tend(k,j,i) -                     &
  • palm/trunk/SOURCE/prognostic_equations.f90

    r139 r153  
    44! Actual revisions:
    55! -----------------
    6 !
     6! add call of plant_canopy_model in the prognostic equation for
     7! the potential temperature
     8! add call of plant_canopy_model in the prognostic equation for
     9! the concentration of a passive scalar
    710!
    811! Former revisions:
     
    422425             CALL impact_of_latent_heat( i, j )
    423426          ENDIF
     427
     428!
     429!--       Consideration of heat sources within the plant canopy
     430          IF ( plant_canopy .AND. ( cthf /= 0.0 ) ) THEN
     431             CALL plant_canopy_model( i, j, 4 )
     432          ENDIF
     433
    424434          CALL user_actions( i, j, 'pt-tendency' )
    425435
     
    612622                CALL calc_precipitation( i, j )
    613623             ENDIF
     624
     625!
     626!--          Sink or source of scalar concentration due to canopy elements
     627             IF ( plant_canopy ) CALL plant_canopy_model( i, j, 5 )
     628
    614629             CALL user_actions( i, j, 'q-tendency' )
    615630
     
    754769!
    755770!--          Additional sink term for flows through plant canopies
    756              IF ( plant_canopy )  CALL plant_canopy_model( i, j, 4 )         
     771             IF ( plant_canopy )  CALL plant_canopy_model( i, j, 6 )         
    757772
    758773             CALL user_actions( i, j, 'e-tendency' )
     
    10341049             CALL impact_of_latent_heat( i, j )
    10351050          ENDIF
     1051
     1052!
     1053!--       Consideration of heat sources within the plant canopy
     1054          IF ( plant_canopy .AND. ( cthf /= 0.0 ) ) THEN
     1055             CALL plant_canopy_model( i, j, 4 )
     1056          ENDIF
     1057
    10361058          CALL user_actions( i, j, 'pt-tendency' )
    10371059
     
    11421164                CALL calc_precipitation( i, j )
    11431165             ENDIF
     1166
     1167!
     1168!--          Sink or source of scalar concentration due to canopy elements
     1169             IF ( plant_canopy ) CALL plant_canopy_model( i, j, 5 )
     1170
     1171
    11441172             CALL user_actions( i, j, 'q-tendency' )
    11451173
     
    12191247!
    12201248!--          Additional sink term for flows through plant canopies
    1221              IF ( plant_canopy )  CALL plant_canopy_model( i, j, 4 )
     1249             IF ( plant_canopy )  CALL plant_canopy_model( i, j, 6 )
    12221250
    12231251             CALL user_actions( i, j, 'e-tendency' )
     
    15821610       CALL impact_of_latent_heat
    15831611    ENDIF
     1612
     1613!
     1614!-- Consideration of heat sources within the plant canopy
     1615    IF ( plant_canopy .AND. ( cthf /= 0.0 ) ) THEN
     1616       CALL plant_canopy_model( 4 )
     1617    ENDIF
     1618
     1619
    15841620    CALL user_actions( 'pt-tendency' )
    15851621
     
    17821818          CALL calc_precipitation
    17831819       ENDIF
     1820
     1821!
     1822!--    Sink or source of scalar concentration due to canopy elements
     1823       IF ( plant_canopy ) CALL plant_canopy_model( 5 )
     1824
    17841825       CALL user_actions( 'q-tendency' )
    17851826
     
    19191960!
    19201961!--    Additional sink term for flows through plant canopies
    1921        IF ( plant_canopy )  CALL plant_canopy_model( 4 )
     1962       IF ( plant_canopy )  CALL plant_canopy_model( 6 )
    19221963       CALL user_actions( 'e-tendency' )
    19231964
  • palm/trunk/SOURCE/read_var_list.f90

    r151 r153  
    44! Actual revisions:
    55! -----------------
     6! +cthf, leaf_surface_concentration, scalar_exchange_coefficient
    67! +numprocs_previous_run, hor_index_bounds_previous_run, inflow_damping_factor,
    78! inflow_damping_height, inflow_damping_width, mean_inflow_profiles,
     
    233234          CASE ( 'conserve_volume_flow' )
    234235             READ ( 13 )  conserve_volume_flow
     236          CASE ( 'cthf' )
     237             READ ( 13 )  cthf
    235238          CASE ( 'current_timestep_number' )
    236239             READ ( 13 )  current_timestep_number
     
    312315          CASE ( 'last_dt_change' )
    313316             READ ( 13 )  last_dt_change
     317          CASE ( 'leaf_surface_concentration' )
     318             READ ( 13 )  leaf_surface_concentration
    314319          CASE ( 'long_filter_factor' )
    315320             READ ( 13 )  long_filter_factor
     
    417422          CASE ( 'scalar_advec' )
    418423             READ ( 13 )  scalar_advec
     424          CASE ( 'scalar_exchange_coefficient' )
     425             READ ( 13 )  scalar_exchange_coefficient
    419426          CASE ( 'simulated_time' )
    420427             READ ( 13 )  simulated_time
  • palm/trunk/SOURCE/write_var_list.f90

    r151 r153  
    44! Actual revisions:
    55! -----------------
     6! +cthf, leaf_surface_concentration, scalar_exchange_coefficient
    67! +numprocs, hor_index_bounds, inflow_damping_height, inflow_damping_width,
    78! mean_inflow_profiles, recycling_width, turbulent_inflow,
     
    155156    WRITE ( 14 )  'current_timestep_number       '
    156157    WRITE ( 14 )  current_timestep_number
     158    WRITE ( 14 )  'cthf                          '
     159    WRITE ( 14 )  cthf
    157160    WRITE ( 14 )  'cut_spline_overshoot          '
    158161    WRITE ( 14 )  cut_spline_overshoot
     
    231234    WRITE ( 14 )  'last_dt_change                '
    232235    WRITE ( 14 )  last_dt_change
     236    WRITE ( 14 )  'leaf_surface_concentration    '
     237    WRITE ( 14 )  leaf_surface_concentration
    233238    WRITE ( 14 )  'long_filter_factor            '
    234239    WRITE ( 14 )  long_filter_factor
     
    333338    WRITE ( 14 )  'scalar_advec                  '
    334339    WRITE ( 14 )  scalar_advec
     340    WRITE ( 14 )  'scalar_exchange_coefficient   '
     341    WRITE ( 14 )  scalar_exchange_coefficient
    335342    WRITE ( 14 )  'simulated_time                '
    336343    WRITE ( 14 )  simulated_time
Note: See TracChangeset for help on using the changeset viewer.