Changeset 4671 for palm/trunk/SOURCE/salsa_mod.f90
- Timestamp:
- Sep 9, 2020 8:27:58 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/salsa_mod.f90
r4535 r4671 21 21 ! Current revisions: 22 22 ! ----------------- 23 ! 24 ! 23 ! 24 ! 25 25 ! Former revisions: 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Implementation of downward facing USM and LSM surfaces 29 ! 30 ! 4535 2020-05-15 12:07:23Z raasch 28 31 ! bugfix for restart data format query 29 32 ! … … 850 853 TYPE(t_section), DIMENSION(:), ALLOCATABLE :: aero !< local aerosol properties 851 854 852 TYPE(match_surface) :: lsm_to_depo_h !< to match the deposition module and horizontal LSM surfaces853 TYPE(match_surface) :: usm_to_depo_h !< to match the deposition module and horizontal USM surfaces855 TYPE(match_surface), DIMENSION(0:1) :: lsm_to_depo_h !< to match the deposition module and horizontal LSM surfaces 856 TYPE(match_surface), DIMENSION(0:1) :: usm_to_depo_h !< to match the deposition module and horizontal USM surfaces 854 857 855 858 TYPE(match_surface), DIMENSION(0:3) :: lsm_to_depo_v !< to match the deposition mod. and vertical LSM surfaces … … 1695 1698 ENDDO 1696 1699 ! 1697 !-- Horizontal surfaces: natural type1698 ALLOCATE( surf_lsm_h%answs( 1:surf_lsm_h%ns, nbins_aerosol ) )1699 ALLOCATE( surf_lsm_h%amsws( 1:surf_lsm_h%ns, nbins_aerosol*ncomponents_mass) )1700 surf_lsm_h%answs = 0.0_wp1701 surf_lsm_h%amsws = 0.0_wp1702 ! 1703 !-- Horizontal surfaces: urban type 1704 ALLOCATE( surf_usm_h%answs( 1:surf_usm_h%ns, nbins_aerosol ) )1705 ALLOCATE( surf_usm_h%amsws( 1:surf_usm_h%ns, nbins_aerosol*ncomponents_mass ) )1706 surf_usm_h%answs = 0.0_wp1707 surf_usm_h%amsws = 0.0_wp1708 1700 !-- Horizontal surfaces: natural and urban type 1701 DO l = 0, 1 1702 ALLOCATE( surf_lsm_h(l)%answs( 1:surf_lsm_h(l)%ns, nbins_aerosol ) ) 1703 ALLOCATE( surf_lsm_h(l)%amsws( 1:surf_lsm_h(l)%ns, nbins_aerosol*ncomponents_mass ) ) 1704 surf_lsm_h(l)%answs = 0.0_wp 1705 surf_lsm_h(l)%amsws = 0.0_wp 1706 1707 ALLOCATE( surf_usm_h(l)%answs( 1:surf_usm_h(l)%ns, nbins_aerosol ) ) 1708 ALLOCATE( surf_usm_h(l)%amsws( 1:surf_usm_h(l)%ns, nbins_aerosol*ncomponents_mass ) ) 1709 surf_usm_h(l)%answs = 0.0_wp 1710 surf_usm_h(l)%amsws = 0.0_wp 1711 ENDDO 1709 1712 ! 1710 1713 !-- Vertical surfaces: northward (l=0), southward (l=1), eastward (l=2) and westward (l=3) facing … … 1797 1800 surf_def_h(l)%gtsws = 0.0_wp 1798 1801 ENDDO 1799 !-- Horizontal surfaces: natural type 1800 ALLOCATE( surf_lsm_h%gtsws( 1:surf_lsm_h%ns, ngases_salsa ) ) 1801 surf_lsm_h%gtsws = 0.0_wp 1802 !-- Horizontal surfaces: urban type 1803 ALLOCATE( surf_usm_h%gtsws( 1:surf_usm_h%ns, ngases_salsa ) ) 1804 surf_usm_h%gtsws = 0.0_wp 1802 !-- Horizontal surfaces: natural and urban type 1803 DO l = 0, 1 1804 ALLOCATE( surf_lsm_h(l)%gtsws( 1:surf_lsm_h(l)%ns, ngases_salsa ) ) 1805 surf_lsm_h(l)%gtsws = 0.0_wp 1806 ALLOCATE( surf_usm_h(l)%gtsws( 1:surf_usm_h(l)%ns, ngases_salsa ) ) 1807 surf_usm_h(l)%gtsws = 0.0_wp 1808 ENDDO 1805 1809 ! 1806 1810 !-- Vertical surfaces: northward (l=0), southward (l=1), eastward (l=2) and … … 2747 2751 IF ( nldepo_surf .AND. land_surface ) THEN 2748 2752 match_lsm = .TRUE. 2749 ALLOCATE( lsm_to_depo_h%match_lupg(1:surf_lsm_h%ns), & 2750 lsm_to_depo_h%match_luvw(1:surf_lsm_h%ns), & 2751 lsm_to_depo_h%match_luww(1:surf_lsm_h%ns) ) 2752 lsm_to_depo_h%match_lupg = 0 2753 lsm_to_depo_h%match_luvw = 0 2754 lsm_to_depo_h%match_luww = 0 2755 CALL match_sm_zhang( surf_lsm_h, lsm_to_depo_h%match_lupg, lsm_to_depo_h%match_luvw, & 2756 lsm_to_depo_h%match_luww, match_lsm ) 2753 DO l = 0, 1 2754 ALLOCATE( lsm_to_depo_h(l)%match_lupg(1:surf_lsm_h(l)%ns), & 2755 lsm_to_depo_h(l)%match_luvw(1:surf_lsm_h(l)%ns), & 2756 lsm_to_depo_h(l)%match_luww(1:surf_lsm_h(l)%ns) ) 2757 lsm_to_depo_h(l)%match_lupg = 0 2758 lsm_to_depo_h(l)%match_luvw = 0 2759 lsm_to_depo_h(l)%match_luww = 0 2760 CALL match_sm_zhang( surf_lsm_h(l), lsm_to_depo_h(l)%match_lupg, & 2761 lsm_to_depo_h(l)%match_luvw, lsm_to_depo_h(l)%match_luww, match_lsm ) 2762 ENDDO 2757 2763 DO l = 0, 3 2758 2764 ALLOCATE( lsm_to_depo_v(l)%match_lupg(1:surf_lsm_v(l)%ns), & … … 2770 2776 IF ( nldepo_surf .AND. urban_surface ) THEN 2771 2777 match_lsm = .FALSE. 2772 ALLOCATE( usm_to_depo_h%match_lupg(1:surf_usm_h%ns), & 2773 usm_to_depo_h%match_luvw(1:surf_usm_h%ns), & 2774 usm_to_depo_h%match_luww(1:surf_usm_h%ns) ) 2775 usm_to_depo_h%match_lupg = 0 2776 usm_to_depo_h%match_luvw = 0 2777 usm_to_depo_h%match_luww = 0 2778 CALL match_sm_zhang( surf_usm_h, usm_to_depo_h%match_lupg, usm_to_depo_h%match_luvw, & 2779 usm_to_depo_h%match_luww, match_lsm ) 2778 DO l = 0, 1 2779 ALLOCATE( usm_to_depo_h(l)%match_lupg(1:surf_usm_h(l)%ns), & 2780 usm_to_depo_h(l)%match_luvw(1:surf_usm_h(l)%ns), & 2781 usm_to_depo_h(l)%match_luww(1:surf_usm_h(l)%ns) ) 2782 usm_to_depo_h(l)%match_lupg = 0 2783 usm_to_depo_h(l)%match_luvw = 0 2784 usm_to_depo_h(l)%match_luww = 0 2785 CALL match_sm_zhang( surf_usm_h(l), usm_to_depo_h(l)%match_lupg, & 2786 usm_to_depo_h(l)%match_luvw, usm_to_depo_h(l)%match_luww, match_lsm ) 2787 ENDDO 2780 2788 DO l = 0, 3 2781 2789 ALLOCATE( usm_to_depo_v(l)%match_lupg(1:surf_usm_v(l)%ns), & … … 4099 4107 ENDDO 4100 4108 ELSE 4101 CALL depo_surf( i, j, surf_usm_h, vd, schmidt_num, kvis, in_u, .TRUE., usm_to_depo_h ) 4109 DO l = 0, 1 4110 CALL depo_surf( i, j, surf_usm_h(l), vd, schmidt_num, kvis, in_u, .TRUE., usm_to_depo_h(l) ) 4111 ENDDO 4102 4112 DO l = 0, 3 4103 CALL depo_surf( i, j, surf_usm_v(l), vd, schmidt_num, kvis, in_u, .FALSE., & 4104 usm_to_depo_v(l) ) 4113 CALL depo_surf( i, j, surf_usm_v(l), vd, schmidt_num, kvis, in_u, .FALSE., usm_to_depo_v(l) ) 4105 4114 ENDDO 4106 CALL depo_surf( i, j, surf_lsm_h, vd, schmidt_num, kvis, in_u, .TRUE., lsm_to_depo_h ) 4115 DO l = 0, 1 4116 CALL depo_surf( i, j, surf_lsm_h(l), vd, schmidt_num, kvis, in_u, .TRUE., lsm_to_depo_h(l) ) 4117 ENDDO 4107 4118 DO l = 0, 3 4108 CALL depo_surf( i, j, surf_lsm_v(l), vd, schmidt_num, kvis, in_u, .FALSE., & 4109 lsm_to_depo_v(l) ) 4119 CALL depo_surf( i, j, surf_lsm_v(l), vd, schmidt_num, kvis, in_u, .FALSE., lsm_to_depo_v(l) ) 4110 4120 ENDDO 4111 4121 ENDIF … … 8568 8578 CALL diffusion_s( i, j, rs, surf_def_h(0)%answs(:,ib), & 8569 8579 surf_def_h(1)%answs(:,ib), surf_def_h(2)%answs(:,ib), & 8570 surf_lsm_h%answs(:,ib), surf_usm_h%answs(:,ib), & 8580 surf_lsm_h(0)%answs(:,ib), surf_lsm_h(1)%answs(:,ib), & 8581 surf_usm_h(0)%answs(:,ib), surf_usm_h(1)%answs(:,ib), & 8571 8582 surf_def_v(0)%answs(:,ib), surf_def_v(1)%answs(:,ib), & 8572 8583 surf_def_v(2)%answs(:,ib), surf_def_v(3)%answs(:,ib), & … … 8578 8589 CALL diffusion_s( i, j, rs, surf_def_h(0)%amsws(:,icc), & 8579 8590 surf_def_h(1)%amsws(:,icc), surf_def_h(2)%amsws(:,icc), & 8580 surf_lsm_h%amsws(:,icc), surf_usm_h%amsws(:,icc), & 8591 surf_lsm_h(0)%amsws(:,icc), surf_lsm_h(1)%amsws(:,icc), & 8592 surf_usm_h(0)%amsws(:,icc), surf_usm_h(1)%amsws(:,icc), & 8581 8593 surf_def_v(0)%amsws(:,icc), surf_def_v(1)%amsws(:,icc), & 8582 8594 surf_def_v(2)%amsws(:,icc), surf_def_v(3)%amsws(:,icc), & … … 8588 8600 CALL diffusion_s( i, j, rs, surf_def_h(0)%gtsws(:,ib), & 8589 8601 surf_def_h(1)%gtsws(:,ib), surf_def_h(2)%gtsws(:,ib), & 8590 surf_lsm_h%gtsws(:,ib), surf_usm_h%gtsws(:,ib), & 8602 surf_lsm_h(0)%gtsws(:,ib), surf_lsm_h(1)%gtsws(:,ib), & 8603 surf_usm_h(0)%gtsws(:,ib), surf_usm_h(1)%gtsws(:,ib), & 8591 8604 surf_def_v(0)%gtsws(:,ib), surf_def_v(1)%gtsws(:,ib), & 8592 8605 surf_def_v(2)%gtsws(:,ib), surf_def_v(3)%gtsws(:,ib), & … … 8703 8716 CALL diffusion_s( rs, surf_def_h(0)%answs(:,ib), & 8704 8717 surf_def_h(1)%answs(:,ib), surf_def_h(2)%answs(:,ib), & 8705 surf_lsm_h%answs(:,ib), surf_usm_h%answs(:,ib), & 8718 surf_lsm_h(0)%answs(:,ib), surf_lsm_h(1)%answs(:,ib), & 8719 surf_usm_h(0)%answs(:,ib), surf_usm_h(1)%answs(:,ib), & 8706 8720 surf_def_v(0)%answs(:,ib), surf_def_v(1)%answs(:,ib), & 8707 8721 surf_def_v(2)%answs(:,ib), surf_def_v(3)%answs(:,ib), & … … 8713 8727 CALL diffusion_s( rs, surf_def_h(0)%amsws(:,icc), & 8714 8728 surf_def_h(1)%amsws(:,icc), surf_def_h(2)%amsws(:,icc), & 8715 surf_lsm_h%amsws(:,icc), surf_usm_h%amsws(:,icc), & 8729 surf_lsm_h(0)%amsws(:,icc), surf_lsm_h(1)%amsws(:,icc), & 8730 surf_usm_h(0)%amsws(:,icc), surf_usm_h(1)%amsws(:,icc), & 8716 8731 surf_def_v(0)%amsws(:,icc), surf_def_v(1)%amsws(:,icc), & 8717 8732 surf_def_v(2)%amsws(:,icc), surf_def_v(3)%amsws(:,icc), & … … 8723 8738 CALL diffusion_s( rs, surf_def_h(0)%gtsws(:,ib), & 8724 8739 surf_def_h(1)%gtsws(:,ib), surf_def_h(2)%gtsws(:,ib), & 8725 surf_lsm_h%gtsws(:,ib), surf_usm_h%gtsws(:,ib), & 8740 surf_lsm_h(0)%gtsws(:,ib), surf_lsm_h(1)%gtsws(:,ib), & 8741 surf_usm_h(0)%gtsws(:,ib), surf_usm_h(1)%gtsws(:,ib), & 8726 8742 surf_def_v(0)%gtsws(:,ib), surf_def_v(1)%gtsws(:,ib), & 8727 8743 surf_def_v(2)%gtsws(:,ib), surf_def_v(3)%gtsws(:,ib), & … … 9641 9657 ! 9642 9658 !-- Set fluxes normalised based on the street type on land surfaces 9643 CALL set_flux( surf_lsm_h , cc_i2m, aerosol_flux_mass_fracs_a, source_array )9659 CALL set_flux( surf_lsm_h(0), cc_i2m, aerosol_flux_mass_fracs_a, source_array ) 9644 9660 ENDIF 9645 9661 … … 9652 9668 surf_def_h(0)%answs = 0.0_wp 9653 9669 surf_def_h(0)%amsws = 0.0_wp 9654 surf_lsm_h %answs = 0.0_wp9655 surf_lsm_h %amsws = 0.0_wp9656 surf_usm_h %answs = 0.0_wp9657 surf_usm_h %amsws = 0.0_wp9670 surf_lsm_h(0)%answs = 0.0_wp 9671 surf_lsm_h(0)%amsws = 0.0_wp 9672 surf_usm_h(0)%answs = 0.0_wp 9673 surf_usm_h(0)%amsws = 0.0_wp 9658 9674 9659 9675 ! … … 10025 10041 aero_emission%mass_fracs(in,:), source_array ) 10026 10042 ELSE 10027 CALL set_flux( surf_usm_h , aero_emission_att%cc_in2mod,&10043 CALL set_flux( surf_usm_h(0), aero_emission_att%cc_in2mod, & 10028 10044 aero_emission%mass_fracs(in,:), source_array ) 10029 CALL set_flux( surf_lsm_h , aero_emission_att%cc_in2mod,&10045 CALL set_flux( surf_lsm_h(0), aero_emission_att%cc_in2mod, & 10030 10046 aero_emission%mass_fracs(in,:), source_array ) 10031 10047 ENDIF … … 10068 10084 aero_emission%mass_fracs(in,:), source_array ) 10069 10085 ELSE 10070 CALL set_flux( surf_usm_h , aero_emission_att%cc_in2mod,&10086 CALL set_flux( surf_usm_h(0), aero_emission_att%cc_in2mod, & 10071 10087 aero_emission%mass_fracs(in,:), source_array ) 10072 CALL set_flux( surf_lsm_h , aero_emission_att%cc_in2mod,&10088 CALL set_flux( surf_lsm_h(0), aero_emission_att%cc_in2mod, & 10073 10089 aero_emission%mass_fracs(in,:), source_array ) 10074 10090 ENDIF … … 10340 10356 !-- Reset surface fluxes 10341 10357 surf_def_h(0)%gtsws = 0.0_wp 10342 surf_lsm_h %gtsws = 0.0_wp10343 surf_usm_h %gtsws = 0.0_wp10358 surf_lsm_h(0)%gtsws = 0.0_wp 10359 surf_usm_h(0)%gtsws = 0.0_wp 10344 10360 10345 10361 #if defined( __netcdf ) … … 10534 10550 dum_var_3d, time_factor(in) ) 10535 10551 ELSE 10536 CALL set_gas_flux( surf_usm_h , emission_index_chem, chem_emission_att%units,&10552 CALL set_gas_flux( surf_usm_h(0), emission_index_chem, chem_emission_att%units, & 10537 10553 dum_var_3d, time_factor(in) ) 10538 CALL set_gas_flux( surf_lsm_h , emission_index_chem, chem_emission_att%units,&10554 CALL set_gas_flux( surf_lsm_h(0), emission_index_chem, chem_emission_att%units, & 10539 10555 dum_var_3d, time_factor(in) ) 10540 10556 ENDIF … … 10565 10581 dum_var_5d(1,1,:,:,:) ) 10566 10582 ELSE 10567 CALL set_gas_flux( surf_usm_h , emission_index_chem, chem_emission_att%units,&10583 CALL set_gas_flux( surf_usm_h(0), emission_index_chem, chem_emission_att%units, & 10568 10584 dum_var_5d(1,1,:,:,:) ) 10569 CALL set_gas_flux( surf_lsm_h , emission_index_chem, chem_emission_att%units,&10585 CALL set_gas_flux( surf_lsm_h(0), emission_index_chem, chem_emission_att%units, & 10570 10586 dum_var_5d(1,1,:,:,:) ) 10571 10587 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.