Changeset 4877 for palm/trunk/SOURCE
- Timestamp:
- Feb 17, 2021 4:17:35 PM (4 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/Makefile
r4828 r4877 25 25 # ----------------- 26 26 # $Id$ 27 # add dependency for init_3d_model 28 # 29 # 4828 2021-01-05 11:21:41Z Giersch 27 30 # Add depedency for indoor model 28 31 # … … 720 723 cpulog_mod.o \ 721 724 disturb_heatflux.o \ 725 exchange_horiz_mod.o \ 722 726 large_scale_forcing_nudging_mod.o \ 723 727 model_1d_mod.o \ -
palm/trunk/SOURCE/init_3d_model.f90
r4848 r4877 24 24 ! ----------------- 25 25 ! $Id$ 26 ! Bugfix in initialization of vertical surfaces with roughness and surface heat fluxes 27 ! 28 ! 4848 2021-01-21 15:51:51Z gronemeier 26 29 ! replaced use_syn_turb_gen by syn_turb_gen 27 30 ! … … 166 169 167 170 USE control_parameters 171 172 USE exchange_horiz_mod, & 173 ONLY: exchange_horiz_2d 168 174 169 175 USE grid_variables, & … … 207 213 pids_id, & 208 214 real_2d, & 215 resize_array, & 209 216 vars_pids 210 217 … … 1508 1515 !-- Read variable 1509 1516 CALL get_variable( pids_id, 'z0', tmp_2d%var, nxl, nxr, nys, nyn ) 1517 CALL resize_array( tmp_2d%var, nys, nyn, nxl, nxr ) 1518 CALL exchange_horiz_2d( tmp_2d%var ) 1510 1519 ! 1511 1520 !-- Initialize roughness length. Note, z0 will be only initialized at default-type surfaces. … … 1534 1543 !-- Read variable 1535 1544 CALL get_variable( pids_id, 'shf', tmp_2d%var, nxl, nxr, nys, nyn ) 1545 CALL resize_array( tmp_2d%var, nys, nyn, nxl, nxr ) 1546 CALL exchange_horiz_2d( tmp_2d%var ) 1536 1547 ! 1537 1548 !-- Initialize heat flux. Note, shf will be only initialized at default-type surfaces. At … … 1561 1572 !-- Read variable 1562 1573 CALL get_variable( pids_id, 'qsws', tmp_2d%var, nxl, nxr, nys, nyn ) 1574 CALL resize_array( tmp_2d%var, nys, nyn, nxl, nxr ) 1575 CALL exchange_horiz_2d( tmp_2d%var ) 1563 1576 ! 1564 1577 !-- Initialize latent heat flux. Note, qsws will be only initialized at default-type surfaces. … … 1590 1603 !-- Read variable 1591 1604 CALL get_variable( pids_id, 'ssws', tmp_2d%var, nxl, nxr, nys, nyn ) 1605 CALL resize_array( tmp_2d%var, nys, nyn, nxl, nxr ) 1606 CALL exchange_horiz_2d( tmp_2d%var ) 1592 1607 ! 1593 1608 !-- Initialize passive scalar flux. Initialize horizontal surface elements. -
palm/trunk/SOURCE/netcdf_data_input_mod.f90
r4828 r4877 24 24 ! ----------------- 25 25 ! $Id$ 26 ! Add interface for resize_array and add subroutine to resize 2d-real arrays 27 ! 28 ! 4828 2021-01-05 11:21:41Z Giersch 26 29 ! Check if netCDF file actually exists before opening it for reading. 27 30 ! … … 787 790 END INTERFACE get_attribute 788 791 792 INTERFACE resize_array 793 MODULE PROCEDURE resize_array_2d_int8 794 MODULE PROCEDURE resize_array_2d_int32 795 MODULE PROCEDURE resize_array_2d_real 796 MODULE PROCEDURE resize_array_3d_int8 797 MODULE PROCEDURE resize_array_3d_real 798 MODULE PROCEDURE resize_array_4d_real 799 END INTERFACE resize_array 800 789 801 ! 790 802 !-- Public data structures … … 867 879 netcdf_data_input_surface_data, & 868 880 netcdf_data_input_topo, & 869 open_read_file 881 open_read_file, & 882 resize_array 870 883 871 884 … … 3427 3440 3428 3441 END SUBROUTINE resize_array_2d_int32 3442 3443 !--------------------------------------------------------------------------------------------------! 3444 ! Description: 3445 ! ------------ 3446 !> Resize 2D float array: (nys:nyn,nxl:nxr) -> (nysg:nyng,nxlg:nxrg) 3447 !--------------------------------------------------------------------------------------------------! 3448 SUBROUTINE resize_array_2d_real( var, js, je, is, ie ) 3449 3450 IMPLICIT NONE 3451 3452 INTEGER(iwp) :: ie !< upper index bound along x direction 3453 INTEGER(iwp) :: is !< lower index bound along x direction 3454 INTEGER(iwp) :: je !< upper index bound along y direction 3455 INTEGER(iwp) :: js !< lower index bound along y direction 3456 3457 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: var !< treated variable 3458 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: var_tmp !< temporary copy 3459 ! 3460 !-- Allocate temporary variable 3461 ALLOCATE( var_tmp(js-nbgp:je+nbgp,is-nbgp:ie+nbgp) ) 3462 ! 3463 !-- Temporary copy of the variable 3464 var_tmp(js:je,is:ie) = var(js:je,is:ie) 3465 ! 3466 !-- Resize the array 3467 DEALLOCATE( var ) 3468 ALLOCATE( var(js-nbgp:je+nbgp,is-nbgp:ie+nbgp) ) 3469 ! 3470 !-- Transfer temporary copy back to original array 3471 var(js:je,is:ie) = var_tmp(js:je,is:ie) 3472 3473 END SUBROUTINE resize_array_2d_real 3429 3474 3430 3475 -
palm/trunk/SOURCE/surface_mod.f90
r4850 r4877 25 25 ! ----------------- 26 26 ! $Id$ 27 ! bugfix in init_single_surface_properties for vertical surfaces 28 ! 29 ! 4850 2021-01-21 17:59:25Z suehring 27 30 ! +t_prev 28 31 ! … … 3106 3109 3107 3110 REAL(wp), DIMENSION(1:ns) :: var_surf !< 1D surface variable that should be initialized 3108 REAL(wp), DIMENSION(nys :nyn,nxl:nxr) :: var_2d !< input variable3111 REAL(wp), DIMENSION(nysg:nyng,nxlg:nxrg) :: var_2d !< input variable 3109 3112 3110 3113 DO m = 1, ns
Note: See TracChangeset
for help on using the changeset viewer.