Changeset 3864 for palm/trunk/SOURCE/time_integration.f90
- Timestamp:
- Apr 5, 2019 9:01:56 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/time_integration.f90
r3833 r3864 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Modifications made for salsa: 28 ! - Call salsa_emission_update at each time step but do the checks within 29 ! salsa_emission_update (i.e. skip_time_do_salsa >= time_since_reference_point 30 ! and next_aero_emission_update <= time_since_reference_point ). 31 ! - Renamed nbins --> nbins_aerosol, ncc_tot --> ncomponents_mass and 32 ! ngast --> ngases_salsa and loop indices b, c and sg to ib, ic and ig 33 ! - Apply nesting for salsa variables 34 ! - Removed cpu_log calls speciffic for salsa. 35 ! 36 ! 3833 2019-03-28 15:04:04Z forkel 27 37 ! added USE chem_gasphase_mod, replaced nspec by nvar since fixed compounds are not integrated 28 38 ! … … 567 577 USE nesting_offl_mod, & 568 578 ONLY: nesting_offl_bc, nesting_offl_mass_conservation 569 579 570 580 USE netcdf_data_input_mod, & 571 581 ONLY: chem_emis, chem_emis_att, nest_offl, netcdf_data_input_offline_nesting … … 591 601 ONLY: dt_radiation, force_radiation_call, radiation, radiation_control, & 592 602 radiation_interaction, radiation_interactions, skip_time_do_radiation, time_radiation 593 603 594 604 USE salsa_mod, & 595 ONLY: aerosol_number, aerosol_mass, nbins, ncc_tot, ngast, salsa_boundary_conds, & 596 salsa_gas, salsa_gases_from_chem, skip_time_do_salsa 605 ONLY: aerosol_number, aerosol_mass, bc_am_t_val, bc_an_t_val, bc_gt_t_val, & 606 nbins_aerosol, ncomponents_mass, ngases_salsa, salsa_boundary_conds, & 607 salsa_emission_update, salsa_gas, salsa_gases_from_chem, skip_time_do_salsa 597 608 598 609 USE spectra_mod, & … … 629 640 vnest_boundary_conds_khkm, vnest_deallocate, vnest_init, vnest_init_fine, & 630 641 vnest_start_time 631 642 632 643 USE virtual_measurement_mod, & 633 644 ONLY: vm_data_output, vm_sampling, vm_time_start … … 667 678 668 679 CHARACTER (LEN=9) :: time_to_string !< 669 670 INTEGER(iwp) :: b !< index for aerosol size bins 671 INTEGER(iwp) :: c !< index for chemical compounds in aerosol size bins 672 INTEGER(iwp) :: g !< index for gaseous compounds 680 681 INTEGER(iwp) :: ib !< index for aerosol size bins 682 INTEGER(iwp) :: ic !< index for aerosol mass bins 683 INTEGER(iwp) :: icc !< additional index for aerosol mass bins 684 INTEGER(iwp) :: ig !< index for salsa gases 673 685 INTEGER(iwp) :: lsp 674 686 INTEGER(iwp) :: lsp_usr !< … … 856 868 ENDDO 857 869 ENDIF 870 IF ( salsa .AND. time_since_reference_point >= skip_time_do_salsa ) THEN 871 DO ib = 1, nbins_aerosol 872 bc_an_t_val = ( aerosol_number(ib)%init(nzt+1) - aerosol_number(ib)%init(nzt) ) / & 873 dzu(nzt+1) 874 DO ic = 1, ncomponents_mass 875 icc = ( ic - 1 ) * nbins_aerosol + ib 876 bc_am_t_val = ( aerosol_mass(icc)%init(nzt+1) - aerosol_mass(icc)%init(nzt) ) /& 877 dzu(nzt+1) 878 ENDDO 879 ENDDO 880 IF ( .NOT. salsa_gases_from_chem ) THEN 881 DO ig = 1, ngases_salsa 882 bc_gt_t_val = ( salsa_gas(ig)%init(nzt+1) - salsa_gas(ig)%init(nzt) ) / & 883 dzu(nzt+1) 884 ENDDO 885 ENDIF 886 ENDIF 858 887 ENDIF 859 888 ! … … 1028 1057 ENDIF 1029 1058 1030 IF ( salsa .AND. time_since_reference_point >= skip_time_do_salsa )& 1031 THEN 1032 CALL cpu_log( log_point_s(91), 'salsa exch-horiz ', 'start' ) 1033 DO b = 1, nbins 1034 CALL exchange_horiz( aerosol_number(b)%conc_p, nbgp ) 1035 CALL cpu_log( log_point_s(93), 'salsa decycle', 'start' ) 1036 CALL salsa_boundary_conds( aerosol_number(b)%conc_p, aerosol_number(b)%init ) 1037 CALL cpu_log( log_point_s(93), 'salsa decycle', 'stop' ) 1038 DO c = 1, ncc_tot 1039 CALL exchange_horiz( aerosol_mass((c-1)*nbins+b)%conc_p, nbgp ) 1040 CALL cpu_log( log_point_s(93), 'salsa decycle', 'start' ) 1041 CALL salsa_boundary_conds( aerosol_mass((c-1)*nbins+b)%conc_p, & 1042 aerosol_mass((c-1)*nbins+b)%init ) 1043 CALL cpu_log( log_point_s(93), 'salsa decycle', 'stop' ) 1059 IF ( salsa .AND. time_since_reference_point >= skip_time_do_salsa ) THEN 1060 ! 1061 !-- Exchange ghost points and decycle boundary concentrations if needed 1062 DO ib = 1, nbins_aerosol 1063 CALL exchange_horiz( aerosol_number(ib)%conc_p, nbgp ) 1064 CALL salsa_boundary_conds( aerosol_number(ib)%conc_p, aerosol_number(ib)%init ) 1065 DO ic = 1, ncomponents_mass 1066 icc = ( ic - 1 ) * nbins_aerosol + ib 1067 CALL exchange_horiz( aerosol_mass(icc)%conc_p, nbgp ) 1068 CALL salsa_boundary_conds( aerosol_mass(icc)%conc_p, aerosol_mass(icc)%init ) 1044 1069 ENDDO 1045 1070 ENDDO 1046 1071 IF ( .NOT. salsa_gases_from_chem ) THEN 1047 DO g = 1, ngast 1048 CALL exchange_horiz( salsa_gas(g)%conc_p, nbgp ) 1049 CALL cpu_log( log_point_s(93), 'salsa decycle', 'start' ) 1050 CALL salsa_boundary_conds( salsa_gas(g)%conc_p, salsa_gas(g)%init ) 1051 CALL cpu_log( log_point_s(93), 'salsa decycle', 'stop' ) 1052 ENDDO 1072 DO ig = 1, ngases_salsa 1073 CALL exchange_horiz( salsa_gas(ig)%conc_p, nbgp ) 1074 CALL salsa_boundary_conds( salsa_gas(ig)%conc_p, salsa_gas(ig)%init ) 1075 ENDDO 1053 1076 ENDIF 1054 CALL cpu_log( log_point_s(91), 'salsa exch-horiz ', 'stop' ) 1055 ENDIF 1077 ENDIF 1056 1078 CALL cpu_log( log_point(26), 'exchange-horiz-progn', 'stop' ) 1057 1079 … … 1108 1130 1109 1131 IF ( passive_scalar ) CALL exchange_horiz( s, nbgp ) 1110 1132 1111 1133 IF ( .NOT. constant_diffusion ) CALL exchange_horiz( e, nbgp ) 1112 1134 … … 1120 1142 ENDDO 1121 1143 ENDIF 1144 1145 IF ( salsa .AND. time_since_reference_point >= skip_time_do_salsa ) THEN 1146 DO ib = 1, nbins_aerosol 1147 CALL exchange_horiz( aerosol_number(ib)%conc, nbgp ) 1148 CALL salsa_boundary_conds( aerosol_number(ib)%conc, aerosol_number(ib)%init ) 1149 DO ic = 1, ncomponents_mass 1150 icc = ( ic - 1 ) * nbins_aerosol + ib 1151 CALL exchange_horiz( aerosol_mass(icc)%conc, nbgp ) 1152 CALL salsa_boundary_conds( aerosol_mass(icc)%conc, aerosol_mass(icc)%init ) 1153 ENDDO 1154 ENDDO 1155 IF ( .NOT. salsa_gases_from_chem ) THEN 1156 DO ig = 1, ngases_salsa 1157 CALL exchange_horiz( salsa_gas(ig)%conc, nbgp ) 1158 CALL salsa_boundary_conds( salsa_gas(ig)%conc, salsa_gas(ig)%init ) 1159 ENDDO 1160 ENDIF 1161 ENDIF 1162 CALL cpu_log( log_point(26), 'exchange-horiz-progn', 'stop' ) 1122 1163 1123 1164 ENDIF … … 1407 1448 ENDIF 1408 1449 ENDIF 1409 1450 ! 1451 !-- If required, consider aerosol emissions for the salsa model 1452 IF ( salsa ) THEN 1453 ! 1454 !-- Call emission routine to update emissions if needed 1455 CALL salsa_emission_update 1456 1457 ENDIF 1410 1458 ! 1411 1459 !-- If required, calculate indoor temperature, waste heat, heat flux
Note: See TracChangeset
for help on using the changeset viewer.