Changeset 2312 for trunk/LMDZ.MARS/libf/phymars/vdifc_mod.F
- Timestamp:
- May 6, 2020, 4:46:33 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/vdifc_mod.F
r2274 r2312 18 18 & igcm_dust_submicron, igcm_h2o_vap, 19 19 & igcm_h2o_ice, alpha_lift, 20 & igcm_hdo_vap, igcm_hdo_ice, 20 21 & igcm_stormdust_mass, igcm_stormdust_number 21 22 use surfdat_h, only: watercaptag, frost_albedo_threshold, dryness … … 24 25 use turb_mod, only: turb_resolved, ustar, tstar 25 26 use compute_dtau_mod, only: ti_injection_sol,tf_injection_sol 27 use hdo_surfex_mod, only: hdo_surfex 28 26 29 IMPLICIT NONE 27 30 … … 140 143 REAL qsat(ngrid) 141 144 145 REAL hdoflux(ngrid) ! value of vapour flux of HDO 146 REAL h2oflux(ngrid) ! value of vapour flux of H2O 147 REAL old_h2o_vap(ngrid) ! traceur d'eau avant traitement 148 142 149 REAL kmixmin 143 150 … … 167 174 168 175 REAL,INTENT(OUT) :: sensibFlux(ngrid) 176 177 !!MARGAUX 178 REAL DoH_vap(ngrid,nlay) 169 179 170 180 c ** un petit test de coherence … … 443 453 c donc les entrees sont /zcdv/ pour la condition a la limite sol 444 454 c et /zkv/ = Ku 445 455 446 456 zb(1:ngrid,2:nlay)=zkv(1:ngrid,2:nlay)*zb0(1:ngrid,2:nlay) 447 457 zb(1:ngrid,1)=zcdv(1:ngrid)*zb0(1:ngrid,1) … … 786 796 zb(1:ngrid,2:nlay)=zkh(1:ngrid,2:nlay)*zb0(1:ngrid,2:nlay) 787 797 788 if ((water).and.(iq.eq.igcm_h2o_vap)) then 798 if ((water).and.(iq.eq.igcm_h2o_vap)) then 789 799 c This line is required to account for turbulent transport 790 800 c from surface (e.g. ice) to mid-layer of atmosphere: … … 811 821 ENDDO 812 822 813 if (water.and.(iq.eq.igcm_h2o_ice)) then 823 if ( (water.and.(iq.eq.igcm_h2o_ice)) 824 $ .or. (hdo.and.(iq.eq.igcm_hdo_ice)) ) then 814 825 ! special case for water ice tracer: do not include 815 826 ! h2o ice tracer from surface (which is set when handling … … 821 832 $ zb(ig,2)*zc(ig,2)) *z1(ig) 822 833 ENDDO 834 else if (hdo.and.(iq.eq.igcm_hdo_vap)) then 835 CALL hdo_surfex(ngrid,nlay,nq,ptimestep, 836 & zt,zq,pqsurf, 837 & old_h2o_vap,pdqsdif,h2oflux, 838 & hdoflux) 839 DO ig=1,ngrid 840 z1(ig)=1./(za(ig,1)+zb(ig,1)+ 841 $ zb(ig,2)*(1.-zd(ig,2))) 842 zc(ig,1)=(za(ig,1)*zq(ig,1,iq)+ 843 $ zb(ig,2)*zc(ig,2) + 844 $ (-hdoflux(ig)) *ptimestep) *z1(ig) !tracer flux from surface 845 ENDDO 846 823 847 else ! general case 824 848 DO ig=1,ngrid … … 829 853 $ (-pdqsdif(ig,iq)) *ptimestep) *z1(ig) !tracer flux from surface 830 854 ENDDO 855 831 856 endif ! of if (water.and.(iq.eq.igcm_h2o_ice)) 832 857 … … 834 859 c Calculation for turbulent exchange with the surface (for ice) 835 860 DO ig=1,ngrid 861 old_h2o_vap(ig)=zq(ig,1,igcm_h2o_vap) 836 862 zd(ig,1)=zb(ig,1)*z1(ig) 837 863 zq1temp(ig)=zc(ig,1)+ zd(ig,1)*qsat(ig) … … 843 869 844 870 DO ig=1,ngrid 871 IF (hdo) then !if hdo, need to treat polar caps differently 872 h2oflux(ig) = pdqsdif(ig,igcm_h2o_ice) ! h2oflux is 873 ! uncorrected waterflux 874 ENDIF !hdo 875 845 876 if ((-pdqsdif(ig,igcm_h2o_ice)*ptimestep) 846 877 & .gt.(pqsurf(ig,igcm_h2o_ice))) then … … 857 888 & -pqsurf(ig,igcm_h2o_ice)/ptimestep 858 889 dwatercap_dif(ig) = 0.0 890 if (hdo) then 891 h2oflux(ig) = pdqsdif(ig,igcm_h2o_ice) 892 endif 859 893 860 894 endif … … 910 944 enddo ! of do iq=1,nq 911 945 end if ! of if(tracer) 912 946 947 C Diagnostic output for HDO 948 if (hdo) then 949 CALL WRITEDIAGFI(ngrid,'hdoflux', 950 & 'hdoflux', 951 & ' ',2,hdoflux) 952 CALL WRITEDIAGFI(ngrid,'h2oflux', 953 & 'h2oflux', 954 & ' ',2,h2oflux) 955 endif 913 956 914 957 c----------------------------------------------------------------------- … … 958 1001 END SUBROUTINE vdifc 959 1002 1003 c==================================== 1004 1005 960 1006 END MODULE vdifc_mod
Note: See TracChangeset
for help on using the changeset viewer.