Changeset 4347 for palm/trunk/SOURCE
- Timestamp:
- Dec 18, 2019 1:18:33 PM (5 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/Makefile
r4331 r4347 25 25 # ----------------- 26 26 # $Id$ 27 # add dependency to basic_constants_and_equations_mod for dynamics_mod 28 # 29 # 4331 2019-12-10 18:25:02Z suehring 27 30 # Move diagnostic surface output to diagnostic_output_quantities 28 31 # … … 553 556 surface_mod.o 554 557 dynamics_mod.o: \ 558 basic_constants_and_equations_mod.o \ 555 559 mod_kinds.o \ 556 560 surface_mod.o \ -
palm/trunk/SOURCE/dynamics_mod.f90
r4281 r4347 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Implement post-initialization check for realistically inital values of mixing ratio 28 ! 29 ! 4281 2019-10-29 15:15:39Z schwenkel 27 30 ! Moved boundary conditions in dynamics module 28 31 ! … … 44 47 ONLY: c_u, c_u_m, c_u_m_l, c_v, c_v_m, c_v_m_l, c_w, c_w_m, c_w_m_l, & 45 48 dzu, & 49 exner, & 50 hyp, & 46 51 pt, pt_1, pt_2, pt_init, pt_p, & 47 52 q, q_1, q_2, q_p, & … … 50 55 v, v_1, v_2, v_p, v_init, v_m_l, v_m_n, v_m_r, v_m_s, & 51 56 w, w_1, w_2, w_p, w_m_l, w_m_n, w_m_r, w_m_s 57 58 USE basic_constants_and_equations_mod, & 59 ONLY: magnus, & 60 rd_d_rv 52 61 53 62 USE control_parameters, & … … 74 83 intermediate_timestep_count, & 75 84 length, & 85 message_string, & 76 86 nesting_offline, & 77 87 nudging, & … … 455 465 SUBROUTINE dynamics_init_checks 456 466 467 INTEGER(iwp) :: i !< loop index in x-direction 468 INTEGER(iwp) :: j !< loop index in y-direction 469 INTEGER(iwp) :: k !< loop index in z-direction 470 471 LOGICAL :: realistic_q = .TRUE. !< flag indicating realistic mixing ratios 472 473 REAL(wp) :: e_s !< saturation water vapor pressure 474 REAL(wp) :: q_s !< saturation mixing ratio 475 REAL(wp) :: t_l !< actual temperature 476 477 ! 478 !-- Check for realistic initial mixing ratio. This must be in a realistic phyiscial range and must 479 !-- not exceed the saturation mixing ratio by more than 2 percent. Please note, the check is 480 !-- performed for each grid point (not just for a vertical profile), in order to cover also 481 !-- three-dimensional initialization. 482 IF ( humidity .AND. .NOT. neutral ) THEN 483 DO i = nxl, nxr 484 DO j = nys, nyn 485 DO k = nzb+1, nzt 486 ! 487 !-- Calculate actual temperature, water vapor saturation pressure, and based on this 488 !-- the saturation mixing ratio. 489 t_l = exner(k) * pt(k,j,i) 490 e_s = magnus( t_l ) 491 q_s = rd_d_rv * e_s / ( hyp(k) - e_s ) 492 493 IF ( q(k,j,i) > 1.02_wp * q_s ) realistic_q = .FALSE. 494 ENDDO 495 ENDDO 496 ENDDO 497 ! 498 !-- Since the check is performed locally, merge the logical flag from all mpi ranks, 499 !-- in order to do not print the error message multiple times. 500 #if defined( __parallel ) 501 CALL MPI_ALLREDUCE( MPI_IN_PLACE, realistic_q, 1, MPI_LOGICAL, MPI_LAND, comm2d, ierr) 502 #endif 503 504 IF ( .NOT. realistic_q ) THEN 505 message_string = 'The initial mixing ratio exceeds the saturation mixing ratio.' 506 CALL message( 'dynamic_init_checks', 'PA0697', 2, 2, 0, 6, 0 ) 507 ENDIF 508 ENDIF 457 509 458 510 END SUBROUTINE dynamics_init_checks
Note: See TracChangeset
for help on using the changeset viewer.