Changeset 3685 for palm/trunk
- Timestamp:
- Jan 21, 2019 1:02:11 AM (6 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/Makefile
r3684 r3685 862 862 modules.o \ 863 863 netcdf_data_input_mod.o \ 864 salsa_mod.o \865 864 surface_mod.o 866 865 chemistry_model_mod.o: \ 867 866 advec_ws.o \ 867 chem_emissions_mod.o \ 868 868 chem_gasphase_mod.o \ 869 869 chem_modules.o \ … … 1081 1081 advec_ws.o \ 1082 1082 basic_constants_and_equations_mod.o \ 1083 biometeorology_mod.o \ 1084 bulk_cloud_model_mod.o \ 1085 chem_emissions_mod.o \ 1083 bulk_cloud_model_mod.o \ 1086 1084 cpulog_mod.o \ 1087 1085 disturb_heatflux.o \ 1088 gust_mod.o \1089 indoor_model_mod.o \1090 land_surface_model_mod.o \1091 1086 large_scale_forcing_nudging_mod.o \ 1092 1087 lpm_init.o \ … … 1099 1094 netcdf_interface_mod.o \ 1100 1095 nesting_offl_mod.o \ 1101 ocean_mod.o \1102 plant_canopy_model_mod.o \1103 1096 pmc_interface_mod.o \ 1104 1097 radiation_model_mod.o \ … … 1106 1099 random_generator_parallel_mod.o \ 1107 1100 read_restart_data_mod.o \ 1108 salsa_mod.o \1109 1101 surface_layer_fluxes_mod.o \ 1110 1102 surface_mod.o \ 1111 1103 surface_data_output_mod.o \ 1112 1104 synthetic_turbulence_generator_mod.o \ 1113 turbulence_closure_mod.o \ 1114 urban_surface_mod.o \ 1115 virtual_flight_mod.o \ 1116 virtual_measurement_mod.o \ 1117 wind_turbine_model_mod.o 1105 turbulence_closure_mod.o 1118 1106 init_advec.o: \ 1119 1107 mod_kinds.o \ … … 1412 1400 palm.o: \ 1413 1401 bulk_cloud_model_mod.o \ 1414 chemistry_model_mod.o \1415 1402 chem_photolysis_mod.o \ 1416 1403 cpulog_mod.o \ -
palm/trunk/SOURCE/biometeorology_mod.f90
r3650 r3685 27 27 ! ----------------- 28 28 ! $Id$ 29 ! Some interface calls moved to module_interface + cleanup 30 ! 31 ! 3650 2019-01-04 13:01:33Z kanani 29 32 ! Bugfixes and additions for enabling restarts with biometeorology 30 33 ! … … 1114 1117 !-- Internal vriables 1115 1118 REAL ( wp ) :: height !< current height in meters 1119 1120 CALL location_message( 'initializing biometeorology module', .FALSE. ) 1116 1121 ! 1117 1122 !-- Determine cell level corresponding to 1.1 m above ground level … … 1136 1141 !-- Init UVEM and load lookup tables 1137 1142 IF ( uv_exposure ) CALL netcdf_data_input_uvem 1143 1144 CALL location_message( 'finished', .TRUE. ) 1138 1145 1139 1146 END SUBROUTINE bio_init -
palm/trunk/SOURCE/chem_emissions_mod.f90
r3611 r3685 22 22 ! Current revisions: 23 23 ! ------------------ 24 ! 24 ! 25 25 ! 26 26 ! Former revisions: 27 27 ! ----------------- 28 28 ! $Id$ 29 ! Some interface calls moved to module_interface + cleanup 30 ! 31 ! 3611 2018-12-07 14:14:11Z banzhafs 29 32 ! Code update to comply PALM coding rules 30 33 ! removed unnecessary informative messsages/location … … 693 696 !> fluxes at timestep 0 694 697 !------------------------------------------------------------------------------! 695 SUBROUTINE chem_emissions_init ( emt_att, emt, nspec_out )698 SUBROUTINE chem_emissions_init 696 699 697 700 USE surface_mod, & 698 701 ONLY: surf_def_h, surf_lsm_h, surf_usm_h 702 703 USE netcdf_data_input_mod, & 704 ONLY: chem_emis, chem_emis_att 699 705 700 706 IMPLICIT NONE 701 707 702 708 CHARACTER (LEN=80) :: units !< units of inputs 703 704 INTEGER(iwp), INTENT(INOUT) :: nspec_out !< number of outputs705 709 706 710 INTEGER(iwp) :: ispec !< running index 707 708 TYPE(chem_emis_att_type), INTENT(INOUT) :: emt_att !< variable where to store all the information709 !< of emission inputs whose values do not710 !< depend on the considered species711 712 TYPE(chem_emis_val_type), INTENT(INOUT), ALLOCATABLE, DIMENSION(:) :: emt !< variable where to store emission input713 !< values depending on the considered species714 711 715 712 ! … … 730 727 ! 731 728 !-- Matching 732 CALL chem_emissions_match( emt_att, nspec_out )729 CALL chem_emissions_match( chem_emis_att, nspec_out ) 733 730 734 731 IF ( nspec_out == 0 ) THEN … … 743 740 ! 744 741 !-- Set molecule masses' 745 ALLOCATE( emt_att%xm(nspec_out) )742 ALLOCATE( chem_emis_att%xm(nspec_out) ) 746 743 747 744 DO ispec = 1, nspec_out 748 745 SELECT CASE ( TRIM( spc_names(match_spec_model(ispec)) ) ) 749 CASE ( 'SO2' ); emt_att%xm(ispec) = xm_S + xm_O * 2 !< kg/mole750 CASE ( 'SO4' ); emt_att%xm(ispec) = xm_S + xm_O * 4 !< kg/mole751 CASE ( 'NO' ); emt_att%xm(ispec) = xm_N + xm_O !< kg/mole752 CASE ( 'NO2' ); emt_att%xm(ispec) = xm_N + xm_O * 2 !< kg/mole753 CASE ( 'NH3' ); emt_att%xm(ispec) = xm_N + xm_H * 3 !< kg/mole754 CASE ( 'CO' ); emt_att%xm(ispec) = xm_C + xm_O !< kg/mole755 CASE ( 'CO2' ); emt_att%xm(ispec) = xm_C + xm_O * 2 !< kg/mole756 CASE ( 'CH4' ); emt_att%xm(ispec) = xm_C + xm_H * 4 !< kg/mole757 CASE ( 'HNO3' ); emt_att%xm(ispec) = xm_H + xm_N + xm_O*3 !< kg/mole746 CASE ( 'SO2' ); chem_emis_att%xm(ispec) = xm_S + xm_O * 2 !< kg/mole 747 CASE ( 'SO4' ); chem_emis_att%xm(ispec) = xm_S + xm_O * 4 !< kg/mole 748 CASE ( 'NO' ); chem_emis_att%xm(ispec) = xm_N + xm_O !< kg/mole 749 CASE ( 'NO2' ); chem_emis_att%xm(ispec) = xm_N + xm_O * 2 !< kg/mole 750 CASE ( 'NH3' ); chem_emis_att%xm(ispec) = xm_N + xm_H * 3 !< kg/mole 751 CASE ( 'CO' ); chem_emis_att%xm(ispec) = xm_C + xm_O !< kg/mole 752 CASE ( 'CO2' ); chem_emis_att%xm(ispec) = xm_C + xm_O * 2 !< kg/mole 753 CASE ( 'CH4' ); chem_emis_att%xm(ispec) = xm_C + xm_H * 4 !< kg/mole 754 CASE ( 'HNO3' ); chem_emis_att%xm(ispec) = xm_H + xm_N + xm_O*3 !< kg/mole 758 755 CASE DEFAULT 759 emt_att%xm(ispec) = 1.0_wp756 chem_emis_att%xm(ispec) = 1.0_wp 760 757 END SELECT 761 758 ENDDO … … 775 772 ! 776 773 !-- Get emissions at the first time step 777 CALL chem_emissions_setup( emt_att, emt, nspec_out )774 CALL chem_emissions_setup( chem_emis_att, chem_emis, nspec_out ) 778 775 779 776 ! … … 785 782 ! 786 783 !-- Get emissions at the first time step 787 CALL chem_emissions_setup( emt_att, emt, nspec_out )784 CALL chem_emissions_setup( chem_emis_att, chem_emis, nspec_out ) 788 785 789 786 ! … … 795 792 ! 796 793 !-- Get emissions at the first time step 797 CALL chem_emissions_setup( emt_att, emt, nspec_out)794 CALL chem_emissions_setup( chem_emis_att, chem_emis, nspec_out) 798 795 799 796 END SELECT -
palm/trunk/SOURCE/chemistry_model_mod.f90
r3664 r3685 27 27 ! ----------------- 28 28 ! $Id$ 29 ! Some interface calls moved to module_interface + cleanup 30 ! 31 ! 3664 2019-01-09 14:00:37Z forkel 29 32 ! Replaced misplaced location message by @todo 30 33 ! … … 454 457 END INTERFACE chem_header 455 458 459 INTERFACE chem_init_arrays 460 MODULE PROCEDURE chem_init_arrays 461 END INTERFACE chem_init_arrays 462 456 463 INTERFACE chem_init 457 464 MODULE PROCEDURE chem_init … … 564 571 chem_check_data_output_pr, chem_check_parameters, & 565 572 chem_data_output_2d, chem_data_output_3d, chem_data_output_mask, & 566 chem_define_netcdf_grid, chem_header, chem_init, 573 chem_define_netcdf_grid, chem_header, chem_init, chem_init_arrays, & 567 574 chem_init_profiles, chem_integrate, chem_parin, & 568 575 chem_prognostic_equations, chem_rrd_local, & … … 1182 1189 !-- temporary switch of this part of the check 1183 1190 ! RETURN !bK commented 1191 CALL chem_init_internal 1184 1192 !--------------------- 1185 1193 … … 1717 1725 ! Description: 1718 1726 ! ------------ 1727 !> Subroutine initializating chemistry_model_mod specific arrays 1728 !------------------------------------------------------------------------------! 1729 SUBROUTINE chem_init_arrays 1730 1731 !-- Please use this place to allocate required arrays 1732 1733 END SUBROUTINE chem_init_arrays 1734 1735 ! 1736 !------------------------------------------------------------------------------! 1737 ! 1738 ! Description: 1739 ! ------------ 1719 1740 !> Subroutine initializating chemistry_model_mod 1720 1741 !------------------------------------------------------------------------------! 1721 1742 SUBROUTINE chem_init 1743 1744 USE chem_emissions_mod, & 1745 ONLY: chem_emissions_init 1746 1747 IMPLICIT NONE 1748 1749 1750 IF ( do_emis ) CALL chem_emissions_init 1751 1752 1753 END SUBROUTINE chem_init 1754 1755 ! 1756 !------------------------------------------------------------------------------! 1757 ! 1758 ! Description: 1759 ! ------------ 1760 !> Subroutine initializating chemistry_model_mod 1761 !> internal workaround for chem_species dependency in chem_check_parameters 1762 !------------------------------------------------------------------------------! 1763 SUBROUTINE chem_init_internal 1722 1764 1723 1765 USE control_parameters, & … … 1727 1769 USE pegrid 1728 1770 1771 USE netcdf_data_input_mod, & 1772 ONLY: chem_emis, chem_emis_att, netcdf_data_input_chemistry_data 1773 1729 1774 IMPLICIT NONE 1730 1775 … … 1736 1781 INTEGER(iwp) :: lpr_lev !< running index for chem spcs profile level 1737 1782 1783 IF ( do_emis ) THEN 1784 CALL netcdf_data_input_chemistry_data( chem_emis_att, chem_emis ) 1785 ENDIF 1738 1786 ! 1739 1787 !-- Allocate memory for chemical species … … 1861 1909 ENDDO 1862 1910 1911 ! CALL photolysis_init ! probably also required for restart 1912 1863 1913 RETURN 1864 1914 1865 END SUBROUTINE chem_init 1915 END SUBROUTINE chem_init_internal 1866 1916 1867 1917 ! -
palm/trunk/SOURCE/gust_mod.f90
r3665 r3685 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Some interface calls moved to module_interface + cleanup 28 ! 29 ! 3665 2019-01-10 08:28:24Z raasch 27 30 ! dummy statements added to avoid compiler warnings about unused variables 28 31 ! … … 279 282 !> Initialization of the gust module 280 283 !------------------------------------------------------------------------------! 281 SUBROUTINE gust_init( dots_label, dots_unit, dots_num, dots_max ) 282 283 284 IMPLICIT NONE 285 286 INTEGER(iwp) :: dots_num 287 INTEGER(iwp) :: dots_max 288 CHARACTER (LEN=13), DIMENSION(dots_max) :: dots_unit 289 CHARACTER (LEN=13), DIMENSION(dots_max) :: dots_label 290 291 ! 292 !-- Next line is just to avoid compiler warnings about unused variables. You may remove it. 293 IF ( dummy_logical ) idum = dots_num + dots_max + LEN( dots_unit(1) ) + LEN( dots_label(1) ) 284 SUBROUTINE gust_init 285 286 287 IMPLICIT NONE 288 294 289 295 290 END SUBROUTINE gust_init -
palm/trunk/SOURCE/indoor_model_mod.f90
r3597 r3685 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Some interface calls moved to module_interface + cleanup 29 ! 30 ! 3597 2018-12-04 08:40:18Z maronga 28 31 ! Renamed t_surf_10cm to pt_10cm 29 32 ! … … 388 391 !< on local subdomain 389 392 393 CALL location_message( 'initializing indoor model', .FALSE. ) 394 390 395 ! 391 396 !-- Initializing of indoor model is only possible if buildings can be … … 814 819 theta_m_t_prev = initial_indoor_temperature 815 820 821 CALL location_message( 'finished', .TRUE. ) 816 822 817 823 END SUBROUTINE im_init -
palm/trunk/SOURCE/init_3d_model.f90
r3648 r3685 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Some interface calls moved to module_interface + cleanup 28 ! 29 ! 3648 2019-01-02 16:35:46Z suehring 27 30 ! Rename subroutines for surface-data output 28 31 ! … … 583 586 ideal_gas_law_rho, ideal_gas_law_rho_pt, barometric_formula 584 587 585 USE biometeorology_mod, &586 ONLY: bio_init587 588 588 USE bulk_cloud_model_mod, & 589 ONLY: bulk_cloud_model, bcm_init, bcm_init_arrays 590 591 USE chem_emissions_mod, & 592 ONLY: chem_emissions_init 589 ONLY: bulk_cloud_model 593 590 594 591 USE chem_modules, & 595 ONLY: do_emis, max_pr_cs, nspec_out592 ONLY: max_pr_cs ! ToDo: this dependency needs to be removed cause it is ugly #new_dom 596 593 597 594 USE control_parameters 598 599 USE flight_mod, &600 ONLY: flight_init601 595 602 596 USE grid_variables, & 603 597 ONLY: dx, dy, ddx2_mg, ddy2_mg 604 598 605 USE gust_mod, &606 ONLY: gust_init, gust_init_arrays, gust_module_enabled607 608 599 USE indices 609 600 610 USE indoor_model_mod, &611 ONLY: im_init612 613 601 USE kinds 614 615 USE land_surface_model_mod, &616 ONLY: lsm_init, lsm_init_arrays617 602 618 603 USE lpm_init_mod, & … … 620 605 621 606 USE lsf_nudging_mod, & 622 ONLY: ls f_init, ls_forcing_surf, nudge_init607 ONLY: ls_forcing_surf 623 608 624 609 USE model_1d_mod, & 625 610 ONLY: init_1d_model, l1d, u1d, v1d 611 612 USE module_interface, & 613 ONLY: module_interface_init_arrays, module_interface_init 626 614 627 615 USE multi_agent_system_mod, & … … 638 626 ONLY: nesting_offl_init 639 627 640 USE ocean_mod, &641 ONLY: ocean_init, ocean_init_arrays642 643 628 USE particle_attributes, & 644 629 ONLY: particle_advection 645 630 646 631 USE pegrid 647 648 USE plant_canopy_model_mod, &649 ONLY: pcm_init650 632 651 633 #if defined( __parallel ) … … 655 637 656 638 USE radiation_model_mod, & 657 ONLY: average_radiation, & 658 radiation_init, radiation, radiation_scheme, & 659 radiation_calc_svf, radiation_write_svf, & 660 radiation_interaction, radiation_interactions, & 661 radiation_interaction_init, radiation_read_svf, & 662 radiation_presimulate_solar_pos, radiation_interactions_on 663 639 ONLY: radiation, radiation_scheme 640 664 641 USE random_function_mod 665 642 666 643 USE random_generator_parallel, & 667 644 ONLY: init_parallel_random_generator 668 645 669 646 USE read_restart_data_mod, & 670 ONLY: rrd_read_parts_of_global, rrd_local 671 672 USE salsa_mod, & 673 ONLY: salsa_init, salsa_init_arrays 674 647 ONLY: rrd_read_parts_of_global, rrd_local 648 675 649 USE statistics, & 676 650 ONLY: hom, hom_sum, mean_surface_level_height, pr_palm, rmask, & … … 682 656 ONLY: parametrize_inflow_turbulence, stg_adjust, stg_init, & 683 657 use_syn_turb_gen 684 658 685 659 USE surface_layer_fluxes_mod, & 686 660 ONLY: init_surface_layer_fluxes … … 689 663 ONLY : init_surface_arrays, init_surfaces, surf_def_h, surf_lsm_h, & 690 664 surf_usm_h, get_topography_top_index_ji, vertical_surfaces_exist 691 665 692 666 USE surface_data_output_mod, & 693 667 ONLY: surface_data_output_init 694 668 695 669 USE transpose_indices 696 670 697 671 USE turbulence_closure_mod, & 698 672 ONLY: tcm_init_arrays, tcm_init 699 700 USE urban_surface_mod, &701 ONLY: usm_init_urban_surface, usm_allocate_surface702 703 USE virtual_measurement_mod, &704 ONLY: vm_init705 706 USE wind_turbine_model_mod, &707 ONLY: wtm_init, wtm_init_arrays708 673 709 674 IMPLICIT NONE … … 1076 1041 ! 1077 1042 !-- Allocate arrays for other modules 1078 IF ( bulk_cloud_model ) CALL bcm_init_arrays 1079 IF ( gust_module_enabled ) CALL gust_init_arrays 1080 IF ( land_surface ) CALL lsm_init_arrays 1081 IF ( ocean_mode ) CALL ocean_init_arrays 1082 IF ( salsa ) CALL salsa_init_arrays 1083 IF ( wind_turbine ) CALL wtm_init_arrays 1084 1085 ! 1086 !-- Initialize virtual flight measurements 1087 IF ( virtual_flight ) THEN 1088 CALL flight_init 1089 ENDIF 1043 CALL module_interface_init_arrays 1090 1044 1091 1045 … … 2098 2052 ENDIF 2099 2053 ENDIF 2100 !2101 !-- User-defined initializing actions2102 CALL user_init2103 2054 ! 2104 2055 !-- To do: New concept for these non-topography grid points! … … 2205 2156 DEALLOCATE( mean_surface_level_height_l, ngp_2dh_l, ngp_2dh_outer_l, & 2206 2157 ngp_3d_inner_l, ngp_3d_inner_tmp ) 2207 2208 !2209 !-- Initialize nudging if required2210 IF ( nudging ) CALL nudge_init2211 !2212 !-- Initialize 1D large-scale forcing and nudging and read data from external2213 !-- ASCII file2214 IF ( large_scale_forcing ) CALL lsf_init2215 2158 ! 2216 2159 !-- Initialize surface forcing corresponding to large-scale forcing. Therein, … … 2250 2193 2251 2194 ! 2252 !-- If required, initialize quantities needed for the plant canopy model2253 IF ( plant_canopy ) THEN2254 CALL location_message( 'initializing plant canopy model', .FALSE. )2255 CALL pcm_init2256 CALL location_message( 'finished', .TRUE. )2257 ENDIF2258 2259 !2260 2195 !-- If required, initialize dvrp-software 2261 2196 IF ( dt_dvrp /= 9999999.9_wp ) CALL init_dvrp 2262 2263 !2264 !-- Initialize quantities needed for the ocean model2265 IF ( ocean_mode ) CALL ocean_init2266 2197 2267 2198 ! … … 2281 2212 WRITE( message_string, * ) 'absolute temperature < 0.0 at zu(', k, & 2282 2213 ') = ', zu(k) 2283 CALL message( 'init_ bulk_cloud_model', 'PA0142', 1, 2, 0, 6, 0 )2214 CALL message( 'init_3d_model', 'PA0142', 1, 2, 0, 6, 0 ) 2284 2215 ENDIF 2285 2216 ENDDO … … 2296 2227 2297 2228 ENDIF 2298 !2299 !-- If required, initialize quantities needed for the microphysics module2300 IF ( bulk_cloud_model ) THEN2301 CALL bcm_init2302 ENDIF2303 2229 2304 2230 ! 2305 2231 !-- If required, initialize particles 2306 2232 IF ( particle_advection ) CALL lpm_init 2307 2308 2233 ! 2309 2234 !-- If required, initialize particles 2310 2235 IF ( agents_active ) CALL mas_init 2311 2312 !2313 !-- If required, initialize quantities needed for the LSM2314 IF ( land_surface ) THEN2315 CALL location_message( 'initializing land surface model', .FALSE. )2316 CALL lsm_init2317 CALL location_message( 'finished', .TRUE. )2318 ENDIF2319 2320 !2321 !-- If required, allocate USM and LSM surfaces2322 IF ( urban_surface ) THEN2323 CALL location_message( 'initializing and allocating urban surfaces', .FALSE. )2324 CALL usm_allocate_surface2325 CALL location_message( 'finished', .TRUE. )2326 ENDIF2327 !2328 !-- If required, initialize urban surface model2329 IF ( urban_surface ) THEN2330 CALL location_message( 'initializing urban surface model', .FALSE. )2331 CALL usm_init_urban_surface2332 CALL location_message( 'finished', .TRUE. )2333 ENDIF2334 2335 !2336 !-- Initialize surface layer (done after LSM as roughness length are required2337 !-- for initialization2338 IF ( constant_flux_layer ) THEN2339 CALL location_message( 'initializing surface layer', .FALSE. )2340 CALL init_surface_layer_fluxes2341 CALL location_message( 'finished', .TRUE. )2342 ENDIF2343 2236 ! 2344 2237 !-- In case the synthetic turbulence generator does not have any information … … 2347 2240 !-- Please note, within pre-determined time intervals these turbulence 2348 2241 !-- information can be updated if desired. 2349 IF ( use_syn_turb_gen .AND. parametrize_inflow_turbulence ) &2242 IF ( use_syn_turb_gen .AND. parametrize_inflow_turbulence ) THEN 2350 2243 CALL stg_adjust 2351 ! 2352 !-- If required, set chemical emissions 2353 !-- Initialize values of cssws according to chemistry emission values 2354 IF ( air_chemistry .AND. do_emis ) THEN 2355 CALL chem_emissions_init( chem_emis_att, chem_emis, nspec_out ) 2356 ENDIF 2357 ! 2358 !-- Initialize radiation processes 2359 IF ( radiation ) THEN 2360 ! 2361 !-- Activate radiation_interactions according to the existence of vertical surfaces and/or trees. 2362 !-- The namelist parameter radiation_interactions_on can override this behavior. 2363 !-- (This check cannot be performed in check_parameters, because vertical_surfaces_exist is first set in 2364 !-- init_surface_arrays.) 2365 IF ( radiation_interactions_on ) THEN 2366 IF ( vertical_surfaces_exist .OR. plant_canopy ) THEN 2367 radiation_interactions = .TRUE. 2368 average_radiation = .TRUE. 2369 ELSE 2370 radiation_interactions_on = .FALSE. !< reset namelist parameter: no interactions 2371 !< calculations necessary in case of flat surface 2372 ENDIF 2373 ELSEIF ( vertical_surfaces_exist .OR. plant_canopy ) THEN 2374 message_string = 'radiation_interactions_on is set to .FALSE. although ' // & 2375 'vertical surfaces and/or trees exist. The model will run ' // & 2376 'without RTM (no shadows, no radiation reflections)' 2377 CALL message( 'init_3d_model', 'PA0348', 0, 1, 0, 6, 0 ) 2378 ENDIF 2379 ! 2380 !-- If required, initialize radiation interactions between surfaces 2381 !-- via sky-view factors. This must be done before radiation is initialized. 2382 IF ( radiation_interactions ) CALL radiation_interaction_init 2383 2384 ! 2385 !-- Initialize radiation model 2386 CALL location_message( 'initializing radiation model', .FALSE. ) 2387 CALL radiation_init 2388 CALL location_message( 'finished', .TRUE. ) 2389 2390 ! 2391 !-- Find all discretized apparent solar positions for radiation interaction. 2392 !-- This must be done after radiation_init. 2393 IF ( radiation_interactions ) CALL radiation_presimulate_solar_pos 2394 2395 ! 2396 !-- If required, read or calculate and write out the SVF 2397 IF ( radiation_interactions .AND. read_svf) THEN 2398 ! 2399 !-- Read sky-view factors and further required data from file 2400 CALL location_message( ' Start reading SVF from file', .FALSE. ) 2401 CALL radiation_read_svf() 2402 CALL location_message( ' Reading SVF from file has finished', .TRUE. ) 2403 2404 ELSEIF ( radiation_interactions .AND. .NOT. read_svf) THEN 2405 ! 2406 !-- calculate SFV and CSF 2407 CALL location_message( ' Start calculation of SVF', .FALSE. ) 2408 CALL radiation_calc_svf() 2409 CALL location_message( ' Calculation of SVF has finished', .TRUE. ) 2410 ENDIF 2411 2412 IF ( radiation_interactions .AND. write_svf) THEN 2413 ! 2414 !-- Write svf, csf svfsurf and csfsurf data to file 2415 CALL location_message( ' Start writing SVF in file', .FALSE. ) 2416 CALL radiation_write_svf() 2417 CALL location_message( ' Writing SVF in file has finished', .TRUE. ) 2418 ENDIF 2419 2420 ! 2421 !-- Adjust radiative fluxes. In case of urban and land surfaces, also 2422 !-- call an initial interaction. 2423 IF ( radiation_interactions ) THEN 2424 CALL radiation_interaction 2425 ENDIF 2426 ENDIF 2427 2428 ! 2429 !-- If required, initialize quantities needed for the wind turbine model 2430 IF ( wind_turbine ) THEN 2431 CALL location_message( 'initializing wind turbine model', .FALSE. ) 2432 CALL wtm_init 2433 CALL location_message( 'finished', .TRUE. ) 2434 ENDIF 2435 2436 ! 2437 !-- If required, initialize quantities needed in SALSA 2438 IF ( salsa ) THEN 2439 CALL location_message( 'initializing SALSA model', .TRUE. ) 2440 CALL salsa_init 2441 CALL location_message( 'finished', .TRUE. ) 2442 ENDIF 2443 2444 ! 2445 !-- If required, initialize quantities needed for the gust module 2446 IF ( gust_module_enabled ) THEN 2447 CALL gust_init( dots_label, dots_unit, dots_num, dots_max ) 2448 ENDIF 2244 ENDIF 2245 ! 2246 !-- Initializing actions for all other modules 2247 CALL module_interface_init 2248 ! 2249 !-- Initialize surface layer (done after LSM as roughness length are required 2250 !-- for initialization 2251 IF ( constant_flux_layer ) CALL init_surface_layer_fluxes 2449 2252 ! 2450 2253 !-- Initialize surface data output 2451 IF ( surface_output ) THEN 2452 CALL surface_data_output_init 2453 ENDIF 2454 ! 2455 !-- If virtual measurements should be taken, initialize all relevant 2456 !-- arrays and quantities. 2457 IF ( virtual_measurement ) CALL vm_init 2458 2459 ! 2460 !-- If required initialize biometeorology module 2461 IF ( biometeorology ) THEN 2462 CALL location_message( 'initializing biometeorology module', .FALSE. ) 2463 CALL bio_init 2464 CALL location_message( 'finished', .TRUE. ) 2465 ENDIF 2466 2467 ! 2468 !-- If required, initialize indoor model 2469 IF ( indoor_model ) THEN 2470 CALL location_message( 'initializing indoor model', .FALSE. ) 2471 CALL im_init 2472 CALL location_message( 'finished', .TRUE. ) 2473 ENDIF 2474 2254 IF ( surface_output ) CALL surface_data_output_init 2475 2255 ! 2476 2256 !-- Initialize the ws-scheme. -
palm/trunk/SOURCE/land_surface_model_mod.f90
r3677 r3685 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Some interface calls moved to module_interface + cleanup 28 ! 29 ! 3677 2019-01-17 09:07:06Z moh.hefny 27 30 ! Removed most_method 28 31 ! … … 2495 2498 REAL(wp), DIMENSION(:), ALLOCATABLE :: bound, bound_root_fr !< temporary arrays for storing index bounds 2496 2499 REAL(wp), DIMENSION(:), ALLOCATABLE :: pr_soil_init !< temporary array used for averaging soil profiles 2500 2501 CALL location_message( 'initializing land surface model', .FALSE. ) 2497 2502 ! 2498 2503 !-- If no cloud physics is used, rho_surface has not been calculated before … … 4760 4765 ENDIF 4761 4766 ENDDO 4762 ENDDO 4767 ENDDO 4768 4769 CALL location_message( 'finished', .TRUE. ) 4763 4770 4764 4771 END SUBROUTINE lsm_init -
palm/trunk/SOURCE/module_interface.f90
r3684 r3685 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Some interface calls moved to module_interface + cleanup 28 ! 29 ! 3684 2019-01-20 20:20:58Z knoop 27 30 ! Bugfix: made unit intend INOUT 28 31 ! … … 59 62 ONLY: biometeorology, & 60 63 air_chemistry, & 64 indoor_model, & 61 65 land_surface, & 62 66 large_scale_forcing, & … … 70 74 urban_surface, & 71 75 virtual_flight, & 76 virtual_measurement, & 72 77 wind_turbine 73 78 … … 78 83 bio_check_parameters, & 79 84 bio_check_data_output, & 85 bio_init, & 80 86 bio_header, & 81 87 bio_3d_data_averaging, & … … 93 99 bcm_check_data_output_pr, & 94 100 bcm_check_data_output, & 101 bcm_init_arrays, & 102 bcm_init, & 95 103 bcm_header, & 96 104 bcm_swap_timelevel, & … … 108 116 chem_check_data_output_pr, & 109 117 chem_check_data_output, & 118 chem_init_arrays, & 119 chem_init, & 110 120 chem_header, & 111 121 chem_swap_timelevel, & … … 120 130 ONLY: flight_parin, & 121 131 flight_header, & 132 flight_init, & 122 133 flight_rrd_global, & 123 134 flight_wrd_global … … 129 140 gust_check_data_output_pr, & 130 141 gust_check_data_output, & 142 gust_init_arrays, & 143 gust_init, & 131 144 gust_header, & 132 145 gust_actions, & … … 142 155 143 156 USE indoor_model_mod, & 144 ONLY: im_parin 157 ONLY: im_parin, & 158 im_init 145 159 146 160 USE land_surface_model_mod, & … … 149 163 lsm_check_data_output_pr, & 150 164 lsm_check_data_output, & 165 lsm_init_arrays, & 166 lsm_init, & 151 167 lsm_header, & 152 168 lsm_swap_timelevel, & … … 159 175 ONLY: lsf_nudging_check_parameters, & 160 176 lsf_nudging_check_data_output_pr, & 177 lsf_init, & 178 nudge_init, & 161 179 lsf_nudging_header 162 180 … … 174 192 ocean_check_data_output_pr, & 175 193 ocean_check_data_output, & 194 ocean_init_arrays, & 195 ocean_init, & 176 196 ocean_header, & 177 197 ocean_swap_timelevel, & … … 188 208 pcm_check_parameters, & 189 209 pcm_check_data_output, & 210 pcm_init, & 190 211 pcm_header, & 191 212 pcm_data_output_3d … … 197 218 radiation_check_data_output_pr, & 198 219 radiation_check_data_output, & 220 radiation_init, & 199 221 radiation_header, & 200 222 radiation_3d_data_averaging, & … … 208 230 salsa_check_parameters, & 209 231 salsa_check_data_output, & 232 salsa_init_arrays, & 233 salsa_init, & 210 234 salsa_header, & 211 235 salsa_swap_timelevel, & … … 237 261 usm_check_parameters, & 238 262 usm_check_data_output, & 263 usm_init_arrays, & 264 usm_init, & 239 265 usm_swap_timelevel, & 240 266 usm_3d_data_averaging, & … … 254 280 255 281 USE virtual_measurement_mod, & 256 ONLY: vm_parin 282 ONLY: vm_parin, & 283 vm_init 257 284 258 285 USE wind_turbine_model_mod, & 259 286 ONLY: wtm_parin, & 260 287 wtm_check_parameters, & 288 wtm_init_arrays, & 289 wtm_init, & 261 290 wtm_rrd_global, & 262 291 wtm_wrd_global … … 584 613 585 614 615 IF ( bulk_cloud_model ) CALL bcm_init_arrays 616 IF ( air_chemistry ) CALL chem_init_arrays 617 IF ( gust_module_enabled ) CALL gust_init_arrays 618 IF ( land_surface ) CALL lsm_init_arrays 619 IF ( ocean_mode ) CALL ocean_init_arrays 620 IF ( salsa ) CALL salsa_init_arrays 621 IF ( urban_surface ) CALL usm_init_arrays 622 IF ( wind_turbine ) CALL wtm_init_arrays 623 624 586 625 END SUBROUTINE module_interface_init_arrays 587 626 … … 593 632 !------------------------------------------------------------------------------! 594 633 SUBROUTINE module_interface_init 634 635 636 IF ( biometeorology ) CALL bio_init 637 IF ( bulk_cloud_model ) CALL bcm_init 638 IF ( air_chemistry ) CALL chem_init 639 IF ( virtual_flight ) CALL flight_init 640 IF ( gust_module_enabled ) CALL gust_init 641 IF ( indoor_model ) CALL im_init 642 IF ( large_scale_forcing ) CALL lsf_init 643 IF ( land_surface ) CALL lsm_init 644 IF ( nudging ) CALL nudge_init 645 IF ( ocean_mode ) CALL ocean_init 646 IF ( plant_canopy ) CALL pcm_init 647 IF ( salsa ) CALL salsa_init 648 IF ( urban_surface ) CALL usm_init 649 IF ( virtual_measurement ) CALL vm_init 650 IF ( wind_turbine ) CALL wtm_init 651 IF ( radiation ) CALL radiation_init 595 652 596 653 -
palm/trunk/SOURCE/palm.f90
r3648 r3685 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Some interface calls moved to module_interface + cleanup 28 ! 29 ! 3648 2019-01-02 16:35:46Z suehring 27 30 ! Rename subroutines for surface-data output 28 31 ! … … 265 268 !> flows 266 269 !> see the PALM homepage https://palm-model.org for further information 267 !>268 !> @todo move chem_init call to init_3d_model or to check_parameters269 270 !------------------------------------------------------------------------------! 270 271 PROGRAM palm … … 275 276 USE bulk_cloud_model_mod, & 276 277 ONLY: bulk_cloud_model, microphysics_morrison, microphysics_seifert 277 278 USE chem_modules, &279 ONLY: do_emis280 281 USE chemistry_model_mod, &282 ONLY: chem_check_data_output_pr, chem_init283 284 ! USE chem_photolysis_mod, &285 ! ONLY: photolysis_init286 278 287 279 USE control_parameters, & … … 308 300 309 301 USE netcdf_data_input_mod, & 310 ONLY: chem_emis, chem_emis_att, netcdf_data_input_chemistry_data, & 311 netcdf_data_input_inquire_file, netcdf_data_input_init, & 302 ONLY: netcdf_data_input_inquire_file, netcdf_data_input_init, & 312 303 netcdf_data_input_surface_data, netcdf_data_input_topo 313 304 … … 439 430 CALL netcdf_data_input_surface_data 440 431 ! 441 !-- Initialize chemistry (called before check_parameters due to dependencies)442 !-- --> Needs to be moved!! What is the dependency about?443 ! IF ( TRIM( initializing_actions ) /= 'read_restart_data' ) THEN444 IF ( air_chemistry ) THEN445 446 IF ( do_emis ) THEN447 CALL netcdf_data_input_chemistry_data(chem_emis_att,chem_emis)448 ENDIF449 450 CALL chem_init451 452 ! CALL photolysis_init ! probably also required for restart453 454 ENDIF455 ! END IF456 !457 432 !-- Check control parameters and deduce further quantities 458 433 CALL check_parameters 459 460 !461 !-- Initialize all necessary variables462 434 ! 463 435 !-- Initial time for chem_emissions_mod -
palm/trunk/SOURCE/plant_canopy_model_mod.f90
r3655 r3685 27 27 ! ----------------- 28 28 ! $Id$ 29 ! Some interface calls moved to module_interface + cleanup 30 ! 31 ! 3655 2019-01-07 16:51:22Z knoop 29 32 ! unused variables removed 30 33 ! … … 902 905 REAL(wp) :: canopy_height !< canopy height for lad-profile construction 903 906 907 CALL location_message( 'initializing plant canopy model', .FALSE. ) 904 908 ! 905 909 !-- Allocate one-dimensional arrays for the computation of the … … 1209 1213 ENDIF 1210 1214 1215 CALL location_message( 'finished', .TRUE. ) 1216 1211 1217 1212 1218 END SUBROUTINE pcm_init -
palm/trunk/SOURCE/radiation_model_mod.f90
r3667 r3685 28 28 ! ----------------- 29 29 ! $Id$ 30 ! Some interface calls moved to module_interface + cleanup 31 ! 32 ! 3667 2019-01-10 14:26:24Z schwenkel 30 33 ! Modified check for rrtmg input files 31 34 ! … … 567 570 message_string, plant_canopy, pt_surface, & 568 571 rho_surface, simulated_time, spinup_time, surface_pressure, & 572 read_svf, write_svf, & 569 573 time_since_reference_point, urban_surface, varnamelength 570 574 … … 630 634 ONLY: get_topography_top_index, get_topography_top_index_ji, & 631 635 ind_pav_green, ind_veg_wall, ind_wat_win, & 632 surf_lsm_h, surf_lsm_v, surf_type, surf_usm_h, surf_usm_v 636 surf_lsm_h, surf_lsm_v, surf_type, surf_usm_h, surf_usm_v, & 637 vertical_surfaces_exist 633 638 634 639 IMPLICIT NONE … … 1739 1744 INTEGER(iwp) :: ind_type !< running index for subgrid-surface tiles 1740 1745 #endif 1746 1747 ! 1748 !-- Activate radiation_interactions according to the existence of vertical surfaces and/or trees. 1749 !-- The namelist parameter radiation_interactions_on can override this behavior. 1750 !-- (This check cannot be performed in check_parameters, because vertical_surfaces_exist is first set in 1751 !-- init_surface_arrays.) 1752 IF ( radiation_interactions_on ) THEN 1753 IF ( vertical_surfaces_exist .OR. plant_canopy ) THEN 1754 radiation_interactions = .TRUE. 1755 average_radiation = .TRUE. 1756 ELSE 1757 radiation_interactions_on = .FALSE. !< reset namelist parameter: no interactions 1758 !< calculations necessary in case of flat surface 1759 ENDIF 1760 ELSEIF ( vertical_surfaces_exist .OR. plant_canopy ) THEN 1761 message_string = 'radiation_interactions_on is set to .FALSE. although ' // & 1762 'vertical surfaces and/or trees exist. The model will run ' // & 1763 'without RTM (no shadows, no radiation reflections)' 1764 CALL message( 'init_3d_model', 'PA0348', 0, 1, 0, 6, 0 ) 1765 ENDIF 1766 ! 1767 !-- If required, initialize radiation interactions between surfaces 1768 !-- via sky-view factors. This must be done before radiation is initialized. 1769 IF ( radiation_interactions ) CALL radiation_interaction_init 1770 1771 ! 1772 !-- Initialize radiation model 1773 CALL location_message( 'initializing radiation model', .FALSE. ) 1741 1774 1742 1775 ! … … 2671 2704 CALL init_date_and_time 2672 2705 2706 CALL location_message( 'finished', .TRUE. ) 2707 2708 ! 2709 !-- Find all discretized apparent solar positions for radiation interaction. 2710 IF ( radiation_interactions ) CALL radiation_presimulate_solar_pos 2711 2712 ! 2713 !-- If required, read or calculate and write out the SVF 2714 IF ( radiation_interactions .AND. read_svf) THEN 2715 ! 2716 !-- Read sky-view factors and further required data from file 2717 CALL location_message( ' Start reading SVF from file', .FALSE. ) 2718 CALL radiation_read_svf() 2719 CALL location_message( ' Reading SVF from file has finished', .TRUE. ) 2720 2721 ELSEIF ( radiation_interactions .AND. .NOT. read_svf) THEN 2722 ! 2723 !-- calculate SFV and CSF 2724 CALL location_message( ' Start calculation of SVF', .FALSE. ) 2725 CALL radiation_calc_svf() 2726 CALL location_message( ' Calculation of SVF has finished', .TRUE. ) 2727 ENDIF 2728 2729 IF ( radiation_interactions .AND. write_svf) THEN 2730 ! 2731 !-- Write svf, csf svfsurf and csfsurf data to file 2732 CALL location_message( ' Start writing SVF in file', .FALSE. ) 2733 CALL radiation_write_svf() 2734 CALL location_message( ' Writing SVF in file has finished', .TRUE. ) 2735 ENDIF 2736 2737 ! 2738 !-- Adjust radiative fluxes. In case of urban and land surfaces, also 2739 !-- call an initial interaction. 2740 IF ( radiation_interactions ) THEN 2741 CALL radiation_interaction 2742 ENDIF 2743 2673 2744 RETURN 2674 2745 … … 5838 5909 !WRITE(message_string, '(a,f6.3)') 'Precomputing effective box optical ' & 5839 5910 ! // 'depth using prototype leaf area density = ', prototype_lad 5840 !CALL message(' usm_init_urban_surface', 'PA0520', 0, 0, -1, 6, 0)5911 !CALL message('radiation_interaction_init', 'PA0520', 0, 0, -1, 6, 0) 5841 5912 ENDIF 5842 5913 -
palm/trunk/SOURCE/salsa_mod.f90
r3655 r3685 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Some interface calls moved to module_interface + cleanup 29 ! 30 ! 3655 2019-01-07 16:51:22Z knoop 28 31 ! Implementation of the PALM module interface 29 32 ! … … 1182 1185 INTEGER(iwp) :: j 1183 1186 1187 CALL location_message( 'initializing SALSA model', .TRUE. ) 1188 1184 1189 bin_low_limits = 0.0_wp 1185 1190 nsect = 0.0_wp … … 1317 1322 CALL salsa_set_source 1318 1323 ENDIF 1324 1325 CALL location_message( 'finished', .TRUE. ) 1319 1326 1320 1327 END SUBROUTINE salsa_init -
palm/trunk/SOURCE/surface_layer_fluxes_mod.f90
r3668 r3685 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Some interface calls moved to module_interface + cleanup 29 ! 30 ! 3668 2019-01-14 12:49:24Z maronga 28 31 ! Removed methods "circular" and "lookup" 29 32 ! … … 729 732 730 733 734 CALL location_message( 'initializing surface layer', .FALSE. ) 731 735 732 736 … … 739 743 IF ( surf_usm_h%ns >= 1 ) surf_usm_h%ol = 1.0E10_wp 740 744 ENDIF 745 746 CALL location_message( 'finished', .TRUE. ) 741 747 742 748 END SUBROUTINE init_surface_layer_fluxes -
palm/trunk/SOURCE/urban_surface_mod.f90
r3655 r3685 28 28 ! ----------------- 29 29 ! $Id$ 30 ! Some interface calls moved to module_interface + cleanup 31 ! 32 ! 3655 2019-01-07 16:51:22Z knoop 30 33 ! Implementation of the PALM module interface 31 34 ! … … 1092 1095 END INTERFACE usm_define_netcdf_grid 1093 1096 1094 INTERFACE usm_init _urban_surface1095 MODULE PROCEDURE usm_init _urban_surface1096 END INTERFACE usm_init _urban_surface1097 INTERFACE usm_init 1098 MODULE PROCEDURE usm_init 1099 END INTERFACE usm_init 1097 1100 1098 1101 INTERFACE usm_material_heat_model … … 1124 1127 END INTERFACE usm_wrd_local 1125 1128 1126 INTERFACE usm_ allocate_surface1127 MODULE PROCEDURE usm_ allocate_surface1128 END INTERFACE usm_ allocate_surface1129 INTERFACE usm_init_arrays 1130 MODULE PROCEDURE usm_init_arrays 1131 END INTERFACE usm_init_arrays 1129 1132 1130 1133 INTERFACE usm_3d_data_averaging … … 1138 1141 1139 1142 !-- Public functions 1140 PUBLIC usm_boundary_condition, usm_check_parameters, usm_init _urban_surface,&1143 PUBLIC usm_boundary_condition, usm_check_parameters, usm_init,& 1141 1144 usm_rrd_local, & 1142 1145 usm_surface_energy_balance, usm_material_heat_model, & 1143 1146 usm_swap_timelevel, usm_check_data_output, usm_3d_data_averaging, & 1144 1147 usm_data_output_3d, usm_define_netcdf_grid, usm_parin, & 1145 usm_wrd_local, usm_ allocate_surface1148 usm_wrd_local, usm_init_arrays 1146 1149 1147 1150 !-- Public parameters, constants and initial values … … 1161 1164 !> and plant canopy and it allocates the needed arrays for USM 1162 1165 !------------------------------------------------------------------------------! 1163 SUBROUTINE usm_ allocate_surface1166 SUBROUTINE usm_init_arrays 1164 1167 1165 1168 IMPLICIT NONE 1166 1169 1167 1170 INTEGER(iwp) :: l 1171 1172 CALL location_message( 'initializing and allocating urban surfaces', .FALSE. ) 1168 1173 1169 1174 ! … … 1556 1561 IF ( ALLOCATED( surf_usm_v(l)%iwghf_eb_window ) ) surf_usm_v(l)%iwghf_eb_window = 0.0_wp 1557 1562 ENDDO 1558 1559 END SUBROUTINE usm_allocate_surface 1563 1564 CALL location_message( 'finished', .TRUE. ) 1565 1566 END SUBROUTINE usm_init_arrays 1560 1567 1561 1568 … … 3870 3877 !> Initialization of the urban surface model 3871 3878 !------------------------------------------------------------------------------! 3872 SUBROUTINE usm_init _urban_surface3879 SUBROUTINE usm_init 3873 3880 3874 3881 USE arrays_3d, & … … 3926 3933 REAL(wp) :: z_agl !< height above ground 3927 3934 3935 CALL location_message( 'initializing urban surface model', .FALSE. ) 3928 3936 3929 3937 CALL cpu_log( log_point_s(78), 'usm_init', 'start' ) … … 5189 5197 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 5190 5198 5191 CALL cpu_log( log_point_s(78), 'usm_init', 'stop' ) 5192 5193 END SUBROUTINE usm_init_urban_surface 5199 CALL cpu_log( log_point_s(78), 'usm_init', 'stop' ) 5200 5201 CALL location_message( 'finished', .TRUE. ) 5202 5203 END SUBROUTINE usm_init 5194 5204 5195 5205 -
palm/trunk/SOURCE/wind_turbine_model_mod.f90
r3655 r3685 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Some interface calls moved to module_interface + cleanup 29 ! 30 ! 3655 2019-01-07 16:51:22Z knoop 28 31 ! Replace degree symbol by 'degrees' 29 32 ! … … 992 995 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: index_nacr !< 993 996 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: index_nact !< 997 998 CALL location_message( 'initializing wind turbine model', .FALSE. ) 994 999 995 1000 ALLOCATE( index_nacb(1:nturbines) ) … … 1347 1352 1348 1353 CALL wtm_read_blade_tables 1354 1355 CALL location_message( 'finished', .TRUE. ) 1349 1356 1350 1357 END SUBROUTINE wtm_init
Note: See TracChangeset
for help on using the changeset viewer.