Changeset 4125
- Timestamp:
- Jul 29, 2019 1:31:44 PM (5 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/nesting_offl_mod.f90
r4079 r4125 25 25 ! ----------------- 26 26 ! $Id$ 27 ! In order to enable netcdf parallel access, allocate dummy arrays for the 28 ! lateral boundary data on cores that actually do not belong to these 29 ! boundaries. 30 ! 31 ! 4079 2019-07-09 18:04:41Z suehring 27 32 ! - Set boundary condition for w at nzt+1 at the lateral boundaries, even 28 33 ! though these won't enter the numerical solution. However, due to the mass … … 1197 1202 ALLOCATE( nest_offl%vg(0:1,1:nzt) ) 1198 1203 ! 1199 !-- Allocate arrays for reading boundary values. Arrays will incorporate 2 1200 !-- time levels in order to interpolate in between. 1204 !-- Allocate arrays for reading left/right boundary values. Arrays will 1205 !-- incorporate 2 time levels in order to interpolate in between. If the core has 1206 !-- no boundary, allocate a dummy array, in order to enable netcdf parallel 1207 !-- access. Dummy arrays will be allocated with dimension length zero. 1201 1208 IF ( bc_dirichlet_l ) THEN 1202 1209 ALLOCATE( nest_offl%u_left(0:1,nzb+1:nzt,nys:nyn) ) … … 1207 1214 IF ( air_chemistry ) ALLOCATE( nest_offl%chem_left(0:1,nzb+1:nzt,nys:nyn,& 1208 1215 1:UBOUND( chem_species, 1 )) ) 1216 ELSE 1217 ALLOCATE( nest_offl%u_left(1:1,1:1,1:1) ) 1218 ALLOCATE( nest_offl%v_left(1:1,1:1,1:1) ) 1219 ALLOCATE( nest_offl%w_left(1:1,1:1,1:1) ) 1220 IF ( humidity ) ALLOCATE( nest_offl%q_left(1:1,1:1,1:1) ) 1221 IF ( .NOT. neutral ) ALLOCATE( nest_offl%pt_left(1:1,1:1,1:1) ) 1222 IF ( air_chemistry ) ALLOCATE( nest_offl%chem_left(1:1,1:1,1:1, & 1223 1:UBOUND( chem_species, 1 )) ) 1209 1224 ENDIF 1210 1225 IF ( bc_dirichlet_r ) THEN … … 1216 1231 IF ( air_chemistry ) ALLOCATE( nest_offl%chem_right(0:1,nzb+1:nzt,nys:nyn,& 1217 1232 1:UBOUND( chem_species, 1 )) ) 1218 ENDIF 1233 ELSE 1234 ALLOCATE( nest_offl%u_right(1:1,1:1,1:1) ) 1235 ALLOCATE( nest_offl%v_right(1:1,1:1,1:1) ) 1236 ALLOCATE( nest_offl%w_right(1:1,1:1,1:1) ) 1237 IF ( humidity ) ALLOCATE( nest_offl%q_right(1:1,1:1,1:1) ) 1238 IF ( .NOT. neutral ) ALLOCATE( nest_offl%pt_right(1:1,1:1,1:1) ) 1239 IF ( air_chemistry ) ALLOCATE( nest_offl%chem_right(1:1,1:1,1:1, & 1240 1:UBOUND( chem_species, 1 )) ) 1241 ENDIF 1242 ! 1243 !-- Allocate arrays for reading north/south boundary values. Arrays will 1244 !-- incorporate 2 time levels in order to interpolate in between. If the core has 1245 !-- no boundary, allocate a dummy array, in order to enable netcdf parallel 1246 !-- access. Dummy arrays will be allocated with dimension length zero. 1219 1247 IF ( bc_dirichlet_n ) THEN 1220 1248 ALLOCATE( nest_offl%u_north(0:1,nzb+1:nzt,nxlu:nxr) ) … … 1225 1253 IF ( air_chemistry ) ALLOCATE( nest_offl%chem_north(0:1,nzb+1:nzt,nxl:nxr,& 1226 1254 1:UBOUND( chem_species, 1 )) ) 1255 ELSE 1256 ALLOCATE( nest_offl%u_north(1:1,1:1,1:1) ) 1257 ALLOCATE( nest_offl%v_north(1:1,1:1,1:1) ) 1258 ALLOCATE( nest_offl%w_north(1:1,1:1,1:1) ) 1259 IF ( humidity ) ALLOCATE( nest_offl%q_north(1:1,1:1,1:1) ) 1260 IF ( .NOT. neutral ) ALLOCATE( nest_offl%pt_north(1:1,1:1,1:1) ) 1261 IF ( air_chemistry ) ALLOCATE( nest_offl%chem_north(1:1,1:1,1:1, & 1262 1:UBOUND( chem_species, 1 )) ) 1227 1263 ENDIF 1228 1264 IF ( bc_dirichlet_s ) THEN … … 1234 1270 IF ( air_chemistry ) ALLOCATE( nest_offl%chem_south(0:1,nzb+1:nzt,nxl:nxr,& 1235 1271 1:UBOUND( chem_species, 1 )) ) 1236 ENDIF 1237 1272 ELSE 1273 ALLOCATE( nest_offl%u_south(1:1,1:1,1:1) ) 1274 ALLOCATE( nest_offl%v_south(1:1,1:1,1:1) ) 1275 ALLOCATE( nest_offl%w_south(1:1,1:1,1:1) ) 1276 IF ( humidity ) ALLOCATE( nest_offl%q_south(1:1,1:1,1:1) ) 1277 IF ( .NOT. neutral ) ALLOCATE( nest_offl%pt_south(1:1,1:1,1:1) ) 1278 IF ( air_chemistry ) ALLOCATE( nest_offl%chem_south(1:1,1:1,1:1, & 1279 1:UBOUND( chem_species, 1 )) ) 1280 ENDIF 1281 ! 1282 !-- Allocate arrays for reading data at the top boundary. In contrast to the 1283 !-- lateral boundaries, every core reads these data so that no dummy 1284 !-- arrays need to be allocated. 1238 1285 ALLOCATE( nest_offl%u_top(0:1,nys:nyn,nxlu:nxr) ) 1239 1286 ALLOCATE( nest_offl%v_top(0:1,nysv:nyn,nxl:nxr) ) -
palm/trunk/SOURCE/netcdf_data_input_mod.f90
r4100 r4125 25 25 ! ----------------- 26 26 ! $Id$ 27 ! To enable netcdf-parallel access for lateral boundary data (dynamic input), 28 ! zero number of elements are passed to the respective get_variable routine 29 ! for non-boundary cores. 30 ! 31 ! 4100 2019-07-17 08:11:29Z forkel 27 32 ! Made check for input_pids_dynamic and 'inifor' more general 28 !29 33 ! 30 34 ! 4012 2019-05-31 15:19:05Z monakurppa … … 3823 3827 !-- quantities the data starts at nys. This is equivalent at the north 3824 3828 !-- and south domain boundary for the u-component. 3825 !-- Further, lateral data is not accessed by parallel IO, indicated by the 3826 !-- last passed flag in the subroutine get_variable(). This is because 3827 !-- not every PE participates in this collective blocking read operation. 3828 IF ( bc_dirichlet_l ) THEN 3829 CALL get_variable( id_dynamic, 'ls_forcing_left_u', & 3830 nest_offl%u_left(0:1,nzb+1:nzt,nys:nyn), & 3831 nys+1, nzb+1, nest_offl%tind+1, & 3832 nyn-nys+1, nest_offl%nzu, 2, .FALSE. ) 3829 !-- Note, lateral data is also accessed by parallel IO, which is the reason 3830 !-- why different arguments are passed depending on the boundary control 3831 !-- flags. Cores that do not belong to the respective boundary just make 3832 !-- a dummy read with count = 0, just in order to participate the collective 3833 !-- operation. 3834 !-- Read data for western boundary 3835 CALL get_variable( id_dynamic, 'ls_forcing_left_u', & 3836 nest_offl%u_left, & ! array to be read 3837 MERGE( nys+1, 1, bc_dirichlet_l), & ! start index y direction 3838 MERGE( nzb+1, 1, bc_dirichlet_l), & ! start index z direction 3839 MERGE( nest_offl%tind+1, 1, bc_dirichlet_l), & ! start index time dimension 3840 MERGE( nyn-nys+1, 0, bc_dirichlet_l), & ! number of elements along y 3841 MERGE( nest_offl%nzu, 0, bc_dirichlet_l), & ! number of elements alogn z 3842 MERGE( 2, 0, bc_dirichlet_l), & ! number of time steps (2 or 0) 3843 .TRUE. ) ! parallel IO when compiled accordingly 3833 3844 3834 CALL get_variable( id_dynamic, 'ls_forcing_left_v', & 3835 nest_offl%v_left(0:1,nzb+1:nzt,nysv:nyn), & 3836 nysv, nzb+1, nest_offl%tind+1, & 3837 nyn-nysv+1, nest_offl%nzu, 2, .FALSE. ) 3838 3839 CALL get_variable( id_dynamic, 'ls_forcing_left_w', & 3840 nest_offl%w_left(0:1,nzb+1:nzt-1,nys:nyn), & 3841 nys+1, nzb+1, nest_offl%tind+1, & 3842 nyn-nys+1, nest_offl%nzw, 2, .FALSE. ) 3843 3844 IF ( .NOT. neutral ) THEN 3845 CALL get_variable( id_dynamic, 'ls_forcing_left_pt', & 3846 nest_offl%pt_left(0:1,nzb+1:nzt,nys:nyn), & 3847 nys+1, nzb+1, nest_offl%tind+1, & 3848 nyn-nys+1, nest_offl%nzu, 2, .FALSE. ) 3849 ENDIF 3850 3851 IF ( humidity ) THEN 3852 CALL get_variable( id_dynamic, 'ls_forcing_left_qv', & 3853 nest_offl%q_left(0:1,nzb+1:nzt,nys:nyn), & 3854 nys+1, nzb+1, nest_offl%tind+1, & 3855 nyn-nys+1, nest_offl%nzu, 2, .FALSE. ) 3856 ENDIF 3857 3858 IF ( air_chemistry ) THEN 3859 DO n = 1, UBOUND(nest_offl%var_names_chem_l, 1) 3860 IF ( check_existence( nest_offl%var_names, & 3861 nest_offl%var_names_chem_l(n) ) ) & 3862 THEN 3863 CALL get_variable( id_dynamic, & 3864 TRIM( nest_offl%var_names_chem_l(n) ), & 3865 nest_offl%chem_left(0:1,nzb+1:nzt,nys:nyn,n), & 3866 nys+1, nzb+1, nest_offl%tind+1, & 3867 nyn-nys+1, nest_offl%nzu, 2, .FALSE. ) 3868 nest_offl%chem_from_file_l(n) = .TRUE. 3869 ENDIF 3870 ENDDO 3871 ENDIF 3872 3873 ENDIF 3874 3875 IF ( bc_dirichlet_r ) THEN 3876 CALL get_variable( id_dynamic, 'ls_forcing_right_u', & 3877 nest_offl%u_right(0:1,nzb+1:nzt,nys:nyn), & 3878 nys+1, nzb+1, nest_offl%tind+1, & 3879 nyn-nys+1, nest_offl%nzu, 2, .FALSE. ) 3880 3881 CALL get_variable( id_dynamic, 'ls_forcing_right_v', & 3882 nest_offl%v_right(0:1,nzb+1:nzt,nysv:nyn), & 3883 nysv, nzb+1, nest_offl%tind+1, & 3884 nyn-nysv+1, nest_offl%nzu, 2, .FALSE. ) 3885 3886 CALL get_variable( id_dynamic, 'ls_forcing_right_w', & 3887 nest_offl%w_right(0:1,nzb+1:nzt-1,nys:nyn), & 3888 nys+1, nzb+1, nest_offl%tind+1, & 3889 nyn-nys+1, nest_offl%nzw, 2, .FALSE. ) 3890 3891 IF ( .NOT. neutral ) THEN 3892 CALL get_variable( id_dynamic, 'ls_forcing_right_pt', & 3893 nest_offl%pt_right(0:1,nzb+1:nzt,nys:nyn), & 3894 nys+1, nzb+1, nest_offl%tind+1, & 3895 nyn-nys+1, nest_offl%nzu, 2, .FALSE. ) 3896 ENDIF 3897 IF ( humidity ) THEN 3898 CALL get_variable( id_dynamic, 'ls_forcing_right_qv', & 3899 nest_offl%q_right(0:1,nzb+1:nzt,nys:nyn), & 3900 nys+1, nzb+1, nest_offl%tind+1, & 3901 nyn-nys+1, nest_offl%nzu, 2, .FALSE. ) 3902 ENDIF 3903 3904 IF ( air_chemistry ) THEN 3905 DO n = 1, UBOUND(nest_offl%var_names_chem_r, 1) 3906 IF ( check_existence( nest_offl%var_names, & 3907 nest_offl%var_names_chem_r(n) ) ) & 3908 THEN 3909 CALL get_variable( id_dynamic, & 3910 TRIM( nest_offl%var_names_chem_r(n) ), & 3911 nest_offl%chem_right(0:1,nzb+1:nzt,nys:nyn,n), & 3912 nys+1, nzb+1, nest_offl%tind+1, & 3913 nyn-nys+1, nest_offl%nzu, 2, .FALSE. ) 3914 nest_offl%chem_from_file_r(n) = .TRUE. 3915 ENDIF 3916 ENDDO 3917 ENDIF 3918 ENDIF 3919 3920 IF ( bc_dirichlet_n ) THEN 3845 CALL get_variable( id_dynamic, 'ls_forcing_left_v', & 3846 nest_offl%v_left, & 3847 MERGE( nysv, 1, bc_dirichlet_l), & 3848 MERGE( nzb+1, 1, bc_dirichlet_l), & 3849 MERGE( nest_offl%tind+1, 1, bc_dirichlet_l), & 3850 MERGE( nyn-nysv+1, 0, bc_dirichlet_l), & 3851 MERGE( nest_offl%nzu, 0, bc_dirichlet_l), & 3852 MERGE( 2, 0, bc_dirichlet_l), & 3853 .TRUE. ) 3854 3855 CALL get_variable( id_dynamic, 'ls_forcing_left_w', & 3856 nest_offl%w_left, & 3857 MERGE( nys+1, 1, bc_dirichlet_l), & 3858 MERGE( nzb+1, 1, bc_dirichlet_l), & 3859 MERGE( nest_offl%tind+1, 1, bc_dirichlet_l), & 3860 MERGE( nyn-nys+1, 0, bc_dirichlet_l), & 3861 MERGE( nest_offl%nzw, 0, bc_dirichlet_l), & 3862 MERGE( 2, 0, bc_dirichlet_l), & 3863 .TRUE. ) 3864 3865 IF ( .NOT. neutral ) THEN 3866 CALL get_variable( id_dynamic, 'ls_forcing_left_pt', & 3867 nest_offl%pt_left, & 3868 MERGE( nys+1, 1, bc_dirichlet_l), & 3869 MERGE( nzb+1, 1, bc_dirichlet_l), & 3870 MERGE( nest_offl%tind+1, 1, bc_dirichlet_l), & 3871 MERGE( nyn-nys+1, 0, bc_dirichlet_l), & 3872 MERGE( nest_offl%nzu, 0, bc_dirichlet_l), & 3873 MERGE( 2, 0, bc_dirichlet_l), & 3874 .TRUE. ) 3875 ENDIF 3876 3877 IF ( humidity ) THEN 3878 CALL get_variable( id_dynamic, 'ls_forcing_left_qv', & 3879 nest_offl%q_left, & 3880 MERGE( nys+1, 1, bc_dirichlet_l), & 3881 MERGE( nzb+1, 1, bc_dirichlet_l), & 3882 MERGE( nest_offl%tind+1, 1, bc_dirichlet_l), & 3883 MERGE( nyn-nys+1, 0, bc_dirichlet_l), & 3884 MERGE( nest_offl%nzu, 0, bc_dirichlet_l), & 3885 MERGE( 2, 0, bc_dirichlet_l), & 3886 .TRUE. ) 3887 ENDIF 3921 3888 3922 CALL get_variable( id_dynamic, 'ls_forcing_north_u', & 3923 nest_offl%u_north(0:1,nzb+1:nzt,nxlu:nxr), & 3924 nxlu, nzb+1, nest_offl%tind+1, & 3925 nxr-nxlu+1, nest_offl%nzu, 2, .FALSE. ) 3926 3927 CALL get_variable( id_dynamic, 'ls_forcing_north_v', & 3928 nest_offl%v_north(0:1,nzb+1:nzt,nxl:nxr), & 3929 nxl+1, nzb+1, nest_offl%tind+1, & 3930 nxr-nxl+1, nest_offl%nzu, 2, .FALSE. ) 3931 3932 CALL get_variable( id_dynamic, 'ls_forcing_north_w', & 3933 nest_offl%w_north(0:1,nzb+1:nzt-1,nxl:nxr), & 3934 nxl+1, nzb+1, nest_offl%tind+1, & 3935 nxr-nxl+1, nest_offl%nzw, 2, .FALSE. ) 3936 3937 IF ( .NOT. neutral ) THEN 3938 CALL get_variable( id_dynamic, 'ls_forcing_north_pt', & 3939 nest_offl%pt_north(0:1,nzb+1:nzt,nxl:nxr), & 3940 nxl+1, nzb+1, nest_offl%tind+1, & 3941 nxr-nxl+1, nest_offl%nzu, 2, .FALSE. ) 3942 ENDIF 3943 IF ( humidity ) THEN 3944 CALL get_variable( id_dynamic, 'ls_forcing_north_qv', & 3945 nest_offl%q_north(0:1,nzb+1:nzt,nxl:nxr), & 3946 nxl+1, nzb+1, nest_offl%tind+1, & 3947 nxr-nxl+1, nest_offl%nzu, 2, .FALSE. ) 3948 ENDIF 3949 3950 IF ( air_chemistry ) THEN 3951 DO n = 1, UBOUND(nest_offl%var_names_chem_n, 1) 3952 IF ( check_existence( nest_offl%var_names, & 3953 nest_offl%var_names_chem_n(n) ) ) & 3954 THEN 3955 CALL get_variable( id_dynamic, & 3956 TRIM( nest_offl%var_names_chem_n(n) ), & 3957 nest_offl%chem_north(0:1,nzb+1:nzt,nxl:nxr,n), & 3958 nxl+1, nzb+1, nest_offl%tind+1, & 3959 nxr-nxl+1, nest_offl%nzu, 2, .FALSE. ) 3960 nest_offl%chem_from_file_n(n) = .TRUE. 3961 ENDIF 3962 ENDDO 3963 ENDIF 3964 ENDIF 3965 3966 IF ( bc_dirichlet_s ) THEN 3967 CALL get_variable( id_dynamic, 'ls_forcing_south_u', & 3968 nest_offl%u_south(0:1,nzb+1:nzt,nxlu:nxr), & 3969 nxlu, nzb+1, nest_offl%tind+1, & 3970 nxr-nxlu+1, nest_offl%nzu, 2, .FALSE. ) 3971 3972 CALL get_variable( id_dynamic, 'ls_forcing_south_v', & 3973 nest_offl%v_south(0:1,nzb+1:nzt,nxl:nxr), & 3974 nxl+1, nzb+1, nest_offl%tind+1, & 3975 nxr-nxl+1, nest_offl%nzu, 2, .FALSE. ) 3976 3977 CALL get_variable( id_dynamic, 'ls_forcing_south_w', & 3978 nest_offl%w_south(0:1,nzb+1:nzt-1,nxl:nxr), & 3979 nxl+1, nzb+1, nest_offl%tind+1, & 3980 nxr-nxl+1, nest_offl%nzw, 2, .FALSE. ) 3981 3982 IF ( .NOT. neutral ) THEN 3983 CALL get_variable( id_dynamic, 'ls_forcing_south_pt', & 3984 nest_offl%pt_south(0:1,nzb+1:nzt,nxl:nxr), & 3985 nxl+1, nzb+1, nest_offl%tind+1, & 3986 nxr-nxl+1, nest_offl%nzu, 2, .FALSE. ) 3987 ENDIF 3988 IF ( humidity ) THEN 3989 CALL get_variable( id_dynamic, 'ls_forcing_south_qv', & 3990 nest_offl%q_south(0:1,nzb+1:nzt,nxl:nxr), & 3991 nxl+1, nzb+1, nest_offl%tind+1, & 3992 nxr-nxl+1, nest_offl%nzu, 2, .FALSE. ) 3993 ENDIF 3994 3995 IF ( air_chemistry ) THEN 3996 DO n = 1, UBOUND(nest_offl%var_names_chem_s, 1) 3997 IF ( check_existence( nest_offl%var_names, & 3998 nest_offl%var_names_chem_s(n) ) ) & 3999 THEN 4000 CALL get_variable( id_dynamic, & 4001 TRIM( nest_offl%var_names_chem_s(n) ), & 4002 nest_offl%chem_south(0:1,nzb+1:nzt,nxl:nxr,n), & 4003 nxl+1, nzb+1, nest_offl%tind+1, & 4004 nxr-nxl+1, nest_offl%nzu, 2, .FALSE. ) 4005 nest_offl%chem_from_file_s(n) = .TRUE. 4006 ENDIF 4007 ENDDO 4008 ENDIF 4009 ENDIF 4010 3889 IF ( air_chemistry ) THEN 3890 DO n = 1, UBOUND(nest_offl%var_names_chem_l, 1) 3891 IF ( check_existence( nest_offl%var_names, & 3892 nest_offl%var_names_chem_l(n) ) ) THEN 3893 CALL get_variable( id_dynamic, & 3894 TRIM( nest_offl%var_names_chem_l(n) ), & 3895 nest_offl%chem_left(:,:,:,n), & 3896 MERGE( nys+1, 1, bc_dirichlet_l), & 3897 MERGE( nzb+1, 1, bc_dirichlet_l), & 3898 MERGE( nest_offl%tind+1, 1, bc_dirichlet_l), & 3899 MERGE( nyn-nys+1, 0, bc_dirichlet_l), & 3900 MERGE( nest_offl%nzu, 0, bc_dirichlet_l), & 3901 MERGE( 2, 0, bc_dirichlet_l), & 3902 .TRUE. ) 3903 nest_offl%chem_from_file_l(n) = .TRUE. 3904 ENDIF 3905 ENDDO 3906 ENDIF 3907 ! 3908 !-- Read data for eastern boundary 3909 CALL get_variable( id_dynamic, 'ls_forcing_right_u', & 3910 nest_offl%u_right, & 3911 MERGE( nys+1, 1, bc_dirichlet_r), & 3912 MERGE( nzb+1, 1, bc_dirichlet_r), & 3913 MERGE( nest_offl%tind+1, 1, bc_dirichlet_r), & 3914 MERGE( nyn-nys+1, 0, bc_dirichlet_r), & 3915 MERGE( nest_offl%nzu, 0, bc_dirichlet_r), & 3916 MERGE( 2, 0, bc_dirichlet_r), & 3917 .TRUE. ) 3918 3919 CALL get_variable( id_dynamic, 'ls_forcing_right_v', & 3920 nest_offl%v_right, & 3921 MERGE( nysv, 1, bc_dirichlet_r), & 3922 MERGE( nzb+1, 1, bc_dirichlet_r), & 3923 MERGE( nest_offl%tind+1, 1, bc_dirichlet_r), & 3924 MERGE( nyn-nysv+1, 0, bc_dirichlet_r), & 3925 MERGE( nest_offl%nzu, 0, bc_dirichlet_r), & 3926 MERGE( 2, 0, bc_dirichlet_r), & 3927 .TRUE. ) 3928 3929 CALL get_variable( id_dynamic, 'ls_forcing_right_w', & 3930 nest_offl%w_right, & 3931 MERGE( nys+1, 1, bc_dirichlet_r), & 3932 MERGE( nzb+1, 1, bc_dirichlet_r), & 3933 MERGE( nest_offl%tind+1, 1, bc_dirichlet_r), & 3934 MERGE( nyn-nys+1, 0, bc_dirichlet_r), & 3935 MERGE( nest_offl%nzw, 0, bc_dirichlet_r), & 3936 MERGE( 2, 0, bc_dirichlet_r), & 3937 .TRUE. ) 3938 3939 IF ( .NOT. neutral ) THEN 3940 CALL get_variable( id_dynamic, 'ls_forcing_right_pt', & 3941 nest_offl%pt_right, & 3942 MERGE( nys+1, 1, bc_dirichlet_r), & 3943 MERGE( nzb+1, 1, bc_dirichlet_r), & 3944 MERGE( nest_offl%tind+1, 1, bc_dirichlet_r), & 3945 MERGE( nyn-nys+1, 0, bc_dirichlet_r), & 3946 MERGE( nest_offl%nzu, 0, bc_dirichlet_r), & 3947 MERGE( 2, 0, bc_dirichlet_r), & 3948 .TRUE. ) 3949 ENDIF 3950 3951 IF ( humidity ) THEN 3952 CALL get_variable( id_dynamic, 'ls_forcing_right_qv', & 3953 nest_offl%q_right, & 3954 MERGE( nys+1, 1, bc_dirichlet_r), & 3955 MERGE( nzb+1, 1, bc_dirichlet_r), & 3956 MERGE( nest_offl%tind+1, 1, bc_dirichlet_r), & 3957 MERGE( nyn-nys+1, 0, bc_dirichlet_r), & 3958 MERGE( nest_offl%nzu, 0, bc_dirichlet_r), & 3959 MERGE( 2, 0, bc_dirichlet_r), & 3960 .TRUE. ) 3961 ENDIF 3962 3963 IF ( air_chemistry ) THEN 3964 DO n = 1, UBOUND(nest_offl%var_names_chem_r, 1) 3965 IF ( check_existence( nest_offl%var_names, & 3966 nest_offl%var_names_chem_r(n) ) ) THEN 3967 CALL get_variable( id_dynamic, & 3968 TRIM( nest_offl%var_names_chem_r(n) ), & 3969 nest_offl%chem_right(:,:,:,n), & 3970 MERGE( nys+1, 1, bc_dirichlet_r), & 3971 MERGE( nzb+1, 1, bc_dirichlet_r), & 3972 MERGE( nest_offl%tind+1, 1, bc_dirichlet_r), & 3973 MERGE( nyn-nys+1, 0, bc_dirichlet_r), & 3974 MERGE( nest_offl%nzu, 0, bc_dirichlet_r), & 3975 MERGE( 2, 0, bc_dirichlet_r), & 3976 .TRUE. ) 3977 nest_offl%chem_from_file_r(n) = .TRUE. 3978 ENDIF 3979 ENDDO 3980 ENDIF 3981 ! 3982 !-- Read data for northern boundary 3983 CALL get_variable( id_dynamic, 'ls_forcing_north_u', & ! array to be read 3984 nest_offl%u_north, & ! start index x direction 3985 MERGE( nxlu, 1, bc_dirichlet_n ), & ! start index z direction 3986 MERGE( nzb+1, 1, bc_dirichlet_n ), & ! start index time dimension 3987 MERGE( nest_offl%tind+1, 1, bc_dirichlet_n ), & ! number of elements along x 3988 MERGE( nxr-nxlu+1, 0, bc_dirichlet_n ), & ! number of elements alogn z 3989 MERGE( nest_offl%nzu, 0, bc_dirichlet_n ), & ! number of time steps (2 or 0) 3990 MERGE( 2, 0, bc_dirichlet_n ), & ! parallel IO when compiled accordingly 3991 .TRUE. ) 3992 3993 CALL get_variable( id_dynamic, 'ls_forcing_north_v', & ! array to be read 3994 nest_offl%v_north, & ! start index x direction 3995 MERGE( nxl+1, 1, bc_dirichlet_n ), & ! start index z direction 3996 MERGE( nzb+1, 1, bc_dirichlet_n ), & ! start index time dimension 3997 MERGE( nest_offl%tind+1, 1, bc_dirichlet_n ), & ! number of elements along x 3998 MERGE( nxr-nxl+1, 0, bc_dirichlet_n ), & ! number of elements alogn z 3999 MERGE( nest_offl%nzu, 0, bc_dirichlet_n ), & ! number of time steps (2 or 0) 4000 MERGE( 2, 0, bc_dirichlet_n ), & ! parallel IO when compiled accordingly 4001 .TRUE. ) 4002 4003 CALL get_variable( id_dynamic, 'ls_forcing_north_w', & ! array to be read 4004 nest_offl%w_north, & ! start index x direction 4005 MERGE( nxl+1, 1, bc_dirichlet_n ), & ! start index z direction 4006 MERGE( nzb+1, 1, bc_dirichlet_n ), & ! start index time dimension 4007 MERGE( nest_offl%tind+1, 1, bc_dirichlet_n ), & ! number of elements along x 4008 MERGE( nxr-nxl+1, 0, bc_dirichlet_n ), & ! number of elements alogn z 4009 MERGE( nest_offl%nzw, 0, bc_dirichlet_n ), & ! number of time steps (2 or 0) 4010 MERGE( 2, 0, bc_dirichlet_n ), & ! parallel IO when compiled accordingly 4011 .TRUE. ) 4012 4013 IF ( .NOT. neutral ) THEN 4014 CALL get_variable( id_dynamic, 'ls_forcing_north_pt', & ! array to be read 4015 nest_offl%pt_north, & ! start index x direction 4016 MERGE( nxl+1, 1, bc_dirichlet_n ), & ! start index z direction 4017 MERGE( nzb+1, 1, bc_dirichlet_n ), & ! start index time dimension 4018 MERGE( nest_offl%tind+1, 1, bc_dirichlet_n ), & ! number of elements along x 4019 MERGE( nxr-nxl+1, 0, bc_dirichlet_n ), & ! number of elements alogn z 4020 MERGE( nest_offl%nzu, 0, bc_dirichlet_n ), & ! number of time steps (2 or 0) 4021 MERGE( 2, 0, bc_dirichlet_n ), & ! parallel IO when compiled accordingly 4022 .TRUE. ) 4023 ENDIF 4024 IF ( humidity ) THEN 4025 CALL get_variable( id_dynamic, 'ls_forcing_north_qv', & ! array to be read 4026 nest_offl%q_north, & ! start index x direction 4027 MERGE( nxl+1, 1, bc_dirichlet_n ), & ! start index z direction 4028 MERGE( nzb+1, 1, bc_dirichlet_n ), & ! start index time dimension 4029 MERGE( nest_offl%tind+1, 1, bc_dirichlet_n ), & ! number of elements along x 4030 MERGE( nxr-nxl+1, 0, bc_dirichlet_n ), & ! number of elements alogn z 4031 MERGE( nest_offl%nzu, 0, bc_dirichlet_n ), & ! number of time steps (2 or 0) 4032 MERGE( 2, 0, bc_dirichlet_n ), & ! parallel IO when compiled accordingly 4033 .TRUE. ) 4034 ENDIF 4035 4036 IF ( air_chemistry ) THEN 4037 DO n = 1, UBOUND(nest_offl%var_names_chem_n, 1) 4038 IF ( check_existence( nest_offl%var_names, & 4039 nest_offl%var_names_chem_n(n) ) ) THEN 4040 CALL get_variable( id_dynamic, & 4041 TRIM( nest_offl%var_names_chem_n(n) ), & 4042 nest_offl%chem_north(:,:,:,n), & 4043 MERGE( nxl+1, 1, bc_dirichlet_n ), & 4044 MERGE( nzb+1, 1, bc_dirichlet_n ), & 4045 MERGE( nest_offl%tind+1, 1, bc_dirichlet_n ), & 4046 MERGE( nxr-nxl+1, 0, bc_dirichlet_n ), & 4047 MERGE( nest_offl%nzu, 0, bc_dirichlet_n ), & 4048 MERGE( 2, 0, bc_dirichlet_n ), & 4049 .TRUE. ) 4050 nest_offl%chem_from_file_n(n) = .TRUE. 4051 ENDIF 4052 ENDDO 4053 ENDIF 4054 ! 4055 !-- Read data for southern boundary 4056 CALL get_variable( id_dynamic, 'ls_forcing_south_u', & ! array to be read 4057 nest_offl%u_south, & ! start index x direction 4058 MERGE( nxlu, 1, bc_dirichlet_s ), & ! start index z direction 4059 MERGE( nzb+1, 1, bc_dirichlet_s ), & ! start index time dimension 4060 MERGE( nest_offl%tind+1, 1, bc_dirichlet_s ), & ! number of elements along x 4061 MERGE( nxr-nxlu+1, 0, bc_dirichlet_s ), & ! number of elements alogn z 4062 MERGE( nest_offl%nzu, 0, bc_dirichlet_s ), & ! number of time steps (2 or 0) 4063 MERGE( 2, 0, bc_dirichlet_s ), & ! parallel IO when compiled accordingly 4064 .TRUE. ) 4065 4066 CALL get_variable( id_dynamic, 'ls_forcing_south_v', & ! array to be read 4067 nest_offl%v_south, & ! start index x direction 4068 MERGE( nxl+1, 1, bc_dirichlet_s ), & ! start index z direction 4069 MERGE( nzb+1, 1, bc_dirichlet_s ), & ! start index time dimension 4070 MERGE( nest_offl%tind+1, 1, bc_dirichlet_s ), & ! number of elements along x 4071 MERGE( nxr-nxl+1, 0, bc_dirichlet_s ), & ! number of elements alogn z 4072 MERGE( nest_offl%nzu, 0, bc_dirichlet_s ), & ! number of time steps (2 or 0) 4073 MERGE( 2, 0, bc_dirichlet_s ), & ! parallel IO when compiled accordingly 4074 .TRUE. ) 4075 4076 CALL get_variable( id_dynamic, 'ls_forcing_south_w', & ! array to be read 4077 nest_offl%w_south, & ! start index x direction 4078 MERGE( nxl+1, 1, bc_dirichlet_s ), & ! start index z direction 4079 MERGE( nzb+1, 1, bc_dirichlet_s ), & ! start index time dimension 4080 MERGE( nest_offl%tind+1, 1, bc_dirichlet_s ), & ! number of elements along x 4081 MERGE( nxr-nxl+1, 0, bc_dirichlet_s ), & ! number of elements alogn z 4082 MERGE( nest_offl%nzw, 0, bc_dirichlet_s ), & ! number of time steps (2 or 0) 4083 MERGE( 2, 0, bc_dirichlet_s ), & ! parallel IO when compiled accordingly 4084 .TRUE. ) 4085 4086 IF ( .NOT. neutral ) THEN 4087 CALL get_variable( id_dynamic, 'ls_forcing_south_pt', & ! array to be read 4088 nest_offl%pt_south, & ! start index x direction 4089 MERGE( nxl+1, 1, bc_dirichlet_s ), & ! start index z direction 4090 MERGE( nzb+1, 1, bc_dirichlet_s ), & ! start index time dimension 4091 MERGE( nest_offl%tind+1, 1, bc_dirichlet_s ), & ! number of elements along x 4092 MERGE( nxr-nxl+1, 0, bc_dirichlet_s ), & ! number of elements alogn z 4093 MERGE( nest_offl%nzu, 0, bc_dirichlet_s ), & ! number of time steps (2 or 0) 4094 MERGE( 2, 0, bc_dirichlet_s ), & ! parallel IO when compiled accordingly 4095 .TRUE. ) 4096 ENDIF 4097 IF ( humidity ) THEN 4098 CALL get_variable( id_dynamic, 'ls_forcing_south_qv', & ! array to be read 4099 nest_offl%q_south, & ! start index x direction 4100 MERGE( nxl+1, 1, bc_dirichlet_s ), & ! start index z direction 4101 MERGE( nzb+1, 1, bc_dirichlet_s ), & ! start index time dimension 4102 MERGE( nest_offl%tind+1, 1, bc_dirichlet_s ), & ! number of elements along x 4103 MERGE( nxr-nxl+1, 0, bc_dirichlet_s ), & ! number of elements alogn z 4104 MERGE( nest_offl%nzu, 0, bc_dirichlet_s ), & ! number of time steps (2 or 0) 4105 MERGE( 2, 0, bc_dirichlet_s ), & ! parallel IO when compiled accordingly 4106 .TRUE. ) 4107 ENDIF 4108 4109 IF ( air_chemistry ) THEN 4110 DO n = 1, UBOUND(nest_offl%var_names_chem_s, 1) 4111 IF ( check_existence( nest_offl%var_names, & 4112 nest_offl%var_names_chem_s(n) ) ) THEN 4113 CALL get_variable( id_dynamic, & 4114 TRIM( nest_offl%var_names_chem_s(n) ), & 4115 nest_offl%chem_south(:,:,:,n), & 4116 MERGE( nxl+1, 1, bc_dirichlet_s ), & 4117 MERGE( nzb+1, 1, bc_dirichlet_s ), & 4118 MERGE( nest_offl%tind+1, 1, bc_dirichlet_s ), & 4119 MERGE( nxr-nxl+1, 0, bc_dirichlet_s ), & 4120 MERGE( nest_offl%nzu, 0, bc_dirichlet_s ), & 4121 MERGE( 2, 0, bc_dirichlet_s ), & 4122 .TRUE. ) 4123 nest_offl%chem_from_file_s(n) = .TRUE. 4124 ENDIF 4125 ENDDO 4126 ENDIF 4011 4127 ! 4012 4128 !-- Top boundary
Note: See TracChangeset
for help on using the changeset viewer.