Changeset 3294 for palm/trunk/SOURCE/init_3d_model.f90
- Timestamp:
- Oct 1, 2018 2:37:10 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/init_3d_model.f90
r3289 r3294 25 25 ! ----------------- 26 26 ! $Id$ 27 ! changes concerning modularization of ocean option 28 ! 29 ! 3289 2018-09-28 10:23:58Z suehring 27 30 ! Introduce module parameter for number of inflow profiles 28 31 ! … … 549 552 USE netcdf_data_input_mod, & 550 553 ONLY: init_3d, netcdf_data_input_init_3d 554 555 USE ocean_mod, & 556 ONLY: ocean_init, ocean_init_arrays 551 557 552 558 USE particle_attributes, & … … 772 778 s_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 773 779 s_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 774 #endif775 ENDIF776 777 IF ( ocean ) THEN778 #if defined( __nopointer )779 ALLOCATE( prho(nzb:nzt+1,nysg:nyng,nxlg:nxrg), &780 rho_ocean(nzb:nzt+1,nysg:nyng,nxlg:nxrg), &781 sa(nzb:nzt+1,nysg:nyng,nxlg:nxrg), &782 sa_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg), &783 tsa_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )784 #else785 ALLOCATE( prho_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg), &786 rho_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg), &787 sa_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg), &788 sa_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg), &789 sa_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )790 prho => prho_1791 rho_ocean => rho_1 ! routines calc_mean_profile and diffusion_e require792 ! density to be apointer793 780 #endif 794 781 ENDIF … … 1010 997 s => s_1; s_p => s_2; ts_m => s_3 1011 998 ENDIF 1012 1013 IF ( ocean ) THEN1014 sa => sa_1; sa_p => sa_2; tsa_m => sa_31015 ENDIF1016 999 #endif 1000 1017 1001 ! 1018 1002 !-- Initialize arrays for turbulence closure … … 1022 1006 CALL init_surface_arrays 1023 1007 ! 1024 !-- Allocate microphysics module arrays 1025 IF ( bulk_cloud_model ) THEN 1026 CALL bcm_init_arrays 1027 ENDIF 1028 ! 1029 !-- Allocate land surface model arrays 1030 IF ( land_surface ) THEN 1031 CALL lsm_init_arrays 1032 ENDIF 1033 1034 ! 1035 !-- Allocate wind turbine model arrays 1036 IF ( wind_turbine ) THEN 1037 CALL wtm_init_arrays 1038 ENDIF 1039 ! 1040 !-- Allocate gust module arrays 1041 IF ( gust_module_enabled ) THEN 1042 CALL gust_init_arrays 1043 ENDIF 1008 !-- Allocate arrays for other modules 1009 IF ( bulk_cloud_model ) CALL bcm_init_arrays 1010 IF ( gust_module_enabled ) CALL gust_init_arrays 1011 IF ( land_surface ) CALL lsm_init_arrays 1012 IF ( ocean_mode ) CALL ocean_init_arrays 1013 IF ( wind_turbine ) CALL wtm_init_arrays 1014 IF ( uv_exposure ) CALL uvem_init_arrays 1044 1015 1045 1016 ! … … 1053 1024 IF ( uv_exposure ) THEN 1054 1025 CALL uvem_init 1055 ENDIF1056 !1057 !-- Allocate uv exposure arrays1058 IF ( uv_exposure ) THEN1059 CALL uvem_init_arrays1060 1026 ENDIF 1061 1027 … … 1230 1196 ENDIF 1231 1197 1232 IF ( ocean ) THEN1233 DO i = nxlg, nxrg1234 DO j = nysg, nyng1235 sa(:,j,i) = sa_init1236 ENDDO1237 ENDDO1238 ENDIF1239 1198 ! 1240 1199 !-- Set velocity components at non-atmospheric / oceanic grid points to … … 1380 1339 ENDIF 1381 1340 1382 IF ( ocean ) THEN1383 DO i = nxlg, nxrg1384 DO j = nysg, nyng1385 sa(:,j,i) = sa_init1386 ENDDO1387 ENDDO1388 ENDIF1389 1341 ! 1390 1342 !-- Compute initial temperature field and other constants used in case … … 1449 1401 hom(:,1,7,:) = SPREAD( pt(:,nys,nxl), 2, statistic_regions+1 ) 1450 1402 1451 1452 !1453 !-- Store initial salinity profile1454 IF ( ocean ) THEN1455 hom(:,1,26,:) = SPREAD( sa(:,nys,nxl), 2, statistic_regions+1 )1456 ENDIF1457 1458 1403 IF ( humidity ) THEN 1459 1404 ! … … 1557 1502 ENDIF 1558 1503 1559 IF ( ocean ) THEN1560 tsa_m = 0.0_wp1561 sa_p = sa1562 ENDIF1563 1564 1504 CALL location_message( 'finished', .TRUE. ) 1565 1505 … … 1810 1750 ENDIF 1811 1751 IF ( passive_scalar ) s_p = s 1812 IF ( ocean ) sa_p = sa1813 1814 1752 ! 1815 1753 !-- Allthough tendency arrays are set in prognostic_equations, they have … … 1821 1759 ENDIF 1822 1760 IF ( passive_scalar ) ts_m = 0.0_wp 1823 IF ( ocean ) tsa_m = 0.0_wp1824 1761 ! 1825 1762 !-- Initialize synthetic turbulence generator in case of restart. … … 2241 2178 IF ( dt_dvrp /= 9999999.9_wp ) CALL init_dvrp 2242 2179 2243 IF ( ocean ) THEN 2244 ! 2245 !-- Initialize quantities needed for the ocean model 2246 CALL init_ocean 2247 2248 ENDIF 2249 ! 2250 !-- Initialize quantities for handling cloud physics 2251 !-- This routine must be called before lpm_init, because 2252 !-- otherwise, array d_exner, needed in data_output_dvrp (called by 2253 !-- lpm_init) is not defined. 2254 IF ( .NOT. ocean ) THEN 2180 ! 2181 !-- Initialize quantities needed for the ocean model 2182 IF ( ocean_mode ) CALL ocean_init 2183 2184 ! 2185 !-- Initialize quantities for handling cloud physics. 2186 !-- This routine must be called before lpm_init, becaus otherwise, 2187 !-- array d_exner, needed in data_output_dvrp (called by lpm_init) is not defined. 2188 IF ( .NOT. ocean_mode ) THEN 2255 2189 2256 2190 ALLOCATE( hyp(nzb:nzt+1) ) … … 2454 2388 rdf_sc = 0.0_wp 2455 2389 IF ( rayleigh_damping_factor /= 0.0_wp ) THEN 2456 IF ( .NOT. ocean ) THEN 2390 2391 IF ( .NOT. ocean_mode ) THEN 2457 2392 DO k = nzb+1, nzt 2458 2393 IF ( zu(k) >= rayleigh_damping_height ) THEN … … 2464 2399 ENDDO 2465 2400 ELSE 2401 ! 2402 !-- In ocean mode, rayleigh damping is applied in the lower part of the 2403 !-- model domain 2466 2404 DO k = nzt, nzb+1, -1 2467 2405 IF ( zu(k) <= rayleigh_damping_height ) THEN … … 2473 2411 ENDDO 2474 2412 ENDIF 2413 2475 2414 ENDIF 2476 2415 IF ( scalar_rayleigh_damping ) rdf_sc = rdf
Note: See TracChangeset
for help on using the changeset viewer.