Changeset 4029
- Timestamp:
- Jun 14, 2019 2:04:35 PM (5 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/chemistry_model_mod.f90
r4004 r4029 27 27 ! ----------------- 28 28 ! $Id$ 29 ! nest_chemistry option removed 30 ! 31 ! 4004 2019-05-24 11:32:38Z suehring 29 32 ! in subroutine chem_parin check emiss_lod / mod_emis only 30 33 ! when emissions_anthropogenic is activated in namelist (E.C. Chan) … … 374 377 SAVE 375 378 376 LOGICAL :: nest_chemistry = .TRUE. !< flag for nesting mode of chemical species, independent on parent or not377 378 379 REAL(kind=wp), ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: spec_conc_1 !< pointer for swapping of timelevels for conc 379 380 REAL(kind=wp), ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: spec_conc_2 !< pointer for swapping of timelevels for conc … … 466 467 3.25, -999., 2.8, 4.5/) 467 468 468 PUBLIC nest_chemistry469 469 PUBLIC nreact 470 470 PUBLIC nspec !< number of gas phase chemical species including constant compound (e.g. N2) … … 2234 2234 mode_emis, & 2235 2235 my_steps, & 2236 nest_chemistry, &2237 2236 rcntrl, & 2238 2237 side_street_id, & -
palm/trunk/SOURCE/netcdf_interface_mod.f90
r3995 r4029 25 25 ! ----------------- 26 26 ! $Id$ 27 ! netcdf variable NF90_NOFILL is used as argument instead of "1" in calls to NF90_DEF_VAR_FILL 28 ! 29 ! 3995 2019-05-22 18:59:54Z suehring 27 30 ! output of turbulence intensity added 28 31 ! … … 2016 2019 nc_stat = NF90_DEF_VAR_FILL( id_set_3d(av), & 2017 2020 id_var_do3d(av,i), & 2018 1, 0 )2021 NF90_NOFILL, 0 ) 2019 2022 CALL netcdf_handle_error( 'netcdf_define_header', 532 ) 2020 2023 ! … … 3000 3003 nc_stat = NF90_DEF_VAR_FILL( id_set_xy(av), & 3001 3004 id_var_do2d(av,i), & 3002 1, 0 )3005 NF90_NOFILL, 0 ) 3003 3006 CALL netcdf_handle_error( 'netcdf_define_header', 533 ) 3004 3007 ! … … 3888 3891 nc_stat = NF90_DEF_VAR_FILL( id_set_xz(av), & 3889 3892 id_var_do2d(av,i), & 3890 1, 0 )3893 NF90_NOFILL, 0 ) 3891 3894 CALL netcdf_handle_error( 'netcdf_define_header', 534 ) 3892 3895 ! … … 4744 4747 nc_stat = NF90_DEF_VAR_FILL( id_set_yz(av), & 4745 4748 id_var_do2d(av,i), & 4746 1, 0 )4749 NF90_NOFILL, 0 ) 4747 4750 CALL netcdf_handle_error( 'netcdf_define_header', 535 ) 4748 4751 ! -
palm/trunk/SOURCE/pmc_interface_mod.f90
r4026 r4029 25 25 ! ----------------- 26 26 ! $Id$ 27 ! nest_chemistry switch removed 28 ! 29 ! 4026 2019-06-12 16:50:15Z suehring 27 30 ! Masked topography at boundary grid points in mass conservation, in order to 28 31 ! avoid that mean velocities within topography are imposed … … 465 468 466 469 USE chemistry_model_mod, & 467 ONLY: nest_chemistry,spec_conc_2470 ONLY: spec_conc_2 468 471 469 472 USE cpulog, & … … 1429 1432 ENDIF 1430 1433 1431 IF ( air_chemistry .AND. nest_chemistry) THEN1434 IF ( air_chemistry ) THEN 1432 1435 DO n = 1, nspec 1433 1436 CALL pmc_set_dataarray_name( 'parent', 'chem_' // TRIM( chem_species(n)%name ), & … … 2546 2549 ! 2547 2550 !-- Chemistry, depends on number of species 2548 IF ( air_chemistry .AND. nest_chemistry) pmc_max_array = pmc_max_array + nspec2551 IF ( air_chemistry ) pmc_max_array = pmc_max_array + nspec 2549 2552 ! 2550 2553 !-- SALSA, depens on the number aerosol size bins and chemical components + … … 2623 2626 IF ( TRIM(name) == "s" ) p_3d_sec => s_2 2624 2627 IF ( TRIM(name) == "diss" ) p_3d_sec => diss_2 2625 IF ( INDEX( TRIM(name), "chem_" ) /= 0 2626 IF ( INDEX( TRIM(name), "an_" ) /= 0) p_3d_sec => nconc_2(:,:,:,n)2627 IF ( INDEX( TRIM(name), "am_" ) /= 0 ) p_3d_sec => mconc_2(:,:,:,n)2628 IF ( INDEX( TRIM(name), "sg_" ) /= 0 .AND. .NOT. salsa_gases_from_chem ) &2629 p_3d_sec => gconc_2(:,:,:,n)2628 IF ( INDEX( TRIM(name), "chem_" ) /= 0 ) p_3d_sec => spec_conc_2(:,:,:,n) 2629 IF ( INDEX( TRIM(name), "an_" ) /= 0 ) p_3d_sec => nconc_2(:,:,:,n) 2630 IF ( INDEX( TRIM(name), "am_" ) /= 0 ) p_3d_sec => mconc_2(:,:,:,n) 2631 IF ( INDEX( TRIM(name), "sg_" ) /= 0 .AND. .NOT. salsa_gases_from_chem ) & 2632 p_3d_sec => gconc_2(:,:,:,n) 2630 2633 2631 2634 IF ( ASSOCIATED( p_3d ) ) THEN … … 2953 2956 ENDIF 2954 2957 2955 IF ( air_chemistry .AND. nest_chemistry) THEN2958 IF ( air_chemistry ) THEN 2956 2959 DO n = 1, nspec 2957 2960 CALL pmci_interp_1sto_all ( chem_species(n)%conc, chem_spec_c(:,:,:,n), & … … 3630 3633 ENDIF 3631 3634 3632 IF ( air_chemistry .AND. nest_chemistry) THEN3635 IF ( air_chemistry ) THEN 3633 3636 DO n = 1, nspec 3634 3637 CALL pmci_interp_1sto_lr( chem_species(n)%conc, chem_spec_c(:,:,:,n), & … … 3701 3704 ENDIF 3702 3705 3703 IF ( air_chemistry .AND. nest_chemistry) THEN3706 IF ( air_chemistry ) THEN 3704 3707 DO n = 1, nspec 3705 3708 CALL pmci_interp_1sto_lr( chem_species(n)%conc, chem_spec_c(:,:,:,n), & … … 3772 3775 ENDIF 3773 3776 3774 IF ( air_chemistry .AND. nest_chemistry) THEN3777 IF ( air_chemistry ) THEN 3775 3778 DO n = 1, nspec 3776 3779 CALL pmci_interp_1sto_sn( chem_species(n)%conc, chem_spec_c(:,:,:,n), & … … 3843 3846 ENDIF 3844 3847 3845 IF ( air_chemistry .AND. nest_chemistry) THEN3848 IF ( air_chemistry ) THEN 3846 3849 DO n = 1, nspec 3847 3850 CALL pmci_interp_1sto_sn( chem_species(n)%conc, chem_spec_c(:,:,:,n), & … … 3909 3912 ENDIF 3910 3913 3911 IF ( air_chemistry .AND. nest_chemistry) THEN3914 IF ( air_chemistry ) THEN 3912 3915 DO n = 1, nspec 3913 3916 CALL pmci_interp_1sto_t( chem_species(n)%conc, chem_spec_c(:,:,:,n), & … … 4000 4003 ENDIF 4001 4004 4002 IF ( air_chemistry .AND. nest_chemistry) THEN4005 IF ( air_chemistry ) THEN 4003 4006 DO n = 1, nspec 4004 4007 CALL pmci_anterp_tophat( chem_species(n)%conc, chem_spec_c(:,:,:,n), & … … 5052 5055 ! 5053 5056 !-- Set Neumann boundary conditions for chemical species 5054 IF ( air_chemistry .AND. nest_chemistry) THEN5057 IF ( air_chemistry ) THEN 5055 5058 IF ( ibc_cs_b == 1 ) THEN 5056 5059 DO n = 1, nspec -
palm/trunk/SOURCE/surface_data_output_mod.f90
r3881 r4029 25 25 ! ----------------- 26 26 ! $Id$ 27 ! netcdf variable NF90_NOFILL is used as argument instead of "1" in call to NF90_DEF_VAR_FILL 28 ! 29 ! 3881 2019-04-10 09:31:22Z suehring 27 30 ! Check for zero output timestep (not allowed in parallel NetCDF output mode) 28 31 ! … … 1302 1305 nc_stat = NF90_DEF_VAR_FILL( id_set_surf(av), & 1303 1306 id_var_dosurf(av,i), & 1304 1, 0 )1307 NF90_NOFILL, 0 ) 1305 1308 CALL netcdf_handle_error( 'surface_data_output_init', 5566 ) 1306 1309 ! -
palm/trunk/SOURCE/time_integration.f90
r4022 r4029 25 25 ! ----------------- 26 26 ! $Id$ 27 ! exchange of ghost points and boundary conditions separated for chemical species and SALSA module, 28 ! bugfix: decycling of chemistry species after nesting data transfer 29 ! 30 ! 4022 2019-06-12 11:52:39Z suehring 27 31 ! Call synthetic turbulence generator at last RK3 substep right after boundary 28 32 ! conditions are updated in offline nesting in order to assure that … … 1068 1072 DO lsp = 1, nvar 1069 1073 CALL exchange_horiz( chem_species(lsp)%conc_p, nbgp ) 1070 ! 1071 !-- kanani: Push chem_boundary_conds after CALL boundary_conds 1074 ENDDO 1075 ENDIF 1076 1077 IF ( salsa .AND. time_since_reference_point >= skip_time_do_salsa ) THEN 1078 DO ib = 1, nbins_aerosol 1079 CALL exchange_horiz( aerosol_number(ib)%conc_p, nbgp ) 1080 DO ic = 1, ncomponents_mass 1081 icc = ( ic - 1 ) * nbins_aerosol + ib 1082 CALL exchange_horiz( aerosol_mass(icc)%conc_p, nbgp ) 1083 ENDDO 1084 ENDDO 1085 IF ( .NOT. salsa_gases_from_chem ) THEN 1086 DO ig = 1, ngases_salsa 1087 CALL exchange_horiz( salsa_gas(ig)%conc_p, nbgp ) 1088 ENDDO 1089 ENDIF 1090 ENDIF 1091 CALL cpu_log( log_point(26), 'exchange-horiz-progn', 'stop' ) 1092 1093 ! 1094 !-- Boundary conditions for the prognostic quantities (except of the 1095 !-- velocities at the outflow in case of a non-cyclic lateral wall) 1096 CALL boundary_conds 1097 1098 ! 1099 !-- Boundary conditions for prognostic quantitites of other modules: 1100 !-- Here, only decycling is carried out 1101 IF ( air_chemistry ) THEN 1102 1103 DO lsp = 1, nvar 1072 1104 lsp_usr = 1 1073 1105 DO WHILE ( TRIM( cs_name( lsp_usr ) ) /= 'novalue' ) 1074 IF ( TRIM( chem_species(lsp)%name) == TRIM(cs_name(lsp_usr)) ) THEN1106 IF ( TRIM( chem_species(lsp)%name ) == TRIM( cs_name(lsp_usr) ) ) THEN 1075 1107 CALL chem_boundary_conds( chem_species(lsp)%conc_p, & 1076 1108 chem_species(lsp)%conc_pr_init ) … … 1079 1111 ENDDO 1080 1112 ENDDO 1113 1081 1114 ENDIF 1082 1115 1083 1116 IF ( salsa .AND. time_since_reference_point >= skip_time_do_salsa ) THEN 1084 ! 1085 !-- Exchange ghost points and decycle boundary concentrations if needed 1117 1086 1118 DO ib = 1, nbins_aerosol 1087 CALL exchange_horiz( aerosol_number(ib)%conc_p, nbgp )1088 1119 CALL salsa_boundary_conds( aerosol_number(ib)%conc_p, aerosol_number(ib)%init ) 1089 1120 DO ic = 1, ncomponents_mass 1090 1121 icc = ( ic - 1 ) * nbins_aerosol + ib 1091 CALL exchange_horiz( aerosol_mass(icc)%conc_p, nbgp )1092 1122 CALL salsa_boundary_conds( aerosol_mass(icc)%conc_p, aerosol_mass(icc)%init ) 1093 1123 ENDDO … … 1095 1125 IF ( .NOT. salsa_gases_from_chem ) THEN 1096 1126 DO ig = 1, ngases_salsa 1097 CALL exchange_horiz( salsa_gas(ig)%conc_p, nbgp )1098 1127 CALL salsa_boundary_conds( salsa_gas(ig)%conc_p, salsa_gas(ig)%init ) 1099 1128 ENDDO 1100 1129 ENDIF 1101 ENDIF 1102 CALL cpu_log( log_point(26), 'exchange-horiz-progn', 'stop' ) 1103 1104 ! 1105 !-- Boundary conditions for the prognostic quantities (except of the 1106 !-- velocities at the outflow in case of a non-cyclic lateral wall) 1107 CALL boundary_conds 1130 1131 ENDIF 1132 1108 1133 ! 1109 1134 !-- Swap the time levels in preparation for the next time step. … … 1130 1155 1131 1156 IF ( TRIM( nesting_mode ) == 'two-way' .OR. nesting_mode == 'vertical' ) THEN 1157 1158 CALL cpu_log( log_point_s(92), 'exchange-horiz-nest', 'start' ) 1132 1159 ! 1133 1160 !-- Exchange_horiz is needed for all parent-domains after the … … 1170 1197 DO ib = 1, nbins_aerosol 1171 1198 CALL exchange_horiz( aerosol_number(ib)%conc, nbgp ) 1172 CALL salsa_boundary_conds( aerosol_number(ib)%conc, aerosol_number(ib)%init )1173 1199 DO ic = 1, ncomponents_mass 1174 1200 icc = ( ic - 1 ) * nbins_aerosol + ib 1175 1201 CALL exchange_horiz( aerosol_mass(icc)%conc, nbgp ) 1176 CALL salsa_boundary_conds( aerosol_mass(icc)%conc, aerosol_mass(icc)%init )1177 1202 ENDDO 1178 1203 ENDDO … … 1180 1205 DO ig = 1, ngases_salsa 1181 1206 CALL exchange_horiz( salsa_gas(ig)%conc, nbgp ) 1182 CALL salsa_boundary_conds( salsa_gas(ig)%conc, salsa_gas(ig)%init )1183 1207 ENDDO 1184 1208 ENDIF 1185 1209 ENDIF 1186 CALL cpu_log( log_point(26), 'exchange-horiz-progn', 'stop' ) 1187 1188 ENDIF 1210 CALL cpu_log( log_point_s(92), 'exchange-horiz-nest', 'stop' ) 1211 1212 ENDIF 1213 1189 1214 ! 1190 1215 !-- Set boundary conditions again after interpolation and anterpolation. 1191 1216 CALL pmci_boundary_conds 1217 1218 ! 1219 !-- Set chemistry boundary conditions (decycling) 1220 IF ( air_chemistry ) THEN 1221 DO lsp = 1, nvar 1222 lsp_usr = 1 1223 DO WHILE ( TRIM( cs_name( lsp_usr ) ) /= 'novalue' ) 1224 IF ( TRIM( chem_species(lsp)%name ) == TRIM( cs_name(lsp_usr) ) ) THEN 1225 CALL chem_boundary_conds( chem_species(lsp)%conc, & 1226 chem_species(lsp)%conc_pr_init ) 1227 ENDIF 1228 lsp_usr = lsp_usr + 1 1229 ENDDO 1230 ENDDO 1231 ENDIF 1232 1233 ! 1234 !-- Set SALSA boundary conditions (decycling) 1235 IF ( salsa .AND. time_since_reference_point >= skip_time_do_salsa ) THEN 1236 DO ib = 1, nbins_aerosol 1237 CALL salsa_boundary_conds( aerosol_number(ib)%conc, aerosol_number(ib)%init ) 1238 DO ic = 1, ncomponents_mass 1239 icc = ( ic - 1 ) * nbins_aerosol + ib 1240 CALL salsa_boundary_conds( aerosol_mass(icc)%conc, aerosol_mass(icc)%init ) 1241 ENDDO 1242 ENDDO 1243 IF ( .NOT. salsa_gases_from_chem ) THEN 1244 DO ig = 1, ngases_salsa 1245 CALL salsa_boundary_conds( salsa_gas(ig)%conc, salsa_gas(ig)%init ) 1246 ENDDO 1247 ENDIF 1248 ENDIF 1192 1249 1193 1250 CALL cpu_log( log_point(60), 'nesting', 'stop' )
Note: See TracChangeset
for help on using the changeset viewer.