Ignore:
Timestamp:
Oct 26, 2020 10:23:38 AM (4 years ago)
Author:
schwenkel
Message:

implement relative humidity as diagnostic output quantity

File:
1 edited

Legend:

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

    r4731 r4757  
    2424! -----------------
    2525! $Id$
     26! Implement relative humidity as diagnostic output quantity
     27!
     28! 4731 2020-10-07 13:25:11Z schwenkel
    2629! Move exchange_horiz from time_integration to modules
    2730!
     
    8285               u, u_1, u_2, u_init, u_p, u_m_l, u_m_n, u_m_r, u_m_s,                               &
    8386               v, v_1, v_2, v_p, v_init, v_m_l, v_m_n, v_m_r, v_m_s,                               &
    84                w, w_1, w_2, w_p, w_m_l, w_m_n, w_m_r, w_m_s
     87               w, w_1, w_2, w_p, w_m_l, w_m_n, w_m_r, w_m_s,                                       &
     88               zu
    8589
    8690    USE basic_constants_and_equations_mod,                                                         &
     
    518522    REAL(wp)     ::  q_s !< saturation mixing ratio
    519523    REAL(wp)     ::  t_l !< actual temperature
     524    REAL(wp)     ::  rh     = 9999999.9_wp !< relative humidity
     525    REAL(wp)     ::  rh_min = 9999999.9_wp !< max relative humidity
     526    REAL(wp)     ::  height = 9999999.9_wp !< height of supersaturated regions
     527    REAL(wp)     ::  min_height = 9999999.9_wp !< height of supersaturated regions
    520528
    521529!
     
    537545                q_s = rd_d_rv * e_s / ( hyp(k) - e_s )
    538546
    539                 IF ( q(k,j,i) > 1.02_wp * q_s )  realistic_q = .FALSE.
     547                IF ( q(k,j,i) > 1.02_wp * q_s )  THEN
     548                   realistic_q = .FALSE.
     549                   rh = q(k,j,i) / q_s * 100.0_wp
     550                   height = zu(k)
     551                ENDIF
    540552             ENDDO
    541553          ENDDO
     
    546558#if defined( __parallel )
    547559       CALL MPI_ALLREDUCE( MPI_IN_PLACE, realistic_q, 1, MPI_LOGICAL, MPI_LAND, comm2d, ierr)
     560       CALL MPI_ALLREDUCE( rh, rh_min, 1, MPI_REAL, MPI_MIN, comm2d, ierr )
     561       CALL MPI_ALLREDUCE( height, min_height, 1, MPI_REAL, MPI_MIN, comm2d, ierr )
    548562#endif
    549563
    550564       IF ( .NOT. realistic_q  .AND.                                                               &
    551565            TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
    552           message_string = 'The initial mixing ratio exceeds the saturation mixing ratio.'
     566            WRITE( message_string, * ) 'The initial mixing ratio exceeds the saturation mixing' // &
     567               'ratio, with rh =', rh_min, '% in a height of', min_height, 'm for the first time'
    553568          CALL message( 'dynamic_init_checks', 'PA0697', 2, 2, 0, 6, 0 )
    554569       ELSEIF ( .NOT. realistic_q  .AND.                                                           &
    555570                TRIM( initializing_actions ) == 'read_restart_data' )  THEN
    556           message_string = 'The mixing ratio exceeds the saturation mixing ratio.'
     571          WRITE( message_string, * ) 'The initial mixing ratio exceeds the saturation mixing' //   &
     572              'ratio, with rh =', rh_min, '% in a height of', min_height, 'm for the first time'
    557573          CALL message( 'dynamic_init_checks', 'PA0697', 0, 1, 0, 6, 0 )
    558574       ENDIF
Note: See TracChangeset for help on using the changeset viewer.