Changeset 2037 for palm/trunk/SOURCE/check_parameters.f90
- Timestamp:
- Oct 26, 2016 11:15:40 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/check_parameters.f90
r2032 r2037 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! Anelastic approximation implemented 23 23 ! 24 24 ! Former revisions: … … 432 432 USE netcdf_interface, & 433 433 ONLY: dopr_unit, do2d_unit, do3d_unit, netcdf_data_format, & 434 netcdf_data_format_string 434 netcdf_data_format_string, dots_unit, heatflux_output_unit, & 435 waterflux_output_unit, momentumflux_output_unit 435 436 436 437 USE particle_attributes … … 837 838 838 839 ENDIF 840 841 ! 842 !-- Check approximation 843 IF ( TRIM( approximation ) /= 'boussinesq' .AND. & 844 TRIM( approximation ) /= 'anelastic' ) THEN 845 message_string = 'unknown approximation: approximation = "' // & 846 TRIM( approximation ) // '"' 847 CALL message( 'check_parameters', 'PA0000', 1, 2, 0, 6, 0 ) 848 ENDIF 849 850 ! 851 !-- Check approximation requirements 852 IF ( TRIM( approximation ) == 'anelastic' .AND. & 853 TRIM( momentum_advec ) /= 'ws-scheme' ) THEN 854 message_string = 'Anelastic approximation requires: ' // & 855 'momentum_advec = "ws-scheme"' 856 CALL message( 'check_parameters', 'PA0000', 1, 2, 0, 6, 0 ) 857 ENDIF 858 IF ( TRIM( approximation ) == 'anelastic' .AND. & 859 TRIM( psolver ) == 'multigrid' ) THEN 860 message_string = 'Anelastic approximation currently only supports: ' // & 861 'psolver = "poisfft", ' // & 862 'psolver = "sor" and ' // & 863 'psolver = "multigrid_noopt"' 864 CALL message( 'check_parameters', 'PA0000', 1, 2, 0, 6, 0 ) 865 ENDIF 866 IF ( TRIM( approximation ) == 'anelastic' .AND. & 867 conserve_volume_flow ) THEN 868 message_string = 'Anelastic approximation is not allowed with:' // & 869 'conserve_volume_flow = .TRUE.' 870 CALL message( 'check_parameters', 'PA0000', 1, 2, 0, 6, 0 ) 871 ENDIF 872 873 ! 874 !-- Check flux input mode 875 IF ( TRIM( flux_input_mode ) /= 'dynamic' .AND. & 876 TRIM( flux_input_mode ) /= 'kinematic' .AND. & 877 TRIM( flux_input_mode ) /= 'approximation-specific' ) THEN 878 message_string = 'unknown flux input mode: flux_input_mode = "' // & 879 TRIM( flux_input_mode ) // '"' 880 CALL message( 'check_parameters', 'PA0000', 1, 2, 0, 6, 0 ) 881 ENDIF 882 !-- Set flux input mode according to approximation if applicable 883 IF ( TRIM( flux_input_mode ) == 'approximation-specific' ) THEN 884 IF ( TRIM( approximation ) == 'anelastic' ) THEN 885 flux_input_mode = 'dynamic' 886 ELSEIF ( TRIM( approximation ) == 'boussinesq' ) THEN 887 flux_input_mode = 'kinematic' 888 ENDIF 889 ENDIF 890 891 ! 892 !-- Check flux output mode 893 IF ( TRIM( flux_output_mode ) /= 'dynamic' .AND. & 894 TRIM( flux_output_mode ) /= 'kinematic' .AND. & 895 TRIM( flux_output_mode ) /= 'approximation-specific' ) THEN 896 message_string = 'unknown flux output mode: flux_output_mode = "' // & 897 TRIM( flux_output_mode ) // '"' 898 CALL message( 'check_parameters', 'PA0000', 1, 2, 0, 6, 0 ) 899 ENDIF 900 !-- Set flux output mode according to approximation if applicable 901 IF ( TRIM( flux_output_mode ) == 'approximation-specific' ) THEN 902 IF ( TRIM( approximation ) == 'anelastic' ) THEN 903 flux_output_mode = 'dynamic' 904 ELSEIF ( TRIM( approximation ) == 'boussinesq' ) THEN 905 flux_output_mode = 'kinematic' 906 ENDIF 907 ENDIF 908 909 ! 910 !-- set the flux output units according to flux_output_mode 911 IF ( TRIM( flux_output_mode ) == 'kinematic' ) THEN 912 heatflux_output_unit = 'K m/s' 913 waterflux_output_unit = 'kg/kg m/s' 914 momentumflux_output_unit = 'm2/s2' 915 ELSEIF ( TRIM( flux_output_mode ) == 'dynamic' ) THEN 916 heatflux_output_unit = 'W/m2' 917 waterflux_output_unit = 'W/m2' 918 momentumflux_output_unit = 'N/m2' 919 ENDIF 920 921 !-- set time series output units for fluxes 922 dots_unit(14:16) = heatflux_output_unit 923 dots_unit(21) = waterflux_output_unit 924 dots_unit(19:20) = momentumflux_output_unit 839 925 840 926 ! … … 2115 2201 CASE ( 'w"u"' ) 2116 2202 dopr_index(i) = 12 2117 dopr_unit(i) = 'm2/s2'2203 dopr_unit(i) = TRIM ( momentumflux_output_unit ) 2118 2204 hom(:,2,12,:) = SPREAD( zw, 2, statistic_regions+1 ) 2119 2205 IF ( constant_flux_layer ) hom(nzb,2,12,:) = zu(1) … … 2121 2207 CASE ( 'w*u*' ) 2122 2208 dopr_index(i) = 13 2123 dopr_unit(i) = 'm2/s2'2209 dopr_unit(i) = TRIM ( momentumflux_output_unit ) 2124 2210 hom(:,2,13,:) = SPREAD( zw, 2, statistic_regions+1 ) 2125 2211 2126 2212 CASE ( 'w"v"' ) 2127 2213 dopr_index(i) = 14 2128 dopr_unit(i) = 'm2/s2'2214 dopr_unit(i) = TRIM ( momentumflux_output_unit ) 2129 2215 hom(:,2,14,:) = SPREAD( zw, 2, statistic_regions+1 ) 2130 2216 IF ( constant_flux_layer ) hom(nzb,2,14,:) = zu(1) … … 2132 2218 CASE ( 'w*v*' ) 2133 2219 dopr_index(i) = 15 2134 dopr_unit(i) = 'm2/s2'2220 dopr_unit(i) = TRIM ( momentumflux_output_unit ) 2135 2221 hom(:,2,15,:) = SPREAD( zw, 2, statistic_regions+1 ) 2136 2222 2137 2223 CASE ( 'w"pt"' ) 2138 2224 dopr_index(i) = 16 2139 dopr_unit(i) = 'K m/s'2225 dopr_unit(i) = TRIM ( heatflux_output_unit ) 2140 2226 hom(:,2,16,:) = SPREAD( zw, 2, statistic_regions+1 ) 2141 2227 2142 2228 CASE ( 'w*pt*' ) 2143 2229 dopr_index(i) = 17 2144 dopr_unit(i) = 'K m/s'2230 dopr_unit(i) = TRIM ( heatflux_output_unit ) 2145 2231 hom(:,2,17,:) = SPREAD( zw, 2, statistic_regions+1 ) 2146 2232 2147 2233 CASE ( 'wpt' ) 2148 2234 dopr_index(i) = 18 2149 dopr_unit(i) = 'K m/s'2235 dopr_unit(i) = TRIM ( heatflux_output_unit ) 2150 2236 hom(:,2,18,:) = SPREAD( zw, 2, statistic_regions+1 ) 2151 2237 2152 2238 CASE ( 'wu' ) 2153 2239 dopr_index(i) = 19 2154 dopr_unit(i) = 'm2/s2'2240 dopr_unit(i) = TRIM ( momentumflux_output_unit ) 2155 2241 hom(:,2,19,:) = SPREAD( zw, 2, statistic_regions+1 ) 2156 2242 IF ( constant_flux_layer ) hom(nzb,2,19,:) = zu(1) … … 2158 2244 CASE ( 'wv' ) 2159 2245 dopr_index(i) = 20 2160 dopr_unit(i) = 'm2/s2'2246 dopr_unit(i) = TRIM ( momentumflux_output_unit ) 2161 2247 hom(:,2,20,:) = SPREAD( zw, 2, statistic_regions+1 ) 2162 2248 IF ( constant_flux_layer ) hom(nzb,2,20,:) = zu(1) … … 2164 2250 CASE ( 'w*pt*BC' ) 2165 2251 dopr_index(i) = 21 2166 dopr_unit(i) = 'K m/s'2252 dopr_unit(i) = TRIM ( heatflux_output_unit ) 2167 2253 hom(:,2,21,:) = SPREAD( zw, 2, statistic_regions+1 ) 2168 2254 2169 2255 CASE ( 'wptBC' ) 2170 2256 dopr_index(i) = 22 2171 dopr_unit(i) = 'K m/s'2257 dopr_unit(i) = TRIM ( heatflux_output_unit ) 2172 2258 hom(:,2,22,:) = SPREAD( zw, 2, statistic_regions+1 ) 2173 2259 … … 2335 2421 CASE ( 'w"vpt"' ) 2336 2422 dopr_index(i) = 45 2337 dopr_unit(i) = 'K m/s'2423 dopr_unit(i) = TRIM ( heatflux_output_unit ) 2338 2424 hom(:,2,45,:) = SPREAD( zw, 2, statistic_regions+1 ) 2339 2425 2340 2426 CASE ( 'w*vpt*' ) 2341 2427 dopr_index(i) = 46 2342 dopr_unit(i) = 'K m/s'2428 dopr_unit(i) = TRIM ( heatflux_output_unit ) 2343 2429 hom(:,2,46,:) = SPREAD( zw, 2, statistic_regions+1 ) 2344 2430 2345 2431 CASE ( 'wvpt' ) 2346 2432 dopr_index(i) = 47 2347 dopr_unit(i) = 'K m/s'2433 dopr_unit(i) = TRIM ( heatflux_output_unit ) 2348 2434 hom(:,2,47,:) = SPREAD( zw, 2, statistic_regions+1 ) 2349 2435 … … 2356 2442 ELSE 2357 2443 dopr_index(i) = 48 2358 dopr_unit(i) = 'kg/kg m/s'2444 dopr_unit(i) = TRIM ( waterflux_output_unit ) 2359 2445 hom(:,2,48,:) = SPREAD( zw, 2, statistic_regions+1 ) 2360 2446 ENDIF … … 2368 2454 ELSE 2369 2455 dopr_index(i) = 49 2370 dopr_unit(i) = 'kg/kg m/s'2456 dopr_unit(i) = TRIM ( waterflux_output_unit ) 2371 2457 hom(:,2,49,:) = SPREAD( zw, 2, statistic_regions+1 ) 2372 2458 ENDIF … … 2380 2466 ELSE 2381 2467 dopr_index(i) = 50 2382 dopr_unit(i) = 'kg/kg m/s'2468 dopr_unit(i) = TRIM ( waterflux_output_unit ) 2383 2469 hom(:,2,50,:) = SPREAD( zw, 2, statistic_regions+1 ) 2384 2470 ENDIF … … 2423 2509 IF ( humidity .AND. .NOT. cloud_physics ) THEN 2424 2510 dopr_index(i) = 48 2425 dopr_unit(i) = 'kg/kg m/s'2511 dopr_unit(i) = TRIM ( waterflux_output_unit ) 2426 2512 hom(:,2,48,:) = SPREAD( zw, 2, statistic_regions+1 ) 2427 2513 ELSEIF ( humidity .AND. cloud_physics ) THEN 2428 2514 dopr_index(i) = 51 2429 dopr_unit(i) = 'kg/kg m/s'2515 dopr_unit(i) = TRIM ( waterflux_output_unit ) 2430 2516 hom(:,2,51,:) = SPREAD( zw, 2, statistic_regions+1 ) 2431 2517 ELSE … … 2441 2527 THEN 2442 2528 dopr_index(i) = 49 2443 dopr_unit(i) = 'kg/kg m/s'2529 dopr_unit(i) = TRIM ( waterflux_output_unit ) 2444 2530 hom(:,2,49,:) = SPREAD( zw, 2, statistic_regions+1 ) 2445 2531 ELSEIF( humidity .AND. cloud_physics ) THEN 2446 2532 dopr_index(i) = 52 2447 dopr_unit(i) = 'kg/kg m/s'2533 dopr_unit(i) = TRIM ( waterflux_output_unit ) 2448 2534 hom(:,2,52,:) = SPREAD( zw, 2, statistic_regions+1 ) 2449 2535 ELSE … … 2458 2544 IF ( humidity .AND. .NOT. cloud_physics ) THEN 2459 2545 dopr_index(i) = 50 2460 dopr_unit(i) = 'kg/kg m/s'2546 dopr_unit(i) = TRIM ( waterflux_output_unit ) 2461 2547 hom(:,2,50,:) = SPREAD( zw, 2, statistic_regions+1 ) 2462 2548 ELSEIF ( humidity .AND. cloud_physics ) THEN 2463 2549 dopr_index(i) = 53 2464 dopr_unit(i) = 'kg/kg m/s'2550 dopr_unit(i) = TRIM ( waterflux_output_unit ) 2465 2551 hom(:,2,53,:) = SPREAD( zw, 2, statistic_regions+1 ) 2466 2552 ELSE … … 2503 2589 CASE ( 'u"pt"' ) 2504 2590 dopr_index(i) = 58 2505 dopr_unit(i) = 'K m/s'2591 dopr_unit(i) = TRIM ( heatflux_output_unit ) 2506 2592 hom(:,2,58,:) = SPREAD( zu, 2, statistic_regions+1 ) 2507 2593 2508 2594 CASE ( 'u*pt*' ) 2509 2595 dopr_index(i) = 59 2510 dopr_unit(i) = 'K m/s'2596 dopr_unit(i) = TRIM ( heatflux_output_unit ) 2511 2597 hom(:,2,59,:) = SPREAD( zu, 2, statistic_regions+1 ) 2512 2598 2513 2599 CASE ( 'upt_t' ) 2514 2600 dopr_index(i) = 60 2515 dopr_unit(i) = 'K m/s'2601 dopr_unit(i) = TRIM ( heatflux_output_unit ) 2516 2602 hom(:,2,60,:) = SPREAD( zu, 2, statistic_regions+1 ) 2517 2603 2518 2604 CASE ( 'v"pt"' ) 2519 2605 dopr_index(i) = 61 2520 dopr_unit(i) = 'K m/s'2606 dopr_unit(i) = TRIM ( heatflux_output_unit ) 2521 2607 hom(:,2,61,:) = SPREAD( zu, 2, statistic_regions+1 ) 2522 2608 2523 2609 CASE ( 'v*pt*' ) 2524 2610 dopr_index(i) = 62 2525 dopr_unit(i) = 'K m/s'2611 dopr_unit(i) = TRIM ( heatflux_output_unit ) 2526 2612 hom(:,2,62,:) = SPREAD( zu, 2, statistic_regions+1 ) 2527 2613 2528 2614 CASE ( 'vpt_t' ) 2529 2615 dopr_index(i) = 63 2530 dopr_unit(i) = 'K m/s'2616 dopr_unit(i) = TRIM ( heatflux_output_unit ) 2531 2617 hom(:,2,63,:) = SPREAD( zu, 2, statistic_regions+1 ) 2532 2618 … … 2621 2707 CASE ( 'hyp' ) 2622 2708 dopr_index(i) = 72 2623 dopr_unit(i) = ' dbar'2709 dopr_unit(i) = 'hPa' 2624 2710 hom(:,2,72,:) = SPREAD( zu, 2, statistic_regions+1 ) 2711 2712 CASE ( 'rho_air' ) 2713 dopr_index(i) = 121 2714 dopr_unit(i) = 'kg/m3' 2715 hom(:,2,121,:) = SPREAD( zu, 2, statistic_regions+1 ) 2716 2717 CASE ( 'rho_air_zw' ) 2718 dopr_index(i) = 122 2719 dopr_unit(i) = 'kg/m3' 2720 hom(:,2,122,:) = SPREAD( zw, 2, statistic_regions+1 ) 2625 2721 2626 2722 CASE ( 'nr' )
Note: See TracChangeset
for help on using the changeset viewer.