source: palm/trunk/SOURCE/init_cloud_physics.f90 @ 1011

Last change on this file since 1011 was 826, checked in by raasch, 13 years ago

last commit documented

  • Property svn:keywords set to Id
File size: 2.4 KB
RevLine 
[1]1 SUBROUTINE init_cloud_physics
2
3!------------------------------------------------------------------------------!
[484]4! Current revisions:
[1]5! -----------------
[826]6!
[1]7!
8! Former revisions:
9! ------------------
[3]10! $Id: init_cloud_physics.f90 826 2012-02-19 03:41:34Z raasch $
[98]11!
[826]12! 824 2012-02-17 09:09:57Z raasch
13! calculation of b_cond replaced by calculation of bfactor
14!
[226]15! 221 2009-01-12 15:32:23Z raasch
16! Bugfix: abort in case that absolute temperature is below zero
17!
[98]18! 95 2007-06-02 16:48:38Z raasch
19! hydro_press renamed hyp
20!
21! February 2007
[3]22! RCS Log replace by Id keyword, revision history cleaned up
23!
[1]24! Revision 1.5  2005/06/26 19:55:58  raasch
25! Initialization of cloud droplet constants, gas_constant renamed r_d,
26! latent_heat renamed l_v
27!
28! Revision 1.1  2000/04/13 14:37:22  schroeter
29! Initial revision
30!
31!
32! Description:
33! ------------
34! Initialization of parameters for handling cloud-physics
35!------------------------------------------------------------------------------!
36
37    USE arrays_3d
38    USE cloud_parameters
[824]39    USE constants
[1]40    USE control_parameters
41    USE grid_variables
42    USE indices
43
44    IMPLICIT NONE
45
46    INTEGER ::  k
47    REAL    ::  t_surface
48
[95]49    ALLOCATE( hyp(nzb:nzt+1), pt_d_t(nzb:nzt+1), t_d_pt(nzb:nzt+1) )
[1]50
51!
[824]52!-- Calculate frequently used parameters
[1]53    l_d_cp = l_v / cp
54    l_d_r  = l_v / r_d
55    l_d_rv = l_v / r_v
56!
[824]57!-- Calculate factor used in equation for droplet growth by condensation
58    bfactor = 3.0 * vanthoff * mass_of_solute * molecular_weight_of_water &
59              / ( 4.0 * pi * rho_l * molecular_weight_of_solute )
[1]60!
61!-- Calculate:
62!-- pt / t : ratio of potential and actual temperature (pt_d_t)
63!-- t / pt : ratio of actual and potential temperature (t_d_pt)
[95]64!-- p_0(z) : vertical profile of the hydrostatic pressure (hyp)
[1]65    t_surface = pt_surface * ( surface_pressure / 1000.0 )**0.286
66    DO  k = nzb, nzt+1
[221]67!
68!--    Check temperature in case of too large domain height
69       IF ( ( t_surface - g/cp * zu(k) ) < 0.0 )  THEN
70          WRITE( message_string, * )  'absolute temperature < 0.0 at zu(', k, &
71                                      ') = ', zu(k)
[226]72          CALL message( 'init_cloud_physics', 'PA0142', 1, 2, 0, 6, 0 )
[221]73       ENDIF
[95]74       hyp(k)    = surface_pressure * 100.0 * &
75                   ( (t_surface - g/cp * zu(k)) / t_surface )**(1.0/0.286)
76       pt_d_t(k) = ( 100000.0 / hyp(k) )**0.286
77       t_d_pt(k) = 1.0 / pt_d_t(k)       
[1]78    ENDDO
79
80!
81!-- Compute reference density
82    rho_surface = surface_pressure * 100.0 / ( r_d * t_surface )
83
84
85 END SUBROUTINE init_cloud_physics
Note: See TracBrowser for help on using the repository browser.