Changeset 4822 for palm/trunk/SOURCE/chemistry_model_mod.f90
- Timestamp:
- Dec 11, 2020 2:18:43 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/chemistry_model_mod.f90
r4768 r4822 26 26 ! ----------------- 27 27 ! $Id$ 28 ! reading of namelist file and actions in case of namelist errors revised so that statement labels 29 ! and goto statements are not required any more 30 ! 31 ! 4768 2020-11-02 19:11:23Z suehring 28 32 ! Enable 3D data output also with 64-bit precision 29 33 ! … … 43 47 ! - Bugfix in variable name separation in profile-output initialization 44 48 ! - Bugfix in counting the number of chemistry profiles 45 ! 49 ! 46 50 ! 4581 2020-06-29 08:49:58Z suehring 47 51 ! Enable output of resolved-scale vertical fluxes of chemical species. 48 ! 52 ! 49 53 ! 4577 2020-06-25 09:53:58Z raasch 50 54 ! further re-formatting to follow the PALM coding standard … … 2504 2508 2505 2509 2506 CHARACTER (LEN=80) :: line !< dummy string that contains the current2510 CHARACTER(LEN=100) :: line !< dummy string that contains the current 2507 2511 !< line of the parameter file 2512 CHARACTER(LEN=8) :: solver_type 2508 2513 2509 2514 INTEGER(iwp) :: i !< 2515 INTEGER(iwp) :: io_status !< Status after reading the namelist file 2510 2516 INTEGER(iwp) :: max_pr_cs_tmp !< 2511 2517 … … 2566 2572 !> If the respective concentration profile should be constant with height, then use "cs_surface( number of spcs)" 2567 2573 !> then write these cs_surface values to chem_species(lsp)%conc_pr_init(:) 2574 2568 2575 ! 2569 2576 !-- Read chem namelist 2570 CHARACTER(LEN=8) :: solver_type2571 2572 2577 icntrl = 0 2573 2578 rcntrl = 0.0_wp … … 2577 2582 rtol = 0.01_wp 2578 2583 ! 2579 !-- Try to find chemistry package 2580 REWIND ( 11 ) 2581 line = ' ' 2582 DO WHILE ( INDEX( line, '&chemistry_parameters' ) == 0 ) 2583 READ ( 11, '(A)', END=20 ) line 2584 ENDDO 2585 BACKSPACE ( 11 ) 2586 ! 2587 !-- Read chemistry namelist 2588 READ ( 11, chemistry_parameters, ERR = 10, END = 20 ) 2589 ! 2590 !-- Enable chemistry model 2591 air_chemistry = .TRUE. 2592 GOTO 20 2593 2594 10 BACKSPACE( 11 ) 2595 READ( 11 , '(A)') line 2596 CALL parin_fail_message( 'chemistry_parameters', line ) 2597 2598 20 CONTINUE 2599 2600 2584 !-- Move to the beginning of the namelist file and try to find and read the namelist named 2585 !-- chemistry_parameters. 2586 REWIND( 11 ) 2587 READ( 11, chemistry_parameters, IOSTAT=io_status ) 2588 ! 2589 !-- Action depending on the READ status 2590 IF ( io_status == 0 ) THEN 2591 ! 2592 ! chemistry_parameters namelist was found and read correctly. Switch on chemistry model. 2593 air_chemistry = .TRUE. 2594 2595 ELSEIF ( io_status > 0 ) THEN 2596 ! 2597 !-- chemistry_parameters namelist was found, but contained errors. Print an error message 2598 !-- including the line that caused the problem. 2599 BACKSPACE( 11 ) 2600 READ( 11 , '(A)') line 2601 CALL parin_fail_message( 'chemistry_parameters', line ) 2602 2603 ENDIF 2601 2604 2602 2605 ! … … 2743 2746 ! 2744 2747 !-- Set Solver Type 2745 IF (icntrl(3) == 0) THEN2748 IF ( icntrl(3) == 0 ) THEN 2746 2749 solver_type = 'rodas3' !Default 2747 ELSE IF(icntrl(3) == 1) THEN2750 ELSEIF ( icntrl(3) == 1 ) THEN 2748 2751 solver_type = 'ros2' 2749 ELSE IF(icntrl(3) == 2) THEN2752 ELSEIF ( icntrl(3) == 2 ) THEN 2750 2753 solver_type = 'ros3' 2751 ELSE IF(icntrl(3) == 3) THEN2754 ELSEIF ( icntrl(3) == 3 ) THEN 2752 2755 solver_type = 'ro4' 2753 ELSE IF(icntrl(3) == 4) THEN2756 ELSEIF ( icntrl(3) == 4 ) THEN 2754 2757 solver_type = 'rodas3' 2755 ELSE IF(icntrl(3) == 5) THEN2758 ELSEIF ( icntrl(3) == 5 ) THEN 2756 2759 solver_type = 'rodas4' 2757 ELSE IF(icntrl(3) == 6) THEN2760 ELSEIF ( icntrl(3) == 6 ) THEN 2758 2761 solver_type = 'Rang3' 2759 2762 ELSE … … 3351 3354 !-- Sum-up profiles for vertical fluxes of the the species. Note, in case of WS5 scheme the 3352 3355 !-- profiles of resolved-scale fluxes have been already summed-up, while resolved-scale fluxes 3353 !-- need to be calculated in case of PW scheme. 3356 !-- need to be calculated in case of PW scheme. 3354 3357 !-- For summation employ a temporary array. 3355 3358 !$OMP PARALLEL PRIVATE( i, j, k, tn, lpr, sums_tmp, flag )
Note: See TracChangeset
for help on using the changeset viewer.