- Timestamp:
- Dec 11, 2020 2:18:43 PM (4 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/biometeorology_mod.f90
r4807 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 ! 4807 2020-12-02 21:02:28Z gronemeier 28 32 ! Add checks for setup of UV exposure (only workaround!); corrected formatting errors. 29 33 ! … … 1383 1387 ! 1384 1388 !-- Internal variables 1385 CHARACTER (LEN=80) :: line !< Dummy string for current line in parameter file 1389 CHARACTER (LEN=100) :: line !< Dummy string for current line in parameter file 1390 1391 INTEGER(iwp) :: io_status !< Status after reading the namelist file 1386 1392 1387 1393 NAMELIST /biometeorology_parameters/ clothing, & … … 1393 1399 uv_exposure 1394 1400 1395 1396 !-- Try to find biometeorology_parameters namelist 1397 REWIND ( 11 ) 1398 line = ' ' 1399 DO WHILE ( INDEX( line, '&biometeorology_parameters' ) == 0 ) 1400 READ ( 11, '(A)', END = 20 ) line 1401 ENDDO 1402 BACKSPACE ( 11 ) 1403 1404 ! 1405 !-- Read biometeorology_parameters namelist 1406 READ ( 11, biometeorology_parameters, ERR = 10, END = 20 ) 1407 1408 ! 1409 !-- Set flag that indicates that the biomet_module is switched on 1410 biometeorology = .TRUE. 1411 1412 GOTO 20 1413 1414 ! 1415 !-- In case of error 1416 10 BACKSPACE( 11 ) 1417 READ( 11 , '(A)') line 1418 CALL parin_fail_message( 'biometeorology_parameters', line ) 1419 1420 ! 1421 !-- Complete 1422 20 CONTINUE 1423 1401 ! 1402 !-- Move to the beginning of the namelist file and try to find and read the namelist named 1403 !-- biometeorology_parameters. 1404 REWIND( 11 ) 1405 READ( 11, biometeorology_parameters, IOSTAT=io_status ) 1406 ! 1407 !-- Action depending on the READ status 1408 IF ( io_status == 0 ) THEN 1409 ! 1410 !-- biometeorology_parameters namelist was found and read correctly. Set flag that 1411 !-- biometeorology_mod is switched on. 1412 biometeorology = .TRUE. 1413 1414 ELSEIF ( io_status > 0 ) THEN 1415 ! 1416 !-- biometeorology_parameters namelist was found, but contained errors. Print an error message 1417 !-- containing the line that caused the problem. 1418 BACKSPACE( 11 ) 1419 READ( 11 , '(A)') line 1420 CALL parin_fail_message( 'biometeorology_parameters', line ) 1421 1422 ENDIF 1424 1423 1425 1424 END SUBROUTINE bio_parin 1425 1426 1426 1427 1427 !--------------------------------------------------------------------------------------------------! -
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 ) -
palm/trunk/SOURCE/global_min_max.f90
r4651 r4822 375 375 value = fmax(1) 376 376 value_ijk = fmax_ijk 377 IF ( fmax_ijk(1) < 0 ) THEN 377 IF ( fmax_ijk(1) <= -10 ) THEN 378 ! 379 !-- Index needs to be corrected because it has been modified above to indicate negative 380 !-- values 381 value_ijk(1) = -value_ijk(1) - 10 382 ! 383 !-- For this reason also change the sign of the quantity 378 384 value = -value 379 value_ijk(1) = -value_ijk(1) - 10 !???380 385 ENDIF 381 386 … … 389 394 IF ( value_ijk(2) > ny ) value_ijk(2) = value_ijk(2) - (ny+1) 390 395 396 WRITE (9,*) 'global_min_max: value = ', value, ' kji = ', value_ijk, ' ar=', & 397 ar(value_ijk(1),value_ijk(2),value_ijk(3)) 391 398 392 399 END SUBROUTINE global_min_max -
palm/trunk/SOURCE/timestep.f90
r4717 r4822 223 223 ! 224 224 !-- Determine the maxima of the velocity components, including their grid index positions. 225 CALL global_min_max( nzb, nzt+1, nysg, nyng, nxlg, nxrg, u, 'abs', 0.0_wp, u_max, u_max_ijk )226 CALL global_min_max( nzb, nzt+1, nysg, nyng, nxlg, nxrg, v, 'abs', 0.0_wp, v_max, v_max_ijk )225 ! CALL global_min_max( nzb, nzt+1, nysg, nyng, nxlg, nxrg, u, 'abs', 0.0_wp, u_max, u_max_ijk ) 226 ! CALL global_min_max( nzb, nzt+1, nysg, nyng, nxlg, nxrg, v, 'abs', 0.0_wp, v_max, v_max_ijk ) 227 227 CALL global_min_max( nzb, nzt+1, nysg, nyng, nxlg, nxrg, w, 'abs', 0.0_wp, w_max, w_max_ijk ) 228 228
Note: See TracChangeset
for help on using the changeset viewer.