Changeset 1987
- Timestamp:
- Feb 24, 2014, 4:05:47 PM (11 years ago)
- Location:
- LMDZ5/trunk/libf
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/dyn3d/addfi.F
r1907 r1987 55 55 c ----------- 56 56 c 57 REAL pdt57 REAL,INTENT(IN) :: pdt ! time step for the integration (s) 58 58 c 59 REAL pvcov(ip1jm,llm),pucov(ip1jmp1,llm) 60 REAL pteta(ip1jmp1,llm),pq(ip1jmp1,llm,nqtot),pps(ip1jmp1) 59 REAL,INTENT(INOUT) :: pvcov(ip1jm,llm) ! covariant meridional wind 60 REAL,INTENT(INOUT) :: pucov(ip1jmp1,llm) ! covariant zonal wind 61 REAL,INTENT(INOUT) :: pteta(ip1jmp1,llm) ! potential temperature 62 REAL,INTENT(INOUT) :: pq(ip1jmp1,llm,nqtot) ! tracers 63 REAL,INTENT(INOUT) :: pps(ip1jmp1) ! surface pressure (Pa) 64 c respective tendencies (.../s) to add 65 REAL,INTENT(IN) :: pdvfi(ip1jm,llm) 66 REAL,INTENT(IN) :: pdufi(ip1jmp1,llm) 67 REAL,INTENT(IN) :: pdqfi(ip1jmp1,llm,nqtot) 68 REAL,INTENT(IN) :: pdhfi(ip1jmp1,llm) 69 REAL,INTENT(IN) :: pdpfi(ip1jmp1) 61 70 c 62 REAL pdvfi(ip1jm,llm),pdufi(ip1jmp1,llm) 63 REAL pdqfi(ip1jmp1,llm,nqtot),pdhfi(ip1jmp1,llm),pdpfi(ip1jmp1) 64 c 65 LOGICAL leapf,forward 71 LOGICAL,INTENT(IN) :: leapf,forward ! not used 66 72 c 67 73 c … … 71 77 REAL xpn(iim),xps(iim),tpn,tps 72 78 INTEGER j,k,iq,ij 73 REAL qtestw, qtestt 74 PARAMETER ( qtestw = 1.0e-15 ) 75 PARAMETER ( qtestt = 1.0e-40 ) 79 REAL,PARAMETER :: qtestw = 1.0e-15 80 REAL,PARAMETER :: qtestt = 1.0e-40 76 81 77 82 REAL SSUM -
LMDZ5/trunk/libf/dyn3d/advtrac.F90
r1907 r1987 9 9 ! M.A Filiberti (04/2002) 10 10 ! 11 USE infotrac 12 USE control_mod 11 USE infotrac, ONLY: nqtot, iadv 12 USE control_mod, ONLY: iapp_tracvl, day_step 13 13 14 14 … … 30 30 ! Arguments 31 31 !------------------------------------------------------------------- 32 INTEGER,INTENT(OUT) :: iapptrac 33 REAL,INTENT(IN) :: pbaru(ip1jmp1,llm) 34 REAL,INTENT(IN) :: pbarv(ip1jm,llm) 35 REAL,INTENT(INOUT) :: q(ip1jmp1,llm,nqtot) 36 REAL,INTENT(IN) :: masse(ip1jmp1,llm) 37 REAL,INTENT(IN) :: p( ip1jmp1,llmp1 ) 38 REAL,INTENT(IN) :: teta(ip1jmp1,llm) 39 REAL,INTENT(IN) :: pk(ip1jmp1,llm) 40 REAL,INTENT(OUT) :: flxw(ip1jmp1,llm) 41 !------------------------------------------------------------------- 32 42 ! Ajout PPM 33 43 !-------------------------------------------------------- 34 44 REAL massebx(ip1jmp1,llm),masseby(ip1jm,llm) 35 !--------------------------------------------------------36 INTEGER iapptrac37 REAL pbaru(ip1jmp1,llm),pbarv(ip1jm,llm)38 REAL q(ip1jmp1,llm,nqtot),masse(ip1jmp1,llm)39 REAL p( ip1jmp1,llmp1 ),teta(ip1jmp1,llm)40 REAL pk(ip1jmp1,llm)41 REAL flxw(ip1jmp1,llm)42 43 45 !------------------------------------------------------------- 44 46 ! Variables locales -
LMDZ5/trunk/libf/dyn3d/caldyn.F
r1907 r1987 1 1 ! 2 ! $ Header$2 ! $Id$ 3 3 ! 4 c5 c6 4 SUBROUTINE caldyn 7 5 $ (itau,ucov,vcov,teta,ps,masse,pk,pkf,phis , … … 10 8 IMPLICIT NONE 11 9 12 c=======================================================================13 c 14 cAuteur : P. Le Van15 c 16 cObjet:17 c------18 c 19 cCalcul des tendances dynamiques.20 c 21 cModif 04/93 F.Forget22 c=======================================================================10 !======================================================================= 11 ! 12 ! Auteur : P. Le Van 13 ! 14 ! Objet: 15 ! ------ 16 ! 17 ! Calcul des tendances dynamiques. 18 ! 19 ! Modif 04/93 F.Forget 20 !======================================================================= 23 21 24 c-----------------------------------------------------------------------25 c0. Declarations:26 c----------------22 !----------------------------------------------------------------------- 23 ! 0. Declarations: 24 ! ---------------- 27 25 28 26 #include "dimensions.h" … … 32 30 #include "comgeom.h" 33 31 34 cArguments:35 c----------32 ! Arguments: 33 ! ---------- 36 34 37 LOGICAL conser 35 LOGICAL,INTENT(IN) :: conser ! triggers printing some diagnostics 36 INTEGER,INTENT(IN) :: itau ! time step index 37 REAL,INTENT(IN) :: vcov(ip1jm,llm) ! covariant meridional wind 38 REAL,INTENT(IN) :: ucov(ip1jmp1,llm) ! covariant zonal wind 39 REAL,INTENT(IN) :: teta(ip1jmp1,llm) ! potential temperature 40 REAL,INTENT(IN) :: ps(ip1jmp1) ! surface pressure 41 REAL,INTENT(IN) :: phis(ip1jmp1) ! geopotential at the surface 42 REAL,INTENT(IN) :: pk(ip1jmp1,llm) ! Exner at mid-layer 43 REAL,INTENT(IN) :: pkf(ip1jmp1,llm) ! filtered Exner 44 REAL,INTENT(IN) :: phi(ip1jmp1,llm) ! geopotential 45 REAL,INTENT(OUT) :: masse(ip1jmp1,llm) ! air mass 46 REAL,INTENT(OUT) :: dv(ip1jm,llm) ! tendency on vcov 47 REAL,INTENT(OUT) :: du(ip1jmp1,llm) ! tendency on ucov 48 REAL,INTENT(OUT) :: dteta(ip1jmp1,llm) ! tenddency on teta 49 REAL,INTENT(OUT) :: dp(ip1jmp1) ! tendency on ps 50 REAL,INTENT(OUT) :: w(ip1jmp1,llm) ! vertical velocity 51 REAL,INTENT(OUT) :: pbaru(ip1jmp1,llm) ! mass flux in the zonal direction 52 REAL,INTENT(OUT) :: pbarv(ip1jm,llm) ! mass flux in the meridional direction 53 REAL,INTENT(IN) :: time ! current time 38 54 39 INTEGER itau 40 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm),teta(ip1jmp1,llm) 41 REAL ps(ip1jmp1),phis(ip1jmp1) 42 REAL pk(iip1,jjp1,llm),pkf(ip1jmp1,llm) 55 ! Local: 56 ! ------ 57 43 58 REAL vcont(ip1jm,llm),ucont(ip1jmp1,llm) 44 REAL phi(ip1jmp1,llm),masse(ip1jmp1,llm)45 REAL dv(ip1jm,llm),du(ip1jmp1,llm)46 REAL dteta(ip1jmp1,llm),dp(ip1jmp1)47 REAL pbaru(ip1jmp1,llm),pbarv(ip1jm,llm)48 REAL time49 50 c Local:51 c ------52 53 59 REAL ang(ip1jmp1,llm),p(ip1jmp1,llmp1) 54 60 REAL massebx(ip1jmp1,llm),masseby(ip1jm,llm),psexbarxy(ip1jm) 55 61 REAL vorpot(ip1jm,llm) 56 REAL w(ip1jmp1,llm),ecin(ip1jmp1,llm),convm(ip1jmp1,llm)62 REAL ecin(ip1jmp1,llm),convm(ip1jmp1,llm) 57 63 REAL bern(ip1jmp1,llm) 58 64 REAL massebxy(ip1jm,llm) … … 61 67 INTEGER ij,l 62 68 63 c-----------------------------------------------------------------------64 c Calcul des tendances dynamiques:65 c--------------------------------69 !----------------------------------------------------------------------- 70 ! Compute dynamical tendencies: 71 !-------------------------------- 66 72 73 ! compute contravariant winds ucont() and vcont 67 74 CALL covcont ( llm , ucov , vcov , ucont, vcont ) 75 ! compute pressure p() 68 76 CALL pression ( ip1jmp1, ap , bp , ps , p ) 77 ! compute psexbarxy() XY-area weighted-averaged surface pressure (what for?) 69 78 CALL psextbar ( ps , psexbarxy ) 79 ! compute mass in each atmospheric mesh: masse() 70 80 CALL massdair ( p , masse ) 81 ! compute X and Y-averages of mass, massebx() and masseby() 71 82 CALL massbar ( masse, massebx , masseby ) 83 ! compute XY-average of mass, massebxy() 72 84 call massbarxy( masse, massebxy ) 85 ! compute mass fluxes pbaru() and pbarv() 73 86 CALL flumass ( massebx, masseby , vcont, ucont ,pbaru, pbarv ) 87 ! compute dteta() , horizontal converging flux of theta 74 88 CALL dteta1 ( teta , pbaru , pbarv, dteta ) 89 ! compute convm(), horizontal converging flux of mass 75 90 CALL convmas ( pbaru, pbarv , convm ) 76 91 92 ! compute pressure variation due to mass convergence 77 93 DO ij =1, ip1jmp1 78 94 dp( ij ) = convm( ij,1 ) / airesurg( ij ) 79 95 ENDDO 80 96 97 ! compute vertical velocity w() 81 98 CALL vitvert ( convm , w ) 99 ! compute potential vorticity vorpot() 82 100 CALL tourpot ( vcov , ucov , massebxy , vorpot ) 101 ! compute rotation induced du() and dv() 83 102 CALL dudv1 ( vorpot , pbaru , pbarv , du , dv ) 103 ! compute kinetic energy ecin() 84 104 CALL enercin ( vcov , ucov , vcont , ucont , ecin ) 105 ! compute Bernouilli function bern() 85 106 CALL bernoui ( ip1jmp1, llm , phi , ecin , bern ) 107 ! compute and add du() and dv() contributions from Bernouilli and pressure 86 108 CALL dudv2 ( teta , pkf , bern , du , dv ) 87 109 … … 90 112 DO ij=1,ip1jmp1 91 113 ang(ij,l) = ucov(ij,l) + constang(ij) 92 ENDDO114 ENDDO 93 115 ENDDO 94 116 95 117 ! compute vertical advection contributions to du(), dv() and dteta() 96 118 CALL advect( ang, vcov, teta, w, massebx, masseby, du, dv,dteta ) 97 119 98 CWARNING probleme de peridocite de dv sur les PC/linux. Pb d'arrondi99 Cprobablement. Observe sur le code compile avec pgf90 3.0-1120 ! WARNING probleme de peridocite de dv sur les PC/linux. Pb d'arrondi 121 ! probablement. Observe sur le code compile avec pgf90 3.0-1 100 122 101 123 DO l = 1, llm 102 124 DO ij = 1, ip1jm, iip1 103 125 IF( dv(ij,l).NE.dv(ij+iim,l) ) THEN 104 cPRINT *,'!!!ATTENTION!!! probleme de periodicite sur vcov',105 c, ' dans caldyn'106 cPRINT *,' l, ij = ', l, ij, ij+iim,dv(ij+iim,l),dv(ij,l)126 ! PRINT *,'!!!ATTENTION!!! probleme de periodicite sur vcov', 127 ! , ' dans caldyn' 128 ! PRINT *,' l, ij = ', l, ij, ij+iim,dv(ij+iim,l),dv(ij,l) 107 129 dv(ij+iim,l) = dv(ij,l) 108 endif 109 enddo 110 enddo 111 c----------------------------------------------------------------------- 112 c Sorties eventuelles des variables de controle: 113 c ---------------------------------------------- 130 ENDIF 131 ENDDO 132 ENDDO 133 134 !----------------------------------------------------------------------- 135 ! Output some control variables: 136 !--------------------------------- 114 137 115 138 IF( conser ) THEN 116 139 CALL sortvarc 117 $ ( itau,ucov,teta,ps,masse,pk,phis,vorpot,phi,bern,dp,time,vcov ) 118 140 & ( itau,ucov,teta,ps,masse,pk,phis,vorpot,phi,bern,dp,time,vcov ) 119 141 ENDIF 120 142 121 RETURN122 143 END -
LMDZ5/trunk/libf/dyn3d/calfis.F
r1907 r1987 30 30 c Auteur : P. Le Van, F. Hourdin 31 31 c ......... 32 USE infotrac 33 USE control_mod 32 USE infotrac, ONLY: nqtot, niadv, tname 33 USE control_mod, ONLY: planet_type, nsplit_phys 34 34 35 35 … … 102 102 c Arguments : 103 103 c ----------- 104 LOGICAL lafin 105 106 107 REAL pvcov(iip1,jjm,llm) 108 REAL pucov(iip1,jjp1,llm) 109 REAL pteta(iip1,jjp1,llm) 110 REAL pmasse(iip1,jjp1,llm) 111 REAL pq(iip1,jjp1,llm,nqtot) 112 REAL pphis(iip1,jjp1) 113 REAL pphi(iip1,jjp1,llm) 114 c 115 REAL pdvcov(iip1,jjm,llm) 116 REAL pducov(iip1,jjp1,llm) 117 REAL pdteta(iip1,jjp1,llm) 118 REAL pdq(iip1,jjp1,llm,nqtot) 119 c 120 REAL pps(iip1,jjp1) 121 REAL pp(iip1,jjp1,llmp1) 122 REAL ppk(iip1,jjp1,llm) 123 c 124 REAL pdvfi(iip1,jjm,llm) 125 REAL pdufi(iip1,jjp1,llm) 126 REAL pdhfi(iip1,jjp1,llm) 127 REAL pdqfi(iip1,jjp1,llm,nqtot) 128 REAL pdpsfi(iip1,jjp1) 129 130 INTEGER longcles 131 PARAMETER ( longcles = 20 ) 132 REAL clesphy0( longcles ) 104 LOGICAL,INTENT(IN) :: lafin ! .true. for the very last call to physics 105 REAL,INTENT(IN):: jD_cur, jH_cur 106 REAL,INTENT(IN) :: pvcov(iip1,jjm,llm) ! covariant meridional velocity 107 REAL,INTENT(IN) :: pucov(iip1,jjp1,llm) ! covariant zonal velocity 108 REAL,INTENT(IN) :: pteta(iip1,jjp1,llm) ! potential temperature 109 REAL,INTENT(IN) :: pmasse(iip1,jjp1,llm) ! mass in each cell ! not used 110 REAL,INTENT(IN) :: pq(iip1,jjp1,llm,nqtot) ! tracers 111 REAL,INTENT(IN) :: pphis(iip1,jjp1) ! surface geopotential 112 REAL,INTENT(IN) :: pphi(iip1,jjp1,llm) ! geopotential 113 114 REAL,INTENT(IN) :: pdvcov(iip1,jjm,llm) ! dynamical tendency on vcov 115 REAL,INTENT(IN) :: pducov(iip1,jjp1,llm) ! dynamical tendency on ucov 116 REAL,INTENT(IN) :: pdteta(iip1,jjp1,llm) ! dynamical tendency on teta 117 ! NB: pdteta is used only to compute pcvgt which is in fact not used... 118 REAL,INTENT(IN) :: pdq(iip1,jjp1,llm,nqtot) ! dynamical tendency on tracers 119 ! NB: pdq is only used to compute pcvgq which is in fact not used... 120 121 REAL,INTENT(IN) :: pps(iip1,jjp1) ! surface pressure (Pa) 122 REAL,INTENT(IN) :: pp(iip1,jjp1,llmp1) ! pressure at mesh interfaces (Pa) 123 REAL,INTENT(IN) :: ppk(iip1,jjp1,llm) ! Exner at mid-layer 124 REAL,INTENT(IN) :: flxw(iip1,jjp1,llm) ! Vertical mass flux on dynamics grid 125 126 ! tendencies (in */s) from the physics 127 REAL,INTENT(OUT) :: pdvfi(iip1,jjm,llm) ! tendency on covariant meridional wind 128 REAL,INTENT(OUT) :: pdufi(iip1,jjp1,llm) ! tendency on covariant zonal wind 129 REAL,INTENT(OUT) :: pdhfi(iip1,jjp1,llm) ! tendency on potential temperature (K/s) 130 REAL,INTENT(OUT) :: pdqfi(iip1,jjp1,llm,nqtot) ! tendency on tracers 131 REAL,INTENT(OUT) :: pdpsfi(iip1,jjp1) ! tendency on surface pressure (Pa/s) 132 133 INTEGER,PARAMETER :: longcles = 20 134 REAL,INTENT(IN) :: clesphy0( longcles ) ! unused 133 135 134 136 … … 162 164 c 163 165 cIM diagnostique PVteta, Amip2 164 INTEGER ntetaSTD 165 PARAMETER(ntetaSTD=3) 166 REAL rtetaSTD(ntetaSTD) 167 DATA rtetaSTD/350., 380., 405./ ! Earth-specific values, beware !! 166 INTEGER,PARAMETER :: ntetaSTD=3 167 REAL,SAVE :: rtetaSTD(ntetaSTD)=(/350.,380.,405./) ! Earth-specific, beware !! 168 168 REAL PVteta(ngridmx,ntetaSTD) 169 169 c 170 REAL flxw(iip1,jjp1,llm) ! Flux de masse verticale sur la grille dynamique171 170 REAL flxwfi(ngridmx,llm) ! Flux de masse verticale sur la grille physiq 172 171 c … … 174 173 REAL SSUM 175 174 176 LOGICAL firstcal, debut 177 DATA firstcal/.true./ 178 SAVE firstcal,debut 175 LOGICAL,SAVE :: firstcal=.true., debut=.true. 179 176 ! REAL rdayvrai 180 REAL, intent(in):: jD_cur, jH_cur181 177 182 178 LOGICAL tracerdyn -
LMDZ5/trunk/libf/dyn3d/dissip.F
r1907 r1987 1 1 ! 2 ! $ Header$2 ! $Id$ 3 3 ! 4 4 SUBROUTINE dissip( vcov,ucov,teta,p, dv,du,dh ) … … 35 35 c ---------- 36 36 37 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm),teta(ip1jmp1,llm) 38 REAL p( ip1jmp1,llmp1 ) 39 REAL dv(ip1jm,llm),du(ip1jmp1,llm),dh(ip1jmp1,llm) 37 REAL,INTENT(IN) :: vcov(ip1jm,llm) ! covariant meridional wind 38 REAL,INTENT(IN) :: ucov(ip1jmp1,llm) ! covariant zonal wind 39 REAL,INTENT(IN) :: teta(ip1jmp1,llm) ! potential temperature 40 REAL,INTENT(IN) :: p(ip1jmp1,llmp1) ! pressure 41 ! tendencies (.../s) on covariant winds and potential temperature 42 REAL,INTENT(OUT) :: dv(ip1jm,llm) 43 REAL,INTENT(OUT) :: du(ip1jmp1,llm) 44 REAL,INTENT(OUT) :: dh(ip1jmp1,llm) 40 45 41 46 c Local: -
LMDZ5/trunk/libf/dyn3d/leapfrog.F
r1907 r1987 12 12 use IOIPSL 13 13 #endif 14 USE infotrac 14 USE infotrac, ONLY: nqtot 15 15 USE guide_mod, ONLY : guide_main 16 USE write_field 17 USE control_mod 16 USE write_field, ONLY: writefield 17 USE control_mod, ONLY: nday, day_step, planet_type, offline, 18 & iconser, iphysiq, iperiod, dissip_period, 19 & iecri, ip_ebil_dyn, ok_dynzon, ok_dyn_ins, 20 & periodav, ok_dyn_ave, output_grads_dyn 18 21 IMPLICIT NONE 19 22 … … 67 70 ! #include "clesphys.h" 68 71 69 INTEGER longcles 70 PARAMETER ( longcles = 20 ) 71 REAL clesphy0( longcles ) 72 INTEGER,PARAMETER :: longcles = 20 73 REAL,INTENT(IN) :: clesphy0( longcles ) ! not used 74 REAL,INTENT(IN) :: time_0 ! not used 75 76 c dynamical variables: 77 REAL,INTENT(INOUT) :: ucov(ip1jmp1,llm) ! zonal covariant wind 78 REAL,INTENT(INOUT) :: vcov(ip1jm,llm) ! meridional covariant wind 79 REAL,INTENT(INOUT) :: teta(ip1jmp1,llm) ! potential temperature 80 REAL,INTENT(INOUT) :: ps(ip1jmp1) ! surface pressure (Pa) 81 REAL,INTENT(INOUT) :: masse(ip1jmp1,llm) ! air mass 82 REAL,INTENT(INOUT) :: phis(ip1jmp1) ! geopotentiat at the surface 83 REAL,INTENT(INOUT) :: q(ip1jmp1,llm,nqtot) ! advected tracers 84 85 REAL p (ip1jmp1,llmp1 ) ! interlayer pressure 86 REAL pks(ip1jmp1) ! exner at the surface 87 REAL pk(ip1jmp1,llm) ! exner at mid-layer 88 REAL pkf(ip1jmp1,llm) ! filtered exner at mid-layer 89 REAL phi(ip1jmp1,llm) ! geopotential 90 REAL w(ip1jmp1,llm) ! vertical velocity 72 91 73 92 real zqmin,zqmax 74 75 c variables dynamiques76 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) ! vents covariants77 REAL teta(ip1jmp1,llm) ! temperature potentielle78 REAL q(ip1jmp1,llm,nqtot) ! champs advectes79 REAL ps(ip1jmp1) ! pression au sol80 REAL p (ip1jmp1,llmp1 ) ! pression aux interfac.des couches81 REAL pks(ip1jmp1) ! exner au sol82 REAL pk(ip1jmp1,llm) ! exner au milieu des couches83 REAL pkf(ip1jmp1,llm) ! exner filt.au milieu des couches84 REAL masse(ip1jmp1,llm) ! masse d'air85 REAL phis(ip1jmp1) ! geopotentiel au sol86 REAL phi(ip1jmp1,llm) ! geopotentiel87 REAL w(ip1jmp1,llm) ! vitesse verticale88 93 89 94 c variables dynamiques intermediaire pour le transport … … 117 122 118 123 REAL SSUM 119 REAL time_0120 124 ! REAL finvmaold(ip1jmp1,llm) 121 125 … … 319 323 320 324 IF( forward. OR . leapf ) THEN 321 ! Ehouarn: NB: at this point p with ps are not synchronized 322 ! (whereas mass and ps are...) 325 ! Ehouarn: NB: fields sent to advtrac are those at the beginning of the time step 323 326 CALL caladvtrac(q,pbaru,pbarv, 324 327 * p, masse, dq, teta, … … 441 444 $ ucov, vcov, teta , q ,ps , 442 445 $ dufi, dvfi, dtetafi , dqfi ,dpfi ) 446 ! since addfi updates ps(), also update p(), masse() and pk() 447 CALL pression (ip1jmp1,ap,bp,ps,p) 448 CALL massdair(p,masse) 449 if (pressure_exner) then 450 CALL exner_hyb(ip1jmp1,ps,p,alpha,beta,pks,pk,pkf) 451 else 452 CALL exner_milieu(ip1jmp1,ps,p,beta,pks,pk,pkf) 453 endif 443 454 444 455 IF (ok_strato) THEN … … 499 510 CALL exner_milieu( ip1jmp1, ps, p, beta, pks, pk, pkf ) 500 511 endif 512 CALL massdair(p,masse) 501 513 502 514 -
LMDZ5/trunk/libf/dyn3dmem/addfi_loc.F
r1907 r1987 55 55 c ----------- 56 56 c 57 REAL pdt 58 c 59 REAL pvcov(ijb_v:ije_v,llm),pucov(ijb_u:ije_u,llm) 60 REAL pteta(ijb_u:ije_u,llm),pq(ijb_u:ije_u,llm,nqtot) 61 REAL pps(ijb_u:ije_u) 62 c 63 REAL pdvfi(ijb_v:ije_v,llm),pdufi(ijb_u:ije_u,llm) 64 REAL pdqfi(ijb_u:ije_u,llm,nqtot),pdhfi(ijb_u:ije_u,llm) 65 REAL pdpfi(ijb_u:ije_u) 66 c 67 LOGICAL leapf,forward 57 REAL,INTENT(IN) :: pdt ! time step for the integration (s) 58 c 59 REAL,INTENT(INOUT) :: pvcov(ijb_v:ije_v,llm) ! covariant meridional wind 60 REAL,INTENT(INOUT) :: pucov(ijb_u:ije_u,llm) ! covariant zonal wind 61 REAL,INTENT(INOUT) :: pteta(ijb_u:ije_u,llm) ! potential temperature 62 REAL,INTENT(INOUT) :: pq(ijb_u:ije_u,llm,nqtot) ! tracers 63 REAL,INTENT(INOUT) :: pps(ijb_u:ije_u) ! surface pressure (Pa) 64 c respective tendencies (.../s) to add 65 REAL,INTENT(IN) :: pdvfi(ijb_v:ije_v,llm) 66 REAL,INTENT(IN) :: pdufi(ijb_u:ije_u,llm) 67 REAL,INTENT(IN) :: pdqfi(ijb_u:ije_u,llm,nqtot) 68 REAL,INTENT(IN) :: pdhfi(ijb_u:ije_u,llm) 69 REAL,INTENT(IN) :: pdpfi(ijb_u:ije_u) 70 c 71 LOGICAL,INTENT(IN) :: leapf,forward ! not used 68 72 c 69 73 c … … 73 77 REAL xpn(iim),xps(iim),tpn,tps 74 78 INTEGER j,k,iq,ij 75 REAL qtestw, qtestt 76 PARAMETER ( qtestw = 1.0e-15 ) 77 PARAMETER ( qtestt = 1.0e-40 ) 79 REAL,PARAMETER :: qtestw = 1.0e-15 80 REAL,PARAMETER :: qtestt = 1.0e-40 78 81 79 82 REAL SSUM -
LMDZ5/trunk/libf/dyn3dmem/advtrac_loc.F
r1907 r1987 24 24 USE Vampir 25 25 USE times 26 USE infotrac 27 USE control_mod 28 USE advtrac_mod 26 USE infotrac, ONLY: nqtot, iadv 27 USE control_mod, ONLY: iapp_tracvl, day_step, planet_type 28 USE advtrac_mod, ONLY: finmasse 29 29 IMPLICIT NONE 30 30 c -
LMDZ5/trunk/libf/dyn3dmem/caldyn_loc.F
r1907 r1987 1 1 ! 2 ! $ Header$2 ! $Id: $ 3 3 ! 4 c5 c6 4 #undef DEBUG_IO 7 5 !#define DEBUG_IO … … 12 10 USE parallel_lmdz 13 11 USE Write_Field_loc 14 USE caldyn_mod 12 USE caldyn_mod, ONLY: vcont, ucont, ang, p, massebx, masseby, 13 & vorpot, ecin, bern, massebxy, convm 15 14 16 15 IMPLICIT NONE 17 16 18 c=======================================================================19 c 20 cAuteur : P. Le Van21 c 22 cObjet:23 c------24 c 25 cCalcul des tendances dynamiques.26 c 27 cModif 04/93 F.Forget28 c=======================================================================17 !======================================================================= 18 ! 19 ! Auteur : P. Le Van 20 ! 21 ! Objet: 22 ! ------ 23 ! 24 ! Calcul des tendances dynamiques. 25 ! 26 ! Modif 04/93 F.Forget 27 !======================================================================= 29 28 30 c-----------------------------------------------------------------------31 c0. Declarations:32 c----------------29 !----------------------------------------------------------------------- 30 ! 0. Declarations: 31 ! ---------------- 33 32 34 33 #include "dimensions.h" … … 38 37 #include "comgeom.h" 39 38 40 cArguments:41 c----------39 ! Arguments: 40 ! ---------- 42 41 43 LOGICAL conser 42 LOGICAL,INTENT(IN) :: conser ! triggers printing some diagnostics ! not used 43 INTEGER,INTENT(IN) :: itau ! time step index ! not used 44 REAL,INTENT(IN) :: vcov(ijb_v:ije_v,llm) ! covariant meridional wind 45 REAL,INTENT(IN) :: ucov(ijb_u:ije_u,llm) ! covariant zonal wind 46 REAL,INTENT(IN) :: teta(ijb_u:ije_u,llm) ! potential temperature 47 REAL,INTENT(IN) :: ps(ijb_u:ije_u) ! surface pressure 48 REAL,INTENT(IN) :: phis(ijb_u:ije_u) ! geopotential at the surface 49 REAL,INTENT(IN) :: pk(iip1,jjb_u:jje_u,llm) ! Exner at mid-layer 50 REAL,INTENT(IN) :: pkf(ijb_u:ije_u,llm) ! filtered Exner 51 REAL,INTENT(IN) :: phi(ijb_u:ije_u,llm) ! geopotential 52 REAL,INTENT(OUT) :: masse(ijb_u:ije_u,llm) ! air mass 53 REAL,INTENT(OUT) :: dv(ijb_v:ije_v,llm) ! tendency on vcov 54 REAL,INTENT(OUT) :: du(ijb_u:ije_u,llm) ! tendency on ucov 55 REAL,INTENT(OUT) :: dteta(ijb_u:ije_u,llm) ! tenddency on teta 56 REAL,INTENT(OUT) :: dp(ijb_u:ije_u) ! tendency on ps 57 REAL,INTENT(OUT) :: w(ijb_u:ije_u,llm) ! vertical velocity 58 REAL,INTENT(OUT) :: pbaru(ijb_u:ije_u,llm) ! mass flux in the zonal direction 59 REAL,INTENT(OUT) :: pbarv(ijb_v:ije_v,llm) ! mass flux in the meridional direction 60 REAL,INTENT(IN) :: time ! current time 44 61 45 INTEGER itau 46 REAL vcov(ijb_v:ije_v,llm),ucov(ijb_u:ije_u,llm) 47 REAL teta(ijb_u:ije_u,llm) 48 REAL ps(ijb_u:ije_u),phis(ijb_u:ije_u) 49 REAL pk(iip1,jjb_u:jje_u,llm),pkf(ijb_u:ije_u,llm) 50 REAL phi(ijb_u:ije_u,llm),masse(ijb_u:ije_u,llm) 51 REAL dv(ijb_v:ije_v,llm),du(ijb_u:ije_u,llm) 52 REAL dteta(ijb_u:ije_u,llm),dp(ijb_u:ije_u) 53 REAL w(ijb_u:ije_u,llm) 54 REAL pbaru(ijb_u:ije_u,llm),pbarv(ijb_v:ije_v,llm) 55 REAL time 56 57 c Local: 58 c ------ 62 ! Local: 63 ! ------ 59 64 60 65 INTEGER ij,l,ijb,ije,ierr 61 66 62 67 63 c----------------------------------------------------------------------- 64 c Calcul des tendances dynamiques: 65 c -------------------------------- 68 !----------------------------------------------------------------------- 69 ! Compute dynamical tendencies: 70 !-------------------------------- 71 72 ! compute contravariant winds ucont() and vcont 66 73 CALL covcont_loc ( llm , ucov , vcov , ucont, vcont ) 74 ! compute pressure p() 67 75 CALL pression_loc ( ip1jmp1, ap , bp , ps , p ) 68 76 cym CALL psextbar ( ps , psexbarxy ) 69 77 c$OMP BARRIER 78 ! compute mass in each atmospheric mesh: masse() 70 79 CALL massdair_loc ( p , masse ) 80 ! compute X and Y-averages of mass, massebx() and masseby() 71 81 CALL massbar_loc ( masse, massebx , masseby ) 82 ! compute XY-average of mass, massebxy() 72 83 call massbarxy_loc( masse, massebxy ) 84 ! compute mass fluxes pbaru() and pbarv() 73 85 CALL flumass_loc ( massebx, masseby,vcont,ucont,pbaru,pbarv ) 86 ! compute dteta() , horizontal converging flux of theta 74 87 CALL dteta1_loc ( teta , pbaru , pbarv, dteta ) 88 ! compute convm(), horizontal converging flux of mass 75 89 CALL convmas1_loc ( pbaru, pbarv , convm ) 76 90 c$OMP BARRIER … … 95 109 ijb=ij_begin 96 110 ije=ij_end 97 111 ! compute pressure variation due to mass convergence 98 112 DO ij =ijb, ije 99 113 dp( ij ) = convm( ij,1 ) / airesurg( ij ) … … 101 115 c$OMP END MASTER 102 116 c$OMP BARRIER 117 118 ! compute vertical velocity w() 103 119 CALL vitvert_loc ( convm , w ) 120 ! compute potential vorticity vorpot() 104 121 CALL tourpot_loc ( vcov , ucov , massebxy , vorpot ) 122 ! compute rotation induced du() and dv() 105 123 CALL dudv1_loc ( vorpot , pbaru , pbarv , du , dv ) 106 124 … … 111 129 call WriteField_v('dv',dv) 112 130 #endif 131 132 ! compute kinetic energy ecin() 113 133 CALL enercin_loc ( vcov , ucov , vcont , ucont , ecin ) 134 ! compute Bernouilli function bern() 114 135 CALL bernoui_loc ( ip1jmp1, llm , phi , ecin , bern) 136 ! compute and add du() and dv() contributions from Bernouilli and pressure 115 137 CALL dudv2_loc ( teta , pkf , bern , du , dv ) 116 138 … … 137 159 c$OMP END DO 138 160 161 ! compute vertical advection contributions to du(), dv() and dteta() 139 162 CALL advect_new_loc(ang,vcov,teta,w,massebx,masseby,du,dv,dteta) 140 163 … … 158 181 c$OMP END DO NOWAIT 159 182 183 ! Ehouarn: NB: output of control variables not implemented... 160 184 161 185 RETURN -
LMDZ5/trunk/libf/dyn3dmem/calfis_loc.F
r1907 r1987 41 41 Use Write_field_p 42 42 USE Times 43 USE infotrac 44 USE control_mod 43 USE infotrac, ONLY: nqtot, niadv, tname 44 USE control_mod, ONLY: planet_type, nsplit_phys 45 45 46 46 IMPLICIT NONE … … 115 115 c Arguments : 116 116 c ----------- 117 LOGICAL lafin 118 ! REAL heure 119 REAL, intent(in):: jD_cur, jH_cur 120 REAL pvcov(iip1,jjb_v:jje_v,llm) 121 REAL pucov(iip1,jjb_u:jje_u,llm) 122 REAL pteta(iip1,jjb_u:jje_u,llm) 123 REAL pmasse(iip1,jjb_u:jje_u,llm) 124 REAL pq(iip1,jjb_u:jje_u,llm,nqtot) 125 REAL pphis(iip1,jjb_u:jje_u) 126 REAL pphi(iip1,jjb_u:jje_u,llm) 127 c 128 REAL pdvcov(iip1,jjb_v:jje_v,llm) 129 REAL pducov(iip1,jjb_u:jje_u,llm) 130 REAL pdteta(iip1,jjb_u:jje_u,llm) 131 REAL pdq(iip1,jjb_u:jje_u,llm,nqtot) 132 REAL flxw(iip1,jjb_u:jje_u,llm) ! Flux de masse verticale sur la grille dynamique 133 c 134 REAL pps(iip1,jjb_u:jje_u) 135 REAL pp(iip1,jjb_u:jje_u,llmp1) 136 REAL ppk(iip1,jjb_u:jje_u,llm) 137 c 138 REAL pdvfi(iip1,jjb_v:jje_v,llm) 139 REAL pdufi(iip1,jjb_u:jje_u,llm) 140 REAL pdhfi(iip1,jjb_u:jje_u,llm) 141 REAL pdqfi(iip1,jjb_u:jje_u,llm,nqtot) 142 REAL pdpsfi(iip1,jjb_u:jje_u) 143 144 INTEGER longcles 145 PARAMETER ( longcles = 20 ) 146 REAL clesphy0( longcles ) 117 LOGICAL,INTENT(IN) :: lafin ! .true. for the very last call to physics 118 REAL,INTENT(IN):: jD_cur, jH_cur 119 REAL,INTENT(IN):: pvcov(iip1,jjb_v:jje_v,llm) ! covariant meridional velocity 120 REAL,INTENT(IN):: pucov(iip1,jjb_u:jje_u,llm) ! covariant zonal velocity 121 REAL,INTENT(IN):: pteta(iip1,jjb_u:jje_u,llm) ! potential temperature 122 REAL,INTENT(IN):: pmasse(iip1,jjb_u:jje_u,llm) ! mass in each cell ! not used 123 REAL,INTENT(IN):: pq(iip1,jjb_u:jje_u,llm,nqtot) ! tracers 124 REAL,INTENT(IN):: pphis(iip1,jjb_u:jje_u) ! surface geopotential 125 REAL,INTENT(IN):: pphi(iip1,jjb_u:jje_u,llm) ! geopotential 126 127 REAL,INTENT(IN) :: pdvcov(iip1,jjb_v:jje_v,llm) ! dynamical tendency on vcov ! not used 128 REAL,INTENT(IN) :: pducov(iip1,jjb_u:jje_u,llm) ! dynamical tendency on ucov 129 REAL,INTENT(IN) :: pdteta(iip1,jjb_u:jje_u,llm) ! dynamical tendency on teta ! not used 130 REAL,INTENT(IN) :: pdq(iip1,jjb_u:jje_u,llm,nqtot) ! dynamical tendency on tracers ! not used 131 132 REAL,INTENT(IN) :: pps(iip1,jjb_u:jje_u) ! surface pressure (Pa) 133 REAL,INTENT(IN) :: pp(iip1,jjb_u:jje_u,llmp1) ! pressure at mesh interfaces (Pa) 134 REAL,INTENT(IN) :: ppk(iip1,jjb_u:jje_u,llm) ! Exner at mid-layer 135 REAL,INTENT(IN) :: flxw(iip1,jjb_u:jje_u,llm) ! Vertical mass flux on dynamics grid 136 137 ! tendencies (in */s) from the physics 138 REAL,INTENT(OUT) :: pdvfi(iip1,jjb_v:jje_v,llm) ! tendency on covariant meridional wind 139 REAL,INTENT(OUT) :: pdufi(iip1,jjb_u:jje_u,llm) ! tendency on covariant zonal wind 140 REAL,INTENT(OUT) :: pdhfi(iip1,jjb_u:jje_u,llm) ! tendency on potential temperature (K/s) 141 REAL,INTENT(OUT) :: pdqfi(iip1,jjb_u:jje_u,llm,nqtot) ! tendency on tracers 142 REAL,INTENT(OUT) :: pdpsfi(iip1,jjb_u:jje_u) ! tendency on surface pressure (Pa/s) 143 144 INTEGER,PARAMETER :: longcles = 20 145 REAL,INTENT(IN) :: clesphy0( longcles ) ! unused 147 146 148 147 … … 221 220 c 222 221 cIM diagnostique PVteta, Amip2 223 INTEGER ntetaSTD 224 PARAMETER(ntetaSTD=3) 225 REAL rtetaSTD(ntetaSTD) 226 DATA rtetaSTD/350., 380., 405./ ! Earth-specific values, beware !! 222 INTEGER,PARAMETER :: ntetaSTD=3 223 REAL,SAVE :: rtetaSTD(ntetaSTD)=(/350.,380.,405./) ! Earth-specific, beware !! 227 224 REAL PVteta(klon,ntetaSTD) 228 225 … … 230 227 REAL SSUM 231 228 232 LOGICAL firstcal, debut 233 DATA firstcal/.true./ 234 SAVE firstcal,debut 229 LOGICAL,SAVE :: firstcal=.true., debut=.true. 235 230 c$OMP THREADPRIVATE(firstcal,debut) 236 231 -
LMDZ5/trunk/libf/dyn3dmem/call_calfis_mod.F90
r1907 r1987 91 91 INCLUDE "iniprint.h" 92 92 93 REAL :: clesphy0( : )94 INTEGER :: itau95 LOGICAL :: lafin96 REAL :: ucov_dyn(ijb_u:ije_u,llm)97 REAL :: vcov_dyn(ijb_v:ije_v,llm)98 REAL :: teta_dyn(ijb_u:ije_u,llm)99 REAL :: masse_dyn(ijb_u:ije_u,llm)100 REAL :: ps_dyn(ijb_u:ije_u)101 REAL :: phis_dyn(ijb_u:ije_u)102 REAL :: q_dyn(ijb_u:ije_u,llm,nqtot)103 REAL :: flxw_dyn(ijb_u:ije_u,llm)93 INTEGER,INTENT(IN) :: itau ! (time) iteration step number 94 LOGICAL,INTENT(IN) :: lafin ! .true. if final time step 95 REAL,INTENT(IN) :: clesphy0( : ) ! not used 96 REAL,INTENT(INOUT) :: ucov_dyn(ijb_u:ije_u,llm) ! covariant zonal wind 97 REAL,INTENT(INOUT) :: vcov_dyn(ijb_v:ije_v,llm) ! covariant meridional wind 98 REAL,INTENT(INOUT) :: teta_dyn(ijb_u:ije_u,llm) ! potential temperature 99 REAL,INTENT(INOUT) :: masse_dyn(ijb_u:ije_u,llm) ! air mass 100 REAL,INTENT(INOUT) :: ps_dyn(ijb_u:ije_u) ! surface pressure 101 REAL,INTENT(INOUT) :: phis_dyn(ijb_u:ije_u) ! surface geopotential 102 REAL,INTENT(INOUT) :: q_dyn(ijb_u:ije_u,llm,nqtot) ! advected tracers 103 REAL,INTENT(INOUT) :: flxw_dyn(ijb_u:ije_u,llm) ! vertical mass flux 104 104 105 105 REAL :: dufi_tmp(iip1,llm) … … 134 134 !$OMP MASTER 135 135 CALL suspend_timer(timer_caldyn) 136 WRITE(lunout,*) 'leapfrog_p: Entree dans la physique : Iteration No ',itau 136 IF (prt_level >= 10) THEN 137 WRITE(lunout,*) 'leapfrog_p: Entree dans la physique : Iteration No ',itau 138 ENDIF 137 139 !$OMP END MASTER 138 140 … … 335 337 ucov, vcov, teta , q ,ps , & 336 338 dufi, dvfi, dtetafi , dqfi ,dpfi ) 339 ! since addfi updates ps(), also update p(), masse() and pk() 340 CALL pression_loc(ip1jmp1,ap,bp,ps,p) 341 !$OMP BARRIER 342 CALL massdair_loc(p,masse) 343 !$OMP BARRIER 344 if (pressure_exner) then 345 CALL exner_hyb_loc(ijnb_u,ps,p,alpha,beta,pks,pk,pkf) 346 else 347 CALL exner_milieu_loc(ijnb_u,ps,p,beta,pks,pk,pkf) 348 endif 349 !$OMP BARRIER 337 350 338 351 #ifdef DEBUG_IO -
LMDZ5/trunk/libf/dyn3dmem/call_dissip_mod.F90
r1907 r1987 87 87 IMPLICIT NONE 88 88 INCLUDE 'comgeom.h' 89 REAL :: ucov_dyn(ijb_u:ije_u,llm)90 REAL :: vcov_dyn(ijb_v:ije_v,llm)91 REAL :: teta_dyn(ijb_u:ije_u,llm)92 REAL :: p_dyn(ijb_u:ije_u,llmp1 )93 REAL :: pk_dyn(ijb_u:ije_u,llm)94 REAL :: ps_dyn(ijb_u:ije_u)89 REAL,INTENT(INOUT) :: ucov_dyn(ijb_u:ije_u,llm) ! covariant zonal wind 90 REAL,INTENT(INOUT) :: vcov_dyn(ijb_v:ije_v,llm) ! covariant meridional wind 91 REAL,INTENT(INOUT) :: teta_dyn(ijb_u:ije_u,llm) ! covariant meridional wind 92 REAL,INTENT(INOUT) :: p_dyn(ijb_u:ije_u,llmp1 ) ! pressure at interlayer 93 REAL,INTENT(INOUT) :: pk_dyn(ijb_u:ije_u,llm) ! Exner at midlayer 94 REAL,INTENT(INOUT) :: ps_dyn(ijb_u:ije_u) ! surface pressure 95 95 REAL :: tppn(iim),tpps(iim) 96 96 REAL :: tpn,tps -
LMDZ5/trunk/libf/dyn3dmem/dissip_loc.F
r1907 r1987 1 ! 2 ! $Id: $ 3 ! 1 4 SUBROUTINE dissip_loc( vcov,ucov,teta,p, dv,du,dh ) 2 5 c 3 6 USE parallel_lmdz 4 7 USE write_field_loc 5 USE dissip_mod 8 USE dissip_mod, ONLY: dissip_allocate 6 9 IMPLICIT NONE 7 10 … … 35 38 c ---------- 36 39 37 REAL vcov(ijb_v:ije_v,llm),ucov(ijb_u:ije_u,llm) 38 REAL teta(ijb_u:ije_u,llm) 39 REAL p( ijb_u:ije_u,llmp1 ) 40 REAL dv(ijb_v:ije_v,llm),du(ijb_u:ije_u,llm),dh(ijb_u:ije_u,llm) 40 REAL,INTENT(IN) :: vcov(ijb_v:ije_v,llm) ! covariant meridional wind 41 REAL,INTENT(IN) :: ucov(ijb_u:ije_u,llm) ! covariant zonal wind 42 REAL,INTENT(IN) :: teta(ijb_u:ije_u,llm) ! potential temperature 43 REAL,INTENT(IN) :: p(ijb_u:ije_u,llmp1) ! interlayer pressure 44 ! tendencies (.../s) on covariant winds and potential temperature 45 REAL,INTENT(OUT) :: dv(ijb_v:ije_v,llm) 46 REAL,INTENT(OUT) :: du(ijb_u:ije_u,llm) 47 REAL,INTENT(OUT) :: dh(ijb_u:ije_u,llm) 41 48 42 49 c Local: -
LMDZ5/trunk/libf/dyn3dmem/leapfrog_loc.F
r1907 r1987 80 80 ! include "mpif.h" 81 81 82 INTEGER longcles 83 PARAMETER ( longcles = 20 ) 84 REAL clesphy0( longcles ) 82 INTEGER,PARAMETER :: longcles = 20 83 REAL,INTENT(IN) :: clesphy0( longcles ) ! not used 84 REAL,INTENT(IN) :: time_0 ! not used 85 86 c dynamical variables: 87 REAL,INTENT(IN) :: ucov0(ijb_u:ije_u,llm) ! zonal covariant wind 88 REAL,INTENT(IN) :: vcov0(ijb_v:ije_v,llm) ! meridional covariant wind 89 REAL,INTENT(IN) :: teta0(ijb_u:ije_u,llm) ! potential temperature 90 REAL,INTENT(IN) :: q0(ijb_u:ije_u,llm,nqtot) ! advected tracers 91 REAL,INTENT(IN) :: ps0(ijb_u:ije_u) ! surface pressure (Pa) 92 REAL,INTENT(IN) :: masse0(ijb_u:ije_u,llm) ! air mass 93 REAL,INTENT(IN) :: phis0(ijb_u:ije_u) ! geopotentiat at the surface 85 94 86 95 real zqmin,zqmax 87 88 c variables dynamiques89 REAL :: vcov0(ijb_v:ije_v,llm),ucov0(ijb_u:ije_u,llm) ! vents covariants90 REAL :: teta0(ijb_u:ije_u,llm) ! temperature potentielle91 REAL :: q0(ijb_u:ije_u,llm,nqtot) ! champs advectes92 REAL :: ps0(ijb_u:ije_u) ! pression au sol93 REAL :: masse0(ijb_u:ije_u,llm) ! masse d'air94 REAL :: phis0(ijb_u:ije_u) ! geopotentiel au sol95 96 96 97 ! REAL,SAVE,ALLOCATABLE :: p (:,: ) ! pression aux interfac.des couches … … 133 134 REAL time 134 135 135 REAL SSUM 136 REAL time_0 136 REAL SSUM 137 137 ! REAL,SAVE,ALLOCATABLE :: finvmaold(:,:) 138 138 … … 670 670 671 671 IF( forward. OR . leapf ) THEN 672 673 672 ! Ehouarn: NB: fields sent to advtrac are those at the beginning of the time step 674 673 CALL caladvtrac_loc(q,pbaru,pbarv, 675 674 * p, masse, dq, teta, … … 680 679 ! enddo 681 680 682 c 681 ! Ehouarn: Storage of mass flux for off-line tracers... not implemented... 682 683 683 ENDIF ! of IF( forward. OR . leapf ) 684 684 … … 1140 1140 endif 1141 1141 c$OMP BARRIER 1142 CALL massdair_loc(p,masse) 1143 c$OMP BARRIER 1142 1144 1143 1145 cc$OMP END PARALLEL -
LMDZ5/trunk/libf/dyn3dmem/leapfrog_mod.F90
r1907 r1987 1 1 MODULE leapfrog_mod 2 2 3 REAL,POINTER,SAVE :: ucov(:,:) 4 REAL,POINTER,SAVE :: vcov(:,:) 5 REAL,POINTER,SAVE :: teta(:,:) 6 REAL,POINTER,SAVE :: ps(:) 7 REAL,POINTER,SAVE :: masse(:,:) 8 REAL,POINTER,SAVE :: phis(:) 9 REAL,POINTER,SAVE :: q(:,:,:) 10 REAL,POINTER,SAVE :: p(:,:) 11 REAL,POINTER,SAVE :: pks(:) 12 REAL,POINTER,SAVE :: pk(:,:) 13 REAL,POINTER,SAVE :: pkf(:,:) 14 REAL,POINTER,SAVE :: phi(:,:) 15 REAL,POINTER,SAVE :: w(:,:) 3 REAL,POINTER,SAVE :: ucov(:,:) ! zonal covariant wind 4 REAL,POINTER,SAVE :: vcov(:,:) ! meridional covariant wind 5 REAL,POINTER,SAVE :: teta(:,:) ! potential temperature 6 REAL,POINTER,SAVE :: ps(:) ! surface pressure 7 REAL,POINTER,SAVE :: masse(:,:) ! air mass 8 REAL,POINTER,SAVE :: phis(:) ! geopotential at the surface 9 REAL,POINTER,SAVE :: q(:,:,:) ! advected tracers 10 REAL,POINTER,SAVE :: p(:,:) ! interlayer pressure 11 REAL,POINTER,SAVE :: pks(:) ! Exner at the surface 12 REAL,POINTER,SAVE :: pk(:,:) ! Exner at mid-layer 13 REAL,POINTER,SAVE :: pkf(:,:) ! filtered Exner 14 REAL,POINTER,SAVE :: phi(:,:) ! geopotential 15 REAL,POINTER,SAVE :: w(:,:) ! vertical velocity 16 16 REAL,POINTER,SAVE :: pbaru(:,:) 17 17 REAL,POINTER,SAVE :: pbarv(:,:) -
LMDZ5/trunk/libf/dyn3dmem/pression_loc.F
r1907 r1987 1 1 SUBROUTINE pression_loc( ngrid, ap, bp, ps, p ) 2 USE parallel_lmdz 2 USE parallel_lmdz, ONLY: ij_begin, ij_end, ijb_u, ije_u, 3 & pole_nord, pole_sud, omp_chunk 3 4 c 4 5 … … 16 17 #include "paramet.h" 17 18 c 18 INTEGER ngrid19 INTEGER,INTENT(IN) :: ngrid ! not used 19 20 INTEGER l,ij 20 21 21 REAL ap( llmp1 ), bp( llmp1 ), ps( ijb_u:ije_u )22 REAL p( ijb_u:ije_u,llmp1 )22 REAL,INTENT(IN) :: ap( llmp1 ), bp( llmp1 ), ps( ijb_u:ije_u ) 23 REAL,INTENT(OUT) :: p( ijb_u:ije_u,llmp1 ) 23 24 24 25 INTEGER ijb,ije -
LMDZ5/trunk/libf/dyn3dpar/addfi_p.F
r1907 r1987 55 55 c ----------- 56 56 c 57 REAL pdt 58 c 59 REAL pvcov(ip1jm,llm),pucov(ip1jmp1,llm) 60 REAL pteta(ip1jmp1,llm),pq(ip1jmp1,llm,nqtot),pps(ip1jmp1) 61 c 62 REAL pdvfi(ip1jm,llm),pdufi(ip1jmp1,llm) 63 REAL pdqfi(ip1jmp1,llm,nqtot),pdhfi(ip1jmp1,llm),pdpfi(ip1jmp1) 64 c 65 LOGICAL leapf,forward 57 REAL,INTENT(IN) :: pdt ! time step for the integration (s) 58 c 59 REAL,INTENT(INOUT) :: pvcov(ip1jm,llm) ! covariant meridional wind 60 REAL,INTENT(INOUT) :: pucov(ip1jmp1,llm) ! covariant zonal wind 61 REAL,INTENT(INOUT) :: pteta(ip1jmp1,llm) ! potential temperature 62 REAL,INTENT(INOUT) :: pq(ip1jmp1,llm,nqtot) ! tracers 63 REAL,INTENT(INOUT) :: pps(ip1jmp1) ! surface pressure (Pa) 64 c respective tendencies (.../s) to add 65 REAL,INTENT(IN) :: pdvfi(ip1jm,llm) 66 REAL,INTENT(IN) :: pdufi(ip1jmp1,llm) 67 REAL,INTENT(IN) :: pdqfi(ip1jmp1,llm,nqtot) 68 REAL,INTENT(IN) :: pdhfi(ip1jmp1,llm) 69 REAL,INTENT(IN) :: pdpfi(ip1jmp1) 70 c 71 LOGICAL,INTENT(IN) :: leapf,forward ! not used 66 72 c 67 73 c … … 71 77 REAL xpn(iim),xps(iim),tpn,tps 72 78 INTEGER j,k,iq,ij 73 REAL qtestw, qtestt 74 PARAMETER ( qtestw = 1.0e-15 ) 75 PARAMETER ( qtestt = 1.0e-40 ) 79 REAL,PARAMETER :: qtestw = 1.0e-15 80 REAL,PARAMETER :: qtestt = 1.0e-40 76 81 77 82 REAL SSUM -
LMDZ5/trunk/libf/dyn3dpar/advtrac_p.F90
r1907 r1987 16 16 USE Vampir 17 17 USE times 18 USE infotrac 19 USE control_mod 18 USE infotrac, ONLY: nqtot, iadv 19 USE control_mod, ONLY: iapp_tracvl, day_step, planet_type 20 20 IMPLICIT NONE 21 21 ! … … 34 34 ! Arguments 35 35 !------------------------------------------------------------------- 36 INTEGER,INTENT(OUT) :: iapptrac 37 REAL,INTENT(IN) :: pbaru(ip1jmp1,llm) 38 REAL,INTENT(IN) :: pbarv(ip1jm,llm) 39 REAL,INTENT(INOUT) :: q(ip1jmp1,llm,nqtot) 40 REAL,INTENT(IN) :: masse(ip1jmp1,llm) 41 REAL,INTENT(IN) :: p( ip1jmp1,llmp1 ) 42 REAL,INTENT(IN) :: teta(ip1jmp1,llm) 43 REAL,INTENT(IN) :: pk(ip1jmp1,llm) 44 REAL,INTENT(OUT) :: flxw(ip1jmp1,llm) 45 !------------------------------------------------------------------- 36 46 ! Ajout PPM 37 47 !-------------------------------------------------------- 38 48 REAL massebx(ip1jmp1,llm),masseby(ip1jm,llm) 39 !--------------------------------------------------------40 INTEGER iapptrac41 REAL pbaru(ip1jmp1,llm),pbarv(ip1jm,llm)42 REAL q(ip1jmp1,llm,nqtot),masse(ip1jmp1,llm)43 REAL p( ip1jmp1,llmp1 ),teta(ip1jmp1,llm)44 REAL pk(ip1jmp1,llm)45 REAL :: flxw(ip1jmp1,llm)46 47 49 !------------------------------------------------------------- 48 50 ! Variables locales -
LMDZ5/trunk/libf/dyn3dpar/caldyn_p.F
r1907 r1987 1 1 ! 2 ! $Header$ 3 ! 4 c 5 c 2 ! $Id$ 3 ! 6 4 #undef DEBUG_IO 7 c#define DEBUG_IO5 !#define DEBUG_IO 8 6 9 7 SUBROUTINE caldyn_p … … 15 13 IMPLICIT NONE 16 14 17 c=======================================================================18 c 19 cAuteur : P. Le Van20 c 21 cObjet:22 c------23 c 24 cCalcul des tendances dynamiques.25 c 26 cModif 04/93 F.Forget27 c=======================================================================28 29 c-----------------------------------------------------------------------30 c0. Declarations:31 c----------------15 !======================================================================= 16 ! 17 ! Auteur : P. Le Van 18 ! 19 ! Objet: 20 ! ------ 21 ! 22 ! Calcul des tendances dynamiques. 23 ! 24 ! Modif 04/93 F.Forget 25 !======================================================================= 26 27 !----------------------------------------------------------------------- 28 ! 0. Declarations: 29 ! ---------------- 32 30 33 31 #include "dimensions.h" … … 37 35 #include "comgeom.h" 38 36 39 c Arguments: 40 c ---------- 41 42 LOGICAL conser 43 44 INTEGER itau 45 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm),teta(ip1jmp1,llm) 46 REAL ps(ip1jmp1),phis(ip1jmp1) 47 REAL pk(iip1,jjp1,llm),pkf(ip1jmp1,llm) 37 ! Arguments: 38 ! ---------- 39 40 LOGICAL,INTENT(IN) :: conser ! triggers printing some diagnostics 41 INTEGER,INTENT(IN) :: itau ! time step index 42 REAL,INTENT(IN) :: vcov(ip1jm,llm) ! covariant meridional wind 43 REAL,INTENT(IN) :: ucov(ip1jmp1,llm) ! covariant zonal wind 44 REAL,INTENT(IN) :: teta(ip1jmp1,llm) ! potential temperature 45 REAL,INTENT(IN) :: ps(ip1jmp1) ! surface pressure 46 REAL,INTENT(IN) :: phis(ip1jmp1) ! geopotential at the surface 47 REAL,INTENT(IN) :: pk(ip1jmp1,llm) ! Exner at mid-layer 48 REAL,INTENT(IN) :: pkf(ip1jmp1,llm) ! filtered Exner 49 REAL,INTENT(IN) :: phi(ip1jmp1,llm) ! geopotential 50 REAL,INTENT(OUT) :: masse(ip1jmp1,llm) ! air mass 51 REAL,INTENT(OUT) :: dv(ip1jm,llm) ! tendency on vcov 52 REAL,INTENT(OUT) :: du(ip1jmp1,llm) ! tendency on ucov 53 REAL,INTENT(OUT) :: dteta(ip1jmp1,llm) ! tenddency on teta 54 REAL,INTENT(OUT) :: dp(ip1jmp1) ! tendency on ps 55 REAL,INTENT(OUT) :: w(ip1jmp1,llm) ! vertical velocity 56 REAL,INTENT(OUT) :: pbaru(ip1jmp1,llm) ! mass flux in the zonal direction 57 REAL,INTENT(OUT) :: pbarv(ip1jm,llm) ! mass flux in the meridional direction 58 REAL,INTENT(IN) :: time ! current time 59 60 ! Local: 61 ! ------ 62 48 63 REAL,SAVE :: vcont(ip1jm,llm),ucont(ip1jmp1,llm) 49 REAL phi(ip1jmp1,llm),masse(ip1jmp1,llm)50 REAL dv(ip1jm,llm),du(ip1jmp1,llm)51 REAL dteta(ip1jmp1,llm),dp(ip1jmp1)52 REAL w(ip1jmp1,llm)53 REAL pbaru(ip1jmp1,llm),pbarv(ip1jm,llm)54 REAL time55 56 c Local:57 c ------58 59 64 REAL,SAVE :: ang(ip1jmp1,llm) 60 65 REAL,SAVE :: p(ip1jmp1,llmp1) … … 68 73 INTEGER ij,l,ijb,ije,ierr 69 74 70 c----------------------------------------------------------------------- 71 c Calcul des tendances dynamiques: 72 c -------------------------------- 75 !----------------------------------------------------------------------- 76 ! Compute dynamical tendencies: 77 !-------------------------------- 78 79 ! compute contravariant winds ucont() and vcont 73 80 CALL covcont_p ( llm , ucov , vcov , ucont, vcont ) 81 ! compute pressure p() 74 82 CALL pression_p ( ip1jmp1, ap , bp , ps , p ) 75 cym CALL psextbar ( ps , psexbarxy ) 76 c$OMP BARRIER 83 !ym CALL psextbar ( ps , psexbarxy ) 84 !$OMP BARRIER 85 ! compute mass in each atmospheric mesh: masse() 77 86 CALL massdair_p ( p , masse ) 87 ! compute X and Y-averages of mass, massebx() and masseby() 78 88 CALL massbar_p ( masse, massebx , masseby ) 89 ! compute XY-average of mass, massebxy() 79 90 call massbarxy_p( masse, massebxy ) 91 ! compute mass fluxes pbaru() and pbarv() 80 92 CALL flumass_p ( massebx, masseby , vcont, ucont ,pbaru, pbarv ) 93 ! compute dteta() , horizontal converging flux of theta 81 94 CALL dteta1_p ( teta , pbaru , pbarv, dteta ) 95 ! compute convm(), horizontal converging flux of mass 82 96 CALL convmas1_p ( pbaru, pbarv , convm ) 83 c$OMP BARRIER97 !$OMP BARRIER 84 98 CALL convmas2_p ( convm ) 85 c$OMP BARRIER99 !$OMP BARRIER 86 100 #ifdef DEBUG_IO 87 c$OMP BARRIER88 c$OMP MASTER101 !$OMP BARRIER 102 !$OMP MASTER 89 103 call WriteField_p('ucont',reshape(ucont,(/iip1,jmp1,llm/))) 90 104 call WriteField_p('vcont',reshape(vcont,(/iip1,jjm,llm/))) … … 98 112 call WriteField_p('dteta',reshape(dteta,(/iip1,jmp1,llm/))) 99 113 call WriteField_p('convm',reshape(convm,(/iip1,jmp1,llm/))) 100 c$OMP END MASTER101 c$OMP BARRIER114 !$OMP END MASTER 115 !$OMP BARRIER 102 116 #endif 103 117 104 c$OMP BARRIER105 c$OMP MASTER118 !$OMP BARRIER 119 !$OMP MASTER 106 120 ijb=ij_begin 107 121 ije=ij_end 108 122 ! compute pressure variation due to mass convergence 109 123 DO ij =ijb, ije 110 124 dp( ij ) = convm( ij,1 ) / airesurg( ij ) 111 125 ENDDO 112 c$OMP END MASTER 113 c$OMP BARRIER 114 c$OMP FLUSH 126 !$OMP END MASTER 127 !$OMP BARRIER 128 !$OMP FLUSH 129 130 ! compute vertical velocity w() 115 131 CALL vitvert_p ( convm , w ) 132 ! compute potential vorticity vorpot() 116 133 CALL tourpot_p ( vcov , ucov , massebxy , vorpot ) 134 ! compute rotation induced du() and dv() 117 135 CALL dudv1_p ( vorpot , pbaru , pbarv , du , dv ) 118 136 119 137 #ifdef DEBUG_IO 120 c$OMP BARRIER121 c$OMP MASTER138 !$OMP BARRIER 139 !$OMP MASTER 122 140 call WriteField_p('w',reshape(w,(/iip1,jmp1,llm/))) 123 141 call WriteField_p('vorpot',reshape(vorpot,(/iip1,jjm,llm/))) 124 142 call WriteField_p('du',reshape(du,(/iip1,jmp1,llm/))) 125 143 call WriteField_p('dv',reshape(dv,(/iip1,jjm,llm/))) 126 c$OMP END MASTER127 c$OMP BARRIER144 !$OMP END MASTER 145 !$OMP BARRIER 128 146 #endif 147 148 ! compute kinetic energy ecin() 129 149 CALL enercin_p ( vcov , ucov , vcont , ucont , ecin ) 150 ! compute Bernouilli function bern() 130 151 CALL bernoui_p ( ip1jmp1, llm , phi , ecin , bern ) 152 ! compute and add du() and dv() contributions from Bernouilli and pressure 131 153 CALL dudv2_p ( teta , pkf , bern , du , dv ) 132 154 133 155 #ifdef DEBUG_IO 134 c$OMP BARRIER135 c$OMP MASTER156 !$OMP BARRIER 157 !$OMP MASTER 136 158 call WriteField_p('ecin',reshape(ecin,(/iip1,jmp1,llm/))) 137 159 call WriteField_p('bern',reshape(bern,(/iip1,jmp1,llm/))) … … 139 161 call WriteField_p('dv',reshape(dv,(/iip1,jjm,llm/))) 140 162 call WriteField_p('pkf',reshape(pkf,(/iip1,jmp1,llm/))) 141 c$OMP END MASTER142 c$OMP BARRIER163 !$OMP END MASTER 164 !$OMP BARRIER 143 165 #endif 144 166 … … 149 171 if (pole_sud) ije=ij_end 150 172 151 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)173 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 152 174 DO l=1,llm 153 175 DO ij=ijb,ije … … 155 177 ENDDO 156 178 ENDDO 157 c$OMP END DO 158 179 !$OMP END DO 180 181 ! compute vertical advection contributions to du(), dv() and dteta() 159 182 CALL advect_new_p(ang,vcov,teta,w,massebx,masseby,du,dv,dteta) 160 183 161 CWARNING probleme de peridocite de dv sur les PC/linux. Pb d'arrondi162 Cprobablement. Observe sur le code compile avec pgf90 3.0-1184 ! WARNING probleme de peridocite de dv sur les PC/linux. Pb d'arrondi 185 ! probablement. Observe sur le code compile avec pgf90 3.0-1 163 186 ijb=ij_begin 164 187 ije=ij_end 165 188 if (pole_sud) ije=ij_end-iip1 166 189 167 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)190 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 168 191 DO l = 1, llm 169 192 DO ij = ijb, ije, iip1 170 193 IF( dv(ij,l).NE.dv(ij+iim,l) ) THEN 171 cPRINT *,'!!!ATTENTION!!! probleme de periodicite sur vcov',172 c, ' dans caldyn'173 cPRINT *,' l, ij = ', l, ij, ij+iim,dv(ij+iim,l),dv(ij,l)194 ! PRINT *,'!!!ATTENTION!!! probleme de periodicite sur vcov', 195 ! , ' dans caldyn' 196 ! PRINT *,' l, ij = ', l, ij, ij+iim,dv(ij+iim,l),dv(ij,l) 174 197 dv(ij+iim,l) = dv(ij,l) 175 198 endif 176 199 enddo 177 200 enddo 178 c$OMP END DO NOWAIT179 c-----------------------------------------------------------------------180 c Sorties eventuelles des variables de controle:181 c ----------------------------------------------201 !$OMP END DO NOWAIT 202 !----------------------------------------------------------------------- 203 ! Output some control variables: 204 !--------------------------------- 182 205 183 206 IF( conser ) THEN 184 cym ---> exige communication collective ( aussi dans advect)207 ! ym ---> exige communication collective ( aussi dans advect) 185 208 CALL sortvarc 186 $( itau,ucov,teta,ps,masse,pk,phis,vorpot,phi,bern,dp,time,vcov )209 & ( itau,ucov,teta,ps,masse,pk,phis,vorpot,phi,bern,dp,time,vcov ) 187 210 188 211 ENDIF 189 212 190 RETURN191 213 END -
LMDZ5/trunk/libf/dyn3dpar/calfis_p.F
r1907 r1987 38 38 Use Write_field_p 39 39 USE Times 40 USE infotrac 41 USE control_mod 40 USE infotrac, ONLY: nqtot, niadv, tname 41 USE control_mod, ONLY: planet_type, nsplit_phys 42 42 43 43 IMPLICIT NONE … … 112 112 c Arguments : 113 113 c ----------- 114 LOGICAL lafin 115 ! REAL heure 116 REAL, intent(in):: jD_cur, jH_cur 117 REAL pvcov(iip1,jjm,llm) 118 REAL pucov(iip1,jjp1,llm) 119 REAL pteta(iip1,jjp1,llm) 120 REAL pmasse(iip1,jjp1,llm) 121 REAL pq(iip1,jjp1,llm,nqtot) 122 REAL pphis(iip1,jjp1) 123 REAL pphi(iip1,jjp1,llm) 124 c 125 REAL pdvcov(iip1,jjm,llm) 126 REAL pducov(iip1,jjp1,llm) 127 REAL pdteta(iip1,jjp1,llm) 128 REAL pdq(iip1,jjp1,llm,nqtot) 129 REAL flxw(iip1,jjp1,llm) ! Flux de masse verticale sur la grille dynamique 130 c 131 REAL pps(iip1,jjp1) 132 REAL pp(iip1,jjp1,llmp1) 133 REAL ppk(iip1,jjp1,llm) 134 c 135 REAL pdvfi(iip1,jjm,llm) 136 REAL pdufi(iip1,jjp1,llm) 137 REAL pdhfi(iip1,jjp1,llm) 138 REAL pdqfi(iip1,jjp1,llm,nqtot) 139 REAL pdpsfi(iip1,jjp1) 140 141 INTEGER longcles 142 PARAMETER ( longcles = 20 ) 143 REAL clesphy0( longcles ) 114 LOGICAL,INTENT(IN) :: lafin ! .true. for the very last call to physics 115 REAL,INTENT(IN) :: jD_cur, jH_cur 116 REAL,INTENT(IN) :: pvcov(iip1,jjm,llm) ! covariant meridional velocity 117 REAL,INTENT(IN) :: pucov(iip1,jjp1,llm) ! covariant zonal velocity 118 REAL,INTENT(IN) :: pteta(iip1,jjp1,llm) ! potential temperature 119 REAL,INTENT(IN) :: pmasse(iip1,jjp1,llm) ! mass in each cell ! not used 120 REAL,INTENT(IN) :: pq(iip1,jjp1,llm,nqtot) ! tracers 121 REAL,INTENT(IN) :: pphis(iip1,jjp1) ! surface geopotential 122 REAL,INTENT(IN) :: pphi(iip1,jjp1,llm) ! geopotential 123 124 REAL,INTENT(IN) :: pdvcov(iip1,jjm,llm) ! dynamical tendency on vcov ! not used 125 REAL,INTENT(IN) :: pducov(iip1,jjp1,llm) ! dynamical tendency on ucov 126 REAL,INTENT(IN) :: pdteta(iip1,jjp1,llm) ! dynamical tendency on teta 127 ! NB: pdteta is used only to compute pcvgt which is in fact not used... 128 REAL,INTENT(IN) :: pdq(iip1,jjp1,llm,nqtot) ! dynamical tendency on tracers 129 ! NB: pdq is only used to compute pcvgq which is in fact not used... 130 131 REAL,INTENT(IN) :: pps(iip1,jjp1) ! surface pressure (Pa) 132 REAL,INTENT(IN) :: pp(iip1,jjp1,llmp1) ! pressure at mesh interfaces (Pa) 133 REAL,INTENT(IN) :: ppk(iip1,jjp1,llm) ! Exner at mid-layer 134 REAL,INTENT(IN) :: flxw(iip1,jjp1,llm) ! Vertical mass flux on dynamics grid 135 136 ! tendencies (in */s) from the physics 137 REAL,INTENT(OUT) :: pdvfi(iip1,jjm,llm) ! tendency on covariant meridional wind 138 REAL,INTENT(OUT) :: pdufi(iip1,jjp1,llm) ! tendency on covariant zonal wind 139 REAL,INTENT(OUT) :: pdhfi(iip1,jjp1,llm) ! tendency on potential temperature (K/s) 140 REAL,INTENT(OUT) :: pdqfi(iip1,jjp1,llm,nqtot) ! tendency on tracers 141 REAL,INTENT(OUT) :: pdpsfi(iip1,jjp1) ! tendency on surface pressure (Pa/s) 142 143 INTEGER,PARAMETER :: longcles = 20 144 REAL,INTENT(IN) :: clesphy0( longcles ) ! unused 144 145 145 146 #ifdef CPP_PHYS … … 217 218 c 218 219 cIM diagnostique PVteta, Amip2 219 INTEGER ntetaSTD 220 PARAMETER(ntetaSTD=3) 221 REAL rtetaSTD(ntetaSTD) 222 DATA rtetaSTD/350., 380., 405./ ! Earth-specific values, beware !! 220 INTEGER,PARAMETER :: ntetaSTD=3 221 REAL,SAVE :: rtetaSTD(ntetaSTD)=(/350.,380.,405./) ! Earth-specific, beware !! 223 222 REAL PVteta(klon,ntetaSTD) 224 223 225 226 224 REAL SSUM 227 225 228 LOGICAL firstcal, debut 229 DATA firstcal/.true./ 230 SAVE firstcal,debut 226 LOGICAL,SAVE :: firstcal=.true., debut=.true. 231 227 c$OMP THREADPRIVATE(firstcal,debut) 232 228 -
LMDZ5/trunk/libf/dyn3dpar/dissip_p.F
r1907 r1987 1 ! 2 ! $Id$ 3 ! 1 4 SUBROUTINE dissip_p( vcov,ucov,teta,p, dv,du,dh ) 2 5 c … … 34 37 c ---------- 35 38 36 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm),teta(ip1jmp1,llm) 37 REAL p( ip1jmp1,llmp1 ) 38 REAL dv(ip1jm,llm),du(ip1jmp1,llm),dh(ip1jmp1,llm) 39 REAL,INTENT(IN) :: vcov(ip1jm,llm) ! covariant meridional wind 40 REAL,INTENT(IN) :: ucov(ip1jmp1,llm) ! covariant zonal wind 41 REAL,INTENT(IN) :: teta(ip1jmp1,llm) ! potentail temperature 42 REAL,INTENT(IN) :: p(ip1jmp1,llmp1) ! pressure 43 ! tendencies (.../s) on covariant winds and potential temperature 44 REAL,INTENT(OUT) :: dv(ip1jm,llm) 45 REAL,INTENT(OUT) :: du(ip1jmp1,llm) 46 REAL,INTENT(OUT) :: dh(ip1jmp1,llm) 39 47 40 48 c Local: -
LMDZ5/trunk/libf/dyn3dpar/leapfrog_p.F
r1907 r1987 17 17 USE vampir 18 18 USE timer_filtre, ONLY : print_filtre_timer 19 USE infotrac 19 USE infotrac, ONLY: nqtot 20 20 USE guide_p_mod, ONLY : guide_main 21 21 USE getparam 22 USE control_mod 23 22 USE control_mod, ONLY: nday, day_step, planet_type, offline, 23 & iconser, iphysiq, iperiod, dissip_period, 24 & iecri, ip_ebil_dyn, ok_dynzon, ok_dyn_ins, 25 & periodav, ok_dyn_ave, output_grads_dyn, 26 & iapp_tracvl 24 27 IMPLICIT NONE 25 28 … … 70 73 #include "academic.h" 71 74 72 INTEGER longcles 73 PARAMETER ( longcles = 20 ) 74 REAL clesphy0( longcles ) 75 INTEGER,PARAMETER :: longcles = 20 76 REAL,INTENT(IN) :: clesphy0( longcles ) ! not used 77 REAL,INTENT(IN) :: time_0 ! not used 78 79 c dynamical variables: 80 REAL,INTENT(INOUT) :: ucov(ip1jmp1,llm) ! zonal covariant wind 81 REAL,INTENT(INOUT) :: vcov(ip1jm,llm) ! meridional covariant wind 82 REAL,INTENT(INOUT) :: teta(ip1jmp1,llm) ! potential temperature 83 REAL,INTENT(INOUT) :: ps(ip1jmp1) ! surface pressure (Pa) 84 REAL,INTENT(INOUT) :: masse(ip1jmp1,llm) ! air mass 85 REAL,INTENT(INOUT) :: phis(ip1jmp1) ! geopotentiat at the surface 86 REAL,INTENT(INOUT) :: q(ip1jmp1,llm,nqtot) ! advected tracers 87 88 REAL,SAVE :: p (ip1jmp1,llmp1 ) ! interlayer pressure 89 REAL,SAVE :: pks(ip1jmp1) ! exner at the surface 90 REAL,SAVE :: pk(ip1jmp1,llm) ! exner at mid-layer 91 REAL,SAVE :: pkf(ip1jmp1,llm) ! filtered exner at mid-layer 92 REAL,SAVE :: phi(ip1jmp1,llm) ! geopotential 93 REAL,SAVE :: w(ip1jmp1,llm) ! vertical velocity 75 94 76 95 real zqmin,zqmax 77 78 c variables dynamiques79 REAL :: vcov(ip1jm,llm),ucov(ip1jmp1,llm) ! vents covariants80 REAL :: teta(ip1jmp1,llm) ! temperature potentielle81 REAL :: q(ip1jmp1,llm,nqtot) ! champs advectes82 REAL :: ps(ip1jmp1) ! pression au sol83 REAL,SAVE :: p (ip1jmp1,llmp1 ) ! pression aux interfac.des couches84 REAL,SAVE :: pks(ip1jmp1) ! exner au sol85 REAL,SAVE :: pk(ip1jmp1,llm) ! exner au milieu des couches86 REAL,SAVE :: pkf(ip1jmp1,llm) ! exner filt.au milieu des couches87 REAL :: masse(ip1jmp1,llm) ! masse d'air88 REAL :: phis(ip1jmp1) ! geopotentiel au sol89 REAL,SAVE :: phi(ip1jmp1,llm) ! geopotentiel90 REAL,SAVE :: w(ip1jmp1,llm) ! vitesse verticale91 96 92 97 c variables dynamiques intermediaire pour le transport … … 123 128 124 129 REAL SSUM 125 REAL time_0126 130 ! REAL,SAVE :: finvmaold(ip1jmp1,llm) 127 131 … … 603 607 604 608 IF( forward. OR . leapf ) THEN 605 cc$OMP PARALLEL DEFAULT(SHARED) 606 c 609 ! Ehouarn: NB: fields sent to advtrac are those at the beginning of the time step 607 610 CALL caladvtrac_p(q,pbaru,pbarv, 608 611 * p, masse, dq, teta, … … 616 619 617 620 ENDIF ! of IF( forward. OR . leapf ) 618 cc$OMP END PARALLEL619 621 620 622 c----------------------------------------------------------------------- … … 907 909 $ ucov, vcov, teta , q ,ps , 908 910 $ dufi, dvfi, dtetafi , dqfi ,dpfi ) 909 911 ! since addfi updates ps(), also update p(), masse() and pk() 912 CALL pression_p(ip1jmp1,ap,bp,ps,p) 913 c$OMP BARRIER 914 CALL massdair_p(p,masse) 915 c$OMP BARRIER 916 if (pressure_exner) then 917 CALL exner_hyb_p(ip1jmp1,ps,p,alpha,beta,pks,pk,pkf) 918 else 919 CALL exner_milieu_p(ip1jmp1,ps,p,beta,pks,pk,pkf) 920 endif 921 c$OMP BARRIER 922 910 923 IF (ok_strato) THEN 911 924 CALL top_bound_p(vcov,ucov,teta,masse,dtphys) … … 1044 1057 CALL exner_milieu_p( ip1jmp1, ps, p, beta, pks, pk, pkf ) 1045 1058 endif 1059 c$OMP BARRIER 1060 CALL massdair_p(p,masse) 1046 1061 c$OMP BARRIER 1047 1062
Note: See TracChangeset
for help on using the changeset viewer.