Changeset 3636 for palm/trunk/SOURCE/turbulence_closure_mod.f90
- Timestamp:
- Dec 19, 2018 1:48:34 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/turbulence_closure_mod.f90
r3634 r3636 25 25 ! ----------------- 26 26 ! $Id$ 27 ! nopointer option removed 28 ! 29 ! 3634 2018-12-18 12:31:28Z knoop 27 30 ! OpenACC port for SPEC 28 31 ! … … 177 180 178 181 179 #if defined( __nopointer )180 USE arrays_3d, &181 ONLY: diss, diss_p, dzu, e, e_p, kh, km, &182 mean_inflow_profiles, prho, pt, tdiss_m, te_m, tend, u, v, vpt, w183 #else184 182 USE arrays_3d, & 185 183 ONLY: diss, diss_1, diss_2, diss_3, diss_p, dzu, e, e_1, e_2, e_3, & 186 184 e_p, kh, km, mean_inflow_profiles, prho, pt, tdiss_m, & 187 185 te_m, tend, u, v, vpt, w 188 #endif189 186 190 187 USE basic_constants_and_equations_mod, & … … 911 908 ALLOCATE( km(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 912 909 913 #if defined( __nopointer )914 ALLOCATE( e(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )915 ALLOCATE( e_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )916 ALLOCATE( te_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )917 918 #else919 910 ALLOCATE( e_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 920 911 ALLOCATE( e_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 921 912 ALLOCATE( e_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 922 #endif 913 923 914 ! 924 915 !-- Allocate arrays required for dissipation. … … 928 919 IF ( rans_mode .OR. use_sgs_for_particles .OR. wang_kernel .OR. & 929 920 collision_turbulence .OR. nested_run ) THEN 930 #if defined( __nopointer ) 931 ALLOCATE( diss(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 932 IF ( rans_tke_e ) THEN 933 ALLOCATE( diss_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 934 ALLOCATE( tdiss_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 935 ENDIF 936 #else 921 937 922 ALLOCATE( diss_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 938 923 IF ( rans_tke_e .OR. nested_run ) THEN … … 940 925 ALLOCATE( diss_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 941 926 ENDIF 942 #endif 927 943 928 ENDIF 944 929 945 #if ! defined( __nopointer )946 930 ! 947 931 !-- Initial assignment of pointers … … 955 939 ENDIF 956 940 ENDIF 957 #endif958 941 959 942 END SUBROUTINE tcm_init_arrays … … 3731 3714 #endif 3732 3715 3733 #if defined( __nopointer ) 3734 REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) :: var !< temperature 3735 #else 3716 REAL(wp) :: dissipation !< TKE dissipation 3717 3736 3718 REAL(wp), DIMENSION(:,:,:), POINTER :: var !< temperature 3737 #endif3738 REAL(wp) :: dissipation !< TKE dissipation3739 3719 3740 3720 … … 3930 3910 REAL(wp) :: var_reference !< reference temperature 3931 3911 3932 #if defined( __nopointer ) 3933 REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) :: var !< temperature 3934 #else 3912 REAL(wp), DIMENSION(nzb+1:nzt) :: dissipation !< dissipation of TKE 3913 3935 3914 REAL(wp), DIMENSION(:,:,:), POINTER :: var !< temperature 3936 #endif3937 REAL(wp), DIMENSION(nzb+1:nzt) :: dissipation !< dissipation of TKE3938 3915 3939 3916 ! … … 4161 4138 REAL(wp) :: var_reference !< var at reference height 4162 4139 4163 #if defined( __nopointer )4164 REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) :: var !< temperature4165 #else4166 4140 REAL(wp), DIMENSION(:,:,:), POINTER :: var !< temperature 4167 #endif 4141 4168 4142 4169 4143 dvar_dz = atmos_ocean_sign * ( var(k+1,j,i) - var(k-1,j,i) ) * dd2zu(k) … … 4218 4192 REAL(wp) :: var_reference !< var at reference height 4219 4193 4220 #if defined( __nopointer )4221 REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) :: var !< temperature4222 #else4223 4194 REAL(wp), DIMENSION(:,:,:), POINTER :: var !< temperature 4224 #endif 4195 4225 4196 4226 4197 dvar_dz = atmos_ocean_sign * ( var(k+1,j,i) - var(k-1,j,i) ) * dd2zu(k) … … 4282 4253 REAL(wp) :: var_reference !< reference temperature 4283 4254 4284 #if defined( __nopointer )4285 REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) :: var !< temperature4286 #else4287 4255 REAL(wp), DIMENSION(:,:,:), POINTER :: var !< temperature 4288 #endif 4256 4289 4257 4290 4258 ! … … 4488 4456 #endif 4489 4457 4490 #if defined( __nopointer )4491 REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) :: var !< temperature4492 #else4493 4458 REAL(wp), DIMENSION(:,:,:), POINTER :: var !< temperature 4494 #endif 4459 4495 4460 4496 4461 ! … … 4942 4907 4943 4908 4944 #if defined( __nopointer )4945 INTEGER(iwp) :: i !< loop index x direction4946 INTEGER(iwp) :: j !< loop index y direction4947 INTEGER(iwp) :: k !< loop index z direction4948 #endif4949 4909 INTEGER, INTENT(IN) :: mod_count !< flag defining where pointers point to 4950 4910 4951 #if defined( __nopointer ) 4952 4953 IF ( .NOT. constant_diffusion ) THEN 4954 DO i = nxlg, nxrg 4955 DO j = nysg, nyng 4956 DO k = nzb, nzt+1 4957 e(k,j,i) = e_p(k,j,i) 4958 ENDDO 4959 ENDDO 4960 ENDDO 4961 ENDIF 4962 4963 IF ( rans_tke_e ) THEN 4964 DO i = nxlg, nxrg 4965 DO j = nysg, nyng 4966 DO k = nzb, nzt+1 4967 diss(k,j,i) = diss_p(k,j,i) 4968 ENDDO 4969 ENDDO 4970 ENDDO 4971 ENDIF 4972 4973 #else 4974 4911 4975 4912 SELECT CASE ( mod_count ) 4976 4913 … … 4996 4933 4997 4934 END SELECT 4998 #endif4999 4935 5000 4936 END SUBROUTINE tcm_swap_timelevel
Note: See TracChangeset
for help on using the changeset viewer.