- Timestamp:
- Nov 29, 2018 3:32:39 PM (6 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/Makefile
r3569 r3579 25 25 # ----------------- 26 26 # $Id$ 27 # Dependency for check_parameters on nesting_offl_mod added 28 # 29 # 3569 2018-11-27 17:03:40Z kanani 27 30 # dom_dwd_user, Schrempf: 28 31 # New dependencies for biometeorology_mod, … … 847 850 mod_kinds.o \ 848 851 modules.o \ 852 nesting_offl_mod.o \ 849 853 netcdf_data_input_mod.o \ 850 854 netcdf_interface_mod.o \ -
palm/trunk/SOURCE/check_parameters.f90
r3575 r3579 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Call nesting_offl_check_parameters 28 ! 29 ! 3575 2018-11-28 15:06:32Z kanani 27 30 ! Bugfix for output time levels in parallel NetCDF output with spinup 28 31 ! … … 777 780 ONLY: damp_level_1d, damp_level_ind_1d 778 781 782 USE nesting_offl_mod, & 783 ONLY: nesting_offl_check_parameters 784 779 785 USE netcdf_data_input_mod, & 780 786 ONLY: init_model, input_pids_static, netcdf_data_input_check_dynamic, & … … 1525 1531 CALL lsf_nudging_check_parameters 1526 1532 IF ( land_surface ) CALL lsm_check_parameters 1533 IF ( nesting_offline ) CALL nesting_offl_check_parameters 1527 1534 IF ( ocean_mode ) CALL ocean_check_parameters 1528 1535 IF ( plant_canopy ) CALL pcm_check_parameters -
palm/trunk/SOURCE/init_3d_model.f90
r3569 r3579 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Bugfix in initialization of turbulence generator 28 ! 29 ! 3569 2018-11-27 17:03:40Z kanani 27 30 ! dom_dwd_user, Schrempf: 28 31 ! Remove uv exposure model code, this is now part of biometeorology_mod, … … 1359 1362 !-- fluxes, etc. 1360 1363 CALL init_surfaces 1364 ! 1365 !-- Initialize synthetic turbulence generator if required 1366 IF( use_syn_turb_gen ) CALL stg_init 1361 1367 1362 1368 CALL location_message( 'finished', .TRUE. ) … … 1366 1372 1367 1373 CALL location_message( 'initializing with constant profiles', .FALSE. ) 1368 !1369 !-- Overwrite initial profiles in case of synthetic turbulence generator1370 IF( use_syn_turb_gen ) CALL stg_init1371 1374 1372 1375 ! … … 1430 1433 !-- fluxes, etc. 1431 1434 CALL init_surfaces 1432 1435 ! 1436 !-- Initialize synthetic turbulence generator if required 1437 IF( use_syn_turb_gen ) CALL stg_init 1438 1433 1439 CALL location_message( 'finished', .TRUE. ) 1434 1440 -
palm/trunk/SOURCE/nesting_offl_mod.f90
r3413 r3579 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Check implemented for offline nesting in child domain 28 ! 29 ! 3413 2018-10-24 10:28:44Z suehring 27 30 ! Keyword ID set 28 31 ! … … 79 82 ! 80 83 !-- Public subroutines 81 PUBLIC nesting_offl_bc, nesting_offl_ header, nesting_offl_init,&82 nesting_offl_ mass_conservation, nesting_offl_parin84 PUBLIC nesting_offl_bc, nesting_offl_check_parameters, nesting_offl_header,& 85 nesting_offl_init, nesting_offl_mass_conservation, nesting_offl_parin 83 86 ! 84 87 !-- Public variables … … 88 91 MODULE PROCEDURE nesting_offl_bc 89 92 END INTERFACE nesting_offl_bc 93 94 INTERFACE nesting_offl_check_parameters 95 MODULE PROCEDURE nesting_offl_check_parameters 96 END INTERFACE nesting_offl_check_parameters 90 97 91 98 INTERFACE nesting_offl_header … … 879 886 !------------------------------------------------------------------------------! 880 887 SUBROUTINE nesting_offl_check_parameters 888 889 USE control_parameters, & 890 ONLY: child_domain, message_string, nesting_offline 881 891 882 892 IMPLICIT NONE 883 893 ! 884 894 !-- Perform checks 895 IF ( nesting_offline .AND. child_domain ) THEN 896 message_string = 'Offline nesting is only applicable in root model.' 897 CALL message( 'stg_check_parameters', 'PA0622', 1, 2, 0, 6, 0 ) 898 ENDIF 885 899 886 900 -
palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90
r3376 r3579 25 25 ! ----------------- 26 26 ! $Id$ 27 ! - Bugfix in calculation of turbulence scaling parameters for turbulence 28 ! generator in case of topography 29 ! - Additional checks implemented - no STG in RANS-RANS nesting or LES-LES 30 ! nesting 31 ! 32 ! 3376 2018-10-19 10:15:32Z suehring 27 33 ! Error messages and numbers reivsed. 28 34 ! … … 408 414 IF ( use_syn_turb_gen ) THEN 409 415 416 IF ( child_domain .AND. .NOT. rans_mode .AND. & 417 .NOT. rans_mode_parent ) THEN 418 message_string = 'Using synthetic turbulence generator ' // & 419 'is not allowed in LES-LES nesting.' 420 CALL message( 'stg_check_parameters', 'PA0620', 1, 2, 0, 6, 0 ) 421 422 ENDIF 423 424 IF ( child_domain .AND. rans_mode .AND. & 425 rans_mode_parent ) THEN 426 message_string = 'Using synthetic turbulence generator ' // & 427 'is not allowed in RANS-RANS nesting.' 428 CALL message( 'stg_check_parameters', 'PA0621', 1, 2, 0, 6, 0 ) 429 430 ENDIF 431 410 432 IF ( .NOT. nesting_offline .AND. .NOT. child_domain ) THEN 411 433 … … 413 435 .AND. INDEX( initializing_actions, 'read_restart_data' ) == 0 ) THEN 414 436 message_string = 'Using synthetic turbulence generator ' // & 415 'requires %initializing_actions = ' //&416 417 437 'requires %initializing_actions = ' // & 438 '"set_constant_profiles" or "read_restart_data"' //& 439 ', if not offline nesting is applied.' 418 440 CALL message( 'stg_check_parameters', 'PA0015', 1, 2, 0, 6, 0 ) 419 441 ENDIF … … 427 449 IF ( bc_ns /= 'cyclic' ) THEN 428 450 message_string = 'Using synthetic turbulence generator ' // & 429 'requires &bc_ns = "cyclic", ' // &451 'requires &bc_ns = "cyclic", ' // & 430 452 'if not offline nesting is applied.' 431 453 CALL message( 'stg_check_parameters', 'PA0037', 1, 2, 0, 6, 0 ) … … 1726 1748 r32(k) = 10E-8_wp 1727 1749 ENDIF 1728 ! write(9,*) zu(k), r11(k), r33(k), r31(k), zi_ribulk, scale_us, scale_wm, scale_l1729 1750 ENDDO 1730 1751 … … 1970 1991 1971 1992 USE surface_mod, & 1972 ONLY: surf_def_h, surf_lsm_h, surf_usm_h1993 ONLY: get_topography_top_index_ji, surf_def_h, surf_lsm_h, surf_usm_h 1973 1994 1974 1995 IMPLICIT NONE … … 1977 1998 INTEGER(iwp) :: j !< loop index in y-direction 1978 1999 INTEGER(iwp) :: k !< loop index in z-direction 1979 INTEGER(iwp) :: k_ref !< index in z-direction for reference height 2000 INTEGER(iwp) :: k_ref !< index in z-direction for COSMO reference height 2001 INTEGER(iwp) :: k_topo !< topography top index 1980 2002 INTEGER(iwp) :: m !< surface element index 1981 2003 … … 2030 2052 !-- However, friction velocity is used for turbulence 2031 2053 !-- parametrization, so that more physically meaningful values are important. 2032 !-- Hence, derive friction velocity from wind speed at a reference height. 2054 !-- Hence, derive friction velocity from wind speed at a reference height, 2055 !-- which is 10 m, according to the height of the 1st vertical grid level 2056 !-- in the COSMO level. However, in case of topography that is higher than 2057 !-- the reference level, the k index is determined from the 1st vertical 2058 !-- PALM grid level instead. 2033 2059 !-- For a first guess use 20 m, which is in the range of the first 2034 2060 !-- COSMO vertical level. … … 2042 2068 DO j = nys, nyn 2043 2069 ! 2070 !-- Determine the k index and topography top index 2071 k_topo = MAX( get_topography_top_index_ji( j, i, 'u' ), & 2072 get_topography_top_index_ji( j, i, 'v' ) ) 2073 k = MAX( k_ref, k_topo + 1 ) 2074 ! 2044 2075 !-- Note, in u- and v- component the imposed perturbations 2045 2076 !-- from the STG are already included. Check whether this 2046 2077 !-- makes any difference compared to using the pure-mean 2047 2078 !-- inflow profiles. 2048 u_int = MERGE( u(k _ref,j,i+1), u(k_ref,j,i), bc_dirichlet_l )2049 v_int = v(k _ref,j,i)2079 u_int = MERGE( u(k,j,i+1), u(k,j,i), bc_dirichlet_l ) 2080 v_int = v(k,j,i) 2050 2081 ! 2051 2082 !-- Calculate friction velocity and sum-up. Therefore, assume … … 2053 2084 friction_vel_l = friction_vel_l + kappa * & 2054 2085 SQRT( u_int * u_int + v_int * v_int ) / & 2055 LOG( zu(k_ref) / z0_mean )2086 LOG( ( zu(k) - zu(k_topo) ) / z0_mean ) 2056 2087 2057 2088 ENDDO … … 2065 2096 DO i = nxl, nxr 2066 2097 2067 u_int = u(k_ref,j,i) 2068 v_int = MERGE( v(k_ref,j+1,i), v(k_ref,j,i), bc_dirichlet_s ) 2098 k_topo = MAX( get_topography_top_index_ji( j, i, 'u' ), & 2099 get_topography_top_index_ji( j, i, 'v' ) ) 2100 k = MAX( k_ref, k_topo + 1 ) 2101 2102 u_int = u(k,j,i) 2103 v_int = MERGE( v(k,j+1,i), v(k,j,i), bc_dirichlet_s ) 2069 2104 2070 2105 friction_vel_l = friction_vel_l + kappa * & 2071 2106 SQRT( u_int * u_int + v_int * v_int ) / & 2072 LOG( zu(k_ref) / z0_mean )2107 LOG( ( zu(k) - zu(k_topo) ) / z0_mean ) 2073 2108 2074 2109 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.