Changeset 2427
- Timestamp:
- Nov 3, 2020, 4:45:09 PM (4 years ago)
- Location:
- trunk/LMDZ.GENERIC
- Files:
-
- 2 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/README
r2422 r2427 1596 1596 File format have one and only one header line. 1597 1597 With this option you also need to specify in "callphys.def" "tstellar==..." 1598 1599 == 03/11/2020 == EM + YJ 1600 Bug fix on call arguments sent from physiq to vdifc (probably not as bad as 1601 it sounds, as turbdiff is usually used instead of vdifc). 1602 In the process turned vdifc into a module, as well as turbdiff, 1603 for better control, and removed unused arguments. -
trunk/LMDZ.GENERIC/libf/phystd/physiq_mod.F90
r2300 r2427 52 52 use phys_state_var_mod 53 53 use callcorrk_mod, only: callcorrk 54 use vdifc_mod, only: vdifc 55 use turbdiff_mod, only: turbdiff 54 56 use turb_mod, only : q2,sensibFlux,turb_resolved 55 57 #ifndef MESOSCALE … … 1038 1040 1039 1041 call turbdiff(ngrid,nlayer,nq,rnat, & 1040 ptimestep,capcal, lwrite,&1042 ptimestep,capcal, & 1041 1043 pplay,pplev,zzlay,zzlev,z0, & 1042 1044 pu,pv,pt,zpopsk,pq,tsurf,emis,qsurf, & … … 1044 1046 zdudif,zdvdif,zdtdif,zdtsdif, & 1045 1047 sensibFlux,q2,zdqdif,zdqevap,zdqsdif, & 1046 taux,tauy ,lastcall)1048 taux,tauy) 1047 1049 1048 1050 else … … 1056 1058 zdh,pdq,zflubid, & 1057 1059 zdudif,zdvdif,zdhdif,zdtsdif, & 1058 sensibFlux,q2,zdqdif,zdqsdif, & 1059 taux,tauy,lastcall) 1060 sensibFlux,q2,zdqdif,zdqsdif) 1060 1061 1061 1062 zdtdif(1:ngrid,1:nlayer)=zdhdif(1:ngrid,1:nlayer)*zpopsk(1:ngrid,1:nlayer) ! for diagnostic only -
trunk/LMDZ.GENERIC/libf/phystd/turbdiff_mod.F90
r2425 r2427 1 module turbdiff_mod 2 3 implicit none 4 5 contains 6 1 7 subroutine turbdiff(ngrid,nlay,nq,rnat, & 2 ptimestep,pcapcal, lecrit,&8 ptimestep,pcapcal, & 3 9 pplay,pplev,pzlay,pzlev,pz0, & 4 10 pu,pv,pt,ppopsk,pq,ptsrf,pemis,pqsurf, & 5 11 pdtfi,pdqfi,pfluxsrf, & 6 12 Pdudif,pdvdif,pdtdif,pdtsrf,sensibFlux,pq2, & 7 pdqdif,pdqevap,pdqsdif,flux_u,flux_v ,lastcall)13 pdqdif,pdqevap,pdqsdif,flux_u,flux_v) 8 14 9 15 use watercommon_h, only : RLVTT, T_h2O_ice_liq, RCPD, mx_eau_sol,Psat_water, Lcpdqsat_water … … 67 73 REAL,INTENT(OUT) :: flux_u(ngrid),flux_v(ngrid) 68 74 REAL,INTENT(IN) :: rnat(ngrid) 69 LOGICAL,INTENT(IN) :: lastcall ! not used 70 71 ! Arguments added for condensation 72 logical,intent(in) :: lecrit ! not used. 75 73 76 REAL,INTENT(IN) :: pz0 74 77 … … 734 737 endif 735 738 736 ! if(lastcall)then 737 ! if(ngrid.eq.1)then 738 ! print*,'Saving k.out...' 739 ! OPEN(12,file='k.out',form='formatted') 740 ! DO ilay=1,nlay 741 ! write(12,*) zkh(1,ilay), pplay(1,ilay) 742 ! ENDDO 743 ! CLOSE(12) 744 ! endif 745 ! endif 746 747 end 739 end subroutine turbdiff 740 741 end module turbdiff_mod -
trunk/LMDZ.GENERIC/libf/phystd/vdifc_mod.F
r2425 r2427 1 module vdifc_mod 2 3 implicit none 4 5 contains 6 1 7 subroutine vdifc(ngrid,nlay,nq,rnat,ppopsk, 2 8 & ptimestep,pcapcal,lecrit, … … 5 11 & pdhfi,pdqfi,pfluxsrf, 6 12 & pdudif,pdvdif,pdhdif,pdtsrf,sensibFlux,pq2, 7 & pdqdif,pdqsdif ,lastcall)13 & pdqdif,pdqsdif) 8 14 9 15 use watercommon_h, only : RLVTT, T_h2O_ice_liq, RCPD, mx_eau_sol 10 16 & ,Psat_water, Lcpdqsat_water 11 17 use radcommon_h, only : sigma 12 USE surfdat_h13 USE tracer_h18 use surfdat_h, only: dryness 19 use tracer_h, only: igcm_h2o_vap, igcm_h2o_ice 14 20 use comcstfi_mod, only: g, r, cpp, rcp 15 21 use callkeys_mod, only: water,tracer,nosurf … … 43 49 ! arguments 44 50 ! --------- 45 INTEGER ngrid,nlay 46 REAL ptimestep 47 REAL pplay(ngrid,nlay),pplev(ngrid,nlay+1) 48 REAL pzlay(ngrid,nlay),pzlev(ngrid,nlay+1) 49 REAL pu(ngrid,nlay),pv(ngrid,nlay),ph(ngrid,nlay) 50 REAL ptsrf(ngrid),pemis(ngrid) 51 REAL pdhfi(ngrid,nlay) 52 REAL pfluxsrf(ngrid) 53 REAL pdudif(ngrid,nlay),pdvdif(ngrid,nlay),pdhdif(ngrid,nlay) 54 REAL pdtsrf(ngrid),sensibFlux(ngrid),pcapcal(ngrid) 55 REAL pq2(ngrid,nlay+1) 51 INTEGER,INTENT(IN) :: ngrid,nlay 52 REAL,INTENT(IN) :: ptimestep 53 REAL,INTENT(IN) :: pplay(ngrid,nlay),pplev(ngrid,nlay+1) 54 REAL,INTENT(IN) :: pzlay(ngrid,nlay),pzlev(ngrid,nlay+1) 55 REAL,INTENT(IN) :: pu(ngrid,nlay),pv(ngrid,nlay),ph(ngrid,nlay) 56 REAL,INTENT(IN) :: ptsrf(ngrid),pemis(ngrid) 57 REAL,INTENT(IN) :: pdhfi(ngrid,nlay) 58 REAL,INTENT(IN) :: pfluxsrf(ngrid) 59 REAL,INTENT(OUT) :: pdudif(ngrid,nlay),pdvdif(ngrid,nlay) 60 REAL,INTENT(OUT) :: pdhdif(ngrid,nlay) 61 REAL,INTENT(OUT) :: pdtsrf(ngrid),sensibFlux(ngrid) 62 REAL,INTENT(IN) :: pcapcal(ngrid) 63 REAL,INTENT(INOUT) :: pq2(ngrid,nlay+1) 56 64 57 real rnat(ngrid)65 real,intent(in) :: rnat(ngrid) 58 66 59 67 ! Arguments added for condensation 60 REAL ppopsk(ngrid,nlay)61 logical lecrit62 REAL pz068 REAL,INTENT(IN) :: ppopsk(ngrid,nlay) 69 logical,intent(in) :: lecrit 70 REAL,INTENT(IN) :: pz0 63 71 64 72 ! Tracers 65 73 ! -------- 66 integer nq67 real pqsurf(ngrid,nq)68 real pq(ngrid,nlay,nq), pdqfi(ngrid,nlay,nq)69 real pdqdif(ngrid,nlay,nq)70 real pdqsdif(ngrid,nq)74 integer,intent(in) :: nq 75 real,intent(in) :: pqsurf(ngrid,nq) 76 real,intent(in) :: pq(ngrid,nlay,nq), pdqfi(ngrid,nlay,nq) 77 real,intent(out) :: pdqdif(ngrid,nlay,nq) 78 real,intent(out) :: pdqsdif(ngrid,nq) 71 79 72 80 ! local … … 96 104 !$OMP THREADPRIVATE(firstcall) 97 105 98 LOGICAL lastcall99 100 106 ! variables added for CO2 condensation 101 107 ! ------------------------------------ … … 701 707 endif 702 708 703 ! if(lastcall)then 704 ! if(ngrid.eq.1)then 705 ! print*,'Saving k.out...' 706 ! OPEN(12,file='k.out',form='formatted') 707 ! DO ilay=1,nlay 708 ! write(12,*) zkh(1,ilay), pplay(1,ilay) 709 ! ENDDO 710 ! CLOSE(12) 711 ! endif 712 ! endif 713 714 715 return 716 end 709 710 end subroutine vdifc 711 712 end module vdifc_mod
Note: See TracChangeset
for help on using the changeset viewer.