Changeset 3035 for palm/trunk/SOURCE


Ignore:
Timestamp:
May 24, 2018 9:35:20 AM (6 years ago)
Author:
schwenkel
Message:

Add option to initialize warm air bubble close to surface

Location:
palm/trunk/SOURCE
Files:
3 edited

Legend:

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

    r3034 r3035  
    2525! -----------------
    2626! $Id$
     27! Add option to initialize warm air bubble close to surface
     28!
     29! 3034 2018-05-24 08:41:20Z raasch
    2730! bugfix: check that initializing_actions has been set
    2831!
     
    13661369             CASE ( 'set_constant_profiles', 'set_1d-model_profiles',          &
    13671370                    'by_user', 'initialize_vortex', 'initialize_ptanom',       &
    1368                     'inifor' )
     1371                    'initialize_bubble', 'inifor' )
    13691372                action = action(position+1:)
    13701373
  • palm/trunk/SOURCE/init_3d_model.f90

    r3014 r3035  
    2525! -----------------
    2626! $Id$
     27! Add option to initialize warm air bubble close to surface
     28!
     29! 3014 2018-05-09 08:42:38Z maronga
    2730! Bugfix: initialization of ts_value missing
    2831!
     
    15861589
    15871590!
    1588 !--    Impose temperature anomaly (advection test only)
    1589        IF ( INDEX( initializing_actions, 'initialize_ptanom' ) /= 0 )  THEN
     1591!--    Impose temperature anomaly (advection test only) or warm air bubble
     1592!--    close to surface
     1593       IF ( INDEX( initializing_actions, 'initialize_ptanom' ) /= 0  .OR.  &
     1594            INDEX( initializing_actions, 'initialize_bubble' ) /= 0  )  THEN
    15901595          CALL init_pt_anomaly
    15911596       ENDIF
    1592 
     1597       
    15931598!
    15941599!--    If required, change the surface temperature at the start of the 3D run
  • palm/trunk/SOURCE/init_pt_anomaly.f90

    r2718 r3035  
    2525! -----------------
    2626! $Id$
     27! Add option to initialize warm air bubble close to surface
     28!
     29! 2718 2018-01-02 08:49:38Z maronga
    2730! Corrected "Former revisions" section
    2831!
     
    7275        ONLY:  pt, zu
    7376
     77    USE control_parameters   
     78       
    7479    USE grid_variables,                                                        &
    7580        ONLY:  dx, dy
    7681
    7782    USE indices,                                                               &
    78         ONLY:  nbgp, nx, nxl, nxr, nyn, nys, nzb, nzt
     83        ONLY:  nbgp, nx, nxl, nxr, ny, nyn, nys, nzb, nzt
    7984       
    8085    USE kinds
     
    8287    IMPLICIT NONE
    8388
    84     INTEGER(iwp) ::  i  !<
    85     INTEGER(iwp) ::  ic !<
    86     INTEGER(iwp) ::  j  !<
    87     INTEGER(iwp) ::  jc !<
    88     INTEGER(iwp) ::  k  !<
    89     INTEGER(iwp) ::  kc !<
     89    INTEGER(iwp) ::  i  !< grid index along x
     90    INTEGER(iwp) ::  ic !< center index along x
     91    INTEGER(iwp) ::  j  !< grid index along y
     92    INTEGER(iwp) ::  jc !< center index along y
     93    INTEGER(iwp) ::  k  !< grid index along z
     94    INTEGER(iwp) ::  kc !< center index along z
    9095   
    91     REAL(wp)     ::  betrag !<
    92     REAL(wp)     ::  radius !<
    93     REAL(wp)     ::  rc     !<
    94     REAL(wp)     ::  x      !<
    95     REAL(wp)     ::  y      !<
    96     REAL(wp)     ::  z      !<
     96    REAL(wp)     ::  amount                               !< amount of temperature perturbation
     97    REAL(wp)     ::  bubble_center_y                      !< center of bubble in y
     98    REAL(wp)     ::  bubble_center_z = 170.0              !< center of bubble in z
     99    REAL(wp)     ::  bubble_sigma_y = 300.0               !< width of bubble in y
     100    REAL(wp)     ::  bubble_sigma_z = 150.0               !< width of bubble in z
     101    REAL(wp)     ::  initial_temperature_difference = 0.4 !< temperature perturbation for bubble in K
     102    REAL(wp)     ::  radius                               !< radius of pt anomaly
     103    REAL(wp)     ::  rc                                   !< radius of pt anomaly
     104    REAL(wp)     ::  x                                    !< x dimension of pt anomaly
     105    REAL(wp)     ::  y                                    !< y dimension of pt anomaly
     106    REAL(wp)     ::  z                                    !< z dimension of pt anomaly
     107   
    97108   
    98109!
    99110!-- Defaults: radius rc, strength z,
    100 !--           position of centre: ic, jc, kc
     111!--           position of center: ic, jc, kc
    101112    rc =  10.0_wp * dx
    102113    ic =  ( nx+1 ) / 2
    103114    jc =  ic
    104115    kc =  nzt / 2
     116   
     117    IF ( INDEX( initializing_actions, 'initialize_ptanom' ) /= 0 )  THEN
     118!
     119!--    Compute the perturbation.
     120       DO  i = nxl, nxr
     121          DO  j = nys, nyn
     122             DO  k = nzb+1, nzt
     123                x = ( i - ic ) * dx
     124                y = ( j - jc ) * dy
     125                z = ABS( zu(k) - zu(kc) )
     126                radius = SQRT( x**2 + y**2 + z**2 )
     127                IF ( radius <= rc )  THEN
     128                   amount = 5.0_wp * EXP( -( radius * 0.001_wp / 2.0_wp )**2 )
     129                ELSE
     130                   amount = 0.0_wp
     131                ENDIF
    105132
    106 !
    107 !-- Compute the perturbation.
    108     DO  i = nxl, nxr
    109        DO  j = nys, nyn
    110           DO  k = nzb+1, nzt
    111              x = ( i - ic ) * dx
    112              y = ( j - jc ) * dy
    113              z = ABS( zu(k) - zu(kc) )
    114              radius = SQRT( x**2 + y**2 + z**2 )
    115              IF ( radius <= rc )  THEN
    116                 betrag = 5.0_wp * EXP( -( radius * 0.001_wp / 2.0_wp )**2 )
    117              ELSE
    118                 betrag = 0.0_wp
    119              ENDIF
     133                pt(k,j,i) = pt(k,j,i) + amount
    120134
    121              pt(k,j,i) = pt(k,j,i) + betrag
    122 
     135             ENDDO
    123136          ENDDO
    124137       ENDDO
    125     ENDDO
     138       
     139!
     140!-- Initialize warm air bubble close to surface and homogenous elegonated
     141!-- along x-Axis
     142    ELSEIF ( INDEX( initializing_actions, 'initialize_bubble' ) /= 0 )  THEN
     143!
     144!--    Calculate y-center of model domain
     145       bubble_center_y = ( ny + 1.0 ) * dy / 2.0
     146   
     147!
     148!--    Compute perturbation for potential temperaure
     149       DO  i = nxl, nxr
     150          DO  j = nys, nyn
     151             DO  k = nzb+1, nzt
     152                pt(k,j,i) = pt(k,j,i) +                                        &
     153                               EXP( -0.5 * ( (j* dy  - bubble_center_y) /      &
     154                                                       bubble_sigma_y )**2) *  &
     155                               EXP( -0.5 * ( (zu(k)  - bubble_center_z) /      &
     156                                                       bubble_sigma_z)**2) *   &
     157                               initial_temperature_difference
     158             ENDDO
     159          ENDDO
     160       ENDDO
     161    ENDIF
    126162
    127163!
Note: See TracChangeset for help on using the changeset viewer.