- Timestamp:
- Mar 14, 2025, 9:20:21 PM (3 months ago)
- Location:
- LMDZ6/branches/contrails
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/contrails/DefLists/field_def_lmdz.xml
r5551 r5575 588 588 <field id="taur" long_name="momentum flux due to rain" unit="Pa" detect_missing_value=".true." /> 589 589 <field id="SSS" long_name="bulk sea-surface salinity" unit="ppt" detect_missing_value=".true." /> 590 <field id="issrfra100to150" long_name="Supersaturated fraction in the 100to150 hPa layer" unit="kg/kg" /> 591 <field id="issrfra150to200" long_name="Supersaturated fraction in the 150to200 hPa layer" unit="kg/kg" /> 592 <field id="issrfra200to250" long_name="Supersaturated fraction in the 200to250 hPa layer" unit="kg/kg" /> 593 <field id="issrfra250to300" long_name="Supersaturated fraction in the 250to300 hPa layer" unit="kg/kg" /> 594 <field id="issrfra300to400" long_name="Supersaturated fraction in the 300to400 hPa layer" unit="kg/kg" /> 595 <field id="issrfra400to500" long_name="Supersaturated fraction in the 400to500 hPa layer" unit="kg/kg" /> 590 596 <!-- Begin Added SN isotopes 2D fields 07 2023 --> 591 597 <!-- water oxygen H216O H217O H218O --> -
LMDZ6/branches/contrails/libf/phylmd/clesphys_mod_h.f90
r5536 r5575 44 44 , ok_lic_melt, ok_lic_cond, aer_type & 45 45 , iflag_rrtm, ok_strato, ok_hines, ok_qch4 & 46 , iflag_ice_thermo, ok_ice_supersat 46 , iflag_ice_thermo, ok_ice_supersat, ok_no_issr_strato & 47 47 , ok_plane_h2o, ok_plane_contrail & 48 48 , ok_gwd_rando, NSW, iflag_albedo & … … 141 141 LOGICAL :: ok_airs 142 142 INTEGER :: ip_ebil_phy, iflag_rrtm, iflag_ice_thermo, NSW, iflag_albedo 143 LOGICAL :: ok_ice_supersat, ok_plane_h2o, ok_plane_contrail 143 LOGICAL :: ok_ice_supersat, ok_no_issr_strato 144 LOGICAL :: ok_plane_h2o, ok_plane_contrail 144 145 LOGICAL :: ok_chlorophyll 145 146 LOGICAL :: ok_strato … … 201 202 !$OMP , ok_lic_melt, ok_lic_cond, aer_type & 202 203 !$OMP , iflag_rrtm, ok_strato, ok_hines, ok_qch4 & 203 !$OMP , iflag_ice_thermo, ok_ice_supersat 204 !$OMP , iflag_ice_thermo, ok_ice_supersat, ok_no_issr_strato & 204 205 !$OMP , ok_plane_h2o, ok_plane_contrail & 205 206 !$OMP , ok_gwd_rando, NSW, iflag_albedo & -
LMDZ6/branches/contrails/libf/phylmd/conf_phys_m.f90
r5536 r5575 172 172 INTEGER,SAVE :: iflag_clw_omp 173 173 INTEGER,SAVE :: iflag_ice_thermo_omp 174 LOGICAL,SAVE :: ok_ice_supersat_omp 174 LOGICAL,SAVE :: ok_ice_supersat_omp, ok_no_issr_strato_omp 175 175 LOGICAL,SAVE :: ok_plane_h2o_omp, ok_plane_contrail_omp 176 176 REAL,SAVE :: rad_froid_omp, rad_chau1_omp, rad_chau2_omp … … 1354 1354 CALL getin('ok_ice_supersat',ok_ice_supersat_omp) 1355 1355 1356 ! 1357 !Config Key = ok_no_issr_strato 1358 !Config Desc = deactivates ice supersaturation in the stratosphere 1359 !Config Def = .FALSE. 1360 !Config Help = 1361 ! 1362 ok_no_issr_strato_omp = .FALSE. 1363 CALL getin('ok_no_issr_strato',ok_no_issr_strato_omp) 1364 1356 1365 !Config Key = ok_plane_h2o 1357 1366 !Config Desc = include H2O emissions from aviation … … 2345 2354 iflag_ice_thermo = iflag_ice_thermo_omp 2346 2355 ok_ice_supersat = ok_ice_supersat_omp 2356 ok_no_issr_strato = ok_no_issr_strato_omp 2347 2357 ok_plane_h2o = ok_plane_h2o_omp 2348 2358 ok_plane_contrail = ok_plane_contrail_omp … … 2770 2780 WRITE(lunout,*) ' iflag_ice_thermo = ',iflag_ice_thermo 2771 2781 WRITE(lunout,*) ' ok_ice_supersat = ',ok_ice_supersat 2782 WRITE(lunout,*) ' ok_no_issr_strato = ',ok_no_issr_strato 2772 2783 WRITE(lunout,*) ' ok_plane_h2o = ',ok_plane_h2o 2773 2784 WRITE(lunout,*) ' ok_plane_contrail = ',ok_plane_contrail -
LMDZ6/branches/contrails/libf/phylmd/lmdz_aviation.f90
r5573 r5575 4 4 5 5 IMPLICIT NONE 6 7 ! Arrays for the lecture of aviation files 8 ! The allocation is done in the read_aviation module 9 ! The size is (klon, nleva, 1) where 10 ! nleva is the size of the vertical axis (read from file) 11 ! flight_dist_read is the number of km per second 12 ! flight_h2o_read is the water content added to the air 13 ! aviation_lev is the value of the levels 14 INTEGER, SAVE :: nleva ! Size of the vertical axis in the file 15 !$OMP THREADPRIVATE(nleva) 16 REAL, ALLOCATABLE, DIMENSION(:,:,:), SAVE, PRIVATE :: flight_dist_read ! Aviation distance flown within the mesh [m/s/mesh] 17 !$OMP THREADPRIVATE(flight_dist_read) 18 REAL, ALLOCATABLE, DIMENSION(:,:,:), SAVE, PRIVATE :: flight_h2o_read ! Aviation H2O emitted within the mesh [kgH2O/s/mesh] 19 !$OMP THREADPRIVATE(flight_h2o_read) 20 REAL, ALLOCATABLE, DIMENSION(:), SAVE, PRIVATE :: aviation_lev ! Pressure in the middle of the layers [Pa] 21 !$OMP THREADPRIVATE(aviation_lev) 6 22 7 23 CONTAINS … … 31 47 !--Dry density [kg/m3] 32 48 rho = pplay(i,k) / temp(i,k) / RD 33 !--Dry air mass [kg/m2]34 !rhodz = ( paprs(i,k) - paprs(i,k+1) ) / RG35 !--Cell thickness [m]36 !dz = rhodz / rho37 !--Cell dry air mass [kg]38 !M_cell = rhodz * cell_area(i)39 49 40 50 !--q is the specific humidity (kg/kg humid air) hence the complicated equation to update q … … 622 632 END FUNCTION contrail_cross_section_onera 623 633 624 SUBROUTINE read_aviation_emissions(klon, klev , flight_dist_read, flight_h2o_read, aviation_lev, nleva)634 SUBROUTINE read_aviation_emissions(klon, klev) 625 635 ! This subroutine allows to read the traffic density data read in the file aviation.nc 626 636 ! This file is defined in ./COMP/lmdz.card … … 634 644 IMPLICIT NONE 635 645 636 INTEGER, INTENT(IN) :: klon, klev ! number of horizontal grid points and vertical levels 637 INTEGER, INTENT(out) :: nleva ! Size of the vertical axis in the file 638 !REAL, DIMENSION(klon,klev), INTENT(OUT) :: flight_dist ! Aviation distance flown within the mesh [m/s/mesh] 639 !REAL, DIMENSION(klon,klev), INTENT(OUT) :: flight_h2o ! Aviation H2O emitted within the mesh [kgH2O/s/mesh] 640 REAL, ALLOCATABLE, INTENT(OUT) :: flight_dist_read(:,:,:) ! Aviation distance flown within the mesh [m/s/mesh] 641 REAL, ALLOCATABLE, INTENT(OUT) :: flight_h2o_read(:,:,:) ! Aviation H2O emitted within the mesh [kgH2O/s/mesh] 642 REAL, ALLOCATABLE, INTENT(OUT) :: aviation_lev(:) ! Pressure in the middle of the layers [Pa] 646 INTEGER, INTENT(IN) :: klon, klev ! number of horizontal grid points and vertical levels 643 647 644 648 !---------------------------------------------------- 645 649 ! Local variable 646 650 !---------------------------------------------------- 647 !REAL, DIMENSION(klon_mpi,klev,1) :: flight_dist_mpi648 651 REAL, ALLOCATABLE :: flight_dist_mpi(:,:,:) 649 652 INTEGER :: ierr 650 653 651 654 ! Get number of vertical levels and level values 652 CALL xios_get_axis_attr( "aviation_lev", n_glo=nleva ) 655 IF (is_omp_master) CALL xios_get_axis_attr( "aviation_lev", n_glo=nleva ) 656 CALL bcast_omp(nleva) 653 657 654 658 ! Allocation of arrays 655 !$OMP MASTER656 ALLOCATE(aviation_lev(nleva), STAT=ierr)657 IF (ierr /= 0) CALL abort_physic('read_aviation_emissions', 'problem to allocate aviation_lev',1)658 659 ALLOCATE(flight_dist_read(klon, nleva,1), STAT=ierr) 659 660 IF (ierr /= 0) CALL abort_physic('read_aviation_emissions', 'problem to allocate flight_dist',1) 660 661 ALLOCATE(flight_h2o_read(klon, nleva,1), STAT=ierr) 661 662 IF (ierr /= 0) CALL abort_physic('read_aviation_emissions', 'problem to allocate flight_h2o',1) 662 ALLOCATE(flight_dist_mpi(klon_mpi, nleva,1), STAT=ierr) 663 IF (ierr /= 0) CALL abort_physic('read_aviation_emissions', 'problem to allocate flight_dist_mpi',1) 664 !$OMP END MASTER 665 666 !$OMP BARRIER ! Ensure all threads wait until the arrays are allocated 667 668 !--Initialisation 669 aviation_lev(:) = 0. 670 flight_dist_read(:,:,1) = 0. 671 flight_h2o_read(:,:,1) = 0. 672 673 ! Get number of vertical levels and level values 674 CALL xios_get_axis_attr( "aviation_lev", value=aviation_lev(:)) 663 ALLOCATE(aviation_lev(nleva), STAT=ierr) 664 IF (ierr /= 0) CALL abort_physic('read_aviation_emissions', 'problem to allocate aviation_lev',1) 675 665 676 666 ! Read the data from the file 677 667 ! is_omp_master is necessary to make XIOS works 678 IF (is_omp_master) CALL xios_recv_field("KMFLOWN_interp", flight_dist_mpi(:,:,1)) 679 680 ! Propagate to other OMP threads: flight_dist_mpi(klon_mpi,klev) to flight_dist(klon,klev) 681 ! (klon_mpi,klon) = (200,50) avec 80 MPI, 4 OMP, nbp40 682 CALL scatter_omp(flight_dist_mpi(:,:,1), flight_dist_read(:,:,1)) 668 IF (is_omp_master) THEN 669 ALLOCATE(flight_dist_mpi(klon_mpi, nleva,1), STAT=ierr) 670 IF (ierr /= 0) CALL abort_physic('read_aviation_emissions', 'problem to allocate flight_dist_mpi',1) 671 CALL xios_recv_field("KMFLOWN_interp", flight_dist_mpi(:,:,1)) 672 ! Get number of vertical levels and level values 673 CALL xios_get_axis_attr( "aviation_lev", value=aviation_lev(:)) 674 ENDIF 675 676 ! Propagate to other OMP threads: flight_dist_mpi(klon_mpi,klev) to flight_dist(klon,klev) 677 ! (klon_mpi,klon) = (200,50) avec 80 MPI, 4 OMP, nbp40 678 CALL scatter_omp(flight_dist_mpi, flight_dist_read) 679 CALL bcast_omp(aviation_lev) 683 680 684 681 END SUBROUTINE read_aviation_emissions 685 682 686 SUBROUTINE vertical_interpolation_aviation(klon, klev, paprs, pplay, flight_dist_read, & 687 flight_h2o_read, aviation_lev, nleva, flight_dist, & 688 flight_h2o) 683 SUBROUTINE vertical_interpolation_aviation(klon, klev, paprs, pplay, temp, flight_dist, flight_h2o) 689 684 ! This subroutine performs the vertical interpolation from the read data in aviation.nc 690 685 ! where there are nleva vertical levels described in aviation_lev to the klev levels or … … 693 688 ! flight_h2o_read(klon,nleva) -> flight_h2o(klon, klev) 694 689 USE print_control_mod, ONLY: lunout 690 USE lmdz_lscp_ini, ONLY: RD, RG 691 695 692 IMPLICIT NONE 696 693 … … 698 695 REAL, INTENT(IN) :: paprs(klon, klev+1) ! inter-layer pressure [Pa] 699 696 REAL, INTENT(IN) :: pplay(klon, klev) ! mid-layer pressure [Pa] 700 INTEGER, INTENT(IN) :: nleva ! Size of the vertical axis in the file 701 REAL, INTENT(OUT) :: flight_dist(klon,klev,1) ! Aviation distance flown within the mesh [m/s/mesh] 702 REAL, INTENT(OUT) :: flight_h2o(klon,klev,1) ! Aviation H2O emitted within the mesh [kgH2O/s/mesh] 703 REAL, INTENT(IN) :: flight_dist_read(klon,nleva,1) ! Aviation distance flown within the mesh in file [m/s/mesh] 704 REAL, INTENT(IN) :: flight_h2o_read(klon,nleva,1) ! Aviation H2O emitted within the mesh in file [kgH2O/s/mesh] 705 REAL, INTENT(IN) :: aviation_lev(nleva) ! Pressure in the middle of the layers [Pa] 697 REAL, INTENT(IN) :: temp(klon, klev) ! temperature [K] 698 REAL, INTENT(OUT) :: flight_dist(klon,klev) ! Aviation distance flown within the mesh [m/s/mesh] 699 REAL, INTENT(OUT) :: flight_h2o(klon,klev) ! Aviation H2O emitted within the mesh [kgH2O/s/mesh] 706 700 707 701 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 713 707 REAL :: zfrac ! Fraction of layer kori in layer k 714 708 REAL :: width_read_layer(1:nleva) ! width of a given layer [ Pa ] 709 REAL :: rho, rhodz, dz 715 710 716 711 ! Initialisation 717 flight_dist(:,: ,1) = 0.718 flight_h2o(:,: ,1) = 0.712 flight_dist(:,:) = 0. 713 flight_h2o(:,:) = 0. 719 714 720 715 ! Compute the array with the vertical interface … … 751 746 752 747 ! Vertical reprojection for each desired array 753 flight_dist(i,k ,1) = flight_dist(i,k,1) + zfrac * flight_dist_read(i,kori,1)754 flight_h2o(i,k ,1) = flight_h2o(i,k,1) + zfrac * flight_h2o(i,kori,1)748 flight_dist(i,k) = flight_dist(i,k) + zfrac * flight_dist_read(i,kori,1) 749 flight_h2o(i,k) = flight_h2o(i,k) + zfrac * flight_h2o_read(i,kori,1) 755 750 ENDDO 751 752 !--Dry density [kg/m3] 753 rho = pplay(i,k) / temp(i,k) / RD 754 !--Dry air mass [kg/m2] 755 rhodz = ( paprs(i,k) - paprs(i,k+1) ) / RG 756 !--Cell thickness [m] 757 dz = rhodz / rho 758 759 !--Normalisation with the cell thickness 760 flight_dist(i,k) = flight_dist(i,k) / dz 761 flight_h2o(i,k) = flight_h2o(i,k) / dz 756 762 ENDDO 757 763 ENDDO -
LMDZ6/branches/contrails/libf/phylmd/lmdz_lscp.f90
r5573 r5575 18 18 iflag_ice_thermo, distcltop, temp_cltop, & 19 19 tke, tke_dissip, & 20 cell_area, 20 cell_area, stratomask, & 21 21 cf_seri, rvc_seri, u_seri, v_seri, & 22 22 qsub, qissr, qcld, subfra, issrfra, gamma_cond, & … … 25 25 dqvc_sub, dqvc_con, dqvc_mix, qsatl, qsati, & 26 26 rcont_seri, flight_dist, flight_h2o, & 27 flight_dist_read, flight_h2o_read, & 28 aviation_lev, nleva, contfra, Tcritcont, qcritcont,& 27 contfra, Tcritcont, qcritcont, & 29 28 potcontfraP, potcontfraNP, dcontfra_cir, dcf_avi, & 30 29 dqi_avi, dqvc_avi, cloudth_sth,cloudth_senv, & … … 124 123 USE lmdz_lscp_ini, ONLY : ok_plane_contrail 125 124 126 ! aviation module127 USE mod_phys_lmdz_para, ONLY : is_omp_master128 USE lmdz_aviation, ONLY : vertical_interpolation_aviation125 ! Temporary call for Lamquin et al (2012) diagnostics 126 USE phys_local_var_mod, ONLY : issrfra100to150, issrfra150to200, issrfra200to250 127 USE phys_local_var_mod, ONLY : issrfra250to300, issrfra300to400, issrfra400to500 129 128 130 129 IMPLICIT NONE … … 177 176 REAL, DIMENSION(klon,klev), INTENT(IN) :: v_seri ! northward wind [m/s] 178 177 REAL, DIMENSION(klon), INTENT(IN) :: cell_area ! area of each cell [m2] 178 REAL, DIMENSION(klon,klev), INTENT(IN) :: stratomask ! fraction of stratosphere (0 or 1) 179 179 180 180 ! INPUT/OUTPUT aviation 181 181 !-------------------------------------------------- 182 182 REAL, DIMENSION(klon,klev), INTENT(INOUT):: rcont_seri ! ratio of contrails fraction to total cloud fraction [-] 183 REAL, DIMENSION(klon,klev,1), INTENT(OUT) :: flight_dist ! aviation distance flown within the mesh [m/s/mesh] 184 REAL, DIMENSION(klon,klev,1), INTENT(OUT) :: flight_h2o ! aviation H2O emitted within the mesh [kgH2O/s/mesh] 185 ! Read from file - nleva vertical levels - define in state_var 186 INTEGER, INTENT(IN) :: nleva 187 REAL, DIMENSION(nleva), INTENT(IN) :: aviation_lev ! vertical levels [km] 188 REAL, DIMENSION(klon,nleva,1), INTENT(IN) :: flight_dist_read ! aviation distance flown within the mesh [m/s/mesh] 189 REAL, DIMENSION(klon,nleva,1), INTENT(IN) :: flight_h2o_read ! aviation H2O emitted within the mesh [kgH2O/s/mesh] 183 REAL, DIMENSION(klon,klev), INTENT(IN) :: flight_dist ! aviation distance flown within the mesh [m/s/mesh] 184 REAL, DIMENSION(klon,klev), INTENT(IN) :: flight_h2o ! aviation H2O emitted within the mesh [kgH2O/s/mesh] 190 185 191 186 ! OUTPUT variables … … 331 326 ! dyn3d_common/infotrac.F90 332 327 REAL :: min_qParent, min_ratio 328 !--for Lamquin et al 2012 diagnostics 329 REAL, DIMENSION(klon) :: issrfra100to150UP, issrfra150to200UP, issrfra200to250UP 330 REAL, DIMENSION(klon) :: issrfra250to300UP, issrfra300to400UP, issrfra400to500UP 333 331 334 332 INTEGER i, k, kk, iter … … 442 440 min_ratio = 1.e-16 443 441 442 !--for Lamquin et al (2012) diagnostics 443 issrfra100to150(:) = 0. 444 issrfra100to150UP(:) = 0. 445 issrfra150to200(:) = 0. 446 issrfra150to200UP(:) = 0. 447 issrfra200to250(:) = 0. 448 issrfra200to250UP(:) = 0. 449 issrfra250to300(:) = 0. 450 issrfra250to300UP(:) = 0. 451 issrfra300to400(:) = 0. 452 issrfra300to400UP(:) = 0. 453 issrfra400to500(:) = 0. 454 issrfra400to500UP(:) = 0. 455 444 456 !-- poprecip 445 457 qraindiag(:,:)= 0. … … 462 474 463 475 !c_iso: variable initialisation for iso 464 465 IF ( ok_plane_contrail ) THEN466 ! Vertical interpolation is done at each physical timestep467 !468 IF (is_omp_master) CALL vertical_interpolation_aviation(klon, klev, paprs, pplay, flight_dist_read, &469 flight_h2o_read, aviation_lev, nleva, flight_dist, flight_h2o)470 ENDIF471 476 472 477 !=============================================================================== … … 742 747 pplay(:,k), paprs(:,k), paprs(:,k+1), & 743 748 cf_seri(:,k), rvc_seri(:,k), ql_seri(:,k), qi_seri(:,k), & 744 shear, tke_dissip(:,k), cell_area, &749 shear, tke_dissip(:,k), cell_area, stratomask(:,k), & 745 750 Tbef, zq, zqs, gammasat, ratqs(:,k), keepgoing, & 746 751 rneb(:,k), zqn, qvc, issrfra(:,k), qissr(:,k), & … … 748 753 dqi_adj(:,k), dqi_sub(:,k), dqi_con(:,k), dqi_mix(:,k), & 749 754 dqvc_adj(:,k), dqvc_sub(:,k), dqvc_con(:,k), dqvc_mix(:,k), & 750 rcont_seri(:,k), flight_dist(:,k ,1), flight_h2o(:,k,1), contfra(:,k), &755 rcont_seri(:,k), flight_dist(:,k), flight_h2o(:,k), contfra(:,k), & 751 756 Tcritcont(:,k), qcritcont(:,k), potcontfraP(:,k), potcontfraNP(:,k), & 752 757 dcontfra_cir(:,k), dcf_avi(:,k), dqi_avi(:,k), dqvc_avi(:,k)) … … 1109 1114 qsub(i,k) = zq(i) - qvc(i) - qissr(i,k) 1110 1115 qcld(i,k) = qvc(i) + zoliq(i) 1116 1117 !--Calculation of the ice supersaturated fraction following Lamquin et al (2012) 1118 !--methodology: in each layer, we make a maximum random overlap assumption for 1119 !--ice supersaturation 1120 IF ( ( paprs(i,k) .GT. 10000. ) .AND. ( paprs(i,k) .LE. 15000. ) ) THEN 1121 IF ( issrfra100to150UP(i) .GT. ( 1. - eps ) ) THEN 1122 issrfra100to150(i) = 1. 1123 ELSE 1124 issrfra100to150(i) = 1. - ( 1. - issrfra100to150(i) ) * & 1125 ( 1. - MAX( issrfra(i,k), issrfra100to150UP(i) ) ) & 1126 / ( 1. - issrfra100to150UP(i) ) 1127 issrfra100to150UP(i) = issrfra(i,k) 1128 ENDIF 1129 ELSEIF ( ( paprs(i,k) .GT. 15000. ) .AND. ( paprs(i,k) .LE. 20000. ) ) THEN 1130 IF ( issrfra150to200UP(i) .GT. ( 1. - eps ) ) THEN 1131 issrfra150to200(i) = 1. 1132 ELSE 1133 issrfra150to200(i) = 1. - ( 1. - issrfra150to200(i) ) * & 1134 ( 1. - MAX( issrfra(i,k), issrfra150to200UP(i) ) ) & 1135 / ( 1. - issrfra150to200UP(i) ) 1136 issrfra150to200UP(i) = issrfra(i,k) 1137 ENDIF 1138 ELSEIF ( ( paprs(i,k) .GT. 20000. ) .AND. ( paprs(i,k) .LE. 25000. ) ) THEN 1139 IF ( issrfra200to250UP(i) .GT. ( 1. - eps ) ) THEN 1140 issrfra200to250(i) = 1. 1141 ELSE 1142 issrfra200to250(i) = 1. - ( 1. - issrfra200to250(i) ) * & 1143 ( 1. - MAX( issrfra(i,k), issrfra200to250UP(i) ) ) & 1144 / ( 1. - issrfra200to250UP(i) ) 1145 issrfra200to250UP(i) = issrfra(i,k) 1146 ENDIF 1147 ELSEIF ( ( paprs(i,k) .GT. 25000. ) .AND. ( paprs(i,k) .LE. 30000. ) ) THEN 1148 IF ( issrfra250to300UP(i) .GT. ( 1. - eps ) ) THEN 1149 issrfra250to300(i) = 1. 1150 ELSE 1151 issrfra250to300(i) = 1. - ( 1. - issrfra250to300(i) ) * & 1152 ( 1. - MAX( issrfra(i,k), issrfra250to300UP(i) ) ) & 1153 / ( 1. - issrfra250to300UP(i) ) 1154 issrfra250to300UP(i) = issrfra(i,k) 1155 ENDIF 1156 ELSEIF ( ( paprs(i,k) .GT. 30000. ) .AND. ( paprs(i,k) .LE. 40000. ) ) THEN 1157 IF ( issrfra300to400UP(i) .GT. ( 1. - eps ) ) THEN 1158 issrfra300to400(i) = 1. 1159 ELSE 1160 issrfra300to400(i) = 1. - ( 1. - issrfra300to400(i) ) * & 1161 ( 1. - MAX( issrfra(i,k), issrfra300to400UP(i) ) ) & 1162 / ( 1. - issrfra300to400UP(i) ) 1163 issrfra300to400UP(i) = issrfra(i,k) 1164 ENDIF 1165 ELSEIF ( ( paprs(i,k) .GT. 40000. ) .AND. ( paprs(i,k) .LE. 50000. ) ) THEN 1166 IF ( issrfra400to500UP(i) .GT. ( 1. - eps ) ) THEN 1167 issrfra400to500(i) = 1. 1168 ELSE 1169 issrfra400to500(i) = 1. - ( 1. - issrfra400to500(i) ) * & 1170 ( 1. - MAX( issrfra(i,k), issrfra400to500UP(i) ) ) & 1171 / ( 1. - issrfra400to500UP(i) ) 1172 issrfra400to500UP(i) = issrfra(i,k) 1173 ENDIF 1174 ENDIF 1175 1111 1176 ENDDO 1112 1177 ENDIF -
LMDZ6/branches/contrails/libf/phylmd/lmdz_lscp_condensation.f90
r5551 r5575 95 95 SUBROUTINE condensation_ice_supersat( & 96 96 klon, dtime, missing_val, pplay, paprsdn, paprsup, & 97 cf_seri, rvc_seri, ql_seri, qi_seri, shear, pbl_eps, cell_area, &97 cf_seri, rvc_seri, ql_seri, qi_seri, shear, pbl_eps, cell_area, stratomask, & 98 98 temp, qtot, qsat, gamma_cond, ratqs, keepgoing, & 99 99 cldfra, qincld, qvc, issrfra, qissr, dcf_sub, dcf_con, dcf_mix, & … … 120 120 USE lmdz_lscp_ini, ONLY: eps, temp_nowater, ok_weibull_warm_clouds 121 121 USE lmdz_lscp_ini, ONLY: ok_unadjusted_clouds, iflag_cloud_sublim_pdf 122 USE lmdz_lscp_ini, ONLY: ok_plane_contrail 122 USE lmdz_lscp_ini, ONLY: ok_plane_contrail, ok_no_issr_strato 123 123 124 124 USE lmdz_lscp_ini, ONLY: depo_coef_cirrus, capa_cond_cirrus, std_subl_pdf_lscp, & … … 148 148 REAL, INTENT(IN) , DIMENSION(klon) :: pbl_eps ! TKE dissipation [m2/s3] 149 149 REAL, INTENT(IN) , DIMENSION(klon) :: cell_area ! cell area [m2] 150 REAL, INTENT(IN) , DIMENSION(klon) :: stratomask ! fraction of stratosphere in the mesh (1 or 0) 150 151 REAL, INTENT(IN) , DIMENSION(klon) :: temp ! temperature [K] 151 152 REAL, INTENT(IN) , DIMENSION(klon) :: qtot ! total specific humidity (without precip) [kg/kg] … … 266 267 !--If ok_weibull_warm_clouds = .TRUE., the Weibull law is used for 267 268 !--all clouds, and the lognormal scheme is not activated 268 IF ( ( temp(i) .GT. temp_nowater ) .AND. .NOT. ok_weibull_warm_clouds ) THEN 269 IF ( ( ( temp(i) .GT. temp_nowater ) .AND. .NOT. ok_weibull_warm_clouds ) .OR. & 270 ( ok_no_issr_strato .AND. ( stratomask(i) .EQ. 1. ) ) ) THEN 269 271 270 272 pdf_std = ratqs(i) * qtot(i) -
LMDZ6/branches/contrails/libf/phylmd/lmdz_lscp_ini.f90
r5453 r5575 150 150 !$OMP THREADPRIVATE(ok_ice_supersat) 151 151 152 LOGICAL, SAVE, PROTECTED :: ok_no_issr_strato=.FALSE. ! deactivates the ice supersaturation scheme in the stratosphere 153 !$OMP THREADPRIVATE(ok_no_issr_strato) 154 152 155 LOGICAL, SAVE, PROTECTED :: ok_unadjusted_clouds=.FALSE. ! if True, relax the saturation adjustment assumption for ice clouds 153 156 !$OMP THREADPRIVATE(ok_unadjusted_clouds) … … 339 342 CONTAINS 340 343 341 SUBROUTINE lscp_ini(dtime, lunout_in, prt_level_in, ok_ice_supersat_in, ok_plane_contrail_in, & 344 SUBROUTINE lscp_ini(dtime, lunout_in, prt_level_in, ok_ice_supersat_in, & 345 ok_no_issr_strato_in, ok_plane_contrail_in, & 342 346 iflag_ratqs, fl_cor_ebil_in, & 343 347 RCPD_in, RLSTT_in, RLVTT_in, RLMLT_in, RVTMP2_in, & … … 350 354 REAL, INTENT(IN) :: dtime 351 355 INTEGER, INTENT(IN) :: lunout_in,prt_level_in,iflag_ratqs,fl_cor_ebil_in 352 LOGICAL, INTENT(IN) :: ok_ice_supersat_in, ok_ plane_contrail_in356 LOGICAL, INTENT(IN) :: ok_ice_supersat_in, ok_no_issr_strato_in, ok_plane_contrail_in 353 357 354 358 REAL, INTENT(IN) :: RCPD_in, RLSTT_in, RLVTT_in, RLMLT_in … … 363 367 364 368 ok_ice_supersat=ok_ice_supersat_in 369 ok_no_issr_strato=ok_no_issr_strato_in 365 370 ok_plane_contrail=ok_plane_contrail_in 366 371 -
LMDZ6/branches/contrails/libf/phylmd/phys_local_var_mod.F90
r5536 r5575 663 663 REAL, SAVE, ALLOCATABLE :: qsatliq(:,:), qsatice(:,:) 664 664 !$OMP THREADPRIVATE(qsatliq, qsatice) 665 REAL, SAVE, ALLOCATABLE :: issrfra100to150(:), issrfra150to200(:), issrfra200to250(:) 666 !$OMP THREADPRIVATE(issrfra100to150, issrfra150to200, issrfra200to250) 667 REAL, SAVE, ALLOCATABLE :: issrfra250to300(:), issrfra300to400(:), issrfra400to500(:) 668 !$OMP THREADPRIVATE(issrfra250to300, issrfra300to400, issrfra400to500) 665 669 666 670 !-- LSCP - aviation and contrails variables … … 1217 1221 ALLOCATE(dqvc_adj(klon,klev), dqvc_sub(klon,klev), dqvc_con(klon,klev), dqvc_mix(klon,klev)) 1218 1222 ALLOCATE(qsatliq(klon,klev), qsatice(klon,klev)) 1223 ALLOCATE(issrfra100to150(klon), issrfra150to200(klon), issrfra200to250(klon)) 1224 ALLOCATE(issrfra250to300(klon), issrfra300to400(klon), issrfra400to500(klon)) 1219 1225 1220 1226 !-- LSCP - aviation and contrails variables … … 1625 1631 DEALLOCATE(dqvc_adj, dqvc_sub, dqvc_con, dqvc_mix) 1626 1632 DEALLOCATE(qsatliq, qsatice) 1633 DEALLOCATE(issrfra100to150, issrfra150to200, issrfra200to250) 1634 DEALLOCATE(issrfra250to300, issrfra300to400, issrfra400to500) 1627 1635 1628 1636 !-- LSCP - aviation and contrails variables -
LMDZ6/branches/contrails/libf/phylmd/phys_output_ctrlout_mod.F90
r5573 r5575 2166 2166 TYPE(ctrl_out), SAVE :: o_qsati = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 2167 2167 'qsati', 'Saturation with respect to ice', 'kg/kg', (/ ('', i=1, 10) /)) 2168 TYPE(ctrl_out), SAVE :: o_issrfra100to150 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 2169 'issrfra100to150', 'Supersaturated fraction in the 100to150 hPa layer', '-', (/ ('', i=1, 10) /)) 2170 TYPE(ctrl_out), SAVE :: o_issrfra150to200 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 2171 'issrfra150to200', 'Supersaturated fraction in the 150to200 hPa layer', '-', (/ ('', i=1, 10) /)) 2172 TYPE(ctrl_out), SAVE :: o_issrfra200to250 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 2173 'issrfra200to250', 'Supersaturated fraction in the 200to250 hPa layer', '-', (/ ('', i=1, 10) /)) 2174 TYPE(ctrl_out), SAVE :: o_issrfra250to300 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 2175 'issrfra250to300', 'Supersaturated fraction in the 250to300 hPa layer', '-', (/ ('', i=1, 10) /)) 2176 TYPE(ctrl_out), SAVE :: o_issrfra300to400 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 2177 'issrfra300to400', 'Supersaturated fraction in the 300to400 hPa layer', '-', (/ ('', i=1, 10) /)) 2178 TYPE(ctrl_out), SAVE :: o_issrfra400to500 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 2179 'issrfra400to500', 'Supersaturated fraction in the 400to500 hPa layer', '-', (/ ('', i=1, 10) /)) 2168 2180 2169 2181 !-- LSCP - aviation variables -
LMDZ6/branches/contrails/libf/phylmd/phys_output_write_mod.F90
r5536 r5575 225 225 o_dcfsub, o_dcfcon, o_dcfmix, o_dqiadj, o_dqisub, o_dqicon, o_dqimix, & 226 226 o_dqvcadj, o_dqvcsub, o_dqvccon, o_dqvcmix, o_qsatl, o_qsati, & 227 o_issrfra100to150, o_issrfra150to200, o_issrfra200to250, & 228 o_issrfra250to300, o_issrfra300to400, o_issrfra400to500, & 227 229 !-- LSCP - aviation variables 228 230 o_rcontseri, o_drcontdyn, o_dqavi, o_contfra, & … … 350 352 dqvc_adj, dqvc_sub, dqvc_con, dqvc_mix, & 351 353 qsatliq, qsatice, & 354 issrfra100to150, issrfra150to200, issrfra200to250, & 355 issrfra250to300, issrfra300to400, issrfra400to500, & 352 356 rcont_seri, d_rcont_dyn, d_q_avi, contfra, & 353 357 Tcritcont, qcritcont, potcontfraP, potcontfraNP, & … … 2122 2126 CALL histwrite_phy(o_qsatl, qsatliq) 2123 2127 CALL histwrite_phy(o_qsati, qsatice) 2128 CALL histwrite_phy(o_issrfra100to150, issrfra100to150) 2129 CALL histwrite_phy(o_issrfra150to200, issrfra150to200) 2130 CALL histwrite_phy(o_issrfra200to250, issrfra200to250) 2131 CALL histwrite_phy(o_issrfra250to300, issrfra250to300) 2132 CALL histwrite_phy(o_issrfra300to400, issrfra300to400) 2133 CALL histwrite_phy(o_issrfra400to500, issrfra400to500) 2124 2134 ENDIF 2125 2135 !-- LSCP - aviation variables -
LMDZ6/branches/contrails/libf/phylmd/phys_state_var_mod.F90
r5573 r5575 528 528 !$OMP THREADPRIVATE(delta_sal, ds_ns, dt_ns, delta_sst, dter, dser, dt_ds) 529 529 530 ! Arrays for the lecture of aviation files531 ! The allocation is done in the read_aviation module532 ! The size is (klon, nleva, 1) where533 ! nleva is the size of the vertical axis (read from file)534 ! flight_dist_read is the number of km per second535 ! flight_h2o_read is the water content added to the air536 ! aviation_lev is the value of the levels537 REAL, SAVE, ALLOCATABLE :: flight_dist_read(:,:,:), flight_h2o_read(:,:,:)538 REAL, SAVE, ALLOCATABLE :: aviation_lev(:)539 !$OMP THREADPRIVATE(flight_dist_read, flight_h2o_read, aviation_lev)540 INTEGER, SAVE :: nleva541 !$OMP THREADPRIVATE(nleva)542 543 530 544 531 CONTAINS … … 956 943 DEALLOCATE(ratqs_inter_,sigma_qtherm) 957 944 958 ! DEALLOCATE aviation arrays959 DEALLOCATE(flight_dist_read, flight_h2o_read, aviation_lev)960 961 945 if (activate_ocean_skin >= 1) then 962 946 deALLOCATE(delta_sal, ds_ns, dt_ns, delta_sst, dter, dser) -
LMDZ6/branches/contrails/libf/phylmd/physiq_mod.F90
r5573 r5575 75 75 USE write_field_phy 76 76 use wxios_mod, ONLY: g_ctx, wxios_set_context 77 USE lmdz_aviation, ONLY : read_aviation_emissions, aviation_water_emissions 77 USE lmdz_aviation, ONLY : read_aviation_emissions, aviation_water_emissions, vertical_interpolation_aviation 78 78 USE lmdz_lscp, ONLY : lscp 79 79 USE lmdz_call_cloud_optics_prop, ONLY : call_cloud_optics_prop … … 331 331 contfra, Tcritcont, qcritcont, potcontfraP, potcontfraNP, & 332 332 dcontfra_cir, dcf_avi, dqi_avi, dqvc_avi, & 333 ! 334 stratomask, & 333 335 ! 334 336 cldemi, & … … 1853 1855 & RG,RD,RCPD,RKAPPA,RLVTT,RETV) 1854 1856 CALL ratqs_ini(klon,klev,iflag_thermals,lunout,nbsrf,is_lic,is_ter,RG,RV,RD,RCPD,RLSTT,RLVTT,RTT) 1855 CALL lscp_ini(pdtphys,lunout,prt_level,ok_ice_supersat, &1857 CALL lscp_ini(pdtphys,lunout,prt_level,ok_ice_supersat,ok_no_issr_strato,& 1856 1858 ok_plane_contrail,iflag_ratqs,fl_cor_ebil, & 1857 1859 RCPD,RLSTT,RLVTT,RLMLT,RVTMP2,RTT,RD,RV,RG,RPI,EPS_W) … … 2123 2125 2124 2126 !--Read the aviation emissions 2125 IF ( ok_plane_h2o .OR. ok_plane_contrail ) THEN 2126 CALL read_aviation_emissions(klon, klev, flight_dist_read, flight_h2o_read, & 2127 aviation_lev, nleva) 2128 ENDIF 2127 IF ( ok_plane_h2o .OR. ok_plane_contrail ) CALL read_aviation_emissions(klon, klev) 2129 2128 ! 2130 2129 ! Now we activate some double radiation call flags only if some … … 3892 3891 3893 3892 IF (ok_new_lscp) THEN 3894 3893 3894 IF (ok_no_issr_strato) CALL stratosphere_mask(missing_val, pphis, t_seri, pplay, latitude_deg) 3895 ! Vertical interpolation is done at each physical timestep 3896 IF (ok_plane_contrail) CALL vertical_interpolation_aviation(klon, klev, paprs, pplay, t_seri, flight_dist, flight_h2o) 3897 3895 3898 DO k = 1, klev 3896 3899 DO i = 1, klon … … 3910 3913 iflag_ice_thermo, distcltop, temp_cltop, & 3911 3914 pbl_tke(:,:,is_ave), pbl_eps(:,:,is_ave), & 3912 cell_area, &3915 cell_area, stratomask, & 3913 3916 cf_seri, rvc_seri, u_seri, v_seri, & 3914 3917 qsub, qissr, qcld, subfra, issrfra, gamma_cond, & 3915 3918 dcf_sub, dcf_con, dcf_mix, dqi_adj, dqi_sub, dqi_con, dqi_mix, & 3916 3919 dqvc_adj, dqvc_sub, dqvc_con, dqvc_mix, qsatliq, qsatice, & 3917 rcont_seri, flight_dist, flight_h2o, flight_dist_read, flight_h2o_read,&3918 aviation_lev, nleva,contfra, Tcritcont, qcritcont, potcontfraP, &3920 rcont_seri, flight_dist, flight_h2o, & 3921 contfra, Tcritcont, qcritcont, potcontfraP, & 3919 3922 potcontfraNP, dcontfra_cir, dcf_avi, dqi_avi, dqvc_avi, & 3920 3923 cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv, &
Note: See TracChangeset
for help on using the changeset viewer.