- Timestamp:
- May 9, 2019 9:48:32 AM (6 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/land_surface_model_mod.f90
r3943 r3964 25 25 ! ----------------- 26 26 ! $Id$ 27 ! In a nested child domain, distinguish between soil moisture and temperature 28 ! initialization from parent via dynamic input file. Further, initialize soil 29 ! moisture/temperature from dynamic input file only when initialization via 30 ! 'inifor' is desired. 31 ! 32 ! 3943 2019-05-02 09:50:41Z maronga 27 33 ! Removed extra blank character 28 34 ! … … 2636 2642 IMPLICIT NONE 2637 2643 2638 LOGICAL :: init_soil_from_parent !< flag controlling initialization of soil in child domains 2644 LOGICAL :: init_msoil_from_parent !< flag controlling initialization of soil moisture in nested child domains 2645 LOGICAL :: init_tsoil_from_parent !< flag controlling initialization of soil temperature in nested child domains 2639 2646 2640 2647 INTEGER(iwp) :: i !< running index … … 4356 4363 IF ( TRIM( initializing_actions ) /= 'read_restart_data' ) THEN 4357 4364 ! 4358 !-- Read soil properties from dynamic input file 4359 CALL netcdf_data_input_init_lsm 4365 !-- Read soil properties from dynamic input file. 4366 IF ( INDEX( initializing_actions, 'inifor' ) /= 0 ) & 4367 CALL netcdf_data_input_init_lsm 4360 4368 ! 4361 4369 !-- In case no dynamic input is available for a child domain but root … … 4363 4371 !-- properties can lead to significant discrepancies in the atmospheric 4364 4372 !-- surface forcing. For this reason, the child domain 4365 !-- is initialized with mean soil profiles from the root domain. 4366 init_soil_from_parent = .FALSE. 4373 !-- is initialized with mean soil profiles from the root domain, even if 4374 !-- no initialization with inifor is set. 4375 init_tsoil_from_parent = .FALSE. 4376 init_msoil_from_parent = .FALSE. 4367 4377 IF ( nested_run ) THEN 4368 4378 #if defined( __parallel ) 4369 CALL MPI_ALLREDUCE( init_3d%from_file_tsoil .OR. & 4370 init_3d%from_file_msoil, & 4371 init_soil_from_parent, & 4379 CALL MPI_ALLREDUCE( init_3d%from_file_tsoil, & 4380 init_tsoil_from_parent, & 4381 1, MPI_LOGICAL, MPI_LOR, MPI_COMM_WORLD, ierr ) 4382 CALL MPI_ALLREDUCE( init_3d%from_file_msoil, & 4383 init_msoil_from_parent, & 4372 4384 1, MPI_LOGICAL, MPI_LOR, MPI_COMM_WORLD, ierr ) 4373 4385 #endif … … 4407 4419 !-- transfer soil mean profiles from the root-parent domain onto all 4408 4420 !-- child domains. 4409 IF ( init_ soil_from_parent ) THEN4421 IF ( init_msoil_from_parent ) THEN 4410 4422 ! 4411 4423 !-- Child domains will be only initialized with horizontally … … 4434 4446 DEALLOCATE( pr_soil_init ) 4435 4447 ENDIF 4448 ENDIF 4449 IF ( init_tsoil_from_parent ) THEN 4436 4450 IF ( init_3d%from_file_tsoil .AND. init_3d%lod_tsoil == 2 ) THEN 4437 4451 ALLOCATE( pr_soil_init(0:init_3d%nzs-1) ) … … 4455 4469 4456 4470 ENDIF 4457 4458 #if defined( __parallel ) 4471 ENDIF 4472 IF ( init_msoil_from_parent .OR. init_tsoil_from_parent ) THEN 4459 4473 ! 4460 4474 !-- Distribute soil grid information on file from root to all childs. 4461 4475 !-- Only process with rank 0 sends the information. 4476 #if defined( __parallel ) 4462 4477 CALL MPI_BCAST( init_3d%nzs, 1, & 4463 4478 MPI_INTEGER, 0, MPI_COMM_WORLD, ierr ) 4479 #endif 4464 4480 4465 4481 IF ( .NOT. ALLOCATED( init_3d%z_soil ) ) & 4466 4482 ALLOCATE( init_3d%z_soil(1:init_3d%nzs) ) 4467 4483 #if defined( __parallel ) 4468 4484 CALL MPI_BCAST( init_3d%z_soil, SIZE(init_3d%z_soil), & 4469 4485 MPI_REAL, 0, MPI_COMM_WORLD, ierr ) 4470 4486 #endif 4471 ! 4472 !-- ALLOCATE arrays on child domains and set control attributes. 4473 !-- Note, 1d soil profiles are allocated even though soil information 4474 !-- is already read from dynamic file in one child domain. 4475 !-- This case, however, data is not used for further initialization 4476 !-- since the LoD=2. 4487 ENDIF 4488 ! 4489 !-- ALLOCATE arrays on child domains and set control attributes. 4490 !-- Note, 1d soil profiles are allocated even though soil information 4491 !-- is already read from dynamic file in one child domain. 4492 !-- This case, however, data is not used for further initialization 4493 !-- since the LoD=2. 4494 IF ( init_msoil_from_parent ) THEN 4477 4495 IF ( .NOT. ALLOCATED( init_3d%msoil_1d ) ) THEN 4478 4496 ALLOCATE( init_3d%msoil_1d(0:init_3d%nzs-1) ) … … 4480 4498 init_3d%from_file_msoil = .TRUE. 4481 4499 ENDIF 4500 ENDIF 4501 IF ( init_tsoil_from_parent ) THEN 4482 4502 IF ( .NOT. ALLOCATED( init_3d%tsoil_1d ) ) THEN 4483 4503 ALLOCATE( init_3d%tsoil_1d(0:init_3d%nzs-1) ) … … 4485 4505 init_3d%from_file_tsoil = .TRUE. 4486 4506 ENDIF 4487 4488 4507 ENDIF 4508 ! 4509 !-- Distribute soil profiles from root to all childs 4510 IF ( init_msoil_from_parent ) THEN 4489 4511 #if defined( __parallel ) 4490 !4491 !-- Distribute soil profiles from root to all childs4492 4512 CALL MPI_BCAST( init_3d%msoil_1d, SIZE(init_3d%msoil_1d), & 4493 4513 MPI_REAL, 0, MPI_COMM_WORLD, ierr ) 4514 #endif 4515 4516 ENDIF 4517 IF ( init_tsoil_from_parent ) THEN 4518 #if defined( __parallel ) 4494 4519 CALL MPI_BCAST( init_3d%tsoil_1d, SIZE(init_3d%tsoil_1d), & 4495 4520 MPI_REAL, 0, MPI_COMM_WORLD, ierr ) 4496 4521 #endif 4497 4498 4522 ENDIF 4499 4523 ! -
palm/trunk/SOURCE/nesting_offl_mod.f90
r3937 r3964 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Ensure that veloctiy term in calculation of bulk Richardson number does not 28 ! become zero 29 ! 30 ! 3937 2019-04-29 15:09:07Z suehring 27 31 ! Set boundary conditon on upper-left and upper-south grid point for the u- and 28 32 ! v-component, respectively. … … 900 904 !-- Note, no interpolation of u- and v-component is made, as both 901 905 !-- are mainly mean inflow profiles with very small spatial variation. 906 !-- Add a safety factor in case the velocity term becomes zero. This 907 !-- may happen if overhanging 3D structures are directly located at 908 !-- the boundary, where velocity inside the building is zero 909 !-- (k_surface is the index of the lowest upward-facing surface). 902 910 zi_local = 0.0_wp 903 911 DO k = k_surface+1, nzt … … 906 914 ri_bulk = zu(k) * g / vpt_surface * & 907 915 ( vpt_col(k) - vpt_surface ) / & 908 ( u_comp * u_comp + v_comp * v_comp )916 ( u_comp * u_comp + v_comp * v_comp + 1E-5_wp ) 909 917 910 918 IF ( zi_local == 0.0_wp .AND. ri_bulk > ri_bulk_crit ) & … … 943 951 ri_bulk = zu(k) * g / vpt_surface * & 944 952 ( vpt_col(k) - vpt_surface ) / & 945 ( u_comp * u_comp + v_comp * v_comp )953 ( u_comp * u_comp + v_comp * v_comp + 1E-5_wp ) 946 954 947 955 IF ( zi_local == 0.0_wp .AND. ri_bulk > 0.25_wp ) & -
palm/trunk/SOURCE/pmc_child_mod.f90
r3963 r3964 21 21 ! Current revisions: 22 22 ! ------------------ 23 ! Remove unused variable23 ! 24 24 ! 25 25 ! Former revisions: 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Remove unused variable 29 ! 30 ! 3963 2019-05-08 20:09:11Z suehring 28 31 ! Bugfixes in initial settings of child and parent communication patterns. 29 32 !
Note: See TracChangeset
for help on using the changeset viewer.