- Timestamp:
- Feb 25, 2014, 10:59:48 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DOC/chantiers/commit_importants.log
r1107 r1189 1318 1318 Some Mars-specific variables (ecritphy,ecritstart,timestart) added in 1319 1319 control_mod.F and (hour_ini) in temps.h 1320 1320 1321 ********************** 1322 **** commit_v1189 **** 1323 ********************** 1324 Ehouarn : updates in the dynamics: 1325 - Correctly account for the change in pressure, masse, etc. after modifying surface 1326 pressure following a call to the physics 1327 - Corrected tracer advection, which is computed using values at the beginning of the 1328 time step, so it is done at Matsuno forward step. 1329 -
trunk/LMDZ.COMMON/libf/dyn3d/addfi.F
r7 r1189 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 -
trunk/LMDZ.COMMON/libf/dyn3d/advtrac.F90
r1019 r1189 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 -
trunk/LMDZ.COMMON/libf/dyn3d/caldyn.F
r5 r1189 1 1 ! 2 ! $ Header$2 ! $Id: $ 3 3 ! 4 c5 c6 4 SUBROUTINE caldyn 7 5 $ (itau,ucov,vcov,teta,ps,masse,pk,pkf,tsurpk,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) :: tsurpk(ip1jmp1,llm) ! cpp * temperature / pk 45 REAL,INTENT(IN) :: phi(ip1jmp1,llm) ! geopotential 46 REAL,INTENT(OUT) :: masse(ip1jmp1,llm) ! air mass 47 REAL,INTENT(OUT) :: dv(ip1jm,llm) ! tendency on vcov 48 REAL,INTENT(OUT) :: du(ip1jmp1,llm) ! tendency on ucov 49 REAL,INTENT(OUT) :: dteta(ip1jmp1,llm) ! tenddency on teta 50 REAL,INTENT(OUT) :: dp(ip1jmp1) ! tendency on ps 51 REAL,INTENT(OUT) :: w(ip1jmp1,llm) ! vertical velocity 52 REAL,INTENT(OUT) :: pbaru(ip1jmp1,llm) ! mass flux in the zonal direction 53 REAL,INTENT(OUT) :: pbarv(ip1jm,llm) ! mass flux in the meridional direction 54 REAL,INTENT(IN) :: time ! current time 38 55 39 INTEGER itau 40 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm),teta(ip1jmp1,llm) 41 REAL ps(ip1jmp1),phis(ip1jmp1) 42 REAL pk(ip1jmp1,llm),pkf(ip1jmp1,llm) 43 REAL tsurpk(ip1jmp1,llm) 56 ! Local: 57 ! ------ 58 44 59 REAL vcont(ip1jm,llm),ucont(ip1jmp1,llm) 45 REAL phi(ip1jmp1,llm),masse(ip1jmp1,llm)46 REAL dv(ip1jm,llm),du(ip1jmp1,llm)47 REAL dteta(ip1jmp1,llm),dp(ip1jmp1)48 REAL pbaru(ip1jmp1,llm),pbarv(ip1jm,llm)49 REAL time50 51 c Local:52 c ------53 54 60 REAL ang(ip1jmp1,llm),p(ip1jmp1,llmp1) 55 61 REAL massebx(ip1jmp1,llm),masseby(ip1jm,llm),psexbarxy(ip1jm) 56 62 REAL vorpot(ip1jm,llm) 57 REAL w(ip1jmp1,llm),ecin(ip1jmp1,llm),convm(ip1jmp1,llm)63 REAL ecin(ip1jmp1,llm),convm(ip1jmp1,llm) 58 64 REAL bern(ip1jmp1,llm) 59 65 REAL massebxy(ip1jm,llm) … … 62 68 INTEGER ij,l 63 69 64 c-----------------------------------------------------------------------65 c Calcul des tendances dynamiques:66 c--------------------------------70 !----------------------------------------------------------------------- 71 ! Compute dynamical tendencies: 72 !-------------------------------- 67 73 74 ! compute contravariant winds ucont() and vcont 68 75 CALL covcont ( llm , ucov , vcov , ucont, vcont ) 76 ! compute pressure p() 69 77 CALL pression ( ip1jmp1, ap , bp , ps , p ) 78 ! compute psexbarxy() XY-area weighted-averaged surface pressure (what for?) 70 79 CALL psextbar ( ps , psexbarxy ) 80 ! compute mass in each atmospheric mesh: masse() 71 81 CALL massdair ( p , masse ) 82 ! compute X and Y-averages of mass, massebx() and masseby() 72 83 CALL massbar ( masse, massebx , masseby ) 84 ! compute XY-average of mass, massebxy() 73 85 call massbarxy( masse, massebxy ) 86 ! compute mass fluxes pbaru() and pbarv() 74 87 CALL flumass ( massebx, masseby , vcont, ucont ,pbaru, pbarv ) 88 ! compute dteta() , horizontal converging flux of theta 75 89 CALL dteta1 ( teta , pbaru , pbarv, dteta ) 90 ! compute convm(), horizontal converging flux of mass 76 91 CALL convmas ( pbaru, pbarv , convm ) 77 92 93 ! compute pressure variation due to mass convergence 78 94 DO ij =1, ip1jmp1 79 95 dp( ij ) = convm( ij,1 ) / airesurg( ij ) 80 96 ENDDO 81 97 98 ! compute vertical velocity w() 82 99 CALL vitvert ( convm , w ) 100 ! compute potential vorticity vorpot() 83 101 CALL tourpot ( vcov , ucov , massebxy , vorpot ) 102 ! compute rotation induced du() and dv() 84 103 CALL dudv1 ( vorpot , pbaru , pbarv , du , dv ) 104 ! compute kinetic energy ecin() 85 105 CALL enercin ( vcov , ucov , vcont , ucont , ecin ) 106 ! compute Bernouilli function bern() 86 107 CALL bernoui ( ip1jmp1, llm , phi , ecin , bern ) 108 ! compute and add du() and dv() contributions from Bernouilli and pressure 87 109 CALL dudv2 ( tsurpk , pkf , bern , du , dv ) 88 110 … … 94 116 ENDDO 95 117 96 118 ! compute vertical advection contributions to du(), dv() and dteta() 97 119 CALL advect( ang, vcov, teta, w, massebx, masseby, du, dv,dteta ) 98 120 99 CWARNING probleme de peridocite de dv sur les PC/linux. Pb d'arrondi100 Cprobablement. Observe sur le code compile avec pgf90 3.0-1121 ! WARNING probleme de peridocite de dv sur les PC/linux. Pb d'arrondi 122 ! probablement. Observe sur le code compile avec pgf90 3.0-1 101 123 102 124 DO l = 1, llm 103 125 DO ij = 1, ip1jm, iip1 104 126 IF( dv(ij,l).NE.dv(ij+iim,l) ) THEN 105 cPRINT *,'!!!ATTENTION!!! probleme de periodicite sur vcov',106 c, ' dans caldyn'107 cPRINT *,' l, ij = ', l, ij, ij+iim,dv(ij+iim,l),dv(ij,l)127 ! PRINT *,'!!!ATTENTION!!! probleme de periodicite sur vcov', 128 ! , ' dans caldyn' 129 ! PRINT *,' l, ij = ', l, ij, ij+iim,dv(ij+iim,l),dv(ij,l) 108 130 dv(ij+iim,l) = dv(ij,l) 109 131 endif 110 132 enddo 111 133 enddo 112 c----------------------------------------------------------------------- 113 c Sorties eventuelles des variables de controle: 114 c ---------------------------------------------- 134 135 !----------------------------------------------------------------------- 136 ! Output some control variables: 137 !--------------------------------- 115 138 116 139 IF( conser ) THEN … … 120 143 ENDIF 121 144 122 RETURN123 145 END -
trunk/LMDZ.COMMON/libf/dyn3d/calfis.F
r1129 r1189 29 29 c Auteur : P. Le Van, F. Hourdin 30 30 c ......... 31 USE infotrac 32 USE control_mod 31 USE infotrac, ONLY: nqtot, niadv, tname 32 USE control_mod, ONLY: planet_type, nsplit_phys 33 33 USE write_field 34 34 USE cpdet_mod, only: t2tpot,tpot2t … … 106 106 c Arguments : 107 107 c ----------- 108 LOGICAL lafin 109 110 111 REAL pvcov(iip1,jjm,llm) 112 REAL pucov(iip1,jjp1,llm) 113 REAL pteta(iip1,jjp1,llm) 114 REAL pmasse(iip1,jjp1,llm) 115 REAL pq(iip1,jjp1,llm,nqtot) 116 REAL pphis(iip1,jjp1) 117 REAL pphi(iip1,jjp1,llm) 118 119 REAL pdvcov(iip1,jjm,llm) 120 REAL pducov(iip1,jjp1,llm) 121 REAL pdteta(iip1,jjp1,llm) 108 LOGICAL,INTENT(IN) :: lafin ! .true. for the very last call to physics 109 REAL,INTENT(IN) :: jD_cur, jH_cur 110 REAL,INTENT(IN) :: pvcov(iip1,jjm,llm) ! covariant meridional velocity 111 REAL,INTENT(IN) :: pucov(iip1,jjp1,llm) ! covariant zonal velocity 112 REAL,INTENT(IN) :: pteta(iip1,jjp1,llm) ! potential temperature 113 REAL,INTENT(IN) :: pmasse(iip1,jjp1,llm) ! mass in each cell ! not used 114 REAL,INTENT(IN) :: pq(iip1,jjp1,llm,nqtot) ! tracers 115 REAL,INTENT(IN) :: pphis(iip1,jjp1) ! surface geopotential 116 REAL,INTENT(IN) :: pphi(iip1,jjp1,llm) ! geopotential 117 118 REAL,INTENT(IN) :: pdvcov(iip1,jjm,llm) ! dynamical tendency on vcov 119 REAL,INTENT(IN) :: pducov(iip1,jjp1,llm) ! dynamical tendency on ucov 120 REAL,INTENT(IN) :: pdteta(iip1,jjp1,llm) ! dynamical tendency on teta 122 121 ! commentaire SL: pdq ne sert que pour le calcul de pcvgq, 123 122 ! qui lui meme ne sert a rien dans la routine telle qu'elle est 124 123 ! ecrite, et que j'ai donc commente.... 125 REAL pdq(iip1,jjp1,llm,nqtot) 126 127 REAL pps(iip1,jjp1) 128 REAL pp(iip1,jjp1,llmp1) 129 REAL ppk(iip1,jjp1,llm) 130 131 c TENDENCIES in */s 132 REAL pdvfi(iip1,jjm,llm) 133 REAL pdufi(iip1,jjp1,llm) 134 REAL pdhfi(iip1,jjp1,llm) 135 REAL pdqfi(iip1,jjp1,llm,nqtot) 136 REAL pdpsfi(iip1,jjp1) 124 REAL,INTENT(IN) :: pdq(iip1,jjp1,llm,nqtot) ! dynamical tendency on tracers 125 ! NB: pdq is only used to compute pcvgq which is in fact not used... 126 127 REAL,INTENT(IN) :: pps(iip1,jjp1) ! surface pressure (Pa) 128 REAL,INTENT(IN) :: pp(iip1,jjp1,llmp1) ! pressure at mesh interfaces (Pa) 129 REAL,INTENT(IN) :: ppk(iip1,jjp1,llm) ! Exner at mid-layer 130 REAL,INTENT(IN) :: flxw(iip1,jjp1,llm) ! Vertical mass flux on dynamics grid 131 132 ! tendencies (in */s) from the physics 133 REAL,INTENT(OUT) :: pdvfi(iip1,jjm,llm) ! tendency on covariant meridional wind 134 REAL,INTENT(OUT) :: pdufi(iip1,jjp1,llm) ! tendency on covariant zonal wind 135 REAL,INTENT(OUT) :: pdhfi(iip1,jjp1,llm) ! tendency on potential temperature (K/s) 136 REAL,INTENT(OUT) :: pdqfi(iip1,jjp1,llm,nqtot) ! tendency on tracers 137 REAL,INTENT(OUT) :: pdpsfi(iip1,jjp1) ! tendency on surface pressure (Pa/s) 137 138 138 139 … … 173 174 174 175 cIM diagnostique PVteta, Amip2 175 INTEGER ntetaSTD 176 PARAMETER(ntetaSTD=3) 177 REAL rtetaSTD(ntetaSTD) 178 DATA rtetaSTD/350., 380., 405./ ! Earth-specific values, beware !! 176 INTEGER,PARAMETER :: ntetaSTD=3 177 REAL,SAVE :: rtetaSTD(ntetaSTD)=(/350.,380.,405./) ! Earth-specific, beware !! 179 178 REAL PVteta(ngridmx,ntetaSTD) 180 179 181 REAL flxw(iip1,jjp1,llm) ! Flux de masse verticale sur la grille dynamique182 180 REAL flxwfi(ngridmx,llm) ! Flux de masse verticale sur la grille physiq 183 181 184 182 REAL SSUM 185 183 186 LOGICAL firstcal, debut 187 DATA firstcal/.true./ 188 SAVE firstcal,debut 184 LOGICAL,SAVE :: firstcal=.true., debut=.true. 189 185 ! REAL rdayvrai 190 REAL, intent(in):: jD_cur, jH_cur191 186 192 187 LOGICAL tracerdyn ! for generic/mars physics call ; possibly to get rid of -
trunk/LMDZ.COMMON/libf/dyn3d/conf_gcm.F
r1056 r1189 174 174 starttime = 0 175 175 CALL getin('starttime',starttime) 176 176 177 ! Mars: time of start for run in "start.nc" (when there are multiple time 178 ! steps stored in the file) 179 timestart=-9999 ! default value; if <0, use last stored time 180 call getin("timestart",timestart) 181 177 182 !Config Key = less1day 178 183 !Config Desc = Possibilite d'integrer moins d'un jour -
trunk/LMDZ.COMMON/libf/dyn3d/dissip.F
r1 r1189 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: -
trunk/LMDZ.COMMON/libf/dyn3d/leapfrog.F
r1107 r1189 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, only: planet_type,nday,day_step,iperiod,iphysiq,16 USE write_field, ONLY: writefield 17 USE control_mod, ONLY: planet_type,nday,day_step,iperiod,iphysiq, 18 18 & less1day,fractday,ndynstep,iconser, 19 19 & dissip_period,offline,ip_ebil_dyn, … … 75 75 ! #include "clesphys.h" 76 76 77 real zqmin,zqmax 78 79 c variables dynamiques 80 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) ! vents covariants 81 REAL teta(ip1jmp1,llm) ! temperature potentielle 82 REAL q(ip1jmp1,llm,nqtot) ! champs advectes 83 REAL ps(ip1jmp1) ! pression au sol 84 REAL p (ip1jmp1,llmp1 ) ! pression aux interfac.des couches 85 REAL pks(ip1jmp1) ! exner au sol 86 REAL pk(ip1jmp1,llm) ! exner au milieu des couches 87 REAL pkf(ip1jmp1,llm) ! exner filt.au milieu des couches 88 REAL masse(ip1jmp1,llm) ! masse d'air 89 REAL phis(ip1jmp1) ! geopotentiel au sol 90 REAL phi(ip1jmp1,llm) ! geopotentiel 91 REAL w(ip1jmp1,llm) ! vitesse verticale 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 p (ip1jmp1,llmp1 ) ! interlayer pressure 89 REAL pks(ip1jmp1) ! exner at the surface 90 REAL pk(ip1jmp1,llm) ! exner at mid-layer 91 REAL pkf(ip1jmp1,llm) ! filtered exner at mid-layer 92 REAL phi(ip1jmp1,llm) ! geopotential 93 REAL w(ip1jmp1,llm) ! vertical velocity 92 94 ! ADAPTATION GCM POUR CP(T) 93 95 REAL temp(ip1jmp1,llm) ! temperature 94 96 REAL tsurpk(ip1jmp1,llm) ! cpp*T/pk 97 98 real zqmin,zqmax 95 99 96 100 c variables dynamiques intermediaire pour le transport … … 133 137 134 138 REAL SSUM 135 REAL time_0136 139 ! REAL finvmaold(ip1jmp1,llm) 137 140 … … 410 413 c ------------------------------------------------------------- 411 414 412 ! IF( forward. OR . leapf ) THEN 413 ! Ehouarn: NB: at this point p with ps are not synchronized 414 ! (whereas mass and ps are...) 415 IF((.not.forward).OR. leapf ) THEN 416 ! Ehouarn: gather mass fluxes during backward Matsuno or LF step 415 IF( forward. OR . leapf ) THEN 416 ! Ehouarn: NB: fields sent to advtrac are those at the beginning of the time step 417 417 CALL caladvtrac(q,pbaru,pbarv, 418 418 * p, masse, dq, teta, … … 547 547 $ ucov, vcov, teta , q ,ps , 548 548 $ dufi, dvfi, dtetafi , dqfi ,dpfi ) 549 549 ! since addfi updates ps(), also update p(), masse() and pk() 550 CALL pression (ip1jmp1,ap,bp,ps,p) 551 CALL massdair(p,masse) 552 if (pressure_exner) then 553 CALL exner_hyb(ip1jmp1,ps,p,alpha,beta,pks,pk,pkf) 554 else 555 CALL exner_milieu(ip1jmp1,ps,p,beta,pks,pk,pkf) 556 endif 557 550 558 c Couche superieure : 551 559 c ------------------- … … 600 608 CALL exner_milieu( ip1jmp1, ps, p, beta, pks, pk, pkf ) 601 609 endif 602 610 CALL massdair(p,masse) 603 611 604 612 c----------------------------------------------------------------------- -
trunk/LMDZ.COMMON/libf/dyn3dpar/addfi_p.F
r1019 r1189 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 -
trunk/LMDZ.COMMON/libf/dyn3dpar/advtrac_p.F90
r1019 r1189 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 -
trunk/LMDZ.COMMON/libf/dyn3dpar/caldyn_p.F
r1019 r1189 1 1 ! 2 ! $Header$ 3 ! 4 c 5 c 2 ! $Id: $ 3 ! 6 4 #undef DEBUG_IO 7 5 c#define DEBUG_IO … … 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(ip1jmp1,llm),pkf(ip1jmp1,llm) 48 REAL tsurpk(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) :: tsurpk(ip1jmp1,llm) ! cpp * temperature / pk 50 REAL,INTENT(IN) :: phi(ip1jmp1,llm) ! geopotential 51 REAL,INTENT(OUT) :: masse(ip1jmp1,llm) ! air mass 52 REAL,INTENT(OUT) :: dv(ip1jm,llm) ! tendency on vcov 53 REAL,INTENT(OUT) :: du(ip1jmp1,llm) ! tendency on ucov 54 REAL,INTENT(OUT) :: dteta(ip1jmp1,llm) ! tenddency on teta 55 REAL,INTENT(OUT) :: dp(ip1jmp1) ! tendency on ps 56 REAL,INTENT(OUT) :: w(ip1jmp1,llm) ! vertical velocity 57 REAL,INTENT(OUT) :: pbaru(ip1jmp1,llm) ! mass flux in the zonal direction 58 REAL,INTENT(OUT) :: pbarv(ip1jm,llm) ! mass flux in the meridional direction 59 REAL,INTENT(IN) :: time ! current time 60 61 ! Local: 62 ! ------ 63 49 64 REAL,SAVE :: vcont(ip1jm,llm),ucont(ip1jmp1,llm) 50 REAL phi(ip1jmp1,llm),masse(ip1jmp1,llm)51 REAL dv(ip1jm,llm),du(ip1jmp1,llm)52 REAL dteta(ip1jmp1,llm),dp(ip1jmp1)53 REAL w(ip1jmp1,llm)54 REAL pbaru(ip1jmp1,llm),pbarv(ip1jm,llm)55 REAL time56 57 c Local:58 c ------59 60 65 REAL,SAVE :: ang(ip1jmp1,llm) 61 66 REAL,SAVE :: p(ip1jmp1,llmp1) … … 70 75 INTEGER ij,l,ijb,ije,ierr 71 76 72 c----------------------------------------------------------------------- 73 c Calcul des tendances dynamiques: 74 c -------------------------------- 77 !----------------------------------------------------------------------- 78 ! Compute dynamical tendencies: 79 !-------------------------------- 80 81 ! compute contravariant winds ucont() and vcont 75 82 CALL covcont_p ( llm , ucov , vcov , ucont, vcont ) 83 ! compute pressure p() 76 84 CALL pression_p ( ip1jmp1, ap , bp , ps , p ) 77 85 cym CALL psextbar ( ps , psexbarxy ) 78 86 c$OMP BARRIER 87 ! compute mass in each atmospheric mesh: masse() 79 88 CALL massdair_p ( p , masse ) 89 ! compute X and Y-averages of mass, massebx() and masseby() 80 90 CALL massbar_p ( masse, massebx , masseby ) 91 ! compute XY-average of mass, massebxy() 81 92 call massbarxy_p( masse, massebxy ) 93 ! compute mass fluxes pbaru() and pbarv() 82 94 CALL flumass_p ( massebx, masseby , vcont, ucont ,pbaru, pbarv ) 95 ! compute dteta() , horizontal converging flux of theta 83 96 CALL dteta1_p ( teta , pbaru , pbarv, dteta ) 97 ! compute convm(), horizontal converging flux of mass 84 98 CALL convmas1_p ( pbaru, pbarv , convm ) 85 99 c$OMP BARRIER … … 108 122 ijb=ij_begin 109 123 ije=ij_end 110 124 ! compute pressure variation due to mass convergence 111 125 DO ij =ijb, ije 112 126 dp( ij ) = convm( ij,1 ) / airesurg( ij ) … … 115 129 c$OMP BARRIER 116 130 c$OMP FLUSH 131 132 ! compute vertical velocity w() 117 133 CALL vitvert_p ( convm , w ) 134 ! compute potential vorticity vorpot() 118 135 CALL tourpot_p ( vcov , ucov , massebxy , vorpot ) 136 ! compute rotation induced du() and dv() 119 137 CALL dudv1_p ( vorpot , pbaru , pbarv , du , dv ) 120 138 … … 129 147 c$OMP BARRIER 130 148 #endif 149 150 ! compute kinetic energy ecin() 131 151 CALL enercin_p ( vcov , ucov , vcont , ucont , ecin ) 152 ! compute Bernouilli function bern() 132 153 CALL bernoui_p ( ip1jmp1, llm , phi , ecin , bern ) 154 ! compute and add du() and dv() contributions from Bernouilli and pressure 133 155 CALL dudv2_p ( tsurpk , pkf , bern , du , dv ) 134 156 … … 159 181 c$OMP END DO 160 182 183 ! compute vertical advection contributions to du(), dv() and dteta() 161 184 CALL advect_new_p(ang,vcov,teta,w,massebx,masseby,du,dv,dteta) 162 185 … … 190 213 ENDIF 191 214 192 RETURN193 215 END -
trunk/LMDZ.COMMON/libf/dyn3dpar/calfis_p.F
r1129 r1189 37 37 Use Write_field_p 38 38 USE Times 39 USE infotrac 40 USE control_mod 39 USE infotrac, ONLY: nqtot, niadv, tname 40 USE control_mod, ONLY: planet_type, nsplit_phys 41 41 USE cpdet_mod, only: tpot2t_p, t2tpot_p 42 42 … … 116 116 c Arguments : 117 117 c ----------- 118 LOGICAL lafin 119 ! REAL heure 120 REAL, intent(in):: jD_cur, jH_cur 121 REAL pvcov(iip1,jjm,llm) 122 REAL pucov(iip1,jjp1,llm) 123 REAL pteta(iip1,jjp1,llm) 124 REAL pmasse(iip1,jjp1,llm) 125 REAL pq(iip1,jjp1,llm,nqtot) 126 REAL pphis(iip1,jjp1) 127 REAL pphi(iip1,jjp1,llm) 128 129 REAL pdvcov(iip1,jjm,llm) 130 REAL pducov(iip1,jjp1,llm) 131 REAL pdteta(iip1,jjp1,llm) 118 LOGICAL,INTENT(IN) :: lafin ! .true. for the very last call to physics 119 REAL,INTENT(IN) :: jD_cur, jH_cur 120 REAL,INTENT(IN) :: pvcov(iip1,jjm,llm) ! covariant meridional velocity 121 REAL,INTENT(IN) :: pucov(iip1,jjp1,llm) ! covariant zonal velocity 122 REAL,INTENT(IN) :: pteta(iip1,jjp1,llm) ! potential temperature 123 REAL,INTENT(IN) :: pmasse(iip1,jjp1,llm) ! mass in each cell ! not used 124 REAL,INTENT(IN) :: pq(iip1,jjp1,llm,nqtot) ! tracers 125 REAL,INTENT(IN) :: pphis(iip1,jjp1) ! surface geopotential 126 REAL,INTENT(IN) :: pphi(iip1,jjp1,llm) ! geopotential 127 128 REAL,INTENT(IN) :: pdvcov(iip1,jjm,llm) ! dynamical tendency on vcov 129 REAL,INTENT(IN) :: pducov(iip1,jjp1,llm) ! dynamical tendency on ucov 130 REAL,INTENT(IN) :: pdteta(iip1,jjp1,llm) ! dynamical tendency on teta 132 131 ! commentaire SL: pdq ne sert que pour le calcul de pcvgq, 133 132 ! qui lui meme ne sert a rien dans la routine telle qu'elle est 134 133 ! ecrite, et que j'ai donc commente.... 135 REAL pdq(iip1,jjp1,llm,nqtot) 136 REAL flxw(iip1,jjp1,llm) ! Flux de masse verticale sur la grille dynamique 137 138 REAL pps(iip1,jjp1) 139 REAL pp(iip1,jjp1,llmp1) 140 REAL ppk(iip1,jjp1,llm) 141 142 REAL pdvfi(iip1,jjm,llm) 143 REAL pdufi(iip1,jjp1,llm) 144 REAL pdhfi(iip1,jjp1,llm) 145 REAL pdqfi(iip1,jjp1,llm,nqtot) 146 REAL pdpsfi(iip1,jjp1) 134 REAL,INTENT(IN) :: pdq(iip1,jjp1,llm,nqtot) ! dynamical tendency on tracers 135 ! NB: pdq is only used to compute pcvgq which is in fact not used... 136 137 REAL,INTENT(IN) :: pps(iip1,jjp1) ! surface pressure (Pa) 138 REAL,INTENT(IN) :: pp(iip1,jjp1,llmp1) ! pressure at mesh interfaces (Pa) 139 REAL,INTENT(IN) :: ppk(iip1,jjp1,llm) ! Exner at mid-layer 140 REAL,INTENT(IN) :: flxw(iip1,jjp1,llm) ! Vertical mass flux on dynamics grid 141 142 ! tendencies (in */s) from the physics 143 REAL,INTENT(OUT) :: pdvfi(iip1,jjm,llm) ! tendency on covariant meridional wind 144 REAL,INTENT(OUT) :: pdufi(iip1,jjp1,llm) ! tendency on covariant zonal wind 145 REAL,INTENT(OUT) :: pdhfi(iip1,jjp1,llm) ! tendency on potential temperature (K/s) 146 REAL,INTENT(OUT) :: pdqfi(iip1,jjp1,llm,nqtot) ! tendency on tracers 147 REAL,INTENT(OUT) :: pdpsfi(iip1,jjp1) ! tendency on surface pressure (Pa/s) 147 148 148 149 #ifdef CPP_PHYS … … 225 226 226 227 cIM diagnostique PVteta, Amip2 227 INTEGER ntetaSTD 228 PARAMETER(ntetaSTD=3) 229 REAL rtetaSTD(ntetaSTD) 230 DATA rtetaSTD/350., 380., 405./ ! Earth-specific values, beware !! 228 INTEGER,PARAMETER :: ntetaSTD=3 229 REAL,SAVE :: rtetaSTD(ntetaSTD)=(/350.,380.,405./) ! Earth-specific, beware !! 231 230 REAL PVteta(klon,ntetaSTD) 232 231 … … 234 233 REAL SSUM 235 234 236 LOGICAL firstcal, debut 237 DATA firstcal/.true./ 238 SAVE firstcal,debut 235 LOGICAL,SAVE :: firstcal=.true., debut=.true. 239 236 c$OMP THREADPRIVATE(firstcal,debut) 240 237 -
trunk/LMDZ.COMMON/libf/dyn3dpar/conf_gcm.F
r1056 r1189 202 202 CALL getin('starttime',starttime) 203 203 204 ! Mars: time of start for run in "start.nc" (when there are multiple time 205 ! steps stored in the file) 206 timestart=-9999 ! default value; if <0, use last stored time 207 call getin("timestart",timestart) 208 204 209 !Config Key = less1day 205 210 !Config Desc = Possibilite d'integrer moins d'un jour -
trunk/LMDZ.COMMON/libf/dyn3dpar/dissip_p.F
r1019 r1189 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: -
trunk/LMDZ.COMMON/libf/dyn3dpar/leapfrog_p.F
r1107 r1189 83 83 #include "academic.h" 84 84 85 real zqmin,zqmax 86 87 c variables dynamiques 88 REAL :: vcov(ip1jm,llm),ucov(ip1jmp1,llm) ! vents covariants 89 REAL :: teta(ip1jmp1,llm) ! temperature potentielle 90 REAL :: q(ip1jmp1,llm,nqtot) ! champs advectes 91 REAL :: ps(ip1jmp1) ! pression au sol 92 REAL,SAVE :: p (ip1jmp1,llmp1 ) ! pression aux interfac.des couches 93 REAL,SAVE :: pks(ip1jmp1) ! exner au sol 94 REAL,SAVE :: pk(ip1jmp1,llm) ! exner au milieu des couches 95 REAL,SAVE :: pkf(ip1jmp1,llm) ! exner filt.au milieu des couches 96 REAL :: masse(ip1jmp1,llm) ! masse d'air 97 REAL :: phis(ip1jmp1) ! geopotentiel au sol 98 REAL,SAVE :: phi(ip1jmp1,llm) ! geopotentiel 99 REAL,SAVE :: w(ip1jmp1,llm) ! vitesse verticale 85 REAL,INTENT(IN) :: time_0 ! not used 86 87 c dynamical variables: 88 REAL,INTENT(INOUT) :: ucov(ip1jmp1,llm) ! zonal covariant wind 89 REAL,INTENT(INOUT) :: vcov(ip1jm,llm) ! meridional covariant wind 90 REAL,INTENT(INOUT) :: teta(ip1jmp1,llm) ! potential temperature 91 REAL,INTENT(INOUT) :: ps(ip1jmp1) ! surface pressure (Pa) 92 REAL,INTENT(INOUT) :: masse(ip1jmp1,llm) ! air mass 93 REAL,INTENT(INOUT) :: phis(ip1jmp1) ! geopotentiat at the surface 94 REAL,INTENT(INOUT) :: q(ip1jmp1,llm,nqtot) ! advected tracers 95 96 REAL,SAVE :: p (ip1jmp1,llmp1 ) ! interlayer pressure 97 REAL,SAVE :: pks(ip1jmp1) ! exner at the surface 98 REAL,SAVE :: pk(ip1jmp1,llm) ! exner at mid-layer 99 REAL,SAVE :: pkf(ip1jmp1,llm) ! filtered exner at mid-layer 100 REAL,SAVE :: phi(ip1jmp1,llm) ! geopotential 101 REAL,SAVE :: w(ip1jmp1,llm) ! vertical velocity 100 102 ! ADAPTATION GCM POUR CP(T) 101 103 REAL,SAVE :: temp(ip1jmp1,llm) ! temperature 102 104 REAL,SAVE :: tsurpk(ip1jmp1,llm) ! cpp*T/pk 105 106 real zqmin,zqmax 103 107 104 108 c variables dynamiques intermediaire pour le transport … … 144 148 REAL time 145 149 146 REAL SSUM 147 REAL time_0 150 REAL SSUM 148 151 ! REAL,SAVE :: finvmaold(ip1jmp1,llm) 149 152 … … 721 724 c ------------------------------------------------------------- 722 725 723 ! IF( forward. OR . leapf ) THEN 724 IF((.not.forward).OR. leapf ) THEN 725 ! Ehouarn: gather mass fluxes during backward Matsuno or LF step 726 cc$OMP PARALLEL DEFAULT(SHARED) 727 c 726 IF( forward. OR . leapf ) THEN 727 ! Ehouarn: NB: fields sent to advtrac are those at the beginning of the time step 728 728 CALL advtrac_p( pbaru,pbarv, 729 729 * p, masse,q,iapptrac, teta, … … 737 737 738 738 ENDIF ! of IF( forward. OR . leapf ) 739 cc$OMP END PARALLEL740 739 741 740 c----------------------------------------------------------------------- … … 1037 1036 $ ucov, vcov, teta , q ,ps , 1038 1037 $ dufi, dvfi, dtetafi , dqfi ,dpfi ) 1038 ! since addfi updates ps(), also update p(), masse() and pk() 1039 CALL pression_p(ip1jmp1,ap,bp,ps,p) 1040 c$OMP BARRIER 1041 CALL massdair_p(p,masse) 1042 c$OMP BARRIER 1043 if (pressure_exner) then 1044 CALL exner_hyb_p(ip1jmp1,ps,p,alpha,beta,pks,pk,pkf) 1045 else 1046 CALL exner_milieu_p(ip1jmp1,ps,p,beta,pks,pk,pkf) 1047 endif 1048 c$OMP BARRIER 1039 1049 1040 1050 c Couche superieure : … … 1195 1205 CALL exner_milieu_p( ip1jmp1, ps, p, beta, pks, pk, pkf ) 1196 1206 endif 1207 c$OMP BARRIER 1208 CALL massdair_p(p,masse) 1197 1209 c$OMP BARRIER 1198 1210
Note: See TracChangeset
for help on using the changeset viewer.