Changeset 1146 for LMDZ4/trunk
- Timestamp:
- Apr 9, 2009, 12:11:35 PM (16 years ago)
- Location:
- LMDZ4/trunk
- Files:
-
- 22 deleted
- 125 edited
- 25 copied
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/trunk
-
Property
svn:mergeinfo
set to
/LMDZ4/branches/LMDZ4-dev merged eligible
-
Property
svn:mergeinfo
set to
-
LMDZ4/trunk/gcm.def
r524 r1146 1 # 2 # $Header$ 3 # 4 ## nombre de pas par jour (multiple de iperiod) ( ici pour dt = 1 min ) 1 ## nombre de pas par jour (multiple de iperiod) 5 2 day_step=480 6 3 ## periode pour le pas Matsuno (en pas) 7 4 iperiod=5 8 5 ## periode de la dissipation (en pas) 9 idissip= 156 idissip=5 10 7 ## choix de l'operateur de dissipation (star ou non star ) 11 8 lstardis=y 12 9 ## nombre d'iterations de l'operateur de dissipation gradiv 13 nitergdiv= 110 nitergdiv=2 14 11 ## nombre d'iterations de l'operateur de dissipation nxgradrot 15 12 nitergrot=2 … … 17 14 niterh=2 18 15 ## temps de dissipation des plus petites long.d ondes pour u,v (gradiv) 19 tetagdiv= 36000.16 tetagdiv=10800. 20 17 ## temps de dissipation des plus petites long.d ondes pour u,v(nxgradrot) 21 18 tetagrot=18000. … … 27 24 purmats=n 28 25 ## avec ou sans physique 29 ##physic=n 30 iflag_phys=1 26 physic=y 31 27 ## periode de la physique (en pas) 32 28 iphysiq=10 33 29 ## frequence (en jours ) de l'ecriture du fichier histphy 34 ecritphy= 130 ecritphy=30 35 31 ## Cycle diurne ou non 36 32 cycle_diurne=y … … 47 43 ## Nombre d'appels des routines de rayonnements ( par jour) 48 44 nbapp_rad=12 49 ## Flag pour la convection (1 pour LMD, 2 pour Tiedtke, 3 KE, 4 KE vect)50 iflag_con=3 45 ## Facteur multiplication des precip convectives dans KE 46 cvl_corr=1.0 51 47 ## longitude en degres du centre du zoom 52 48 clon=0. -
LMDZ4/trunk/libf/bibio/initdynav.F
r761 r1146 5 5 c 6 6 subroutine initdynav(infile,day0,anne0,tstep,t_ops,t_wrt 7 . , nq,fileid)7 . ,fileid) 8 8 9 9 USE IOIPSL 10 USE infotrac, ONLY : nqtot, ttext 10 11 11 12 implicit none … … 28 29 C t_ops: frequence de l'operation pour IOIPSL 29 30 C t_wrt: frequence d'ecriture sur le fichier 30 C nq: nombre de traceurs31 31 C 32 32 C Sortie: … … 48 48 #include "description.h" 49 49 #include "serre.h" 50 #include "advtrac.h"51 50 52 51 C Arguments … … 56 55 real tstep, t_ops, t_wrt 57 56 integer fileid 58 integer nq59 57 integer thoriid, zvertiid 60 58 … … 136 134 C Traceurs 137 135 C 138 DO iq=1,nq 136 DO iq=1,nqtot 139 137 call histdef(fileid, ttext(iq), ttext(iq), '-', 140 138 . iip1, jjp1, thoriid, llm, 1, llm, zvertiid, -
LMDZ4/trunk/libf/bibio/initfluxsto.F
r761 r1146 3 3 ! 4 4 subroutine initfluxsto 5 . (infile,tstep,t_ops,t_wrt, nq,5 . (infile,tstep,t_ops,t_wrt, 6 6 . fileid,filevid,filedid) 7 7 … … 27 27 C t_ops: frequence de l'operation pour IOIPSL 28 28 C t_wrt: frequence d'ecriture sur le fichier 29 C nq: nombre de traceurs30 29 C 31 30 C Sortie: … … 55 54 real tstep, t_ops, t_wrt 56 55 integer fileid, filevid,filedid 57 integer n q,ndex(1)56 integer ndex(1) 58 57 real nivd(1) 59 58 -
LMDZ4/trunk/libf/bibio/inithist.F
r761 r1146 2 2 ! $Header$ 3 3 ! 4 subroutine inithist(infile,day0,anne0,tstep,t_ops,t_wrt, nq,fileid,4 subroutine inithist(infile,day0,anne0,tstep,t_ops,t_wrt,fileid, 5 5 . filevid) 6 6 7 7 USE IOIPSL 8 USE infotrac, ONLY : nqtot, ttext 8 9 9 10 implicit none … … 47 48 #include "description.h" 48 49 #include "serre.h" 49 #include "advtrac.h"50 50 51 51 C Arguments … … 55 55 real tstep, t_ops, t_wrt 56 56 integer fileid, filevid 57 integer nq58 57 59 58 C Variables locales … … 154 153 C Traceurs 155 154 C 156 DO iq=1,nq 155 DO iq=1,nqtot 157 156 call histdef(fileid, ttext(iq), ttext(iq), '-', 158 157 . iip1, jjp1, thoriid, llm, 1, llm, zvertiid, -
LMDZ4/trunk/libf/bibio/writedynav.F
r524 r1146 2 2 ! $Header$ 3 3 ! 4 subroutine writedynav( histid, nq,time, vcov,4 subroutine writedynav( histid, time, vcov, 5 5 , ucov,teta,ppk,phi,q,masse,ps,phis) 6 6 7 7 USE ioipsl 8 USE infotrac, ONLY : nqtot, ttext 8 9 implicit none 9 10 … … 15 16 C Entree: 16 17 C histid: ID du fichier histoire 17 C nqmx: nombre maxi de traceurs18 18 C time: temps de l'ecriture 19 19 C vcov: vents v covariants … … 45 45 #include "description.h" 46 46 #include "serre.h" 47 #include "advtrac.h"48 47 49 48 C … … 51 50 C 52 51 53 INTEGER histid , nq52 INTEGER histid 54 53 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) 55 54 REAL teta(ip1jmp1*llm),phi(ip1jmp1,llm),ppk(ip1jmp1*llm) 56 55 REAL ps(ip1jmp1),masse(ip1jmp1,llm) 57 56 REAL phis(ip1jmp1) 58 REAL q(ip1jmp1,llm,nq )57 REAL q(ip1jmp1,llm,nqtot) 59 58 integer time 60 59 … … 119 118 C Traceurs 120 119 C 121 DO iq=1,nq 120 DO iq=1,nqtot 122 121 call histwrite(histid, ttext(iq), itau_w, q(:,:,iq), 123 122 . iip1*jjp1*llm, ndex3d) -
LMDZ4/trunk/libf/bibio/writehist.F
r524 r1146 2 2 ! $Header$ 3 3 ! 4 subroutine writehist( histid, histvid, nq,time, vcov,4 subroutine writehist( histid, histvid, time, vcov, 5 5 , ucov,teta,phi,q,masse,ps,phis) 6 6 7 7 USE ioipsl 8 USE infotrac, ONLY : nqtot, ttext 8 9 implicit none 9 10 … … 16 17 C histid: ID du fichier histoire 17 18 C histvid:ID du fichier histoire pour les vents V (appele a disparaitre) 18 C nqmx: nombre maxi de traceurs19 19 C time: temps de l'ecriture 20 20 C vcov: vents v covariants … … 46 46 #include "description.h" 47 47 #include "serre.h" 48 #include "advtrac.h"49 48 50 49 C … … 52 51 C 53 52 54 INTEGER histid, nq,histvid53 INTEGER histid, histvid 55 54 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) 56 55 REAL teta(ip1jmp1,llm),phi(ip1jmp1,llm) 57 56 REAL ps(ip1jmp1),masse(ip1jmp1,llm) 58 57 REAL phis(ip1jmp1) 59 REAL q(ip1jmp1,llm,nq )58 REAL q(ip1jmp1,llm,nqtot) 60 59 integer time 61 60 … … 102 101 C Traceurs 103 102 C 104 DO iq=1,nq 103 DO iq=1,nqtot 105 104 call histwrite(histid, ttext(iq), itau_w, q(:,:,iq), 106 105 . iip1*jjp1*llm, ndexu) -
LMDZ4/trunk/libf/dyn3d/addfi.F
r524 r1146 2 2 ! $Header$ 3 3 ! 4 SUBROUTINE addfi( nq,pdt, leapf, forward,4 SUBROUTINE addfi(pdt, leapf, forward, 5 5 S pucov, pvcov, pteta, pq , pps , 6 6 S pdufi, pdvfi, pdhfi,pdqfi, pdpfi ) 7 8 USE infotrac, ONLY : nqtot 7 9 IMPLICIT NONE 8 10 c … … 52 54 c ----------- 53 55 c 54 INTEGER nq55 56 56 REAL pdt 57 57 c 58 58 REAL pvcov(ip1jm,llm),pucov(ip1jmp1,llm) 59 REAL pteta(ip1jmp1,llm),pq(ip1jmp1,llm,nq ),pps(ip1jmp1)59 REAL pteta(ip1jmp1,llm),pq(ip1jmp1,llm,nqtot),pps(ip1jmp1) 60 60 c 61 61 REAL pdvfi(ip1jm,llm),pdufi(ip1jmp1,llm) 62 REAL pdqfi(ip1jmp1,llm,nq ),pdhfi(ip1jmp1,llm),pdpfi(ip1jmp1)62 REAL pdqfi(ip1jmp1,llm,nqtot),pdhfi(ip1jmp1,llm),pdpfi(ip1jmp1) 63 63 c 64 64 LOGICAL leapf,forward … … 125 125 ENDDO 126 126 127 DO iq = 3, nq 127 DO iq = 3, nqtot 128 128 DO k = 1,llm 129 129 DO j = 1,ip1jmp1 … … 148 148 149 149 150 DO iq = 1, nq 150 DO iq = 1, nqtot 151 151 DO k = 1, llm 152 152 DO ij = 1, iim -
LMDZ4/trunk/libf/dyn3d/advtrac.F
r960 r1146 15 15 c M.A Filiberti (04/2002) 16 16 c 17 USE infotrac 18 17 19 IMPLICIT NONE 18 20 c … … 28 30 #include "ener.h" 29 31 #include "description.h" 30 #include "advtrac.h"31 32 32 33 c------------------------------------------------------------------- … … 39 40 INTEGER iapptrac 40 41 REAL pbaru(ip1jmp1,llm),pbarv(ip1jm,llm) 41 REAL q(ip1jmp1,llm,nq mx),masse(ip1jmp1,llm)42 REAL q(ip1jmp1,llm,nqtot),masse(ip1jmp1,llm) 42 43 REAL p( ip1jmp1,llmp1 ),teta(ip1jmp1,llm) 43 44 REAL pk(ip1jmp1,llm) … … 52 53 REAL pbarug(ip1jmp1,llm),pbarvg(ip1jm,llm),wg(ip1jmp1,llm) 53 54 REAL (kind=kind(1.d0)) :: t_initial, t_final, tps_cpu 54 real cpuadv(nqmx)55 common/cpuadv/cpuadv56 57 55 INTEGER iadvtr 58 56 INTEGER ij,l,iq,iiq … … 69 67 REAL psppm(iim,jjp1) ! pression au sol 70 68 REAL unatppm(iim,jjp1,llm),vnatppm(iim,jjp1,llm) 71 REAL qppm(iim*jjp1,llm,nq mx)69 REAL qppm(iim*jjp1,llm,nqtot) 72 70 REAL fluxwppm(iim,jjp1,llm) 73 71 REAL apppm(llmp1), bpppm(llmp1) … … 153 151 c Appel des sous programmes d'advection 154 152 c----------------------------------------------------------- 155 do iq=1,nq mx153 do iq=1,nqtot 156 154 c call clock(t_initial) 157 155 if(iadv(iq) == 0) cycle -
LMDZ4/trunk/libf/dyn3d/caladvtrac.F
r960 r1146 8 8 * flxw, pk) 9 9 c 10 USE infotrac 10 11 IMPLICIT NONE 11 12 c … … 24 25 #include "comconst.h" 25 26 #include "control.h" 26 #include "advtrac.h"27 27 28 28 c Arguments: 29 29 c ---------- 30 30 REAL pbaru( ip1jmp1,llm ),pbarv( ip1jm,llm),masse(ip1jmp1,llm) 31 REAL p( ip1jmp1,llmp1),q( ip1jmp1,llm,nq mx),dq( ip1jmp1,llm,2 )31 REAL p( ip1jmp1,llmp1),q( ip1jmp1,llm,nqtot),dq( ip1jmp1,llm,2 ) 32 32 REAL teta( ip1jmp1,llm),pk( ip1jmp1,llm) 33 33 REAL :: flxw(ip1jmp1,llm) -
LMDZ4/trunk/libf/dyn3d/calfis.F
r960 r1146 4 4 C 5 5 C 6 SUBROUTINE calfis(nq, 7 $ lafin, 6 SUBROUTINE calfis(lafin, 8 7 $ rdayvrai, 9 8 $ heure, … … 32 31 c Auteur : P. Le Van, F. Hourdin 33 32 c ......... 33 USE infotrac 34 34 35 35 IMPLICIT NONE … … 90 90 #include "paramet.h" 91 91 #include "temps.h" 92 #include "advtrac.h" 93 94 INTEGER ngridmx,nq 92 93 INTEGER ngridmx 95 94 PARAMETER( ngridmx = 2+(jjm-1)*iim - 1/jjm ) 96 95 … … 109 108 REAL pteta(iip1,jjp1,llm) 110 109 REAL pmasse(iip1,jjp1,llm) 111 REAL pq(iip1,jjp1,llm,nq mx)110 REAL pq(iip1,jjp1,llm,nqtot) 112 111 REAL pphis(iip1,jjp1) 113 112 REAL pphi(iip1,jjp1,llm) … … 116 115 REAL pducov(iip1,jjp1,llm) 117 116 REAL pdteta(iip1,jjp1,llm) 118 REAL pdq(iip1,jjp1,llm,nq mx)117 REAL pdq(iip1,jjp1,llm,nqtot) 119 118 c 120 119 REAL pps(iip1,jjp1) … … 125 124 REAL pdufi(iip1,jjp1,llm) 126 125 REAL pdhfi(iip1,jjp1,llm) 127 REAL pdqfi(iip1,jjp1,llm,nq mx)126 REAL pdqfi(iip1,jjp1,llm,nqtot) 128 127 REAL pdpsfi(iip1,jjp1) 129 128 … … 142 141 c 143 142 REAL zufi(ngridmx,llm), zvfi(ngridmx,llm) 144 REAL ztfi(ngridmx,llm),zqfi(ngridmx,llm,nq mx)143 REAL ztfi(ngridmx,llm),zqfi(ngridmx,llm,nqtot) 145 144 c 146 145 REAL pcvgu(ngridmx,llm), pcvgv(ngridmx,llm) … … 148 147 c 149 148 REAL zdufi(ngridmx,llm),zdvfi(ngridmx,llm) 150 REAL zdtfi(ngridmx,llm),zdqfi(ngridmx,llm,nq mx)149 REAL zdtfi(ngridmx,llm),zdqfi(ngridmx,llm,nqtot) 151 150 REAL zdpsrf(ngridmx) 152 151 c … … 275 274 c --------------- 276 275 c 277 DO iq=1,nq 276 DO iq=1,nqtot 278 277 iiq=niadv(iq) 279 278 DO l=1,llm … … 444 443 CALL physiq (ngridmx, 445 444 . llm, 446 . nq,447 445 . debut, 448 446 . lafin, … … 505 503 c --------------------- 506 504 507 DO iq=1,nq mx505 DO iq=1,nqtot 508 506 DO l=1,llm 509 507 DO i=1,iip1 … … 526 524 pdqfi=0. 527 525 C 528 DO iq=1,nq 526 DO iq=1,nqtot 529 527 iiq=niadv(iq) 530 528 DO l=1,llm -
LMDZ4/trunk/libf/dyn3d/comdissip.h
r524 r1146 2 2 ! $Header$ 3 3 ! 4 c-----------------------------------------------------------------------5 c INCLUDEdissip.h4 !----------------------------------------------------------------------- 5 ! INCLUDE comdissip.h 6 6 7 COMMON/comdissip/ 8 $ lstardis,niterdis,coefdis,tetavel,tetatemp,gamdissip7 COMMON/comdissip/ & 8 & niterdis,coefdis,tetavel,tetatemp,gamdissip 9 9 10 10 11 LOGICAL lstardis12 11 INTEGER niterdis 13 12 14 13 REAL tetavel,tetatemp,coefdis,gamdissip 15 14 16 c-----------------------------------------------------------------------15 !----------------------------------------------------------------------- -
LMDZ4/trunk/libf/dyn3d/comgeom.h
r524 r1146 2 2 ! $Header$ 3 3 ! 4 *CDK comgeom5 COMMON/comgeom/ 6 1 cu(ip1jmp1),cv(ip1jm),unscu2(ip1jmp1),unscv2(ip1jm),7 2 aire(ip1jmp1),airesurg(ip1jmp1),aireu(ip1jmp1),8 3 airev(ip1jm),unsaire(ip1jmp1),apoln,apols,9 4 unsairez(ip1jm),airuscv2(ip1jm),airvscu2(ip1jm),10 5 aireij1(ip1jmp1),aireij2(ip1jmp1),aireij3(ip1jmp1),11 6 aireij4(ip1jmp1),alpha1(ip1jmp1),alpha2(ip1jmp1),12 7 alpha3(ip1jmp1),alpha4(ip1jmp1),alpha1p2(ip1jmp1),13 8 alpha1p4(ip1jmp1),alpha2p3(ip1jmp1),alpha3p4(ip1jmp1),14 9 fext(ip1jm),constang(ip1jmp1),rlatu(jjp1),rlatv(jjm),15 1 rlonu(iip1),rlonv(iip1),cuvsurcv(ip1jm),cvsurcuv(ip1jm),16 1 cvusurcu(ip1jmp1),cusurcvu(ip1jmp1),cuvscvgam1(ip1jm),17 2 cuvscvgam2(ip1jm),cvuscugam1(ip1jmp1),18 3 cvuscugam2(ip1jmp1),cvscuvgam(ip1jm),cuscvugam(ip1jmp1),19 4 unsapolnga1,unsapolnga2,unsapolsga1,unsapolsga2,20 5 unsair_gam1(ip1jmp1),unsair_gam2(ip1jmp1),unsairz_gam(ip1jm),21 6aivscu2gam(ip1jm),aiuscv2gam(ip1jm),xprimu(iip1),xprimv(iip1)4 !CDK comgeom 5 COMMON/comgeom/ & 6 & cu(ip1jmp1),cv(ip1jm),unscu2(ip1jmp1),unscv2(ip1jm), & 7 & aire(ip1jmp1),airesurg(ip1jmp1),aireu(ip1jmp1), & 8 & airev(ip1jm),unsaire(ip1jmp1),apoln,apols, & 9 & unsairez(ip1jm),airuscv2(ip1jm),airvscu2(ip1jm), & 10 & aireij1(ip1jmp1),aireij2(ip1jmp1),aireij3(ip1jmp1), & 11 & aireij4(ip1jmp1),alpha1(ip1jmp1),alpha2(ip1jmp1), & 12 & alpha3(ip1jmp1),alpha4(ip1jmp1),alpha1p2(ip1jmp1), & 13 & alpha1p4(ip1jmp1),alpha2p3(ip1jmp1),alpha3p4(ip1jmp1), & 14 & fext(ip1jm),constang(ip1jmp1),rlatu(jjp1),rlatv(jjm), & 15 & rlonu(iip1),rlonv(iip1),cuvsurcv(ip1jm),cvsurcuv(ip1jm), & 16 & cvusurcu(ip1jmp1),cusurcvu(ip1jmp1),cuvscvgam1(ip1jm), & 17 & cuvscvgam2(ip1jm),cvuscugam1(ip1jmp1), & 18 & cvuscugam2(ip1jmp1),cvscuvgam(ip1jm),cuscvugam(ip1jmp1), & 19 & unsapolnga1,unsapolnga2,unsapolsga1,unsapolsga2, & 20 & unsair_gam1(ip1jmp1),unsair_gam2(ip1jmp1),unsairz_gam(ip1jm), & 21 & aivscu2gam(ip1jm),aiuscv2gam(ip1jm),xprimu(iip1),xprimv(iip1) 22 22 23 c 24 REAL 25 1 cu,cv,unscu2,unscv2,aire,airesurg,aireu,airev,unsaire,apoln ,26 2 apols,unsairez,airuscv2,airvscu2,aireij1,aireij2,aireij3,aireij4,27 3 alpha1,alpha2,alpha3,alpha4,alpha1p2,alpha1p4,alpha2p3,alpha3p4 ,28 4 fext,constang,rlatu,rlatv,rlonu,rlonv,cuvscvgam1,cuvscvgam2 ,29 5 cvuscugam1,cvuscugam2,cvscuvgam,cuscvugam,unsapolnga1,unsapolnga230 6 ,unsapolsga1,unsapolsga2,unsair_gam1,unsair_gam2,unsairz_gam ,31 7 aivscu2gam ,aiuscv2gam,cuvsurcv,cvsurcuv,cvusurcu,cusurcvu,xprimu32 8, xprimv33 c 23 ! 24 REAL & 25 & cu,cv,unscu2,unscv2,aire,airesurg,aireu,airev,unsaire,apoln ,& 26 & apols,unsairez,airuscv2,airvscu2,aireij1,aireij2,aireij3,aireij4,& 27 & alpha1,alpha2,alpha3,alpha4,alpha1p2,alpha1p4,alpha2p3,alpha3p4 ,& 28 & fext,constang,rlatu,rlatv,rlonu,rlonv,cuvscvgam1,cuvscvgam2 ,& 29 & cvuscugam1,cvuscugam2,cvscuvgam,cuscvugam,unsapolnga1,unsapolnga2& 30 & ,unsapolsga1,unsapolsga2,unsair_gam1,unsair_gam2,unsairz_gam ,& 31 & aivscu2gam ,aiuscv2gam,cuvsurcv,cvsurcuv,cvusurcu,cusurcvu,xprimu& 32 & , xprimv 33 ! -
LMDZ4/trunk/libf/dyn3d/conf_gcm.F
r1046 r1146 6 6 SUBROUTINE conf_gcm( tapedef, etatinit, clesphy0 ) 7 7 c 8 #ifdef CPP_IOIPSL 8 9 use IOIPSL 10 #else 11 ! if not using IOIPSL, we still need to use (a local version of) getin 12 use ioipsl_getincom 13 #endif 9 14 IMPLICIT NONE 10 15 c----------------------------------------------------------------------- … … 99 104 c Parametres de controle du run: 100 105 c----------------------------------------------------------------------- 106 !Config Key = planet_type 107 !Config Desc = planet type ("earth", "mars", "venus", ...) 108 !Config Def = earth 109 !Config Help = this flag sets the type of atymosphere that is considered 110 planet_type="earth" 111 CALL getin('planet_type',planet_type) 101 112 102 113 !Config Key = dayref … … 179 190 CALL getin('periodav',periodav) 180 191 192 !Config Key = output_grads_dyn 193 !Config Desc = output dynamics diagnostics in 'dyn.dat' file 194 !Config Def = n 195 !Config Help = output dynamics diagnostics in Grads-readable 'dyn.dat' file 196 output_grads_dyn=.false. 197 CALL getin('output_grads_dyn',output_grads_dyn) 198 181 199 !Config Key = idissip 182 200 !Config Desc = periode de la dissipation … … 274 292 c ............................................................... 275 293 294 !Config Key = read_start 295 !Config Desc = Initialize model using a 'start.nc' file 296 !Config Def = y 297 !Config Help = y: intialize dynamical fields using a 'start.nc' file 298 ! n: fields are initialized by 'iniacademic' routine 299 read_start= .true. 300 CALL getin('read_start',read_start) 301 276 302 !Config Key = iflag_phys 277 303 !Config Desc = Avec ls physique … … 330 356 c 331 357 IF( ABS(clat - clatt).GE. 0.001 ) THEN 332 PRINT *,' La valeur de clat passee par run.def est differente de333 *celle lue sur le fichier start '358 write(lunout,*)'conf_gcm: La valeur de clat passee par run.def', 359 & ' est differente de celle lue sur le fichier start ' 334 360 STOP 335 361 ENDIF … … 345 371 346 372 IF( ABS(grossismx - grossismxx).GE. 0.001 ) THEN 347 PRINT *,' La valeur de grossismx passee par run.def est differente348 *de celle lue sur le fichier start '373 write(lunout,*)'conf_gcm: La valeur de grossismx passee par ', 374 & 'run.def est differente de celle lue sur le fichier start ' 349 375 STOP 350 376 ENDIF … … 359 385 360 386 IF( ABS(grossismy - grossismyy).GE. 0.001 ) THEN 361 PRINT *,' La valeur de grossismy passee par run.def est differen362 *te de celle lue sur le fichier start '387 write(lunout,*)'conf_gcm: La valeur de grossismy passee par ', 388 & 'run.def est differente de celle lue sur le fichier start ' 363 389 STOP 364 390 ENDIF 365 391 366 392 IF( grossismx.LT.1. ) THEN 367 PRINT *,' *** ATTENTION !! grossismx < 1 . *** ' 393 write(lunout,*) 394 & 'conf_gcm: *** ATTENTION !! grossismx < 1 . *** ' 368 395 STOP 369 396 ELSE … … 373 400 374 401 IF( grossismy.LT.1. ) THEN 375 PRINT *,' *** ATTENTION !! grossismy < 1 . *** ' 402 write(lunout,*) 403 & 'conf_gcm: *** ATTENTION !! grossismy < 1 . *** ' 376 404 STOP 377 405 ELSE … … 379 407 ENDIF 380 408 381 PRINT *,' alphax alphay defrun',alphax,alphay409 write(lunout,*)'conf_gcm: alphax alphay',alphax,alphay 382 410 c 383 411 c alphax et alphay sont les anciennes formulat. des grossissements … … 394 422 395 423 IF( .NOT.fxyhypb ) THEN 396 397 PRINT *,' ******** PBS DANS DEFRUN******** '398 PRINT *,' *** fxyhypb lu sur le fichier start est F',399 * ' alors qu il est T sur run.def ***'424 IF( fxyhypbb ) THEN 425 write(lunout,*)' ******** PBS DANS CONF_GCM ******** ' 426 write(lunout,*)' *** fxyhypb lu sur le fichier start est ', 427 * 'F alors qu il est T sur run.def ***' 400 428 STOP 401 429 ENDIF 402 430 ELSE 403 404 PRINT *,' ******** PBS DANS DEFRUN******** '405 PRINT *,' *** fxyhypb lu sur le fichier start est T',406 * ' alors qu il est F sur run.def **** '431 IF( .NOT.fxyhypbb ) THEN 432 write(lunout,*)' ******** PBS DANS CONF_GCM ******** ' 433 write(lunout,*)' *** fxyhypb lu sur le fichier start est ', 434 * 'T alors qu il est F sur run.def **** ' 407 435 STOP 408 436 ENDIF 409 437 ENDIF 410 438 c … … 419 447 IF( fxyhypb ) THEN 420 448 IF( ABS(dzoomx - dzoomxx).GE. 0.001 ) THEN 421 PRINT *,' La valeur de dzoomx passee par run.def est differente422 * de celle lue sur le fichier start '449 write(lunout,*)'conf_gcm: La valeur de dzoomx passee par ', 450 * 'run.def est differente de celle lue sur le fichier start ' 423 451 STOP 424 452 ENDIF … … 435 463 IF( fxyhypb ) THEN 436 464 IF( ABS(dzoomy - dzoomyy).GE. 0.001 ) THEN 437 PRINT *,' La valeur de dzoomy passee par run.def est differente438 * de celle lue sur le fichier start '465 write(lunout,*)'conf_gcm: La valeur de dzoomy passee par ', 466 * 'run.def est differente de celle lue sur le fichier start ' 439 467 STOP 440 468 ENDIF … … 450 478 IF( fxyhypb ) THEN 451 479 IF( ABS(taux - tauxx).GE. 0.001 ) THEN 452 PRINT *,' La valeur de taux passee par run.def est differente453 * de celle lue sur le fichier start '480 write(lunout,*)'conf_gcm: La valeur de taux passee par ', 481 * 'run.def est differente de celle lue sur le fichier start ' 454 482 STOP 455 483 ENDIF … … 465 493 IF( fxyhypb ) THEN 466 494 IF( ABS(tauy - tauyy).GE. 0.001 ) THEN 467 PRINT *,' La valeur de tauy passee par run.def est differente468 * de celle lue sur le fichier start '495 write(lunout,*)'conf_gcm: La valeur de tauy passee par ', 496 * 'run.def est differente de celle lue sur le fichier start ' 469 497 STOP 470 498 ENDIF … … 484 512 485 513 IF( .NOT.ysinus ) THEN 486 IF( ysinuss ) THEN 487 PRINT *,' ******** PBS DANS DEFRUN ******** ' 488 PRINT *,' *** ysinus lu sur le fichier start est F ', 489 * 'alors qu il est T sur run.def ***' 514 IF( ysinuss ) THEN 515 write(lunout,*)' ******** PBS DANS CONF_GCM ******** ' 516 write(lunout,*)' *** ysinus lu sur le fichier start est F', 517 * ' alors qu il est T sur run.def ***' 518 STOP 519 ENDIF 520 ELSE 521 IF( .NOT.ysinuss ) THEN 522 write(lunout,*)' ******** PBS DANS CONF_GCM ******** ' 523 write(lunout,*)' *** ysinus lu sur le fichier start est T', 524 * ' alors qu il est F sur run.def **** ' 490 525 STOP 491 ENDIF 492 ELSE 493 IF( .NOT.ysinuss ) THEN 494 PRINT *,' ******** PBS DANS DEFRUN ******** ' 495 PRINT *,' *** ysinus lu sur le fichier start est T ', 496 * 'alors qu il est F sur run.def **** ' 497 STOP 498 ENDIF 526 ENDIF 499 527 ENDIF 500 ENDIF 528 ENDIF ! of IF( .NOT.fxyhypb ) 501 529 c 502 530 !Config Key = offline … … 519 547 520 548 549 !Config Key = ok_dynzon 550 !Config Desc = calcul et sortie des transports 551 !Config Def = n 552 !Config Help = Permet de mettre en route le calcul des transports 553 !Config 554 ok_dynzon = .FALSE. 555 CALL getin('ok_dynzon',ok_dynzon) 556 521 557 write(lunout,*)' #########################################' 522 558 write(lunout,*)' Configuration des parametres du gcm: ' 559 write(lunout,*)' planet_type = ', planet_type 523 560 write(lunout,*)' dayref = ', dayref 524 561 write(lunout,*)' anneeref = ', anneeref … … 529 566 write(lunout,*)' iecri = ', iecri 530 567 write(lunout,*)' periodav = ', periodav 568 write(lunout,*)' output_grads_dyn = ', output_grads_dyn 531 569 write(lunout,*)' idissip = ', idissip 532 570 write(lunout,*)' lstardis = ', lstardis … … 539 577 write(lunout,*)' coefdis = ', coefdis 540 578 write(lunout,*)' purmats = ', purmats 579 write(lunout,*)' read_start = ', read_start 541 580 write(lunout,*)' iflag_phys = ', iflag_phys 542 581 write(lunout,*)' iphysiq = ', iphysiq … … 552 591 write(lunout,*)' offline = ', offline 553 592 write(lunout,*)' config_inca = ', config_inca 593 write(lunout,*)' ok_dynzon = ', ok_dynzon 554 594 555 595 RETURN … … 590 630 591 631 IF( grossismx.LT.1. ) THEN 592 PRINT *,' *** ATTENTION !! grossismx < 1 . *** ' 632 write(lunout,*) 633 & 'conf_gcm: *** ATTENTION !! grossismx < 1 . *** ' 593 634 STOP 594 635 ELSE … … 598 639 599 640 IF( grossismy.LT.1. ) THEN 600 PRINT *,' *** ATTENTION !! grossismy < 1 . *** ' 641 write(lunout,*) 642 & 'conf_gcm: *** ATTENTION !! grossismy < 1 . *** ' 601 643 STOP 602 644 ELSE … … 604 646 ENDIF 605 647 606 PRINT *,' alphax alphay defrun',alphax,alphay648 write(lunout,*)'conf_gcm: alphax alphay ',alphax,alphay 607 649 c 608 650 c alphax et alphay sont les anciennes formulat. des grossissements … … 675 717 CALL getin('config_inca',config_inca) 676 718 719 !Config Key = ok_dynzon 720 !Config Desc = calcul et sortie des transports 721 !Config Def = n 722 !Config Help = Permet de mettre en route le calcul des transports 723 !Config 724 ok_dynzon = .FALSE. 725 CALL getin('ok_dynzon',ok_dynzon) 726 677 727 !Config key = ok_strato 678 728 !Config Desc = activation de la version strato … … 693 743 write(lunout,*)' #########################################' 694 744 write(lunout,*)' Configuration des parametres du gcm: ' 745 write(lunout,*)' planet_type = ', planet_type 695 746 write(lunout,*)' dayref = ', dayref 696 747 write(lunout,*)' anneeref = ', anneeref … … 701 752 write(lunout,*)' iecri = ', iecri 702 753 write(lunout,*)' periodav = ', periodav 754 write(lunout,*)' output_grads_dyn = ', output_grads_dyn 703 755 write(lunout,*)' idissip = ', idissip 704 756 write(lunout,*)' lstardis = ', lstardis … … 711 763 write(lunout,*)' coefdis = ', coefdis 712 764 write(lunout,*)' purmats = ', purmats 765 write(lunout,*)' read_start = ', read_start 713 766 write(lunout,*)' iflag_phys = ', iflag_phys 714 767 write(lunout,*)' iphysiq = ', iphysiq 715 write(lunout,*)' clon n = ', clonn716 write(lunout,*)' clat t = ', clatt768 write(lunout,*)' clon = ', clon 769 write(lunout,*)' clat = ', clat 717 770 write(lunout,*)' grossismx = ', grossismx 718 771 write(lunout,*)' grossismy = ', grossismy 719 write(lunout,*)' fxyhypb b = ', fxyhypbb772 write(lunout,*)' fxyhypb = ', fxyhypb 720 773 write(lunout,*)' dzoomx = ', dzoomx 721 774 write(lunout,*)' dzoomy = ', dzoomy … … 724 777 write(lunout,*)' offline = ', offline 725 778 write(lunout,*)' config_inca = ', config_inca 779 write(lunout,*)' ok_dynzon = ', ok_dynzon 726 780 write(lunout,*)' ok_strato = ', ok_strato 727 781 write(lunout,*)' ok_gradsfile = ', ok_gradsfile -
LMDZ4/trunk/libf/dyn3d/control.h
r962 r1146 14 14 & iperiod,iapp_tracvl,iconser,iecri,idissip,iphysiq , & 15 15 & periodav,iecrimoy,dayref,anneeref, & 16 & raz_date,offline,ip_ebil_dyn,config_inca 16 & raz_date,offline,ip_ebil_dyn,config_inca, & 17 & planet_type,output_grads_dyn,ok_dynzon 17 18 18 19 INTEGER nday,day_step,iperiod,iapp_tracvl,iconser,iecri, & … … 20 21 & ,ip_ebil_dyn 21 22 REAL periodav 22 logicaloffline23 LOGICAL offline 23 24 CHARACTER (len=4) :: config_inca 25 CHARACTER(len=10) :: planet_type ! planet type ('earth','mars',...) 26 LOGICAL :: output_grads_dyn ! output dynamics diagnostics in 27 ! binary grads file 'dyn.dat' (y/n) 28 LOGICAL :: ok_dynzon 24 29 !----------------------------------------------------------------------- -
LMDZ4/trunk/libf/dyn3d/create_etat0_limit.F
r1016 r1146 5 5 USE dimphy 6 6 USE comgeomphy 7 7 USE infotrac 8 8 c 9 9 c … … 28 28 #include "paramet.h" 29 29 #include "indicesol.h" 30 #include "advtrac.h"31 30 #include "control.h" 32 31 REAL :: masque(iip1,jjp1) 33 32 ! REAL :: pctsrf(iim*(jjm-1)+2, nbsrf) 34 33 35 c initialisation traceurs36 hadv_flg(:) = 0.37 vadv_flg(:) = 0.38 conv_flg(:) = 0.39 pbl_flg(:) = 0.40 tracnam(:) = ' '41 nprath = 142 nbtrac = 043 mmt_adj(:,:,:,:) = 144 45 34 IF (config_inca /= 'none') THEN 46 35 #ifdef INCA 47 36 call init_const_lmdz( 48 $ nbtr ac,anneeref,dayref,37 $ nbtr,anneeref,dayref, 49 38 $ iphysiq, day_step,nday) 50 39 #endif 51 print *, 'nbtr ac =' , nbtrac40 print *, 'nbtr =' , nbtr 52 41 END IF 53 42 54 CALL Init_Phys_lmdz(iim,jjp1,llm, nqmx-2,1,(jjm-1)*iim+2)43 CALL Init_Phys_lmdz(iim,jjp1,llm,1,(jjm-1)*iim+2) 55 44 call InitComgeomphy 56 45 -
LMDZ4/trunk/libf/dyn3d/diagedyn.F
r524 r1146 58 58 #include "paramet.h" 59 59 #include "comgeom.h" 60 61 #ifdef CPP_PHYS 60 #include "iniprint.h" 61 62 #ifdef CPP_EARTH 62 63 #include "../phylmd/YOMCST.h" 63 64 #include "../phylmd/YOETHF.h" … … 139 140 140 141 141 #ifdef CPP_ PHYS142 #ifdef CPP_EARTH 142 143 c====================================================================== 143 144 C Compute Kinetic enrgy … … 314 315 C 315 316 #else 316 print*,'Pour l instant diagedyn a besoin de la physique'317 write(lunout,*),'diagedyn: Needs Earth physics to function' 317 318 #endif 319 ! #endif of #ifdef CPP_EARTH 318 320 RETURN 319 321 END -
LMDZ4/trunk/libf/dyn3d/dynetat0.F
r541 r1146 2 2 ! $Header$ 3 3 ! 4 SUBROUTINE dynetat0(fichnom, nq,vcov,ucov,4 SUBROUTINE dynetat0(fichnom,vcov,ucov, 5 5 . teta,q,masse,ps,phis,time) 6 7 USE infotrac 6 8 IMPLICIT NONE 7 9 … … 32 34 #include "serre.h" 33 35 #include "logic.h" 34 #include "advtrac.h"35 36 36 37 c Arguments: … … 38 39 39 40 CHARACTER*(*) fichnom 40 INTEGER nq41 41 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm),teta(ip1jmp1,llm) 42 REAL q(ip1jmp1,llm,nq ),masse(ip1jmp1,llm)42 REAL q(ip1jmp1,llm,nqtot),masse(ip1jmp1,llm) 43 43 REAL ps(ip1jmp1),phis(ip1jmp1) 44 44 … … 315 315 316 316 317 IF(nq .GE.1) THEN318 DO iq=1,nq 317 IF(nqtot.GE.1) THEN 318 DO iq=1,nqtot 319 319 ierr = NF_INQ_VARID (nid, tname(iq), nvarid) 320 320 IF (ierr .NE. NF_NOERR) THEN -
LMDZ4/trunk/libf/dyn3d/dynredem.F
r960 r1146 3 3 ! 4 4 c 5 SUBROUTINE dynredem0(fichnom,iday_end,phis ,nq)5 SUBROUTINE dynredem0(fichnom,iday_end,phis) 6 6 USE IOIPSL 7 USE infotrac 7 8 IMPLICIT NONE 8 9 c======================================================================= … … 22 23 #include "description.h" 23 24 #include "serre.h" 24 #include "advtrac.h"25 25 26 26 c Arguments: … … 29 29 REAL phis(ip1jmp1) 30 30 CHARACTER*(*) fichnom 31 INTEGER nq32 31 33 32 c Local: … … 458 457 dims4(3) = idim_s 459 458 dims4(4) = idim_tim 460 IF(nq .GE.1) THEN461 DO iq=1,nq 459 IF(nqtot.GE.1) THEN 460 DO iq=1,nqtot 462 461 cIM 220306 BEG 463 462 #ifdef NC_DOUBLE … … 508 507 END 509 508 SUBROUTINE dynredem1(fichnom,time, 510 . vcov,ucov,teta,q,nq,masse,ps) 509 . vcov,ucov,teta,q,masse,ps) 510 USE infotrac 511 511 IMPLICIT NONE 512 512 c================================================================= … … 519 519 #include "comvert.h" 520 520 #include "comgeom.h" 521 #include "advtrac.h"522 521 #include "temps.h" 523 522 #include "control.h" 524 523 525 INTEGER nq,l524 INTEGER l 526 525 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) 527 526 REAL teta(ip1jmp1,llm) 528 527 REAL ps(ip1jmp1),masse(ip1jmp1,llm) 529 REAL q(ip1jmp1,llm,nq )528 REAL q(ip1jmp1,llm,nqtot) 530 529 CHARACTER*(*) fichnom 531 530 … … 633 632 END IF 634 633 635 IF(nq .GE.1) THEN636 do iq=1,nq 634 IF(nqtot.GE.1) THEN 635 do iq=1,nqtot 637 636 638 637 IF (config_inca == 'none') THEN -
LMDZ4/trunk/libf/dyn3d/etat0_netcdf.F
r1058 r1146 5 5 c 6 6 SUBROUTINE etat0_netcdf (interbar, masque) 7 7 #ifdef CPP_EARTH 8 8 USE startvar 9 9 USE ioipsl 10 10 USE dimphy 11 USE infotrac 11 12 USE fonte_neige_mod 12 13 USE pbl_surface_mod 13 14 USE phys_state_var_mod 15 USE filtreg_mod 16 #endif 17 !#endif of #ifdef CPP_EARTH 14 18 ! 15 19 IMPLICIT NONE … … 23 27 ! .KLON=KFDIA-KIDIA+1,KLEV=llm 24 28 ! 29 #ifdef CPP_EARTH 25 30 #include "comgeom2.h" 26 31 #include "comvert.h" … … 29 34 #include "dimsoil.h" 30 35 #include "temps.h" 31 ! 36 #endif 37 !#endif of #ifdef CPP_EARTH 38 ! arguments: 32 39 LOGICAL interbar 40 REAL :: masque(iip1,jjp1) 41 42 #ifdef CPP_EARTH 43 ! local variables: 33 44 REAL :: latfi(klon), lonfi(klon) 34 REAL :: orog(iip1,jjp1), rugo(iip1,jjp1) , masque(iip1,jjp1),35 .psol(iip1, jjp1), phis(iip1, jjp1)45 REAL :: orog(iip1,jjp1), rugo(iip1,jjp1) 46 REAL :: psol(iip1, jjp1), phis(iip1, jjp1) 36 47 REAL :: p3d(iip1, jjp1, llm+1) 37 48 REAL :: uvent(iip1, jjp1, llm) 38 49 REAL :: vvent(iip1, jjm, llm) 39 50 REAL :: t3d(iip1, jjp1, llm), tpot(iip1, jjp1, llm) 40 REAL :: q3d(iip1, jjp1, llm,nqmx), qsat(iip1, jjp1, llm) 51 REAL, ALLOCATABLE, DIMENSION(:,:,:,:) :: q3d 52 REAL :: qsat(iip1, jjp1, llm) 41 53 REAL :: tsol(klon), qsol(klon), sn(klon) 42 54 REAL :: tsolsrf(klon,nbsrf), qsolsrf(klon,nbsrf),snsrf(klon,nbsrf) … … 63 75 ! 64 76 INTEGER :: i,j, ig, l, ji,ii1,ii2 65 INTEGER :: nq66 77 REAL :: xpi 67 78 ! … … 141 152 ! 142 153 preff = 101325. 154 pa = 50000. 143 155 unskap = 1./kappa 144 156 ! … … 164 176 print*,'dtvr',dtvr 165 177 166 CALL inicons0() 178 179 180 CALL iniconst() 167 181 CALL inigeom() 168 ! 182 183 ! Initialisation pour traceurs 184 CALL infotrac_init 185 ALLOCATE(q3d(iip1,jjp1,llm,nqtot)) 186 187 169 188 CALL inifilr() 170 189 CALL phys_state_var_init() … … 623 642 phis(iip1,:) = phis(1,:) 624 643 625 C init pour traceurs626 call iniadvtrac(nq)627 644 C Ecriture 628 645 CALL inidissip( lstardis, nitergdiv, nitergrot, niterh , … … 648 665 * phi,w, pbaru,pbarv,time+iday-dayref ) 649 666 print*,'sortie caldyn0' 650 CALL dynredem0("start.nc",dayref,phis ,nqmx)667 CALL dynredem0("start.nc",dayref,phis) 651 668 print*,'sortie dynredem0' 652 CALL dynredem1("start.nc",0.0,vvent,uvent,tpot,q3d, nqmx,masse ,669 CALL dynredem1("start.nc",0.0,vvent,uvent,tpot,q3d,masse , 653 670 . psol) 654 671 print*,'sortie dynredem1' … … 741 758 visu_file='Etat0_visu.nc' 742 759 CALL initdynav(visu_file,dayref,anneeref,time_step, 743 . t_ops, t_wrt, nqmx,visuid)744 CALL writedynav(visuid, nqmx,itau,vvent ,760 . t_ops, t_wrt, visuid) 761 CALL writedynav(visuid, itau,vvent , 745 762 . uvent,tpot,pk,phi,q3d,masse,psol,phis) 746 763 else … … 749 766 print*,'entree histclo' 750 767 CALL histclo 768 769 DEALLOCATE(q3d) 770 771 #endif 772 !#endif of #ifdef CPP_EARTH 751 773 RETURN 752 774 ! -
LMDZ4/trunk/libf/dyn3d/fluxstokenc.F
r697 r1146 56 56 CALL initfluxsto( 'fluxstoke', 57 57 . time_step,istdyn* time_step,istdyn* time_step, 58 . nqmx,fluxid,fluxvid,fluxdid)58 . fluxid,fluxvid,fluxdid) 59 59 60 60 ndex(1) = 0 -
LMDZ4/trunk/libf/dyn3d/gcm.F
r962 r1146 8 8 #ifdef CPP_IOIPSL 9 9 USE IOIPSL 10 #endif 10 #else 11 ! if not using IOIPSL, we still need to use (a local version of) getin 12 USE ioipsl_getincom 13 #endif 14 15 USE filtreg_mod 16 USE infotrac 11 17 12 18 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 14 20 ! A nettoyer. On ne veut qu'une ou deux routines d'interface 15 21 ! dynamique -> physique pour l'initialisation 16 #ifdef CPP_PHYS 22 ! Ehouarn: for now these only apply to Earth: 23 #ifdef CPP_EARTH 17 24 USE dimphy 18 25 USE comgeomphy … … 68 75 #include "iniprint.h" 69 76 #include "tracstoke.h" 70 #include "advtrac.h"71 77 72 78 INTEGER longcles … … 83 89 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) ! vents covariants 84 90 REAL teta(ip1jmp1,llm) ! temperature potentielle 85 REAL q(ip1jmp1,llm,nqmx)! champs advectes91 REAL, ALLOCATABLE, DIMENSION(:,:,:):: q! champs advectes 86 92 REAL ps(ip1jmp1) ! pression au sol 87 93 REAL p (ip1jmp1,llmp1 ) ! pression aux interfac.des couches … … 137 143 c variables pour l'initialisation de la physique : 138 144 c ------------------------------------------------ 139 INTEGER ngridmx ,nq145 INTEGER ngridmx 140 146 PARAMETER( ngridmx = 2+(jjm-1)*iim - 1/jjm ) 141 147 REAL zcufi(ngridmx),zcvfi(ngridmx) … … 155 161 dynhistave_file = 'dyn_hist_ave.nc' 156 162 157 c initialisation Anne 158 hadv_flg(:) = 0. 159 vadv_flg(:) = 0. 160 conv_flg(:) = 0. 161 pbl_flg(:) = 0. 162 tracnam(:) = ' ' 163 nprath = 1 164 nbtrac = 0 165 mmt_adj(:,:,:,:) = 1 166 167 168 c-------------------------------------------------------------------------- 169 c Iflag_phys controle l'appel a la physique : 170 c ------------------------------------------- 171 c 0 : pas de physique 172 c 1 : Normale (appel a phylmd, phymars ...) 173 c 2 : rappel Newtonien pour la temperature + friction au sol 174 iflag_phys=1 175 176 c-------------------------------------------------------------------------- 177 c Lecture de l'etat initial : 178 c --------------------------- 179 c T : on lit start.nc 180 c F : le modele s'autoinitialise avec un cas academique (iniacademic) 181 read_start=.true. 182 #ifdef CPP_IOIPSL 183 #else 184 read_start=.false. 185 #endif 186 #ifdef CPP_PHYS 187 #else 188 read_start=.false. 189 #endif 163 190 164 191 165 c----------------------------------------------------------------------- … … 204 178 c --------------------------------------- 205 179 c 206 #ifdef CPP_IOIPSL 180 ! Ehouarn: dump possibility of using defrun 181 !#ifdef CPP_IOIPSL 207 182 CALL conf_gcm( 99, .TRUE. , clesphy0 ) 208 #else209 CALL defrun( 99, .TRUE. , clesphy0 )210 #endif183 !#else 184 ! CALL defrun( 99, .TRUE. , clesphy0 ) 185 !#endif 211 186 212 187 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 214 189 ! A nettoyer. On ne veut qu'une ou deux routines d'interface 215 190 ! dynamique -> physique pour l'initialisation 216 #ifdef CPP_PHYS 217 CALL Init_Phys_lmdz(iim,jjp1,llm,nqmx-2,1,(jjm-1)*iim+2) 191 ! Ehouarn : temporarily (?) keep this only for Earth 192 if (planet_type.eq."earth") then 193 #ifdef CPP_EARTH 194 CALL Init_Phys_lmdz(iim,jjp1,llm,1,(jjm-1)*iim+2) 218 195 call InitComgeomphy 219 196 #endif 197 endif 220 198 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 221 199 222 200 IF (config_inca /= 'none') THEN 223 201 #ifdef INCA 224 call init_const_lmdz(nbtr ac,anneeref,dayref,iphysiq,day_step,nday)202 call init_const_lmdz(nbtr,anneeref,dayref,iphysiq,day_step,nday) 225 203 call init_inca_para(iim,jjm+1,klon,1,klon_mpi_para_nb,0) 226 204 #endif … … 237 215 c Initialisation des traceurs 238 216 c --------------------------- 239 c Choix du schema pour l'advection 240 c dans fichier trac.def ou via INCA 241 242 call iniadvtrac(nq) 243 c 217 c Choix du nombre de traceurs et du schema pour l'advection 218 c dans fichier traceur.def, par default ou via INCA 219 call infotrac_init 220 221 c Allocation de la tableau q : champs advectes 222 allocate(q(ip1jmp1,llm,nqtot)) 223 244 224 c----------------------------------------------------------------------- 245 225 c Lecture de l'etat initial : … … 248 228 c lecture du fichier start.nc 249 229 if (read_start) then 250 #ifdef CPP_IOIPSL 251 CALL dynetat0("start.nc",nqmx,vcov,ucov, 230 ! we still need to run iniacademic to initialize some 231 ! constants & fields, if we run the 'newtonian' case: 232 if (iflag_phys.eq.2) then 233 CALL iniacademic(vcov,ucov,teta,q,masse,ps,phis,time_0) 234 endif 235 !#ifdef CPP_IOIPSL 236 if (planet_type.eq."earth") then 237 #ifdef CPP_EARTH 238 ! Load an Earth-format start file 239 CALL dynetat0("start.nc",vcov,ucov, 252 240 . teta,q,masse,ps,phis, time_0) 241 #endif 242 endif ! of if (planet_type.eq."earth") 253 243 c write(73,*) 'ucov',ucov 254 244 c write(74,*) 'vcov',vcov … … 257 247 c write(77,*) 'q',q 258 248 259 #endif 260 endif 249 endif ! of if (read_start) 261 250 262 251 IF (config_inca /= 'none') THEN … … 270 259 c le cas echeant, creation d un etat initial 271 260 IF (prt_level > 9) WRITE(lunout,*) 272 . 'AVANT iniacademic AVANT AVANT AVANT AVANT'261 . 'GCM: AVANT iniacademic AVANT AVANT AVANT AVANT' 273 262 if (.not.read_start) then 274 CALL iniacademic( nqmx,vcov,ucov,teta,q,masse,ps,phis,time_0)263 CALL iniacademic(vcov,ucov,teta,q,masse,ps,phis,time_0) 275 264 endif 276 265 … … 304 293 if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then 305 294 write(lunout,*) 306 . ' Attention les dates initiales lues dans le fichier'295 . 'GCM: Attention les dates initiales lues dans le fichier' 307 296 write(lunout,*) 308 297 . ' restart ne correspondent pas a celles lues dans ' … … 310 299 if (raz_date .ne. 1) then 311 300 write(lunout,*) 312 . ' On garde les dates du fichier restart'301 . 'GCM: On garde les dates du fichier restart' 313 302 else 314 303 annee_ref = anneeref … … 319 308 time_0 = 0. 320 309 write(lunout,*) 321 . ' On reinitialise a la date lue dans gcm.def'310 . 'GCM: On reinitialise a la date lue dans gcm.def' 322 311 endif 323 312 ELSE … … 356 345 c Initialisation de la physique : 357 346 c ------------------------------- 358 #ifdef CPP_PHYS 359 IF (call_iniphys.and. iflag_phys.eq.1) THEN347 348 IF (call_iniphys.and.(iflag_phys.eq.1)) THEN 360 349 latfi(1)=rlatu(1) 361 350 lonfi(1)=0. … … 376 365 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,aire,airefi) 377 366 WRITE(lunout,*) 378 . 'WARNING!!! vitesse verticale nulle dans la physique' 367 . 'GCM: WARNING!!! vitesse verticale nulle dans la physique' 368 ! Earth: 369 if (planet_type.eq."earth") then 370 #ifdef CPP_EARTH 379 371 CALL iniphysiq(ngridmx,llm,daysec,day_ini,dtphys , 380 372 , latfi,lonfi,airefi,zcufi,zcvfi,rad,g,r,cpp ) 373 #endif 374 endif ! of if (planet_type.eq."earth") 381 375 call_iniphys=.false. 382 ENDIF 383 #endif376 ENDIF ! of IF (call_iniphys.and.(iflag_phys.eq.1)) 377 !#endif 384 378 385 379 c numero de stockage pour les fichiers de redemarrage: … … 392 386 day_end = day_ini + nday 393 387 WRITE(lunout,300)day_ini,day_end 388 300 FORMAT('1'/,15x,'run du jour',i7,2x,'au jour',i7//) 389 390 if (planet_type.eq."earth") then 391 #ifdef CPP_EARTH 392 CALL dynredem0("restart.nc", day_end, phis) 393 #endif 394 endif 395 396 ecripar = .TRUE. 394 397 395 398 #ifdef CPP_IOIPSL 396 CALL dynredem0("restart.nc", day_end, phis, nqmx)397 398 ecripar = .TRUE.399 400 399 if ( 1.eq.1) then 401 400 time_step = zdtvr … … 403 402 t_wrt = iecri * daysec 404 403 CALL inithist(dynhist_file,day_ref,annee_ref,time_step, 405 . t_ops, t_wrt, nqmx, histid, histvid) 406 407 t_ops = iperiod * time_step 408 t_wrt = periodav * daysec 409 CALL initdynav(dynhistave_file,day_ref,annee_ref,time_step, 410 . t_ops, t_wrt, nqmx, histaveid) 411 404 . t_ops, t_wrt, histid, histvid) 405 406 IF (ok_dynzon) THEN 407 t_ops = iperiod * time_step 408 t_wrt = periodav * daysec 409 CALL initdynav(dynhistave_file,day_ref,annee_ref,time_step, 410 . t_ops, t_wrt, histaveid) 411 END IF 412 412 dtav = iperiod*dtvr/daysec 413 413 endif … … 415 415 416 416 #endif 417 ! #endif of #ifdef CPP_IOIPSL 417 418 418 419 c Choix des frequences de stokage pour le offline … … 435 436 436 437 437 CALL leapfrog(ucov,vcov,teta,ps,masse,phis, nq,q,clesphy0,438 CALL leapfrog(ucov,vcov,teta,ps,masse,phis,q,clesphy0, 438 439 . time_0) 439 440 440 441 442 300 FORMAT('1'/,15x,'run du pas',i7,2x,'au pas',i7,2x,443 . 'c''est a dire du jour',i7,3x,'au jour',i7//)444 441 END 445 442 -
LMDZ4/trunk/libf/dyn3d/groupeun.F
r524 r1146 2 2 ! $Header$ 3 3 ! 4 subroutinegroupeun(jjmax,llmax,q)5 implicit none4 SUBROUTINE groupeun(jjmax,llmax,q) 5 IMPLICIT NONE 6 6 7 7 #include "dimensions.h" … … 10 10 #include "comgeom2.h" 11 11 12 integerjjmax,llmax13 realq(iip1,jjmax,llmax)12 INTEGER jjmax,llmax 13 REAL q(iip1,jjmax,llmax) 14 14 15 integerngroup16 parameter(ngroup=3)15 INTEGER ngroup 16 PARAMETER (ngroup=3) 17 17 18 real airen,airecn,qn19 real aires,airecs,qs18 REAL airecn,qn 19 REAL airecs,qs 20 20 21 integeri,j,l,ig,j1,j2,i0,jd21 INTEGER i,j,l,ig,j1,j2,i0,jd 22 22 23 Champs 3D 23 c--------------------------------------------------------------------c 24 c Strategie d'optimisation c 25 c stocker les valeurs systematiquement recalculees c 26 c et identiques d'un pas de temps sur l'autre. Il s'agit des c 27 c aires des cellules qui sont sommees. S'il n'y a pas de changement c 28 c de grille au cours de la simulation tout devrait bien se passer. c 29 c Autre optimisation : determination des bornes entre lesquelles "j" c 30 c varie, au lieu de faire un test à chaque fois... 31 c--------------------------------------------------------------------c 32 33 INTEGER j_start, j_finish 34 35 REAL, SAVE :: airen_tab(iip1,jjp1,0:1) 36 REAL, SAVE :: aires_tab(iip1,jjp1,0:1) 37 38 LOGICAL, SAVE :: first = .TRUE. 39 40 IF (first) THEN 41 CALL INIT_GROUPEUN(airen_tab, aires_tab) 42 first = .FALSE. 43 ENDIF 44 45 c Champs 3D 24 46 jd=jjp1-jjmax 25 do l=1,llm26 j1=1+jd27 j2=228 do ig=1,ngroup29 do j=j1-jd,j2-jd30 c print*,'groupe ',ig,' j= ',j,2**(ngroup-ig+1),'pts groupes'31 do i0=1,iim,2**(ngroup-ig+1)32 airen=0.33 airecn=0.34 qn=0.35 aires=0.36 airecs=0.37 qs=0.38 do i=i0,i0+2**(ngroup-ig+1)-139 airen=airen+aire(i,j)40 aires=aires+aire(i,jjp1-j+1)41 qn=qn+q(i,j,l)42 qs=qs+q(i,jjp1-j+1-jd,l)43 enddo44 airecn=0.45 airecs=0.46 do i=i0,i0+2**(ngroup-ig+1)-147 q(i,j,l)=qn*aire(i,j)/airen48 q(i,jjp1-j+1-jd,l)=qs*aire(i,jjp1-j+1)/aires49 enddo50 enddo51 q(iip1,j,l)=q(1,j,l)52 q(iip1,jjp1-j+1-jd,l)=q(1,jjp1-j+1-jd,l)53 enddo54 j1=j2+155 j2=j2+2**ig56 enddo57 enddo58 47 59 return 60 end 48 DO l=1,llm 49 j1=1+jd 50 j2=2 51 DO ig=1,ngroup 52 53 c Concerne le pole nord 54 j_start = j1-jd 55 j_finish = j2-jd 56 DO j=j_start, j_finish 57 DO i0=1,iim,2**(ngroup-ig+1) 58 qn=0. 59 DO i=i0,i0+2**(ngroup-ig+1)-1 60 qn=qn+q(i,j,l) 61 ENDDO 62 DO i=i0,i0+2**(ngroup-ig+1)-1 63 q(i,j,l)=qn*airen_tab(i,j,jd) 64 ENDDO 65 ENDDO 66 q(iip1,j,l)=q(1,j,l) 67 ENDDO 68 69 !c Concerne le pole sud 70 j_start = j1-jd 71 j_finish = j2-jd 72 DO j=j_start, j_finish 73 DO i0=1,iim,2**(ngroup-ig+1) 74 qs=0. 75 DO i=i0,i0+2**(ngroup-ig+1)-1 76 qs=qs+q(i,jjp1-j+1-jd,l) 77 ENDDO 78 DO i=i0,i0+2**(ngroup-ig+1)-1 79 q(i,jjp1-j+1-jd,l)=qs*aires_tab(i,jjp1-j+1,jd) 80 ENDDO 81 ENDDO 82 q(iip1,jjp1-j+1-jd,l)=q(1,jjp1-j+1-jd,l) 83 ENDDO 84 85 j1=j2+1 86 j2=j2+2**ig 87 ENDDO 88 ENDDO 89 90 RETURN 91 END 92 93 94 95 SUBROUTINE INIT_GROUPEUN(airen_tab, aires_tab) 96 IMPLICIT NONE 97 98 #include "dimensions.h" 99 #include "paramet.h" 100 #include "comconst.h" 101 #include "comgeom2.h" 102 103 INTEGER ngroup 104 PARAMETER (ngroup=3) 105 106 REAL airen,airecn 107 REAL aires,airecs 108 109 INTEGER i,j,l,ig,j1,j2,i0,jd 110 111 INTEGER j_start, j_finish 112 113 REAL :: airen_tab(iip1,jjp1,0:1) 114 REAL :: aires_tab(iip1,jjp1,0:1) 115 116 DO jd=0, 1 117 j1=1+jd 118 j2=2 119 DO ig=1,ngroup 120 121 ! c Concerne le pole nord 122 j_start = j1-jd 123 j_finish = j2-jd 124 DO j=j_start, j_finish 125 DO i0=1,iim,2**(ngroup-ig+1) 126 airen=0. 127 DO i=i0,i0+2**(ngroup-ig+1)-1 128 airen = airen+aire(i,j) 129 ENDDO 130 DO i=i0,i0+2**(ngroup-ig+1)-1 131 airen_tab(i,j,jd) = 132 & aire(i,j) / airen 133 ENDDO 134 ENDDO 135 ENDDO 136 137 ! c Concerne le pole sud 138 j_start = j1-jd 139 j_finish = j2-jd 140 DO j=j_start, j_finish 141 DO i0=1,iim,2**(ngroup-ig+1) 142 aires=0. 143 DO i=i0,i0+2**(ngroup-ig+1)-1 144 aires=aires+aire(i,jjp1-j+1) 145 ENDDO 146 DO i=i0,i0+2**(ngroup-ig+1)-1 147 aires_tab(i,jjp1-j+1,jd) = 148 & aire(i,jjp1-j+1) / aires 149 ENDDO 150 ENDDO 151 ENDDO 152 153 j1=j2+1 154 j2=j2+2**ig 155 ENDDO 156 ENDDO 157 158 RETURN 159 END -
LMDZ4/trunk/libf/dyn3d/guide.F
r1046 r1146 3 3 ! 4 4 subroutine guide(itau,ucov,vcov,teta,q,masse,ps) 5 6 use netcdf 5 7 6 8 IMPLICIT NONE … … 225 227 c lecture d'un fichier netcdf pour determiner le nombre de niveaux 226 228 if (guide_modele) then 227 if (ncidpl.eq.-99) ncidpl=NCOPN('apbp.nc',NCNOWRIT,rcod) 229 if (ncidpl.eq.-99) rcod=nf90_open('apbp.nc',Nf90_NOWRITe, 230 $ ncidpl) 228 231 else 229 232 if (guide_u) then 230 if (ncidpl.eq.-99) ncidpl=NCOPN('u.nc',NCNOWRIT,rcod)233 if (ncidpl.eq.-99) rcod=nf90_open('u.nc',Nf90_NOWRITe,ncidpl) 231 234 endif 232 235 c 233 236 if (guide_v) then 234 if (ncidpl.eq.-99) ncidpl=NCOPN('v.nc',NCNOWRIT,rcod)237 if (ncidpl.eq.-99) rcod=nf90_open('v.nc',nf90_nowrite,ncidpl) 235 238 endif 236 239 c 237 240 if (guide_T) then 238 if (ncidpl.eq.-99) ncidpl=NCOPN('T.nc',NCNOWRIT,rcod)241 if (ncidpl.eq.-99) rcod=nf90_open('T.nc',nf90_nowrite,ncidpl) 239 242 endif 240 243 c 241 244 if (guide_Q) then 242 if (ncidpl.eq.-99) ncidpl=NCOPN('hur.nc',NCNOWRIT,rcod) 245 if (ncidpl.eq.-99) rcod=nf90_open('hur.nc',nf90_nowrite, 246 $ ncidpl) 243 247 endif 244 248 c … … 251 255 status=NF_INQ_DIMLEN(ncidpl,rid,nlev) 252 256 print *,'nlev guide', nlev 253 call ncclos(ncidpl,rcod)257 rcod = nf90_close(ncidpl) 254 258 c Lecture du premier etat des reanalyses. 255 259 call read_reanalyse(1,ps -
LMDZ4/trunk/libf/dyn3d/iniacademic.F
r524 r1146 4 4 c 5 5 c 6 SUBROUTINE iniacademic(nq,vcov,ucov,teta,q,masse,ps,phis,time_0) 6 SUBROUTINE iniacademic(vcov,ucov,teta,q,masse,ps,phis,time_0) 7 8 USE filtreg_mod 9 USE infotrac, ONLY : nqtot 7 10 8 11 c%W% %G% … … 42 45 #include "temps.h" 43 46 #include "control.h" 47 #include "iniprint.h" 44 48 45 49 c Arguments: 46 50 c ---------- 47 51 48 integer nq49 52 real time_0 50 53 … … 52 55 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) ! vents covariants 53 56 REAL teta(ip1jmp1,llm) ! temperature potentielle 54 REAL q(ip1jmp1,llm,nq ) ! champs advectes57 REAL q(ip1jmp1,llm,nqtot) ! champs advectes 55 58 REAL ps(ip1jmp1) ! pression au sol 56 59 REAL masse(ip1jmp1,llm) ! masse d'air 60 REAL phis(ip1jmp1) ! geopotentiel au sol 61 62 c Local: 63 c ------ 64 57 65 REAL p (ip1jmp1,llmp1 ) ! pression aux interfac.des couches 58 66 REAL pks(ip1jmp1) ! exner au sol 59 67 REAL pk(ip1jmp1,llm) ! exner au milieu des couches 60 68 REAL pkf(ip1jmp1,llm) ! exner filt.au milieu des couches 61 REAL phis(ip1jmp1) ! geopotentiel au sol62 69 REAL phi(ip1jmp1,llm) ! geopotentiel 63 64 65 66 67 68 c Local:69 c ------70 71 70 REAL ddsin,tetarappelj,tetarappell,zsig 72 71 real tetajl(jjp1,llm) … … 79 78 80 79 c----------------------------------------------------------------------- 80 ! 1. Initializations for Earth-like case 81 ! -------------------------------------- 82 if (planet_type=="earth") then 83 c 84 time_0=0. 81 85 82 c 83 time_0=0. 86 im = iim 87 jm = jjm 88 day_ini = 0 89 omeg = 4.*asin(1.)/86400. 90 rad = 6371229. 91 g = 9.8 92 daysec = 86400. 93 dtvr = daysec/FLOAT(day_step) 94 zdtvr=dtvr 95 kappa = 0.2857143 96 cpp = 1004.70885 97 preff = 101325. 98 pa = 50000. 99 etot0 = 0. 100 ptot0 = 0. 101 ztot0 = 0. 102 stot0 = 0. 103 ang0 = 0. 84 104 85 im = iim 86 jm = jjm 87 day_ini = 0 88 omeg = 4.*asin(1.)/86400. 89 rad = 6371229. 90 g = 9.8 91 daysec = 86400. 92 dtvr = daysec/FLOAT(day_step) 93 zdtvr=dtvr 94 kappa = 0.2857143 95 cpp = 1004.70885 96 preff = 101325. 97 pa = 50 000. 98 etot0 = 0. 99 ptot0 = 0. 100 ztot0 = 0. 101 stot0 = 0. 102 ang0 = 0. 103 pa = 0. 105 CALL iniconst 106 CALL inigeom 107 CALL inifilr 104 108 105 CALL inicons0 106 CALL inigeom 107 CALL inifilr 108 109 ps=0. 110 phis=0. 109 ps=0. 110 phis=0. 111 111 c--------------------------------------------------------------------- 112 112 113 taurappel=10.*daysec113 taurappel=10.*daysec 114 114 115 115 c--------------------------------------------------------------------- … … 117 117 c -------------------------------------- 118 118 119 DO l=1,llm120 zsig=ap(l)/preff+bp(l)121 if (zsig.gt.0.3) then122 lsup=l123 tetarappell=1./8.*(-log(zsig)-.5)124 DO j=1,jjp1125 ddsin=sin(rlatu(j))-sin(pi/20.)126 tetajl(j,l)=300.*(1+1./18.*(1.-3.*ddsin*ddsin)+tetarappell)127 ENDDO128 else119 DO l=1,llm 120 zsig=ap(l)/preff+bp(l) 121 if (zsig.gt.0.3) then 122 lsup=l 123 tetarappell=1./8.*(-log(zsig)-.5) 124 DO j=1,jjp1 125 ddsin=sin(rlatu(j))-sin(pi/20.) 126 tetajl(j,l)=300.*(1+1./18.*(1.-3.*ddsin*ddsin)+tetarappell) 127 ENDDO 128 else 129 129 c Choix isotherme au-dessus de 300 mbar 130 do j=1,jjp1131 tetajl(j,l)=tetajl(j,lsup)*(0.3/zsig)**kappa132 enddo133 endif134 ENDDO130 do j=1,jjp1 131 tetajl(j,l)=tetajl(j,lsup)*(0.3/zsig)**kappa 132 enddo 133 endif ! of if (zsig.gt.0.3) 134 ENDDO ! of DO l=1,llm 135 135 136 do l=1,llm137 do j=1,jjp1138 do i=1,iip1139 ij=(j-1)*iip1+i140 tetarappel(ij,l)=tetajl(j,l)141 enddo142 enddo143 enddo136 do l=1,llm 137 do j=1,jjp1 138 do i=1,iip1 139 ij=(j-1)*iip1+i 140 tetarappel(ij,l)=tetajl(j,l) 141 enddo 142 enddo 143 enddo 144 144 145 c call dump2d(jjp1,llm,tetajl,'TEQ ')145 c call dump2d(jjp1,llm,tetajl,'TEQ ') 146 146 147 ps=1.e5148 phis=0.149 CALL pression ( ip1jmp1, ap, bp, ps, p )150 CALL exner_hyb( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf )151 CALL massdair(p,masse)147 ps=1.e5 148 phis=0. 149 CALL pression ( ip1jmp1, ap, bp, ps, p ) 150 CALL exner_hyb( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf ) 151 CALL massdair(p,masse) 152 152 153 153 c intialisation du vent et de la temperature 154 teta(:,:)=tetarappel(:,:)155 CALL geopot(ip1jmp1,teta,pk,pks,phis,phi)156 call ugeostr(phi,ucov)157 vcov=0.158 q(:,:,1 )=1.e-10159 q(:,:,2 )=1.e-15160 q(:,:,3:nq)=0.154 teta(:,:)=tetarappel(:,:) 155 CALL geopot(ip1jmp1,teta,pk,pks,phis,phi) 156 call ugeostr(phi,ucov) 157 vcov=0. 158 q(:,:,1 )=1.e-10 159 q(:,:,2 )=1.e-15 160 q(:,:,3:nqtot)=0. 161 161 162 162 163 c perturbation al \351atoire sur la temp\351rature164 idum = -1165 zz = ran1(idum)166 idum = 0167 do l=1,llm168 do ij=iip2,ip1jm169 teta(ij,l)=teta(ij,l)*(1.+0.005*ran1(idum))170 enddo171 enddo163 c perturbation aleatoire sur la temperature 164 idum = -1 165 zz = ran1(idum) 166 idum = 0 167 do l=1,llm 168 do ij=iip2,ip1jm 169 teta(ij,l)=teta(ij,l)*(1.+0.005*ran1(idum)) 170 enddo 171 enddo 172 172 173 do l=1,llm174 do ij=1,ip1jmp1,iip1175 teta(ij+iim,l)=teta(ij,l)176 enddo177 enddo173 do l=1,llm 174 do ij=1,ip1jmp1,iip1 175 teta(ij+iim,l)=teta(ij,l) 176 enddo 177 enddo 178 178 179 179 … … 185 185 186 186 c initialisation d'un traceur sur une colonne 187 j=jjp1*3/4 188 i=iip1/2 189 ij=(j-1)*iip1+i 190 q(ij,:,3)=1. 191 187 j=jjp1*3/4 188 i=iip1/2 189 ij=(j-1)*iip1+i 190 q(ij,:,3)=1. 191 192 else 193 write(lunout,*)"iniacademic: planet types other than earth", 194 & " not implemented (yet)." 195 stop 196 endif ! of if (planet_type=="earth") 192 197 return 193 198 END -
LMDZ4/trunk/libf/dyn3d/integrd.F
r524 r1146 32 32 #include "temps.h" 33 33 #include "serre.h" 34 #include "advtrac.h"35 34 36 35 c Arguments: -
LMDZ4/trunk/libf/dyn3d/leapfrog.F
r1060 r1146 2 2 c 3 3 c 4 SUBROUTINE leapfrog(ucov,vcov,teta,ps,masse,phis, nq,q,clesphy0,4 SUBROUTINE leapfrog(ucov,vcov,teta,ps,masse,phis,q,clesphy0, 5 5 & time_0) 6 6 7 7 8 8 cIM : pour sortir les param. du modele dans un fis. netcdf 110106 9 USE IOIPSL 9 #ifdef CPP_IOIPSL 10 use IOIPSL 11 #endif 12 USE infotrac 10 13 11 14 IMPLICIT NONE … … 56 59 #include "com_io_dyn.h" 57 60 #include "iniprint.h" 58 #include "advtrac.h"59 c#include "tracstoke.h"60 61 61 #include "academic.h" 62 62 63 63 ! FH 2008/05/09 On elimine toutes les clefs physiques dans la dynamique 64 64 ! #include "clesphys.h" 65 66 integer nq67 65 68 66 INTEGER longcles … … 76 74 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) ! vents covariants 77 75 REAL teta(ip1jmp1,llm) ! temperature potentielle 78 REAL q(ip1jmp1,llm,nq mx) ! champs advectes76 REAL q(ip1jmp1,llm,nqtot) ! champs advectes 79 77 REAL ps(ip1jmp1) ! pression au sol 80 78 REAL p (ip1jmp1,llmp1 ) ! pression aux interfac.des couches … … 97 95 c tendances dynamiques 98 96 REAL dv(ip1jm,llm),du(ip1jmp1,llm) 99 REAL dteta(ip1jmp1,llm),dq(ip1jmp1,llm,nq mx),dp(ip1jmp1)97 REAL dteta(ip1jmp1,llm),dq(ip1jmp1,llm,nqtot),dp(ip1jmp1) 100 98 101 99 c tendances de la dissipation … … 105 103 c tendances physiques 106 104 REAL dvfi(ip1jm,llm),dufi(ip1jmp1,llm) 107 REAL dtetafi(ip1jmp1,llm),dqfi(ip1jmp1,llm,nq mx),dpfi(ip1jmp1)105 REAL dtetafi(ip1jmp1,llm),dqfi(ip1jmp1,llm,nqtot),dpfi(ip1jmp1) 108 106 109 107 c variables pour le fichier histoire … … 165 163 166 164 character*80 dynhist_file, dynhistave_file 167 character *20modname165 character(len=20) :: modname 168 166 character*80 abort_message 169 167 … … 182 180 PARAMETER (testita = 9) 183 181 184 logical , parameter :: flag_verif = . false.182 logical , parameter :: flag_verif = .true. 185 183 186 184 … … 190 188 itaufin = nday*day_step 191 189 itaufinp1 = itaufin +1 192 190 modname="leapfrog" 191 193 192 194 193 itau = 0 … … 220 219 call guide(itau,ucov,vcov,teta,q,masse,ps) 221 220 else 222 IF(prt_level>9)WRITE( *,*)'attention on ne guide pas les',223 . ' 6 dernieres heures'221 IF(prt_level>9)WRITE(lunout,*)'leapfrog: attention on ne ', 222 . 'guide pas les 6 dernieres heures' 224 223 endif 225 224 #endif … … 230 229 c ENDIF 231 230 c 231 232 ! Save fields obtained at previous time step as '...m1' 232 233 CALL SCOPY( ijmllm ,vcov , 1, vcovm1 , 1 ) 233 234 CALL SCOPY( ijp1llm,ucov , 1, ucovm1 , 1 ) … … 245 246 CALL filtreg ( finvmaold ,jjp1, llm, -2,2, .TRUE., 1 ) 246 247 247 call minmax(ijp1llm,q(:,:,3),zqmin,zqmax) 248 ! Ehouarn: what is this for? zqmin & zqmax are not used anyway ... 249 ! call minmax(ijp1llm,q(:,:,3),zqmin,zqmax) 248 250 249 251 2 CONTINUE … … 305 307 306 308 307 ENDIF 308 c 309 ENDIF 309 ENDIF ! of IF (offline) 310 c 311 ENDIF ! of IF( forward. OR . leapf ) 310 312 311 313 … … 353 355 c ----------------------------------------------------- 354 356 355 #ifdef CPP_PHYS356 357 c+jld 357 358 358 359 c Diagnostique de conservation de l'énergie : initialisation 359 IF (ip_ebil_dyn.ge.1 ) THEN360 IF (ip_ebil_dyn.ge.1 ) THEN 360 361 ztit='bil dyn' 361 CALL diagedyn(ztit,2,1,1,dtphys 362 e , ucov , vcov , ps, p ,pk , teta , q(:,:,1), q(:,:,2)) 363 ENDIF 362 ! Ehouarn: be careful, diagedyn is Earth-specific (includes ../phylmd/..)! 363 IF (planet_type.eq."earth") THEN 364 CALL diagedyn(ztit,2,1,1,dtphys 365 & , ucov , vcov , ps, p ,pk , teta , q(:,:,1), q(:,:,2)) 366 ENDIF 367 ENDIF ! of IF (ip_ebil_dyn.ge.1 ) 364 368 c-jld 369 #ifdef CPP_IOIPSL 365 370 cIM : pour sortir les param. du modele dans un fis. netcdf 110106 366 IF (first) THEN367 first=.false.371 IF (first) THEN 372 first=.false. 368 373 #include "ini_paramLMDZ_dyn.h" 369 ENDIF374 ENDIF 370 375 c 371 376 #include "write_paramLMDZ_dyn.h" 372 377 c 373 374 CALL calfis( nq, lafin ,rdayvrai,time , 378 #endif 379 ! #endif of #ifdef CPP_IOIPSL 380 CALL calfis( lafin ,rdayvrai,time , 375 381 $ ucov,vcov,teta,q,masse,ps,p,pk,phis,phi , 376 382 $ du,dv,dteta,dq, … … 378 384 $ clesphy0, dufi,dvfi,dtetafi,dqfi,dpfi ) 379 385 380 IF (ok_strato) THEN381 CALL top_bound( vcov,ucov,teta, dufi,dvfi,dtetafi)382 ENDIF386 IF (ok_strato) THEN 387 CALL top_bound( vcov,ucov,teta, dufi,dvfi,dtetafi) 388 ENDIF 383 389 384 390 c ajout des tendances physiques: 385 391 c ------------------------------ 386 CALL addfi( nqmx,dtphys, leapf, forward ,392 CALL addfi( dtphys, leapf, forward , 387 393 $ ucov, vcov, teta , q ,ps , 388 394 $ dufi, dvfi, dtetafi , dqfi ,dpfi ) 389 395 c 390 396 c Diagnostique de conservation de l'énergie : difference 391 IF (ip_ebil_dyn.ge.1 ) THEN397 IF (ip_ebil_dyn.ge.1 ) THEN 392 398 ztit='bil phys' 393 CALL diagedyn(ztit,2,1,1,dtphys 394 e , ucov , vcov , ps, p ,pk , teta , q(:,:,1), q(:,:,2)) 395 ENDIF 396 #endif 399 IF (planet_type.eq."earth") THEN 400 CALL diagedyn(ztit,2,1,1,dtphys 401 & , ucov , vcov , ps, p ,pk , teta , q(:,:,1), q(:,:,2)) 402 ENDIF 403 ENDIF ! of IF (ip_ebil_dyn.ge.1 ) 404 397 405 ENDIF ! of IF( apphys ) 398 406 399 IF(iflag_phys.EQ.2) THEN ! "Newtonian physics" case407 IF(iflag_phys.EQ.2) THEN ! "Newtonian" case 400 408 c Calcul academique de la physique = Rappel Newtonien + friction 401 409 c -------------------------------------------------------------- … … 475 483 476 484 477 END IF 485 END IF ! of IF(apdiss) 478 486 479 487 c ajout debug … … 509 517 IF( itau. EQ. itaufinp1 ) then 510 518 if (flag_verif) then 511 write( 79,*) 'ucov',ucov512 write(8 0,*) 'vcov',vcov513 write(8 1,*) 'teta',teta514 write(8 2,*) 'ps',ps515 write(8 3,*) 'q',q519 write(80,*) 'ucov',ucov 520 write(81,*) 'vcov',vcov 521 write(82,*) 'teta',teta 522 write(83,*) 'ps',ps 523 write(84,*) 'q',q 516 524 WRITE(85,*) 'q1 = ',q(:,:,1) 517 525 WRITE(86,*) 'q3 = ',q(:,:,3) 526 write(90) ucov 527 write(91) vcov 528 write(92) teta 529 write(93) ps 530 write(94) q 518 531 endif 519 532 … … 532 545 iav=0 533 546 ENDIF 547 548 IF (ok_dynzon) THEN 534 549 #ifdef CPP_IOIPSL 535 CALL writedynav(histaveid, nqmx, itau,vcov , 536 , ucov,teta,pk,phi,q,masse,ps,phis) 537 call bilan_dyn (2,dtvr*iperiod,dtvr*day_step*periodav, 538 , ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) 539 #endif 550 CALL writedynav(histaveid, itau,vcov , 551 , ucov,teta,pk,phi,q,masse,ps,phis) 552 CALL bilan_dyn (2,dtvr*iperiod,dtvr*day_step*periodav, 553 , ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) 554 #endif 555 END IF 540 556 541 557 ENDIF … … 548 564 c IF( MOD(itau,iecri*day_step).EQ.0) THEN 549 565 550 551 CALL geopot ( ip1jmp1, teta , pk , pks, phis , phi)552 unat=0.553 do l=1,llm554 unat(iip2:ip1jm,l)=ucov(iip2:ip1jm,l)/cu(iip2:ip1jm)555 vnat(:,l)=vcov(:,l)/cv(:)556 enddo566 nbetat = nbetatdem 567 CALL geopot(ip1jmp1,teta,pk,pks,phis,phi) 568 unat=0. 569 do l=1,llm 570 unat(iip2:ip1jm,l)=ucov(iip2:ip1jm,l)/cu(iip2:ip1jm) 571 vnat(:,l)=vcov(:,l)/cv(:) 572 enddo 557 573 #ifdef CPP_IOIPSL 558 c CALL writehist(histid,histvid, nqmx,itau,vcov, 559 c s ucov,teta,phi,q,masse,ps,phis) 560 #else 574 c CALL writehist(histid,histvid,itau,vcov, 575 c & ucov,teta,phi,q,masse,ps,phis) 576 #endif 577 ! For some Grads outputs of fields 578 if (output_grads_dyn) then 561 579 #include "write_grads_dyn.h" 562 #endif 563 564 565 ENDIF 580 endif 581 582 ENDIF ! of IF(MOD(itau,iecri).EQ.0) 566 583 567 584 IF(itau.EQ.itaufin) THEN 568 585 569 586 570 #ifdef CPP_IOIPSL 571 CALL dynredem1("restart.nc",0.0, 572 , vcov,ucov,teta,q,nqmx,masse,ps) 573 #endif 587 if (planet_type.eq."earth") then 588 #ifdef CPP_EARTH 589 ! Write an Earth-format restart file 590 CALL dynredem1("restart.nc",0.0, 591 & vcov,ucov,teta,q,masse,ps) 592 #endif 593 endif ! of if (planet_type.eq."earth") 574 594 575 595 CLOSE(99) 576 ENDIF 596 ENDIF ! of IF (itau.EQ.itaufin) 577 597 578 598 c----------------------------------------------------------------------- … … 596 616 leapf = .TRUE. 597 617 dt = 2.*dtvr 598 GO TO 2 599 END IF 618 GO TO 2 619 END IF ! of IF (forward) 600 620 ELSE 601 621 … … 605 625 dt = 2.*dtvr 606 626 GO TO 2 607 END IF 608 609 ELSE 627 END IF ! of IF (MOD(itau,iperiod).EQ.0) 628 ! ELSEIF (MOD(itau-1,iperiod).EQ.0) 629 630 ELSE ! of IF (.not.purmats) 610 631 611 632 c ........................................................ … … 630 651 GO TO 2 631 652 632 ELSE 633 634 IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin) THEN653 ELSE ! of IF(forward) 654 655 IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin) THEN 635 656 IF(itau.EQ.itaufin) THEN 636 657 iav=1 … … 638 659 iav=0 639 660 ENDIF 661 662 IF (ok_dynzon) THEN 640 663 #ifdef CPP_IOIPSL 641 CALL writedynav(histaveid, nqmx, itau,vcov , 642 , ucov,teta,pk,phi,q,masse,ps,phis) 643 call bilan_dyn (2,dtvr*iperiod,dtvr*day_step*periodav, 644 , ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) 645 #endif 646 647 ENDIF 648 649 IF(MOD(itau,iecri ).EQ.0) THEN 664 CALL writedynav(histaveid, itau,vcov , 665 , ucov,teta,pk,phi,q,masse,ps,phis) 666 CALL bilan_dyn (2,dtvr*iperiod,dtvr*day_step*periodav, 667 , ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) 668 #endif 669 END IF 670 671 ENDIF ! of IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin) 672 673 IF(MOD(itau,iecri ).EQ.0) THEN 650 674 c IF(MOD(itau,iecri*day_step).EQ.0) THEN 651 652 CALL geopot ( ip1jmp1, teta , pk , pks, phis , phi)653 unat=0.654 do l=1,llm655 unat(iip2:ip1jm,l)=ucov(iip2:ip1jm,l)/cu(iip2:ip1jm)656 vnat(:,l)=vcov(:,l)/cv(:)657 enddo675 nbetat = nbetatdem 676 CALL geopot(ip1jmp1,teta,pk,pks,phis,phi) 677 unat=0. 678 do l=1,llm 679 unat(iip2:ip1jm,l)=ucov(iip2:ip1jm,l)/cu(iip2:ip1jm) 680 vnat(:,l)=vcov(:,l)/cv(:) 681 enddo 658 682 #ifdef CPP_IOIPSL 659 c CALL writehist( histid, histvid, nqmx, itau,vcov , 660 c , ucov,teta,phi,q,masse,ps,phis) 661 #else 683 c CALL writehist( histid, histvid, itau,vcov , 684 c & ucov,teta,phi,q,masse,ps,phis) 685 #endif 686 ! For some Grads outputs 687 if (output_grads_dyn) then 662 688 #include "write_grads_dyn.h" 663 #endif 664 665 666 ENDIF 667 668 #ifdef CPP_IOIPSL 669 IF(itau.EQ.itaufin) 670 . CALL dynredem1("restart.nc",0.0, 671 . vcov,ucov,teta,q,nqmx,masse,ps) 672 #endif 673 674 forward = .TRUE. 675 GO TO 1 676 677 ENDIF 678 679 END IF 689 endif 690 691 ENDIF ! of IF(MOD(itau,iecri ).EQ.0) 692 693 IF(itau.EQ.itaufin) THEN 694 if (planet_type.eq."earth") then 695 #ifdef CPP_EARTH 696 CALL dynredem1("restart.nc",0.0, 697 & vcov,ucov,teta,q,masse,ps) 698 #endif 699 endif ! of if (planet_type.eq."earth") 700 ENDIF ! of IF(itau.EQ.itaufin) 701 702 forward = .TRUE. 703 GO TO 1 704 705 ENDIF ! of IF (forward) 706 707 END IF ! of IF(.not.purmats) 680 708 681 709 STOP -
LMDZ4/trunk/libf/dyn3d/qminimum.F
r524 r1146 42 42 c 43 43 DO 1000 k = 1, llm 44 DO 1040 i = 1, ip1jmp1 45 zx_defau = AMAX1( seuil_liq - q(i,k,iq_liq), 0.0 ) 46 q(i,k,iq_vap) = q(i,k,iq_vap) - zx_defau 47 q(i,k,iq_liq) = q(i,k,iq_liq) + zx_defau 48 1040 CONTINUE 44 DO 1040 i = 1, ip1jmp1 45 if (seuil_liq - q(i,k,iq_liq) .gt. 0.d0 ) then 46 q(i,k,iq_vap) = q(i,k,iq_vap) + q(i,k,iq_liq) - seuil_liq 47 q(i,k,iq_liq) = seuil_liq 48 endif 49 1040 CONTINUE 49 50 1000 CONTINUE 50 51 c … … 56 57 DO k = llm, 2, -1 57 58 ccc zx_abc = dpres(k) / dpres(k-1) 58 DO i = 1, ip1jmp1 59 zx_abc = deltap(i,k)/deltap(i,k-1) 60 zx_defau = AMAX1( seuil_vap - q(i,k,iq), 0.0 ) 61 q(i,k-1,iq) = q(i,k-1,iq) - zx_defau * zx_abc 62 q(i,k,iq) = q(i,k,iq) + zx_defau 63 ENDDO 59 DO i = 1, ip1jmp1 60 if ( seuil_vap - q(i,k,iq) .gt. 0.d0 ) then 61 q(i,k-1,iq) = q(i,k-1,iq) - ( seuil_vap - q(i,k,iq) ) * 62 & deltap(i,k) / deltap(i,k-1) 63 q(i,k,iq) = seuil_vap 64 endif 65 ENDDO 64 66 ENDDO 65 67 c -
LMDZ4/trunk/libf/dyn3d/read_reanalyse.F
r1122 r1146 13 13 c Declarations 14 14 c ----------------------------------------------------------------- 15 use netcdf 16 15 17 IMPLICIT NONE 16 18 … … 72 74 print *,'Vous êtes entrain de lire des données sur 73 75 . niveaux modèle' 74 ncidpl=NCOPN('apbp.nc',NCNOWRIT,rcode)75 varidap=NCVID(ncidpl,'AP',rcode)76 varidbp=NCVID(ncidpl,'BP',rcode)76 rcode=nf90_open('apbp.nc',nf90_nowrite,ncidpl) 77 rcode = nf90_inq_varid(ncidpl, 'AP', varidap) 78 rcode = nf90_inq_varid(ncidpl, 'BP', varidbp) 77 79 print*,'ncidpl,varidap',ncidpl,varidap 78 80 endif … … 80 82 c Vent zonal 81 83 if (guide_u) then 82 ncidu=NCOPN('u.nc',NCNOWRIT,rcode)83 varidu=NCVID(ncidu,'UWND',rcode)84 print*,'ncidu,varidu',ncidu,varidu85 if (ncidpl.eq.-99) ncidpl=ncidu84 rcode=nf90_open('u.nc',nf90_nowrite,ncidu) 85 rcode = nf90_inq_varid(ncidu, 'UWND', varidu) 86 print*,'ncidu,varidu',ncidu,varidu 87 if (ncidpl.eq.-99) ncidpl=ncidu 86 88 endif 87 89 88 90 c Vent meridien 89 91 if (guide_v) then 90 ncidv=NCOPN('v.nc',NCNOWRIT,rcode)91 varidv=NCVID(ncidv,'VWND',rcode)92 rcode=nf90_open('v.nc',nf90_nowrite,ncidv) 93 rcode = nf90_inq_varid(ncidv, 'VWND', varidv) 92 94 print*,'ncidv,varidv',ncidv,varidv 93 95 if (ncidpl.eq.-99) ncidpl=ncidv … … 96 98 c Temperature 97 99 if (guide_T) then 98 ncidt=NCOPN('T.nc',NCNOWRIT,rcode)99 varidt=NCVID(ncidt,'AIR',rcode)100 rcode=nf90_open('T.nc',nf90_nowrite,ncidt) 101 rcode = nf90_inq_varid(ncidt, 'AIR', varidt) 100 102 print*,'ncidt,varidt',ncidt,varidt 101 103 if (ncidpl.eq.-99) ncidpl=ncidt … … 104 106 c Humidite 105 107 if (guide_Q) then 106 ncidQ=NCOPN('hur.nc',NCNOWRIT,rcode)107 varidQ=NCVID(ncidQ,'RH',rcode)108 rcode=nf90_open('hur.nc',nf90_nowrite,ncidQ) 109 rcode = nf90_inq_varid(ncidQ, 'RH', varidQ) 108 110 print*,'ncidQ,varidQ',ncidQ,varidQ 109 111 if (ncidpl.eq.-99) ncidpl=ncidQ … … 112 114 c Pression de surface 113 115 if ((guide_P).OR.(guide_modele)) then 114 ncidps=NCOPN('ps.nc',NCNOWRIT,rcode)115 varidps=NCVID(ncidps,'SP',rcode)116 rcode=nf90_open('ps.nc',nf90_nowrite,ncidps) 117 rcode = nf90_inq_varid(ncidps, 'SP', varidps) 116 118 print*,'ncidps,varidps',ncidps,varidps 117 119 endif … … 119 121 c Coordonnee verticale 120 122 if (.not.guide_modele) then 121 if (ncep) then122 print*,'Vous etes entrain de lire des donnees NCEP'123 varidpl=NCVID(ncidpl,'LEVEL',rcode)124 else125 print*,'Vous etes entrain de lire des donnees ECMWF'126 varidpl=NCVID(ncidpl,'PRESSURE',rcode)127 endif128 print*,'ncidpl,varidpl',ncidpl,varidpl123 if (ncep) then 124 print*,'Vous etes entrain de lire des donnees NCEP' 125 rcode = nf90_inq_varid(ncidpl, 'LEVEL', varidpl) 126 else 127 print*,'Vous etes entrain de lire des donnees ECMWF' 128 rcode = nf90_inq_varid(ncidpl, 'PRESSURE', varidpl) 129 endif 130 print*,'ncidpl,varidpl',ncidpl,varidpl 129 131 endif 130 132 ! endif (first) -
LMDZ4/trunk/libf/dyn3d/serre.h
r524 r1146 2 2 ! $Header$ 3 3 ! 4 c5 c6 c..include serre.h7 c8 REAL clon,clat,transx,transy,alphax,alphay,pxo,pyo, 9 ,grossismx, grossismy, dzoomx, dzoomy,taux,tauy10 COMMON/serre/clon,clat,transx,transy,alphax,alphay,pxo,pyo , 11 ,grossismx, grossismy, dzoomx, dzoomy,taux,tauy4 !c 5 !c 6 !c..include serre.h 7 !c 8 REAL clon,clat,transx,transy,alphax,alphay,pxo,pyo, & 9 & grossismx, grossismy, dzoomx, dzoomy,taux,tauy 10 COMMON/serre/clon,clat,transx,transy,alphax,alphay,pxo,pyo , & 11 & grossismx, grossismy, dzoomx, dzoomy,taux,tauy -
LMDZ4/trunk/libf/dyn3d/test_period.F
r524 r1146 9 9 c teta, q , p et phis .......... 10 10 c 11 USE infotrac 11 12 c IMPLICIT NONE 12 13 c … … 17 18 c 18 19 REAL ucov(ip1jmp1,llm), vcov(ip1jm,llm), teta(ip1jmp1,llm) , 19 , q(ip1jmp1,llm,nq mx), p(ip1jmp1,llmp1), phis(ip1jmp1)20 , q(ip1jmp1,llm,nqtot), p(ip1jmp1,llmp1), phis(ip1jmp1) 20 21 c 21 22 c ..... Variables locales ..... … … 68 69 69 70 c 70 DO nq =1, nq mx71 DO nq =1, nqtot 71 72 DO l =1, llm 72 73 DO ij = 1, ip1jmp1, iip1 -
LMDZ4/trunk/libf/dyn3d/write_grads_dyn.h
r524 r1146 24 24 string10='teta' 25 25 CALL wrgrads(1,llm,teta,string10,string10) 26 do iq=1,nq mx26 do iq=1,nqtot 27 27 string10='q' 28 28 write(string10(2:2),'(i1)') iq -
LMDZ4/trunk/libf/dyn3dpar/addfi_p.F
r774 r1146 2 2 ! $Header$ 3 3 ! 4 SUBROUTINE addfi_p( nq,pdt, leapf, forward,4 SUBROUTINE addfi_p(pdt, leapf, forward, 5 5 S pucov, pvcov, pteta, pq , pps , 6 6 S pdufi, pdvfi, pdhfi,pdqfi, pdpfi ) 7 7 USE parallel 8 USE infotrac, ONLY : nqtot 8 9 IMPLICIT NONE 9 10 c … … 53 54 c ----------- 54 55 c 55 INTEGER nq56 57 56 REAL pdt 58 57 c 59 58 REAL pvcov(ip1jm,llm),pucov(ip1jmp1,llm) 60 REAL pteta(ip1jmp1,llm),pq(ip1jmp1,llm,nq ),pps(ip1jmp1)59 REAL pteta(ip1jmp1,llm),pq(ip1jmp1,llm,nqtot),pps(ip1jmp1) 61 60 c 62 61 REAL pdvfi(ip1jm,llm),pdufi(ip1jmp1,llm) 63 REAL pdqfi(ip1jmp1,llm,nq ),pdhfi(ip1jmp1,llm),pdpfi(ip1jmp1)62 REAL pdqfi(ip1jmp1,llm,nqtot),pdhfi(ip1jmp1,llm),pdpfi(ip1jmp1) 64 63 c 65 64 LOGICAL leapf,forward … … 166 165 ENDDO 167 166 168 DO iq = 3, nq 167 DO iq = 3, nqtot 169 168 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 170 169 DO k = 1,llm … … 208 207 209 208 if (pole_nord) then 210 DO iq = 1, nq 209 DO iq = 1, nqtot 211 210 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 212 211 DO k = 1, llm … … 225 224 226 225 if (pole_sud) then 227 DO iq = 1, nq 226 DO iq = 1, nqtot 228 227 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 229 228 DO k = 1, llm -
LMDZ4/trunk/libf/dyn3dpar/advtrac_p.F
r985 r1146 22 22 USE Vampir 23 23 USE times 24 USE infotrac 24 25 IMPLICIT NONE 25 26 c … … 35 36 #include "ener.h" 36 37 #include "description.h" 37 #include "advtrac.h"38 38 39 39 c------------------------------------------------------------------- … … 46 46 INTEGER iapptrac 47 47 REAL pbaru(ip1jmp1,llm),pbarv(ip1jm,llm) 48 REAL q(ip1jmp1,llm,nq mx),masse(ip1jmp1,llm)48 REAL q(ip1jmp1,llm,nqtot),masse(ip1jmp1,llm) 49 49 REAL p( ip1jmp1,llmp1 ),teta(ip1jmp1,llm) 50 50 REAL pk(ip1jmp1,llm) … … 59 59 REAL,SAVE::pbarug(ip1jmp1,llm),pbarvg(ip1jm,llm),wg(ip1jmp1,llm) 60 60 REAL (kind=kind(1.d0)) :: t_initial, t_final, tps_cpu 61 real cpuadv(nqmx)62 common/cpuadv/cpuadv63 64 61 INTEGER iadvtr 65 62 INTEGER ij,l,iq,iiq … … 76 73 REAL psppm(iim,jjp1) ! pression au sol 77 74 REAL unatppm(iim,jjp1,llm),vnatppm(iim,jjp1,llm) 78 REAL qppm(iim*jjp1,llm,nq mx)75 REAL qppm(iim*jjp1,llm,nqtot) 79 76 REAL fluxwppm(iim,jjp1,llm) 80 77 REAL apppm(llmp1), bpppm(llmp1) … … 88 85 REAL,SAVE :: teta_tmp(ip1jmp1,llm) 89 86 REAL,SAVE :: pk_tmp(ip1jmp1,llm) 90 87 91 88 ijb_u=ij_begin 92 89 ije_u=ij_end … … 196 193 call Register_SwapFieldHallo(pk_tmp,pk_tmp,ip1jmp1,llm, 197 194 * jj_Nb_vanleer,1,1,Request_vanleer) 198 do j=1,nq mx195 do j=1,nqtot 199 196 call Register_SwapFieldHallo(q(1,1,j),q(1,1,j),ip1jmp1,llm, 200 197 * jj_nb_vanleer,0,0,Request_vanleer) … … 279 276 c Appel des sous programmes d'advection 280 277 c----------------------------------------------------------- 281 do iq=1,nq mx278 do iq=1,nqtot 282 279 c call clock(t_initial) 283 280 if(iadv(iq) == 0) cycle … … 479 476 c$OMP END MASTER 480 477 481 do j=1,nq mx478 do j=1,nqtot 482 479 call Register_SwapFieldHallo(q(1,1,j),q(1,1,j),ip1jmp1,llm, 483 480 * jj_nb_caldyn,0,0,Request_vanleer) -
LMDZ4/trunk/libf/dyn3dpar/caladvtrac_p.F
r960 r1146 8 8 * flxw, pk, iapptrac) 9 9 USE parallel 10 USE infotrac 10 11 c 11 12 IMPLICIT NONE … … 25 26 #include "comconst.h" 26 27 #include "control.h" 27 #include "advtrac.h"28 28 29 29 c Arguments: 30 30 c ---------- 31 31 REAL pbaru( ip1jmp1,llm ),pbarv( ip1jm,llm),masse(ip1jmp1,llm) 32 REAL p( ip1jmp1,llmp1),q( ip1jmp1,llm,nq mx),dq( ip1jmp1,llm,2 )32 REAL p( ip1jmp1,llmp1),q( ip1jmp1,llm,nqtot),dq( ip1jmp1,llm,2 ) 33 33 REAL teta( ip1jmp1,llm),pk( ip1jmp1,llm) 34 34 REAL :: flxw(ip1jmp1,llm) … … 48 48 REAL finmasse(ip1jmp1,llm), dtvrtrac 49 49 50 51 50 cc 52 51 c -
LMDZ4/trunk/libf/dyn3dpar/calfis_p.F
r1000 r1146 4 4 C 5 5 C 6 SUBROUTINE calfis_p(nq, 7 $ lafin, 6 SUBROUTINE calfis_p(lafin, 8 7 $ rdayvrai, 9 8 $ heure, … … 40 39 USE Times 41 40 USE IOPHY 41 USE infotrac 42 42 43 IMPLICIT NONE 43 44 c======================================================================= … … 98 99 #include "paramet.h" 99 100 #include "temps.h" 100 #include "advtrac.h" 101 102 INTEGER ngridmx,nq 101 102 INTEGER ngridmx 103 103 PARAMETER( ngridmx = 2+(jjm-1)*iim - 1/jjm ) 104 104 … … 119 119 REAL pteta(iip1,jjp1,llm) 120 120 REAL pmasse(iip1,jjp1,llm) 121 REAL pq(iip1,jjp1,llm,nq mx)121 REAL pq(iip1,jjp1,llm,nqtot) 122 122 REAL pphis(iip1,jjp1) 123 123 REAL pphi(iip1,jjp1,llm) … … 126 126 REAL pducov(iip1,jjp1,llm) 127 127 REAL pdteta(iip1,jjp1,llm) 128 REAL pdq(iip1,jjp1,llm,nq mx)128 REAL pdq(iip1,jjp1,llm,nqtot) 129 129 c 130 130 REAL pps(iip1,jjp1) … … 135 135 REAL pdufi(iip1,jjp1,llm) 136 136 REAL pdhfi(iip1,jjp1,llm) 137 REAL pdqfi(iip1,jjp1,llm,nq mx)137 REAL pdqfi(iip1,jjp1,llm,nqtot) 138 138 REAL pdpsfi(iip1,jjp1) 139 139 … … 253 253 ALLOCATE(zphi(klon,llm),zphis(klon)) 254 254 ALLOCATE(zufi(klon,llm), zvfi(klon,llm)) 255 ALLOCATE(ztfi(klon,llm),zqfi(klon,llm,nq mx))255 ALLOCATE(ztfi(klon,llm),zqfi(klon,llm,nqtot)) 256 256 ALLOCATE(pcvgu(klon,llm), pcvgv(klon,llm)) 257 257 ALLOCATE(pcvgt(klon,llm), pcvgq(klon,llm,2)) 258 258 c ALLOCATE(pvervel(klon,llm)) 259 259 ALLOCATE(zdufi(klon,llm),zdvfi(klon,llm)) 260 ALLOCATE(zdtfi(klon,llm),zdqfi(klon,llm,nq mx))260 ALLOCATE(zdtfi(klon,llm),zdqfi(klon,llm,nqtot)) 261 261 ALLOCATE(zdpsrf(klon)) 262 262 ALLOCATE(zdufi2(klon+iim,llm),zdvfi2(klon+iim,llm)) … … 335 335 c 336 336 337 DO iq=1,nq 337 DO iq=1,nqtot 338 338 iiq=niadv(iq) 339 339 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) … … 369 369 CALL gr_dyn_fi_p(llm,iip1,jjp1,klon,pphi,zphi) 370 370 371 c$OMP MASTER372 371 CALL gr_dyn_fi_p(1,iip1,jjp1,klon,pphis,zphis) 373 c$OMP END MASTER 372 374 373 c$OMP BARRIER 375 374 … … 527 526 cc$OMP PARALLEL DEFAULT(NONE) 528 527 cc$OMP+ PRIVATE(i,l,offset,iq) 529 cc$OMP+ SHARED(klon_omp_nb,nq ,klon_omp_begin,528 cc$OMP+ SHARED(klon_omp_nb,nqtot,klon_omp_begin, 530 529 cc$OMP+ debut,lafin,rdayvrai,heure,dtphys,zplev,zplay, 531 530 cc$OMP+ zphi,zphis,presnivs,clesphy0,zufi,zvfi,ztfi, … … 549 548 allocate(zvfi_omp(klon,llm)) 550 549 allocate(ztfi_omp(klon,llm)) 551 allocate(zqfi_omp(klon,llm,nq ))550 allocate(zqfi_omp(klon,llm,nqtot)) 552 551 c allocate(pvervel_omp(klon,llm)) 553 552 allocate(zdufi_omp(klon,llm)) 554 553 allocate(zdvfi_omp(klon,llm)) 555 554 allocate(zdtfi_omp(klon,llm)) 556 allocate(zdqfi_omp(klon,llm,nq ))555 allocate(zdqfi_omp(klon,llm,nqtot)) 557 556 allocate(zdpsrf_omp(klon)) 558 557 allocate(flxwfi_omp(klon,llm)) … … 609 608 enddo 610 609 611 do iq=1,nq 610 do iq=1,nqtot 612 611 do l=1,llm 613 612 do i=1,klon … … 641 640 enddo 642 641 643 do iq=1,nq 642 do iq=1,nqtot 644 643 do l=1,llm 645 644 do i=1,klon … … 664 663 CALL physiq (klon, 665 664 . llm, 666 . nq,667 665 . debut, 668 666 . lafin, … … 743 741 enddo 744 742 745 do iq=1,nq 743 do iq=1,nqtot 746 744 do l=1,llm 747 745 do i=1,klon … … 775 773 enddo 776 774 777 do iq=1,nq 775 do iq=1,nqtot 778 776 do l=1,llm 779 777 do i=1,klon … … 896 894 c tendance sur la pression : 897 895 c ----------------------------------- 898 c$OMP MASTER899 896 CALL gr_fi_dyn_p(1,klon,iip1,jjp1,zdpsrf,pdpsfi) 900 c$OMP END MASTER901 897 c 902 898 c 62. enthalpie potentielle … … 937 933 c --------------------- 938 934 939 DO iq=1,nq mx935 DO iq=1,nqtot 940 936 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 941 937 DO l=1,llm … … 976 972 C 977 973 978 DO iq=1,nq 974 DO iq=1,nqtot 979 975 iiq=niadv(iq) 980 976 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) -
LMDZ4/trunk/libf/dyn3dpar/comdissip.h
r774 r1146 2 2 ! $Header$ 3 3 ! 4 c-----------------------------------------------------------------------5 c INCLUDEdissip.h4 !----------------------------------------------------------------------- 5 ! INCLUDE comdissip.h 6 6 7 COMMON/comdissip/ 8 $ lstardis,niterdis,coefdis,tetavel,tetatemp,gamdissip7 COMMON/comdissip/ & 8 & niterdis,coefdis,tetavel,tetatemp,gamdissip 9 9 10 10 11 LOGICAL lstardis12 11 INTEGER niterdis 13 12 14 13 REAL tetavel,tetatemp,coefdis,gamdissip 15 14 16 c-----------------------------------------------------------------------15 !----------------------------------------------------------------------- -
LMDZ4/trunk/libf/dyn3dpar/comgeom.h
r774 r1146 2 2 ! $Header$ 3 3 ! 4 *CDK comgeom5 COMMON/comgeom/ 6 1 cu(ip1jmp1),cv(ip1jm),unscu2(ip1jmp1),unscv2(ip1jm),7 2 aire(ip1jmp1),airesurg(ip1jmp1),aireu(ip1jmp1),8 3 airev(ip1jm),unsaire(ip1jmp1),apoln,apols,9 4 unsairez(ip1jm),airuscv2(ip1jm),airvscu2(ip1jm),10 5 aireij1(ip1jmp1),aireij2(ip1jmp1),aireij3(ip1jmp1),11 6 aireij4(ip1jmp1),alpha1(ip1jmp1),alpha2(ip1jmp1),12 7 alpha3(ip1jmp1),alpha4(ip1jmp1),alpha1p2(ip1jmp1),13 8 alpha1p4(ip1jmp1),alpha2p3(ip1jmp1),alpha3p4(ip1jmp1),14 9 fext(ip1jm),constang(ip1jmp1),rlatu(jjp1),rlatv(jjm),15 1 rlonu(iip1),rlonv(iip1),cuvsurcv(ip1jm),cvsurcuv(ip1jm),16 1 cvusurcu(ip1jmp1),cusurcvu(ip1jmp1),cuvscvgam1(ip1jm),17 2 cuvscvgam2(ip1jm),cvuscugam1(ip1jmp1),18 3 cvuscugam2(ip1jmp1),cvscuvgam(ip1jm),cuscvugam(ip1jmp1),19 4 unsapolnga1,unsapolnga2,unsapolsga1,unsapolsga2,20 5 unsair_gam1(ip1jmp1),unsair_gam2(ip1jmp1),unsairz_gam(ip1jm),21 6aivscu2gam(ip1jm),aiuscv2gam(ip1jm),xprimu(iip1),xprimv(iip1)4 !CDK comgeom 5 COMMON/comgeom/ & 6 & cu(ip1jmp1),cv(ip1jm),unscu2(ip1jmp1),unscv2(ip1jm), & 7 & aire(ip1jmp1),airesurg(ip1jmp1),aireu(ip1jmp1), & 8 & airev(ip1jm),unsaire(ip1jmp1),apoln,apols, & 9 & unsairez(ip1jm),airuscv2(ip1jm),airvscu2(ip1jm), & 10 & aireij1(ip1jmp1),aireij2(ip1jmp1),aireij3(ip1jmp1), & 11 & aireij4(ip1jmp1),alpha1(ip1jmp1),alpha2(ip1jmp1), & 12 & alpha3(ip1jmp1),alpha4(ip1jmp1),alpha1p2(ip1jmp1), & 13 & alpha1p4(ip1jmp1),alpha2p3(ip1jmp1),alpha3p4(ip1jmp1), & 14 & fext(ip1jm),constang(ip1jmp1),rlatu(jjp1),rlatv(jjm), & 15 & rlonu(iip1),rlonv(iip1),cuvsurcv(ip1jm),cvsurcuv(ip1jm), & 16 & cvusurcu(ip1jmp1),cusurcvu(ip1jmp1),cuvscvgam1(ip1jm), & 17 & cuvscvgam2(ip1jm),cvuscugam1(ip1jmp1), & 18 & cvuscugam2(ip1jmp1),cvscuvgam(ip1jm),cuscvugam(ip1jmp1), & 19 & unsapolnga1,unsapolnga2,unsapolsga1,unsapolsga2, & 20 & unsair_gam1(ip1jmp1),unsair_gam2(ip1jmp1),unsairz_gam(ip1jm), & 21 & aivscu2gam(ip1jm),aiuscv2gam(ip1jm),xprimu(iip1),xprimv(iip1) 22 22 23 c 24 REAL 25 1 cu,cv,unscu2,unscv2,aire,airesurg,aireu,airev,unsaire,apoln ,26 2 apols,unsairez,airuscv2,airvscu2,aireij1,aireij2,aireij3,aireij4,27 3 alpha1,alpha2,alpha3,alpha4,alpha1p2,alpha1p4,alpha2p3,alpha3p4 ,28 4 fext,constang,rlatu,rlatv,rlonu,rlonv,cuvscvgam1,cuvscvgam2 ,29 5 cvuscugam1,cvuscugam2,cvscuvgam,cuscvugam,unsapolnga1,unsapolnga230 6 ,unsapolsga1,unsapolsga2,unsair_gam1,unsair_gam2,unsairz_gam ,31 7 aivscu2gam ,aiuscv2gam,cuvsurcv,cvsurcuv,cvusurcu,cusurcvu,xprimu32 8, xprimv33 c 23 ! 24 REAL & 25 & cu,cv,unscu2,unscv2,aire,airesurg,aireu,airev,unsaire,apoln ,& 26 & apols,unsairez,airuscv2,airvscu2,aireij1,aireij2,aireij3,aireij4,& 27 & alpha1,alpha2,alpha3,alpha4,alpha1p2,alpha1p4,alpha2p3,alpha3p4 ,& 28 & fext,constang,rlatu,rlatv,rlonu,rlonv,cuvscvgam1,cuvscvgam2 ,& 29 & cvuscugam1,cvuscugam2,cvscuvgam,cuscvugam,unsapolnga1,unsapolnga2& 30 & ,unsapolsga1,unsapolsga2,unsair_gam1,unsair_gam2,unsairz_gam ,& 31 & aivscu2gam ,aiuscv2gam,cuvsurcv,cvsurcuv,cvusurcu,cusurcvu,xprimu& 32 & , xprimv 33 ! -
LMDZ4/trunk/libf/dyn3dpar/conf_gcm.F
r1046 r1146 6 6 SUBROUTINE conf_gcm( tapedef, etatinit, clesphy0 ) 7 7 c 8 #ifdef CPP_IOIPSL 8 9 use IOIPSL 10 #else 11 ! if not using IOIPSL, we still need to use (a local version of) getin 12 use ioipsl_getincom 13 #endif 9 14 use misc_mod 10 15 use mod_filtre_fft, ONLY : use_filtre_fft … … 109 114 c Parametres de controle du run: 110 115 c----------------------------------------------------------------------- 116 !Config Key = planet_type 117 !Config Desc = planet type ("earth", "mars", "venus", ...) 118 !Config Def = earth 119 !Config Help = this flag sets the type of atymosphere that is considered 120 planet_type="earth" 121 CALL getin('planet_type',planet_type) 111 122 112 123 !Config Key = dayref … … 189 200 CALL getin('periodav',periodav) 190 201 202 !Config Key = output_grads_dyn 203 !Config Desc = output dynamics diagnostics in 'dyn.dat' file 204 !Config Def = n 205 !Config Help = output dynamics diagnostics in Grads-readable 'dyn.dat' file 206 output_grads_dyn=.false. 207 CALL getin('output_grads_dyn',output_grads_dyn) 208 191 209 !Config Key = idissip 192 210 !Config Desc = periode de la dissipation … … 284 302 c ............................................................... 285 303 304 !Config Key = read_start 305 !Config Desc = Initialize model using a 'start.nc' file 306 !Config Def = y 307 !Config Help = y: intialize dynamical fields using a 'start.nc' file 308 ! n: fields are initialized by 'iniacademic' routine 309 read_start= .true. 310 CALL getin('read_start',read_start) 311 286 312 !Config Key = iflag_phys 287 313 !Config Desc = Avec ls physique … … 341 367 c 342 368 IF( ABS(clat - clatt).GE. 0.001 ) THEN 343 PRINT *,' La valeur de clat passee par run.def est differente de344 *celle lue sur le fichier start '369 write(lunout,*)'conf_gcm: La valeur de clat passee par run.def', 370 & ' est differente de celle lue sur le fichier start ' 345 371 STOP 346 372 ENDIF … … 356 382 357 383 IF( ABS(grossismx - grossismxx).GE. 0.001 ) THEN 358 PRINT *,' La valeur de grossismx passee par run.def est differente359 *de celle lue sur le fichier start '384 write(lunout,*)'conf_gcm: La valeur de grossismx passee par ', 385 & 'run.def est differente de celle lue sur le fichier start ' 360 386 STOP 361 387 ENDIF … … 370 396 371 397 IF( ABS(grossismy - grossismyy).GE. 0.001 ) THEN 372 PRINT *,' La valeur de grossismy passee par run.def est differen373 *te de celle lue sur le fichier start '398 write(lunout,*)'conf_gcm: La valeur de grossismy passee par ', 399 & 'run.def est differente de celle lue sur le fichier start ' 374 400 STOP 375 401 ENDIF 376 402 377 403 IF( grossismx.LT.1. ) THEN 378 PRINT *,' *** ATTENTION !! grossismx < 1 . *** ' 404 write(lunout,*) 405 & 'conf_gcm: *** ATTENTION !! grossismx < 1 . *** ' 379 406 STOP 380 407 ELSE … … 384 411 385 412 IF( grossismy.LT.1. ) THEN 386 PRINT *,' *** ATTENTION !! grossismy < 1 . *** ' 413 write(lunout,*) 414 & 'conf_gcm: *** ATTENTION !! grossismy < 1 . *** ' 387 415 STOP 388 416 ELSE … … 390 418 ENDIF 391 419 392 PRINT *,' alphax alphay defrun',alphax,alphay420 write(lunout,*)'conf_gcm: alphax alphay',alphax,alphay 393 421 c 394 422 c alphax et alphay sont les anciennes formulat. des grossissements … … 405 433 406 434 IF( .NOT.fxyhypb ) THEN 407 408 PRINT *,' ******** PBS DANS DEFRUN******** '409 PRINT *,' *** fxyhypb lu sur le fichier start est F',410 * ' alors qu il est T sur run.def ***'435 IF( fxyhypbb ) THEN 436 write(lunout,*)' ******** PBS DANS CONF_GCM ******** ' 437 write(lunout,*)' *** fxyhypb lu sur le fichier start est ', 438 * 'F alors qu il est T sur run.def ***' 411 439 STOP 412 440 ENDIF 413 441 ELSE 414 415 PRINT *,' ******** PBS DANS DEFRUN******** '416 PRINT *,' *** fxyhypb lu sur le fichier start est T',417 * ' alors qu il est F sur run.def **** '442 IF( .NOT.fxyhypbb ) THEN 443 write(lunout,*)' ******** PBS DANS CONF_GCM ******** ' 444 write(lunout,*)' *** fxyhypb lu sur le fichier start est ', 445 * 'T alors qu il est F sur run.def **** ' 418 446 STOP 419 447 ENDIF 420 448 ENDIF 421 449 c … … 430 458 IF( fxyhypb ) THEN 431 459 IF( ABS(dzoomx - dzoomxx).GE. 0.001 ) THEN 432 PRINT *,' La valeur de dzoomx passee par run.def est differente433 * de celle lue sur le fichier start '460 write(lunout,*)'conf_gcm: La valeur de dzoomx passee par ', 461 * 'run.def est differente de celle lue sur le fichier start ' 434 462 STOP 435 463 ENDIF … … 446 474 IF( fxyhypb ) THEN 447 475 IF( ABS(dzoomy - dzoomyy).GE. 0.001 ) THEN 448 PRINT *,' La valeur de dzoomy passee par run.def est differente449 * de celle lue sur le fichier start '476 write(lunout,*)'conf_gcm: La valeur de dzoomy passee par ', 477 * 'run.def est differente de celle lue sur le fichier start ' 450 478 STOP 451 479 ENDIF … … 461 489 IF( fxyhypb ) THEN 462 490 IF( ABS(taux - tauxx).GE. 0.001 ) THEN 463 PRINT *,' La valeur de taux passee par run.def est differente464 * de celle lue sur le fichier start '491 write(lunout,*)'conf_gcm: La valeur de taux passee par ', 492 * 'run.def est differente de celle lue sur le fichier start ' 465 493 STOP 466 494 ENDIF … … 476 504 IF( fxyhypb ) THEN 477 505 IF( ABS(tauy - tauyy).GE. 0.001 ) THEN 478 PRINT *,' La valeur de tauy passee par run.def est differente479 * de celle lue sur le fichier start '506 write(lunout,*)'conf_gcm: La valeur de tauy passee par ', 507 * 'run.def est differente de celle lue sur le fichier start ' 480 508 STOP 481 509 ENDIF … … 495 523 496 524 IF( .NOT.ysinus ) THEN 497 IF( ysinuss ) THEN 498 PRINT *,' ******** PBS DANS DEFRUN ******** ' 499 PRINT *,' *** ysinus lu sur le fichier start est F ', 500 * 'alors qu il est T sur run.def ***' 525 IF( ysinuss ) THEN 526 write(lunout,*)' ******** PBS DANS CONF_GCM ******** ' 527 write(lunout,*)' *** ysinus lu sur le fichier start est F', 528 * ' alors qu il est T sur run.def ***' 529 STOP 530 ENDIF 531 ELSE 532 IF( .NOT.ysinuss ) THEN 533 write(lunout,*)' ******** PBS DANS CONF_GCM ******** ' 534 write(lunout,*)' *** ysinus lu sur le fichier start est T', 535 * ' alors qu il est F sur run.def **** ' 501 536 STOP 502 ENDIF 503 ELSE 504 IF( .NOT.ysinuss ) THEN 505 PRINT *,' ******** PBS DANS DEFRUN ******** ' 506 PRINT *,' *** ysinus lu sur le fichier start est T ', 507 * 'alors qu il est F sur run.def **** ' 508 STOP 509 ENDIF 537 ENDIF 510 538 ENDIF 511 ENDIF 539 ENDIF ! of IF( .NOT.fxyhypb ) 512 540 c 513 541 !Config Key = offline … … 529 557 CALL getin('config_inca',config_inca) 530 558 559 !Config Key = ok_dynzon 560 !Config Desc = calcul et sortie des transports 561 !Config Def = n 562 !Config Help = Permet de mettre en route le calcul des transports 563 !Config 564 ok_dynzon = .FALSE. 565 CALL getin('ok_dynzon',ok_dynzon) 566 531 567 532 568 write(lunout,*)' #########################################' 533 569 write(lunout,*)' Configuration des parametres du gcm: ' 570 write(lunout,*)' planet_type = ', planet_type 534 571 write(lunout,*)' dayref = ', dayref 535 572 write(lunout,*)' anneeref = ', anneeref … … 540 577 write(lunout,*)' iecri = ', iecri 541 578 write(lunout,*)' periodav = ', periodav 579 write(lunout,*)' output_grads_dyn = ', output_grads_dyn 542 580 write(lunout,*)' idissip = ', idissip 543 581 write(lunout,*)' lstardis = ', lstardis … … 550 588 write(lunout,*)' coefdis = ', coefdis 551 589 write(lunout,*)' purmats = ', purmats 590 write(lunout,*)' read_start = ', read_start 552 591 write(lunout,*)' iflag_phys = ', iflag_phys 553 592 write(lunout,*)' clonn = ', clonn … … 562 601 write(lunout,*)' offline = ', offline 563 602 write(lunout,*)' config_inca = ', config_inca 603 write(lunout,*)' ok_dynzon = ', ok_dynzon 564 604 565 605 RETURN … … 600 640 601 641 IF( grossismx.LT.1. ) THEN 602 PRINT *,' *** ATTENTION !! grossismx < 1 . *** ' 642 write(lunout,*) 643 & 'conf_gcm: *** ATTENTION !! grossismx < 1 . *** ' 603 644 STOP 604 645 ELSE … … 608 649 609 650 IF( grossismy.LT.1. ) THEN 610 PRINT *,' *** ATTENTION !! grossismy < 1 . *** ' 651 write(lunout,*) 652 & 'conf_gcm: *** ATTENTION !! grossismy < 1 . *** ' 611 653 STOP 612 654 ELSE … … 614 656 ENDIF 615 657 616 PRINT *,' alphax alphay defrun',alphax,alphay658 write(lunout,*)'conf_gcm: alphax alphay ',alphax,alphay 617 659 c 618 660 c alphax et alphay sont les anciennes formulat. des grossissements … … 685 727 CALL getin('config_inca',config_inca) 686 728 729 !Config Key = ok_dynzon 730 !Config Desc = calcul et sortie des transports 731 !Config Def = n 732 !Config Help = Permet de mettre en route le calcul des transports 733 !Config 734 ok_dynzon = .FALSE. 735 CALL getin('ok_dynzon',ok_dynzon) 736 687 737 !Config Key = use_filtre_fft 688 738 !Config Desc = flag d'activation des FFT pour le filtre … … 692 742 use_filtre_fft=.FALSE. 693 743 CALL getin('use_filtre_fft',use_filtre_fft) 744 745 IF (use_filtre_fft .AND. grossismx /= 1.0) THEN 746 write(lunout,*)'WARNING !!! ' 747 write(lunout,*)"Le zoom en longitude est incompatible", 748 & " avec l'utilisation du filtre FFT ", 749 & "---> filtre FFT désactivé " 750 use_filtre_fft=.FALSE. 751 ENDIF 752 753 694 754 695 755 !Config Key = use_mpi_alloc 696 !Config Desc = Utilise un buffer MPI en m émoire globale756 !Config Desc = Utilise un buffer MPI en m�moire globale 697 757 !Config Def = false 698 758 !Config Help = permet d'activer l'utilisation d'un buffer MPI 699 !Config en m émoire globale a l'aide de la fonction MPI_ALLOC.700 !Config Cela peut am éliorer la bande passante des transferts MPI759 !Config en m�moire globale a l'aide de la fonction MPI_ALLOC. 760 !Config Cela peut am�liorer la bande passante des transferts MPI 701 761 !Config d'un facteur 2 702 762 use_mpi_alloc=.FALSE. … … 706 766 !Config Desc = taille des blocs openmp 707 767 !Config Def = 1 708 !Config Help = defini la taille des packets d'it ération openmp709 !Config distribu ée à chaque tâche lors de l'entrée dans une710 !Config boucle parall élisée768 !Config Help = defini la taille des packets d'it�ration openmp 769 !Config distribu�e � chaque t�che lors de l'entr�e dans une 770 !Config boucle parall�lis�e 711 771 712 772 omp_chunk=1 … … 716 776 !Config Desc = activation de la version strato 717 777 !Config Def = .FALSE. 718 !Config Help = active la version stratosph érique de LMDZ de F. Lott778 !Config Help = active la version stratosph�rique de LMDZ de F. Lott 719 779 720 780 ok_strato=.FALSE. … … 731 791 write(lunout,*)' #########################################' 732 792 write(lunout,*)' Configuration des parametres du gcm: ' 793 write(lunout,*)' planet_type = ', planet_type 733 794 write(lunout,*)' dayref = ', dayref 734 795 write(lunout,*)' anneeref = ', anneeref … … 739 800 write(lunout,*)' iecri = ', iecri 740 801 write(lunout,*)' periodav = ', periodav 802 write(lunout,*)' output_grads_dyn = ', output_grads_dyn 741 803 write(lunout,*)' idissip = ', idissip 742 804 write(lunout,*)' lstardis = ', lstardis … … 749 811 write(lunout,*)' coefdis = ', coefdis 750 812 write(lunout,*)' purmats = ', purmats 813 write(lunout,*)' read_start = ', read_start 751 814 write(lunout,*)' iflag_phys = ', iflag_phys 752 815 write(lunout,*)' clon = ', clon … … 754 817 write(lunout,*)' grossismx = ', grossismx 755 818 write(lunout,*)' grossismy = ', grossismy 756 write(lunout,*)' fxyhypb b = ', fxyhypbb819 write(lunout,*)' fxyhypb = ', fxyhypb 757 820 write(lunout,*)' dzoomx = ', dzoomx 758 821 write(lunout,*)' dzoomy = ', dzoomy … … 761 824 write(lunout,*)' offline = ', offline 762 825 write(lunout,*)' config_inca = ', config_inca 826 write(lunout,*)' ok_dynzon = ', ok_dynzon 763 827 write(lunout,*)' use_filtre_fft = ', use_filtre_fft 764 828 write(lunout,*)' use_mpi_alloc = ', use_mpi_alloc -
LMDZ4/trunk/libf/dyn3dpar/control.h
r985 r1146 14 14 & iperiod,iapp_tracvl,iconser,iecri,idissip,iphysiq , & 15 15 & periodav,iecrimoy,dayref,anneeref, & 16 & raz_date,offline,ip_ebil_dyn,config_inca 16 & raz_date,offline,ip_ebil_dyn,config_inca, & 17 & planet_type,output_grads_dyn,ok_dynzon 17 18 18 19 INTEGER nday,day_step,iperiod,iapp_tracvl,iconser,iecri, & … … 21 22 REAL periodav 22 23 logical offline 23 CHARACTER*4 config_inca 24 CHARACTER (len=4) :: config_inca 25 CHARACTER(len=10) :: planet_type ! planet type ('earth','mars',...) 26 LOGICAL :: output_grads_dyn ! output dynamics diagnostics in 27 ! binary grads file 'dyn.dat' (y/n) 28 LOGICAL :: ok_dynzon 24 29 !----------------------------------------------------------------------- -
LMDZ4/trunk/libf/dyn3dpar/covnat_p.F
r1000 r1146 61 61 END DO 62 62 63 ijb=ij_begin 63 ijb=ij_begin-iip1 64 64 ije=ij_end 65 if (pole_nord) ijb=ij_begin 65 66 if (pole_sud) ije=ij_end-iip1 66 67 -
LMDZ4/trunk/libf/dyn3dpar/create_etat0_limit.F
r1017 r1146 8 8 USE mod_const_mpi 9 9 USE phys_state_var_mod 10 USE infotrac 10 11 IMPLICIT NONE 11 12 c … … 31 32 #include "paramet.h" 32 33 #include "indicesol.h" 33 #include "advtrac.h"34 34 #include "control.h" 35 35 #include "clesphys.h" … … 37 37 ! REAL :: pctsrf(iim*(jjm-1)+2, nbsrf) 38 38 39 c initialisation traceurs40 hadv_flg(:) = 0.41 vadv_flg(:) = 0.42 conv_flg(:) = 0.43 pbl_flg(:) = 0.44 tracnam(:) = ' '45 nprath = 146 nbtrac = 047 mmt_adj(:,:,:,:) = 148 49 39 IF (config_inca /= 'none') THEN 50 40 #ifdef INCA 51 41 call init_const_lmdz( 52 $ nbtr ac,anneeref,dayref,42 $ nbtr,anneeref,dayref, 53 43 $ iphysiq,day_step,nday) 54 44 #endif 55 print *, 'nbtr ac =' , nbtrac45 print *, 'nbtr =' , nbtr 56 46 END IF 57 47 … … 59 49 60 50 61 CALL Init_Phys_lmdz(iim,jjp1,llm, nqmx-2,1,(/(jjm-1)*iim+2/))51 CALL Init_Phys_lmdz(iim,jjp1,llm,1,(/(jjm-1)*iim+2/)) 62 52 PRINT *,'---> klon=',klon 63 53 -
LMDZ4/trunk/libf/dyn3dpar/diagedyn.F
r774 r1146 58 58 #include "paramet.h" 59 59 #include "comgeom.h" 60 61 #ifdef CPP_PHYS 60 #include "iniprint.h" 61 62 #ifdef CPP_EARTH 62 63 #include "../phylmd/YOMCST.h" 63 64 #include "../phylmd/YOETHF.h" … … 139 140 140 141 141 #ifdef CPP_ PHYS142 #ifdef CPP_EARTH 142 143 c====================================================================== 143 144 C Compute Kinetic enrgy … … 314 315 C 315 316 #else 316 print*,'Pour l instant diagedyn a besoin de la physique'317 write(lunout,*),'diagedyn: Needs Earth physics to function' 317 318 #endif 319 ! #endif of #ifdef CPP_EARTH 318 320 RETURN 319 321 END -
LMDZ4/trunk/libf/dyn3dpar/dynetat0.F
r774 r1146 2 2 ! $Header$ 3 3 ! 4 SUBROUTINE dynetat0(fichnom, nq,vcov,ucov,4 SUBROUTINE dynetat0(fichnom,vcov,ucov, 5 5 . teta,q,masse,ps,phis,time) 6 USE infotrac 6 7 IMPLICIT NONE 7 8 … … 32 33 #include "serre.h" 33 34 #include "logic.h" 34 #include "advtrac.h"35 35 36 36 c Arguments: … … 38 38 39 39 CHARACTER*(*) fichnom 40 INTEGER nq41 40 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm),teta(ip1jmp1,llm) 42 REAL q(ip1jmp1,llm,nq ),masse(ip1jmp1,llm)41 REAL q(ip1jmp1,llm,nqtot),masse(ip1jmp1,llm) 43 42 REAL ps(ip1jmp1),phis(ip1jmp1) 44 43 … … 53 52 54 53 c----------------------------------------------------------------------- 55 56 54 c Ouverture NetCDF du fichier etat initial 57 55 … … 315 313 316 314 317 IF(nq.GE.1) THEN 318 DO iq=1,nq 315 DO iq=1,nqtot 319 316 ierr = NF_INQ_VARID (nid, tname(iq), nvarid) 320 317 IF (ierr .NE. NF_NOERR) THEN … … 334 331 ENDIF 335 332 ENDDO 336 ENDIF337 333 338 334 ierr = NF_INQ_VARID (nid, "masse", nvarid) -
LMDZ4/trunk/libf/dyn3dpar/dynredem.F
r1000 r1146 3 3 ! 4 4 c 5 SUBROUTINE dynredem0(fichnom,iday_end,phis ,nq)5 SUBROUTINE dynredem0(fichnom,iday_end,phis) 6 6 USE IOIPSL 7 USE infotrac 7 8 IMPLICIT NONE 8 9 c======================================================================= … … 22 23 #include "description.h" 23 24 #include "serre.h" 24 #include "advtrac.h"25 25 26 26 c Arguments: … … 29 29 REAL phis(ip1jmp1) 30 30 CHARACTER*(*) fichnom 31 INTEGER nq32 31 33 32 c Local: … … 458 457 dims4(3) = idim_s 459 458 dims4(4) = idim_tim 460 IF(nq.GE.1) THEN 461 DO iq=1,nq 459 460 DO iq=1,nqtot 462 461 cIM 220306 BEG 463 462 #ifdef NC_DOUBLE … … 469 468 ierr = NF_PUT_ATT_TEXT (nid, nvarid, "title", 12,ttext(iq)) 470 469 ENDDO 471 ENDIF472 470 c 473 471 dims4(1) = idim_rlonv … … 508 506 END 509 507 SUBROUTINE dynredem1(fichnom,time, 510 . vcov,ucov,teta,q,nq,masse,ps) 508 . vcov,ucov,teta,q,masse,ps) 509 USE infotrac 511 510 IMPLICIT NONE 512 511 c================================================================= … … 519 518 #include "comvert.h" 520 519 #include "comgeom.h" 521 #include "advtrac.h"522 520 #include "temps.h" 523 521 #include "control.h" 524 522 525 INTEGER nq,l523 INTEGER l 526 524 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) 527 525 REAL teta(ip1jmp1,llm) 528 526 REAL ps(ip1jmp1),masse(ip1jmp1,llm) 529 REAL q(ip1jmp1,llm,nq )527 REAL q(ip1jmp1,llm,nqtot) 530 528 CHARACTER*(*) fichnom 531 529 … … 633 631 END IF 634 632 635 IF(nq.GE.1) THEN 636 do iq=1,nq 633 do iq=1,nqtot 637 634 638 635 IF (config_inca == 'none') THEN … … 704 701 705 702 ENDDO 706 ENDIF707 703 c 708 704 ierr = NF_INQ_VARID(nid, "masse", nvarid) -
LMDZ4/trunk/libf/dyn3dpar/dynredem_p.F
r1084 r1146 3 3 ! 4 4 c 5 SUBROUTINE dynredem0_p(fichnom,iday_end,phis ,nq)5 SUBROUTINE dynredem0_p(fichnom,iday_end,phis) 6 6 USE IOIPSL 7 7 USE parallel 8 USE infotrac 8 9 IMPLICIT NONE 9 10 c======================================================================= … … 23 24 #include "description.h" 24 25 #include "serre.h" 25 #include "advtrac.h"26 26 27 27 c Arguments: … … 30 30 REAL phis(ip1jmp1) 31 31 CHARACTER*(*) fichnom 32 INTEGER nq33 32 34 33 c Local: … … 54 53 INTEGER yyears0,jjour0, mmois0 55 54 character*30 unites 56 57 55 58 56 c----------------------------------------------------------------------- … … 461 459 dims4(3) = idim_s 462 460 dims4(4) = idim_tim 463 IF(nq.GE.1) THEN 464 DO iq=1,nq 461 462 DO iq=1,nqtot 465 463 cIM 220306 BEG 466 464 #ifdef NC_DOUBLE … … 472 470 ierr = NF_PUT_ATT_TEXT (nid, nvarid, "title", 12,ttext(iq)) 473 471 ENDDO 474 ENDIF475 472 c 476 473 dims4(1) = idim_rlonv … … 513 510 END 514 511 SUBROUTINE dynredem1_p(fichnom,time, 515 . vcov,ucov,teta,q, nq,masse,ps)512 . vcov,ucov,teta,q,masse,ps) 516 513 USE parallel 514 USE infotrac 517 515 IMPLICIT NONE 518 516 c================================================================= … … 525 523 #include "comvert.h" 526 524 #include "comgeom.h" 527 #include "advtrac.h"528 525 #include "temps.h" 529 526 #include "control.h" 530 527 531 INTEGER nq,l528 INTEGER l 532 529 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) 533 530 REAL teta(ip1jmp1,llm) 534 531 REAL ps(ip1jmp1),masse(ip1jmp1,llm) 535 REAL q(ip1jmp1,llm,nq )532 REAL q(ip1jmp1,llm,nqtot) 536 533 CHARACTER*(*) fichnom 537 534 … … 559 556 call Gather_Field(ps,ip1jmp1,1,0) 560 557 561 do iq=1,nq 558 do iq=1,nqtot 562 559 call Gather_Field(q(1,1,iq),ip1jmp1,llm,0) 563 560 enddo … … 660 657 END IF 661 658 662 IF(nq.GE.1) THEN 663 do iq=1,nq 659 do iq=1,nqtot 664 660 665 661 IF (config_inca == 'none') THEN … … 731 727 732 728 ENDDO 733 ENDIF734 735 729 736 730 -
LMDZ4/trunk/libf/dyn3dpar/etat0_netcdf.F
r1058 r1146 5 5 c 6 6 SUBROUTINE etat0_netcdf (interbar, masque) 7 7 #ifdef CPP_EARTH 8 8 USE startvar 9 9 USE ioipsl … … 12 12 USE pbl_surface_mod 13 13 USE phys_state_var_mod 14 USE filtreg_mod 15 USE infotrac 16 #endif 17 !#endif of #ifdef CPP_EARTH 14 18 ! 15 19 IMPLICIT NONE … … 23 27 ! .KLON=KFDIA-KIDIA+1,KLEV=llm 24 28 ! 29 #ifdef CPP_EARTH 25 30 #include "comgeom2.h" 26 31 #include "comvert.h" … … 29 34 #include "dimsoil.h" 30 35 #include "temps.h" 31 ! 36 #endif 37 !#endif of #ifdef CPP_EARTH 38 ! arguments: 32 39 LOGICAL interbar 40 REAL :: masque(iip1,jjp1) 41 42 #ifdef CPP_EARTH 43 ! local variables: 33 44 REAL :: latfi(klon), lonfi(klon) 34 REAL :: orog(iip1,jjp1), rugo(iip1,jjp1), masque(iip1,jjp1),45 REAL :: orog(iip1,jjp1), rugo(iip1,jjp1), 35 46 . psol(iip1, jjp1), phis(iip1, jjp1) 36 47 REAL :: p3d(iip1, jjp1, llm+1) … … 38 49 REAL :: vvent(iip1, jjm, llm) 39 50 REAL :: t3d(iip1, jjp1, llm), tpot(iip1, jjp1, llm) 40 REAL :: q3d(iip1, jjp1, llm,nqmx), qsat(iip1, jjp1, llm) 51 REAL :: qsat(iip1, jjp1, llm) 52 REAL,ALLOCATABLE :: q3d(:, :, :,:) 41 53 REAL :: tsol(klon), qsol(klon), sn(klon) 42 54 REAL :: tsolsrf(klon,nbsrf), qsolsrf(klon,nbsrf),snsrf(klon,nbsrf) … … 141 153 ! 142 154 preff = 101325. 155 pa = 50000. 143 156 unskap = 1./kappa 144 157 ! … … 164 177 print*,'dtvr',dtvr 165 178 166 CALL inicons 0()179 CALL iniconst() 167 180 CALL inigeom() 168 181 ! 169 182 CALL inifilr() 183 C init pour traceurs 184 call infotrac_init 185 ALLOCATE(q3d(iip1, jjp1, llm,nqtot)) 170 186 ! CALL phys_state_var_init() 171 187 ! … … 623 639 phis(iip1,:) = phis(1,:) 624 640 625 C init pour traceurs626 call iniadvtrac(nq)627 641 C Ecriture 628 642 CALL inidissip( lstardis, nitergdiv, nitergrot, niterh , … … 648 662 * phi,w, pbaru,pbarv,time+iday-dayref ) 649 663 print*,'sortie caldyn0' 650 CALL dynredem0("start.nc",dayref,phis ,nqmx)664 CALL dynredem0("start.nc",dayref,phis) 651 665 print*,'sortie dynredem0' 652 CALL dynredem1("start.nc",0.0,vvent,uvent,tpot,q3d, nqmx,masse ,666 CALL dynredem1("start.nc",0.0,vvent,uvent,tpot,q3d,masse , 653 667 . psol) 654 668 print*,'sortie dynredem1' … … 742 756 visu_file='Etat0_visu.nc' 743 757 CALL initdynav(visu_file,dayref,anneeref,time_step, 744 . t_ops, t_wrt, nqmx,visuid)745 CALL writedynav(visuid, nqmx,itau,vvent ,758 . t_ops, t_wrt, visuid) 759 CALL writedynav(visuid, itau,vvent , 746 760 . uvent,tpot,pk,phi,q3d,masse,psol,phis) 747 761 else … … 750 764 print*,'entree histclo' 751 765 CALL histclo 766 767 #endif 768 !#endif of #ifdef CPP_EARTH 752 769 RETURN 753 770 ! -
LMDZ4/trunk/libf/dyn3dpar/filtreg_p.F
r985 r1146 2 2 3 3 SUBROUTINE filtreg_p ( champ, ibeg, iend, nlat, nbniv, 4 .ifiltre, iaire, griscal ,iter)5 USE Parallel, only : OMP_CHUNK 4 & ifiltre, iaire, griscal ,iter) 5 USE Parallel, only : OMP_CHUNK 6 6 USE mod_filtre_fft 7 7 USE timer_filtre 8 9 USE filtreg_mod 10 8 11 IMPLICIT NONE 9 12 10 13 c======================================================================= 11 14 c … … 50 53 #include "dimensions.h" 51 54 #include "paramet.h" 52 #include "parafilt.h"53 55 #include "coefils.h" 54 56 c … … 57 59 INTEGER iim2,immjm 58 60 INTEGER jdfil1,jdfil2,jffil1,jffil2,jdfil,jffil 59 61 60 62 REAL champ( iip1,nlat,nbniv) 61 REAL matriceun,matriceus,matricevn,matricevs,matrinvn,matrinvs62 COMMON/matrfil/matriceun(iim,iim,nfilun),matriceus(iim,iim,nfilus)63 , , matricevn(iim,iim,nfilvn),matricevs(iim,iim,nfilvs)64 , , matrinvn(iim,iim,nfilun),matrinvs (iim,iim,nfilus)65 cym REAL eignq(iim), sdd1(iim),sdd2(iim)66 67 REAL eignq(iim)68 REAL :: sdd1(iim),sdd2(iim)69 63 70 64 LOGICAL griscal … … 74 68 REAL :: champ_in(iip1,nlat,nbniv) 75 69 76 REAL,SAVE,TARGET :: sddu_loc(iim)77 REAL,SAVE,TARGET :: sddv_loc(iim)78 REAL,SAVE,TARGET :: unsddu_loc(iim)79 REAL,SAVE,TARGET :: unsddv_loc(iim)80 c$OMP THREADPRIVATE(sddu_loc,sddv_loc,unsddu_loc,unsddv_loc)81 70 LOGICAL,SAVE :: first=.TRUE. 82 71 c$OMP THREADPRIVATE(first) 83 72 73 REAL, DIMENSION(iip1,nlat,nbniv) :: champ_loc 74 INTEGER :: ll_nb, nbniv_loc 75 REAL, SAVE :: sdd12(iim,4) 76 c$OMP THREADPRIVATE(sdd12) 77 78 INTEGER, PARAMETER :: type_sddu=1 79 INTEGER, PARAMETER :: type_sddv=2 80 INTEGER, PARAMETER :: type_unsddu=3 81 INTEGER, PARAMETER :: type_unsddv=4 82 83 INTEGER :: sdd1_type, sdd2_type 84 84 85 IF (first) THEN 85 sddu_loc(1:iim)=sddu(1:iim) 86 sddv_loc(1:iim)=sddv(1:iim) 87 unsddu_loc(1:iim)=unsddu(1:iim) 88 unsddv_loc(1:iim)=unsddv(1:iim) 89 CALL Init_timer 90 first=.FALSE. 91 c PRINT *,"----> sddu_loc=",sddu_loc 92 c PRINT *,"----> sddv_loc=",sddv_loc 93 c PRINT *,"----> unsddu_loc=",unsddu_loc 94 c PRINT *,"----> unsddv_loc=",unsddv_loc 86 sdd12(1:iim,type_sddu) = sddu(1:iim) 87 sdd12(1:iim,type_sddv) = sddv(1:iim) 88 sdd12(1:iim,type_unsddu) = unsddu(1:iim) 89 sdd12(1:iim,type_unsddv) = unsddv(1:iim) 90 91 CALL Init_timer 92 first=.FALSE. 95 93 ENDIF 96 94 … … 99 97 c$OMP END MASTER 100 98 99 c-------------------------------------------------------c 100 101 101 IF(ifiltre.EQ.1.or.ifiltre.EQ.-1) 102 *STOP'Pas de transformee simple dans cette version'103 102 & STOP'Pas de transformee simple dans cette version' 103 104 104 IF( iter.EQ. 2 ) THEN 105 PRINT *,' Pas d iteration du filtre dans cette version !'106 *, ' Utiliser old_filtreg et repasser !'107 105 PRINT *,' Pas d iteration du filtre dans cette version !' 106 & , ' Utiliser old_filtreg et repasser !' 107 STOP 108 108 ENDIF 109 109 110 110 IF( ifiltre.EQ. -2 .AND..NOT.griscal ) THEN 111 PRINT *,' Cette routine ne calcule le filtre inverse que ',112 *' sur la grille des scalaires !'113 111 PRINT *,' Cette routine ne calcule le filtre inverse que ' 112 & , ' sur la grille des scalaires !' 113 STOP 114 114 ENDIF 115 115 116 116 IF( ifiltre.NE.2 .AND.ifiltre.NE. - 2 ) THEN 117 PRINT *,' Probleme dans filtreg car ifiltre NE 2 et NE -2'118 *,' corriger et repasser !'119 117 PRINT *,' Probleme dans filtreg car ifiltre NE 2 et NE -2' 118 & , ' corriger et repasser !' 119 STOP 120 120 ENDIF 121 121 c … … 127 127 IF( griscal ) THEN 128 128 IF( nlat. NE. jjp1 ) THEN 129 130 129 PRINT 1111 130 STOP 131 131 ELSE 132 c 133 IF( iaire.EQ.1 ) THEN 134 cym CALL SCOPY( iim, sddv, 1, sdd1, 1 ) 135 cym CALL SCOPY( iim, unsddv, 1, sdd2, 1 ) 136 cym sdd1=>sddv_loc 137 cym sdd2=>unsddv_loc 138 sdd1(1:iim)=sddv_loc(1:iim) 139 sdd2(1:iim)=unsddv_loc(1:iim) 140 ELSE 141 cym CALL SCOPY( iim, unsddv, 1, sdd1, 1 ) 142 cym CALL SCOPY( iim, sddv, 1, sdd2, 1 ) 143 sdd1(1:iim)=unsddv_loc(1:iim) 144 sdd2(1:iim)=sddv_loc(1:iim) 145 END IF 146 c 147 jdfil1 = 2 148 jffil1 = jfiltnu 149 jdfil2 = jfiltsu 150 jffil2 = jjm 151 END IF 132 c 133 IF( iaire.EQ.1 ) THEN 134 sdd1_type = type_sddv 135 sdd2_type = type_unsddv 136 ELSE 137 sdd1_type = type_unsddv 138 sdd2_type = type_sddv 139 ENDIF 140 c 141 jdfil1 = 2 142 jffil1 = jfiltnu 143 jdfil2 = jfiltsu 144 jffil2 = jjm 145 ENDIF 152 146 ELSE 153 IF( nlat.NE.jjm ) THEN 154 PRINT 2222 155 STOP 156 ELSE 157 c 158 IF( iaire.EQ.1 ) THEN 159 cym CALL SCOPY( iim, sddu, 1, sdd1, 1 ) 160 cym CALL SCOPY( iim, unsddu, 1, sdd2, 1 ) 161 cym sdd1=>sddu_loc 162 cym sdd2=>unsddu_loc 163 sdd1(1:iim)=sddu_loc(1:iim) 164 sdd2(1:iim)=unsddu_loc(1:iim) 165 166 ELSE 167 cym CALL SCOPY( iim, unsddu, 1, sdd1, 1 ) 168 cym CALL SCOPY( iim, sddu, 1, sdd2, 1 ) 169 cym sdd1=>unsddu_loc 170 cym sdd2=>sddu_loc 171 sdd1(1:iim)=unsddu_loc(1:iim) 172 sdd2(1:iim)=sddu_loc(1:iim) 173 END IF 174 c 175 jdfil1 = 1 176 jffil1 = jfiltnv 177 jdfil2 = jfiltsv 178 jffil2 = jjm 179 END IF 180 END IF 181 182 c PRINT *,"APPEL a filtreg --> sdd1=",sdd1 183 c PRINT *,"APPEL a filtreg --> sdd2=",sdd2 184 c PRINT *,"----> sddu_loc=",sddu_loc 185 c PRINT *,"----> sddv_loc=",sddv_loc 186 c PRINT *,"----> unsddu_loc=",unsddu_loc 187 c PRINT *,"----> unsddv_loc=",unsddv_loc 188 189 c 190 c 191 DO 100 hemisph = 1, 2 192 c 193 IF ( hemisph.EQ.1 ) THEN 194 c ym 195 jdfil = max(jdfil1,ibeg) 196 jffil = min(jffil1,iend) 197 ELSE 198 c ym 199 jdfil = max(jdfil2,ibeg) 200 jffil = min(jffil2,iend) 201 END IF 147 IF( nlat.NE.jjm ) THEN 148 PRINT 2222 149 STOP 150 ELSE 151 c 152 IF( iaire.EQ.1 ) THEN 153 sdd1_type = type_sddu 154 sdd2_type = type_unsddu 155 ELSE 156 sdd1_type = type_unsddu 157 sdd2_type = type_sddu 158 ENDIF 159 c 160 jdfil1 = 1 161 jffil1 = jfiltnv 162 jdfil2 = jfiltsv 163 jffil2 = jjm 164 ENDIF 165 ENDIF 166 c 167 DO hemisph = 1, 2 168 c 169 IF ( hemisph.EQ.1 ) THEN 170 cym 171 jdfil = max(jdfil1,ibeg) 172 jffil = min(jffil1,iend) 173 ELSE 174 cym 175 jdfil = max(jdfil2,ibeg) 176 jffil = min(jffil2,iend) 177 ENDIF 202 178 203 179 … … 206 182 cccccccccccccccccccccccccccccccccccccccccccc 207 183 208 IF (.NOT. use_filtre_fft) THEN 209 210 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 211 DO 50 l = 1, nbniv 212 DO 30 j = jdfil,jffil 213 214 215 DO 5 i = 1, iim 216 champ(i,j,l) = champ(i,j,l) * sdd1(i) 217 5 CONTINUE 218 c 219 220 IF( hemisph. EQ. 1 ) THEN 221 222 IF( ifiltre. EQ. -2 ) THEN 223 224 225 CALL SGEMV("N", iim,iim, 1.0, matrinvn(1,1,j),iim, 226 . champ(1,j,l), 1, 0.0, eignq, 1) 227 228 229 ELSE IF ( griscal ) THEN 230 231 CALL SGEMV("N", iim,iim, 1.0, matriceun(1,1,j),iim, 232 . champ(1,j,l), 1, 0.0, eignq, 1) 233 234 ELSE 235 236 CALL SGEMV("N", iim,iim, 1.0, matricevn(1,1,j),iim, 237 . champ(1,j,l), 1, 0.0, eignq, 1) 238 ENDIF 239 240 ELSE 241 242 IF( ifiltre. EQ. -2 ) THEN 243 244 CALL SGEMV("N",iim,iim,1.0, matrinvs(1,1,j-jfiltsu+1),iim, 245 . champ(1,j,l), 1, 0.0, eignq, 1) 246 247 ELSE IF ( griscal ) THEN 248 249 CALL SGEMV("N",iim,iim,1.0,matriceus(1,1,j-jfiltsu+1),iim, 250 . champ(1,j,l), 1, 0.0, eignq, 1) 251 ELSE 252 253 CALL SGEMV("N",iim,iim,1.0,matricevs(1,1,j-jfiltsv+1),iim, 254 . champ(1,j,l), 1, 0.0, eignq, 1) 255 ENDIF 256 257 ENDIF 258 259 260 c 261 IF( ifiltre.EQ. 2 ) THEN 262 263 DO 15 i = 1, iim 264 champ( i,j,l ) = ( champ(i,j,l) + eignq(i) ) * sdd2(i) 265 15 CONTINUE 266 267 ELSE 268 269 DO 16 i=1,iim 270 champ( i,j,l ) = ( champ(i,j,l) - eignq(i) ) * sdd2(i) 271 16 CONTINUE 272 273 ENDIF 274 c 275 champ( iip1,j,l ) = champ( 1,j,l ) 276 c 277 30 CONTINUE 278 c 279 50 CONTINUE 184 IF (.NOT. use_filtre_fft) THEN 185 186 c !---------------------------------! 187 c ! Agregation des niveau verticaux ! 188 c ! uniquement necessaire pour une ! 189 c ! execution OpenMP ! 190 c !---------------------------------! 191 ll_nb = 0 192 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 193 DO l = 1, nbniv 194 ll_nb = ll_nb+1 195 DO j = jdfil,jffil 196 DO i = 1, iim 197 champ_loc(i,j,ll_nb) = 198 & champ(i,j,l) * sdd12(i,sdd1_type) 199 ENDDO 200 ENDDO 201 ENDDO 280 202 c$OMP END DO NOWAIT 281 203 204 nbniv_loc = ll_nb 205 206 IF( hemisph.EQ.1 ) THEN 207 208 IF( ifiltre.EQ.-2 ) THEN 209 DO j = jdfil,jffil 210 CALL DGEMM("N", "N", iim, nbniv_loc, iim, 1.0, 211 & matrinvn(1,1,j), iim, 212 & champ_loc(1,j,1), iip1*nlat, 0.0, 213 & champ_fft(1,j-jdfil+1,1), iip1*nlat) 214 ENDDO 215 216 ELSE IF ( griscal ) THEN 217 DO j = jdfil,jffil 218 CALL DGEMM("N", "N", iim, nbniv_loc, iim, 1.0, 219 & matriceun(1,1,j), iim, 220 & champ_loc(1,j,1), iip1*nlat, 0.0, 221 & champ_fft(1,j-jdfil+1,1), iip1*nlat) 222 ENDDO 223 224 ELSE 225 DO j = jdfil,jffil 226 CALL DGEMM("N", "N", iim, nbniv_loc, iim, 1.0, 227 & matricevn(1,1,j), iim, 228 & champ_loc(1,j,1), iip1*nlat, 0.0, 229 & champ_fft(1,j-jdfil+1,1), iip1*nlat) 230 ENDDO 231 232 ENDIF 233 234 ELSE 235 236 IF( ifiltre.EQ.-2 ) THEN 237 DO j = jdfil,jffil 238 CALL DGEMM("N", "N", iim, nbniv_loc, iim, 1.0, 239 & matrinvs(1,1,j-jfiltsu+1), iim, 240 & champ_loc(1,j,1), iip1*nlat, 0.0, 241 & champ_fft(1,j-jdfil+1,1), iip1*nlat) 242 ENDDO 243 244 ELSE IF ( griscal ) THEN 245 246 DO j = jdfil,jffil 247 CALL DGEMM("N", "N", iim, nbniv_loc, iim, 1.0, 248 & matriceus(1,1,j-jfiltsu+1), iim, 249 & champ_loc(1,j,1), iip1*nlat, 0.0, 250 & champ_fft(1,j-jdfil+1,1), iip1*nlat) 251 ENDDO 252 253 ELSE 254 255 DO j = jdfil,jffil 256 CALL DGEMM("N", "N", iim, nbniv_loc, iim, 1.0, 257 & matricevs(1,1,j-jfiltsv+1), iim, 258 & champ_loc(1,j,1), iip1*nlat, 0.0, 259 & champ_fft(1,j-jdfil+1,1), iip1*nlat) 260 ENDDO 261 262 ENDIF 263 264 ENDIF 265 ! c 266 IF( ifiltre.EQ.2 ) THEN 267 268 c !-------------------------------------! 269 c ! Dés-agregation des niveau verticaux ! 270 c ! uniquement necessaire pour une ! 271 c ! execution OpenMP ! 272 c !-------------------------------------! 273 ll_nb = 0 274 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 275 DO l = 1, nbniv 276 ll_nb = ll_nb + 1 277 DO j = jdfil,jffil 278 DO i = 1, iim 279 champ( i,j,l ) = (champ_loc(i,j,ll_nb) 280 & + champ_fft(i,j-jdfil+1,ll_nb)) 281 & * sdd12(i,sdd2_type) 282 ENDDO 283 ENDDO 284 ENDDO 285 c$OMP END DO NOWAIT 286 287 ELSE 288 289 ll_nb = 0 290 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 291 DO l = 1, nbniv_loc 292 ll_nb = ll_nb + 1 293 DO j = jdfil,jffil 294 DO i = 1, iim 295 champ( i,j,l ) = (champ_loc(i,j,ll_nb) 296 & - champ_fft(i,j-jdfil+1,ll_nb)) 297 & * sdd12(i,sdd2_type) 298 ENDDO 299 ENDDO 300 ENDDO 301 c$OMP END DO NOWAIT 302 303 ENDIF 304 305 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 306 DO l = 1, nbniv 307 DO j = jdfil,jffil 308 champ( iip1,j,l ) = champ( 1,j,l ) 309 ENDDO 310 ENDDO 311 c$OMP END DO NOWAIT 312 282 313 ccccccccccccccccccccccccccccccccccccccccccccc 283 314 c Utilisation du filtre FFT 284 315 ccccccccccccccccccccccccccccccccccccccccccccc 285 316 286 ELSE317 ELSE 287 318 288 319 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 289 DO l=1,nbniv 290 DO j=jdfil,jffil 291 DO i = 1, iim 292 champ( i,j,l)= champ(i,j,l)*sdd1(i) 293 champ_fft( i,j,l) = champ(i,j,l) 294 ENDDO 320 DO l=1,nbniv 321 DO j=jdfil,jffil 322 DO i = 1, iim 323 champ( i,j,l)= champ(i,j,l)*sdd12(i,sdd1_type) 324 champ_fft( i,j,l) = champ(i,j,l) 325 ENDDO 326 ENDDO 295 327 ENDDO 296 ENDDO297 328 c$OMP END DO NOWAIT 298 329 299 IF (jdfil<=jffil) THEN300 IF( ifiltre. EQ. -2 ) THEN301 CALL Filtre_inv_fft(champ_fft,nlat,jdfil,jffil,nbniv)302 ELSE IF ( griscal ) THEN303 304 305 306 307 ENDIF308 309 310 IF( ifiltre.EQ. 2 ) THEN330 IF (jdfil<=jffil) THEN 331 IF( ifiltre. EQ. -2 ) THEN 332 CALL Filtre_inv_fft(champ_fft,nlat,jdfil,jffil,nbniv) 333 ELSE IF ( griscal ) THEN 334 CALL Filtre_u_fft(champ_fft,nlat,jdfil,jffil,nbniv) 335 ELSE 336 CALL Filtre_v_fft(champ_fft,nlat,jdfil,jffil,nbniv) 337 ENDIF 338 ENDIF 339 340 341 IF( ifiltre.EQ. 2 ) THEN 311 342 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 312 313 314 315 champ( i,j,l)=(champ(i,j,l)+champ_fft(i,j,l))316 . *sdd2(i)317 ENDDO318 ENDDO319 343 DO l=1,nbniv 344 DO j=jdfil,jffil 345 DO i = 1, iim 346 champ( i,j,l)=(champ(i,j,l)+champ_fft(i,j,l)) 347 & *sdd12(i,sdd2_type) 348 ENDDO 349 ENDDO 350 ENDDO 320 351 c$OMP END DO NOWAIT 321 352 ELSE 322 353 323 354 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 324 DO l=1,nbniv 325 DO j=jdfil,jffil 326 DO i = 1, iim 327 champ(i,j,l)=(champ(i,j,l)-champ_fft(i,j,l)) 328 . *sdd2(i) 329 ENDDO 355 DO l=1,nbniv 356 DO j=jdfil,jffil 357 DO i = 1, iim 358 champ(i,j,l)=(champ(i,j,l)-champ_fft(i,j,l)) 359 & *sdd12(i,sdd2_type) 360 ENDDO 361 ENDDO 362 ENDDO 363 c$OMP END DO NOWAIT 364 ENDIF 365 c 366 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 367 DO l=1,nbniv 368 DO j=jdfil,jffil 369 ! champ_FFT( iip1,j,l ) = champ_FFT( 1,j,l ) 370 champ( iip1,j,l ) = champ( 1,j,l ) 371 ENDDO 330 372 ENDDO 331 ENDDO332 c$OMP END DO NOWAIT333 ENDIF334 c335 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)336 DO l=1,nbniv337 DO j=jdfil,jffil338 ! champ_FFT( iip1,j,l ) = champ_FFT( 1,j,l )339 champ( iip1,j,l ) = champ( 1,j,l )340 ENDDO341 ENDDO342 373 c$OMP END DO NOWAIT 343 ENDIF374 ENDIF 344 375 c Fin de la zone de filtrage 345 376 346 377 347 100 CONTINUE378 ENDDO 348 379 349 380 ! DO j=1,nlat … … 359 390 360 391 c 361 1111FORMAT(//20x,'ERREUR dans le dimensionnement du tableau CHAMP a362 *filtrer, sur la grille des scalaires'/)363 2222FORMAT(//20x,'ERREUR dans le dimensionnement du tableau CHAMP a fi364 *ltrer, sur la grille de V ou de Z'/)392 1111 FORMAT(//20x,'ERREUR dans le dimensionnement du tableau CHAMP a 393 & filtrer, sur la grille des scalaires'/) 394 2222 FORMAT(//20x,'ERREUR dans le dimensionnement du tableau CHAMP a fi 395 & ltrer, sur la grille de V ou de Z'/) 365 396 c$OMP MASTER 366 397 CALL stop_timer -
LMDZ4/trunk/libf/dyn3dpar/fluxstokenc_p.F
r1021 r1146 61 61 CALL initfluxsto_p( 'fluxstoke', 62 62 . time_step,istdyn* time_step,istdyn* time_step, 63 . nqmx,fluxid,fluxvid,fluxdid)63 . fluxid,fluxvid,fluxdid) 64 64 65 65 ijb=ij_begin -
LMDZ4/trunk/libf/dyn3dpar/gcm.F
r1084 r1146 9 9 USE IOIPSL 10 10 #endif 11 11 12 USE mod_const_mpi, ONLY: init_const_mpi 12 13 USE parallel 13 14 USE mod_phys_lmdz_para, ONLY : klon_mpi_para_nb 14 USE mod_grid_phy_lmdz 15 USE mod_phys_lmdz_omp_data, ONLY: klon_omp 16 USE dimphy 15 USE infotrac 17 16 USE mod_interface_dyn_phys 18 USE comgeomphy19 17 USE mod_hallo 20 18 USE Bands 19 20 USE filtreg_mod 21 22 ! Ehouarn: for now these only apply to Earth: 23 #ifdef CPP_EARTH 24 USE mod_grid_phy_lmdz 25 USE mod_phys_lmdz_omp_data, ONLY: klon_omp 26 USE dimphy 27 USE comgeomphy 28 #endif 21 29 IMPLICIT NONE 22 30 … … 65 73 #include "iniprint.h" 66 74 #include "tracstoke.h" 67 #include "advtrac.h"68 75 69 76 INTEGER longcles … … 81 88 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) ! vents covariants 82 89 REAL teta(ip1jmp1,llm) ! temperature potentielle 83 REAL q(ip1jmp1,llm,nqmx)! champs advectes90 REAL, ALLOCATABLE, DIMENSION(:,:,:) :: q ! champs advectes 84 91 REAL ps(ip1jmp1) ! pression au sol 85 92 c REAL p (ip1jmp1,llmp1 ) ! pression aux interfac.des couches … … 136 143 c variables pour l'initialisation de la physique : 137 144 c ------------------------------------------------ 138 INTEGER ngridmx ,nq145 INTEGER ngridmx 139 146 PARAMETER( ngridmx = 2+(jjm-1)*iim - 1/jjm ) 140 147 REAL zcufi(ngridmx),zcvfi(ngridmx) … … 158 165 159 166 160 c initialisation Anne161 hadv_flg(:) = 0.162 vadv_flg(:) = 0.163 conv_flg(:) = 0.164 pbl_flg(:) = 0.165 tracnam(:) = ' '166 nprath = 1167 nbtrac = 0168 mmt_adj(:,:,:,:) = 1169 170 171 c--------------------------------------------------------------------------172 c Iflag_phys controle l'appel a la physique :173 c -------------------------------------------174 c 0 : pas de physique175 c 1 : Normale (appel a phylmd, phymars ...)176 c 2 : rappel Newtonien pour la temperature + friction au sol177 iflag_phys=1178 179 c--------------------------------------------------------------------------180 c Lecture de l'etat initial :181 c ---------------------------182 c T : on lit start.nc183 c F : le modele s'autoinitialise avec un cas academique (iniacademic)184 #ifdef CPP_IOIPSL185 read_start=.true.186 #else187 read_start=.false.188 #endif189 190 167 c----------------------------------------------------------------------- 191 168 c Choix du calendrier … … 203 180 c --------------------------------------- 204 181 c 205 #ifdef CPP_IOIPSL 182 ! Ehouarn: dump possibility of using defrun 183 !#ifdef CPP_IOIPSL 206 184 CALL conf_gcm( 99, .TRUE. , clesphy0 ) 207 #else208 CALL defrun( 99, .TRUE. , clesphy0 )209 #endif185 !#else 186 ! CALL defrun( 99, .TRUE. , clesphy0 ) 187 !#endif 210 188 c 211 189 c … … 217 195 call init_parallel 218 196 call Read_Distrib 219 CALL Init_Phys_lmdz(iim,jjp1,llm,nqmx-2,mpi_size,distrib_phys) 197 ! Ehouarn : temporarily (?) keep this only for Earth 198 if (planet_type.eq."earth") then 199 #ifdef CPP_EARTH 200 CALL Init_Phys_lmdz(iim,jjp1,llm,mpi_size,distrib_phys) 201 #endif 202 endif ! of if (planet_type.eq."earth") 220 203 CALL set_bands 221 204 CALL Init_interface_dyn_phys … … 229 212 c$OMP END PARALLEL 230 213 214 ! Ehouarn : temporarily (?) keep this only for Earth 215 if (planet_type.eq."earth") then 216 #ifdef CPP_EARTH 231 217 c$OMP PARALLEL 232 218 call InitComgeomphy 233 219 c$OMP END PARALLEL 220 #endif 221 endif ! of if (planet_type.eq."earth") 234 222 235 223 IF (config_inca /= 'none') THEN 236 224 #ifdef INCA 237 225 call init_const_lmdz( 238 $ nbtr ac,anneeref,dayref,226 $ nbtr,anneeref,dayref, 239 227 $ iphysiq,day_step,nday) 240 228 … … 248 236 c Initialisation des traceurs 249 237 c --------------------------- 250 c Choix du schema pour l'advection 251 c dans fichier trac.def ou via INCA 252 253 call iniadvtrac(nq) 254 c 238 c Choix du nombre de traceurs et du schema pour l'advection 239 c dans fichier traceur.def, par default ou via INCA 240 call infotrac_init 241 242 c Allocation de la tableau q : champs advectes 243 ALLOCATE(q(ip1jmp1,llm,nqtot)) 244 255 245 c----------------------------------------------------------------------- 256 246 c Lecture de l'etat initial : … … 259 249 c lecture du fichier start.nc 260 250 if (read_start) then 261 #ifdef CPP_IOIPSL 262 CALL dynetat0("start.nc",nqmx,vcov,ucov, 251 ! we still need to run iniacademic to initialize some 252 ! constants & fields, if we run the 'newtonian' case: 253 if (iflag_phys.eq.2) then 254 CALL iniacademic(vcov,ucov,teta,q,masse,ps,phis,time_0) 255 endif 256 !#ifdef CPP_IOIPSL 257 if (planet_type.eq."earth") then 258 #ifdef CPP_EARTH 259 ! Load an Earth-format start file 260 CALL dynetat0("start.nc",vcov,ucov, 263 261 . teta,q,masse,ps,phis, time_0) 262 #endif 263 endif ! of if (planet_type.eq."earth") 264 264 c write(73,*) 'ucov',ucov 265 265 c write(74,*) 'vcov',vcov … … 268 268 c write(77,*) 'q',q 269 269 270 #endif 271 endif 270 endif ! of if (read_start) 272 271 273 272 c le cas echeant, creation d un etat initial 274 273 IF (prt_level > 9) WRITE(lunout,*) 275 . 'AVANT iniacademic AVANT AVANT AVANT AVANT'274 . 'GCM: AVANT iniacademic AVANT AVANT AVANT AVANT' 276 275 if (.not.read_start) then 277 CALL iniacademic( nqmx,vcov,ucov,teta,q,masse,ps,phis,time_0)276 CALL iniacademic(vcov,ucov,teta,q,masse,ps,phis,time_0) 278 277 endif 279 280 278 281 279 c----------------------------------------------------------------------- … … 359 357 c Initialisation de la physique : 360 358 c ------------------------------- 361 #ifdef CPP_PHYS362 359 IF (call_iniphys.and.iflag_phys.eq.1) THEN 363 360 latfi(1)=rlatu(1) … … 380 377 381 378 WRITE(lunout,*) 382 . 'WARNING!!! vitesse verticale nulle dans la physique' 383 379 . 'GCM: WARNING!!! vitesse verticale nulle dans la physique' 380 ! Earth: 381 if (planet_type.eq."earth") then 382 #ifdef CPP_EARTH 384 383 CALL iniphysiq(ngridmx,llm,daysec,day_ini,dtphys , 385 384 , latfi,lonfi,airefi,zcufi,zcvfi,rad,g,r,cpp ) 386 385 #endif 386 endif ! of if (planet_type.eq."earth") 387 387 call_iniphys=.false. 388 389 ENDIF 390 #endif 388 ENDIF ! of IF (call_iniphys.and.(iflag_phys.eq.1)) 391 389 392 390 … … 404 402 405 403 c----------------------------------------------------------------------- 404 c Initialisation des dimensions d'INCA : 405 c -------------------------------------- 406 IF (config_inca /= 'none') THEN 407 !$OMP PARALLEL 408 #ifdef INCA 409 CALL init_inca_dim(klon_omp,llm,iim,jjm, 410 $ rlonu,rlatu,rlonv,rlatv) 411 #endif 412 !$OMP END PARALLEL 413 END IF 414 415 c----------------------------------------------------------------------- 406 416 c Initialisation des I/O : 407 417 c ------------------------ … … 410 420 day_end = day_ini + nday 411 421 WRITE(lunout,300)day_ini,day_end 422 300 FORMAT('1'/,15x,'run du jour',i7,2x,'au jour',i7//) 423 424 !#ifdef CPP_IOIPSL 425 if (planet_type.eq."earth") then 426 #ifdef CPP_EARTH 427 CALL dynredem0_p("restart.nc", day_end, phis) 428 #endif 429 endif 430 431 ecripar = .TRUE. 412 432 413 433 #ifdef CPP_IOIPSL 414 CALL dynredem0_p("restart.nc", day_end, phis, nqmx)415 416 ecripar = .TRUE.417 418 434 if ( 1.eq.1) then 419 435 time_step = zdtvr … … 421 437 t_wrt = iecri * daysec 422 438 CALL inithist_p(dynhist_file,day_ref,annee_ref,time_step, 423 . t_ops, t_wrt, nqmx, histid, histvid) 424 425 t_ops = iperiod * time_step 426 t_wrt = periodav * daysec 427 CALL initdynav_p(dynhistave_file,day_ref,annee_ref,time_step, 428 . t_ops, t_wrt, nqmx, histaveid) 429 439 . t_ops, t_wrt, histid, histvid) 440 441 IF (ok_dynzon) THEN 442 t_ops = iperiod * time_step 443 t_wrt = periodav * daysec 444 CALL initdynav_p(dynhistave_file,day_ref,annee_ref,time_step, 445 . t_ops, t_wrt, histaveid) 446 END IF 430 447 dtav = iperiod*dtvr/daysec 431 448 endif … … 433 450 434 451 #endif 452 ! #endif of #ifdef CPP_IOIPSL 435 453 436 454 c Choix des frequences de stokage pour le offline … … 453 471 454 472 c$OMP PARALLEL DEFAULT(SHARED) COPYIN(/temps/,/logic/) 455 CALL leapfrog_p(ucov,vcov,teta,ps,masse,phis, nq,q,clesphy0,473 CALL leapfrog_p(ucov,vcov,teta,ps,masse,phis,q,clesphy0, 456 474 . time_0) 457 475 c$OMP END PARALLEL 458 476 459 477 460 300 FORMAT('1'/,15x,'run du pas',i7,2x,'au pas',i7,2x,461 . 'c''est a dire du jour',i7,3x,'au jour',i7//)462 478 END 463 479 -
LMDZ4/trunk/libf/dyn3dpar/groupeun_p.F
r764 r1146 1 subroutinegroupeun_p(jjmax,llmax,jjb,jje,q)1 SUBROUTINE groupeun_p(jjmax,llmax,jjb,jje,q) 2 2 USE parallel 3 implicit none3 IMPLICIT NONE 4 4 5 5 #include "dimensions.h" … … 8 8 #include "comgeom2.h" 9 9 10 integerjjmax,llmax,jjb,jje11 realq(iip1,jjmax,llmax)10 INTEGER jjmax,llmax,jjb,jje 11 REAL q(iip1,jjmax,llmax) 12 12 13 integerngroup14 parameter(ngroup=3)13 INTEGER ngroup 14 PARAMETER (ngroup=3) 15 15 16 real airen,airecn,qn17 real aires,airecs,qs16 REAL airecn,qn 17 REAL airecs,qs 18 18 19 integeri,j,l,ig,j1,j2,i0,jd19 INTEGER i,j,l,ig,j1,j2,i0,jd 20 20 21 Champs 3D 21 c--------------------------------------------------------------------c 22 c Strategie d'optimisation c 23 c stocker les valeurs systematiquement recalculees c 24 c et identiques d'un pas de temps sur l'autre. Il s'agit des c 25 c aires des cellules qui sont sommees. S'il n'y a pas de changement c 26 c de grille au cours de la simulation tout devrait bien se passer. c 27 c Autre optimisation : determination des bornes entre lesquelles "j" c 28 c varie, au lieu de faire un test à chaque fois... 29 c--------------------------------------------------------------------c 30 31 INTEGER j_start, j_finish 32 33 REAL, SAVE :: airen_tab(iip1,jjp1,0:1) 34 REAL, SAVE :: aires_tab(iip1,jjp1,0:1) 35 !$OMP THREADPRIVATE(airen_tab, aires_tab) 36 37 LOGICAL, SAVE :: first = .TRUE. 38 !$OMP THREADPRIVATE(first) 39 40 IF (first) THEN 41 CALL INIT_GROUPEUN_P(airen_tab, aires_tab) 42 first = .FALSE. 43 ENDIF 44 45 c Champs 3D 22 46 jd=jjp1-jjmax 23 47 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 24 do l=1,llm 25 j1=1+jd 26 j2=2 27 do ig=1,ngroup 28 do j=j1-jd,j2-jd 29 c print*,'groupe ',ig,' j= ',j,2**(ngroup-ig+1),'pts groupes' 30 if ( j >= jjb .AND. j <= jje) THEN 31 32 do i0=1,iim,2**(ngroup-ig+1) 33 34 airen=0. 35 airecn=0. 36 qn=0. 37 38 do i=i0,i0+2**(ngroup-ig+1)-1 39 airen=airen+aire(i,j) 40 qn=qn+q(i,j,l) 41 enddo 42 airecn=0. 43 do i=i0,i0+2**(ngroup-ig+1)-1 44 q(i,j,l)=qn*aire(i,j)/airen 45 enddo 46 enddo 47 q(iip1,j,l)=q(1,j,l) 48 49 endif 48 DO l=1,llm 49 j1=1+jd 50 j2=2 51 DO ig=1,ngroup 52 53 c Concerne le pole nord 54 j_start = MAX(jjb, j1-jd) 55 j_finish = MIN(jje, j2-jd) 56 DO j=j_start, j_finish 57 DO i0=1,iim,2**(ngroup-ig+1) 58 qn=0. 59 DO i=i0,i0+2**(ngroup-ig+1)-1 60 qn=qn+q(i,j,l) 61 ENDDO 62 DO i=i0,i0+2**(ngroup-ig+1)-1 63 q(i,j,l)=qn*airen_tab(i,j,jd) 64 ENDDO 65 ENDDO 66 q(iip1,j,l)=q(1,j,l) 67 ENDDO 68 69 !c Concerne le pole sud 70 j_start = MAX(1+jjp1-jje-jd, j1-jd) 71 j_finish = MIN(1+jjp1-jjb-jd, j2-jd) 72 DO j=j_start, j_finish 73 DO i0=1,iim,2**(ngroup-ig+1) 74 qs=0. 75 DO i=i0,i0+2**(ngroup-ig+1)-1 76 qs=qs+q(i,jjp1-j+1-jd,l) 77 ENDDO 78 DO i=i0,i0+2**(ngroup-ig+1)-1 79 q(i,jjp1-j+1-jd,l)=qs*aires_tab(i,jjp1-j+1,jd) 80 ENDDO 81 ENDDO 82 q(iip1,jjp1-j+1-jd,l)=q(1,jjp1-j+1-jd,l) 83 ENDDO 84 85 j1=j2+1 86 j2=j2+2**ig 87 ENDDO 88 ENDDO 89 !$OMP END DO NOWAIT 90 91 RETURN 92 END 93 94 95 96 SUBROUTINE INIT_GROUPEUN_P(airen_tab, aires_tab) 97 98 USE parallel 99 IMPLICIT NONE 100 101 #include "dimensions.h" 102 #include "paramet.h" 103 #include "comconst.h" 104 #include "comgeom2.h" 105 106 INTEGER ngroup 107 PARAMETER (ngroup=3) 108 109 REAL airen,airecn 110 REAL aires,airecs 111 112 INTEGER i,j,l,ig,j1,j2,i0,jd 113 114 INTEGER j_start, j_finish 115 116 REAL :: airen_tab(iip1,jjp1,0:1) 117 REAL :: aires_tab(iip1,jjp1,0:1) 118 119 DO jd=0, 1 120 j1=1+jd 121 j2=2 122 DO ig=1,ngroup 50 123 51 if ( jjp1-j+1-jd >= jjb .AND. jjp1-j+1-jd <= jje) THEN 52 53 do i0=1,iim,2**(ngroup-ig+1) 54 aires=0. 55 airecs=0. 56 qs=0. 57 do i=i0,i0+2**(ngroup-ig+1)-1 58 aires=aires+aire(i,jjp1-j+1) 59 qs=qs+q(i,jjp1-j+1-jd,l) 60 enddo 61 airecs=0. 62 do i=i0,i0+2**(ngroup-ig+1)-1 63 q(i,jjp1-j+1-jd,l)=qs*aire(i,jjp1-j+1)/aires 64 enddo 65 enddo 66 q(iip1,jjp1-j+1-jd,l)=q(1,jjp1-j+1-jd,l) 67 68 endif 69 enddo 70 71 j1=j2+1 72 j2=j2+2**ig 73 enddo 74 enddo 75 c$OMP END DO NOWAIT 76 return 77 end 124 ! c Concerne le pole nord 125 j_start = j1-jd 126 j_finish = j2-jd 127 DO j=j_start, j_finish 128 DO i0=1,iim,2**(ngroup-ig+1) 129 airen=0. 130 DO i=i0,i0+2**(ngroup-ig+1)-1 131 airen = airen+aire(i,j) 132 ENDDO 133 DO i=i0,i0+2**(ngroup-ig+1)-1 134 airen_tab(i,j,jd) = 135 & aire(i,j) / airen 136 ENDDO 137 ENDDO 138 ENDDO 139 140 ! c Concerne le pole sud 141 j_start = j1-jd 142 j_finish = j2-jd 143 DO j=j_start, j_finish 144 DO i0=1,iim,2**(ngroup-ig+1) 145 aires=0. 146 DO i=i0,i0+2**(ngroup-ig+1)-1 147 aires=aires+aire(i,jjp1-j+1) 148 ENDDO 149 DO i=i0,i0+2**(ngroup-ig+1)-1 150 aires_tab(i,jjp1-j+1,jd) = 151 & aire(i,jjp1-j+1) / aires 152 ENDDO 153 ENDDO 154 ENDDO 155 156 j1=j2+1 157 j2=j2+2**ig 158 ENDDO 159 ENDDO 160 161 RETURN 162 END -
LMDZ4/trunk/libf/dyn3dpar/guide_p.F
r1049 r1146 4 4 subroutine guide_pp(itau,ucov,vcov,teta,q,masse,ps) 5 5 USE parallel 6 use netcdf 6 7 7 8 IMPLICIT NONE … … 229 230 IF (mpi_rank==0) THEN 230 231 if (guide_modele) then 231 if (ncidpl.eq.-99) ncidpl=NCOPN('apbp.nc',NCNOWRIT,rcod) 232 else 233 if (guide_u) then 234 if (ncidpl.eq.-99) ncidpl=NCOPN('u.nc',NCNOWRIT,rcod) 235 endif 236 c 237 if (guide_v) then 238 if (ncidpl.eq.-99) ncidpl=NCOPN('v.nc',NCNOWRIT,rcod) 239 endif 240 c 241 if (guide_T) then 242 if (ncidpl.eq.-99) ncidpl=NCOPN('T.nc',NCNOWRIT,rcod) 243 endif 244 c 245 if (guide_Q) then 246 if (ncidpl.eq.-99) ncidpl=NCOPN('hur.nc',NCNOWRIT,rcod) 247 endif 232 if (ncidpl.eq.-99) rcod=nf90_open('apbp.nc',Nf90_NOWRITe, 233 $ ncidpl) 234 else 235 if (guide_u) then 236 if (ncidpl.eq.-99) rcod=nf90_open('u.nc',Nf90_NOWRITe, 237 $ ncidpl) 238 endif 239 c 240 if (guide_v) then 241 if (ncidpl.eq.-99) rcod=nf90_open('v.nc',nf90_nowrite, 242 $ ncidpl) 243 endif 244 c 245 if (guide_T) then 246 if (ncidpl.eq.-99) rcod=nf90_open('T.nc',nf90_nowrite, 247 $ ncidpl) 248 endif 249 c 250 if (guide_Q) then 251 if (ncidpl.eq.-99) rcod=nf90_open('hur.nc',nf90_nowrite, 252 $ ncidpl) 253 endif 248 254 c 249 255 endif !guide_modele … … 256 262 status=NF_INQ_DIMLEN(ncidpl,rid,nlev) 257 263 print *,'nlev guide', nlev 258 call ncclos(ncidpl,rcod)264 rcod = nf90_close(ncidpl) 259 265 c Lecture du premier etat des reanalyses. 260 266 call Gather_Field(ps,ip1jmp1,1,0) -
LMDZ4/trunk/libf/dyn3dpar/iniacademic.F
r774 r1146 4 4 c 5 5 c 6 SUBROUTINE iniacademic(nq,vcov,ucov,teta,q,masse,ps,phis,time_0) 6 SUBROUTINE iniacademic(vcov,ucov,teta,q,masse,ps,phis,time_0) 7 8 USE filtreg_mod 9 USE infotrac, ONLY : nqtot 7 10 8 11 c%W% %G% … … 42 45 #include "temps.h" 43 46 #include "control.h" 47 #include "iniprint.h" 44 48 45 49 c Arguments: 46 50 c ---------- 47 51 48 integer nq49 52 real time_0 50 53 … … 52 55 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) ! vents covariants 53 56 REAL teta(ip1jmp1,llm) ! temperature potentielle 54 REAL q(ip1jmp1,llm,nq )! champs advectes57 REAL q(ip1jmp1,llm,nqtot) ! champs advectes 55 58 REAL ps(ip1jmp1) ! pression au sol 56 59 REAL masse(ip1jmp1,llm) ! masse d'air 60 REAL phis(ip1jmp1) ! geopotentiel au sol 61 62 c Local: 63 c ------ 64 57 65 REAL p (ip1jmp1,llmp1 ) ! pression aux interfac.des couches 58 66 REAL pks(ip1jmp1) ! exner au sol 59 67 REAL pk(ip1jmp1,llm) ! exner au milieu des couches 60 68 REAL pkf(ip1jmp1,llm) ! exner filt.au milieu des couches 61 REAL phis(ip1jmp1) ! geopotentiel au sol62 69 REAL phi(ip1jmp1,llm) ! geopotentiel 63 64 65 66 67 68 c Local:69 c ------70 71 70 REAL ddsin,tetarappelj,tetarappell,zsig 72 71 real tetajl(jjp1,llm) … … 79 78 80 79 c----------------------------------------------------------------------- 80 ! 1. Initializations for Earth-like case 81 ! -------------------------------------- 82 if (planet_type=="earth") then 83 c 84 time_0=0. 81 85 82 c 83 time_0=0. 86 im = iim 87 jm = jjm 88 day_ini = 0 89 omeg = 4.*asin(1.)/86400. 90 rad = 6371229. 91 g = 9.8 92 daysec = 86400. 93 dtvr = daysec/FLOAT(day_step) 94 zdtvr=dtvr 95 kappa = 0.2857143 96 cpp = 1004.70885 97 preff = 101325. 98 pa = 50000. 99 etot0 = 0. 100 ptot0 = 0. 101 ztot0 = 0. 102 stot0 = 0. 103 ang0 = 0. 84 104 85 im = iim 86 jm = jjm 87 day_ini = 0 88 omeg = 4.*asin(1.)/86400. 89 rad = 6371229. 90 g = 9.8 91 daysec = 86400. 92 dtvr = daysec/FLOAT(day_step) 93 zdtvr=dtvr 94 kappa = 0.2857143 95 cpp = 1004.70885 96 preff = 101325. 97 pa = 50 000. 98 etot0 = 0. 99 ptot0 = 0. 100 ztot0 = 0. 101 stot0 = 0. 102 ang0 = 0. 103 pa = 0. 105 CALL iniconst 106 CALL inigeom 107 CALL inifilr 104 108 105 CALL inicons0 106 CALL inigeom 107 CALL inifilr 108 109 ps=0. 110 phis=0. 109 ps=0. 110 phis=0. 111 111 c--------------------------------------------------------------------- 112 112 113 taurappel=10.*daysec113 taurappel=10.*daysec 114 114 115 115 c--------------------------------------------------------------------- … … 117 117 c -------------------------------------- 118 118 119 DO l=1,llm120 zsig=ap(l)/preff+bp(l)121 if (zsig.gt.0.3) then122 lsup=l123 tetarappell=1./8.*(-log(zsig)-.5)124 DO j=1,jjp1125 ddsin=sin(rlatu(j))-sin(pi/20.)126 tetajl(j,l)=300.*(1+1./18.*(1.-3.*ddsin*ddsin)+tetarappell)127 ENDDO128 else119 DO l=1,llm 120 zsig=ap(l)/preff+bp(l) 121 if (zsig.gt.0.3) then 122 lsup=l 123 tetarappell=1./8.*(-log(zsig)-.5) 124 DO j=1,jjp1 125 ddsin=sin(rlatu(j))-sin(pi/20.) 126 tetajl(j,l)=300.*(1+1./18.*(1.-3.*ddsin*ddsin)+tetarappell) 127 ENDDO 128 else 129 129 c Choix isotherme au-dessus de 300 mbar 130 do j=1,jjp1131 tetajl(j,l)=tetajl(j,lsup)*(0.3/zsig)**kappa132 enddo133 endif134 ENDDO130 do j=1,jjp1 131 tetajl(j,l)=tetajl(j,lsup)*(0.3/zsig)**kappa 132 enddo 133 endif ! of if (zsig.gt.0.3) 134 ENDDO ! of DO l=1,llm 135 135 136 do l=1,llm137 do j=1,jjp1138 do i=1,iip1139 ij=(j-1)*iip1+i140 tetarappel(ij,l)=tetajl(j,l)141 enddo142 enddo143 enddo136 do l=1,llm 137 do j=1,jjp1 138 do i=1,iip1 139 ij=(j-1)*iip1+i 140 tetarappel(ij,l)=tetajl(j,l) 141 enddo 142 enddo 143 enddo 144 144 145 c call dump2d(jjp1,llm,tetajl,'TEQ ')145 c call dump2d(jjp1,llm,tetajl,'TEQ ') 146 146 147 ps=1.e5148 phis=0.149 CALL pression ( ip1jmp1, ap, bp, ps, p )150 CALL exner_hyb( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf )151 CALL massdair(p,masse)147 ps=1.e5 148 phis=0. 149 CALL pression ( ip1jmp1, ap, bp, ps, p ) 150 CALL exner_hyb( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf ) 151 CALL massdair(p,masse) 152 152 153 153 c intialisation du vent et de la temperature 154 teta(:,:)=tetarappel(:,:)155 CALL geopot(ip1jmp1,teta,pk,pks,phis,phi)156 call ugeostr(phi,ucov)157 vcov=0.158 q(:,:,1 )=1.e-10159 q(:,:,2 )=1.e-15160 q(:,:,3:nq)=0.154 teta(:,:)=tetarappel(:,:) 155 CALL geopot(ip1jmp1,teta,pk,pks,phis,phi) 156 call ugeostr(phi,ucov) 157 vcov=0. 158 q(:,:,1 )=1.e-10 159 q(:,:,2 )=1.e-15 160 q(:,:,3:nqtot)=0. 161 161 162 162 163 c perturbation al \351atoire sur la temp\351rature164 idum = -1165 zz = ran1(idum)166 idum = 0167 do l=1,llm168 do ij=iip2,ip1jm169 teta(ij,l)=teta(ij,l)*(1.+0.005*ran1(idum))170 enddo171 enddo163 c perturbation aleatoire sur la temperature 164 idum = -1 165 zz = ran1(idum) 166 idum = 0 167 do l=1,llm 168 do ij=iip2,ip1jm 169 teta(ij,l)=teta(ij,l)*(1.+0.005*ran1(idum)) 170 enddo 171 enddo 172 172 173 do l=1,llm174 do ij=1,ip1jmp1,iip1175 teta(ij+iim,l)=teta(ij,l)176 enddo177 enddo173 do l=1,llm 174 do ij=1,ip1jmp1,iip1 175 teta(ij+iim,l)=teta(ij,l) 176 enddo 177 enddo 178 178 179 179 … … 185 185 186 186 c initialisation d'un traceur sur une colonne 187 j=jjp1*3/4 188 i=iip1/2 189 ij=(j-1)*iip1+i 190 q(ij,:,3)=1. 191 187 j=jjp1*3/4 188 i=iip1/2 189 ij=(j-1)*iip1+i 190 q(ij,:,3)=1. 191 192 else 193 write(lunout,*)"iniacademic: planet types other than earth", 194 & " not implemented (yet)." 195 stop 196 endif ! of if (planet_type=="earth") 192 197 return 193 198 END -
LMDZ4/trunk/libf/dyn3dpar/initdynav_p.F
r1000 r1146 4 4 c 5 5 c 6 subroutine initdynav_p(infile,day0,anne0,tstep,t_ops,t_wrt 7 . ,nq,fileid) 6 subroutine initdynav_p(infile,day0,anne0,tstep,t_ops,t_wrt,fileid) 8 7 9 8 USE IOIPSL … … 11 10 use Write_field 12 11 use misc_mod 12 USE infotrac 13 13 14 implicit none 14 15 … … 30 31 C t_ops: frequence de l'operation pour IOIPSL 31 32 C t_wrt: frequence d'ecriture sur le fichier 32 C nq: nombre de traceurs33 33 C 34 34 C Sortie: … … 50 50 #include "description.h" 51 51 #include "serre.h" 52 #include "advtrac.h"53 52 54 53 C Arguments … … 58 57 real tstep, t_ops, t_wrt 59 58 integer fileid 60 integer nq61 59 integer thoriid, zvertiid 62 60 … … 82 80 83 81 INTEGER :: dynave_domain_id 84 85 82 86 83 if (adjust) return … … 169 166 C Traceurs 170 167 C 171 DO iq=1,nq 168 DO iq=1,nqtot 172 169 call histdef(fileid, ttext(iq), ttext(iq), '-', 173 170 . iip1, jjn, thoriid, llm, 1, llm, zvertiid, -
LMDZ4/trunk/libf/dyn3dpar/initfluxsto_p.F
r1000 r1146 3 3 ! 4 4 subroutine initfluxsto_p 5 . (infile,tstep,t_ops,t_wrt, nq,5 . (infile,tstep,t_ops,t_wrt, 6 6 . fileid,filevid,filedid) 7 7 … … 30 30 C t_ops: frequence de l'operation pour IOIPSL 31 31 C t_wrt: frequence d'ecriture sur le fichier 32 C nq: nombre de traceurs33 32 C 34 33 C Sortie: … … 58 57 real tstep, t_ops, t_wrt 59 58 integer fileid, filevid,filedid 60 integer n q,ndex(1)59 integer ndex(1) 61 60 real nivd(1) 62 61 … … 87 86 INTEGER :: dynu_domain_id 88 87 INTEGER :: dynv_domain_id 89 90 88 91 89 C -
LMDZ4/trunk/libf/dyn3dpar/inithist_p.F
r1000 r1146 2 2 ! $Header$ 3 3 ! 4 subroutine inithist_p(infile,day0,anne0,tstep,t_ops,t_wrt, nq,4 subroutine inithist_p(infile,day0,anne0,tstep,t_ops,t_wrt, 5 5 . fileid,filevid) 6 6 … … 9 9 use Write_field 10 10 use misc_mod 11 USE infotrac 11 12 12 13 implicit none … … 29 30 C t_ops: frequence de l'operation pour IOIPSL 30 31 C t_wrt: frequence d'ecriture sur le fichier 31 C nq: nombre de traceurs32 32 C 33 33 C Sortie: … … 50 50 #include "description.h" 51 51 #include "serre.h" 52 #include "advtrac.h"53 52 54 53 C Arguments … … 58 57 real tstep, t_ops, t_wrt 59 58 integer fileid, filevid 60 integer nq61 59 62 60 C Variables locales … … 83 81 INTEGER :: dynu_domain_id 84 82 INTEGER :: dynv_domain_id 83 85 84 C 86 85 C Initialisations … … 217 216 C Traceurs 218 217 C 219 DO iq=1,nq 218 DO iq=1,nqtot 220 219 call histdef(fileid, ttext(iq), ttext(iq), '-', 221 220 . iip1, jjn, thoriid, llm, 1, llm, zvertiid, -
LMDZ4/trunk/libf/dyn3dpar/integrd_p.F
r985 r1146 32 32 #include "temps.h" 33 33 #include "serre.h" 34 #include "advtrac.h"35 34 36 35 c Arguments: -
LMDZ4/trunk/libf/dyn3dpar/leapfrog_p.F
r1000 r1146 4 4 c 5 5 c 6 #define IO_DEBUG 7 8 #undef CPP_IOIPSL 9 #define CPP_IOIPSL 10 11 SUBROUTINE leapfrog_p(ucov,vcov,teta,ps,masse,phis,nq,q,clesphy0, 6 7 SUBROUTINE leapfrog_p(ucov,vcov,teta,ps,masse,phis,q,clesphy0, 12 8 & time_0) 13 9 … … 21 17 USE vampir 22 18 USE timer_filtre, ONLY : print_filtre_timer 19 USE infotrac 23 20 24 21 IMPLICIT NONE … … 69 66 #include "com_io_dyn.h" 70 67 #include "iniprint.h" 71 72 c#include "tracstoke.h"73 74 68 #include "academic.h" 75 !#include "clesphys.h"76 #include "advtrac.h"77 69 78 integer nq79 80 70 INTEGER longcles 81 71 PARAMETER ( longcles = 20 ) … … 88 78 REAL :: vcov(ip1jm,llm),ucov(ip1jmp1,llm) ! vents covariants 89 79 REAL :: teta(ip1jmp1,llm) ! temperature potentielle 90 REAL :: q(ip1jmp1,llm,nq mx)! champs advectes80 REAL :: q(ip1jmp1,llm,nqtot) ! champs advectes 91 81 REAL :: ps(ip1jmp1) ! pression au sol 92 82 REAL,SAVE :: p (ip1jmp1,llmp1 ) ! pression aux interfac.des couches … … 109 99 c tendances dynamiques 110 100 REAL,SAVE :: dv(ip1jm,llm),du(ip1jmp1,llm) 111 REAL,SAVE :: dteta(ip1jmp1,llm),dq(ip1jmp1,llm,nqmx),dp(ip1jmp1) 101 REAL,SAVE :: dteta(ip1jmp1,llm),dp(ip1jmp1) 102 REAL,DIMENSION(:,:,:), ALLOCATABLE, SAVE :: dq 112 103 113 104 c tendances de la dissipation … … 118 109 REAL,SAVE :: dvfi(ip1jm,llm),dufi(ip1jmp1,llm) 119 110 REAL,SAVE :: dtetafi(ip1jmp1,llm) 120 REAL,SAVE :: dqfi(ip1jmp1,llm,nqmx),dpfi(ip1jmp1) 111 REAL,SAVE :: dpfi(ip1jmp1) 112 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: dqfi 121 113 122 114 c variables pour le fichier histoire … … 186 178 type(Request) :: Request_physic 187 179 REAL,SAVE :: dvfi_tmp(iip1,llm),dufi_tmp(iip1,llm) 188 REAL,SAVE :: dtetafi_tmp(iip1,llm),dqfi_tmp(iip1,llm,nqmx) 180 REAL,SAVE :: dtetafi_tmp(iip1,llm) 181 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: dqfi_tmp 189 182 REAL,SAVE :: dpfi_tmp(iip1) 190 183 … … 195 188 INTEGER :: var_time 196 189 LOGICAL :: ok_start_timer=.FALSE. 190 LOGICAL, SAVE :: firstcall=.TRUE. 197 191 198 192 c$OMP MASTER … … 208 202 itaufin = nday*day_step 209 203 itaufinp1 = itaufin +1 210 204 modname="leapfrog_p" 211 205 212 206 itau = 0 … … 217 211 iday = iday+1 218 212 ENDIF 213 214 c Allocate variables depending on dynamic variable nqtot 215 c$OMP MASTER 216 IF (firstcall) THEN 217 firstcall=.FALSE. 218 ALLOCATE(dq(ip1jmp1,llm,nqtot)) 219 ALLOCATE(dqfi(ip1jmp1,llm,nqtot)) 220 ALLOCATE(dqfi_tmp(iip1,llm,nqtot)) 221 END IF 222 c$OMP END MASTER 223 c$OMP BARRIER 219 224 220 225 c----------------------------------------------------------------------- … … 276 281 c$OMP BARRIER 277 282 else 278 283 ! Save fields obtained at previous time step as '...m1' 279 284 ijb=ij_begin 280 285 ije=ij_end … … 303 308 . llm, -2,2, .TRUE., 1 ) 304 309 305 endif 310 endif ! of if (FirstCaldyn) 306 311 307 312 forward = .TRUE. … … 347 352 IF( MOD(itau,idissip ).EQ.0.AND..NOT.forward ) apdiss = .TRUE. 348 353 IF( MOD(itau,iphysiq ).EQ.0.AND..NOT.forward 349 s .and. iflag_phys. NE.0) apphys = .TRUE.354 s .and. iflag_phys.EQ.1 ) apphys = .TRUE. 350 355 ELSE 351 356 IF( MOD(itau ,iconser) .EQ. 0 ) conser = .TRUE. 352 357 IF( MOD(itau+1,idissip) .EQ. 0 ) apdiss = .TRUE. 353 IF( MOD(itau+1,iphysiq).EQ.0.AND.iflag_phys. NE.0) apphys=.TRUE.358 IF( MOD(itau+1,iphysiq).EQ.0.AND.iflag_phys.EQ.1) apphys=.TRUE. 354 359 END IF 355 360 … … 455 460 & jj_Nb_caldyn,0,0,TestRequest) 456 461 457 do j=1,nq mx462 do j=1,nqtot 458 463 call Register_SwapFieldHallo(q(1,1,j),q(1,1,j),ip1jmp1,llm, 459 464 & jj_nb_caldyn,0,0,TestRequest) … … 490 495 call Register_Hallo(p,ip1jmp1,llmp1,1,1,1,1,TestRequest) 491 496 492 c do j=1,nq mx497 c do j=1,nqtot 493 498 c call Register_Hallo(q(1,1,j),ip1jmp1,llm,1,1,1,1, 494 499 c * TestRequest) … … 516 521 call WriteField_p('pkf',reshape(pkf,(/iip1,jmp1,llm/))) 517 522 call WriteField_p('phis',reshape(phis,(/iip1,jmp1/))) 518 do j=1,nq mx523 do j=1,nqtot 519 524 call WriteField_p('q'//trim(int2str(j)), 520 525 . reshape(q(:,:,j),(/iip1,jmp1,llm/))) … … 528 533 529 534 c$OMP MASTER 530 print*,"Iteration No",True_itau 535 IF (prt_level>9) THEN 536 WRITE(lunout,*)"leapfrog_p: Iteration No",True_itau 537 ENDIF 531 538 532 539 … … 585 592 586 593 587 ENDIF 588 c 589 ENDIF 594 ENDIF ! of IF (offline) 595 c 596 ENDIF ! of IF( forward. OR . leapf ) 590 597 cc$OMP END PARALLEL 591 598 … … 608 615 c$OMP BARRIER 609 616 ! CALL FTRACE_REGION_BEGIN("integrd") 617 610 618 CALL integrd_p ( 2,vcovm1,ucovm1,tetam1,psm1,massem1 , 611 619 $ dv,du,dteta,dq,dp,vcov,ucov,teta,q,ps,masse,phis , … … 625 633 c 626 634 c call WriteField_p('ps',reshape(ps,(/iip1,jmp1/))) 627 c do j=1,nq mx635 c do j=1,nqtot 628 636 c call WriteField_p('q'//trim(int2str(j)), 629 637 c . reshape(q(:,:,j),(/iip1,jmp1,llm/))) … … 663 671 c$OMP MASTER 664 672 call suspend_timer(timer_caldyn) 665 print*,'Entree dans la physique : Iteration No ',true_itau 673 674 write(lunout,*) 675 & 'leapfrog_p: Entree dans la physique : Iteration No ',true_itau 666 676 c$OMP END MASTER 667 677 … … 669 679 670 680 c$OMP BARRIER 671 672 681 CALL exner_hyb_p( ip1jmp1, ps, p,alpha,beta,pks, pk, pkf ) 673 682 c$OMP BARRIER … … 683 692 c ----------------------------------------------------- 684 693 685 #ifdef CPP_PHYS686 694 c+jld 687 695 … … 689 697 IF (ip_ebil_dyn.ge.1 ) THEN 690 698 ztit='bil dyn' 691 CALL diagedyn(ztit,2,1,1,dtphys 692 e , ucov , vcov , ps, p ,pk , teta , q(:,:,1), q(:,:,2)) 699 ! Ehouarn: be careful, diagedyn is Earth-specific (includes ../phylmd/..)! 700 IF (planet_type.eq."earth") THEN 701 CALL diagedyn(ztit,2,1,1,dtphys 702 & , ucov , vcov , ps, p ,pk , teta , q(:,:,1), q(:,:,2)) 703 ENDIF 693 704 ENDIF 694 705 c-jld … … 725 736 726 737 c call SetDistrib(jj_nb_vanleer) 727 do j=1,nq mx738 do j=1,nqtot 728 739 729 740 call Register_SwapFieldHallo(q(1,1,j),q(1,1,j),ip1jmp1,llm, … … 756 767 cc$OMP BARRIER 757 768 ! CALL FTRACE_REGION_BEGIN("calfis") 758 CALL calfis_p( nq,lafin ,rdayvrai,time ,769 CALL calfis_p(lafin ,rdayvrai,time , 759 770 $ ucov,vcov,teta,q,masse,ps,p,pk,phis,phi , 760 771 $ du,dv,dteta,dq, … … 777 788 dpfi_tmp(1:iip1) = dpfi(ijb:ijb+iim) 778 789 c$OMP END MASTER 779 endif 790 endif ! of if ( .not. pole_nord) 780 791 781 792 c$OMP BARRIER … … 799 810 * 1,0,0,1,Request_physic) 800 811 801 do j=1,nq mx812 do j=1,nqtot 802 813 call Register_Hallo(dqfi(1,1,j),ip1jmp1,llm, 803 814 * 1,0,0,1,Request_physic) … … 833 844 c$OMP END MASTER 834 845 835 endif 846 endif ! of if (.not. pole_nord) 836 847 c$OMP BARRIER 837 848 cc$OMP MASTER … … 842 853 cc$OMP END MASTER 843 854 c 844 c do j=1,nq mx855 c do j=1,nqtot 845 856 c call WriteField_p('dqfi'//trim(int2str(j)), 846 857 c . reshape(dqfi(:,:,j),(/iip1,jmp1,llm/))) … … 853 864 ENDIF 854 865 855 CALL addfi_p( nqmx,dtphys, leapf, forward ,866 CALL addfi_p( dtphys, leapf, forward , 856 867 $ ucov, vcov, teta , q ,ps , 857 868 $ dufi, dvfi, dtetafi , dqfi ,dpfi ) … … 889 900 * jj_Nb_caldyn,Request_physic) 890 901 891 do j=1,nq mx902 do j=1,nqtot 892 903 893 904 call Register_SwapField(q(1,1,j),q(1,1,j),ip1jmp1,llm, … … 922 933 cc$OMP END MASTER 923 934 924 #else 925 935 936 c-jld 937 c$OMP MASTER 938 call resume_timer(timer_caldyn) 939 if (FirstPhysic) then 940 ok_start_timer=.TRUE. 941 FirstPhysic=.false. 942 endif 943 c$OMP END MASTER 944 ENDIF ! of IF( apphys ) 945 946 IF(iflag_phys.EQ.2) THEN ! "Newtonian" case 926 947 c Calcul academique de la physique = Rappel Newtonien + fritcion 927 948 c -------------------------------------------------------------- … … 939 960 940 961 call friction_p(ucov,vcov,iphysiq*dtvr) 941 942 #endif 943 944 c-jld 945 c$OMP MASTER 946 call resume_timer(timer_caldyn) 947 if (FirstPhysic) then 948 ok_start_timer=.TRUE. 949 FirstPhysic=.false. 950 endif 951 c$OMP END MASTER 952 ENDIF 962 ENDIF ! of IF(iflag_phys.EQ.2) 963 953 964 954 965 CALL pression_p ( ip1jmp1, ap, bp, ps, p ) 955 966 c$OMP BARRIER 956 957 958 967 CALL exner_hyb_p( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf ) 959 968 c$OMP BARRIER … … 1285 1294 ENDIF 1286 1295 #ifdef CPP_IOIPSL 1296 IF (ok_dynzon) THEN 1287 1297 call Register_Hallo(vcov,ip1jm,llm,1,0,0,1,TestRequest) 1288 1298 call SendRequest(TestRequest) … … 1291 1301 c$OMP BARRIER 1292 1302 c$OMP MASTER 1293 CALL writedynav_p(histaveid, nqmx,itau,vcov ,1303 CALL writedynav_p(histaveid, itau,vcov , 1294 1304 , ucov,teta,pk,phi,q,masse,ps,phis) 1295 c$OMP END MASTER 1296 1305 1306 c ATTENTION!!! bilan_dyn_p ne marche probablement pas avec OpenMP 1307 CALL bilan_dyn_p(2,dtvr*iperiod,dtvr*day_step*periodav, 1308 , ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) 1309 c$OMP END MASTER 1310 ENDIF !ok_dynzon 1297 1311 #endif 1298 1312 ENDIF … … 1304 1318 c IF( MOD(itau,iecri ).EQ.0) THEN 1305 1319 1306 IF( MOD(itau,iecri*day_step).EQ.0) THEN1307 c$OMP BARRIER 1308 c$OMP MASTER 1309 1310 CALL geopot_p ( ip1jmp1, teta , pk , pks, phis , phi)1320 IF( MOD(itau,iecri*day_step).EQ.0) THEN 1321 c$OMP BARRIER 1322 c$OMP MASTER 1323 nbetat = nbetatdem 1324 CALL geopot_p(ip1jmp1,teta,pk,pks,phis,phi) 1311 1325 1312 1326 cym unat=0. 1313 1327 1314 ijb=ij_begin1315 ije=ij_end1316 1317 if (pole_nord) then1318 ijb=ij_begin+iip11319 unat(1:iip1,:)=0.1320 endif1321 1322 if (pole_sud) then1323 ije=ij_end-iip11324 unat(ij_end-iip1+1:ij_end,:)=0.1325 endif1328 ijb=ij_begin 1329 ije=ij_end 1330 1331 if (pole_nord) then 1332 ijb=ij_begin+iip1 1333 unat(1:iip1,:)=0. 1334 endif 1335 1336 if (pole_sud) then 1337 ije=ij_end-iip1 1338 unat(ij_end-iip1+1:ij_end,:)=0. 1339 endif 1326 1340 1327 do l=1,llm1328 unat(ijb:ije,l)=ucov(ijb:ije,l)/cu(ijb:ije)1329 enddo1330 1331 ijb=ij_begin1332 ije=ij_end1333 if (pole_sud) ije=ij_end-iip11334 1335 do l=1,llm1336 vnat(ijb:ije,l)=vcov(ijb:ije,l)/cv(ijb:ije)1337 enddo1341 do l=1,llm 1342 unat(ijb:ije,l)=ucov(ijb:ije,l)/cu(ijb:ije) 1343 enddo 1344 1345 ijb=ij_begin 1346 ije=ij_end 1347 if (pole_sud) ije=ij_end-iip1 1348 1349 do l=1,llm 1350 vnat(ijb:ije,l)=vcov(ijb:ije,l)/cv(ijb:ije) 1351 enddo 1338 1352 1339 1353 #ifdef CPP_IOIPSL 1340 1354 1341 CALL writehist_p(histid,histvid, nqmx,itau,vcov,1342 sucov,teta,phi,q,masse,ps,phis)1355 CALL writehist_p(histid,histvid, itau,vcov, 1356 & ucov,teta,phi,q,masse,ps,phis) 1343 1357 1344 1358 #endif 1345 c$OMP END MASTER 1346 ENDIF 1359 ! For some Grads outputs of fields 1360 if (output_grads_dyn) then 1361 ! Ehouarn: hope this works the way I think it does: 1362 call Gather_Field(unat,ip1jmp1,llm,0) 1363 call Gather_Field(vnat,ip1jm,llm,0) 1364 call Gather_Field(teta,ip1jmp1,llm,0) 1365 call Gather_Field(ps,ip1jmp1,1,0) 1366 do iq=1,nqtot 1367 call Gather_Field(q(1,1,iq),ip1jmp1,llm,0) 1368 enddo 1369 if (mpi_rank==0) then 1370 #include "write_grads_dyn.h" 1371 endif 1372 endif ! of if (output_grads_dyn) 1373 c$OMP END MASTER 1374 ENDIF ! of IF(MOD(itau,iecri).EQ.0) 1347 1375 1348 1376 IF(itau.EQ.itaufin) THEN … … 1351 1379 c$OMP MASTER 1352 1380 1353 c#ifdef CPP_IOIPSL 1354 1355 CALL dynredem1_p("restart.nc",0.0, 1356 , vcov,ucov,teta,q,nqmx,masse,ps) 1357 c#endif 1381 if (planet_type.eq."earth") then 1382 #ifdef CPP_EARTH 1383 ! Write an Earth-format restart file 1384 CALL dynredem1_p("restart.nc",0.0, 1385 & vcov,ucov,teta,q,masse,ps) 1386 1387 #endif 1388 endif ! of if (planet_type.eq."earth") 1358 1389 1359 1390 CLOSE(99) 1360 1391 c$OMP END MASTER 1361 ENDIF 1392 ENDIF ! of IF (itau.EQ.itaufin) 1362 1393 1363 1394 c----------------------------------------------------------------------- … … 1390 1421 dt = 2.*dtvr 1391 1422 GO TO 2 1392 END IF 1393 1394 ELSE 1423 END IF ! of IF (MOD(itau,iperiod).EQ.0) 1424 ! ELSEIF (MOD(itau-1,iperiod).EQ.0) 1425 1426 1427 ELSE ! of IF (.not.purmats) 1395 1428 1396 1429 c ........................................................ … … 1419 1452 GO TO 2 1420 1453 1421 ELSE 1422 1423 IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin) THEN1454 ELSE ! of IF(forward) 1455 1456 IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin) THEN 1424 1457 IF(itau.EQ.itaufin) THEN 1425 1458 iav=1 … … 1428 1461 ENDIF 1429 1462 #ifdef CPP_IOIPSL 1430 c$OMP BARRIER 1431 1432 call Register_Hallo(vcov,ip1jm,llm,1,0,0,1,TestRequest) 1433 call SendRequest(TestRequest) 1434 c$OMP BARRIER 1435 call WaitRequest(TestRequest) 1436 1437 c$OMP BARRIER 1438 c$OMP MASTER 1439 CALL writedynav_p(histaveid, nqmx, itau,vcov , 1463 IF (ok_dynzon) THEN 1464 c$OMP BARRIER 1465 1466 call Register_Hallo(vcov,ip1jm,llm,1,0,0,1,TestRequest) 1467 call SendRequest(TestRequest) 1468 c$OMP BARRIER 1469 call WaitRequest(TestRequest) 1470 1471 c$OMP BARRIER 1472 c$OMP MASTER 1473 CALL writedynav_p(histaveid, itau,vcov , 1440 1474 , ucov,teta,pk,phi,q,masse,ps,phis) 1441 call bilan_dyn_p(2,dtvr*iperiod,dtvr*day_step*periodav,1475 CALL bilan_dyn_p(2,dtvr*iperiod,dtvr*day_step*periodav, 1442 1476 , ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) 1443 1477 c$OMP END MASTER 1478 END IF !ok_dynzon 1444 1479 #endif 1445 ENDIF 1480 ENDIF ! of IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin) 1481 1446 1482 1447 1483 c IF(MOD(itau,iecri ).EQ.0) THEN … … 1449 1485 c$OMP BARRIER 1450 1486 c$OMP MASTER 1451 1452 CALL geopot_p( ip1jmp1, teta , pk , pks, phis , phi)1487 nbetat = nbetatdem 1488 CALL geopot_p(ip1jmp1,teta,pk,pks,phis,phi) 1453 1489 1454 1490 cym unat=0. 1455 ijb=ij_begin1456 ije=ij_end1457 1458 if (pole_nord) then1459 ijb=ij_begin+iip11460 unat(1:iip1,:)=0.1461 endif1462 1463 if (pole_sud) then1464 ije=ij_end-iip11465 unat(ij_end-iip1+1:ij_end,:)=0.1466 endif1491 ijb=ij_begin 1492 ije=ij_end 1493 1494 if (pole_nord) then 1495 ijb=ij_begin+iip1 1496 unat(1:iip1,:)=0. 1497 endif 1498 1499 if (pole_sud) then 1500 ije=ij_end-iip1 1501 unat(ij_end-iip1+1:ij_end,:)=0. 1502 endif 1467 1503 1468 do l=1,llm1469 unat(ijb:ije,l)=ucov(ijb:ije,l)/cu(ijb:ije)1470 enddo1471 1472 ijb=ij_begin1473 ije=ij_end1474 if (pole_sud) ije=ij_end-iip11475 1476 do l=1,llm1477 vnat(ijb:ije,l)=vcov(ijb:ije,l)/cv(ijb:ije)1478 enddo1504 do l=1,llm 1505 unat(ijb:ije,l)=ucov(ijb:ije,l)/cu(ijb:ije) 1506 enddo 1507 1508 ijb=ij_begin 1509 ije=ij_end 1510 if (pole_sud) ije=ij_end-iip1 1511 1512 do l=1,llm 1513 vnat(ijb:ije,l)=vcov(ijb:ije,l)/cv(ijb:ije) 1514 enddo 1479 1515 1480 1516 #ifdef CPP_IOIPSL 1481 1517 1482 CALL writehist_p( histid, histvid, nqmx, itau,vcov , 1483 , ucov,teta,phi,q,masse,ps,phis) 1484 c#else 1485 c call Gather_Field(unat,ip1jmp1,llm,0) 1486 c call Gather_Field(vnat,ip1jm,llm,0) 1487 c call Gather_Field(teta,ip1jmp1,llm,0) 1488 c call Gather_Field(ps,ip1jmp1,1,0) 1489 c do iq=1,nqmx 1490 c call Gather_Field(q(1,1,iq),ip1jmp1,llm,0) 1491 c enddo 1518 CALL writehist_p(histid, histvid, itau,vcov , 1519 & ucov,teta,phi,q,masse,ps,phis) 1520 #endif 1521 ! For some Grads output (but does it work?) 1522 if (output_grads_dyn) then 1523 call Gather_Field(unat,ip1jmp1,llm,0) 1524 call Gather_Field(vnat,ip1jm,llm,0) 1525 call Gather_Field(teta,ip1jmp1,llm,0) 1526 call Gather_Field(ps,ip1jmp1,1,0) 1527 do iq=1,nqtot 1528 call Gather_Field(q(1,1,iq),ip1jmp1,llm,0) 1529 enddo 1492 1530 c 1493 c if (mpi_rank==0) then 1494 c#include "write_grads_dyn.h" 1495 c endif 1531 if (mpi_rank==0) then 1532 #include "write_grads_dyn.h" 1533 endif 1534 endif ! of if (output_grads_dyn) 1535 1536 c$OMP END MASTER 1537 ENDIF ! of IF(MOD(itau,iecri*day_step).EQ.0) 1538 1539 IF(itau.EQ.itaufin) THEN 1540 if (planet_type.eq."earth") then 1541 #ifdef CPP_EARTH 1542 c$OMP MASTER 1543 CALL dynredem1_p("restart.nc",0.0, 1544 . vcov,ucov,teta,q,masse,ps) 1545 c$OMP END MASTER 1496 1546 #endif 1497 1498 c$OMP END MASTER 1499 ENDIF 1500 1501 IF(itau.EQ.itaufin) THEN 1502 c$OMP MASTER 1503 CALL dynredem1_p("restart.nc",0.0, 1504 . vcov,ucov,teta,q,nqmx,masse,ps) 1505 c$OMP END MASTER 1506 ENDIF 1507 forward = .TRUE. 1508 GO TO 1 1509 1510 ENDIF 1511 1512 END IF 1513 c$OMP MASTER 1514 call finalize_parallel 1515 c$OMP END MASTER 1516 RETURN 1547 endif ! of if (planet_type.eq."earth") 1548 ENDIF ! of IF(itau.EQ.itaufin) 1549 1550 forward = .TRUE. 1551 GO TO 1 1552 1553 ENDIF ! of IF (forward) 1554 1555 END IF ! of IF(.not.purmats) 1556 c$OMP MASTER 1557 call finalize_parallel 1558 c$OMP END MASTER 1559 RETURN 1517 1560 END -
LMDZ4/trunk/libf/dyn3dpar/parallel.F90
r1000 r1146 51 51 #else 52 52 using_mpi=.FALSE. 53 #endif 54 55 56 #ifdef CPP_OMP 57 using_OMP=.TRUE. 58 #else 59 using_OMP=.FALSE. 53 60 #endif 54 61 -
LMDZ4/trunk/libf/dyn3dpar/qminimum_p.F
r985 r1146 50 50 DO 1000 k = 1, llm 51 51 DO 1040 i = ijb, ije 52 zx_defau = AMAX1( seuil_liq - q(i,k,iq_liq), 0.0 ) 53 q(i,k,iq_vap) = q(i,k,iq_vap) - zx_defau 54 q(i,k,iq_liq) = q(i,k,iq_liq) + zx_defau 52 if (seuil_liq - q(i,k,iq_liq) .gt. 0.d0 ) then 53 q(i,k,iq_vap) = q(i,k,iq_vap) + q(i,k,iq_liq) - seuil_liq 54 q(i,k,iq_liq) = seuil_liq 55 endif 55 56 1040 CONTINUE 56 57 1000 CONTINUE … … 69 70 c$OMP DO SCHEDULE(STATIC) 70 71 DO i = ijb, ije 71 zx_abc = deltap(i,k)/deltap(i,k-1) 72 zx_defau = AMAX1( seuil_vap - q(i,k,iq), 0.0 ) 73 q(i,k-1,iq) = q(i,k-1,iq) - zx_defau * zx_abc 74 q(i,k,iq) = q(i,k,iq) + zx_defau 72 if ( seuil_vap - q(i,k,iq) .gt. 0.d0 ) then 73 q(i,k-1,iq) = q(i,k-1,iq) - ( seuil_vap - q(i,k,iq) ) * 74 & deltap(i,k) / deltap(i,k-1) 75 q(i,k,iq) = seuil_vap 76 endif 75 77 ENDDO 76 78 c$OMP END DO NOWAIT -
LMDZ4/trunk/libf/dyn3dpar/read_reanalyse.F
r1122 r1146 11 11 12 12 USE parallel 13 use netcdf 13 14 c ----------------------------------------------------------------- 14 15 c Declarations … … 72 73 print *,'Vous êtes entrain de lire des données sur 73 74 . niveaux modèle' 74 ncidpl=NCOPN('apbp.nc',NCNOWRIT,rcode)75 varidap=NCVID(ncidpl,'AP',rcode)76 varidbp=NCVID(ncidpl,'BP',rcode)75 rcode=nf90_open('apbp.nc',nf90_nowrite,ncidpl) 76 rcode = nf90_inq_varid(ncidpl, 'AP', varidap) 77 rcode = nf90_inq_varid(ncidpl, 'BP', varidbp) 77 78 print*,'ncidpl,varidap',ncidpl,varidap 78 79 endif … … 80 81 c Vent zonal 81 82 if (guide_u) then 82 ncidu=NCOPN('u.nc',NCNOWRIT,rcode)83 varidu=NCVID(ncidu,'UWND',rcode)83 rcode=nf90_open('u.nc',nf90_nowrite,ncidu) 84 rcode = nf90_inq_varid(ncidu, 'UWND', varidu) 84 85 print*,'ncidu,varidu',ncidu,varidu 85 86 if (ncidpl.eq.-99) ncidpl=ncidu … … 88 89 c Vent meridien 89 90 if (guide_v) then 90 ncidv=NCOPN('v.nc',NCNOWRIT,rcode)91 varidv=NCVID(ncidv,'VWND',rcode)91 rcode=nf90_open('v.nc',nf90_nowrite,ncidv) 92 rcode = nf90_inq_varid(ncidv, 'VWND', varidv) 92 93 print*,'ncidv,varidv',ncidv,varidv 93 94 if (ncidpl.eq.-99) ncidpl=ncidv … … 96 97 c Temperature 97 98 if (guide_T) then 98 ncidt=NCOPN('T.nc',NCNOWRIT,rcode)99 varidt=NCVID(ncidt,'AIR',rcode)99 rcode=nf90_open('T.nc',nf90_nowrite,ncidt) 100 rcode = nf90_inq_varid(ncidt, 'AIR', varidt) 100 101 print*,'ncidt,varidt',ncidt,varidt 101 102 if (ncidpl.eq.-99) ncidpl=ncidt … … 104 105 c Humidite 105 106 if (guide_Q) then 106 ncidQ=NCOPN('hur.nc',NCNOWRIT,rcode)107 varidQ=NCVID(ncidQ,'RH',rcode)107 rcode=nf90_open('hur.nc',nf90_nowrite,ncidQ) 108 rcode = nf90_inq_varid(ncidQ, 'RH', varidQ) 108 109 print*,'ncidQ,varidQ',ncidQ,varidQ 109 110 if (ncidpl.eq.-99) ncidpl=ncidQ … … 112 113 c Pression de surface 113 114 if ((guide_P).OR.(guide_modele)) then 114 ncidps=NCOPN('ps.nc',NCNOWRIT,rcode)115 varidps=NCVID(ncidps,'SP',rcode)115 rcode=nf90_open('ps.nc',nf90_nowrite,ncidps) 116 rcode = nf90_inq_varid(ncidps, 'SP', varidps) 116 117 print*,'ncidps,varidps',ncidps,varidps 117 118 endif … … 119 120 c Coordonnee verticale 120 121 if (.not.guide_modele) then 121 if (ncep) then122 print*,'Vous etes entrain de lire des donnees NCEP'123 varidpl=NCVID(ncidpl,'LEVEL',rcode)124 else125 print*,'Vous etes entrain de lire des donnees ECMWF'126 varidpl=NCVID(ncidpl,'PRESSURE',rcode)127 endif128 print*,'ncidpl,varidpl',ncidpl,varidpl122 if (ncep) then 123 print*,'Vous etes entrain de lire des donnees NCEP' 124 rcode = nf90_inq_varid(ncidpl, 'LEVEL', varidpl) 125 else 126 print*,'Vous etes entrain de lire des donnees ECMWF' 127 rcode = nf90_inq_varid(ncidpl, 'PRESSURE', varidpl) 128 endif 129 print*,'ncidpl,varidpl',ncidpl,varidpl 129 130 endif 130 131 print*,'ncidu,varidpl',ncidu,varidpl -
LMDZ4/trunk/libf/dyn3dpar/serre.h
r774 r1146 2 2 ! $Header$ 3 3 ! 4 c5 c6 c..include serre.h7 c8 REAL clon,clat,transx,transy,alphax,alphay,pxo,pyo, 9 ,grossismx, grossismy, dzoomx, dzoomy,taux,tauy10 COMMON/serre/clon,clat,transx,transy,alphax,alphay,pxo,pyo , 11 ,grossismx, grossismy, dzoomx, dzoomy,taux,tauy4 !c 5 !c 6 !c..include serre.h 7 !c 8 REAL clon,clat,transx,transy,alphax,alphay,pxo,pyo, & 9 & grossismx, grossismy, dzoomx, dzoomy,taux,tauy 10 COMMON/serre/clon,clat,transx,transy,alphax,alphay,pxo,pyo , & 11 & grossismx, grossismy, dzoomx, dzoomy,taux,tauy -
LMDZ4/trunk/libf/dyn3dpar/test_period.F
r774 r1146 3 3 ! 4 4 SUBROUTINE test_period ( ucov, vcov, teta, q, p, phis ) 5 USE infotrac, ONLY : nqtot 5 6 c 6 7 c Auteur : P. Le Van … … 17 18 c 18 19 REAL ucov(ip1jmp1,llm), vcov(ip1jm,llm), teta(ip1jmp1,llm) , 19 , q(ip1jmp1,llm,nq mx), p(ip1jmp1,llmp1), phis(ip1jmp1)20 , q(ip1jmp1,llm,nqtot), p(ip1jmp1,llmp1), phis(ip1jmp1) 20 21 c 21 22 c ..... Variables locales ..... … … 68 69 69 70 c 70 DO nq =1, nq mx71 DO nq =1, nqtot 71 72 DO l =1, llm 72 73 DO ij = 1, ip1jmp1, iip1 -
LMDZ4/trunk/libf/dyn3dpar/times.F90
r1000 r1146 207 207 endif 208 208 209 ENDIF ! using_mp î209 ENDIF ! using_mp� 210 210 end subroutine allgather_timer_average 211 211 … … 222 222 end subroutine InitTime 223 223 224 function DiffTime 224 function DiffTime() 225 225 implicit none 226 226 double precision :: DiffTime … … 236 236 end function DiffTime 237 237 238 function DiffCpuTime 238 function DiffCpuTime() 239 239 implicit none 240 240 real :: DiffCpuTime -
LMDZ4/trunk/libf/dyn3dpar/vlspltgen_p.F
r985 r1146 26 26 USE Write_Field_p 27 27 USE VAMPIR 28 USE infotrac, ONLY : nqtot 28 29 IMPLICIT NONE 29 30 … … 38 39 c Arguments: 39 40 c ---------- 40 INTEGER iadv(nq mx)41 INTEGER iadv(nqtot) 41 42 REAL masse(ip1jmp1,llm),pente_max 42 43 REAL pbaru( ip1jmp1,llm ),pbarv( ip1jm,llm) 43 REAL q(ip1jmp1,llm,nq mx)44 REAL q(ip1jmp1,llm,nqtot) 44 45 REAL w(ip1jmp1,llm),pdt 45 46 REAL p(ip1jmp1,llmp1),teta(ip1jmp1,llm),pk(ip1jmp1,llm) … … 51 52 c 52 53 REAL,SAVE :: qsat(ip1jmp1,llm) 53 REAL, SAVE :: zm(ip1jmp1,llm,nqmx)54 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: zm 54 55 REAL,SAVE :: mu(ip1jmp1,llm) 55 56 REAL,SAVE :: mv(ip1jm,llm) 56 57 REAL,SAVE :: mw(ip1jmp1,llm+1) 57 REAL, SAVE :: zq(ip1jmp1,llm,nqmx)58 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: zq 58 59 REAL zzpbar, zzw 59 60 … … 67 68 REAL tempe(ip1jmp1) 68 69 INTEGER ijb,ije,iq 70 LOGICAL, SAVE :: firstcall=.TRUE. 71 !$OMP THREADPRIVATE(firstcall) 69 72 type(request) :: MyRequest1 70 73 type(request) :: MyRequest2 … … 84 87 rtt = 273.16 85 88 89 c Allocate variables depending on dynamic variable nqtot 90 91 IF (firstcall) THEN 92 firstcall=.FALSE. 93 !$OMP MASTER 94 ALLOCATE(zm(ip1jmp1,llm,nqtot)) 95 ALLOCATE(zq(ip1jmp1,llm,nqtot)) 96 !$OMP END MASTER 97 !$OMP BARRIER 98 END IF 86 99 c-- Calcul de Qsat en chaque point 87 100 c-- approximation: au milieu des couches play(l)=(p(l)+p(l+1))/2 … … 164 177 ije=ij_end 165 178 166 DO iq=1,nq mx179 DO iq=1,nqtot 167 180 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 168 181 DO l=1,llm … … 175 188 176 189 c$OMP BARRIER 177 DO iq=1,nq mx190 DO iq=1,nqtot 178 191 179 192 if(iadv(iq) == 0) then … … 245 258 c$OMP END MASTER 246 259 c$OMP BARRIER 247 do iq=1,nq mx260 do iq=1,nqtot 248 261 249 262 if(iadv(iq) == 0) then … … 285 298 c$OMP BARRIER 286 299 287 do iq=1,nq mx300 do iq=1,nqtot 288 301 289 302 if(iadv(iq) == 0) then … … 308 321 309 322 310 do iq=1,nq mx323 do iq=1,nqtot 311 324 312 325 if(iadv(iq) == 0) then … … 359 372 360 373 c$OMP BARRIER 361 do iq=1,nq mx374 do iq=1,nqtot 362 375 363 376 if(iadv(iq) == 0) then … … 398 411 399 412 400 do iq=1,nq mx413 do iq=1,nqtot 401 414 402 415 if(iadv(iq) == 0) then … … 420 433 enddo 421 434 422 do iq=1,nq mx435 do iq=1,nqtot 423 436 424 437 if(iadv(iq) == 0) then … … 450 463 451 464 452 DO iq=1,nq mx465 DO iq=1,nqtot 453 466 454 467 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) -
LMDZ4/trunk/libf/dyn3dpar/write_grads_dyn.h
r774 r1146 24 24 string10='teta' 25 25 CALL wrgrads(1,llm,teta,string10,string10) 26 do iq=1,nq mx26 do iq=1,nqtot 27 27 string10='q' 28 28 write(string10(2:2),'(i1)') iq -
LMDZ4/trunk/libf/dyn3dpar/writedynav_p.F
r1000 r1146 2 2 ! $Header$ 3 3 ! 4 subroutine writedynav_p( histid, nq,time, vcov,4 subroutine writedynav_p( histid, time, vcov, 5 5 , ucov,teta,ppk,phi,q,masse,ps,phis) 6 6 … … 8 8 USE parallel 9 9 USE misc_mod 10 USE infotrac 10 11 implicit none 11 12 … … 17 18 C Entree: 18 19 C histid: ID du fichier histoire 19 C nqmx: nombre maxi de traceurs20 20 C time: temps de l'ecriture 21 21 C vcov: vents v covariants … … 47 47 #include "description.h" 48 48 #include "serre.h" 49 #include "advtrac.h"50 49 51 50 C … … 53 52 C 54 53 55 INTEGER histid , nq54 INTEGER histid 56 55 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) 57 56 REAL teta(ip1jmp1,llm),phi(ip1jmp1,llm),ppk(ip1jmp1,llm) 58 57 REAL ps(ip1jmp1),masse(ip1jmp1,llm) 59 58 REAL phis(ip1jmp1) 60 REAL q(ip1jmp1,llm,nq )59 REAL q(ip1jmp1,llm,nqtot) 61 60 integer time 62 61 … … 105 104 C Vents V scalaire 106 105 C 107 if (pole_sud) ije=ij_end-iip1108 if (pole_sud) jjn=jj_nb-1109 106 110 107 call gr_v_scal_p(llm, vnat, vs) … … 114 111 C Temperature potentielle moyennee 115 112 C 116 ijb=ij_begin 117 ije=ij_end 118 jjn=jj_nb 119 113 120 114 call histwrite(histid, 'theta', itau_w, teta(ijb:ije,:), 121 115 . iip1*jjn*llm, ndex3d) … … 139 133 C Traceurs 140 134 C 141 DO iq=1,nq 135 DO iq=1,nqtot 142 136 call histwrite(histid, ttext(iq), itau_w, q(ijb:ije,:,iq), 143 137 . iip1*jjn*llm, ndex3d) -
LMDZ4/trunk/libf/dyn3dpar/writehist_p.F
r1000 r1146 2 2 ! $Header$ 3 3 ! 4 subroutine writehist_p( histid, histvid, nq,time, vcov,4 subroutine writehist_p( histid, histvid, time, vcov, 5 5 , ucov,teta,phi,q,masse,ps,phis) 6 6 … … 8 8 USE parallel 9 9 USE misc_mod 10 USE infotrac 10 11 implicit none 11 12 … … 18 19 C histid: ID du fichier histoire 19 20 C histvid:ID du fichier histoire pour les vents V (appele a disparaitre) 20 C nqmx: nombre maxi de traceurs21 21 C time: temps de l'ecriture 22 22 C vcov: vents v covariants … … 48 48 #include "description.h" 49 49 #include "serre.h" 50 #include "advtrac.h"51 50 52 51 C … … 54 53 C 55 54 56 INTEGER histid, nq,histvid55 INTEGER histid, histvid 57 56 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) 58 57 REAL teta(ip1jmp1,llm),phi(ip1jmp1,llm) 59 58 REAL ps(ip1jmp1),masse(ip1jmp1,llm) 60 59 REAL phis(ip1jmp1) 61 REAL q(ip1jmp1,llm,nq )60 REAL q(ip1jmp1,llm,nqtot) 62 61 integer time 63 62 … … 119 118 C Traceurs 120 119 C 121 DO iq=1,nq 120 DO iq=1,nqtot 122 121 call histwrite(histid, ttext(iq), itau_w, q(ijb:ije,:,iq), 123 122 . iip1*jjn*llm, ndexu) -
LMDZ4/trunk/libf/filtrez/coefils.h
r524 r1146 2 2 ! $Header$ 3 3 ! 4 COMMON/coefils/jfiltnu,jfiltsu,jfiltnv,jfiltsv,sddu(iim),sddv(iim) 5 * ,unsddu(iim),unsddv(iim),coefilu(iim,jjm),coefilv(iim,jjm),6 * modfrstu(jjm),modfrstv(jjm),eignfnu(iim,iim),eignfnv(iim,iim)7 *,coefilu2(iim,jjm),coefilv2(iim,jjm)8 c4 COMMON/coefils/jfiltnu,jfiltsu,jfiltnv,jfiltsv,sddu(iim),sddv(iim)& 5 & ,unsddu(iim),unsddv(iim),coefilu(iim,jjm),coefilv(iim,jjm), & 6 & modfrstu(jjm),modfrstv(jjm),eignfnu(iim,iim),eignfnv(iim,iim) & 7 & ,coefilu2(iim,jjm),coefilv2(iim,jjm) 8 !c 9 9 INTEGER jfiltnu,jfiltsu,jfiltnv,jfiltsv,modfrstu,modfrstv 10 10 REAL sddu,sddv,unsddu,unsddv,coefilu,coefilv,eignfnu,eignfnv -
LMDZ4/trunk/libf/filtrez/filtreg.F
r524 r1146 3 3 ! 4 4 SUBROUTINE filtreg ( champ, nlat, nbniv, ifiltre,iaire, 5 . griscal ,iter) 6 5 & griscal ,iter) 6 7 USE filtreg_mod 8 7 9 IMPLICIT NONE 8 10 c======================================================================= … … 46 48 #include "dimensions.h" 47 49 #include "paramet.h" 48 #include "parafilt.h"49 50 #include "coefils.h" 50 c 51 INTEGER nlat,nbniv,ifiltre,iter 52 INTEGER i,j,l,k 53 INTEGER iim2,immjm 54 INTEGER jdfil1,jdfil2,jffil1,jffil2,jdfil,jffil 55 56 REAL champ( iip1,nlat,nbniv) 57 REAL matriceun,matriceus,matricevn,matricevs,matrinvn,matrinvs 58 COMMON/matrfil/matriceun(iim,iim,nfilun),matriceus(iim,iim,nfilus) 59 , , matricevn(iim,iim,nfilvn),matricevs(iim,iim,nfilvs) 60 , , matrinvn(iim,iim,nfilun),matrinvs (iim,iim,nfilus) 61 REAL eignq(iim), sdd1(iim),sdd2(iim) 51 52 INTEGER nlat,nbniv,ifiltre,iter 53 INTEGER i,j,l,k 54 INTEGER iim2,immjm 55 INTEGER jdfil1,jdfil2,jffil1,jffil2,jdfil,jffil 56 57 REAL champ( iip1,nlat,nbniv) 58 59 REAL eignq(iim,nlat,nbniv), sdd1(iim),sdd2(iim) 62 60 LOGICAL griscal 63 61 INTEGER hemisph, iaire 64 c 62 63 LOGICAL,SAVE :: first=.TRUE. 64 65 REAL, SAVE :: sdd12(iim,4) 66 67 INTEGER, PARAMETER :: type_sddu=1 68 INTEGER, PARAMETER :: type_sddv=2 69 INTEGER, PARAMETER :: type_unsddu=3 70 INTEGER, PARAMETER :: type_unsddv=4 71 72 INTEGER :: sdd1_type, sdd2_type 73 74 IF (first) THEN 75 sdd12(1:iim,type_sddu) = sddu(1:iim) 76 sdd12(1:iim,type_sddv) = sddv(1:iim) 77 sdd12(1:iim,type_unsddu) = unsddu(1:iim) 78 sdd12(1:iim,type_unsddv) = unsddv(1:iim) 79 80 first=.FALSE. 81 ENDIF 65 82 66 83 IF(ifiltre.EQ.1.or.ifiltre.EQ.-1) 67 *STOP'Pas de transformee simple dans cette version'68 84 & STOP'Pas de transformee simple dans cette version' 85 69 86 IF( iter.EQ. 2 ) THEN 70 PRINT *,' Pas d iteration du filtre dans cette version !'71 *, ' Utiliser old_filtreg et repasser !'72 87 PRINT *,' Pas d iteration du filtre dans cette version !' 88 & , ' Utiliser old_filtreg et repasser !' 89 STOP 73 90 ENDIF 74 91 75 92 IF( ifiltre.EQ. -2 .AND..NOT.griscal ) THEN 76 PRINT *,' Cette routine ne calcule le filtre inverse que ',77 *' sur la grille des scalaires !'78 93 PRINT *,' Cette routine ne calcule le filtre inverse que ' 94 & , ' sur la grille des scalaires !' 95 STOP 79 96 ENDIF 80 97 81 98 IF( ifiltre.NE.2 .AND.ifiltre.NE. - 2 ) THEN 82 PRINT *,' Probleme dans filtreg car ifiltre NE 2 et NE -2'83 *,' corriger et repasser !'84 99 PRINT *,' Probleme dans filtreg car ifiltre NE 2 et NE -2' 100 & , ' corriger et repasser !' 101 STOP 85 102 ENDIF 86 c 87 103 88 104 iim2 = iim * iim 89 105 immjm = iim * jjm 90 c 91 c 106 92 107 IF( griscal ) THEN 93 108 IF( nlat. NE. jjp1 ) THEN 94 PRINT 1111 95 STOP 96 ELSE 97 c 98 IF( iaire.EQ.1 ) THEN 99 CALL SCOPY( iim, sddv, 1, sdd1, 1 ) 100 CALL SCOPY( iim, unsddv, 1, sdd2, 1 ) 101 ELSE 102 CALL SCOPY( iim, unsddv, 1, sdd1, 1 ) 103 CALL SCOPY( iim, sddv, 1, sdd2, 1 ) 104 END IF 105 c 106 jdfil1 = 2 107 jffil1 = jfiltnu 108 jdfil2 = jfiltsu 109 jffil2 = jjm 110 END IF 109 PRINT 1111 110 STOP 111 ELSE 112 113 IF( iaire.EQ.1 ) THEN 114 sdd1_type = type_sddu 115 sdd2_type = type_unsddu 116 ELSE 117 sdd1_type = type_unsddu 118 sdd2_type = type_sddu 119 ENDIF 120 121 c IF( iaire.EQ.1 ) THEN 122 c CALL SCOPY( iim, sddv, 1, sdd1, 1 ) 123 c CALL SCOPY( iim, unsddv, 1, sdd2, 1 ) 124 c ELSE 125 c CALL SCOPY( iim, unsddv, 1, sdd1, 1 ) 126 c CALL SCOPY( iim, sddv, 1, sdd2, 1 ) 127 c END IF 128 129 jdfil1 = 2 130 jffil1 = jfiltnu 131 jdfil2 = jfiltsu 132 jffil2 = jjm 133 END IF 111 134 ELSE 112 IF( nlat.NE.jjm ) THEN 113 PRINT 2222 114 STOP 115 ELSE 116 c 117 IF( iaire.EQ.1 ) THEN 118 CALL SCOPY( iim, sddu, 1, sdd1, 1 ) 119 CALL SCOPY( iim, unsddu, 1, sdd2, 1 ) 120 ELSE 121 CALL SCOPY( iim, unsddu, 1, sdd1, 1 ) 122 CALL SCOPY( iim, sddu, 1, sdd2, 1 ) 123 END IF 124 c 125 jdfil1 = 1 126 jffil1 = jfiltnv 127 jdfil2 = jfiltsv 128 jffil2 = jjm 129 END IF 135 IF( nlat.NE.jjm ) THEN 136 PRINT 2222 137 STOP 138 ELSE 139 140 IF( iaire.EQ.1 ) THEN 141 sdd1_type = type_sddu 142 sdd2_type = type_unsddu 143 ELSE 144 sdd1_type = type_unsddu 145 sdd2_type = type_sddu 146 ENDIF 147 148 c IF( iaire.EQ.1 ) THEN 149 c CALL SCOPY( iim, sddu, 1, sdd1, 1 ) 150 c CALL SCOPY( iim, unsddu, 1, sdd2, 1 ) 151 c ELSE 152 c CALL SCOPY( iim, unsddu, 1, sdd1, 1 ) 153 c CALL SCOPY( iim, sddu, 1, sdd2, 1 ) 154 c END IF 155 156 jdfil1 = 1 157 jffil1 = jfiltnv 158 jdfil2 = jfiltsv 159 jffil2 = jjm 160 END IF 130 161 END IF 131 c 132 c 133 DO 100 hemisph = 1, 2 134 c 135 IF ( hemisph.EQ.1 ) THEN 136 jdfil = jdfil1 137 jffil = jffil1 138 ELSE 139 jdfil = jdfil2 140 jffil = jffil2 141 END IF 142 143 144 DO 50 l = 1, nbniv 145 DO 30 j = jdfil,jffil 146 147 148 DO 5 i = 1, iim 149 champ(i,j,l) = champ(i,j,l) * sdd1(i) 150 5 CONTINUE 151 c 152 153 IF( hemisph. EQ. 1 ) THEN 154 155 IF( ifiltre. EQ. -2 ) THEN 156 #ifdef CRAY 157 CALL MXVA( matrinvn(1,1,j), 1, iim, champ(1,j,l), 1, eignq , 158 * 1, iim, iim ) 159 #else 160 #ifdef BLAS 161 CALL SGEMV("N", iim,iim, 1.0, matrinvn(1,1,j),iim, 162 . champ(1,j,l), 1, 0.0, eignq, 1) 163 #else 164 DO k = 1, iim 165 eignq(k) = 0.0 162 163 DO hemisph = 1, 2 164 165 IF ( hemisph.EQ.1 ) THEN 166 jdfil = jdfil1 167 jffil = jffil1 168 ELSE 169 jdfil = jdfil2 170 jffil = jffil2 171 END IF 172 173 DO l = 1, nbniv 174 DO j = jdfil,jffil 175 DO i = 1, iim 176 champ(i,j,l) = champ(i,j,l) * sdd12(i,sdd1_type) ! sdd1(i) 177 END DO 178 END DO 179 END DO 180 181 IF( hemisph. EQ. 1 ) THEN 182 183 IF( ifiltre. EQ. -2 ) THEN 184 185 DO j = jdfil,jffil 186 #ifdef BLAS 187 CALL DGEMM("N", "N", iim, nbniv, iim, 1.0, 188 & matrinvn(1,1,j), 189 & iim, champ(1,j,1), iip1*nlat, 0.0, 190 & eignq(1,j-jdfil+1,1), iim*nlat) 191 #else 192 eignq(:,j-jdfil+1,:) 193 $ = matmul(matrinvn(:,:,j), champ(:iim,j,:)) 194 #endif 195 END DO 196 197 ELSE IF ( griscal ) THEN 198 199 DO j = jdfil,jffil 200 #ifdef BLAS 201 CALL DGEMM("N", "N", iim, nbniv, iim, 1.0, 202 & matriceun(1,1,j), 203 & iim, champ(1,j,1), iip1*nlat, 0.0, 204 & eignq(1,j-jdfil+1,1), iim*nlat) 205 #else 206 eignq(:,j-jdfil+1,:) 207 $ = matmul(matriceun(:,:,j), champ(:iim,j,:)) 208 #endif 209 END DO 210 211 ELSE 212 213 DO j = jdfil,jffil 214 #ifdef BLAS 215 CALL DGEMM("N", "N", iim, nbniv, iim, 1.0, 216 & matricevn(1,1,j), 217 & iim, champ(1,j,1), iip1*nlat, 0.0, 218 & eignq(1,j-jdfil+1,1), iim*nlat) 219 #else 220 eignq(:,j-jdfil+1,:) 221 $ = matmul(matricevn(:,:,j), champ(:iim,j,:)) 222 #endif 223 END DO 224 225 ENDIF 226 227 ELSE 228 229 IF( ifiltre. EQ. -2 ) THEN 230 231 DO j = jdfil,jffil 232 #ifdef BLAS 233 CALL DGEMM("N", "N", iim, nbniv, iim, 1.0, 234 & matrinvs(1,1,j-jfiltsu+1), 235 & iim, champ(1,j,1), iip1*nlat, 0.0, 236 & eignq(1,j-jdfil+1,1), iim*nlat) 237 #else 238 eignq(:,j-jdfil+1,:) 239 $ = matmul(matrinvs(:,:,j-jfiltsu+1), 240 $ champ(:iim,j,:)) 241 #endif 242 END DO 243 244 245 ELSE IF ( griscal ) THEN 246 247 DO j = jdfil,jffil 248 #ifdef BLAS 249 CALL DGEMM("N", "N", iim, nbniv, iim, 1.0, 250 & matriceus(1,1,j-jfiltsu+1), 251 & iim, champ(1,j,1), iip1*nlat, 0.0, 252 & eignq(1,j-jdfil+1,1), iim*nlat) 253 #else 254 eignq(:,j-jdfil+1,:) 255 $ = matmul(matriceus(:,:,j-jfiltsu+1), 256 $ champ(:iim,j,:)) 257 #endif 258 END DO 259 260 ELSE 261 262 DO j = jdfil,jffil 263 #ifdef BLAS 264 CALL DGEMM("N", "N", iim, nbniv, iim, 1.0, 265 & matricevs(1,1,j-jfiltsv+1), 266 & iim, champ(1,j,1), iip1*nlat, 0.0, 267 & eignq(1,j-jdfil+1,1), iim*nlat) 268 #else 269 eignq(:,j-jdfil+1,:) 270 $ = matmul(matricevs(:,:,j-jfiltsv+1), 271 $ champ(:iim,j,:)) 272 #endif 273 END DO 274 275 ENDIF 276 277 ENDIF 278 279 IF( ifiltre.EQ. 2 ) THEN 280 281 DO l = 1, nbniv 282 DO j = jdfil,jffil 283 DO i = 1, iim 284 champ( i,j,l ) = 285 & (champ(i,j,l) + eignq(i,j-jdfil+1,l)) 286 & * sdd12(i,sdd2_type) ! sdd2(i) 287 END DO 288 END DO 289 END DO 290 291 ELSE 292 293 DO l = 1, nbniv 294 DO j = jdfil,jffil 295 DO i = 1, iim 296 champ( i,j,l ) = 297 & (champ(i,j,l) - eignq(i,j-jdfil+1,l)) 298 & * sdd12(i,sdd2_type) ! sdd2(i) 299 END DO 300 END DO 301 END DO 302 303 ENDIF 304 305 DO l = 1, nbniv 306 DO j = jdfil,jffil 307 champ( iip1,j,l ) = champ( 1,j,l ) 308 END DO 309 END DO 310 311 166 312 ENDDO 167 DO k = 1, iim 168 DO i = 1, iim 169 eignq(k) = eignq(k) + matrinvn(k,i,j)*champ(i,j,l) 170 ENDDO 171 ENDDO 172 #endif 173 #endif 174 ELSE IF ( griscal ) THEN 175 #ifdef CRAY 176 CALL MXVA( matriceun(1,1,j), 1, iim, champ(1,j,l), 1, eignq , 177 * 1, iim, iim ) 178 #else 179 #ifdef BLAS 180 CALL SGEMV("N", iim,iim, 1.0, matriceun(1,1,j),iim, 181 . champ(1,j,l), 1, 0.0, eignq, 1) 182 #else 183 DO k = 1, iim 184 eignq(k) = 0.0 185 ENDDO 186 DO i = 1, iim 187 DO k = 1, iim 188 eignq(k) = eignq(k) + matriceun(k,i,j)*champ(i,j,l) 189 ENDDO 190 ENDDO 191 #endif 192 #endif 193 ELSE 194 #ifdef CRAY 195 CALL MXVA( matricevn(1,1,j), 1, iim, champ(1,j,l), 1, eignq , 196 * 1, iim, iim ) 197 #else 198 #ifdef BLAS 199 CALL SGEMV("N", iim,iim, 1.0, matricevn(1,1,j),iim, 200 . champ(1,j,l), 1, 0.0, eignq, 1) 201 #else 202 DO k = 1, iim 203 eignq(k) = 0.0 204 ENDDO 205 DO i = 1, iim 206 DO k = 1, iim 207 eignq(k) = eignq(k) + matricevn(k,i,j)*champ(i,j,l) 208 ENDDO 209 ENDDO 210 #endif 211 #endif 212 ENDIF 213 214 ELSE 215 216 IF( ifiltre. EQ. -2 ) THEN 217 #ifdef CRAY 218 CALL MXVA( matrinvs(1,1,j-jfiltsu+1), 1, iim, champ(1,j,l),1 , 219 * eignq, 1, iim, iim ) 220 #else 221 #ifdef BLAS 222 CALL SGEMV("N", iim,iim, 1.0, matrinvs(1,1,j-jfiltsu+1),iim, 223 . champ(1,j,l), 1, 0.0, eignq, 1) 224 #else 225 DO k = 1, iim 226 eignq(k) = 0.0 227 ENDDO 228 DO i = 1, iim 229 DO k = 1, iim 230 eignq(k) = eignq(k) + matrinvs(k,i,j-jfiltsu+1)*champ(i,j,l) 231 ENDDO 232 ENDDO 233 #endif 234 #endif 235 ELSE IF ( griscal ) THEN 236 #ifdef CRAY 237 CALL MXVA( matriceus(1,1,j-jfiltsu+1), 1, iim, champ(1,j,l),1 , 238 * eignq, 1, iim, iim ) 239 #else 240 #ifdef BLAS 241 CALL SGEMV("N", iim,iim, 1.0, matriceus(1,1,j-jfiltsu+1),iim, 242 . champ(1,j,l), 1, 0.0, eignq, 1) 243 #else 244 DO k = 1, iim 245 eignq(k) = 0.0 246 ENDDO 247 DO i = 1, iim 248 DO k = 1, iim 249 eignq(k) = eignq(k) + matriceus(k,i,j-jfiltsu+1)*champ(i,j,l) 250 ENDDO 251 ENDDO 252 #endif 253 #endif 254 ELSE 255 #ifdef CRAY 256 CALL MXVA( matricevs(1,1,j-jfiltsv+1), 1, iim, champ(1,j,l),1 , 257 * eignq, 1, iim, iim ) 258 #else 259 #ifdef BLAS 260 CALL SGEMV("N", iim,iim, 1.0, matricevs(1,1,j-jfiltsv+1),iim, 261 . champ(1,j,l), 1, 0.0, eignq, 1) 262 #else 263 DO k = 1, iim 264 eignq(k) = 0.0 265 ENDDO 266 DO i = 1, iim 267 DO k = 1, iim 268 eignq(k) = eignq(k) + matricevs(k,i,j-jfiltsv+1)*champ(i,j,l) 269 ENDDO 270 ENDDO 271 #endif 272 #endif 273 ENDIF 274 275 ENDIF 276 c 277 IF( ifiltre.EQ. 2 ) THEN 278 DO 15 i = 1, iim 279 champ( i,j,l ) = ( champ(i,j,l) + eignq(i) ) * sdd2(i) 280 15 CONTINUE 281 ELSE 282 DO 16 i=1,iim 283 champ( i,j,l ) = ( champ(i,j,l) - eignq(i) ) * sdd2(i) 284 16 CONTINUE 285 ENDIF 286 c 287 champ( iip1,j,l ) = champ( 1,j,l ) 288 c 289 30 CONTINUE 290 c 291 50 CONTINUE 292 c 293 100 CONTINUE 294 c 313 295 314 1111 FORMAT(//20x,'ERREUR dans le dimensionnement du tableau CHAMP a 296 *filtrer, sur la grille des scalaires'/)315 & filtrer, sur la grille des scalaires'/) 297 316 2222 FORMAT(//20x,'ERREUR dans le dimensionnement du tableau CHAMP a fi 298 *ltrer, sur la grille de V ou de Z'/)317 & ltrer, sur la grille de V ou de Z'/) 299 318 RETURN 300 319 END -
LMDZ4/trunk/libf/filtrez/inifgn.F
r524 r1146 1 1 ! 2 ! $Header $2 ! $Header: /home/cvsroot/LMDZ4/libf/filtrez/inifgn.F,v 1.1.1.1 2004-05-19 12:53:09 lmdzadmin Exp $ 3 3 ! 4 4 SUBROUTINE inifgn(dv) -
LMDZ4/trunk/libf/filtrez/parafilt.h
r1024 r1146 3 3 ! 4 4 INTEGER nfilun, nfilus, nfilvn, nfilvs 5 6 PARAMETER (nfilun=24, nfilus=23, nfilvn=24, nfilvs=24)7 8 c9 c10 c Ici , on a exagere les nombres de lignes de latitudes a filtrer .11 c12 c La premiere fois que le Gcm rentrera dans le Filtre ,13 c14 c il indiquera les bonnes valeurs de nfilun , nflius, nfilvn et15 c16 c nfilvs a mettre . Il suffira alors de changer ces valeurs dans17 c18 c Parameter ci-dessus et de relancer le run .19 -
LMDZ4/trunk/libf/grid/dimension/makdim
r795 r1146 1 nqmx=$12 shift3 1 for i in $* ; do 4 2 list=$list.$i 5 3 done 6 fichdim=dimensions${list} .t${nqmx}4 fichdim=dimensions${list} 7 5 8 6 if [ ! -f $fichdim ] ; then … … 53 51 ! dimensions.h contient les dimensions du modele 54 52 ! ndm est tel que iim=2**ndm 55 ! nqmx est la dimension de la variable traceur q56 53 !----------------------------------------------------------------------- 57 54 … … 59 56 60 57 PARAMETER (iim= $im,jjm=$jm,llm=$lm,ndm=$ndm) 61 62 integer nqmx63 parameter (nqmx=$nqmx)64 58 65 59 !----------------------------------------------------------------------- -
LMDZ4/trunk/libf/phylmd/calcul_STDlev.h
r684 r1146 56 56 cIM on interpole sur les niveaux STD de pression a chaque pas de temps de la physique 57 57 c 58 DO k=1, nlevSTD 59 c 60 CALL plevel(klon,klev,.true.,pplay,rlevSTD(k), 61 . t_seri,tlevSTD(:,k)) 62 CALL plevel(klon,klev,.true.,pplay,rlevSTD(k), 63 . u_seri,ulevSTD(:,k)) 64 CALL plevel(klon,klev,.true.,pplay,rlevSTD(k), 65 . v_seri,vlevSTD(:,k)) 66 c 58 c-------------------------------------------------------c 59 c positionnement de l'argument logique a .false. c 60 c pour ne pas recalculer deux fois la meme chose ! c 61 c a cet effet un appel a plevel_new a ete deplace c 62 c a la fin de la serie d'appels c 63 c la boucle 'DO k=1, nlevSTD' a ete internalisee c 64 c dans plevel_new, d'ou la creation de cette routine... c 65 c-------------------------------------------------------c 66 c 67 CALL plevel_new(klon,klev,nlevSTD,.true.,pplay,rlevSTD, 68 & t_seri,tlevSTD) 69 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 70 & u_seri,ulevSTD) 71 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 72 & v_seri,vlevSTD) 73 c 74 75 c 76 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 77 & zphi/RG,philevSTD) 78 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 79 & qx(:,:,ivap),qlevSTD) 80 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 81 & zx_rh*100.,rhlevSTD) 82 c 83 DO l=1, klev 84 DO i=1, klon 85 zx_tmp_fi3d(i,l)=u_seri(i,l)*v_seri(i,l) 86 ENDDO !i 87 ENDDO !l 88 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 89 & zx_tmp_fi3d,uvSTD) 90 c 91 DO l=1, klev 92 DO i=1, klon 93 zx_tmp_fi3d(i,l)=v_seri(i,l)*q_seri(i,l) 94 ENDDO !i 95 ENDDO !l 96 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 97 & zx_tmp_fi3d,vqSTD) 98 c 99 DO l=1, klev 100 DO i=1, klon 101 zx_tmp_fi3d(i,l)=v_seri(i,l)*t_seri(i,l) 102 ENDDO !i 103 ENDDO !l 104 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 105 & zx_tmp_fi3d,vTSTD) 106 c 107 DO l=1, klev 108 DO i=1, klon 109 zx_tmp_fi3d(i,l)=omega(i,l)*qx(i,l,ivap) 110 ENDDO !i 111 ENDDO !l 112 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 113 & zx_tmp_fi3d,wqSTD) 114 c 115 DO l=1, klev 116 DO i=1, klon 117 zx_tmp_fi3d(i,l)=v_seri(i,l)*zphi(i,l)/RG 118 ENDDO !i 119 ENDDO !l 120 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 121 & zx_tmp_fi3d,vphiSTD) 122 c 123 DO l=1, klev 124 DO i=1, klon 125 zx_tmp_fi3d(i,l)=omega(i,l)*t_seri(i,l) 126 ENDDO !i 127 ENDDO !l 128 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 129 & zx_tmp_fi3d,wTSTD) 130 c 131 DO l=1, klev 132 DO i=1, klon 133 zx_tmp_fi3d(i,l)=u_seri(i,l)*u_seri(i,l) 134 ENDDO !i 135 ENDDO !l 136 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 137 & zx_tmp_fi3d,u2STD) 138 c 139 DO l=1, klev 140 DO i=1, klon 141 zx_tmp_fi3d(i,l)=v_seri(i,l)*v_seri(i,l) 142 ENDDO !i 143 ENDDO !l 144 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 145 & zx_tmp_fi3d,v2STD) 146 c 147 DO l=1, klev 148 DO i=1, klon 149 zx_tmp_fi3d(i,l)=t_seri(i,l)*t_seri(i,l) 150 ENDDO !i 151 ENDDO !l 152 CALL plevel_new(klon,klev,nlevSTD,.false.,pplay,rlevSTD, 153 & zx_tmp_fi3d,T2STD) 154 155 67 156 DO l=1, klev 68 157 DO i=1, klon … … 70 159 ENDDO !i 71 160 ENDDO !l 72 CALL plevel(klon,klev,.true.,zx_tmp_fi3d,rlevSTD(k), 73 . omega,wlevSTD(:,k)) 74 c 75 CALL plevel(klon,klev,.true.,pplay,rlevSTD(k), 76 . zphi/RG,philevSTD(:,k)) 77 CALL plevel(klon,klev,.true.,pplay,rlevSTD(k), 78 . qx(:,:,ivap),qlevSTD(:,k)) 79 CALL plevel(klon,klev,.true.,pplay,rlevSTD(k), 80 . zx_rh*100.,rhlevSTD(:,k)) 81 c 82 DO l=1, klev 83 DO i=1, klon 84 zx_tmp_fi3d(i,l)=u_seri(i,l)*v_seri(i,l) 85 ENDDO !i 86 ENDDO !l 87 CALL plevel(klon,klev,.true.,pplay,rlevSTD(k), 88 . zx_tmp_fi3d,uvSTD(:,k)) 89 c 90 DO l=1, klev 91 DO i=1, klon 92 zx_tmp_fi3d(i,l)=v_seri(i,l)*q_seri(i,l) 93 ENDDO !i 94 ENDDO !l 95 CALL plevel(klon,klev,.true.,pplay,rlevSTD(k), 96 . zx_tmp_fi3d,vqSTD(:,k)) 97 c 98 DO l=1, klev 99 DO i=1, klon 100 zx_tmp_fi3d(i,l)=v_seri(i,l)*t_seri(i,l) 101 ENDDO !i 102 ENDDO !l 103 CALL plevel(klon,klev,.true.,pplay,rlevSTD(k), 104 . zx_tmp_fi3d,vTSTD(:,k)) 105 c 106 DO l=1, klev 107 DO i=1, klon 108 zx_tmp_fi3d(i,l)=omega(i,l)*qx(i,l,ivap) 109 ENDDO !i 110 ENDDO !l 111 CALL plevel(klon,klev,.true.,pplay,rlevSTD(k), 112 . zx_tmp_fi3d,wqSTD(:,k)) 113 c 114 DO l=1, klev 115 DO i=1, klon 116 zx_tmp_fi3d(i,l)=v_seri(i,l)*zphi(i,l)/RG 117 ENDDO !i 118 ENDDO !l 119 CALL plevel(klon,klev,.true.,pplay,rlevSTD(k), 120 . zx_tmp_fi3d,vphiSTD(:,k)) 121 c 122 DO l=1, klev 123 DO i=1, klon 124 zx_tmp_fi3d(i,l)=omega(i,l)*t_seri(i,l) 125 ENDDO !i 126 ENDDO !l 127 CALL plevel(klon,klev,.true.,pplay,rlevSTD(k), 128 . zx_tmp_fi3d,wTSTD(:,k)) 129 c 130 DO l=1, klev 131 DO i=1, klon 132 zx_tmp_fi3d(i,l)=u_seri(i,l)*u_seri(i,l) 133 ENDDO !i 134 ENDDO !l 135 CALL plevel(klon,klev,.true.,pplay,rlevSTD(k), 136 . zx_tmp_fi3d,u2STD(:,k)) 137 c 138 DO l=1, klev 139 DO i=1, klon 140 zx_tmp_fi3d(i,l)=v_seri(i,l)*v_seri(i,l) 141 ENDDO !i 142 ENDDO !l 143 CALL plevel(klon,klev,.true.,pplay,rlevSTD(k), 144 . zx_tmp_fi3d,v2STD(:,k)) 145 c 146 DO l=1, klev 147 DO i=1, klon 148 zx_tmp_fi3d(i,l)=t_seri(i,l)*t_seri(i,l) 149 ENDDO !i 150 ENDDO !l 151 CALL plevel(klon,klev,.true.,pplay,rlevSTD(k), 152 . zx_tmp_fi3d,T2STD(:,k)) 153 c 154 ENDDO !k=1,nlevSTD 161 CALL plevel_new(klon,klev,nlevSTD,.true.,zx_tmp_fi3d,rlevSTD, 162 & omega,wlevSTD) 163 155 164 c 156 165 cIM on somme les valeurs definies a chaque pas de temps de la physique ou -
LMDZ4/trunk/libf/phylmd/calltherm.F90
r1026 r1146 16 16 #include "thermcell.h" 17 17 #include "iniprint.h" 18 19 ! A inclure eventuellement dans les fichiers de configuration20 data r_aspect_thermals,l_mix_thermals/2.,30./21 data w2di_thermals/1/22 18 23 19 !IM 140508 … … 126 122 do k=1,klev 127 123 do i=1,klon 128 logexpr2(i,k)=.not.q_seri(i,k).ge.0. 124 ! Attention teste abderr 19-03-09 125 ! logexpr2(i,k)=.not.q_seri(i,k).ge.0. 126 logexpr2(i,k)=.not.q_seri(i,k).ge.1.e-15 129 127 if (logexpr2(i,k)) then 130 128 q_seri(i,k)=1.e-15 … … 174 172 & ,tau_thermals,3) 175 173 else if (iflag_thermals.eq.11) then 176 stop 'cas non prevu dans calltherm'174 stop 'cas non prevu dans calltherm' 177 175 ! CALL thermcell_pluie(klon,klev,zdt & 178 176 ! & ,pplay,paprs,pphi,zlev & -
LMDZ4/trunk/libf/phylmd/clesphys.h
r1067 r1146 40 40 INTEGER lev_histhf, lev_histday, lev_histmth 41 41 CHARACTER*4 type_run 42 ! aer_type: pour utiliser un fichier constant dans readsulfate 43 CHARACTER*8 :: aer_type 42 44 LOGICAL ok_isccp, ok_regdyn 43 45 REAL lonmin_ins, lonmax_ins, latmin_ins, latmax_ins … … 62 64 & , ecrit_mth, ecrit_tra, ecrit_reg & 63 65 & , freq_ISCCP, ecrit_ISCCP, ip_ebil_phy & 64 & , ok_lic_melt, cvl_corr 66 & , ok_lic_melt, cvl_corr, aer_type & 65 67 & , qsol0, iflag_rrtm, ok_strato,ok_hines,ecrit_LES 66 68 -
LMDZ4/trunk/libf/phylmd/concvl.F
r987 r1146 5 5 SUBROUTINE concvl (iflag_con,iflag_clos, 6 6 . dtime,paprs,pplay, 7 . t,q,t_wake,q_wake, u,v,tra,ntra,7 . t,q,t_wake,q_wake,s_wake,u,v,tra,ntra, 8 8 . ALE,ALP,work1,work2, 9 9 . d_t,d_q,d_u,d_v,d_tra, … … 25 25 c 26 26 USE dimphy 27 USE infotrac, ONLY : nbtr 27 28 IMPLICIT none 28 29 c====================================================================== … … 67 68 c 68 69 #include "dimensions.h" 69 cccccc#include "dimphy.h"70 c71 integer NTRAC72 PARAMETER (NTRAC=nqmx-2)73 70 c 74 71 INTEGER iflag_con,iflag_clos … … 77 74 REAL t(klon,klev),q(klon,klev),u(klon,klev),v(klon,klev) 78 75 REAL t_wake(klon,klev),q_wake(klon,klev) 79 REAL tra(klon,klev,ntrac) 76 Real s_wake(klon) 77 REAL tra(klon,klev,nbtr) 80 78 INTEGER ntra 81 79 REAL work1(klon,klev),work2(klon,klev),ptop2(klon) … … 85 83 REAL d_t(klon,klev),d_q(klon,klev),d_u(klon,klev),d_v(klon,klev) 86 84 REAL dd_t(klon,klev),dd_q(klon,klev) 87 REAL d_tra(klon,klev,n trac)85 REAL d_tra(klon,klev,nbtr) 88 86 REAL rain(klon),snow(klon) 89 87 c … … 349 347 CALL cva_driver(klon,klev,klev+1,ntra,nloc, 350 348 $ iflag_con,iflag_mix,iflag_clos,dtime, 351 : t,q,qs,t_wake,q_wake,qs_wake, u,v,tra,349 : t,q,qs,t_wake,q_wake,qs_wake,s_wake,u,v,tra, 352 350 $ em_p,em_ph, 353 351 . ALE,ALP, -
LMDZ4/trunk/libf/phylmd/conema3.F
r766 r1146 10 10 11 11 USE dimphy 12 USE infotrac, ONLY : nbtr 12 13 IMPLICIT none 13 14 c====================================================================== … … 55 56 c 56 57 #include "dimensions.h" 57 cym#include "dimphy.h"58 58 #include "conema3.h" 59 59 INTEGER i, l,m,itra 60 INTEGER ntra ,ntrac !number of tracers;if no tracer transport60 INTEGER ntra ! if no tracer transport 61 61 ! is needed, set ntra = 1 (or 0) 62 PARAMETER (ntrac=nqmx-2)63 62 REAL dtime 64 63 c … … 97 96 REAL,ALLOCATABLE,SAVE :: em_qs(:) 98 97 c$OMP THREADPRIVATE(em_qs) 99 cym REAL em_u(klev), em_v(klev), em_tra(klev,n trac)98 cym REAL em_u(klev), em_v(klev), em_tra(klev,nbtr) 100 99 REAL,ALLOCATABLE,SAVE :: em_u(:),em_v(:),em_tra(:,:) 101 100 c$OMP THREADPRIVATE(em_u,em_v,em_tra) … … 111 110 REAL,ALLOCATABLE,SAVE :: em_d_t(:),em_d_q(:) 112 111 c$OMP THREADPRIVATE(em_d_t,em_d_q) 113 cym REAL em_d_u(klev), em_d_v(klev), em_d_tra(klev,n trac)112 cym REAL em_d_u(klev), em_d_v(klev), em_d_tra(klev,nbtr) 114 113 REAL,ALLOCATABLE,SAVE ::em_d_u(:),em_d_v(:),em_d_tra(:,:) 115 114 c$OMP THREADPRIVATE(em_d_u,em_d_v,em_d_tra) … … 188 187 allocate(em_q(klev)) 189 188 allocate(em_qs(klev)) 190 allocate(em_u(klev), em_v(klev), em_tra(klev,n trac))189 allocate(em_u(klev), em_v(klev), em_tra(klev,nbtr)) 191 190 allocate(em_ph(klev+1), em_p(klev)) 192 191 allocate(em_work1(klev), em_work2(klev)) 193 192 allocate(em_d_t(klev), em_d_q(klev)) 194 allocate(em_d_u(klev), em_d_v(klev), em_d_tra(klev,n trac))193 allocate(em_d_u(klev), em_d_v(klev), em_d_tra(klev,nbtr)) 195 194 allocate(em_upwd(klev), em_dnwd(klev), em_dnwdbis(klev)) 196 195 allocate(emmip(klev)) -
LMDZ4/trunk/libf/phylmd/conemav.F
r766 r1146 10 10 c 11 11 USE dimphy 12 USE infotrac, ONLY : nbtr 12 13 IMPLICIT none 13 14 c====================================================================== … … 44 45 c 45 46 #include "dimensions.h" 46 cym#include "dimphy.h"47 47 c 48 integer NTRAC49 PARAMETER (NTRAC=nqmx-2)50 48 c 51 49 REAL dtime, paprs(klon,klev+1),pplay(klon,klev) 52 50 REAL t(klon,klev),q(klon,klev),u(klon,klev),v(klon,klev) 53 REAL tra(klon,klev,n trac)51 REAL tra(klon,klev,nbtr) 54 52 INTEGER ntra 55 53 REAL work1(klon,klev),work2(klon,klev) 56 54 c 57 55 REAL d_t(klon,klev),d_q(klon,klev),d_u(klon,klev),d_v(klon,klev) 58 REAL d_tra(klon,klev,n trac)56 REAL d_tra(klon,klev,nbtr) 59 57 REAL rain(klon),snow(klon) 60 58 c … … 74 72 INTEGER i,k,itra 75 73 REAL qs(klon,klev) 76 cym REAL cbmf(klon)77 cym SAVE cbmf78 74 REAL,ALLOCATABLE,SAVE :: cbmf(:) 79 75 c$OMP THREADPRIVATE(cbmf) -
LMDZ4/trunk/libf/phylmd/conf_phys.F90
r1054 r1146 66 66 67 67 character (len = 6),SAVE :: type_ocean_omp, version_ocean_omp, ocean_omp 68 CHARACTER(len = 8),SAVE :: aer_type_omp 68 69 logical,SAVE :: ok_veget_omp, ok_newmicro_omp 69 70 logical,SAVE :: ok_journe_omp, ok_mensuel_omp, ok_instan_omp, ok_hf_omp … … 238 239 CALL getin('aerosol_couple',aerosol_couple_omp) 239 240 241 ! 242 !Config Key = aer_type 243 !Config Desc = Use a constant field for the aerosols 244 !Config Def = scenario 245 !Config Help = Used in readsulfate.F 246 ! 247 aer_type_omp = 'scenario' 248 call getin('aer_type', aer_type_omp) 249 240 250 ! 241 251 !Config Key = bl95_b0 … … 462 472 !Config Help = Connais pas ! 463 473 ok_orolf_omp = .TRUE. 464 CALL getin('ok_orolf _omp', ok_orolf_omp)474 CALL getin('ok_orolf', ok_orolf_omp) 465 475 466 476 !Config Key = ok_limitvrai … … 1256 1266 ok_aie = ok_aie_omp 1257 1267 aerosol_couple = aerosol_couple_omp 1268 aer_type = aer_type_omp 1258 1269 bl95_b0 = bl95_b0_omp 1259 1270 bl95_b1 = bl95_b1_omp … … 1310 1321 END IF 1311 1322 1312 IF (type_ocean=='slab' .AND. version_ocean /='xxxxxx') THEN1323 IF (type_ocean=='slab' .AND. version_ocean=='xxxxxx') THEN 1313 1324 version_ocean='sicOBS' 1314 1325 ELSE IF (type_ocean=='slab' .AND. version_ocean/='sicOBS') THEN … … 1385 1396 write(numout,*)' ok_aie = ',ok_aie 1386 1397 write(numout,*)' aerosol_couple = ', aerosol_couple 1398 write(numout,*)' aer_type = ',aer_type 1387 1399 write(numout,*)' bl95_b0 = ',bl95_b0 1388 1400 write(numout,*)' bl95_b1 = ',bl95_b1 … … 1394 1406 write(numout,*)' iflag_thermals_ed = ', iflag_thermals_ed 1395 1407 write(numout,*)' iflag_thermals_optflux = ', iflag_thermals_optflux 1408 write(numout,*)' iflag_clos = ', iflag_clos 1396 1409 write(numout,*)' type_run = ',type_run 1397 1410 write(numout,*)' ok_isccp = ',ok_isccp -
LMDZ4/trunk/libf/phylmd/convect3.F
r766 r1146 19 19 c################################################################# 20 20 USE dimphy 21 USE infotrac, ONLY : NBTR 21 22 22 23 #include "dimensions.h" 23 cym#include "dimphy.h" 24 INTEGER NA 24 25 PARAMETER (NA=60) 25 26 26 integer NTRAC27 PARAMETER (NTRAC=nqmx-2)28 27 REAL DELTAC ! cld 29 28 PARAMETER (DELTAC=0.01) ! cld 30 29 31 30 INTEGER NENT(NA) 31 INTEGER ND, NDP1, NL, NTRA, IFLAG, icb, inb 32 REAL DTIME, EPMAX, DELT, PRECIP, CAPE 33 REAL DPLCLDT, DPLCLDR 32 34 REAL T1(ND),R1(ND),RS(ND),U(ND),V(ND),TRA(ND,NTRA) 33 35 REAL P(ND),PH(NDP1) 34 36 REAL FT(ND),FR(ND),FU(ND),FV(ND),FTRA(ND,NTRA) 35 37 REAL SIG(ND),W0(ND) 36 REAL UENT(NA,NA),VENT(NA,NA),TRAENT(NA,NA,N TRAC),TRATM(NA)37 REAL UP(NA),VP(NA),TRAP(NA,N TRAC)38 REAL UENT(NA,NA),VENT(NA,NA),TRAENT(NA,NA,NBTR),TRATM(NA) 39 REAL UP(NA),VP(NA),TRAP(NA,NBTR) 38 40 REAL M(NA),MP(NA),MENT(NA,NA),QENT(NA,NA),ELIJ(NA,NA) 39 41 REAL SIJ(NA,NA),TVP(NA),TV(NA),WATER(NA) -
LMDZ4/trunk/libf/phylmd/cpl_mod.F90
r1067 r1146 278 278 USE surface_data 279 279 USE phys_state_var_mod, ONLY : rlon, rlat 280 USE Write_Field281 280 282 281 INCLUDE "indicesol.h" … … 338 337 ! Save each field in a 2D array. 339 338 !$OMP MASTER 340 IF (version_ocean=='nemo') THEN 341 read_sst(:,:) = tab_read_flds(:,:,1) ! Sea surface temperature 342 read_sic(:,:) = tab_read_flds(:,:,2) ! Sea ice concentration 343 read_sit(:,:) = tab_read_flds(:,:,3) ! Sea ice temperature 344 read_alb_sic(:,:) = tab_read_flds(:,:,4) ! Albedo at sea ice 345 ELSE IF (version_ocean=='opa8') THEN 346 read_sst(:,:) = tab_read_flds(:,:,1) ! Sea surface temperature (multiplicated by fraction) 347 read_sic(:,:) = tab_read_flds(:,:,2) ! Sea ice concentration 348 read_alb_sic(:,:) = tab_read_flds(:,:,3) ! Albedo at sea ice (multiplicated by fraction) 349 read_sit(:,:) = tab_read_flds(:,:,4) ! Sea ice temperature (multiplicated by fraction) 350 END IF 339 read_sst(:,:) = tab_read_flds(:,:,1) ! Sea surface temperature 340 read_sic(:,:) = tab_read_flds(:,:,2) ! Sea ice concentration 341 read_alb_sic(:,:) = tab_read_flds(:,:,3) ! Albedo at sea ice 342 read_sit(:,:) = tab_read_flds(:,:,4) ! Sea ice temperature 351 343 !$OMP END MASTER 352 344 … … 366 358 read_u0(:,:), read_v0(:,:), tmp_r0(:,:)) 367 359 !$OMP END MASTER 368 CALL WriteField('read_u0',read_u0) 369 CALL WriteField('read_v0',read_v0) 370 CALL WriteField('read_r0',tmp_r0) 360 371 361 ELSE 372 362 read_u0(:,:) = 0. … … 449 439 450 440 SUBROUTINE cpl_receive_seaice_fields(knon, knindex, & 451 tsurf_new, alb_new )441 tsurf_new, alb_new, u0_new, v0_new) 452 442 ! 453 443 ! This routine returns the fields for the seaice that have been read from the coupler … … 466 456 REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new 467 457 REAL, DIMENSION(klon), INTENT(OUT) :: alb_new 458 REAL, DIMENSION(klon), INTENT(OUT) :: u0_new 459 REAL, DIMENSION(klon), INTENT(OUT) :: v0_new 468 460 469 461 ! Local variables … … 479 471 CALL cpl2gath(read_alb_sic, alb_new, knon, knindex) 480 472 CALL cpl2gath(read_sic, sic_new, knon, knindex) 473 CALL cpl2gath(read_u0, u0_new, knon, knindex) 474 CALL cpl2gath(read_v0, v0_new, knon, knindex) 481 475 482 476 !************************************************************************************* … … 620 614 621 615 622 CALL gath2cpl(cpl_sols( 1,cpl_index), cpl_sols2D(1,1,cpl_index), &623 knon, knindex) 624 625 CALL gath2cpl(cpl_nsol( 1,cpl_index), cpl_nsol2D(1,1,cpl_index), &626 knon, knindex) 627 628 CALL gath2cpl(cpl_rain( 1,cpl_index), cpl_rain2D(1,1,cpl_index), &629 knon, knindex) 630 631 CALL gath2cpl(cpl_snow( 1,cpl_index), cpl_snow2D(1,1,cpl_index), &632 knon, knindex) 633 634 CALL gath2cpl(cpl_evap( 1,cpl_index), cpl_evap2D(1,1,cpl_index), &616 CALL gath2cpl(cpl_sols(:,cpl_index), cpl_sols2D(:,:,cpl_index), & 617 knon, knindex) 618 619 CALL gath2cpl(cpl_nsol(:,cpl_index), cpl_nsol2D(:,:,cpl_index), & 620 knon, knindex) 621 622 CALL gath2cpl(cpl_rain(:,cpl_index), cpl_rain2D(:,:,cpl_index), & 623 knon, knindex) 624 625 CALL gath2cpl(cpl_snow(:,cpl_index), cpl_snow2D(:,:,cpl_index), & 626 knon, knindex) 627 628 CALL gath2cpl(cpl_evap(:,cpl_index), cpl_evap2D(:,:,cpl_index), & 635 629 knon, knindex) 636 630 637 631 ! cpl_tsol2D(:,:,:) not used! 638 CALL gath2cpl(cpl_tsol( 1,cpl_index), cpl_tsol2D(1,1, cpl_index), &632 CALL gath2cpl(cpl_tsol(:,cpl_index), cpl_tsol2D(:,:, cpl_index), & 639 633 knon, knindex) 640 634 641 635 ! cpl_fder2D(:,:,1) not used, only cpl_fder(:,:,2)! 642 CALL gath2cpl(cpl_fder( 1,cpl_index), cpl_fder2D(1,1,cpl_index), &636 CALL gath2cpl(cpl_fder(:,cpl_index), cpl_fder2D(:,:,cpl_index), & 643 637 knon, knindex) 644 638 645 639 ! cpl_albe2D(:,:,:) not used! 646 CALL gath2cpl(cpl_albe( 1,cpl_index), cpl_albe2D(1,1,cpl_index), &647 knon, knindex) 648 649 CALL gath2cpl(cpl_taux( 1,cpl_index), cpl_taux2D(1,1,cpl_index), &650 knon, knindex) 651 652 CALL gath2cpl(cpl_tauy( 1,cpl_index), cpl_tauy2D(1,1,cpl_index), &653 knon, knindex) 654 655 CALL gath2cpl(cpl_windsp( 1,cpl_index), cpl_windsp2D(1,1), &640 CALL gath2cpl(cpl_albe(:,cpl_index), cpl_albe2D(:,:,cpl_index), & 641 knon, knindex) 642 643 CALL gath2cpl(cpl_taux(:,cpl_index), cpl_taux2D(:,:,cpl_index), & 644 knon, knindex) 645 646 CALL gath2cpl(cpl_tauy(:,cpl_index), cpl_tauy2D(:,:,cpl_index), & 647 knon, knindex) 648 649 CALL gath2cpl(cpl_windsp(:,cpl_index), cpl_windsp2D(:,:), & 656 650 knon, knindex) 657 651 … … 698 692 CHARACTER(len = 25) :: modname = 'cpl_send_seaice_fields' 699 693 CHARACTER(len = 80) :: abort_message 700 694 REAL, DIMENSION(klon) :: cpl_fder_tmp 701 695 702 696 !************************************************************************************* … … 788 782 ENDIF 789 783 790 CALL gath2cpl(cpl_sols( 1,cpl_index), cpl_sols2D(1,1,cpl_index), &791 knon, knindex) 792 793 CALL gath2cpl(cpl_nsol( 1,cpl_index), cpl_nsol2D(1,1,cpl_index), &794 knon, knindex) 795 796 CALL gath2cpl(cpl_rain( 1,cpl_index), cpl_rain2D(1,1,cpl_index), &797 knon, knindex) 798 799 CALL gath2cpl(cpl_snow( 1,cpl_index), cpl_snow2D(1,1,cpl_index), &800 knon, knindex) 801 802 CALL gath2cpl(cpl_evap( 1,cpl_index), cpl_evap2D(1,1,cpl_index), &784 CALL gath2cpl(cpl_sols(:,cpl_index), cpl_sols2D(:,:,cpl_index), & 785 knon, knindex) 786 787 CALL gath2cpl(cpl_nsol(:,cpl_index), cpl_nsol2D(:,:,cpl_index), & 788 knon, knindex) 789 790 CALL gath2cpl(cpl_rain(:,cpl_index), cpl_rain2D(:,:,cpl_index), & 791 knon, knindex) 792 793 CALL gath2cpl(cpl_snow(:,cpl_index), cpl_snow2D(:,:,cpl_index), & 794 knon, knindex) 795 796 CALL gath2cpl(cpl_evap(:,cpl_index), cpl_evap2D(:,:,cpl_index), & 803 797 knon, knindex) 804 798 805 799 ! cpl_tsol2D(:,:,:) not used! 806 CALL gath2cpl(cpl_tsol(1,cpl_index), cpl_tsol2D(1,1, cpl_index), & 807 knon, knindex) 808 809 CALL gath2cpl(cpl_fder(1,cpl_index), cpl_fder2D(1,1,cpl_index), & 810 knon, knindex) 800 CALL gath2cpl(cpl_tsol(:,cpl_index), cpl_tsol2D(:,:, cpl_index), & 801 knon, knindex) 802 803 ! Set default value and decompress before gath2cpl 804 cpl_fder_tmp(:) = -20. 805 DO ig = 1, knon 806 cpl_fder_tmp(knindex(ig))=cpl_fder(ig,cpl_index) 807 END DO 808 CALL gath2cpl(cpl_fder_tmp(:), cpl_fder2D(:,:,cpl_index), & 809 klon, unity) 811 810 812 811 ! cpl_albe2D(:,:,:) not used! 813 CALL gath2cpl(cpl_albe( 1,cpl_index), cpl_albe2D(1,1,cpl_index), &814 knon, knindex) 815 816 CALL gath2cpl(cpl_taux( 1,cpl_index), cpl_taux2D(1,1,cpl_index), &817 knon, knindex) 818 819 CALL gath2cpl(cpl_tauy( 1,cpl_index), cpl_tauy2D(1,1,cpl_index), &812 CALL gath2cpl(cpl_albe(:,cpl_index), cpl_albe2D(:,:,cpl_index), & 813 knon, knindex) 814 815 CALL gath2cpl(cpl_taux(:,cpl_index), cpl_taux2D(:,:,cpl_index), & 816 knon, knindex) 817 818 CALL gath2cpl(cpl_tauy(:,cpl_index), cpl_tauy2D(:,:,cpl_index), & 820 819 knon, knindex) 821 820 … … 995 994 !************************************************************************************* 996 995 ! All fields are stored in a table tab_flds(:,:,:) 997 ! First store the fields 7 to 18which are already on the right format996 ! First store the fields which are already on the right format 998 997 ! 999 998 !************************************************************************************* 1000 999 !$OMP MASTER 1000 tab_flds(:,:,7) = cpl_windsp2D(:,:) 1001 tab_flds(:,:,8) = cpl_sols2D(:,:,2) 1002 tab_flds(:,:,10) = cpl_nsol2D(:,:,2) 1003 tab_flds(:,:,12) = cpl_fder2D(:,:,2) 1004 1001 1005 IF (version_ocean=='nemo') THEN 1002 tab_flds(:,:,7) = cpl_windsp2D(:,:) 1003 tab_flds(:,:,14) = cpl_sols2D(:,:,2) 1004 tab_flds(:,:,12) = cpl_sols2D(:,:,1) 1005 tab_flds(:,:,15) = cpl_nsol2D(:,:,2) 1006 tab_flds(:,:,13) = cpl_nsol2D(:,:,1) 1007 tab_flds(:,:,16) = cpl_fder2D(:,:,2) 1008 tab_flds(:,:,11) = cpl_evap2D(:,:,2) 1009 tab_flds(:,:,18) = cpl_rriv2D(:,:) 1010 tab_flds(:,:,19) = cpl_rcoa2D(:,:) 1006 tab_flds(:,:,18) = cpl_rriv2D(:,:) + cpl_rcoa2D(:,:) 1011 1007 ELSE IF (version_ocean=='opa8') THEN 1012 tab_flds(:,:,7) = cpl_windsp2D(:,:)1013 tab_flds(:,:,8) = cpl_sols2D(:,:,2)1014 1008 tab_flds(:,:,9) = cpl_sols2D(:,:,1) 1015 tab_flds(:,:,10) = cpl_nsol2D(:,:,2)1016 1009 tab_flds(:,:,11) = cpl_nsol2D(:,:,1) 1017 tab_flds(:,:,12) = cpl_fder2D(:,:,2)1018 1010 tab_flds(:,:,13) = cpl_evap2D(:,:,2) 1019 1011 tab_flds(:,:,14) = cpl_evap2D(:,:,1) … … 1021 1013 tab_flds(:,:,18) = cpl_rriv2D(:,:) 1022 1014 END IF 1023 1015 1024 1016 !************************************************************************************* 1025 1017 ! Transform the fraction of sub-surfaces from 1D to 2D array … … 1081 1073 ! fractions of ocean and seaice. 1082 1074 ! 1083 ! Store the fields for rain and snow directly in tab_flds(:,:,15) and1084 ! tab_flds(:,:,16) respectively.1085 !1086 1075 !************************************************************************************* 1087 1076 ! fraction oce+seaice … … 1089 1078 1090 1079 IF (version_ocean=='nemo') THEN 1091 tab_flds(:,:,10) = 0.0 1080 tab_flds(:,:,9) = 0.0 1081 tab_flds(:,:,11) = 0.0 1082 tab_flds(:,:,13) = 0.0 1083 tab_flds(:,:,14) = 0.0 1084 tab_flds(:,:,15) = 0.0 1085 1092 1086 tmp_taux(:,:) = 0.0 1093 1087 tmp_tauy(:,:) = 0.0 1094 1088 ! For all valid grid cells containing some fraction of ocean or sea-ice 1095 1089 WHERE ( deno(:,:) /= 0 ) 1096 tab_flds(:,:,10) = cpl_snow2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) + &1097 cpl_snow2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:)1098 1099 1090 tmp_taux = cpl_taux2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) + & 1100 1091 cpl_taux2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:) 1101 1092 tmp_tauy = cpl_tauy2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) + & 1102 1093 cpl_tauy2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:) 1103 ENDWHERE 1104 tab_flds(:,:,8) = (cpl_evap2D(:,:,1) - ( cpl_rain2D(:,:,1) + cpl_snow2D(:,:,1))) 1105 tab_flds(:,:,9) = (cpl_evap2D(:,:,2) - ( cpl_rain2D(:,:,2) + cpl_snow2D(:,:,2))) 1094 1095 tab_flds(:,:,9) = cpl_sols2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) + & 1096 cpl_sols2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:) 1097 tab_flds(:,:,11) = cpl_nsol2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) + & 1098 cpl_nsol2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:) 1099 tab_flds(:,:,13) = cpl_rain2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) + & 1100 cpl_rain2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:) 1101 tab_flds(:,:,14) = cpl_snow2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) + & 1102 cpl_snow2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:) 1103 tab_flds(:,:,15) = cpl_evap2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) + & 1104 cpl_evap2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:) 1105 ENDWHERE 1106 1107 tab_flds(:,:,16) = cpl_evap2D(:,:,2) 1106 1108 1107 1109 ELSE IF (version_ocean=='opa8') THEN 1110 ! Store fields for rain and snow in tab_flds(:,:,15) and tab_flds(:,:,16) 1108 1111 tab_flds(:,:,15) = 0.0 1109 1112 tab_flds(:,:,16) = 0.0 -
LMDZ4/trunk/libf/phylmd/cv3_cine.F
r879 r1146 33 33 integer ifst(nloc),isublcl(nloc) 34 34 logical lswitch(nloc),lswitch1(nloc),lswitch2(nloc) 35 logical exist_lfc(nloc) 36 real plfc(nloc) 35 37 real dpmax 36 38 real deltap,dcin 37 39 real buoylcl(nloc),tvplcl(nloc),tvlcl(nloc) 38 real p lfc(nloc),p0(nloc)40 real p0(nloc) 39 41 real buoyz(nloc), buoy(nloc,nd) 40 42 c … … 50 52 c Recompute buoyancies 51 53 c-------------------------------------------------------------- 52 DO k = 1,n l54 DO k = 1,nd 53 55 DO il = 1,ncum 56 ! print*,'tvp tv=',tvp(il,k),tv(il,k) 54 57 buoy(il,k) = tvp(il,k) - tv(il,k) 55 58 ENDDO 56 59 ENDDO 57 c58 c---------------------------------------------------------------59 c premiere couche contenant un niveau de flotabilite positive60 c et premiere couche contenant un niveau de flotabilite negative61 c au dessus du niveau de condensation62 c---------------------------------------------------------------63 do il = 1,ncum64 itop(il) =nl-165 ineg(il) = nl-166 enddo67 do 100 k=nl,1,-168 do 110 il=1,ncum69 if (k .ge. icb(il)) then70 if (buoy(il,k) .gt. 0.) then71 itop(il)=k72 else73 ineg(il)=k74 endif75 endif76 110 continue77 100 continue78 c print *,' itop, ineg, icb ',itop(1),ineg(1), icb(1)79 c80 60 c--------------------------------------------------------------- 81 61 c … … 109 89 c 110 90 c--------------------------------------------------------------- 91 c premiere couche contenant un niveau de flotabilite positive 92 c et premiere couche contenant un niveau de flotabilite negative 93 c au dessus du niveau de condensation 94 c--------------------------------------------------------------- 95 do il = 1,ncum 96 itop(il) =nl-1 97 ineg(il) = nl-1 98 exist_lfc(il) = .FALSE. 99 enddo 100 do 100 k=nl-1,1,-1 101 do 110 il=1,ncum 102 if (k .ge. ifst(il)) then 103 if (buoy(il,k) .gt. 0.) then 104 itop(il)=k 105 exist_lfc(il) = .TRUE. 106 else 107 ineg(il)=k 108 endif 109 endif 110 110 continue 111 100 continue 112 c 113 c--------------------------------------------------------------- 114 c When there is no positive buoyancy level, set Plfc, Cina and Cinb 115 c to arbitrary extreme values. 116 c--------------------------------------------------------------- 117 DO il = 1,ncum 118 IF (.NOT.exist_lfc(il)) THEN 119 Plfc(il) = 1.111 120 Cinb(il) = -1111. 121 Cina(il) = -1112. 122 ENDIF 123 ENDDO 124 c 125 c 126 c--------------------------------------------------------------- 111 127 c -- Two cases : BUOYlcl >= 0 and BUOYlcl < 0. 112 128 c--------------------------------------------------------------- … … 118 134 DPMAX = 50. 119 135 DO il = 1,ncum 120 lswitch1(il)=BUOYlcl(il) .GE. 0. 136 lswitch1(il)=BUOYlcl(il) .GE. 0. .AND. exist_lfc(il) 121 137 lswitch(il) = lswitch1(il) 122 138 ENDDO … … 233 249 C 234 250 DO il = 1,ncum 235 lswitch1(il)=BUOYlcl(il) .LT. 0. 251 lswitch1(il)=BUOYlcl(il) .LT. 0. .AND. exist_lfc(il) 236 252 lswitch(il) = lswitch1(il) 237 253 ENDDO … … 239 255 c 2.0.1 Premiere couche ou la flotabilite est negative au dessus du sol 240 256 c ---------------------------------------------------- 241 c au cas ou ilexiste sinon ilow=1 (nk apres)257 c au cas ou elle existe sinon ilow=1 (nk apres) 242 258 c on suppose que la parcelle part de la premiere couche 243 259 c … … 248 264 ENDDO 249 265 c 250 do 200 i=nl,1,-1266 do 200 k=nl,1,-1 251 267 DO il = 1,ncum 252 268 IF (lswitch(il) .AND. k .LE.icb(il)-1) THEN … … 292 308 dcin = RD*(BUOYz(il)+BUOYlcl(il))*deltap/(P0(il)+Plcl(il)) 293 309 CINB(il) = min(0.,dcin) 294 cc print *,'buoyz(il),buoylcl(il),deltap,p0(il),plcl(il),dcin ', 295 cc $ buoyz(il),buoylcl(il),deltap,p0(il),plcl(il),dcin 296 ENDIF 297 ENDDO 298 c print*, 'CINB ',CINB(1),'DCIN ',DCIN,I,BUOYz(1),BUOYlcl(1) 310 ENDIF 311 ENDDO 299 312 c 300 313 DO il = 1,ncum … … 316 329 ENDDO 317 330 c 318 IF (lswitch(1)) THEN319 c print*,'ilow= ',ilow(1),'DCIN0 ',DCIN,P0(1),P(1,ilow(1))320 c print*,'buoy',(BUOY(1,k),k=1,itop(1))321 ENDIF322 331 c 323 332 C Middle part of CINB : integral from P(ilow) to P(isublcl) … … 332 341 ENDIF 333 342 ENDDO 334 c print*, 'CINB ', CINB(1), 'DCIN',DCIN,k,BUOY(1,k),BUOY(1,k+1)335 343 ENDDO 336 344 c … … 345 353 ENDDO 346 354 C 347 c print*, ' CINB ', CINB(1), 'Dcin ',dcin348 355 c 349 356 cc ENDIF … … 439 446 ENDDO 440 447 cc ENDIF 441 c Print *,' Plcl,P(itop-1),P(itop),PLFC,BUOYlcl'442 c $ ,Plcl(1),P(1,itop(1)-1),P(1,itop(1)),PLFC(1),BUOYlcl(1)443 C444 c print*, 'CIN above', CINA(1), 'CIN below',CINB(1)445 448 c 446 449 -
LMDZ4/trunk/libf/phylmd/cv3_inip.F
r987 r1146 89 89 aire=aire+(Qmix(ff+df) - Qmix(ff)) * (1.-ff) 90 90 mu = mu + pdf * ff * df 91 write(*,*) pdf, Qmix(ff), aire, ff 91 IF(prt_level>9)WRITE(lunout,*) & 92 & pdf, Qmix(ff), aire, ff 92 93 ff=ff+df 93 94 enddo -
LMDZ4/trunk/libf/phylmd/cv3_routines.F
r1044 r1146 1 1 ! 2 ! $Header $2 ! $Header: /home/cvsroot/LMDZ4/libf/phylmd/cv3_routines.F,v 1.16 2008-11-06 16:29:35 lmdzadmin Exp $ 3 3 ! 4 4 c … … 120 120 121 121 c ori do 110 k=1,nlp 122 do 110 k=1,nl ! convect3 122 ! abderr do 110 k=1,nl ! convect3 123 do 110 k=1,nlp 124 123 125 do 100 i=1,len 124 126 cdebug lv(i,k)= lv0-clmcpv*(t(i,k)-t0) … … 2256 2258 SUBROUTINE cv3_yield(nloc,ncum,nd,na,ntra 2257 2259 : ,icb,inb,delt 2258 : ,t,rr,t_wake,rr_wake, u,v,tra2260 : ,t,rr,t_wake,rr_wake,s_wake,u,v,tra 2259 2261 : ,gz,p,ph,h,hp,lv,cpn,th,th_wake 2260 2262 : ,ep,clw,m,tp,mp,rp,up,vp,trap … … 2283 2285 real t(nloc,nd), rr(nloc,nd), u(nloc,nd), v(nloc,nd) 2284 2286 real t_wake(nloc,nd), rr_wake(nloc,nd) 2287 real s_wake(nloc) 2285 2288 real tra(nloc,nd,ntra), sig(nloc,nd) 2286 2289 real gz(nloc,na), ph(nloc,nd+1), h(nloc,na), hp(nloc,na) … … 2327 2330 real esum(nloc), fsum(nloc), gsum(nloc), hsum(nloc) 2328 2331 real th_wake(nloc,nd) 2332 real alpha_qpos(nloc) 2329 2333 real qcond(nloc,nd), nqcond(nloc,nd), wa(nloc,nd) ! cld 2330 2334 real siga(nloc,nd), sax(nloc,nd), mac(nloc,nd) ! cld … … 2961 2965 c *** integrated enthalpy and water tendencies *** 2962 2966 c 2967 c Correction bug le 18-03-09 2963 2968 do 503 il=1,ncum 2964 2969 IF (iflag(il) .le. 1) THEN 2965 ax=0.1*ment(il,inb(il),inb(il))*(hp(il,inb(il))-h(il,inb(il)) 2966 : +t(il,inb(il))*(cpv-cpd) 2970 if (cvflag_grav) then 2971 ax=0.01*grav*ment(il,inb(il),inb(il))*(hp(il,inb(il)) 2972 : -h(il,inb(il))+t(il,inb(il))*(cpv-cpd) 2967 2973 : *(rr(il,inb(il))-qent(il,inb(il),inb(il)))) 2968 2974 : /(cpn(il,inb(il))*(ph(il,inb(il))-ph(il,inb(il)+1))) … … 2972 2978 : *(ph(il,inb(il)-1)-ph(il,inb(il)))) 2973 2979 2980 bx=0.01*grav*ment(il,inb(il),inb(il))*(qent(il,inb(il),inb(il)) 2981 : -rr(il,inb(il)))/(ph(il,inb(il))-ph(il,inb(il)+1)) 2982 fr(il,inb(il))=fr(il,inb(il))-bx 2983 fr(il,inb(il)-1)=fr(il,inb(il)-1) 2984 : +bx*(ph(il,inb(il))-ph(il,inb(il)+1)) 2985 : /(ph(il,inb(il)-1)-ph(il,inb(il))) 2986 2987 cx=0.01*grav*ment(il,inb(il),inb(il))*(uent(il,inb(il),inb(il)) 2988 : -u(il,inb(il)))/(ph(il,inb(il))-ph(il,inb(il)+1)) 2989 fu(il,inb(il))=fu(il,inb(il))-cx 2990 fu(il,inb(il)-1)=fu(il,inb(il)-1) 2991 : +cx*(ph(il,inb(il))-ph(il,inb(il)+1)) 2992 : /(ph(il,inb(il)-1)-ph(il,inb(il))) 2993 2994 dx=0.01*grav*ment(il,inb(il),inb(il))*(vent(il,inb(il),inb(il)) 2995 : -v(il,inb(il)))/(ph(il,inb(il))-ph(il,inb(il)+1)) 2996 fv(il,inb(il))=fv(il,inb(il))-dx 2997 fv(il,inb(il)-1)=fv(il,inb(il)-1) 2998 : +dx*(ph(il,inb(il))-ph(il,inb(il)+1)) 2999 : /(ph(il,inb(il)-1)-ph(il,inb(il))) 3000 else 3001 ax=0.1*ment(il,inb(il),inb(il))*(hp(il,inb(il)) 3002 : -h(il,inb(il))+t(il,inb(il))*(cpv-cpd) 3003 : *(rr(il,inb(il))-qent(il,inb(il),inb(il)))) 3004 : /(cpn(il,inb(il))*(ph(il,inb(il))-ph(il,inb(il)+1))) 3005 ft(il,inb(il))=ft(il,inb(il))-ax 3006 ft(il,inb(il)-1)=ft(il,inb(il)-1)+ax*cpn(il,inb(il)) 3007 : *(ph(il,inb(il))-ph(il,inb(il)+1))/(cpn(il,inb(il)-1) 3008 : *(ph(il,inb(il)-1)-ph(il,inb(il)))) 3009 2974 3010 bx=0.1*ment(il,inb(il),inb(il))*(qent(il,inb(il),inb(il)) 2975 3011 : -rr(il,inb(il)))/(ph(il,inb(il))-ph(il,inb(il)+1)) … … 2992 3028 : +dx*(ph(il,inb(il))-ph(il,inb(il)+1)) 2993 3029 : /(ph(il,inb(il)-1)-ph(il,inb(il))) 3030 endif 2994 3031 ENDIF !iflag 2995 3032 503 continue … … 3065 3102 enddo 3066 3103 enddo 3104 3105 c 3106 c *** Check that moisture stays positive. If not, scale tendencies 3107 c in order to ensure moisture positivity 3108 DO il = 1,ncum 3109 IF (iflag(il) .le. 1) THEN 3110 alpha_qpos(il) = max(1. , -delt*fr(il,1)/ 3111 : (s_wake(il)*rr_wake(il,1)+(1.-s_wake(il))*rr(il,1))) 3112 ENDIF 3113 ENDDO 3114 DO i = 2,nl 3115 DO il = 1,ncum 3116 IF (iflag(il) .le. 1) THEN 3117 alpha_qpos(il) = max(alpha_qpos(il) , -delt*fr(il,i)/ 3118 : (s_wake(il)*rr_wake(il,i)+(1.-s_wake(il))*rr(il,i))) 3119 ENDIF 3120 ENDDO 3121 ENDDO 3122 DO il = 1,ncum 3123 IF (iflag(il) .le. 1 .and. alpha_qpos(il) .gt. 1.001) THEN 3124 alpha_qpos(il) = alpha_qpos(il)*1.1 3125 ENDIF 3126 ENDDO 3127 DO il = 1,ncum 3128 IF (iflag(il) .le. 1) THEN 3129 sigd(il) = sigd(il)/alpha_qpos(il) 3130 precip(il) = precip(il)/alpha_qpos(il) 3131 ENDIF 3132 ENDDO 3133 DO i = 1,nl 3134 DO il = 1,ncum 3135 IF (iflag(il) .le. 1) THEN 3136 fr(il,i) = fr(il,i)/alpha_qpos(il) 3137 ft(il,i) = ft(il,i)/alpha_qpos(il) 3138 fqd(il,i) = fqd(il,i)/alpha_qpos(il) 3139 ftd(il,i) = ftd(il,i)/alpha_qpos(il) 3140 fu(il,i) = fu(il,i)/alpha_qpos(il) 3141 fv(il,i) = fv(il,i)/alpha_qpos(il) 3142 m(il,i) = m(il,i)/alpha_qpos(il) 3143 mp(il,i) = mp(il,i)/alpha_qpos(il) 3144 Vprecip(il,i) = Vprecip(il,i)/alpha_qpos(il) 3145 ENDIF 3146 ENDDO 3147 ENDDO 3148 DO i = 1,nl 3149 DO j = 1,nl 3150 DO il = 1,ncum 3151 IF (iflag(il) .le. 1) THEN 3152 ment(il,i,j) = ment(il,i,j)/alpha_qpos(il) 3153 ENDIF 3154 ENDDO 3155 ENDDO 3156 ENDDO 3157 DO j = 1,ntra 3158 DO i = 1,nl 3159 DO il = 1,ncum 3160 IF (iflag(il) .le. 1) THEN 3161 ftra(il,i,j) = ftra(il,i,j)/alpha_qpos(il) 3162 ENDIF 3163 ENDDO 3164 ENDDO 3165 ENDDO 3166 3067 3167 c 3068 3168 c *** reset counter and return *** -
LMDZ4/trunk/libf/phylmd/cv3a_compress.F
r972 r1146 3 3 : ,plcl1,tnk1,qnk1,gznk1,hnk1,unk1,vnk1 4 4 : ,wghti1,pbase1,buoybase1 5 : ,t1,q1,qs1,t1_wake,q1_wake,qs1_wake,u1,v1,gz1,th1,th1_wake 5 : ,t1,q1,qs1,t1_wake,q1_wake,qs1_wake,s1_wake 6 : ,u1,v1,gz1,th1,th1_wake 6 7 : ,tra1 7 8 : ,h1 ,lv1 ,cpn1 ,p1,ph1,tv1 ,tp1,tvp1,clw1 … … 12 13 o ,plcl,tnk,qnk,gznk,hnk,unk,vnk 13 14 o ,wghti,pbase,buoybase 14 o ,t,q,qs,t_wake,q_wake,qs_wake,u,v,gz,th,th_wake 15 o ,t,q,qs,t_wake,q_wake,qs_wake,s_wake 16 o ,u,v,gz,th,th_wake 15 17 o ,tra 16 18 o ,h ,lv ,cpn ,p,ph,tv ,tp,tvp,clw … … 39 41 real t1(len,nd),q1(len,nd),qs1(len,nd) 40 42 real t1_wake(len,nd),q1_wake(len,nd),qs1_wake(len,nd) 43 real s1_wake(len) 41 44 real u1(len,nd),v1(len,nd) 42 45 real gz1(len,nd),th1(len,nd),th1_wake(len,nd) … … 58 61 real t(len,nd),q(len,nd),qs(len,nd) 59 62 real t_wake(len,nd),q_wake(len,nd),qs_wake(len,nd) 63 real s_wake(len) 60 64 real u(len,nd),v(len,nd) 61 65 real gz(len,nd),th(len,nd),th_wake(len,nd) … … 131 135 if(iflag1(i).eq.0)then 132 136 nn=nn+1 137 s_wake(nn)=s1_wake(i) 133 138 iflag(nn)=iflag1(i) 134 139 nk(nn)=nk1(i) -
LMDZ4/trunk/libf/phylmd/cva_driver.F
r1062 r1146 2 2 & iflag_con,iflag_mix, 3 3 & iflag_clos,delt, 4 & t1,q1,qs1,t1_wake,q1_wake,qs1_wake, 4 & t1,q1,qs1,t1_wake,q1_wake,qs1_wake,s1_wake, 5 5 & u1,v1,tra1, 6 6 & p1,ph1, … … 50 50 C q1_wake Real Input specific hum(unsat draught envt) 51 51 C qs1_wake Real Input sat specific hum(unsat draughts envt) 52 C s1_wake Real Input fractionnal area covered by wakes 52 53 C u1 Real Input u-wind 53 54 C v1 Real Input v-wind … … 121 122 real q1_wake(len,nd) 122 123 real qs1_wake(len,nd) 124 real s1_wake(len) 123 125 real u1(len,nd) 124 126 real v1(len,nd) … … 198 200 ! Must be defined at same grid levels as T. 199 201 ! 202 !s_wake: Array of fractionnal area occupied by the wakes. 203 ! 200 204 ! u: Array of zonal wind velocity (m/s) of dimension ND, witth first 201 205 ! index corresponding with the lowest model level. Defined at … … 358 362 real t(nloc,klev),q(nloc,klev),qs(nloc,klev) 359 363 real t_wake(nloc,klev),q_wake(nloc,klev),qs_wake(nloc,klev) 364 real s_wake(nloc) 360 365 real u(nloc,klev),v(nloc,klev) 361 366 real gz(nloc,klev),h(nloc,klev) ,hm(nloc,klev) … … 531 536 print*,'Emanuel version 3 nouvelle' 532 537 endif 533 538 ! print*,'t1, q1 ',t1,q1 534 539 CALL cv3_prelim(len,nd,ndp1,t1,q1,p1,ph1 ! nd->na 535 540 o ,lv1,cpn1,tv1,gz1,h1,hm1,th1) … … 668 673 669 674 if (iflag_con.eq.3) then 670 675 ! print*,'ncum tv1 ',ncum,tv1 676 ! print*,'tvp1 ',tvp1 671 677 CALL cv3a_compress( len,nloc,ncum,nd,ntra 672 678 : ,iflag1,nk1,icb1,icbs1 673 679 : ,plcl1,tnk1,qnk1,gznk1,hnk1,unk1,vnk1 674 680 : ,wghti1,pbase1,buoybase1 675 : ,t1,q1,qs1,t1_wake,q1_wake,qs1_wake,u1,v1,gz1,th1,th1_wake 681 : ,t1,q1,qs1,t1_wake,q1_wake,qs1_wake,s1_wake 682 : ,u1,v1,gz1,th1,th1_wake 676 683 : ,tra1 677 684 : ,h1 ,lv1 ,cpn1 ,p1,ph1,tv1 ,tp1,tvp1,clw1 … … 682 689 o ,plcl,tnk,qnk,gznk,hnk,unk,vnk 683 690 o ,wghti,pbase,buoybase 684 o ,t,q,qs,t_wake,q_wake,qs_wake,u,v,gz,th,th_wake 691 o ,t,q,qs,t_wake,q_wake,qs_wake,s_wake 692 o ,u,v,gz,th,th_wake 685 693 o ,tra 686 694 o ,h ,lv ,cpn ,p,ph,tv ,tp,tvp,clw … … 688 696 o ,sig,w0,ptop2 689 697 o ,Ale,Alp ) 698 699 ! print*,'tv ',tv 700 ! print*,'tvp ',tvp 690 701 691 702 endif … … 856 867 CALL cv3_yield(nloc,ncum,nd,nd,ntra ! na->nd 857 868 : ,icb,inb,delt 858 : ,t,q,t_wake,q_wake, u,v,tra869 : ,t,q,t_wake,q_wake,s_wake,u,v,tra 859 870 : ,gz,p,ph,h,hp,lv,cpn,th,th_wake 860 871 : ,ep,clw,m,tp,mp,qp,up,vp,trap -
LMDZ4/trunk/libf/phylmd/dimphy.F90
r776 r1146 5 5 INTEGER,SAVE :: kfdia 6 6 INTEGER,SAVE :: kidia 7 INTEGER,SAVE :: nbtr8 7 INTEGER,SAVE :: klev 9 8 INTEGER,SAVE :: klevp1 … … 17 16 CONTAINS 18 17 19 SUBROUTINE Init_dimphy(klon0,klev0 ,nbtr0)18 SUBROUTINE Init_dimphy(klon0,klev0) 20 19 IMPLICIT NONE 21 20 22 21 INTEGER, INTENT(in) :: klon0 23 22 INTEGER, INTENT(in) :: klev0 24 INTEGER, INTENT(in) :: nbtr025 23 26 24 klon=klon0 … … 31 29 !$OMP MASTER 32 30 klev=klev0 33 nbtr=nbtr034 31 klevp1=klev+1 35 32 klevm1=klev-1 -
LMDZ4/trunk/libf/phylmd/fisrtilp.F
r883 r1146 231 231 C surface. 232 232 C 233 DO i = 1, klon 233 IF(k.LE.klevm1) THEN 234 DO i = 1, klon 234 235 cIM 235 IF(k.LE.klevm1) THEN 236 zmair=(paprs(i,k)-paprs(i,k+1))/RG 237 zcpair=RCPD*(1.0+RVTMP2*zq(i)) 238 zcpeau=RCPD*RVTMP2 239 zt(i) = ( (t(i,k+1)+d_t(i,k+1))*zrfl(i)*dtime*zcpeau 240 $ + zmair*zcpair*zt(i) ) 241 $ / (zmair*zcpair + zrfl(i)*dtime*zcpeau) 242 CC WRITE (6,*) 'cppluie ', zt(i)-(t(i,k+1)+d_t(i,k+1)) 243 ENDIF 244 ENDDO 236 zmair=(paprs(i,k)-paprs(i,k+1))/RG 237 zcpair=RCPD*(1.0+RVTMP2*zq(i)) 238 zcpeau=RCPD*RVTMP2 239 zt(i) = ( (t(i,k+1)+d_t(i,k+1))*zrfl(i)*dtime*zcpeau 240 $ + zmair*zcpair*zt(i) ) 241 $ / (zmair*zcpair + zrfl(i)*dtime*zcpeau) 242 C C WRITE (6,*) 'cppluie ', zt(i)-(t(i,k+1)+d_t(i,k+1)) 243 ENDDO 244 ENDIF 245 245 c 246 246 c … … 372 372 endif ! iflag_pdf 373 373 374 do i=1,klon 375 IF (rneb(i,k) .LE. 0.0) zqn(i) = 0.0 376 IF (rneb(i,k) .GE. 1.0) zqn(i) = zq(i) 377 rneb(i,k) = MAX(0.0,MIN(1.0,rneb(i,k))) 378 c zcond(i) = MAX(0.0,zqn(i)-zqs(i))*rneb(i,k)/(1.+zdqs(i)) 379 c On ne divise pas par 1+zdqs pour forcer a avoir l'eau predite par 380 c la convection. 381 c ATTENTION !!! Il va falloir verifier tout ca. 382 zcond(i) = MAX(0.0,zqn(i)-zqs(i))*rneb(i,k) 383 c print*,'ZDQS ',zdqs(i) 384 c--Olivier 385 rhcl(i,k)=(zqs(i)+zq(i)-zdelq)/2./zqs(i) 386 IF (rneb(i,k) .LE. 0.0) rhcl(i,k)=zq(i)/zqs(i) 387 IF (rneb(i,k) .GE. 1.0) rhcl(i,k)=1.0 388 c--fin 389 ENDDO 374 DO i=1,klon 375 IF (rneb(i,k) .LE. 0.0) THEN 376 zqn(i) = 0.0 377 rneb(i,k) = 0.0 378 zcond(i) = 0.0 379 rhcl(i,k)=zq(i)/zqs(i) 380 ELSE IF (rneb(i,k) .GE. 1.0) THEN 381 zqn(i) = zq(i) 382 rneb(i,k) = 1.0 383 zcond(i) = MAX(0.0,zqn(i)-zqs(i)) 384 rhcl(i,k)=1.0 385 ELSE 386 zcond(i) = MAX(0.0,zqn(i)-zqs(i))*rneb(i,k) 387 rhcl(i,k)=(zqs(i)+zq(i)-zdelq)/2./zqs(i) 388 ENDIF 389 ENDDO 390 ! do i=1,klon 391 ! IF (rneb(i,k) .LE. 0.0) zqn(i) = 0.0 392 ! IF (rneb(i,k) .GE. 1.0) zqn(i) = zq(i) 393 ! rneb(i,k) = MAX(0.0,MIN(1.0,rneb(i,k))) 394 !c zcond(i) = MAX(0.0,zqn(i)-zqs(i))*rneb(i,k)/(1.+zdqs(i)) 395 !c On ne divise pas par 1+zdqs pour forcer a avoir l'eau predite par 396 !c la convection. 397 !c ATTENTION !!! Il va falloir verifier tout ca. 398 ! zcond(i) = MAX(0.0,zqn(i)-zqs(i))*rneb(i,k) 399 !c print*,'ZDQS ',zdqs(i) 400 !c--Olivier 401 ! rhcl(i,k)=(zqs(i)+zq(i)-zdelq)/2./zqs(i) 402 ! IF (rneb(i,k) .LE. 0.0) rhcl(i,k)=zq(i)/zqs(i) 403 ! IF (rneb(i,k) .GE. 1.0) rhcl(i,k)=1.0 404 !c--fin 405 ! ENDDO 390 406 ELSE 391 407 DO i = 1, klon -
LMDZ4/trunk/libf/phylmd/geo2atm.F90
r1072 r1146 5 5 USE dimphy 6 6 USE mod_phys_lmdz_para 7 7 8 8 IMPLICIT NONE 9 include 'dimensions.h' 9 INCLUDE 'dimensions.h' 10 INCLUDE 'YOMCST.h' 10 11 11 ! Change wind co rrdinates from cartesian geocentric to local spherical12 ! Change wind coordinates from cartesian geocentric to local spherical 12 13 ! NB! Fonctionne probablement uniquement en MPI seul (sans OpenMP) 13 14 ! … … 17 18 REAL, DIMENSION (im,jm), INTENT(OUT) :: pu, pv, pr 18 19 19 REAL, PARAMETER :: rpi = 3.141592653E0 20 REAL, PARAMETER :: rad = rpi / 180.0E0 20 REAL :: rad 21 22 23 rad = rpi / 180.0E0 21 24 22 REAL, DIMENSION (im,jm) :: zsinlon, zcoslon 23 REAL, DIMENSION (im,jm) :: zsinlat, zcoslat 25 pu(:,:) = & 26 - px(:,:) * SIN(rad * plon(:,:)) & 27 + py(:,:) * COS(rad * plon(:,:)) 24 28 25 zsinlon = SIN (rad * plon)26 zcoslon = COS (rad * plon)27 zsinlat = SIN (rad * plat)28 zcoslat = COS (rad * plat)29 pv(:,:) = & 30 - px(:,:) * SIN(rad * plat(:,:)) * COS(rad * plon(:,:)) & 31 - py(:,:) * SIN(rad * plat(:,:)) * SIN(rad * plon(:,:)) & 32 + pz(:,:) * COS(rad * plat(:,:)) 29 33 30 pu = - px * zsinlon + py * zcoslon 31 pv = - px * zsinlat*zcoslon - py * zsinlat*zsinlon + pz * zcoslat 32 pr = px * zcoslat*zcoslon + py * zcoslat*zsinlon + pz * zsinlat 34 pr(:,:) = & 35 + px(:,:) * COS(rad * plat(:,:)) * COS(rad * plon(:,:)) & 36 + py(:,:) * COS(rad * plat(:,:)) * SIN(rad * plon(:,:)) & 37 + pz(:,:) * SIN(rad * plat(:,:)) 33 38 34 ! Value at North Pole39 ! Value at North Pole 35 40 IF (is_north_pole) THEN 36 pu(:, 1) = - py(1,1)37 pv(:, 1) = - px(1,1)38 pr(:, 1) = 0.41 pu(:, 1) = pu(1, 1) 42 pv(:, 1) = pv(1, 1) 43 pr(:, 1) = pr(1, 1) 39 44 ENDIF 40 41 ! Value at South Pole45 46 ! Value at South Pole 42 47 IF (is_south_pole) THEN 43 pu(:,jm) = p y(1,jm)44 pv(:,jm) = p x(1,jm)45 pr(:,jm) = 0.48 pu(:,jm) = pu(1,jm) 49 pv(:,jm) = pv(1,jm) 50 pr(:,jm) = pr(1,jm) 46 51 ENDIF 47 52 48 53 END SUBROUTINE geo2atm -
LMDZ4/trunk/libf/phylmd/hgardfou.F
r987 r1146 1 !2 ! $Header$3 1 ! 4 2 SUBROUTINE hgardfou (t,tsol,text) … … 53 51 ok = .FALSE. 54 52 DO i = 1, jbad 55 PRINT *,'i,k,temperature rlon rlat=',jadrs(i),k,zt(jadrs(i)) 56 $ ,rlon(jadrs(i)),rlat(jadrs(i)) 53 PRINT *,'i,k,temperature,lon,lat,pourc ter,oce,lic,sic =', 54 $ jadrs(i),k,zt(jadrs(i)),rlon(jadrs(i)),rlat(jadrs(i)), 55 $ (pctsrf(jadrs(i),nsrf),nsrf=1,nbsrf) 57 56 ENDDO 58 57 ENDIF … … 72 71 ok = .FALSE. 73 72 DO i = 1, jbad 74 PRINT *,'i,k,temperature rlon rlat=',jadrs(i),k,zt(jadrs(i)) 75 $ ,rlon(jadrs(i)),rlat(jadrs(i)) 73 PRINT *,'i,k,temperature,lon,lat,pourc ter,oce,lic,sic =', 74 $ jadrs(i),k,zt(jadrs(i)),rlon(jadrs(i)),rlat(jadrs(i)), 75 $ (pctsrf(jadrs(i),nsrf),nsrf=1,nbsrf) 76 76 ENDDO 77 77 ENDIF … … 96 96 ok = .FALSE. 97 97 DO i = 1, jbad 98 PRINT *,'i,nsrf,temperature =',jadrs(i),nsrf,zt(jadrs(i)), 99 $ rlon(jadrs(i)),rlat(jadrs(i)) 98 PRINT *,'i,nsrf,temperature,lon,lat,pourc ter,oce,lic,sic =' 99 $ ,jadrs(i),nsrf,zt(jadrs(i)),rlon(jadrs(i)),rlat(jadrs(i)) 100 $ ,pctsrf(jadrs(i),nsrf) 100 101 ENDDO 101 102 ENDIF … … 115 116 ok = .FALSE. 116 117 DO i = 1, jbad 117 PRINT *,'i,nsrf,temperature =',jadrs(i),nsrf,zt(jadrs(i)), 118 $ rlon(jadrs(i)),rlat(jadrs(i)) 118 PRINT *,'i,nsrf,temperature,lon,lat,pourc ter,oce,lic,sic =' 119 $ ,jadrs(i),nsrf,zt(jadrs(i)),rlon(jadrs(i)),rlat(jadrs(i)) 120 $ ,pctsrf(jadrs(i),nsrf) 119 121 ENDDO 120 122 ENDIF -
LMDZ4/trunk/libf/phylmd/ini_histrac.h
r1030 r1146 2 2 ! $Header$ 3 3 ! 4 IF ( config_inca == 'none') THEN4 IF (ecrit_tra>0. .AND. config_inca == 'none') THEN 5 5 c$OMP MASTER 6 6 CALL ymds2ju(annee_ref, 1, day_ref, 0.0, zjulian) … … 23 23 . iim,jj_nb,nhori, 1,1,1, -99, 32, 24 24 . "once", zsto,zout) 25 DO it=1,n qmax25 DO it=1,nbtr 26 26 C champ 2D 27 27 iq=it+2 28 28 iiq=niadv(iq) 29 CALL histdef(nid_tra, tn om(iq), ttext(iiq), "U/kga",29 CALL histdef(nid_tra, tname(iiq), ttext(iiq), "U/kga", 30 30 . iim,jj_nb,nhori, klev,1,klev,nvert, 32, 31 31 . "ave(X)", zsto,zout) 32 32 if (lessivage) THEN 33 CALL histdef(nid_tra, "fl"//tn om(iq),"Flux "//ttext(iiq),33 CALL histdef(nid_tra, "fl"//tname(iiq),"Flux "//ttext(iiq), 34 34 . "U/m2/s",iim,jj_nb,nhori, klev,1,klev,nvert, 32, 35 35 . "ave(X)", zsto,zout) … … 37 37 38 38 c---Ajout Olivia 39 CALL histdef(nid_tra, "d_tr_th_"//tn om(iq),39 CALL histdef(nid_tra, "d_tr_th_"//tname(iiq), 40 40 . "tendance thermique"// ttext(iiq), "?", 41 41 . iim,jj_nb,nhori, klev,1,klev,nvert, 32, … … 43 43 c 44 44 if(iflag_con.GE.2) then 45 CALL histdef(nid_tra, "d_tr_cv_"//tn om(iq),45 CALL histdef(nid_tra, "d_tr_cv_"//tname(iiq), 46 46 . "tendance convection"// ttext(iiq), "?", 47 47 . iim,jj_nb,nhori, klev,1,klev,nvert, 32, 48 48 . "ave(X)", zsto,zout) 49 49 endif !(iflag_con.GE.2) then 50 CALL histdef(nid_tra, "d_tr_cl_"//tn om(iq),50 CALL histdef(nid_tra, "d_tr_cl_"//tname(iiq), 51 51 . "tendance couche limite"// ttext(iiq), "?", 52 52 . iim,jj_nb,nhori, klev,1,klev,nvert, 32, … … 121 121 ndex = 0 122 122 c$OMP END MASTER 123 END IF 123 END IF ! ecrit_tra>0. .AND. config_inca == 'none' -
LMDZ4/trunk/libf/phylmd/init_phys_lmdz.F90
r775 r1146 2 2 !$Header$ 3 3 ! 4 SUBROUTINE Init_Phys_lmdz(iim,jjp1,llm,nb tr,nb_proc,distrib)4 SUBROUTINE Init_Phys_lmdz(iim,jjp1,llm,nb_proc,distrib) 5 5 USE mod_phys_lmdz_para 6 6 USE mod_grid_phy_lmdz … … 11 11 INTEGER,INTENT(in) :: jjp1 12 12 INTEGER,INTENT(in) :: llm 13 INTEGER,INTENT(in) :: nbtr14 13 INTEGER,INTENT(in) :: nb_proc 15 14 INTEGER,INTENT(in) :: distrib(0:nb_proc-1) … … 19 18 CALL Init_phys_lmdz_para(iim,jjp1,nb_proc,distrib) 20 19 !$OMP PARALLEL 21 CALL Init_dimphy(klon_omp,nbp_lev ,nbtr)20 CALL Init_dimphy(klon_omp,nbp_lev) 22 21 !$OMP END PARALLEL 23 22 -
LMDZ4/trunk/libf/phylmd/initrrnpb.F
r766 r1146 5 5 . ,vdeptr,scavtr) 6 6 USE dimphy 7 USE infotrac, ONLY : nbtr 7 8 IMPLICIT none 8 9 c====================================================================== -
LMDZ4/trunk/libf/phylmd/isccp_cloud_types.F
r776 r1146 530 530 ! Initialised frac_out to zero 531 531 532 do i box=1,ncol533 do i lev=1,nlev532 do ilev=1,nlev 533 do ibox=1,ncol 534 534 do j=1,npoints 535 535 frac_out(j,ibox,ilev)=0.0 … … 1219 1219 enddo 1220 1220 do 29 ilev=1,nlev-1 1221 1221 !cdir nodep 1222 1222 do j=1,npoints 1223 1223 if ((at(j,ilev) .ge. tb(j,ibox) .and. -
LMDZ4/trunk/libf/phylmd/newmicro.F
r766 r1146 110 110 REAL zclear(klon) 111 111 REAL zcloud(klon) 112 113 c ************************** 114 c * * 115 c * DEBUT PARTIE OPTIMISEE * 116 c * * 117 c ************************** 118 119 REAL diff_paprs(klon, klev), zfice1, zfice2(klon, klev) 120 REAL rad_chaud_tab(klon, klev), zflwp_var, zfiwp_var 121 112 122 c 113 123 c Calculer l'epaisseur optique et l'emmissivite des nuages 114 124 c 115 cIM inversion des DO 116 DO i = 1, klon 117 xflwp(i)=0. 118 xfiwp(i)=0. 119 cccccccccccc!CDIR NOVECTOR 125 c IM inversion des DO 126 xflwp = 0.d0 127 xfiwp = 0.d0 128 xflwc = 0.d0 129 xfiwc = 0.d0 130 120 131 DO k = 1, klev 121 c 122 xflwc(i,k)=0. 123 xfiwc(i,k)=0. 124 c 125 rad_chaud = rad_chau1 126 IF (k.LE.3) rad_chaud = rad_chau2 127 pclc(i,k) = MAX(pclc(i,k), seuil_neb) 128 zflwp(i) = 1000.*pqlwp(i,k)/RG/pclc(i,k) 129 . *(paprs(i,k)-paprs(i,k+1)) 130 zfice = 1.0 - (t(i,k)-t_glace) / (273.13-t_glace) 131 zfice = MIN(MAX(zfice,0.0),1.0) 132 zfice = zfice**nexpo 133 radius = rad_chaud * (1.-zfice) + rad_froid * zfice 134 coef = coef_chau * (1.-zfice) + coef_froi * zfice 135 pcltau(i,k) = 3.0/2.0 * zflwp(i) / radius 136 pclemi(i,k) = 1.0 - EXP( - coef * zflwp(i)) 137 138 if (ok_newmicro) then 139 140 c -- liquid/ice cloud water paths: 141 142 zfice = 1.0 - (t(i,k)-t_glace) / (273.13-t_glace) 143 zfice = MIN(MAX(zfice,0.0),1.0) 144 145 zflwp(i) = 1000.*(1.-zfice)*pqlwp(i,k)/pclc(i,k) 146 : *(paprs(i,k)-paprs(i,k+1))/RG 147 zfiwp(i) = 1000.*zfice*pqlwp(i,k)/pclc(i,k) 148 : *(paprs(i,k)-paprs(i,k+1))/RG 149 150 xflwp(i) = xflwp(i)+ (1.-zfice)*pqlwp(i,k) 151 : *(paprs(i,k)-paprs(i,k+1))/RG 152 xfiwp(i) = xfiwp(i)+ zfice*pqlwp(i,k) 153 : *(paprs(i,k)-paprs(i,k+1))/RG 154 155 cIM Total Liquid/Ice water content 156 xflwc(i,k) = xflwc(i,k)+(1.-zfice)*pqlwp(i,k) 157 xfiwc(i,k) = xfiwc(i,k)+zfice*pqlwp(i,k) 158 cIM In-Cloud Liquid/Ice water content 159 c xflwc(i,k) = xflwc(i,k)+(1.-zfice)*pqlwp(i,k)/pclc(i,k) 160 c xfiwc(i,k) = xfiwc(i,k)+zfice*pqlwp(i,k)/pclc(i,k) 161 162 c -- effective cloud droplet radius (microns): 163 164 c for liquid water clouds: 132 DO i = 1, klon 133 diff_paprs(i,k) = (paprs(i,k)-paprs(i,k+1))/RG 134 ENDDO 135 ENDDO 136 137 IF (ok_newmicro) THEN 138 139 140 DO k = 1, klev 141 DO i = 1, klon 142 zfice2(i,k) = 1.0 - (t(i,k)-t_glace) / (273.13-t_glace) 143 zfice2(i,k) = MIN(MAX(zfice2(i,k),0.0),1.0) 144 c IM Total Liquid/Ice water content 145 xflwc(i,k) = (1.-zfice2(i,k))*pqlwp(i,k) 146 xfiwc(i,k) = zfice2(i,k)*pqlwp(i,k) 147 c IM In-Cloud Liquid/Ice water content 148 c xflwc(i,k) = xflwc(i,k)+(1.-zfice)*pqlwp(i,k)/pclc(i,k) 149 c xfiwc(i,k) = xfiwc(i,k)+zfice*pqlwp(i,k)/pclc(i,k) 150 ENDDO 151 ENDDO 152 165 153 IF (ok_aie) THEN 166 ! Formula "D" of Boucher and Lohmann, Tellus, 1995 167 ! 168 cdnc(i,k) = 10.**(bl95_b0+bl95_b1* 169 . log(MAX(sulfate(i,k),1.e-4))/log(10.))*1.e6 !-m-3 170 ! Cloud droplet number concentration (CDNC) is restricted 171 ! to be within [20, 1000 cm^3] 172 ! 173 cdnc(i,k)=MIN(1000.e6,MAX(20.e6,cdnc(i,k))) 174 ! 175 ! 176 cdnc_pi(i,k) = 10.**(bl95_b0+bl95_b1* 177 . log(MAX(sulfate_pi(i,k),1.e-4))/log(10.))*1.e6 !-m-3 178 cdnc_pi(i,k)=MIN(1000.e6,MAX(20.e6,cdnc_pi(i,k))) 179 ! 180 ! 181 ! air density: pplay(i,k) / (RD * zT(i,k)) 182 ! factor 1.1: derive effective radius from volume-mean radius 183 ! factor 1000 is the water density 184 ! _chaud means that this is the CDR for liquid water clouds 185 ! 186 rad_chaud = 187 . 1.1 * ( (pqlwp(i,k) * pplay(i,k) / (RD * T(i,k)) ) 188 . / (4./3. * RPI * 1000. * cdnc(i,k)) )**(1./3.) 189 ! 190 ! Convert to um. CDR shall be at least 3 um. 191 ! 192 c rad_chaud = MAX(rad_chaud*1.e6, 3.) 193 rad_chaud = MAX(rad_chaud*1.e6, 5.) 194 195 ! Pre-industrial cloud opt thickness 196 ! 197 ! "radius" is calculated as rad_chaud above (plus the 198 ! ice cloud contribution) but using cdnc_pi instead of 199 ! cdnc. 200 radius = 201 . 1.1 * ( (pqlwp(i,k) * pplay(i,k) / (RD * T(i,k)) ) 202 . / (4./3. * RPI * 1000. * cdnc_pi(i,k)) )**(1./3.) 203 radius = MAX(radius*1.e6, 5.) 204 205 tc = t(i,k)-273.15 206 rei = 0.71*tc + 61.29 207 if (tc.le.-81.4) rei = 3.5 208 if (zflwp(i).eq.0.) radius = 1. 209 if (zfiwp(i).eq.0. .or. rei.le.0.) rei = 1. 210 cldtaupi(i,k) = 3.0/2.0 * zflwp(i) / radius 211 . + zfiwp(i) * (3.448e-03 + 2.431/rei) 212 ENDIF ! ok_aie 213 ! For output diagnostics 214 ! 215 ! Cloud droplet effective radius [um] 216 ! 217 ! we multiply here with f * xl (fraction of liquid water 218 ! clouds in the grid cell) to avoid problems in the 219 ! averaging of the output. 220 ! In the output of IOIPSL, derive the real cloud droplet 221 ! effective radius as re/fl 222 ! 223 fl(i,k) = pclc(i,k)*(1.-zfice) 224 re(i,k) = rad_chaud*fl(i,k) 225 226 c-jq end 154 DO k = 1, klev 155 DO i = 1, klon 156 ! Formula "D" of Boucher and Lohmann, Tellus, 1995 157 ! 158 cdnc(i,k) = 10.**(bl95_b0+bl95_b1* 159 & log(MAX(sulfate(i,k),1.e-4))/log(10.))*1.e6 !-m-3 160 ! Cloud droplet number concentration (CDNC) is restricted 161 ! to be within [20, 1000 cm^3] 162 ! 163 cdnc(i,k)=MIN(1000.e6,MAX(20.e6,cdnc(i,k))) 164 ! 165 ! 166 cdnc_pi(i,k) = 10.**(bl95_b0+bl95_b1* 167 & log(MAX(sulfate_pi(i,k),1.e-4))/log(10.))*1.e6 !-m-3 168 cdnc_pi(i,k)=MIN(1000.e6,MAX(20.e6,cdnc_pi(i,k))) 169 ENDDO 170 ENDDO 171 DO k = 1, klev 172 DO i = 1, klon 173 ! rad_chaud_tab(i,k) = 174 ! & MAX(1.1e6 175 ! & *((pqlwp(i,k)*pplay(i,k)/(RD * T(i,k))) 176 ! & /(4./3*RPI*1000.*cdnc(i,k)) )**(1./3.),5.) 177 rad_chaud_tab(i,k) = 178 & 1.1 179 & *((pqlwp(i,k)*pplay(i,k)/(RD * T(i,k))) 180 & /(4./3*RPI*1000.*cdnc(i,k)) )**(1./3.) 181 rad_chaud_tab(i,k) = MAX(rad_chaud_tab(i,k) * 1e6, 5.) 182 ENDDO 183 ENDDO 184 ELSE 185 DO k = 1, MIN(3,klev) 186 DO i = 1, klon 187 rad_chaud_tab(i,k) = rad_chau2 188 ENDDO 189 ENDDO 190 DO k = MIN(3,klev)+1, klev 191 DO i = 1, klon 192 rad_chaud_tab(i,k) = rad_chau1 193 ENDDO 194 ENDDO 195 196 ENDIF 227 197 228 rel = rad_chaud 229 c for ice clouds: as a function of the ambiant temperature 230 c [formula used by Iacobellis and Somerville (2000), with an 231 c asymptotical value of 3.5 microns at T<-81.4 C added to be 232 c consistent with observations of Heymsfield et al. 1986]: 233 tc = t(i,k)-273.15 234 rei = 0.71*tc + 61.29 235 if (tc.le.-81.4) rei = 3.5 236 237 c -- cloud optical thickness : 238 239 c [for liquid clouds, traditional formula, 240 c for ice clouds, Ebert & Curry (1992)] 241 242 if (zflwp(i).eq.0.) rel = 1. 243 if (zfiwp(i).eq.0. .or. rei.le.0.) rei = 1. 244 pcltau(i,k) = 3.0/2.0 * ( zflwp(i)/rel ) 245 . + zfiwp(i) * (3.448e-03 + 2.431/rei) 246 247 c -- cloud infrared emissivity: 248 249 c [the broadband infrared absorption coefficient is parameterized 250 c as a function of the effective cld droplet radius] 251 252 c Ebert and Curry (1992) formula as used by Kiehl & Zender (1995): 253 k_ice = k_ice0 + 1.0/rei 254 255 pclemi(i,k) = 1.0 256 . - EXP( - coef_chau*zflwp(i) - DF*k_ice*zfiwp(i) ) 257 258 endif ! ok_newmicro 259 260 lo = (pclc(i,k) .LE. seuil_neb) 261 IF (lo) pclc(i,k) = 0.0 262 IF (lo) pcltau(i,k) = 0.0 263 IF (lo) pclemi(i,k) = 0.0 264 265 IF (lo) cldtaupi(i,k) = 0.0 266 IF (.NOT.ok_aie) cldtaupi(i,k)=pcltau(i,k) 267 ENDDO 268 ENDDO 269 ccc DO k = 1, klev 270 ccc DO i = 1, klon 271 ccc t(i,k) = t(i,k) 272 ccc pclc(i,k) = MAX( 1.e-5 , pclc(i,k) ) 273 ccc lo = pclc(i,k) .GT. (2.*1.e-5) 274 ccc zflwp = pqlwp(i,k)*1000.*(paprs(i,k)-paprs(i,k+1)) 275 ccc . /(rg*pclc(i,k)) 276 ccc zradef = 10.0 + (1.-sigs(k))*45.0 277 ccc pcltau(i,k) = 1.5 * zflwp / zradef 278 ccc zfice=1.0-MIN(MAX((t(i,k)-263.)/(273.-263.),0.0),1.0) 279 ccc zmsac = 0.13*(1.0-zfice) + 0.08*zfice 280 ccc pclemi(i,k) = 1.-EXP(-zmsac*zflwp) 281 ccc if (.NOT.lo) pclc(i,k) = 0.0 282 ccc if (.NOT.lo) pcltau(i,k) = 0.0 283 ccc if (.NOT.lo) pclemi(i,k) = 0.0 284 ccc ENDDO 285 ccc ENDDO 286 cccccc print*, 'pas de nuage dans le rayonnement' 287 cccccc DO k = 1, klev 288 cccccc DO i = 1, klon 289 cccccc pclc(i,k) = 0.0 290 cccccc pcltau(i,k) = 0.0 291 cccccc pclemi(i,k) = 0.0 292 cccccc ENDDO 293 cccccc ENDDO 294 C 295 C COMPUTE CLOUD LIQUID PATH AND TOTAL CLOUDINESS 296 C 297 cIM cf. CR:test: calcul prenant ou non en compte le recouvrement 298 cinitialisations 198 DO k = 1, klev 199 ! IF(.not.ok_aie) THEN 200 rad_chaud = rad_chau1 201 IF (k.LE.3) rad_chaud = rad_chau2 202 ! ENDIF 203 DO i = 1, klon 204 IF (pclc(i,k) .LE. seuil_neb) THEN 205 206 c -- effective cloud droplet radius (microns): 207 208 c for liquid water clouds: 209 ! For output diagnostics 210 ! 211 ! Cloud droplet effective radius [um] 212 ! 213 ! we multiply here with f * xl (fraction of liquid water 214 ! clouds in the grid cell) to avoid problems in the 215 ! averaging of the output. 216 ! In the output of IOIPSL, derive the real cloud droplet 217 ! effective radius as re/fl 218 ! 219 220 fl(i,k) = seuil_neb*(1.-zfice2(i,k)) 221 re(i,k) = rad_chaud_tab(i,k)*fl(i,k) 222 223 pclc(i,k) = 0.0 224 pcltau(i,k) = 0.0 225 pclemi(i,k) = 0.0 226 cldtaupi(i,k) = 0.0 227 ELSE 228 229 c -- liquid/ice cloud water paths: 230 231 zflwp_var= 1000.*(1.-zfice2(i,k))*pqlwp(i,k)/pclc(i,k) 232 & *diff_paprs(i,k) 233 zfiwp_var= 1000.*zfice2(i,k)*pqlwp(i,k)/pclc(i,k) 234 & *diff_paprs(i,k) 235 236 c -- effective cloud droplet radius (microns): 237 238 c for liquid water clouds: 239 240 IF (ok_aie) THEN 241 radius = 242 & 1.1 243 & *((pqlwp(i,k)*pplay(i,k)/(RD * T(i,k))) 244 & /(4./3.*RPI*1000.*cdnc_pi(i,k)))**(1./3.) 245 radius = MAX(radius*1e6, 5.) 246 247 tc = t(i,k)-273.15 248 rei = 0.71*tc + 61.29 249 if (tc.le.-81.4) rei = 3.5 250 if (zflwp_var.eq.0.) radius = 1. 251 if (zfiwp_var.eq.0. .or. rei.le.0.) rei = 1. 252 cldtaupi(i,k) = 3.0/2.0 * zflwp_var / radius 253 & + zfiwp_var * (3.448e-03 + 2.431/rei) 254 ENDIF ! ok_aie 255 ! For output diagnostics 256 ! 257 ! Cloud droplet effective radius [um] 258 ! 259 ! we multiply here with f * xl (fraction of liquid water 260 ! clouds in the grid cell) to avoid problems in the 261 ! averaging of the output. 262 ! In the output of IOIPSL, derive the real cloud droplet 263 ! effective radius as re/fl 264 ! 265 266 fl(i,k) = pclc(i,k)*(1.-zfice2(i,k)) 267 re(i,k) = rad_chaud_tab(i,k)*fl(i,k) 268 269 rel = rad_chaud_tab(i,k) 270 c for ice clouds: as a function of the ambiant temperature 271 c [formula used by Iacobellis and Somerville (2000), with an 272 c asymptotical value of 3.5 microns at T<-81.4 C added to be 273 c consistent with observations of Heymsfield et al. 1986]: 274 tc = t(i,k)-273.15 275 rei = 0.71*tc + 61.29 276 if (tc.le.-81.4) rei = 3.5 277 c -- cloud optical thickness : 278 279 c [for liquid clouds, traditional formula, 280 c for ice clouds, Ebert & Curry (1992)] 281 282 if (zflwp_var.eq.0.) rel = 1. 283 if (zfiwp_var.eq.0. .or. rei.le.0.) rei = 1. 284 pcltau(i,k) = 3.0/2.0 * ( zflwp_var/rel ) 285 & + zfiwp_var * (3.448e-03 + 2.431/rei) 286 c -- cloud infrared emissivity: 287 288 c [the broadband infrared absorption coefficient is parameterized 289 c as a function of the effective cld droplet radius] 290 291 c Ebert and Curry (1992) formula as used by Kiehl & Zender (1995): 292 k_ice = k_ice0 + 1.0/rei 293 294 pclemi(i,k) = 1.0 295 & - EXP( -coef_chau*zflwp_var - DF*k_ice*zfiwp_var) 296 297 ENDIF 298 299 ENDDO 300 ENDDO 301 302 DO k = 1, klev 303 DO i = 1, klon 304 xflwp(i) = xflwp(i)+ xflwc(i,k) * diff_paprs(i,k) 305 xfiwp(i) = xfiwp(i)+ xfiwc(i,k) * diff_paprs(i,k) 306 ENDDO 307 ENDDO 308 309 ELSE 310 DO k = 1, klev 311 rad_chaud = rad_chau1 312 IF (k.LE.3) rad_chaud = rad_chau2 313 DO i = 1, klon 314 315 IF (pclc(i,k) .LE. seuil_neb) THEN 316 317 pclc(i,k) = 0.0 318 pcltau(i,k) = 0.0 319 pclemi(i,k) = 0.0 320 cldtaupi(i,k) = 0.0 321 322 ELSE 323 324 zflwp_var = 1000.*pqlwp(i,k)*diff_paprs(i,k) 325 & /pclc(i,k) 326 327 zfice1 = MIN( 328 & MAX( 1.0 - (t(i,k)-t_glace) / (273.13-t_glace) 329 & ,0.0),1.0)**nexpo 330 331 radius = rad_chaud * (1.-zfice1) + rad_froid * zfice1 332 coef = coef_chau * (1.-zfice1) + coef_froi * zfice1 333 334 pcltau(i,k) = 3.0 * zflwp_var / (2.0 * radius) 335 pclemi(i,k) = 1.0 - EXP( - coef * zflwp_var) 336 337 ENDIF 338 339 ENDDO 340 ENDDO 341 ENDIF 342 343 IF (.NOT.ok_aie) THEN 344 DO k = 1, klev 345 DO i = 1, klon 346 cldtaupi(i,k)=pcltau(i,k) 347 ENDDO 348 ENDDO 349 ENDIF 350 351 ccc DO k = 1, klev 352 ccc DO i = 1, klon 353 ccc t(i,k) = t(i,k) 354 ccc pclc(i,k) = MAX( 1.e-5 , pclc(i,k) ) 355 ccc lo = pclc(i,k) .GT. (2.*1.e-5) 356 ccc zflwp = pqlwp(i,k)*1000.*(paprs(i,k)-paprs(i,k+1)) 357 ccc . /(rg*pclc(i,k)) 358 ccc zradef = 10.0 + (1.-sigs(k))*45.0 359 ccc pcltau(i,k) = 1.5 * zflwp / zradef 360 ccc zfice=1.0-MIN(MAX((t(i,k)-263.)/(273.-263.),0.0),1.0) 361 ccc zmsac = 0.13*(1.0-zfice) + 0.08*zfice 362 ccc pclemi(i,k) = 1.-EXP(-zmsac*zflwp) 363 ccc if (.NOT.lo) pclc(i,k) = 0.0 364 ccc if (.NOT.lo) pcltau(i,k) = 0.0 365 ccc if (.NOT.lo) pclemi(i,k) = 0.0 366 ccc ENDDO 367 ccc ENDDO 368 ccccc print*, 'pas de nuage dans le rayonnement' 369 ccccc DO k = 1, klev 370 ccccc DO i = 1, klon 371 ccccc pclc(i,k) = 0.0 372 ccccc pcltau(i,k) = 0.0 373 ccccc pclemi(i,k) = 0.0 374 ccccc ENDDO 375 ccccc ENDDO 376 C 377 C COMPUTE CLOUD LIQUID PATH AND TOTAL CLOUDINESS 378 C 379 c IM cf. CR:test: calcul prenant ou non en compte le recouvrement 380 c initialisations 299 381 DO i=1,klon 300 382 zclear(i)=1. … … 308 390 cIM cf CR DO k=1,klev 309 391 DO k = klev, 1, -1 310 DO i = 1, klon 311 pctlwp(i) = pctlwp(i) 312 . + pqlwp(i,k)*(paprs(i,k)-paprs(i,k+1))/RG 313 cIM cf. CR 314 IF (NOVLP.EQ.1) THEN 392 DO i = 1, klon 393 pctlwp(i) = pctlwp(i) 394 & + pqlwp(i,k)*diff_paprs(i,k) 395 ENDDO 396 ENDDO 397 c IM cf. CR 398 IF (NOVLP.EQ.1) THEN 399 DO k = klev, 1, -1 400 DO i = 1, klon 315 401 zclear(i)=zclear(i)*(1.-MAX(pclc(i,k),zcloud(i))) 316 s/(1.-MIN(zcloud(i),1.-ZEPSEC))402 & /(1.-MIN(zcloud(i),1.-ZEPSEC)) 317 403 pct(i)=1.-zclear(i) 318 if (pplay(i,k).LE.cetahb*paprs(i,1)) then404 IF (pplay(i,k).LE.cetahb*paprs(i,1)) THEN 319 405 pch(i) = pch(i)*(1.-MAX(pclc(i,k),zcloud(i))) 320 s/(1.-MIN(zcloud(i),1.-ZEPSEC))321 else if(pplay(i,k).GT.cetahb*paprs(i,1) .AND.322 . pplay(i,k).LE.cetamb*paprs(i,1)) then406 & /(1.-MIN(zcloud(i),1.-ZEPSEC)) 407 ELSE IF (pplay(i,k).GT.cetahb*paprs(i,1) .AND. 408 & pplay(i,k).LE.cetamb*paprs(i,1)) THEN 323 409 pcm(i) = pcm(i)*(1.-MAX(pclc(i,k),zcloud(i))) 324 s/(1.-MIN(zcloud(i),1.-ZEPSEC))325 else if (pplay(i,k).GT.cetamb*paprs(i,1)) then410 & /(1.-MIN(zcloud(i),1.-ZEPSEC)) 411 ELSE IF (pplay(i,k).GT.cetamb*paprs(i,1)) THEN 326 412 pcl(i) = pcl(i)*(1.-MAX(pclc(i,k),zcloud(i))) 327 s/(1.-MIN(zcloud(i),1.-ZEPSEC))413 & /(1.-MIN(zcloud(i),1.-ZEPSEC)) 328 414 endif 329 415 zcloud(i)=pclc(i,k) 330 ELSE IF (NOVLP.EQ.2) THEN 416 ENDDO 417 ENDDO 418 ELSE IF (NOVLP.EQ.2) THEN 419 DO k = klev, 1, -1 420 DO i = 1, klon 331 421 zcloud(i)=MAX(pclc(i,k),zcloud(i)) 332 422 pct(i)=zcloud(i) 333 if (pplay(i,k).LE.cetahb*paprs(i,1)) then423 IF (pplay(i,k).LE.cetahb*paprs(i,1)) THEN 334 424 pch(i) = MIN(pclc(i,k),pch(i)) 335 else if(pplay(i,k).GT.cetahb*paprs(i,1) .AND.336 . pplay(i,k).LE.cetamb*paprs(i,1)) then425 ELSE IF (pplay(i,k).GT.cetahb*paprs(i,1) .AND. 426 & pplay(i,k).LE.cetamb*paprs(i,1)) THEN 337 427 pcm(i) = MIN(pclc(i,k),pcm(i)) 338 else if (pplay(i,k).GT.cetamb*paprs(i,1)) then428 ELSE IF (pplay(i,k).GT.cetamb*paprs(i,1)) THEN 339 429 pcl(i) = MIN(pclc(i,k),pcl(i)) 340 430 endif 341 ELSE IF (NOVLP.EQ.3) THEN 431 ENDDO 432 ENDDO 433 ELSE IF (NOVLP.EQ.3) THEN 434 DO k = klev, 1, -1 435 DO i = 1, klon 342 436 zclear(i)=zclear(i)*(1.-pclc(i,k)) 343 437 pct(i)=1-zclear(i) 344 if (pplay(i,k).LE.cetahb*paprs(i,1)) then345 pch(i) = pch(i)*(1.0-pclc(i,k))346 else if(pplay(i,k).GT.cetahb*paprs(i,1) .AND.347 . pplay(i,k).LE.cetamb*paprs(i,1)) then348 pcm(i) = pcm(i)*(1.0-pclc(i,k))349 else if (pplay(i,k).GT.cetamb*paprs(i,1)) then350 pcl(i) = pcl(i)*(1.0-pclc(i,k))438 IF (pplay(i,k).LE.cetahb*paprs(i,1)) THEN 439 pch(i) = pch(i)*(1.0-pclc(i,k)) 440 ELSE IF (pplay(i,k).GT.cetahb*paprs(i,1) .AND. 441 & pplay(i,k).LE.cetamb*paprs(i,1)) THEN 442 pcm(i) = pcm(i)*(1.0-pclc(i,k)) 443 ELSE IF (pplay(i,k).GT.cetamb*paprs(i,1)) THEN 444 pcl(i) = pcl(i)*(1.0-pclc(i,k)) 351 445 endif 352 ENDIF 353 ENDDO 354 ENDDO 355 C 446 ENDDO 447 ENDDO 448 ENDIF 449 450 C 356 451 DO i = 1, klon 357 c IM cf. CR pct(i)=1.-pct(i)452 c IM cf. CR pct(i)=1.-pct(i) 358 453 pch(i)=1.-pch(i) 359 454 pcm(i)=1.-pcm(i) 360 455 pcl(i)=1.-pcl(i) 361 456 ENDDO 457 362 458 C 363 459 RETURN -
LMDZ4/trunk/libf/phylmd/oasis.F90
r1107 r1146 146 146 !************************************************************************************ 147 147 ! Define symbolic name for fields exchanged from atmos to coupler, 148 ! must be the same as (1) of the field definition in namcouple: 148 ! must be the same as (1) of the field definition in namcouple: 149 ! 150 ! Initialization 151 cl_writ(:)='NOFLDATM' 149 152 150 153 cl_writ(1)='COTAUXXU' … … 155 158 cl_writ(6)='COTAUZZV' 156 159 cl_writ(7)='COWINDSP' 157 160 cl_writ(8)='COSHFICE' 161 cl_writ(10)='CONSFICE' 162 cl_writ(12)='CODFLXDT' 163 158 164 IF (version_ocean=='nemo') THEN 159 cl_writ(8) ='COPEFWAT' 160 cl_writ(9) ='COPEFICE' 161 cl_writ(10)='COTOSPSU' 162 cl_writ(11)='COICEVAP' 163 cl_writ(12)='COSWFLDO' 164 cl_writ(13)='CONSFLDO' 165 cl_writ(14)='COSHFLIC' 166 cl_writ(15)='CONSFLIC' 167 cl_writ(16)='CODFLXDT' 168 cl_writ(17)='CRWOCEIS' 169 cl_writ(18)='CRWOCERD' 170 cl_writ(19)='CRWOCECD' 165 cl_writ(9)='COQSRMIX' 166 cl_writ(11)='COQNSMIX' 167 cl_writ(13)='COTOTRAI' 168 cl_writ(14)='COTOTSNO' 169 cl_writ(15)='COTOTEVA' 170 cl_writ(16)='COICEVAP' 171 cl_writ(17)='COCALVIN' 172 cl_writ(18)='COLIQRUN' 171 173 ELSE IF (version_ocean=='opa8') THEN 172 cl_writ(8) ='COSHFICE' 173 cl_writ(9) ='COSHFOCE' 174 cl_writ(10)='CONSFICE' 175 cl_writ(11)='CONSFOCE' 176 cl_writ(12)='CODFLXDT' 177 cl_writ(13)='COTFSICE' 178 cl_writ(14)='COTFSOCE' 179 cl_writ(15)='COTOLPSU' 180 cl_writ(16)='COTOSPSU' 181 cl_writ(17)='CORUNCOA' 182 cl_writ(18)='CORIVFLU' 183 cl_writ(19)='COCALVIN' 174 cl_writ(9)='COSHFOCE' 175 cl_writ(11)='CONSFOCE' 176 cl_writ(13)='COTFSICE' 177 cl_writ(14)='COTFSOCE' 178 cl_writ(15)='COTOLPSU' 179 cl_writ(16)='COTOSPSU' 180 cl_writ(17)='CORUNCOA' 181 cl_writ(18)='CORIVFLU' 182 cl_writ(19)='COCALVIN' 184 183 ENDIF 185 184 186 185 ! 187 186 ! Define symbolic name for fields exchanged from coupler to atmosphere, 188 ! must be the same as (2) of the field definition in namcouple: 189 ! 190 IF (version_ocean=='nemo') THEN 191 cl_read(1)='SISUTESW' 192 cl_read(2)='SIICECOV' 193 cl_read(4)='SIICEALW' 194 cl_read(3)='SIICTEMW' 195 ELSE IF (version_ocean=='opa8') THEN 196 cl_read(1)='SISUTESW' 197 cl_read(2)='SIICECOV' 198 cl_read(3)='SIICEALW' 199 cl_read(4)='SIICTEMW' 187 ! must be the same as (2) of the field definition in namcouple: 188 ! 189 ! Initialization 190 cl_read(:)='NOFLDATM' 191 192 cl_read(1)='SISUTESW' 193 cl_read(2)='SIICECOV' 194 cl_read(3)='SIICEALW' 195 cl_read(4)='SIICTEMW' 196 197 IF (cpl_current) THEN 198 cl_read(5)='CURRENTX' 199 cl_read(6)='CURRENTY' 200 cl_read(7)='CURRENTZ' 200 201 END IF 201 cl_read(5)='CURRENTX'202 cl_read(6)='CURRENTY'203 cl_read(7)='CURRENTZ'204 202 205 203 il_var_nodims(1) = 2 -
LMDZ4/trunk/libf/phylmd/ocean_cpl_mod.F90
r1067 r1146 259 259 260 260 CALL cpl_receive_seaice_fields(knon, knindex, & 261 tsurf_cpl, alb_cpl )261 tsurf_cpl, alb_cpl, u0, v0) 262 262 263 263 alb1_new(1:knon) = alb_cpl(1:knon) … … 273 273 beta = 1.0 274 274 275 ! Suppose zero surface speed 276 u0(:)=0.0 277 v0(:)=0.0 278 u1_lay(:) = u1(:) - u0(:) 279 v1_lay(:) = v1(:) - v0(:) 275 DO i = 1, knon 276 u1_lay(i) = u1(i) - u0(i) 277 v1_lay(i) = v1(i) - v0(i) 278 END DO 280 279 281 280 CALL calcul_fluxs(knon, is_sic, dtime, & -
LMDZ4/trunk/libf/phylmd/pbl_surface_mod.F90
r1069 r1146 460 460 !**************************************************************************************** 461 461 ! Declarations specifiques pour le 1D. A reprendre 462 REAL :: fsens,flat 463 LOGICAL ok_flux_surf 464 DATA ok_flux_surf/.FALSE./ 465 !ym pas glop !! 466 COMMON /flux_arp/fsens,flat,ok_flux_surf 467 !$OMP THREADPRIVATE(/flux_arp/) 462 REAL,SAVE :: fsens,flat 463 LOGICAL,SAVE :: ok_flux_surf=.FALSE. 464 !$OMP THREADPRIVATE(fsens,flat,ok_flux_surf) 468 465 469 466 !**************************************************************************************** … … 768 765 r_co2_ppm(:) = co2_ppm 769 766 767 768 !**************************************************************************************** 769 ! 770 ! Calulate t2m and q2m for the case of calculation at land grid points 771 ! t2m and q2m are needed as input to ORCHIDEE 772 ! 773 !**************************************************************************************** 774 IF (nsrf == is_ter) THEN 775 776 DO i = 1, knon 777 zgeo1(i) = RD * yt(i,1) / (0.5*(ypaprs(i,1)+ypplay(i,1))) & 778 * (ypaprs(i,1)-ypplay(i,1)) 779 END DO 780 781 ! Calculate the temperature et relative humidity at 2m and the wind at 10m 782 CALL stdlevvar(klon, knon, is_ter, zxli, & 783 yu(:,1), yv(:,1), yt(:,1), yq(:,1), zgeo1, & 784 yts, yqsurf, yrugos, ypaprs(:,1), ypplay(:,1), & 785 yt2m, yq2m, yt10m, yq10m, yu10m, yustar) 786 787 END IF 788 770 789 !**************************************************************************************** 771 790 ! … … 790 809 AcoefU, AcoefV, BcoefU, BcoefV, & 791 810 ypsref, yu1, yv1, yrugoro, pctsrf, & 811 ylwdown, yq2m, yt2m, & 792 812 ysnow, yqsol, yagesno, ytsoil, & 793 813 yz0_new, yalb1_new, yalb2_new, yevap, yfluxsens, yfluxlat, & 794 814 yqsurf, ytsurf_new, y_dflux_t, y_dflux_q, & 795 y_flux_u1, y_flux_v1 , &796 ylwdown)815 y_flux_u1, y_flux_v1 ) 816 797 817 798 818 CASE(is_lic) -
LMDZ4/trunk/libf/phylmd/phys_local_var_mod.F90
r1054 r1146 71 71 SUBROUTINE phys_local_var_init 72 72 use dimphy 73 use infotrac, ONLY : nbtr 73 74 IMPLICIT NONE 74 75 #include "indicesol.h" -
LMDZ4/trunk/libf/phylmd/phys_output_mod.F90
r1100 r1146 12 12 IMPLICIT NONE 13 13 14 private histdef2d, histdef3d 14 private histdef2d, histdef3d, conf_physoutputs 15 15 16 16 17 integer, parameter :: nfiles = 5 … … 27 28 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 28 29 !! Definition pour chaque variable du niveau d ecriture dans chaque fichier 29 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!/ histmth, histday, histhf, histins /) !!!!!!!!!!!!30 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!/ histmth, histday, histhf, histins /),'!!!!!!!!!!!! 30 31 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 31 32 … … 33 34 integer, private:: levmax(nfiles) 34 35 36 TYPE ctrl_out 37 integer,dimension(5) :: flag 38 character(len=20) :: name 39 END TYPE ctrl_out 40 41 35 42 !!! 1D 36 integer, dimension(nfiles) , save :: flag_phis = (/ 1, 1, 10, 1, 1 /)37 integer, dimension(nfiles) , save :: flag_aire = (/ 1, 1, 10, 1, 1 /)38 integer, dimension(nfiles) , save :: flag_contfracATM = (/ 10, 1, 1, 10, 10 /)39 integer, dimension(nfiles) , save :: flag_contfracOR = (/ 10, 1, 1, 10, 10 /)40 integer, dimension(nfiles) , save :: flag_aireTER = (/ 10, 10, 1, 10, 10 /)43 type(ctrl_out) :: o_phis = ctrl_out((/ 1, 1, 10, 1, 1 /), 'phis') 44 type(ctrl_out) :: o_aire = ctrl_out((/ 1, 1, 10, 1, 1 /),'aire') 45 type(ctrl_out) :: o_contfracATM = ctrl_out((/ 10, 1, 1, 10, 10 /),'contfracATM') 46 type(ctrl_out) :: o_contfracOR = ctrl_out((/ 10, 1, 1, 10, 10 /),'contfracOR') 47 type(ctrl_out) :: o_aireTER = ctrl_out((/ 10, 10, 1, 10, 10 /),'aireTER') 41 48 42 49 !!! 2D 43 integer, dimension(nfiles) , save :: flag_flat = (/ 10, 1, 10, 10, 1 /) 44 integer, dimension(nfiles) , save :: flag_slp = (/ 1, 1, 1, 10, 1 /) 45 integer, dimension(nfiles) , save :: flag_tsol = (/ 1, 1, 1, 1, 1 /) 46 integer, dimension(nfiles) , save :: flag_t2m = (/ 1, 1, 1, 1, 1 /) 47 integer, dimension(nfiles) , save :: flag_t2m_min = (/ 1, 1, 10, 10, 10 /) 48 integer, dimension(nfiles) , save :: flag_t2m_max = (/ 1, 1, 10, 10, 10 /) 49 integer, dimension(nfiles) , save :: flag_t2m_sol = (/ 10, 4, 10, 10, 10 /) 50 integer, dimension(nfiles) , save :: flag_wind10m = (/ 1, 1, 1, 10, 10 /) 51 integer, dimension(nfiles) , save :: flag_wind10max = (/ 10, 1, 10, 10, 10 /) 52 integer, dimension(nfiles) , save :: flag_sicf = (/ 1, 1, 10, 10, 10 /) 53 integer, dimension(nfiles) , save :: flag_q2m = (/ 1, 1, 1, 1, 1 /) 54 integer, dimension(nfiles) , save :: flag_u10m = (/ 1, 1, 1, 1, 1 /) 55 integer, dimension(nfiles) , save :: flag_v10m = (/ 1, 1, 1, 1, 1 /) 56 integer, dimension(nfiles) , save :: flag_psol = (/ 1, 1, 1, 1, 1 /) 57 integer, dimension(nfiles) , save :: flag_qsurf = (/ 1, 10, 10, 10, 10 /) 58 59 integer, dimension(nfiles) , save :: flag_u10m_sol = (/ 10, 4, 10, 10, 10 /) 60 integer, dimension(nfiles) , save :: flag_v10m_sol = (/ 10, 4, 10, 10, 10 /) 61 62 integer, dimension(nfiles) , save :: flag_qsol = (/ 1, 10, 10, 1, 1 /) 63 64 integer, dimension(nfiles),save :: flag_ndayrain = (/ 1, 10, 10, 10, 10 /) 65 integer, dimension(nfiles),save :: flag_precip = (/ 1, 1, 1, 1, 1 /) 66 integer, dimension(nfiles), save :: flag_plul = (/ 1, 1, 1, 1, 10 /) 67 68 integer, dimension(nfiles) , save :: flag_pluc = (/ 1, 1, 1, 1, 10 /) 69 integer, dimension(nfiles) , save :: flag_snow = (/ 1, 1, 10, 1, 10 /) 70 integer, dimension(nfiles) , save :: flag_evap = (/ 1, 1, 10, 1, 10 /) 71 integer, dimension(nfiles) , save :: flag_tops = (/ 1, 1, 10, 10, 10 /) 72 integer, dimension(nfiles) , save :: flag_tops0 = (/ 1, 5, 10, 10, 10 /) 73 integer, dimension(nfiles) , save :: flag_topl = (/ 1, 1, 10, 1, 10 /) 74 integer, dimension(nfiles) , save :: flag_topl0 = (/ 1, 5, 10, 10, 10 /) 75 integer, dimension(nfiles) , save :: flag_SWupTOA = (/ 1, 4, 10, 10, 10 /) 76 integer, dimension(nfiles) , save :: flag_SWupTOAclr = (/ 1, 4, 10, 10, 10 /) 77 integer, dimension(nfiles) , save :: flag_SWdnTOA = (/ 1, 4, 10, 10, 10 /) 78 integer, dimension(nfiles) , save :: flag_SWdnTOAclr = (/ 1, 4, 10, 10, 10 /) 79 integer, dimension(nfiles) , save :: flag_SWup200 = (/ 1, 10, 10, 10, 10 /) 80 integer, dimension(nfiles) , save :: flag_SWup200clr = (/ 10, 1, 10, 10, 10 /) 81 integer, dimension(nfiles) , save :: flag_SWdn200 = (/ 1, 10, 10, 10, 10 /) 82 integer, dimension(nfiles) , save :: flag_SWdn200clr = (/ 10, 1, 10, 10, 10 /) 50 type(ctrl_out) :: o_flat = ctrl_out((/ 10, 1, 10, 10, 1 /),'flat') 51 type(ctrl_out) :: o_slp = ctrl_out((/ 1, 1, 1, 10, 1 /),'slp') 52 type(ctrl_out) :: o_tsol = ctrl_out((/ 1, 1, 1, 1, 1 /),'tsol') 53 type(ctrl_out) :: o_t2m = ctrl_out((/ 1, 1, 1, 1, 1 /),'t2m') 54 type(ctrl_out) :: o_t2m_min = ctrl_out((/ 1, 1, 10, 10, 10 /),'t2m_min') 55 type(ctrl_out) :: o_t2m_max = ctrl_out((/ 1, 1, 10, 10, 10 /),'t2m_max') 56 type(ctrl_out),dimension(4) :: o_t2m_srf = (/ ctrl_out((/ 10, 4, 10, 10, 10 /),'t2m_ter'), & 57 ctrl_out((/ 10, 4, 10, 10, 10 /),'t2m_lic'), & 58 ctrl_out((/ 10, 4, 10, 10, 10 /),'t2m_oce'), & 59 ctrl_out((/ 10, 4, 10, 10, 10 /),'t2m_sic') /) 60 61 type(ctrl_out) :: o_wind10m = ctrl_out((/ 1, 1, 1, 10, 10 /),'wind10m') 62 type(ctrl_out) :: o_wind10max = ctrl_out((/ 10, 1, 10, 10, 10 /),'wind10max') 63 type(ctrl_out) :: o_sicf = ctrl_out((/ 1, 1, 10, 10, 10 /),'sicf') 64 type(ctrl_out) :: o_q2m = ctrl_out((/ 1, 1, 1, 1, 1 /),'q2m') 65 type(ctrl_out) :: o_u10m = ctrl_out((/ 1, 1, 1, 1, 1 /),'u10m') 66 type(ctrl_out) :: o_v10m = ctrl_out((/ 1, 1, 1, 1, 1 /),'v10m') 67 type(ctrl_out) :: o_psol = ctrl_out((/ 1, 1, 1, 1, 1 /),'psol') 68 type(ctrl_out) :: o_qsurf = ctrl_out((/ 1, 10, 10, 10, 10 /),'qsurf') 69 70 type(ctrl_out),dimension(4) :: o_u10m_srf = (/ ctrl_out((/ 10, 4, 10, 10, 10 /),'u10m_ter'), & 71 ctrl_out((/ 10, 4, 10, 10, 10 /),'u10m_lic'), & 72 ctrl_out((/ 10, 4, 10, 10, 10 /),'u10m_oce'), & 73 ctrl_out((/ 10, 4, 10, 10, 10 /),'u10m_sic') /) 74 75 type(ctrl_out),dimension(4) :: o_v10m_srf = (/ ctrl_out((/ 10, 4, 10, 10, 10 /),'v10m_ter'), & 76 ctrl_out((/ 10, 4, 10, 10, 10 /),'v10m_lic'), & 77 ctrl_out((/ 10, 4, 10, 10, 10 /),'v10m_oce'), & 78 ctrl_out((/ 10, 4, 10, 10, 10 /),'v10m_sic') /) 79 80 type(ctrl_out) :: o_qsol = ctrl_out((/ 1, 10, 10, 1, 1 /),'qsol') 81 82 type(ctrl_out) :: o_ndayrain = ctrl_out((/ 1, 10, 10, 10, 10 /),'ndayrain') 83 type(ctrl_out) :: o_precip = ctrl_out((/ 1, 1, 1, 1, 1 /),'precip') 84 type(ctrl_out) :: o_plul = ctrl_out((/ 1, 1, 1, 1, 10 /),'plul') 85 86 type(ctrl_out) :: o_pluc = ctrl_out((/ 1, 1, 1, 1, 10 /),'pluc') 87 type(ctrl_out) :: o_snow = ctrl_out((/ 1, 1, 10, 1, 10 /),'snow') 88 type(ctrl_out) :: o_evap = ctrl_out((/ 1, 1, 10, 1, 10 /),'evap') 89 type(ctrl_out) :: o_tops = ctrl_out((/ 1, 1, 10, 10, 10 /),'tops') 90 type(ctrl_out) :: o_tops0 = ctrl_out((/ 1, 5, 10, 10, 10 /),'tops0') 91 type(ctrl_out) :: o_topl = ctrl_out((/ 1, 1, 10, 1, 10 /),'topl') 92 type(ctrl_out) :: o_topl0 = ctrl_out((/ 1, 5, 10, 10, 10 /),'topl0') 93 type(ctrl_out) :: o_SWupTOA = ctrl_out((/ 1, 4, 10, 10, 10 /),'SWupTOA') 94 type(ctrl_out) :: o_SWupTOAclr = ctrl_out((/ 1, 4, 10, 10, 10 /),'SWupTOAclr') 95 type(ctrl_out) :: o_SWdnTOA = ctrl_out((/ 1, 4, 10, 10, 10 /),'SWdnTOA') 96 type(ctrl_out) :: o_SWdnTOAclr = ctrl_out((/ 1, 4, 10, 10, 10 /),'SWdnTOAclr') 97 type(ctrl_out) :: o_SWup200 = ctrl_out((/ 1, 10, 10, 10, 10 /),'SWup200') 98 type(ctrl_out) :: o_SWup200clr = ctrl_out((/ 10, 1, 10, 10, 10 /),'SWup200clr') 99 type(ctrl_out) :: o_SWdn200 = ctrl_out((/ 1, 10, 10, 10, 10 /),'SWdn200') 100 type(ctrl_out) :: o_SWdn200clr = ctrl_out((/ 10, 1, 10, 10, 10 /),'SWdn200clr') 83 101 84 102 ! arajouter 85 ! integer, dimension(nfiles) , save :: flag_LWupTOA = (/ 1, 4, 10, 10, 10 /) 86 ! integer, dimension(nfiles) , save :: flag_LWupTOAclr = (/ 1, 4, 10, 10, 10 /) 87 ! integer, dimension(nfiles) , save :: flag_LWdnTOA = (/ 1, 4, 10, 10, 10 /) 88 ! integer, dimension(nfiles) , save :: flag_LWdnTOAclr = (/ 1, 4, 10, 10, 10 /) 89 90 integer, dimension(nfiles) , save :: flag_LWup200 = (/ 1, 10, 10, 10, 10 /) 91 integer, dimension(nfiles) , save :: flag_LWup200clr = (/ 1, 10, 10, 10, 10 /) 92 integer, dimension(nfiles) , save :: flag_LWdn200 = (/ 1, 10, 10, 10, 10 /) 93 integer, dimension(nfiles) , save :: flag_LWdn200clr = (/ 1, 10, 10, 10, 10 /) 94 integer, dimension(nfiles) , save :: flag_sols = (/ 1, 1, 10, 1, 10 /) 95 integer, dimension(nfiles) , save :: flag_sols0 = (/ 1, 5, 10, 10, 10 /) 96 integer, dimension(nfiles) , save :: flag_soll = (/ 1, 1, 10, 1, 10 /) 97 integer, dimension(nfiles) , save :: flag_soll0 = (/ 1, 5, 10, 10, 10 /) 98 integer, dimension(nfiles) , save :: flag_radsol = (/ 1, 1, 10, 10, 10 /) 99 integer, dimension(nfiles) , save :: flag_SWupSFC = (/ 1, 4, 10, 10, 10 /) 100 integer, dimension(nfiles) , save :: flag_SWupSFCclr = (/ 1, 4, 10, 10, 10 /) 101 integer, dimension(nfiles) , save :: flag_SWdnSFC = (/ 1, 1, 10, 10, 10 /) 102 integer, dimension(nfiles) , save :: flag_SWdnSFCclr = (/ 1, 4, 10, 10, 10 /) 103 integer, dimension(nfiles) , save :: flag_LWupSFC = (/ 1, 4, 10, 10, 10 /) 104 integer, dimension(nfiles) , save :: flag_LWupSFCclr = (/ 1, 4, 10, 10, 10 /) 105 integer, dimension(nfiles) , save :: flag_LWdnSFC = (/ 1, 4, 10, 10, 10 /) 106 integer, dimension(nfiles) , save :: flag_LWdnSFCclr = (/ 1, 4, 10, 10, 10 /) 107 integer, dimension(nfiles) , save :: flag_bils = (/ 1, 2, 10, 1, 10 /) 108 integer, dimension(nfiles) , save :: flag_sens = (/ 1, 1, 10, 1, 1 /) 109 integer, dimension(nfiles) , save :: flag_fder = (/ 1, 2, 10, 1, 10 /) 110 integer, dimension(nfiles) , save :: flag_ffonte = (/ 1, 10, 10, 10, 10 /) 111 integer, dimension(nfiles) , save :: flag_fqcalving = (/ 1, 10, 10, 10, 10 /) 112 integer, dimension(nfiles) , save :: flag_fqfonte = (/ 1, 10, 10, 10, 10 /) 113 114 integer, dimension(nfiles) , save :: flag_taux_sol = (/ 1, 4, 10, 1, 10 /) 115 integer, dimension(nfiles) , save :: flag_tauy_sol = (/ 1, 4, 10, 1, 10 /) 116 117 integer, dimension(nfiles) , save :: flag_pourc_sol = (/ 1, 4, 10, 1, 10 /) 118 integer, dimension(nfiles) , save :: flag_fract_sol = (/ 1, 4, 10, 1, 10 /) 119 integer, dimension(nfiles) , save :: flag_tsol_sol = (/ 1, 4, 10, 1, 10 /) 120 integer, dimension(nfiles) , save :: flag_sens_sol = (/ 1, 4, 10, 1, 10 /) 121 integer, dimension(nfiles) , save :: flag_lat_sol = (/ 1, 4, 10, 1, 10 /) 122 integer, dimension(nfiles) , save :: flag_flw_sol = (/ 1, 10, 10, 10, 10 /) 123 integer, dimension(nfiles) , save :: flag_fsw_sol = (/ 1, 10, 10, 10, 10 /) 124 integer, dimension(nfiles) , save :: flag_wbils_sol = (/ 1, 10, 10, 10, 10 /) 125 integer, dimension(nfiles) , save :: flag_wbilo_sol = (/ 1, 10, 10, 10, 10 /) 126 127 integer, dimension(nfiles) , save :: flag_cdrm = (/ 1, 10, 10, 1, 10 /) 128 integer, dimension(nfiles) , save :: flag_cdrh = (/ 1, 10, 10, 1, 10 /) 129 integer, dimension(nfiles) , save :: flag_cldl = (/ 1, 1, 10, 10, 10 /) 130 integer, dimension(nfiles) , save :: flag_cldm = (/ 1, 1, 10, 10, 10 /) 131 integer, dimension(nfiles) , save :: flag_cldh = (/ 1, 1, 10, 10, 10 /) 132 integer, dimension(nfiles) , save :: flag_cldt = (/ 1, 1, 2, 10, 10 /) 133 integer, dimension(nfiles) , save :: flag_cldq = (/ 1, 1, 10, 10, 10 /) 134 integer, dimension(nfiles) , save :: flag_lwp = (/ 1, 5, 10, 10, 10 /) 135 integer, dimension(nfiles) , save :: flag_iwp = (/ 1, 5, 10, 10, 10 /) 136 integer, dimension(nfiles) , save :: flag_ue = (/ 1, 10, 10, 10, 10 /) 137 integer, dimension(nfiles) , save :: flag_ve = (/ 1, 10, 10, 10, 10 /) 138 integer, dimension(nfiles) , save :: flag_uq = (/ 1, 10, 10, 10, 10 /) 139 integer, dimension(nfiles) , save :: flag_vq = (/ 1, 10, 10, 10, 10 /) 103 ! type(ctrl_out) :: o_LWupTOA = ctrl_out((/ 1, 4, 10, 10, 10 /),'LWupTOA') 104 ! type(ctrl_out) :: o_LWupTOAclr = ctrl_out((/ 1, 4, 10, 10, 10 /),'LWupTOAclr') 105 ! type(ctrl_out) :: o_LWdnTOA = ctrl_out((/ 1, 4, 10, 10, 10 /),'LWdnTOA') 106 ! type(ctrl_out) :: o_LWdnTOAclr = ctrl_out((/ 1, 4, 10, 10, 10 /),'LWdnTOAclr') 107 108 type(ctrl_out) :: o_LWup200 = ctrl_out((/ 1, 10, 10, 10, 10 /),'LWup200') 109 type(ctrl_out) :: o_LWup200clr = ctrl_out((/ 1, 10, 10, 10, 10 /),'LWup200clr') 110 type(ctrl_out) :: o_LWdn200 = ctrl_out((/ 1, 10, 10, 10, 10 /),'LWdn200') 111 type(ctrl_out) :: o_LWdn200clr = ctrl_out((/ 1, 10, 10, 10, 10 /),'LWdn200clr') 112 type(ctrl_out) :: o_sols = ctrl_out((/ 1, 1, 10, 1, 10 /),'sols') 113 type(ctrl_out) :: o_sols0 = ctrl_out((/ 1, 5, 10, 10, 10 /),'sols0') 114 type(ctrl_out) :: o_soll = ctrl_out((/ 1, 1, 10, 1, 10 /),'soll') 115 type(ctrl_out) :: o_soll0 = ctrl_out((/ 1, 5, 10, 10, 10 /),'soll0') 116 type(ctrl_out) :: o_radsol = ctrl_out((/ 1, 1, 10, 10, 10 /),'radsol') 117 type(ctrl_out) :: o_SWupSFC = ctrl_out((/ 1, 4, 10, 10, 10 /),'SWupSFC') 118 type(ctrl_out) :: o_SWupSFCclr = ctrl_out((/ 1, 4, 10, 10, 10 /),'SWupSFCclr') 119 type(ctrl_out) :: o_SWdnSFC = ctrl_out((/ 1, 1, 10, 10, 10 /),'SWdnSFC') 120 type(ctrl_out) :: o_SWdnSFCclr = ctrl_out((/ 1, 4, 10, 10, 10 /),'SWdnSFCclr') 121 type(ctrl_out) :: o_LWupSFC = ctrl_out((/ 1, 4, 10, 10, 10 /),'LWupSFC') 122 type(ctrl_out) :: o_LWupSFCclr = ctrl_out((/ 1, 4, 10, 10, 10 /),'LWupSFCclr') 123 type(ctrl_out) :: o_LWdnSFC = ctrl_out((/ 1, 4, 10, 10, 10 /),'LWdnSFC') 124 type(ctrl_out) :: o_LWdnSFCclr = ctrl_out((/ 1, 4, 10, 10, 10 /),'LWdnSFCclr') 125 type(ctrl_out) :: o_bils = ctrl_out((/ 1, 2, 10, 1, 10 /),'bils') 126 type(ctrl_out) :: o_sens = ctrl_out((/ 1, 1, 10, 1, 1 /),'sens') 127 type(ctrl_out) :: o_fder = ctrl_out((/ 1, 2, 10, 1, 10 /),'fder') 128 type(ctrl_out) :: o_ffonte = ctrl_out((/ 1, 10, 10, 10, 10 /),'ffonte') 129 type(ctrl_out) :: o_fqcalving = ctrl_out((/ 1, 10, 10, 10, 10 /),'fqcalving') 130 type(ctrl_out) :: o_fqfonte = ctrl_out((/ 1, 10, 10, 10, 10 /),'fqfonte') 131 132 type(ctrl_out),dimension(4) :: o_taux_srf = (/ ctrl_out((/ 1, 4, 10, 1, 10 /),'taux_ter'), & 133 ctrl_out((/ 1, 4, 10, 1, 10 /),'taux_lic'), & 134 ctrl_out((/ 1, 4, 10, 1, 10 /),'taux_oce'), & 135 ctrl_out((/ 1, 4, 10, 1, 10 /),'taux_sic') /) 136 137 type(ctrl_out),dimension(4) :: o_tauy_srf = (/ ctrl_out((/ 1, 4, 10, 1, 10 /),'tauy_ter'), & 138 ctrl_out((/ 1, 4, 10, 1, 10 /),'tauy_lic'), & 139 ctrl_out((/ 1, 4, 10, 1, 10 /),'tauy_oce'), & 140 ctrl_out((/ 1, 4, 10, 1, 10 /),'tauy_sic') /) 141 142 143 type(ctrl_out),dimension(4) :: o_pourc_srf = (/ ctrl_out((/ 1, 4, 10, 1, 10 /),'pourc_ter'), & 144 ctrl_out((/ 1, 4, 10, 1, 10 /),'pourc_lic'), & 145 ctrl_out((/ 1, 4, 10, 1, 10 /),'pourc_oce'), & 146 ctrl_out((/ 1, 4, 10, 1, 10 /),'pourc_sic') /) 147 148 type(ctrl_out),dimension(4) :: o_fract_srf = (/ ctrl_out((/ 1, 4, 10, 1, 10 /),'fract_ter'), & 149 ctrl_out((/ 1, 4, 10, 1, 10 /),'fract_lic'), & 150 ctrl_out((/ 1, 4, 10, 1, 10 /),'fract_oce'), & 151 ctrl_out((/ 1, 4, 10, 1, 10 /),'fract_sic') /) 152 153 type(ctrl_out),dimension(4) :: o_tsol_srf = (/ ctrl_out((/ 1, 4, 10, 1, 10 /),'tsol_ter'), & 154 ctrl_out((/ 1, 4, 10, 1, 10 /),'tsol_lic'), & 155 ctrl_out((/ 1, 4, 10, 1, 10 /),'tsol_oce'), & 156 ctrl_out((/ 1, 4, 10, 1, 10 /),'tsol_sic') /) 157 158 type(ctrl_out),dimension(4) :: o_sens_srf = (/ ctrl_out((/ 1, 4, 10, 1, 10 /),'sens_ter'), & 159 ctrl_out((/ 1, 4, 10, 1, 10 /),'sens_lic'), & 160 ctrl_out((/ 1, 4, 10, 1, 10 /),'sens_oce'), & 161 ctrl_out((/ 1, 4, 10, 1, 10 /),'sens_sic') /) 162 163 type(ctrl_out),dimension(4) :: o_lat_srf = (/ ctrl_out((/ 1, 4, 10, 1, 10 /),'lat_ter'), & 164 ctrl_out((/ 1, 4, 10, 1, 10 /),'lat_lic'), & 165 ctrl_out((/ 1, 4, 10, 1, 10 /),'lat_oce'), & 166 ctrl_out((/ 1, 4, 10, 1, 10 /),'lat_sic') /) 167 168 type(ctrl_out),dimension(4) :: o_flw_srf = (/ ctrl_out((/ 1, 10, 10, 10, 10 /),'flw_ter'), & 169 ctrl_out((/ 1, 10, 10, 10, 10 /),'flw_lic'), & 170 ctrl_out((/ 1, 10, 10, 10, 10 /),'flw_oce'), & 171 ctrl_out((/ 1, 10, 10, 10, 10 /),'flw_sic') /) 172 173 type(ctrl_out),dimension(4) :: o_fsw_srf = (/ ctrl_out((/ 1, 10, 10, 10, 10 /),'fsw_ter'), & 174 ctrl_out((/ 1, 10, 10, 10, 10 /),'fsw_lic'), & 175 ctrl_out((/ 1, 10, 10, 10, 10 /),'fsw_oce'), & 176 ctrl_out((/ 1, 10, 10, 10, 10 /),'fsw_sic') /) 177 178 type(ctrl_out),dimension(4) :: o_wbils_srf = (/ ctrl_out((/ 1, 10, 10, 10, 10 /),'wbils_ter'), & 179 ctrl_out((/ 1, 10, 10, 10, 10 /),'wbils_lic'), & 180 ctrl_out((/ 1, 10, 10, 10, 10 /),'wbils_oce'), & 181 ctrl_out((/ 1, 10, 10, 10, 10 /),'wbils_sic') /) 182 183 type(ctrl_out),dimension(4) :: o_wbilo_srf = (/ ctrl_out((/ 1, 10, 10, 10, 10 /),'wbilo_ter'), & 184 ctrl_out((/ 1, 10, 10, 10, 10 /),'wbilo_lic'), & 185 ctrl_out((/ 1, 10, 10, 10, 10 /),'wbilo_oce'), & 186 ctrl_out((/ 1, 10, 10, 10, 10 /),'wbilo_sic') /) 187 188 189 type(ctrl_out) :: o_cdrm = ctrl_out((/ 1, 10, 10, 1, 10 /),'cdrm') 190 type(ctrl_out) :: o_cdrh = ctrl_out((/ 1, 10, 10, 1, 10 /),'cdrh') 191 type(ctrl_out) :: o_cldl = ctrl_out((/ 1, 1, 10, 10, 10 /),'cldl') 192 type(ctrl_out) :: o_cldm = ctrl_out((/ 1, 1, 10, 10, 10 /),'cldm') 193 type(ctrl_out) :: o_cldh = ctrl_out((/ 1, 1, 10, 10, 10 /),'cldh') 194 type(ctrl_out) :: o_cldt = ctrl_out((/ 1, 1, 2, 10, 10 /),'cldt') 195 type(ctrl_out) :: o_cldq = ctrl_out((/ 1, 1, 10, 10, 10 /),'cldq') 196 type(ctrl_out) :: o_lwp = ctrl_out((/ 1, 5, 10, 10, 10 /),'lwp') 197 type(ctrl_out) :: o_iwp = ctrl_out((/ 1, 5, 10, 10, 10 /),'iwp') 198 type(ctrl_out) :: o_ue = ctrl_out((/ 1, 10, 10, 10, 10 /),'ue') 199 type(ctrl_out) :: o_ve = ctrl_out((/ 1, 10, 10, 10, 10 /),'ve') 200 type(ctrl_out) :: o_uq = ctrl_out((/ 1, 10, 10, 10, 10 /),'uq') 201 type(ctrl_out) :: o_vq = ctrl_out((/ 1, 10, 10, 10, 10 /),'vq') 140 202 141 integer, dimension(nfiles) , save :: flag_cape = (/ 1, 10, 10, 10, 10 /)142 integer, dimension(nfiles) , save :: flag_pbase = (/ 1, 10, 10, 10, 10 /)143 integer, dimension(nfiles) , save :: flag_ptop = (/ 1, 4, 10, 10, 10 /)144 integer, dimension(nfiles) , save :: flag_fbase = (/ 1, 10, 10, 10, 10 /)145 integer, dimension(nfiles) , save :: flag_prw = (/ 1, 1, 10, 10, 10 /)146 147 integer, dimension(nfiles) , save :: flag_s_pblh = (/ 1, 10, 10, 1, 1 /)148 integer, dimension(nfiles) , save :: flag_s_pblt = (/ 1, 10, 10, 1, 1 /)149 integer, dimension(nfiles) , save :: flag_s_lcl = (/ 1, 10, 10, 1, 10 /)150 integer, dimension(nfiles) , save :: flag_s_capCL = (/ 1, 10, 10, 1, 10 /)151 integer, dimension(nfiles) , save :: flag_s_oliqCL = (/ 1, 10, 10, 1, 10 /)152 integer, dimension(nfiles) , save :: flag_s_cteiCL = (/ 1, 10, 10, 1, 1 /)153 integer, dimension(nfiles) , save :: flag_s_therm = (/ 1, 10, 10, 1, 1 /)154 integer, dimension(nfiles) , save :: flag_s_trmb1 = (/ 1, 10, 10, 1, 10 /)155 integer, dimension(nfiles) , save :: flag_s_trmb2 = (/ 1, 10, 10, 1, 10 /)156 integer, dimension(nfiles) , save :: flag_s_trmb3 = (/ 1, 10, 10, 1, 10 /)157 158 integer, dimension(nfiles) , save :: flag_slab_bils = (/ 1, 1, 10, 10, 10 /)159 160 integer, dimension(nfiles) , save :: flag_ale_bl = (/ 1, 1, 1, 1, 10 /)161 integer, dimension(nfiles) , save :: flag_alp_bl = (/ 1, 1, 1, 1, 10 /)162 integer, dimension(nfiles) , save :: flag_ale_wk = (/ 1, 1, 1, 1, 10 /)163 integer, dimension(nfiles) , save :: flag_alp_wk = (/ 1, 1, 1, 1, 10 /)164 165 integer, dimension(nfiles) , save :: flag_ale = (/ 1, 1, 1, 1, 10 /)166 integer, dimension(nfiles) , save :: flag_alp = (/ 1, 1, 1, 1, 10 /)167 integer, dimension(nfiles) , save :: flag_cin = (/ 1, 1, 1, 1, 10 /)168 integer, dimension(nfiles) , save :: flag_wape = (/ 1, 1, 1, 1, 10 /)203 type(ctrl_out) :: o_cape = ctrl_out((/ 1, 10, 10, 10, 10 /),'cape') 204 type(ctrl_out) :: o_pbase = ctrl_out((/ 1, 10, 10, 10, 10 /),'pbase') 205 type(ctrl_out) :: o_ptop = ctrl_out((/ 1, 4, 10, 10, 10 /),'ptop') 206 type(ctrl_out) :: o_fbase = ctrl_out((/ 1, 10, 10, 10, 10 /),'fbase') 207 type(ctrl_out) :: o_prw = ctrl_out((/ 1, 1, 10, 10, 10 /),'prw') 208 209 type(ctrl_out) :: o_s_pblh = ctrl_out((/ 1, 10, 10, 1, 1 /),'s_pblh') 210 type(ctrl_out) :: o_s_pblt = ctrl_out((/ 1, 10, 10, 1, 1 /),'s_pblt') 211 type(ctrl_out) :: o_s_lcl = ctrl_out((/ 1, 10, 10, 1, 10 /),'s_lcl') 212 type(ctrl_out) :: o_s_capCL = ctrl_out((/ 1, 10, 10, 1, 10 /),'s_capCL') 213 type(ctrl_out) :: o_s_oliqCL = ctrl_out((/ 1, 10, 10, 1, 10 /),'s_oliqCL') 214 type(ctrl_out) :: o_s_cteiCL = ctrl_out((/ 1, 10, 10, 1, 1 /),'s_cteiCL') 215 type(ctrl_out) :: o_s_therm = ctrl_out((/ 1, 10, 10, 1, 1 /),'s_therm') 216 type(ctrl_out) :: o_s_trmb1 = ctrl_out((/ 1, 10, 10, 1, 10 /),'s_trmb1') 217 type(ctrl_out) :: o_s_trmb2 = ctrl_out((/ 1, 10, 10, 1, 10 /),'s_trmb2') 218 type(ctrl_out) :: o_s_trmb3 = ctrl_out((/ 1, 10, 10, 1, 10 /),'s_trmb3') 219 220 type(ctrl_out) :: o_slab_bils = ctrl_out((/ 1, 1, 10, 10, 10 /),'slab_bils_oce') 221 222 type(ctrl_out) :: o_ale_bl = ctrl_out((/ 1, 1, 1, 1, 10 /),'ale_bl') 223 type(ctrl_out) :: o_alp_bl = ctrl_out((/ 1, 1, 1, 1, 10 /),'alp_bl') 224 type(ctrl_out) :: o_ale_wk = ctrl_out((/ 1, 1, 1, 1, 10 /),'ale_wk') 225 type(ctrl_out) :: o_alp_wk = ctrl_out((/ 1, 1, 1, 1, 10 /),'alp_wk') 226 227 type(ctrl_out) :: o_ale = ctrl_out((/ 1, 1, 1, 1, 10 /),'ale') 228 type(ctrl_out) :: o_alp = ctrl_out((/ 1, 1, 1, 1, 10 /),'alp') 229 type(ctrl_out) :: o_cin = ctrl_out((/ 1, 1, 1, 1, 10 /),'cin') 230 type(ctrl_out) :: o_wape = ctrl_out((/ 1, 1, 1, 1, 10 /),'wape') 169 231 170 232 … … 177 239 ! on ecrit ph a 500 au niv 3 178 240 179 integer, dimension(nfiles) , save :: flag_ulevsSTD = (/ 1, 1, 3, 10, 10 /) 180 integer, dimension(nfiles) , save :: flag_vlevsSTD = (/ 1, 1, 3, 10, 10 /) 181 integer, dimension(nfiles) , save :: flag_wlevsSTD = (/ 1, 1, 10, 10, 10 /) 182 integer, dimension(nfiles) , save :: flag_tlevsSTD = (/ 10, 10, 3, 10, 10 /) 183 integer, dimension(nfiles) , save :: flag_qlevsSTD = (/ 10, 10, 3, 10, 10 /) 184 integer, dimension(nfiles) , save :: flag_philevsSTD = (/ 1, 1, 1, 10, 10 /) 185 186 integer, dimension(nfiles) , save :: flag_t_oce_sic = (/ 1, 10, 10, 10, 10 /) 187 188 integer, dimension(nfiles) , save :: flag_weakinv = (/ 10, 1, 10, 10, 10 /) 189 integer, dimension(nfiles) , save :: flag_dthmin = (/ 10, 1, 10, 10, 10 /) 190 integer, dimension(nfiles) , save :: flag_u10_sol = (/ 10, 4, 10, 10, 10 /) 191 integer, dimension(nfiles) , save :: flag_v10_sol = (/ 10, 4, 10, 10, 10 /) 192 integer, dimension(nfiles) , save :: flag_cldtau = (/ 10, 5, 10, 10, 10 /) 193 integer, dimension(nfiles) , save :: flag_cldemi = (/ 10, 5, 10, 10, 10 /) 194 integer, dimension(nfiles) , save :: flag_rh2m = (/ 10, 5, 10, 10, 10 /) 195 integer, dimension(nfiles) , save :: flag_qsat2m = (/ 10, 5, 10, 10, 10 /) 196 integer, dimension(nfiles) , save :: flag_tpot = (/ 10, 5, 10, 10, 10 /) 197 integer, dimension(nfiles) , save :: flag_tpote = (/ 10, 5, 10, 10, 10 /) 198 integer, dimension(nfiles) , save :: flag_tke = (/ 4, 10, 10, 10, 10 /) 199 integer, dimension(nfiles) , save :: flag_tke_max = (/ 4, 10, 10, 10, 10 /) 200 integer, dimension(nfiles) , save :: flag_tke_sol = (/ 10, 4, 10, 10, 10 /) 201 integer, dimension(nfiles) , save :: flag_tke_max_sol = (/ 10, 4, 10, 10, 10 /) 202 integer, dimension(nfiles) , save :: flag_kz = (/ 4, 10, 10, 10, 10 /) 203 integer, dimension(nfiles) , save :: flag_kz_max = (/ 4, 10, 10, 10, 10 /) 204 integer, dimension(nfiles) , save :: flag_SWnetOR = (/ 10, 10, 2, 10, 10 /) 205 integer, dimension(nfiles) , save :: flag_SWdownOR = (/ 10, 10, 2, 10, 10 /) 206 integer, dimension(nfiles) , save :: flag_LWdownOR = (/ 10, 10, 2, 10, 10 /) 207 208 integer, dimension(nfiles) , save :: flag_snowl = (/ 10, 1, 10, 10, 10 /) 209 integer, dimension(nfiles) , save :: flag_cape_max = (/ 10, 1, 10, 10, 10 /) 210 integer, dimension(nfiles) , save :: flag_solldown = (/ 10, 1, 10, 1, 10 /) 211 212 integer, dimension(nfiles) , save :: flag_dtsvdfo = (/ 10, 10, 10, 1, 10 /) 213 integer, dimension(nfiles) , save :: flag_dtsvdft = (/ 10, 10, 10, 1, 10 /) 214 integer, dimension(nfiles) , save :: flag_dtsvdfg = (/ 10, 10, 10, 1, 10 /) 215 integer, dimension(nfiles) , save :: flag_dtsvdfi = (/ 10, 10, 10, 1, 10 /) 216 integer, dimension(nfiles) , save :: flag_rugs = (/ 10, 10, 10, 1, 1 /) 217 241 242 type(ctrl_out),dimension(4) :: o_uSTDlevs = (/ ctrl_out((/ 1, 1, 3, 10, 10 /),'u850'), & 243 ctrl_out((/ 1, 1, 3, 10, 10 /),'u700'), & 244 ctrl_out((/ 1, 1, 3, 10, 10 /),'u500'), & 245 ctrl_out((/ 1, 1, 3, 10, 10 /),'u200') /) 246 247 type(ctrl_out),dimension(4) :: o_vSTDlevs = (/ ctrl_out((/ 1, 1, 3, 10, 10 /),'v850'), & 248 ctrl_out((/ 1, 1, 3, 10, 10 /),'v700'), & 249 ctrl_out((/ 1, 1, 3, 10, 10 /),'v500'), & 250 ctrl_out((/ 1, 1, 3, 10, 10 /),'v200') /) 251 252 type(ctrl_out),dimension(4) :: o_wSTDlevs = (/ ctrl_out((/ 1, 1, 3, 10, 10 /),'w850'), & 253 ctrl_out((/ 1, 1, 3, 10, 10 /),'w700'), & 254 ctrl_out((/ 1, 1, 3, 10, 10 /),'w500'), & 255 ctrl_out((/ 1, 1, 3, 10, 10 /),'w200') /) 256 257 type(ctrl_out),dimension(4) :: o_tSTDlevs = (/ ctrl_out((/ 1, 1, 3, 10, 10 /),'t850'), & 258 ctrl_out((/ 1, 1, 3, 10, 10 /),'t700'), & 259 ctrl_out((/ 1, 1, 3, 10, 10 /),'t500'), & 260 ctrl_out((/ 1, 1, 3, 10, 10 /),'t200') /) 261 262 type(ctrl_out),dimension(4) :: o_qSTDlevs = (/ ctrl_out((/ 1, 1, 3, 10, 10 /),'q850'), & 263 ctrl_out((/ 1, 1, 3, 10, 10 /),'q700'), & 264 ctrl_out((/ 1, 1, 3, 10, 10 /),'q500'), & 265 ctrl_out((/ 1, 1, 3, 10, 10 /),'q200') /) 266 267 type(ctrl_out),dimension(4) :: o_phiSTDlevs = (/ ctrl_out((/ 1, 1, 3, 10, 10 /),'phi850'), & 268 ctrl_out((/ 1, 1, 3, 10, 10 /),'phi700'), & 269 ctrl_out((/ 1, 1, 3, 10, 10 /),'phi500'), & 270 ctrl_out((/ 1, 1, 3, 10, 10 /),'phi200') /) 271 272 273 type(ctrl_out) :: o_t_oce_sic = ctrl_out((/ 1, 10, 10, 10, 10 /),'t_oce_sic') 274 275 type(ctrl_out) :: o_weakinv = ctrl_out((/ 10, 1, 10, 10, 10 /),'weakinv') 276 type(ctrl_out) :: o_dthmin = ctrl_out((/ 10, 1, 10, 10, 10 /),'dthmin') 277 type(ctrl_out),dimension(4) :: o_u10_srf = (/ ctrl_out((/ 10, 4, 10, 10, 10 /),'u10_ter'), & 278 ctrl_out((/ 10, 4, 10, 10, 10 /),'u10_lic'), & 279 ctrl_out((/ 10, 4, 10, 10, 10 /),'u10_oce'), & 280 ctrl_out((/ 10, 4, 10, 10, 10 /),'u10_sic') /) 281 282 type(ctrl_out),dimension(4) :: o_v10_srf = (/ ctrl_out((/ 10, 4, 10, 10, 10 /),'v10_ter'), & 283 ctrl_out((/ 10, 4, 10, 10, 10 /),'v10_lic'), & 284 ctrl_out((/ 10, 4, 10, 10, 10 /),'v10_oce'), & 285 ctrl_out((/ 10, 4, 10, 10, 10 /),'v10_sic') /) 286 287 type(ctrl_out) :: o_cldtau = ctrl_out((/ 10, 5, 10, 10, 10 /),'cldtau') 288 type(ctrl_out) :: o_cldemi = ctrl_out((/ 10, 5, 10, 10, 10 /),'cldemi') 289 type(ctrl_out) :: o_rh2m = ctrl_out((/ 10, 5, 10, 10, 10 /),'rh2m') 290 type(ctrl_out) :: o_qsat2m = ctrl_out((/ 10, 5, 10, 10, 10 /),'qsat2m') 291 type(ctrl_out) :: o_tpot = ctrl_out((/ 10, 5, 10, 10, 10 /),'tpot') 292 type(ctrl_out) :: o_tpote = ctrl_out((/ 10, 5, 10, 10, 10 /),'tpote') 293 type(ctrl_out) :: o_tke = ctrl_out((/ 4, 10, 10, 10, 10 /),'tke ') 294 type(ctrl_out) :: o_tke_max = ctrl_out((/ 4, 10, 10, 10, 10 /),'tke_max') 295 296 type(ctrl_out),dimension(4) :: o_tke_srf = (/ ctrl_out((/ 10, 4, 10, 10, 10 /),'tke_ter'), & 297 ctrl_out((/ 10, 4, 10, 10, 10 /),'tke_lic'), & 298 ctrl_out((/ 10, 4, 10, 10, 10 /),'tke_oce'), & 299 ctrl_out((/ 10, 4, 10, 10, 10 /),'tke_sic') /) 300 301 type(ctrl_out),dimension(4) :: o_tke_max_srf = (/ ctrl_out((/ 10, 4, 10, 10, 10 /),'tke_max_ter'), & 302 ctrl_out((/ 10, 4, 10, 10, 10 /),'tke_max_lic'), & 303 ctrl_out((/ 10, 4, 10, 10, 10 /),'tke_max_oce'), & 304 ctrl_out((/ 10, 4, 10, 10, 10 /),'tke_max_sic') /) 305 306 type(ctrl_out) :: o_kz = ctrl_out((/ 4, 10, 10, 10, 10 /),'kz') 307 type(ctrl_out) :: o_kz_max = ctrl_out((/ 4, 10, 10, 10, 10 /),'kz_max') 308 type(ctrl_out) :: o_SWnetOR = ctrl_out((/ 10, 10, 2, 10, 10 /),'SWnetOR') 309 type(ctrl_out) :: o_SWdownOR = ctrl_out((/ 10, 10, 2, 10, 10 /),'SWdownOR') 310 type(ctrl_out) :: o_LWdownOR = ctrl_out((/ 10, 10, 2, 10, 10 /),'LWdownOR') 311 312 type(ctrl_out) :: o_snowl = ctrl_out((/ 10, 1, 10, 10, 10 /),'snowl') 313 type(ctrl_out) :: o_cape_max = ctrl_out((/ 10, 1, 10, 10, 10 /),'cape_max') 314 type(ctrl_out) :: o_solldown = ctrl_out((/ 10, 1, 10, 1, 10 /),'solldown') 315 316 type(ctrl_out) :: o_dtsvdfo = ctrl_out((/ 10, 10, 10, 1, 10 /),'dtsvdfo') 317 type(ctrl_out) :: o_dtsvdft = ctrl_out((/ 10, 10, 10, 1, 10 /),'dtsvdft') 318 type(ctrl_out) :: o_dtsvdfg = ctrl_out((/ 10, 10, 10, 1, 10 /),'dtsvdfg') 319 type(ctrl_out) :: o_dtsvdfi = ctrl_out((/ 10, 10, 10, 1, 10 /),'dtsvdfi') 320 type(ctrl_out) :: o_rugs = ctrl_out((/ 10, 10, 10, 1, 1 /),'rugs') 321 322 type(ctrl_out) :: o_topswad = ctrl_out((/ 4, 10, 10, 10, 10 /),'topswad') 323 type(ctrl_out) :: o_topswai = ctrl_out((/ 4, 10, 10, 10, 10 /),'topswai') 324 type(ctrl_out) :: o_solswad = ctrl_out((/ 4, 10, 10, 10, 10 /),'solswad') 325 type(ctrl_out) :: o_solswai = ctrl_out((/ 4, 10, 10, 10, 10 /),'solswai') 218 326 !!!!!!!!!!!!!!!!!!!!!! 3D !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 219 integer, dimension(nfiles) , save :: flag_lwcon = (/ 2, 5, 10, 10, 1 /) 220 integer, dimension(nfiles) , save :: flag_iwcon = (/ 2, 5, 10, 10, 10 /) 221 integer, dimension(nfiles) , save :: flag_temp = (/ 2, 3, 4, 1, 1 /) 222 integer, dimension(nfiles) , save :: flag_theta = (/ 2, 3, 4, 1, 1 /) 223 integer, dimension(nfiles) , save :: flag_ovap = (/ 2, 3, 4, 1, 1 /) 224 integer, dimension(nfiles) , save :: flag_wvapp = (/ 2, 10, 10, 10, 10 /) 225 integer, dimension(nfiles) , save :: flag_geop = (/ 2, 3, 10, 1, 1 /) 226 integer, dimension(nfiles) , save :: flag_vitu = (/ 2, 3, 4, 1, 1 /) 227 integer, dimension(nfiles) , save :: flag_vitv = (/ 2, 3, 4, 1, 1 /) 228 integer, dimension(nfiles) , save :: flag_vitw = (/ 2, 3, 10, 10, 1 /) 229 integer, dimension(nfiles) , save :: flag_pres = (/ 2, 3, 10, 1, 1 /) 230 integer, dimension(nfiles) , save :: flag_rneb = (/ 2, 5, 10, 10, 1 /) 231 integer, dimension(nfiles) , save :: flag_rnebcon = (/ 2, 5, 10, 10, 1 /) 232 integer, dimension(nfiles) , save :: flag_rhum = (/ 2, 10, 10, 10, 10 /) 233 integer, dimension(nfiles) , save :: flag_ozone = (/ 2, 10, 10, 10, 10 /) 234 integer, dimension(nfiles) , save :: flag_upwd = (/ 2, 10, 10, 10, 10 /) 235 integer, dimension(nfiles) , save :: flag_dtphy = (/ 2, 10, 10, 10, 1 /) 236 integer, dimension(nfiles) , save :: flag_dqphy = (/ 2, 10, 10, 10, 1 /) 237 integer, dimension(nfiles) , save :: flag_pr_con_l = (/ 2, 10, 10, 10, 10 /) 238 integer, dimension(nfiles) , save :: flag_pr_con_i = (/ 2, 10, 10, 10, 10 /) 239 integer, dimension(nfiles) , save :: flag_pr_lsc_l = (/ 2, 10, 10, 10, 10 /) 240 integer, dimension(nfiles) , save :: flag_pr_lsc_i = (/ 2, 10, 10, 10, 10 /) 327 type(ctrl_out) :: o_lwcon = ctrl_out((/ 2, 5, 10, 10, 1 /),'lwcon') 328 type(ctrl_out) :: o_iwcon = ctrl_out((/ 2, 5, 10, 10, 10 /),'iwcon') 329 type(ctrl_out) :: o_temp = ctrl_out((/ 2, 3, 4, 1, 1 /),'temp') 330 type(ctrl_out) :: o_theta = ctrl_out((/ 2, 3, 4, 1, 1 /),'theta') 331 type(ctrl_out) :: o_ovap = ctrl_out((/ 2, 3, 4, 1, 1 /),'ovap') 332 type(ctrl_out) :: o_ovapinit = ctrl_out((/ 2, 3, 4, 1, 1 /),'ovapinit') 333 type(ctrl_out) :: o_wvapp = ctrl_out((/ 2, 10, 10, 10, 10 /),'wvapp') 334 type(ctrl_out) :: o_geop = ctrl_out((/ 2, 3, 10, 1, 1 /),'geop') 335 type(ctrl_out) :: o_vitu = ctrl_out((/ 2, 3, 4, 1, 1 /),'vitu') 336 type(ctrl_out) :: o_vitv = ctrl_out((/ 2, 3, 4, 1, 1 /),'vitv') 337 type(ctrl_out) :: o_vitw = ctrl_out((/ 2, 3, 10, 10, 1 /),'vitw') 338 type(ctrl_out) :: o_pres = ctrl_out((/ 2, 3, 10, 1, 1 /),'pres') 339 type(ctrl_out) :: o_rneb = ctrl_out((/ 2, 5, 10, 10, 1 /),'rneb') 340 type(ctrl_out) :: o_rnebcon = ctrl_out((/ 2, 5, 10, 10, 1 /),'rnebcon') 341 type(ctrl_out) :: o_rhum = ctrl_out((/ 2, 10, 10, 10, 10 /),'rhum') 342 type(ctrl_out) :: o_ozone = ctrl_out((/ 2, 10, 10, 10, 10 /),'ozone') 343 type(ctrl_out) :: o_upwd = ctrl_out((/ 2, 10, 10, 10, 10 /),'upwd') 344 type(ctrl_out) :: o_dtphy = ctrl_out((/ 2, 10, 10, 10, 1 /),'dtphy') 345 type(ctrl_out) :: o_dqphy = ctrl_out((/ 2, 10, 10, 10, 1 /),'dqphy') 346 type(ctrl_out) :: o_pr_con_l = ctrl_out((/ 2, 10, 10, 10, 10 /),'pr_con_l') 347 type(ctrl_out) :: o_pr_con_i = ctrl_out((/ 2, 10, 10, 10, 10 /),'pr_con_i') 348 type(ctrl_out) :: o_pr_lsc_l = ctrl_out((/ 2, 10, 10, 10, 10 /),'pr_lsc_l') 349 type(ctrl_out) :: o_pr_lsc_i = ctrl_out((/ 2, 10, 10, 10, 10 /),'pr_lsc_i') 241 350 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 242 351 243 integer, dimension(nfiles) , save :: flag_albe_sol = (/ 3, 4, 10, 1, 10 /) 244 integer, dimension(nfiles) , save :: flag_ages_sol = (/ 3, 10, 10, 10, 10 /) 245 integer, dimension(nfiles) , save :: flag_rugs_sol = (/ 3, 4, 10, 1, 10 /) 246 247 integer, dimension(nfiles) , save :: flag_albs = (/ 3, 10, 10, 1, 10 /) 248 integer, dimension(nfiles) , save :: flag_albslw = (/ 3, 10, 10, 1, 10 /) 249 250 integer, dimension(nfiles) , save :: flag_clwcon = (/ 4, 10, 10, 10, 10 /) 251 integer, dimension(nfiles) , save :: flag_Ma = (/ 4, 10, 10, 10, 10 /) 252 integer, dimension(nfiles) , save :: flag_dnwd = (/ 4, 10, 10, 10, 10 /) 253 integer, dimension(nfiles) , save :: flag_dnwd0 = (/ 4, 10, 10, 10, 10 /) 254 integer, dimension(nfiles) , save :: flag_dtdyn = (/ 4, 10, 10, 10, 1 /) 255 integer, dimension(nfiles) , save :: flag_dqdyn = (/ 4, 10, 10, 10, 1 /) 256 integer, dimension(nfiles) , save :: flag_dudyn = (/ 4, 10, 10, 10, 1 /) !AXC 257 integer, dimension(nfiles) , save :: flag_dvdyn = (/ 4, 10, 10, 10, 1 /) !AXC 258 integer, dimension(nfiles) , save :: flag_dtcon = (/ 4, 5, 10, 10, 10 /) 259 integer, dimension(nfiles) , save :: flag_ducon = (/ 4, 10, 10, 10, 10 /) 260 integer, dimension(nfiles) , save :: flag_dqcon = (/ 4, 5, 10, 10, 10 /) 261 integer, dimension(nfiles) , save :: flag_dtwak = (/ 4, 5, 10, 10, 10 /) 262 integer, dimension(nfiles) , save :: flag_dqwak = (/ 4, 5, 10, 10, 10 /) 263 integer, dimension(nfiles) , save :: flag_wake_h = (/ 4, 5, 10, 10, 10 /) 264 integer, dimension(nfiles) , save :: flag_wake_s = (/ 4, 5, 10, 10, 10 /) 265 integer, dimension(nfiles) , save :: flag_wake_deltat = (/ 4, 5, 10, 10, 10 /) 266 integer, dimension(nfiles) , save :: flag_wake_deltaq = (/ 4, 5, 10, 10, 10 /) 267 integer, dimension(nfiles) , save :: flag_wake_omg = (/ 4, 5, 10, 10, 10 /) 268 integer, dimension(nfiles) , save :: flag_Vprecip = (/ 4, 5, 10, 10, 10 /) 269 integer, dimension(nfiles) , save :: flag_ftd = (/ 4, 5, 10, 10, 10 /) 270 integer, dimension(nfiles) , save :: flag_fqd = (/ 4, 5, 10, 10, 10 /) 271 integer, dimension(nfiles) , save :: flag_dtlsc = (/ 4, 10, 10, 10, 10 /) 272 integer, dimension(nfiles) , save :: flag_dtlschr = (/ 4, 10, 10, 10, 10 /) 273 integer, dimension(nfiles) , save :: flag_dqlsc = (/ 4, 10, 10, 10, 10 /) 274 integer, dimension(nfiles) , save :: flag_dtvdf = (/ 4, 10, 10, 1, 10 /) 275 integer, dimension(nfiles) , save :: flag_dqvdf = (/ 4, 10, 10, 1, 10 /) 276 integer, dimension(nfiles) , save :: flag_dteva = (/ 4, 10, 10, 10, 10 /) 277 integer, dimension(nfiles) , save :: flag_dqeva = (/ 4, 10, 10, 10, 10 /) 278 integer, dimension(nfiles) , save :: flag_ptconv = (/ 4, 10, 10, 10, 10 /) 279 integer, dimension(nfiles) , save :: flag_ratqs = (/ 4, 10, 10, 10, 10 /) 280 integer, dimension(nfiles) , save :: flag_dtthe = (/ 4, 10, 10, 10, 10 /) 281 integer, dimension(nfiles) , save :: flag_f_th = (/ 4, 10, 10, 10, 10 /) 282 integer, dimension(nfiles) , save :: flag_e_th = (/ 4, 10, 10, 10, 10 /) 283 integer, dimension(nfiles) , save :: flag_w_th = (/ 4, 10, 10, 10, 10 /) 284 integer, dimension(nfiles) , save :: flag_lambda_th = (/ 4, 10, 10, 10, 10 /) 285 integer, dimension(nfiles) , save :: flag_q_th = (/ 4, 10, 10, 10, 10 /) 286 integer, dimension(nfiles) , save :: flag_a_th = (/ 4, 10, 10, 10, 10 /) 287 integer, dimension(nfiles) , save :: flag_d_th = (/ 4, 10, 10, 10, 10 /) 288 integer, dimension(nfiles) , save :: flag_f0_th = (/ 4, 10, 10, 10, 10 /) 289 integer, dimension(nfiles) , save :: flag_zmax_th = (/ 4, 10, 10, 10, 10 /) 290 integer, dimension(nfiles) , save :: flag_dqthe = (/ 4, 10, 10, 10, 1 /) 291 integer, dimension(nfiles) , save :: flag_dtajs = (/ 4, 10, 10, 10, 10 /) 292 integer, dimension(nfiles) , save :: flag_dqajs = (/ 4, 10, 10, 10, 10 /) 293 integer, dimension(nfiles) , save :: flag_dtswr = (/ 4, 10, 10, 10, 1 /) 294 integer, dimension(nfiles) , save :: flag_dtsw0 = (/ 4, 10, 10, 10, 10 /) 295 integer, dimension(nfiles) , save :: flag_dtlwr = (/ 4, 10, 10, 10, 1 /) 296 integer, dimension(nfiles) , save :: flag_dtlw0 = (/ 4, 10, 10, 10, 10 /) 297 integer, dimension(nfiles) , save :: flag_dtec = (/ 4, 10, 10, 10, 10 /) 298 integer, dimension(nfiles) , save :: flag_duvdf = (/ 4, 10, 10, 10, 10 /) 299 integer, dimension(nfiles) , save :: flag_dvvdf = (/ 4, 10, 10, 10, 10 /) 300 integer, dimension(nfiles) , save :: flag_duoro = (/ 4, 10, 10, 10, 10 /) 301 integer, dimension(nfiles) , save :: flag_dvoro = (/ 4, 10, 10, 10, 10 /) 302 integer, dimension(nfiles) , save :: flag_dulif = (/ 4, 10, 10, 10, 10 /) 303 integer, dimension(nfiles) , save :: flag_dvlif = (/ 4, 10, 10, 10, 10 /) 304 integer, dimension(nfiles) , save :: flag_trac = (/ 4, 10, 10, 10, 10 /) 305 352 type(ctrl_out),dimension(4) :: o_albe_srf = (/ ctrl_out((/ 3, 4, 10, 1, 10 /),'albe_ter'), & 353 ctrl_out((/ 3, 4, 10, 1, 10 /),'albe_lic'), & 354 ctrl_out((/ 3, 4, 10, 1, 10 /),'albe_oce'), & 355 ctrl_out((/ 3, 4, 10, 1, 10 /),'albe_sic') /) 356 357 type(ctrl_out),dimension(4) :: o_ages_srf = (/ ctrl_out((/ 3, 10, 10, 10, 10 /),'ages_ter'), & 358 ctrl_out((/ 3, 10, 10, 10, 10 /),'ages_lic'), & 359 ctrl_out((/ 3, 10, 10, 10, 10 /),'ages_oce'), & 360 ctrl_out((/ 3, 10, 10, 10, 10 /),'ages_sic') /) 361 362 type(ctrl_out),dimension(4) :: o_rugs_srf = (/ ctrl_out((/ 3, 4, 10, 1, 10 /),'rugs_ter'), & 363 ctrl_out((/ 3, 4, 10, 1, 10 /),'rugs_lic'), & 364 ctrl_out((/ 3, 4, 10, 1, 10 /),'rugs_oce'), & 365 ctrl_out((/ 3, 4, 10, 1, 10 /),'rugs_sic') /) 366 367 type(ctrl_out) :: o_albs = ctrl_out((/ 3, 10, 10, 1, 10 /),'albs') 368 type(ctrl_out) :: o_albslw = ctrl_out((/ 3, 10, 10, 1, 10 /),'albslw') 369 370 type(ctrl_out) :: o_clwcon = ctrl_out((/ 4, 10, 10, 10, 10 /),'clwcon') 371 type(ctrl_out) :: o_Ma = ctrl_out((/ 4, 10, 10, 10, 10 /),'Ma') 372 type(ctrl_out) :: o_dnwd = ctrl_out((/ 4, 10, 10, 10, 10 /),'dnwd') 373 type(ctrl_out) :: o_dnwd0 = ctrl_out((/ 4, 10, 10, 10, 10 /),'dnwd0') 374 type(ctrl_out) :: o_dtdyn = ctrl_out((/ 4, 10, 10, 10, 1 /),'dtdyn') 375 type(ctrl_out) :: o_dqdyn = ctrl_out((/ 4, 10, 10, 10, 1 /),'dqdyn') 376 type(ctrl_out) :: o_dudyn = ctrl_out((/ 4, 10, 10, 10, 1 /),'dudyn') !AXC 377 type(ctrl_out) :: o_dvdyn = ctrl_out((/ 4, 10, 10, 10, 1 /),'dvdyn') !AXC 378 type(ctrl_out) :: o_dtcon = ctrl_out((/ 4, 5, 10, 10, 10 /),'dtcon') 379 type(ctrl_out) :: o_ducon = ctrl_out((/ 4, 10, 10, 10, 10 /),'ducon') 380 type(ctrl_out) :: o_dqcon = ctrl_out((/ 4, 5, 10, 10, 10 /),'dqcon') 381 type(ctrl_out) :: o_dtwak = ctrl_out((/ 4, 5, 10, 10, 10 /),'dtwak') 382 type(ctrl_out) :: o_dqwak = ctrl_out((/ 4, 5, 10, 10, 10 /),'dqwak') 383 type(ctrl_out) :: o_wake_h = ctrl_out((/ 4, 5, 10, 10, 10 /),'wake_h') 384 type(ctrl_out) :: o_wake_s = ctrl_out((/ 4, 5, 10, 10, 10 /),'wake_s') 385 type(ctrl_out) :: o_wake_deltat = ctrl_out((/ 4, 5, 10, 10, 10 /),'wake_deltat') 386 type(ctrl_out) :: o_wake_deltaq = ctrl_out((/ 4, 5, 10, 10, 10 /),'wake_deltaq') 387 type(ctrl_out) :: o_wake_omg = ctrl_out((/ 4, 5, 10, 10, 10 /),'wake_omg') 388 type(ctrl_out) :: o_Vprecip = ctrl_out((/ 10, 10, 10, 10, 10 /),'Vprecip') 389 type(ctrl_out) :: o_ftd = ctrl_out((/ 4, 5, 10, 10, 10 /),'ftd') 390 type(ctrl_out) :: o_fqd = ctrl_out((/ 4, 5, 10, 10, 10 /),'fqd') 391 type(ctrl_out) :: o_dtlsc = ctrl_out((/ 4, 10, 10, 10, 10 /),'dtlsc') 392 type(ctrl_out) :: o_dtlschr = ctrl_out((/ 4, 10, 10, 10, 10 /),'dtlschr') 393 type(ctrl_out) :: o_dqlsc = ctrl_out((/ 4, 10, 10, 10, 10 /),'dqlsc') 394 type(ctrl_out) :: o_dtvdf = ctrl_out((/ 4, 10, 10, 1, 10 /),'dtvdf') 395 type(ctrl_out) :: o_dqvdf = ctrl_out((/ 4, 10, 10, 1, 10 /),'dqvdf') 396 type(ctrl_out) :: o_dteva = ctrl_out((/ 4, 10, 10, 10, 10 /),'dteva') 397 type(ctrl_out) :: o_dqeva = ctrl_out((/ 4, 10, 10, 10, 10 /),'dqeva') 398 type(ctrl_out) :: o_ptconv = ctrl_out((/ 4, 10, 10, 10, 10 /),'ptconv') 399 type(ctrl_out) :: o_ratqs = ctrl_out((/ 4, 10, 10, 10, 10 /),'ratqs') 400 type(ctrl_out) :: o_dtthe = ctrl_out((/ 4, 10, 10, 10, 10 /),'dtthe') 401 type(ctrl_out) :: o_f_th = ctrl_out((/ 4, 10, 10, 10, 10 /),'f_th') 402 type(ctrl_out) :: o_e_th = ctrl_out((/ 4, 10, 10, 10, 10 /),'e_th') 403 type(ctrl_out) :: o_w_th = ctrl_out((/ 4, 10, 10, 10, 10 /),'w_th') 404 type(ctrl_out) :: o_lambda_th = ctrl_out((/ 4, 10, 10, 10, 10 /),'lambda_th') 405 type(ctrl_out) :: o_q_th = ctrl_out((/ 4, 10, 10, 10, 10 /),'q_th') 406 type(ctrl_out) :: o_a_th = ctrl_out((/ 4, 10, 10, 10, 10 /),'a_th') 407 type(ctrl_out) :: o_d_th = ctrl_out((/ 4, 10, 10, 10, 10 /),'d_th') 408 type(ctrl_out) :: o_f0_th = ctrl_out((/ 4, 10, 10, 10, 10 /),'f0_th') 409 type(ctrl_out) :: o_zmax_th = ctrl_out((/ 4, 10, 10, 10, 10 /),'zmax_th') 410 type(ctrl_out) :: o_dqthe = ctrl_out((/ 4, 10, 10, 10, 1 /),'dqthe') 411 type(ctrl_out) :: o_dtajs = ctrl_out((/ 4, 10, 10, 10, 10 /),'dtajs') 412 type(ctrl_out) :: o_dqajs = ctrl_out((/ 4, 10, 10, 10, 10 /),'dqajs') 413 type(ctrl_out) :: o_dtswr = ctrl_out((/ 4, 10, 10, 10, 1 /),'dtswr') 414 type(ctrl_out) :: o_dtsw0 = ctrl_out((/ 4, 10, 10, 10, 10 /),'dtsw0') 415 type(ctrl_out) :: o_dtlwr = ctrl_out((/ 4, 10, 10, 10, 1 /),'dtlwr') 416 type(ctrl_out) :: o_dtlw0 = ctrl_out((/ 4, 10, 10, 10, 10 /),'dtlw0') 417 type(ctrl_out) :: o_dtec = ctrl_out((/ 4, 10, 10, 10, 10 /),'dtec') 418 type(ctrl_out) :: o_duvdf = ctrl_out((/ 4, 10, 10, 10, 10 /),'duvdf') 419 type(ctrl_out) :: o_dvvdf = ctrl_out((/ 4, 10, 10, 10, 10 /),'dvvdf') 420 type(ctrl_out) :: o_duoro = ctrl_out((/ 4, 10, 10, 10, 10 /),'duoro') 421 type(ctrl_out) :: o_dvoro = ctrl_out((/ 4, 10, 10, 10, 10 /),'dvoro') 422 type(ctrl_out) :: o_dulif = ctrl_out((/ 4, 10, 10, 10, 10 /),'dulif') 423 type(ctrl_out) :: o_dvlif = ctrl_out((/ 4, 10, 10, 10, 10 /),'dvlif') 424 425 ! Attention a refaire correctement 426 type(ctrl_out),dimension(2) :: o_trac = (/ ctrl_out((/ 4, 10, 10, 10, 10 /),'trac01'), & 427 ctrl_out((/ 4, 10, 10, 10, 10 /),'trac02') /) 306 428 CONTAINS 307 429 … … 311 433 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 312 434 313 SUBROUTINE phys_output_open(jjmp1,n qmax,nlevSTD,clevSTD,nbteta, &435 SUBROUTINE phys_output_open(jjmp1,nlevSTD,clevSTD,nbteta, & 314 436 ctetaSTD,dtime, presnivs, ok_veget, & 315 ocean, iflag_pbl,ok_mensuel,ok_journe, &316 ok_hf,ok_instan,ok_LES )437 type_ocean, iflag_pbl,ok_mensuel,ok_journe, & 438 ok_hf,ok_instan,ok_LES,ok_ade,ok_aie) 317 439 318 440 USE iophy 319 441 USE dimphy 442 USE infotrac 320 443 USE ioipsl 321 444 USE mod_phys_lmdz_para … … 325 448 include "temps.h" 326 449 include "indicesol.h" 327 include "advtrac.h"328 450 include "clesphys.h" 329 451 include "thermcell.h" 330 452 331 integer :: jjmp1 , nqmax453 integer :: jjmp1 332 454 integer :: nbteta, nlevSTD, radpas 333 455 logical :: ok_mensuel, ok_journe, ok_hf, ok_instan 334 logical :: ok_LES 456 logical :: ok_LES,ok_ade,ok_aie 335 457 real :: dtime 336 458 integer :: idayref … … 338 460 real, dimension(klev) :: presnivs 339 461 character(len=4), dimension(nlevSTD) :: clevSTD 340 integer :: nsrf, k, iq, iiq, iff, i, j 462 integer :: nsrf, k, iq, iiq, iff, i, j, ilev 341 463 logical :: ok_veget 342 464 integer :: iflag_pbl 343 CHARACTER(len= 3) :: bb2465 CHARACTER(len=4) :: bb2 344 466 CHARACTER(len=2) :: bb3 345 character(len=6) :: ocean467 character(len=6) :: type_ocean 346 468 CHARACTER(len=3) :: ctetaSTD(nbteta) 347 469 real, dimension(nfiles) :: ecrit_files … … 355 477 ! entre [lonmin_reg,lonmax_reg] et [latmin_reg,latmax_reg] 356 478 357 logical, dimension(nfiles), save :: ok_reglim = (/ .false., .false., .false., .false., .true. /) 479 logical, dimension(nfiles), save :: ok_reglim = (/ .false., .false., .false., .false., .true. /) 358 480 real, dimension(nfiles), save :: lonmin_reg = (/ 0., -45., 0., 0., -162. /) 359 481 real, dimension(nfiles), save :: lonmax_reg = (/ 90., 45., 90., 90., -144. /) … … 456 578 ! & nhorim, nid_hf3d) 457 579 458 ! CALL histvert(nid_hf3d, "presnivs", &459 ! & "Vertical levels", "mb", &580 ! CALL histvert(nid_hf3d, "presnivs", & 581 ! & "Vertical levels", "mb", & 460 582 ! & klev, presnivs/100., nvertm) 461 583 ! ENDIF 462 584 463 585 !!! Champs 1D !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 464 CALL histdef2d(iff, flag_phis,"phis","Surface geop.height","m2/s2")586 CALL histdef2d(iff,o_phis%flag,o_phis%name,"Surface geop.height", "m2/s2") 465 587 type_ecri(1) = 'once' 466 588 type_ecri(2) = 'once' 467 589 type_ecri(3) = 'once' 468 590 type_ecri(4) = 'once' 469 CALL histdef2d(iff,flag_aire,"aire","Grid area","-") 470 CALL histdef2d(iff,flag_contfracATM,"contfracATM","% sfce ter+lic","-") 591 type_ecri(5) = 'once' 592 CALL histdef2d(iff,o_aire%flag,o_aire%name,"Grid area", "-") 593 CALL histdef2d(iff,o_contfracATM%flag,o_contfracATM%name,"% sfce ter+lic", "-") 471 594 type_ecri(1) = 'ave(X)' 472 595 type_ecri(2) = 'ave(X)' 473 596 type_ecri(3) = 'ave(X)' 474 597 type_ecri(4) = 'inst(X)' 598 type_ecri(5) = 'ave(X)' 475 599 476 600 !!! Champs 2D !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 477 CALL histdef2d(iff,flag_contfracOR,"contfracOR","% sfce terre OR","-" ) 478 CALL histdef2d(iff,flag_aireTER,"aireTER","Grid area CONT","-" ) 479 CALL histdef2d(iff,flag_flat,"flat","Latent heat flux","W/m2") 480 CALL histdef2d(iff,flag_slp,"slp","Sea Level Pressure", "Pa" ) 481 CALL histdef2d(iff,flag_tsol,"tsol","Surface Temperature", "K") 482 CALL histdef2d( iff,flag_t2m,"t2m","Temperature 2m", "K" ) 483 CALL histdef2d(iff,flag_t2m_min,"t2m_min","Temp 2m min", "K" ) 484 CALL histdef2d(iff,flag_t2m_max,"t2m_max", "Temp 2m max", "K" ) 485 CALL histdef2d(iff,flag_wind10m,"wind10m","10-m wind speed","m/s") 486 CALL histdef2d(iff,flag_wind10max,"wind10max","10m wind speed max","m/s") 487 CALL histdef2d(iff,flag_sicf,"sicf","Sea-ice fraction", "-" ) 488 CALL histdef2d(iff,flag_q2m,"q2m","Specific humidity 2m", "kg/kg") 489 CALL histdef2d(iff,flag_u10m,"u10m","Vent zonal 10m", "m/s" ) 490 CALL histdef2d(iff,flag_v10m,"v10m","Vent meridien 10m", "m/s") 491 CALL histdef2d(iff,flag_psol,"psol","Surface Pressure","Pa" ) 492 CALL histdef2d(iff,flag_qsurf,"qsurf","Surface Air humidity", "kg/kg") 601 CALL histdef2d(iff,o_contfracOR%flag,o_contfracOR%name,"% sfce terre OR", "-" ) 602 CALL histdef2d(iff,o_aireTER%flag,o_aireTER%name,"Grid area CONT", "-" ) 603 CALL histdef2d(iff,o_flat%flag,o_flat%name, "Latent heat flux", "W/m2") 604 CALL histdef2d(iff,o_slp%flag,o_slp%name, "Sea Level Pressure", "Pa" ) 605 CALL histdef2d(iff,o_tsol%flag,o_tsol%name, "Surface Temperature", "K") 606 CALL histdef2d(iff,o_t2m%flag,o_t2m%name, "Temperature 2m", "K" ) 607 type_ecri(1) = 't_min(X)' 608 type_ecri(2) = 't_min(X)' 609 type_ecri(3) = 't_min(X)' 610 type_ecri(4) = 't_min(X)' 611 type_ecri(5) = 't_min(X)' 612 CALL histdef2d(iff,o_t2m_min%flag,o_t2m_min%name, "Temp 2m min", "K" ) 613 type_ecri(1) = 't_max(X)' 614 type_ecri(2) = 't_max(X)' 615 type_ecri(3) = 't_max(X)' 616 type_ecri(4) = 't_max(X)' 617 type_ecri(5) = 't_max(X)' 618 CALL histdef2d(iff,o_t2m_max%flag,o_t2m_max%name, "Temp 2m max", "K" ) 619 type_ecri(1) = 'ave(X)' 620 type_ecri(2) = 'ave(X)' 621 type_ecri(3) = 'ave(X)' 622 type_ecri(4) = 'inst(X)' 623 type_ecri(5) = 'ave(X)' 624 CALL histdef2d(iff,o_wind10m%flag,o_wind10m%name, "10-m wind speed", "m/s") 625 CALL histdef2d(iff,o_wind10max%flag,o_wind10max%name, "10m wind speed max", "m/s") 626 CALL histdef2d(iff,o_sicf%flag,o_sicf%name, "Sea-ice fraction", "-" ) 627 CALL histdef2d(iff,o_q2m%flag,o_q2m%name, "Specific humidity 2m", "kg/kg") 628 CALL histdef2d(iff,o_u10m%flag,o_u10m%name, "Vent zonal 10m", "m/s" ) 629 CALL histdef2d(iff,o_v10m%flag,o_v10m%name, "Vent meridien 10m", "m/s") 630 CALL histdef2d(iff,o_psol%flag,o_psol%name, "Surface Pressure", "Pa" ) 631 CALL histdef2d(iff,o_qsurf%flag,o_qsurf%name, "Surface Air humidity", "kg/kg") 493 632 494 633 if (.not. ok_veget) then 495 CALL histdef2d(iff, flag_qsol,"qsol","Soil watter content", "mm" )634 CALL histdef2d(iff,o_qsol%flag,o_qsol%name, "Soil watter content", "mm" ) 496 635 endif 497 636 498 CALL histdef2d(iff, flag_ndayrain,"ndayrain","Number of dayrain(liq+sol)","-")499 CALL histdef2d(iff, flag_precip,"precip","Precip Totale liq+sol","kg/(s*m2)" )500 CALL histdef2d(iff, flag_plul,"plul","Large-scale Precip.","kg/(s*m2)")501 CALL histdef2d(iff, flag_pluc,"pluc","Convective Precip.","kg/(s*m2)")502 CALL histdef2d(iff, flag_snow,"snow","Snow fall","kg/(s*m2)" )503 CALL histdef2d(iff, flag_evap,"evap","Evaporat", "kg/(s*m2)" )504 CALL histdef2d(iff, flag_tops,"tops","Solar rad. at TOA","W/m2")505 CALL histdef2d(iff, flag_tops0,"tops0","CS Solar rad. at TOA", "W/m2")506 CALL histdef2d(iff, flag_topl,"topl","IR rad. at TOA", "W/m2" )507 CALL histdef2d(iff, flag_topl0,"topl0", "IR rad. at TOA","W/m2")508 CALL histdef2d(iff, flag_SWupTOA,"SWupTOA","SWup at TOA","W/m2")509 CALL histdef2d(iff, flag_SWupTOAclr,"SWupTOAclr","SWup clear sky at TOA","W/m2")510 CALL histdef2d(iff, flag_SWdnTOA, "SWdnTOA","SWdn at TOA","W/m2" )511 CALL histdef2d(iff, flag_SWdnTOAclr,"SWdnTOAclr","SWdn clear sky at TOA","W/m2")512 CALL histdef2d(iff, flag_SWup200,"SWup200","SWup at 200mb","W/m2" )513 CALL histdef2d(iff, flag_SWup200clr,"SWup200clr","SWup clear sky at 200mb","W/m2")514 CALL histdef2d(iff, flag_SWdn200,"SWdn200","SWdn at 200mb","W/m2" )515 CALL histdef2d(iff, flag_SWdn200clr,"SWdn200clr","SWdn clear sky at 200mb","W/m2")516 CALL histdef2d(iff, flag_LWup200,"LWup200","LWup at 200mb","W/m2")517 CALL histdef2d(iff, flag_LWup200clr, "LWup200clr","LWup clear sky at 200mb","W/m2")518 CALL histdef2d(iff, flag_LWdn200,"LWdn200","LWdn at 200mb","W/m2")519 CALL histdef2d(iff, flag_LWdn200clr, "LWdn200clr","LWdn clear sky at 200mb","W/m2")520 CALL histdef2d(iff, flag_sols,"sols","Solar rad. at surf.","W/m2")521 CALL histdef2d(iff, flag_sols0,"sols0","Solar rad. at surf.","W/m2")522 CALL histdef2d(iff, flag_soll,"soll","IR rad. at surface","W/m2")523 CALL histdef2d(iff, flag_radsol,"radsol","Rayonnement au sol","W/m2")524 CALL histdef2d(iff, flag_soll0,"soll0","IR rad. at surface","W/m2")525 CALL histdef2d(iff, flag_SWupSFC,"SWupSFC","SWup at surface","W/m2")526 CALL histdef2d(iff, flag_SWupSFCclr,"SWupSFCclr","SWup clear sky at surface","W/m2")527 CALL histdef2d(iff, flag_SWdnSFC,"SWdnSFC","SWdn at surface","W/m2")528 CALL histdef2d(iff, flag_SWdnSFCclr,"SWdnSFCclr","SWdn clear sky at surface","W/m2")529 CALL histdef2d(iff, flag_LWupSFC,"LWupSFC","Upwd. IR rad. at surface","W/m2")530 CALL histdef2d(iff, flag_LWdnSFC,"LWdnSFC","Down. IR rad. at surface","W/m2")531 CALL histdef2d(iff, flag_LWupSFCclr,"LWupSFCclr","CS Upwd. IR rad. at surface","W/m2")532 CALL histdef2d(iff, flag_LWdnSFCclr,"LWdnSFCclr","Down. CS IR rad. at surface","W/m2")533 CALL histdef2d(iff, flag_bils,"bils","Surf. total heat flux","W/m2")534 CALL histdef2d(iff, flag_sens,"sens","Sensible heat flux","W/m2")535 CALL histdef2d(iff, flag_fder,"fder","Heat flux derivation","W/m2")536 CALL histdef2d(iff, flag_ffonte,"ffonte","Thermal flux for snow melting","W/m2")537 CALL histdef2d(iff, flag_fqcalving,"fqcalving","Ice Calving","kg/m2/s")538 CALL histdef2d(iff, flag_fqfonte,"fqfonte","Land ice melt","kg/m2/s")637 CALL histdef2d(iff,o_ndayrain%flag,o_ndayrain%name, "Number of dayrain(liq+sol)", "-") 638 CALL histdef2d(iff,o_precip%flag,o_precip%name, "Precip Totale liq+sol", "kg/(s*m2)" ) 639 CALL histdef2d(iff,o_plul%flag,o_plul%name, "Large-scale Precip.", "kg/(s*m2)") 640 CALL histdef2d(iff,o_pluc%flag,o_pluc%name, "Convective Precip.", "kg/(s*m2)") 641 CALL histdef2d(iff,o_snow%flag,o_snow%name, "Snow fall", "kg/(s*m2)" ) 642 CALL histdef2d(iff,o_evap%flag,o_evap%name, "Evaporat", "kg/(s*m2)" ) 643 CALL histdef2d(iff,o_tops%flag,o_tops%name, "Solar rad. at TOA", "W/m2") 644 CALL histdef2d(iff,o_tops0%flag,o_tops0%name, "CS Solar rad. at TOA", "W/m2") 645 CALL histdef2d(iff,o_topl%flag,o_topl%name, "IR rad. at TOA", "W/m2" ) 646 CALL histdef2d(iff,o_topl0%flag,o_topl0%name, "IR rad. at TOA", "W/m2") 647 CALL histdef2d(iff,o_SWupTOA%flag,o_SWupTOA%name, "SWup at TOA", "W/m2") 648 CALL histdef2d(iff,o_SWupTOAclr%flag,o_SWupTOAclr%name, "SWup clear sky at TOA", "W/m2") 649 CALL histdef2d(iff,o_SWdnTOA%flag,o_SWdnTOA%name, "SWdn at TOA", "W/m2" ) 650 CALL histdef2d(iff,o_SWdnTOAclr%flag,o_SWdnTOAclr%name, "SWdn clear sky at TOA", "W/m2") 651 CALL histdef2d(iff,o_SWup200%flag,o_SWup200%name, "SWup at 200mb", "W/m2" ) 652 CALL histdef2d(iff,o_SWup200clr%flag,o_SWup200clr%name, "SWup clear sky at 200mb", "W/m2") 653 CALL histdef2d(iff,o_SWdn200%flag,o_SWdn200%name, "SWdn at 200mb", "W/m2" ) 654 CALL histdef2d(iff,o_SWdn200clr%flag,o_SWdn200clr%name, "SWdn clear sky at 200mb", "W/m2") 655 CALL histdef2d(iff,o_LWup200%flag,o_LWup200%name, "LWup at 200mb", "W/m2") 656 CALL histdef2d(iff,o_LWup200clr%flag,o_LWup200clr%name, "LWup clear sky at 200mb", "W/m2") 657 CALL histdef2d(iff,o_LWdn200%flag,o_LWdn200%name, "LWdn at 200mb", "W/m2") 658 CALL histdef2d(iff,o_LWdn200clr%flag,o_LWdn200clr%name, "LWdn clear sky at 200mb", "W/m2") 659 CALL histdef2d(iff,o_sols%flag,o_sols%name, "Solar rad. at surf.", "W/m2") 660 CALL histdef2d(iff,o_sols0%flag,o_sols0%name, "Solar rad. at surf.", "W/m2") 661 CALL histdef2d(iff,o_soll%flag,o_soll%name, "IR rad. at surface", "W/m2") 662 CALL histdef2d(iff,o_radsol%flag,o_radsol%name, "Rayonnement au sol", "W/m2") 663 CALL histdef2d(iff,o_soll0%flag,o_soll0%name, "IR rad. at surface", "W/m2") 664 CALL histdef2d(iff,o_SWupSFC%flag,o_SWupSFC%name, "SWup at surface", "W/m2") 665 CALL histdef2d(iff,o_SWupSFCclr%flag,o_SWupSFCclr%name, "SWup clear sky at surface", "W/m2") 666 CALL histdef2d(iff,o_SWdnSFC%flag,o_SWdnSFC%name, "SWdn at surface", "W/m2") 667 CALL histdef2d(iff,o_SWdnSFCclr%flag,o_SWdnSFCclr%name, "SWdn clear sky at surface", "W/m2") 668 CALL histdef2d(iff,o_LWupSFC%flag,o_LWupSFC%name, "Upwd. IR rad. at surface", "W/m2") 669 CALL histdef2d(iff,o_LWdnSFC%flag,o_LWdnSFC%name, "Down. IR rad. at surface", "W/m2") 670 CALL histdef2d(iff,o_LWupSFCclr%flag,o_LWupSFCclr%name, "CS Upwd. IR rad. at surface", "W/m2") 671 CALL histdef2d(iff,o_LWdnSFCclr%flag,o_LWdnSFCclr%name, "Down. CS IR rad. at surface", "W/m2") 672 CALL histdef2d(iff,o_bils%flag,o_bils%name, "Surf. total heat flux", "W/m2") 673 CALL histdef2d(iff,o_sens%flag,o_sens%name, "Sensible heat flux", "W/m2") 674 CALL histdef2d(iff,o_fder%flag,o_fder%name, "Heat flux derivation", "W/m2") 675 CALL histdef2d(iff,o_ffonte%flag,o_ffonte%name, "Thermal flux for snow melting", "W/m2") 676 CALL histdef2d(iff,o_fqcalving%flag,o_fqcalving%name, "Ice Calving", "kg/m2/s") 677 CALL histdef2d(iff,o_fqfonte%flag,o_fqfonte%name, "Land ice melt", "kg/m2/s") 539 678 540 679 DO nsrf = 1, nbsrf 541 CALL histdef2d(iff, flag_pourc_sol,"pourc_"//clnsurf(nsrf),"% "//clnsurf(nsrf),"%")542 CALL histdef2d(iff, flag_fract_sol,"fract_"//clnsurf(nsrf),"Fraction "//clnsurf(nsrf),"1")543 CALL histdef2d(iff, flag_taux_sol,"taux_"//clnsurf(nsrf),"Zonal wind stress"//clnsurf(nsrf),"Pa")544 CALL histdef2d(iff, flag_tauy_sol,"tauy_"//clnsurf(nsrf),"Meridional wind stress "//clnsurf(nsrf),"Pa")545 CALL histdef2d(iff, flag_tsol_sol,"tsol_"//clnsurf(nsrf),"Temperature "//clnsurf(nsrf),"K")546 CALL histdef2d(iff, flag_u10m_sol,"u10m_"//clnsurf(nsrf),"Vent Zonal 10m "//clnsurf(nsrf),"m/s")547 CALL histdef2d(iff, flag_v10m_sol,"v10m_"//clnsurf(nsrf),"Vent meredien 10m "//clnsurf(nsrf),"m/s")548 CALL histdef2d(iff, flag_t2m_sol,"t2m_"//clnsurf(nsrf),"Temp 2m "//clnsurf(nsrf),"K")549 CALL histdef2d(iff, flag_sens_sol,"sens_"//clnsurf(nsrf),"Sensible heat flux "//clnsurf(nsrf),"W/m2")550 CALL histdef2d(iff, flag_lat_sol,"lat_"//clnsurf(nsrf),"Latent heat flux "//clnsurf(nsrf),"W/m2")551 CALL histdef2d(iff, flag_flw_sol,"flw_"//clnsurf(nsrf),"LW "//clnsurf(nsrf),"W/m2")552 CALL histdef2d(iff, flag_fsw_sol,"fsw_"//clnsurf(nsrf),"SW "//clnsurf(nsrf),"W/m2")553 CALL histdef2d(iff, flag_wbils_sol,"wbils_"//clnsurf(nsrf),"Bilan sol "//clnsurf(nsrf),"W/m2" )554 CALL histdef2d(iff, flag_wbilo_sol,"wbilo_"//clnsurf(nsrf),"Bilan eau "//clnsurf(nsrf),"kg/(m2*s)")680 CALL histdef2d(iff,o_pourc_srf(nsrf)%flag,o_pourc_srf(nsrf)%name,"% "//clnsurf(nsrf),"%") 681 CALL histdef2d(iff,o_fract_srf(nsrf)%flag,o_fract_srf(nsrf)%name,"Fraction "//clnsurf(nsrf),"1") 682 CALL histdef2d(iff,o_taux_srf(nsrf)%flag,o_taux_srf(nsrf)%name,"Zonal wind stress"//clnsurf(nsrf),"Pa") 683 CALL histdef2d(iff,o_tauy_srf(nsrf)%flag,o_tauy_srf(nsrf)%name,"Meridional wind stress "//clnsurf(nsrf),"Pa") 684 CALL histdef2d(iff,o_tsol_srf(nsrf)%flag,o_tsol_srf(nsrf)%name,"Temperature "//clnsurf(nsrf),"K") 685 CALL histdef2d(iff,o_u10m_srf(nsrf)%flag,o_u10m_srf(nsrf)%name,"Vent Zonal 10m "//clnsurf(nsrf),"m/s") 686 CALL histdef2d(iff,o_v10m_srf(nsrf)%flag,o_v10m_srf(nsrf)%name,"Vent meredien 10m "//clnsurf(nsrf),"m/s") 687 CALL histdef2d(iff,o_t2m_srf(nsrf)%flag,o_t2m_srf(nsrf)%name,"Temp 2m "//clnsurf(nsrf),"K") 688 CALL histdef2d(iff,o_sens_srf(nsrf)%flag,o_sens_srf(nsrf)%name,"Sensible heat flux "//clnsurf(nsrf),"W/m2") 689 CALL histdef2d(iff,o_lat_srf(nsrf)%flag,o_lat_srf(nsrf)%name,"Latent heat flux "//clnsurf(nsrf),"W/m2") 690 CALL histdef2d(iff,o_flw_srf(nsrf)%flag,o_flw_srf(nsrf)%name,"LW "//clnsurf(nsrf),"W/m2") 691 CALL histdef2d(iff,o_fsw_srf(nsrf)%flag,o_fsw_srf(nsrf)%name,"SW "//clnsurf(nsrf),"W/m2") 692 CALL histdef2d(iff,o_wbils_srf(nsrf)%flag,o_wbils_srf(nsrf)%name,"Bilan sol "//clnsurf(nsrf),"W/m2" ) 693 CALL histdef2d(iff,o_wbilo_srf(nsrf)%flag,o_wbilo_srf(nsrf)%name,"Bilan eau "//clnsurf(nsrf),"kg/(m2*s)") 555 694 if (iflag_pbl>1 .and. lev_files(iff).gt.10 ) then 556 CALL histdef2d(iff,flag_tke_sol,"tke_"//clnsurf(nsrf),"Max Turb. Kinetic Energy "//clnsurf(nsrf),"-") 557 CALL histdef2d(iff,flag_tke_max_sol,"tke_max_"//clnsurf(nsrf),"Max Turb. Kinetic Energy "//clnsurf(nsrf),"-") 695 CALL histdef2d(iff,o_tke_srf(nsrf)%flag,o_tke_srf(nsrf)%name,"Max Turb. Kinetic Energy "//clnsurf(nsrf),"-") 696 type_ecri(1) = 't_max(X)' 697 type_ecri(2) = 't_max(X)' 698 type_ecri(3) = 't_max(X)' 699 type_ecri(4) = 't_max(X)' 700 type_ecri(5) = 't_max(X)' 701 CALL histdef2d(iff,o_tke_max_srf(nsrf)%flag,o_tke_max_srf(nsrf)%name,"Max Turb. Kinetic Energy "//clnsurf(nsrf),"-") 702 type_ecri(1) = 'ave(X)' 703 type_ecri(2) = 'ave(X)' 704 type_ecri(3) = 'ave(X)' 705 type_ecri(4) = 'inst(X)' 706 type_ecri(5) = 'ave(X)' 558 707 endif 559 CALL histdef2d(iff, flag_albe_sol, "albe_"//clnsurf(nsrf),"Albedo surf. "//clnsurf(nsrf),"-")560 CALL histdef2d(iff, flag_rugs_sol,"rugs_"//clnsurf(nsrf),"Latent heat flux "//clnsurf(nsrf),"W/m2")561 CALL histdef2d(iff, flag_ages_sol,"ages_"//clnsurf(nsrf),"Snow age","day")708 CALL histdef2d(iff,o_albe_srf(nsrf)%flag,o_albe_srf(nsrf)%name,"Albedo surf. "//clnsurf(nsrf),"-") 709 CALL histdef2d(iff,o_rugs_srf(nsrf)%flag,o_rugs_srf(nsrf)%name,"Latent heat flux "//clnsurf(nsrf),"W/m2") 710 CALL histdef2d(iff,o_ages_srf(nsrf)%flag,o_ages_srf(nsrf)%name,"Snow age", "day") 562 711 END DO 563 712 564 CALL histdef2d(iff,flag_albs,"albs","Surface albedo","-") 565 CALL histdef2d(iff,flag_albslw,"albslw","Surface albedo LW","-") 566 CALL histdef2d(iff,flag_cdrm,"cdrm","Momentum drag coef.", "-") 567 CALL histdef2d(iff,flag_cdrh,"cdrh","Heat drag coef.", "-" ) 568 CALL histdef2d(iff,flag_cldl,"cldl","Low-level cloudiness", "-") 569 CALL histdef2d(iff,flag_cldm,"cldm","Mid-level cloudiness", "-") 570 CALL histdef2d(iff,flag_cldh,"cldh","High-level cloudiness", "-") 571 CALL histdef2d(iff,flag_cldt,"cldt","Total cloudiness","%") 572 CALL histdef2d(iff,flag_cldq,"cldq","Cloud liquid water path","kg/m2") 573 CALL histdef2d(iff,flag_lwp,"lwp","Cloud water path","kg/m2") 574 CALL histdef2d(iff,flag_iwp,"iwp","Cloud ice water path","kg/m2" ) 575 CALL histdef2d(iff,flag_ue,"ue","Zonal energy transport","-") 576 CALL histdef2d(iff,flag_ve,"ve","Merid energy transport", "-") 577 CALL histdef2d(iff,flag_uq,"uq","Zonal humidity transport", "-") 578 CALL histdef2d(iff,flag_vq,"vq","Merid humidity transport", "-") 713 IF (ok_ade) THEN 714 CALL histdef2d(iff,o_topswad%flag,o_topswad%name, "ADE at TOA", "W/m2") 715 CALL histdef2d(iff,o_solswad%flag,o_solswad%name, "ADE at SRF", "W/m2") 716 ENDIF 717 718 IF (ok_aie) THEN 719 CALL histdef2d(iff,o_topswai%flag,o_topswai%name, "AIE at TOA", "W/m2") 720 CALL histdef2d(iff,o_solswai%flag,o_solswai%name, "AIE at SFR", "W/m2") 721 ENDIF 722 723 724 CALL histdef2d(iff,o_albs%flag,o_albs%name, "Surface albedo", "-") 725 CALL histdef2d(iff,o_albslw%flag,o_albslw%name, "Surface albedo LW", "-") 726 CALL histdef2d(iff,o_cdrm%flag,o_cdrm%name, "Momentum drag coef.", "-") 727 CALL histdef2d(iff,o_cdrh%flag,o_cdrh%name, "Heat drag coef.", "-" ) 728 CALL histdef2d(iff,o_cldl%flag,o_cldl%name, "Low-level cloudiness", "-") 729 CALL histdef2d(iff,o_cldm%flag,o_cldm%name, "Mid-level cloudiness", "-") 730 CALL histdef2d(iff,o_cldh%flag,o_cldh%name, "High-level cloudiness", "-") 731 CALL histdef2d(iff,o_cldt%flag,o_cldt%name, "Total cloudiness", "%") 732 CALL histdef2d(iff,o_cldq%flag,o_cldq%name, "Cloud liquid water path", "kg/m2") 733 CALL histdef2d(iff,o_lwp%flag,o_lwp%name, "Cloud water path", "kg/m2") 734 CALL histdef2d(iff,o_iwp%flag,o_iwp%name, "Cloud ice water path", "kg/m2" ) 735 CALL histdef2d(iff,o_ue%flag,o_ue%name, "Zonal energy transport", "-") 736 CALL histdef2d(iff,o_ve%flag,o_ve%name, "Merid energy transport", "-") 737 CALL histdef2d(iff,o_uq%flag,o_uq%name, "Zonal humidity transport", "-") 738 CALL histdef2d(iff,o_vq%flag,o_vq%name, "Merid humidity transport", "-") 579 739 580 740 IF(iflag_con.GE.3) THEN ! sb 581 CALL histdef2d(iff,flag_cape,"cape","Conv avlbl pot ener","J/kg") 582 CALL histdef2d(iff,flag_pbase,"pbase","Cld base pressure", "mb") 583 CALL histdef2d(iff,flag_ptop,"ptop","Cld top pressure", "mb") 584 CALL histdef2d(iff,flag_fbase,"fbase","Cld base mass flux","kg/m2/s") 585 CALL histdef2d(iff,flag_prw,"prw","Precipitable water","kg/m2") 586 CALL histdef2d(iff,flag_cape_max,"cape_max","CAPE max.", "J/kg") 587 CALL histdef3d(iff,flag_upwd,"upwd","saturated updraft", "kg/m2/s") 588 CALL histdef3d(iff,flag_Ma,"Ma","undilute adiab updraft","kg/m2/s") 589 CALL histdef3d(iff,flag_dnwd,"dnwd","saturated downdraft","kg/m2/s") 590 CALL histdef3d(iff,flag_dnwd0,"dnwd0","unsat. downdraft", "kg/m2/s") 741 CALL histdef2d(iff,o_cape%flag,o_cape%name, "Conv avlbl pot ener", "J/kg") 742 CALL histdef2d(iff,o_pbase%flag,o_pbase%name, "Cld base pressure", "mb") 743 CALL histdef2d(iff,o_ptop%flag,o_ptop%name, "Cld top pressure", "mb") 744 CALL histdef2d(iff,o_fbase%flag,o_fbase%name, "Cld base mass flux", "kg/m2/s") 745 CALL histdef2d(iff,o_prw%flag,o_prw%name, "Precipitable water", "kg/m2") 746 type_ecri(1) = 't_max(X)' 747 type_ecri(2) = 't_max(X)' 748 type_ecri(3) = 't_max(X)' 749 type_ecri(4) = 't_max(X)' 750 type_ecri(5) = 't_max(X)' 751 CALL histdef2d(iff,o_cape_max%flag,o_cape_max%name, "CAPE max.", "J/kg") 752 type_ecri(1) = 'ave(X)' 753 type_ecri(2) = 'ave(X)' 754 type_ecri(3) = 'ave(X)' 755 type_ecri(4) = 'inst(X)' 756 type_ecri(5) = 'ave(X)' 757 CALL histdef3d(iff,o_upwd%flag,o_upwd%name, "saturated updraft", "kg/m2/s") 758 CALL histdef3d(iff,o_Ma%flag,o_Ma%name, "undilute adiab updraft", "kg/m2/s") 759 CALL histdef3d(iff,o_dnwd%flag,o_dnwd%name, "saturated downdraft", "kg/m2/s") 760 CALL histdef3d(iff,o_dnwd0%flag,o_dnwd0%name, "unsat. downdraft", "kg/m2/s") 591 761 ENDIF !iflag_con .GE. 3 592 762 593 CALL histdef2d(iff, flag_s_pblh,"s_pblh","Boundary Layer Height","m")594 CALL histdef2d(iff, flag_s_pblt,"s_pblt","t at Boundary Layer Height","K")595 CALL histdef2d(iff, flag_s_lcl,"s_lcl","Condensation level","m")596 CALL histdef2d(iff, flag_s_capCL,"s_capCL","Conv avlbl pot enerfor ABL", "J/m2" )597 CALL histdef2d(iff, flag_s_oliqCL,"s_oliqCL","Liq Water in BL","kg/m2")598 CALL histdef2d(iff, flag_s_cteiCL,"s_cteiCL","Instability criteria(ABL)","K")599 CALL histdef2d(iff, flag_s_therm,"s_therm","Exces du thermique", "K")600 CALL histdef2d(iff, flag_s_trmb1,"s_trmb1","deep_cape(HBTM2)","J/m2")601 CALL histdef2d(iff, flag_s_trmb2,"s_trmb2","inhibition (HBTM2)","J/m2")602 CALL histdef2d(iff, flag_s_trmb3,"s_trmb3","Point Omega (HBTM2)","m")763 CALL histdef2d(iff,o_s_pblh%flag,o_s_pblh%name, "Boundary Layer Height", "m") 764 CALL histdef2d(iff,o_s_pblt%flag,o_s_pblt%name, "t at Boundary Layer Height", "K") 765 CALL histdef2d(iff,o_s_lcl%flag,o_s_lcl%name, "Condensation level", "m") 766 CALL histdef2d(iff,o_s_capCL%flag,o_s_capCL%name, "Conv avlbl pot enerfor ABL", "J/m2" ) 767 CALL histdef2d(iff,o_s_oliqCL%flag,o_s_oliqCL%name, "Liq Water in BL", "kg/m2") 768 CALL histdef2d(iff,o_s_cteiCL%flag,o_s_cteiCL%name, "Instability criteria(ABL)", "K") 769 CALL histdef2d(iff,o_s_therm%flag,o_s_therm%name, "Exces du thermique", "K") 770 CALL histdef2d(iff,o_s_trmb1%flag,o_s_trmb1%name, "deep_cape(HBTM2)", "J/m2") 771 CALL histdef2d(iff,o_s_trmb2%flag,o_s_trmb2%name, "inhibition (HBTM2)", "J/m2") 772 CALL histdef2d(iff,o_s_trmb3%flag,o_s_trmb3%name, "Point Omega (HBTM2)", "m") 603 773 604 774 ! Champs interpolles sur des niveaux de pression … … 614 784 type_ecri(3) = 'inst(X)' 615 785 type_ecri(4) = 'inst(X)' 786 type_ecri(5) = 'inst(X)' 787 788 ! Attention a reverifier 789 790 ilev=0 616 791 DO k=1, nlevSTD 617 792 IF(k.GE.2.AND.k.LE.12) bb2=clevSTD(k) 618 IF(k.GE.13.AND.k.LE.17) bb3=clevSTD(k)793 ! IF(k.GE.13.AND.k.LE.17) bb3=clevSTD(k) 619 794 IF(bb2.EQ."850".OR.bb2.EQ."700".OR.bb2.EQ."500".OR.bb2.EQ."200")THEN 620 CALL histdef2d(iff,flag_ulevsSTD,"u"//bb2,"Zonal wind "//bb2//"mb","m/s") 621 CALL histdef2d(iff,flag_vlevsSTD,"v"//bb2,"Meridional wind "//bb2//"mb","m/s") 622 CALL histdef2d(iff,flag_wlevsSTD,"w"//bb2,"Vertical wind "//bb2//"mb","m/s") 623 CALL histdef2d(iff,flag_philevsSTD,"phi"//bb2,"Geopotential "//bb2//"mb","m") 624 CALL histdef2d(iff,flag_qlevsSTD,"q"//bb2,"Specific humidity "//bb2//"mb","kg/kg" ) 625 CALL histdef2d(iff,flag_tlevsSTD,"t"//bb2,"Temperature "//bb2//"mb","K") 626 ENDIF !(bb2.EQ."850".OR.bb2.EQ."700".OR. 795 ilev=ilev+1 796 print*,'ilev bb2 flag name ',ilev,bb2,o_uSTDlevs(ilev)%flag,o_uSTDlevs(ilev)%name 797 CALL histdef2d(iff,o_uSTDlevs(ilev)%flag,o_uSTDlevs(ilev)%name,"Zonal wind "//bb2//"mb", "m/s") 798 CALL histdef2d(iff,o_vSTDlevs(ilev)%flag,o_vSTDlevs(ilev)%name,"Meridional wind "//bb2//"mb", "m/s") 799 CALL histdef2d(iff,o_wSTDlevs(ilev)%flag,o_wSTDlevs(ilev)%name,"Vertical wind "//bb2//"mb", "Pa/s") 800 CALL histdef2d(iff,o_phiSTDlevs(ilev)%flag,o_phiSTDlevs(ilev)%name,"Geopotential "//bb2//"mb", "m") 801 CALL histdef2d(iff,o_qSTDlevs(ilev)%flag,o_qSTDlevs(ilev)%name,"Specific humidity "//bb2//"mb", "kg/kg" ) 802 CALL histdef2d(iff,o_tSTDlevs(ilev)%flag,o_tSTDlevs(ilev)%name,"Temperature "//bb2//"mb", "K") 803 ENDIF !(bb2.EQ."850".OR.bb2.EQ."700".OR."500".OR.bb2.EQ."200") 627 804 ENDDO 628 805 zstophym(iff) = dtime … … 631 808 type_ecri(3) = 'ave(X)' 632 809 type_ecri(4) = 'inst(X)' 633 634 CALL histdef2d(iff,flag_t_oce_sic,"t_oce_sic","Temp mixte oce-sic","K") 635 636 IF (ocean=='slab') & 637 CALL histdef2d(iff,flag_slab_bils, "slab_wbils_oce","Bilan au sol sur ocean slab", "W/m2") 638 639 IF (iflag_con.EQ.3) THEN 640 CALL histdef2d(iff,flag_ale,"ale","ALE","m2/s2") 641 CALL histdef2d(iff,flag_alp,"alp","ALP","W/m2") 642 CALL histdef2d(iff,flag_cin,"cin","Convective INhibition","m2/s2") 643 IF (iflag_coupl.EQ.1) THEN 644 CALL histdef2d(iff,flag_ale_bl,"ale_bl","ALE BL","m2/s2") 645 CALL histdef2d(iff,flag_alp_bl,"alp_bl","ALP BL","m2/s2") 646 ENDIF !iflag_coupl.EQ.1 647 IF (iflag_wake.EQ.1) THEN 648 CALL histdef2d(iff,flag_ale_wk,"ale_wk","ALE WK","m2/s2") 649 CALL histdef2d(iff,flag_alp_wk,"alp_wk","ALP WK","m2/s2") 650 CALL histdef2d(iff,flag_wape,"WAPE","WAPE","m2/s2") 651 CALL histdef2d(iff,flag_wake_h,"wake_h","wake_h", "-") 652 CALL histdef2d(iff,flag_wake_s,"wake_s","wake_s", "-") 653 CALL histdef3d(iff,flag_dtwak,"dtwak","Wake dT","K/s") 654 CALL histdef3d(iff,flag_dqwak,"dqwak","Wake dQ","(kg/kg)/s") 655 CALL histdef3d(iff,flag_wake_deltat,"wake_deltat","wake_deltat", " ") 656 CALL histdef3d(iff,flag_wake_deltaq,"wake_deltaq","wake_deltaq", " ") 657 CALL histdef3d(iff,flag_wake_omg,"wake_omg","wake_omg", " ") 658 CALL histdef3d(iff,flag_ftd,"ftd","tend temp due aux descentes precip","-") 659 CALL histdef3d(iff,flag_fqd,"fqd","tend vap eau due aux descentes precip","-") 660 ENDIF !iflag_wake.EQ.1 661 CALL histdef3d(iff,flag_Vprecip,"Vprecip","precipitation vertical profile","-") 662 ENDIF !(iflag_con.EQ.3) 663 664 CALL histdef2d(iff,flag_weakinv, "weakinv","Weak inversion", "-") 665 CALL histdef2d(iff,flag_dthmin,"dthmin","dTheta mini", "K/m") 666 CALL histdef2d(iff,flag_rh2m,"rh2m","Relative humidity at 2m", "%" ) 667 CALL histdef2d(iff,flag_qsat2m,"qsat2m","Saturant humidity at 2m", "%") 668 CALL histdef2d(iff,flag_tpot,"tpot","Surface air potential temperature","K") 669 CALL histdef2d(iff,flag_tpote,"tpote","Surface air equivalent potential temperature","K") 670 CALL histdef2d(iff,flag_SWnetOR,"SWnetOR","Sfce net SW radiation OR", "W/m2") 671 CALL histdef2d(iff,flag_SWdownOR,"SWdownOR","Sfce incident SW radiation OR","W/m2") 672 CALL histdef2d(iff,flag_LWdownOR,"LWdownOR","Sfce incident LW radiation OR","W/m2") 673 CALL histdef2d(iff,flag_snowl,"snowl","Solid Large-scale Precip.","kg/(m2*s)") 674 CALL histdef2d(iff,flag_solldown,"solldown","Down. IR rad. at surface","W/m2") 675 CALL histdef2d(iff,flag_dtsvdfo,"dtsvdfo","Boundary-layer dTs(o)","K/s") 676 CALL histdef2d(iff,flag_dtsvdft,"dtsvdft","Boundary-layer dTs(t)","K/s") 677 CALL histdef2d(iff,flag_dtsvdfg,"dtsvdfg","Boundary-layer dTs(g)","K/s") 678 CALL histdef2d(iff,flag_dtsvdfi,"dtsvdfi","Boundary-layer dTs(g)","K/s") 679 CALL histdef2d(iff,flag_rugs,"rugs","rugosity", "-" ) 810 type_ecri(5) = 'ave(X)' 811 812 CALL histdef2d(iff,o_t_oce_sic%flag,o_t_oce_sic%name, "Temp mixte oce-sic", "K") 813 814 IF (type_ocean=='slab') & 815 CALL histdef2d(iff,o_slab_bils%flag, o_slab_bils%name,"Bilan au sol sur ocean slab", "W/m2") 816 817 ! Couplage conv-CL 818 IF (iflag_con.GE.3) THEN 819 IF (iflag_coupl.EQ.1) THEN 820 CALL histdef2d(iff,o_ale_bl%flag,o_ale_bl%name, "ALE BL", "m2/s2") 821 CALL histdef2d(iff,o_alp_bl%flag,o_alp_bl%name, "ALP BL", "m2/s2") 822 ENDIF 823 ENDIF !(iflag_con.GE.3) 824 825 826 CALL histdef2d(iff,o_weakinv%flag,o_weakinv%name, "Weak inversion", "-") 827 CALL histdef2d(iff,o_dthmin%flag,o_dthmin%name, "dTheta mini", "K/m") 828 CALL histdef2d(iff,o_rh2m%flag,o_rh2m%name, "Relative humidity at 2m", "%" ) 829 CALL histdef2d(iff,o_qsat2m%flag,o_qsat2m%name, "Saturant humidity at 2m", "%") 830 CALL histdef2d(iff,o_tpot%flag,o_tpot%name, "Surface air potential temperature", "K") 831 CALL histdef2d(iff,o_tpote%flag,o_tpote%name, "Surface air equivalent potential temperature", "K") 832 CALL histdef2d(iff,o_SWnetOR%flag,o_SWnetOR%name, "Sfce net SW radiation OR", "W/m2") 833 CALL histdef2d(iff,o_SWdownOR%flag,o_SWdownOR%name, "Sfce incident SW radiation OR", "W/m2") 834 CALL histdef2d(iff,o_LWdownOR%flag,o_LWdownOR%name, "Sfce incident LW radiation OR", "W/m2") 835 CALL histdef2d(iff,o_snowl%flag,o_snowl%name, "Solid Large-scale Precip.", "kg/(m2*s)") 836 CALL histdef2d(iff,o_solldown%flag,o_solldown%name, "Down. IR rad. at surface", "W/m2") 837 CALL histdef2d(iff,o_dtsvdfo%flag,o_dtsvdfo%name, "Boundary-layer dTs(o)", "K/s") 838 CALL histdef2d(iff,o_dtsvdft%flag,o_dtsvdft%name, "Boundary-layer dTs(t)", "K/s") 839 CALL histdef2d(iff,o_dtsvdfg%flag,o_dtsvdfg%name, "Boundary-layer dTs(g)", "K/s") 840 CALL histdef2d(iff,o_dtsvdfi%flag,o_dtsvdfi%name, "Boundary-layer dTs(g)", "K/s") 841 CALL histdef2d(iff,o_rugs%flag,o_rugs%name, "rugosity", "-" ) 680 842 681 843 ! Champs 3D: 682 CALL histdef3d(iff,flag_lwcon,"lwcon","Cloud liquid water content","kg/kg") 683 CALL histdef3d(iff,flag_iwcon,"iwcon","Cloud ice water content","kg/kg") 684 CALL histdef3d(iff,flag_temp,"temp","Air temperature","K" ) 685 CALL histdef3d(iff,flag_theta,"theta","Potential air temperature","K" ) 686 CALL histdef3d(iff,flag_ovap,"ovap","Specific humidity","kg/kg" ) 687 CALL histdef3d(iff,flag_geop,"geop","Geopotential height","m2/s2") 688 CALL histdef3d(iff,flag_vitu,"vitu","Zonal wind", "m/s" ) 689 CALL histdef3d(iff,flag_vitv,"vitv","Meridional wind","m/s" ) 690 CALL histdef3d(iff,flag_vitw,"vitw","Vertical wind","Pa/s" ) 691 CALL histdef3d(iff,flag_pres,"pres","Air pressure", "Pa" ) 692 CALL histdef3d(iff,flag_rneb,"rneb","Cloud fraction","-") 693 CALL histdef3d(iff,flag_rnebcon,"rnebcon","Convective Cloud Fraction","-") 694 CALL histdef3d(iff,flag_rhum,"rhum","Relative humidity","-") 695 CALL histdef3d(iff,flag_ozone,"ozone","Ozone concentration", "ppmv") 696 CALL histdef3d(iff,flag_dtphy,"dtphy","Physics dT","K/s") 697 CALL histdef3d(iff,flag_dqphy,"dqphy","Physics dQ", "(kg/kg)/s") 698 CALL histdef3d(iff,flag_cldtau,"cldtau","Cloud optical thickness","1") 699 CALL histdef3d(iff,flag_cldemi,"cldemi","Cloud optical emissivity","1") 844 CALL histdef3d(iff,o_lwcon%flag,o_lwcon%name, "Cloud liquid water content", "kg/kg") 845 CALL histdef3d(iff,o_iwcon%flag,o_iwcon%name, "Cloud ice water content", "kg/kg") 846 CALL histdef3d(iff,o_temp%flag,o_temp%name, "Air temperature", "K" ) 847 CALL histdef3d(iff,o_theta%flag,o_theta%name, "Potential air temperature", "K" ) 848 CALL histdef3d(iff,o_ovap%flag,o_ovap%name, "Specific humidity + dqphy", "kg/kg" ) 849 CALL histdef3d(iff,o_ovapinit%flag,o_ovapinit%name, "Specific humidity", "kg/kg" ) 850 CALL histdef3d(iff,o_geop%flag,o_geop%name, "Geopotential height", "m2/s2") 851 CALL histdef3d(iff,o_vitu%flag,o_vitu%name, "Zonal wind", "m/s" ) 852 CALL histdef3d(iff,o_vitv%flag,o_vitv%name, "Meridional wind", "m/s" ) 853 CALL histdef3d(iff,o_vitw%flag,o_vitw%name, "Vertical wind", "Pa/s" ) 854 CALL histdef3d(iff,o_pres%flag,o_pres%name, "Air pressure", "Pa" ) 855 CALL histdef3d(iff,o_rneb%flag,o_rneb%name, "Cloud fraction", "-") 856 CALL histdef3d(iff,o_rnebcon%flag,o_rnebcon%name, "Convective Cloud Fraction", "-") 857 CALL histdef3d(iff,o_rhum%flag,o_rhum%name, "Relative humidity", "-") 858 CALL histdef3d(iff,o_ozone%flag,o_ozone%name, "Ozone concentration", "ppmv") 859 CALL histdef3d(iff,o_dtphy%flag,o_dtphy%name, "Physics dT", "K/s") 860 CALL histdef3d(iff,o_dqphy%flag,o_dqphy%name, "Physics dQ", "(kg/kg)/s") 861 CALL histdef3d(iff,o_cldtau%flag,o_cldtau%name, "Cloud optical thickness", "1") 862 CALL histdef3d(iff,o_cldemi%flag,o_cldemi%name, "Cloud optical emissivity", "1") 700 863 !IM: bug ?? dimensionnement variables (klon,klev+1) pmflxr, pmflxs, prfl, psfl 701 ! CALL histdef3d(iff, flag_pr_con_l,"pmflxr","Convective precipitation lic"," ")702 ! CALL histdef3d(iff, flag_pr_con_i,"pmflxs","Convective precipitation ice"," ")703 ! CALL histdef3d(iff, flag_pr_lsc_l,"prfl","Large scale precipitation lic"," ")704 ! CALL histdef3d(iff, flag_pr_lsc_i,"psfl","Large scale precipitation ice"," ")864 ! CALL histdef3d(iff,o_pr_con_l%flag,o_pmflxr%name, "Convective precipitation lic", " ") 865 ! CALL histdef3d(iff,o_pr_con_i%flag,o_pmflxs%name, "Convective precipitation ice", " ") 866 ! CALL histdef3d(iff,o_pr_lsc_l%flag,o_prfl%name, "Large scale precipitation lic", " ") 867 ! CALL histdef3d(iff,o_pr_lsc_i%flag,o_psfl%name, "Large scale precipitation ice", " ") 705 868 706 869 !FH Sorties pour la couche limite 707 870 if (iflag_pbl>1) then 708 CALL histdef3d(iff,flag_tke,"tke","TKE","m2/s2") 709 CALL histdef3d(iff,flag_tke_max,"tke_max","TKE max","m2/s2") 871 CALL histdef3d(iff,o_tke%flag,o_tke%name, "TKE", "m2/s2") 872 type_ecri(1) = 't_max(X)' 873 type_ecri(2) = 't_max(X)' 874 type_ecri(3) = 't_max(X)' 875 type_ecri(4) = 't_max(X)' 876 type_ecri(5) = 't_max(X)' 877 CALL histdef3d(iff,o_tke_max%flag,o_tke_max%name, "TKE max", "m2/s2") 878 type_ecri(1) = 'ave(X)' 879 type_ecri(2) = 'ave(X)' 880 type_ecri(3) = 'ave(X)' 881 type_ecri(4) = 'inst(X)' 882 type_ecri(5) = 'ave(X)' 710 883 endif 711 884 712 CALL histdef3d(iff,flag_kz,"kz","Kz melange","m2/s") 713 CALL histdef3d(iff,flag_kz_max,"kz_max","Kz melange max","m2/s" ) 714 CALL histdef3d(iff,flag_clwcon,"clwcon","Convective Cloud Liquid water content", "kg/kg") 715 CALL histdef3d(iff,flag_dtdyn,"dtdyn","Dynamics dT","K/s") 716 CALL histdef3d(iff,flag_dqdyn,"dqdyn","Dynamics dQ", "(kg/kg)/s") 717 CALL histdef3d(iff,flag_dudyn,"dudyn","Dynamics dU","m/s2") 718 CALL histdef3d(iff,flag_dvdyn,"dvdyn","Dynamics dV","m/s2") 719 CALL histdef3d(iff,flag_dtcon,"dtcon","Convection dT","K/s") 720 CALL histdef3d(iff,flag_ducon,"ducon","Convection du","m/s2") 721 CALL histdef3d(iff,flag_dqcon,"dqcon","Convection dQ", "(kg/kg)/s") 722 723 CALL histdef3d(iff,flag_dtlsc,"dtlsc","Condensation dT", "K/s") 724 CALL histdef3d(iff,flag_dtlschr,"dtlschr","Large-scale condensational heating rate","K/s") 725 CALL histdef3d(iff,flag_dqlsc,"dqlsc","Condensation dQ","(kg/kg)/s") 726 CALL histdef3d(iff,flag_dtvdf,"dtvdf","Boundary-layer dT", "K/s") 727 CALL histdef3d(iff,flag_dqvdf,"dqvdf","Boundary-layer dQ","(kg/kg)/s") 728 CALL histdef3d(iff,flag_dteva,"dteva","Reevaporation dT", "K/s") 729 CALL histdef3d(iff,flag_dqeva,"dqeva","Reevaporation dQ","(kg/kg)/s") 730 CALL histdef3d(iff,flag_ptconv,"ptconv","POINTS CONVECTIFS"," ") 731 CALL histdef3d(iff,flag_ratqs,"ratqs", "RATQS"," ") 732 CALL histdef3d(iff,flag_dtthe,"dtthe","Dry adjust. dT", "K/s") 885 CALL histdef3d(iff,o_kz%flag,o_kz%name, "Kz melange", "m2/s") 886 type_ecri(1) = 't_max(X)' 887 type_ecri(2) = 't_max(X)' 888 type_ecri(3) = 't_max(X)' 889 type_ecri(4) = 't_max(X)' 890 type_ecri(5) = 't_max(X)' 891 CALL histdef3d(iff,o_kz_max%flag,o_kz_max%name, "Kz melange max", "m2/s" ) 892 type_ecri(1) = 'ave(X)' 893 type_ecri(2) = 'ave(X)' 894 type_ecri(3) = 'ave(X)' 895 type_ecri(4) = 'inst(X)' 896 type_ecri(5) = 'ave(X)' 897 CALL histdef3d(iff,o_clwcon%flag,o_clwcon%name, "Convective Cloud Liquid water content", "kg/kg") 898 CALL histdef3d(iff,o_dtdyn%flag,o_dtdyn%name, "Dynamics dT", "K/s") 899 CALL histdef3d(iff,o_dqdyn%flag,o_dqdyn%name, "Dynamics dQ", "(kg/kg)/s") 900 CALL histdef3d(iff,o_dudyn%flag,o_dudyn%name, "Dynamics dU", "m/s2") 901 CALL histdef3d(iff,o_dvdyn%flag,o_dvdyn%name, "Dynamics dV", "m/s2") 902 CALL histdef3d(iff,o_dtcon%flag,o_dtcon%name, "Convection dT", "K/s") 903 CALL histdef3d(iff,o_ducon%flag,o_ducon%name, "Convection du", "m/s2") 904 CALL histdef3d(iff,o_dqcon%flag,o_dqcon%name, "Convection dQ", "(kg/kg)/s") 905 906 ! Wakes 907 IF(iflag_con.EQ.3) THEN 908 IF (iflag_wake == 1) THEN 909 CALL histdef2d(iff,o_ale_wk%flag,o_ale_wk%name, "ALE WK", "m2/s2") 910 CALL histdef2d(iff,o_alp_wk%flag,o_alp_wk%name, "ALP WK", "m2/s2") 911 CALL histdef2d(iff,o_ale%flag,o_ale%name, "ALE", "m2/s2") 912 CALL histdef2d(iff,o_alp%flag,o_alp%name, "ALP", "W/m2") 913 CALL histdef2d(iff,o_cin%flag,o_cin%name, "Convective INhibition", "m2/s2") 914 CALL histdef2d(iff,o_wape%flag,o_WAPE%name, "WAPE", "m2/s2") 915 CALL histdef2d(iff,o_wake_h%flag,o_wake_h%name, "wake_h", "-") 916 CALL histdef2d(iff,o_wake_s%flag,o_wake_s%name, "wake_s", "-") 917 CALL histdef3d(iff,o_dtwak%flag,o_dtwak%name, "Wake dT", "K/s") 918 CALL histdef3d(iff,o_dqwak%flag,o_dqwak%name, "Wake dQ", "(kg/kg)/s") 919 CALL histdef3d(iff,o_wake_deltat%flag,o_wake_deltat%name, "wake_deltat", " ") 920 CALL histdef3d(iff,o_wake_deltaq%flag,o_wake_deltaq%name, "wake_deltaq", " ") 921 CALL histdef3d(iff,o_wake_omg%flag,o_wake_omg%name, "wake_omg", " ") 922 ENDIF 923 CALL histdef3d(iff,o_Vprecip%flag,o_Vprecip%name, "precipitation vertical profile", "-") 924 CALL histdef3d(iff,o_ftd%flag,o_ftd%name, "tend temp due aux descentes precip", "-") 925 CALL histdef3d(iff,o_fqd%flag,o_fqd%name,"tend vap eau due aux descentes precip", "-") 926 ENDIF !(iflag_con.EQ.3) 927 928 CALL histdef3d(iff,o_dtlsc%flag,o_dtlsc%name, "Condensation dT", "K/s") 929 CALL histdef3d(iff,o_dtlschr%flag,o_dtlschr%name,"Large-scale condensational heating rate","K/s") 930 CALL histdef3d(iff,o_dqlsc%flag,o_dqlsc%name, "Condensation dQ", "(kg/kg)/s") 931 CALL histdef3d(iff,o_dtvdf%flag,o_dtvdf%name, "Boundary-layer dT", "K/s") 932 CALL histdef3d(iff,o_dqvdf%flag,o_dqvdf%name, "Boundary-layer dQ", "(kg/kg)/s") 933 CALL histdef3d(iff,o_dteva%flag,o_dteva%name, "Reevaporation dT", "K/s") 934 CALL histdef3d(iff,o_dqeva%flag,o_dqeva%name, "Reevaporation dQ", "(kg/kg)/s") 935 CALL histdef3d(iff,o_ptconv%flag,o_ptconv%name, "POINTS CONVECTIFS", " ") 936 CALL histdef3d(iff,o_ratqs%flag,o_ratqs%name, "RATQS", " ") 937 CALL histdef3d(iff,o_dtthe%flag,o_dtthe%name, "Dry adjust. dT", "K/s") 733 938 734 939 if(iflag_thermals.gt.1) THEN 735 CALL histdef3d(iff, flag_f_th,"f_th","Thermal plume mass flux", "K/s")736 CALL histdef3d(iff, flag_e_th,"e_th","Thermal plume entrainment","K/s")737 CALL histdef3d(iff, flag_w_th,"w_th","Thermal plume vertical velocity","m/s")738 CALL histdef3d(iff, flag_lambda_th,"lambda_th","Thermal plume vertical velocity","m/s")739 CALL histdef3d(iff, flag_q_th,"q_th","Thermal plume total humidity", "kg/kg")740 CALL histdef3d(iff, flag_a_th,"a_th","Thermal plume fraction", "")741 CALL histdef3d(iff, flag_d_th,"d_th","Thermal plume detrainment", "K/s")940 CALL histdef3d(iff,o_f_th%flag,o_f_th%name, "Thermal plume mass flux", "K/s") 941 CALL histdef3d(iff,o_e_th%flag,o_e_th%name,"Thermal plume entrainment","K/s") 942 CALL histdef3d(iff,o_w_th%flag,o_w_th%name,"Thermal plume vertical velocity","m/s") 943 CALL histdef3d(iff,o_lambda_th%flag,o_lambda_th%name,"Thermal plume vertical velocity","m/s") 944 CALL histdef3d(iff,o_q_th%flag,o_q_th%name, "Thermal plume total humidity", "kg/kg") 945 CALL histdef3d(iff,o_a_th%flag,o_a_th%name, "Thermal plume fraction", "") 946 CALL histdef3d(iff,o_d_th%flag,o_d_th%name, "Thermal plume detrainment", "K/s") 742 947 endif !iflag_thermals.gt.1 743 CALL histdef2d(iff, flag_f0_th,"f0_th","Thermal closure mass flux", "K/s")744 CALL histdef2d(iff, flag_zmax_th,"zmax_th","Thermal plume height", "K/s")745 CALL histdef3d(iff, flag_dqthe,"dqthe","Dry adjust. dQ","(kg/kg)/s")746 CALL histdef3d(iff, flag_dtajs,"dtajs","Dry adjust. dT", "K/s")747 CALL histdef3d(iff, flag_dqajs,"dqajs","Dry adjust. dQ","(kg/kg)/s")748 CALL histdef3d(iff, flag_dtswr,"dtswr","SW radiation dT","K/s")749 CALL histdef3d(iff, flag_dtsw0,"dtsw0","CS SW radiation dT","K/s")750 CALL histdef3d(iff, flag_dtlwr,"dtlwr","LW radiation dT","K/s")751 CALL histdef3d(iff, flag_dtlw0,"dtlw0", "CS LW radiation dT","K/s")752 CALL histdef3d(iff, flag_dtec,"dtec","Cinetic dissip dT","K/s")753 CALL histdef3d(iff, flag_duvdf,"duvdf","Boundary-layer dU","m/s2")754 CALL histdef3d(iff, flag_dvvdf,"dvvdf","Boundary-layer dV", "m/s2")948 CALL histdef2d(iff,o_f0_th%flag,o_f0_th%name, "Thermal closure mass flux", "K/s") 949 CALL histdef2d(iff,o_zmax_th%flag,o_zmax_th%name, "Thermal plume height", "K/s") 950 CALL histdef3d(iff,o_dqthe%flag,o_dqthe%name, "Dry adjust. dQ", "(kg/kg)/s") 951 CALL histdef3d(iff,o_dtajs%flag,o_dtajs%name, "Dry adjust. dT", "K/s") 952 CALL histdef3d(iff,o_dqajs%flag,o_dqajs%name, "Dry adjust. dQ", "(kg/kg)/s") 953 CALL histdef3d(iff,o_dtswr%flag,o_dtswr%name, "SW radiation dT", "K/s") 954 CALL histdef3d(iff,o_dtsw0%flag,o_dtsw0%name, "CS SW radiation dT", "K/s") 955 CALL histdef3d(iff,o_dtlwr%flag,o_dtlwr%name, "LW radiation dT", "K/s") 956 CALL histdef3d(iff,o_dtlw0%flag,o_dtlw0%name, "CS LW radiation dT", "K/s") 957 CALL histdef3d(iff,o_dtec%flag,o_dtec%name, "Cinetic dissip dT", "K/s") 958 CALL histdef3d(iff,o_duvdf%flag,o_duvdf%name, "Boundary-layer dU", "m/s2") 959 CALL histdef3d(iff,o_dvvdf%flag,o_dvvdf%name, "Boundary-layer dV", "m/s2") 755 960 756 961 IF (ok_orodr) THEN 757 CALL histdef3d(iff, flag_duoro,"duoro","Orography dU","m/s2")758 CALL histdef3d(iff, flag_dvoro,"dvoro","Orography dV", "m/s2")962 CALL histdef3d(iff,o_duoro%flag,o_duoro%name, "Orography dU", "m/s2") 963 CALL histdef3d(iff,o_dvoro%flag,o_dvoro%name, "Orography dV", "m/s2") 759 964 ENDIF 760 965 761 966 IF (ok_orolf) THEN 762 CALL histdef3d(iff, flag_dulif,"dulif","Orography dU","m/s2")763 CALL histdef3d(iff, flag_dvlif,"dvlif","Orography dV", "m/s2")967 CALL histdef3d(iff,o_dulif%flag,o_dulif%name, "Orography dU", "m/s2") 968 CALL histdef3d(iff,o_dvlif%flag,o_dvlif%name, "Orography dV", "m/s2") 764 969 ENDIF 765 970 766 if (nqmax>=3) THEN 767 DO iq=3,nqmax 971 if (nqtot>=3) THEN 972 !Attention DO iq=3,nqtot 973 DO iq=3,4 768 974 iiq=niadv(iq) 769 CALL histdef3d ( iff, flag_trac, tnom(iq),ttext(iiq), "-" ) 975 ! CALL histdef3d (iff, o_trac%flag,'o_'//tnom(iq)%name,ttext(iiq), "-" ) 976 CALL histdef3d (iff, o_trac(iq-2)%flag,o_trac(iq-2)%name,ttext(iiq), "-" ) 770 977 ENDDO 771 978 endif … … 792 999 include "temps.h" 793 1000 include "indicesol.h" 794 include "advtrac.h"795 1001 include "clesphys.h" 796 1002 797 1003 integer :: iff 798 1004 integer, dimension(nfiles) :: flag_var 799 character(len= *) :: nomvar1005 character(len=20) :: nomvar 800 1006 character(len=*) :: titrevar 801 1007 character(len=*) :: unitvar 1008 1009 ! Appel a la lecture des noms et niveau d'ecriture des variables dans output.def 1010 call conf_physoutputs(nomvar,flag_var) 802 1011 803 1012 if ( flag_var(iff)<=lev_files(iff) ) then … … 819 1028 include "temps.h" 820 1029 include "indicesol.h" 821 include "advtrac.h"822 1030 include "clesphys.h" 823 1031 824 1032 integer :: iff 825 1033 integer, dimension(nfiles) :: flag_var 826 character(len= *) :: nomvar1034 character(len=20) :: nomvar 827 1035 character(len=*) :: titrevar 828 1036 character(len=*) :: unitvar 1037 1038 ! Appel a la lecture des noms et niveau d'ecriture des variables dans output.def 1039 call conf_physoutputs(nomvar,flag_var) 829 1040 830 1041 if ( flag_var(iff)<=lev_files(iff) ) then … … 836 1047 end subroutine histdef3d 837 1048 1049 SUBROUTINE conf_physoutputs(nam_var,flag_var) 1050 !!! Lecture des noms et niveau de sortie des variables dans output.def 1051 ! en utilisant les routines getin de IOIPSL 1052 use ioipsl 1053 1054 IMPLICIT NONE 1055 1056 include 'iniprint.h' 1057 1058 character(len=20) :: nam_var 1059 integer, dimension(nfiles) :: flag_var 1060 integer, dimension(nfiles),save :: flag_var_omp 1061 character(len=20),save :: nam_var_omp 1062 1063 flag_var_omp = flag_var 1064 nam_var_omp = nam_var 1065 IF(prt_level>10) WRITE(lunout,*)'Avant getin: nam_var flag_var ',nam_var,flag_var(:) 1066 call getin('flag_'//nam_var,flag_var_omp) 1067 flag_var = flag_var_omp 1068 call getin('name_'//nam_var,nam_var_omp) 1069 nam_var=nam_var_omp 1070 1071 IF(prt_level>10) WRITE(lunout,*)'Apres getin: nam_var flag_var ',nam_var,flag_var(:) 1072 1073 END SUBROUTINE conf_physoutputs 1074 838 1075 END MODULE phys_output_mod 839 1076 -
LMDZ4/trunk/libf/phylmd/phys_output_write.h
r1100 r1146 8 8 9 9 !!! Champs 1D !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 10 IF ( flag_phis(iff)<=lev_files(iff)) THEN10 IF (o_phis%flag(iff)<=lev_files(iff)) THEN 11 11 CALL histwrite_phy(nid_files(iff), 12 $ "phis",itau_w,pphis) 13 ENDIF 14 15 IF (flag_aire(iff)<=lev_files(iff)) THEN 16 CALL histwrite_phy(nid_files(iff),"aire",itau_w,airephy) 17 ENDIF 18 19 IF (flag_pourc_sol(iff)<=lev_files(iff)) THEN 20 zx_tmp_fi2d(1 : klon) = pctsrf(1 : klon, is_ter)* 100. 21 CALL histwrite_phy(nid_files(iff), 22 $ "pourc_"//clnsurf(is_ter),itau_w, 23 $ zx_tmp_fi2d) 24 ENDIF 25 26 IF (flag_fract_sol(iff)<=lev_files(iff)) THEN 27 zx_tmp_fi2d(1 : klon) = pctsrf(1 : klon, is_ter) 28 CALL histwrite_phy(nid_files(iff), 29 $ "fract_"//clnsurf(is_ter),itau_w, 30 $ zx_tmp_fi2d) 31 ENDIF 32 33 IF (flag_contfracATM(iff)<=lev_files(iff)) THEN 12 $ o_phis%name,itau_w,pphis) 13 ENDIF 14 15 IF (o_aire%flag(iff)<=lev_files(iff)) THEN 16 CALL histwrite_phy(nid_files(iff),o_aire%name,itau_w,airephy) 17 ENDIF 18 19 IF (o_contfracATM%flag(iff)<=lev_files(iff)) THEN 34 20 DO i=1, klon 35 21 zx_tmp_fi2d(i)=pctsrf(i,is_ter)+pctsrf(i,is_lic) 36 22 ENDDO 37 23 CALL histwrite_phy(nid_files(iff), 38 $ "contfracATM",itau_w,zx_tmp_fi2d)39 ENDIF 40 41 IF ( flag_contfracOR(iff)<=lev_files(iff)) THEN42 CALL histwrite_phy(nid_files(iff), "contfracOR",itau_w,24 $ o_contfracATM%name,itau_w,zx_tmp_fi2d) 25 ENDIF 26 27 IF (o_contfracOR%flag(iff)<=lev_files(iff)) THEN 28 CALL histwrite_phy(nid_files(iff),o_contfracOR%name,itau_w, 43 29 $ pctsrf(:,is_ter)) 44 30 ENDIF 45 31 46 IF ( flag_aireTER(iff)<=lev_files(iff)) THEN47 CALL histwrite_phy(nid_files(iff), 48 $ "aireTER",itau_w,paire_ter)32 IF (o_aireTER%flag(iff)<=lev_files(iff)) THEN 33 CALL histwrite_phy(nid_files(iff), 34 $ o_aireTER%name,itau_w,paire_ter) 49 35 ENDIF 50 36 51 37 !!! Champs 2D !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 52 38 53 IF ( flag_flat(iff)<=lev_files(iff)) THEN54 CALL histwrite_phy(nid_files(iff), "flat",itau_w,zxfluxlat)55 ENDIF 56 57 IF ( flag_slp(iff)<=lev_files(iff)) THEN58 CALL histwrite_phy(nid_files(iff), "slp",itau_w,slp)59 ENDIF 60 61 IF ( flag_tsol(iff)<=lev_files(iff)) THEN62 CALL histwrite_phy(nid_files(iff), "tsol",itau_w,zxtsol)63 ENDIF 64 65 IF ( flag_t2m(iff)<=lev_files(iff)) THEN66 CALL histwrite_phy(nid_files(iff), "t2m",itau_w,zt2m)67 ENDIF 68 69 IF ( flag_t2m_min(iff)<=lev_files(iff)) THEN70 CALL histwrite_phy(nid_files(iff), "t2m_min",itau_w,zt2m)71 ENDIF 72 73 IF ( flag_t2m_max(iff)<=lev_files(iff)) THEN74 CALL histwrite_phy(nid_files(iff), "t2m_max",itau_w,zt2m)75 ENDIF 76 77 IF ( flag_wind10m(iff)<=lev_files(iff)) THEN39 IF (o_flat%flag(iff)<=lev_files(iff)) THEN 40 CALL histwrite_phy(nid_files(iff),o_flat%name,itau_w,zxfluxlat) 41 ENDIF 42 43 IF (o_slp%flag(iff)<=lev_files(iff)) THEN 44 CALL histwrite_phy(nid_files(iff),o_slp%name,itau_w,slp) 45 ENDIF 46 47 IF (o_tsol%flag(iff)<=lev_files(iff)) THEN 48 CALL histwrite_phy(nid_files(iff),o_tsol%name,itau_w,zxtsol) 49 ENDIF 50 51 IF (o_t2m%flag(iff)<=lev_files(iff)) THEN 52 CALL histwrite_phy(nid_files(iff),o_t2m%name,itau_w,zt2m) 53 ENDIF 54 55 IF (o_t2m_min%flag(iff)<=lev_files(iff)) THEN 56 CALL histwrite_phy(nid_files(iff),o_t2m_min%name,itau_w,zt2m) 57 ENDIF 58 59 IF (o_t2m_max%flag(iff)<=lev_files(iff)) THEN 60 CALL histwrite_phy(nid_files(iff),o_t2m_max%name,itau_w,zt2m) 61 ENDIF 62 63 IF (o_wind10m%flag(iff)<=lev_files(iff)) THEN 78 64 DO i=1, klon 79 65 zx_tmp_fi2d(i)=SQRT(zu10m(i)*zu10m(i)+zv10m(i)*zv10m(i)) 80 66 ENDDO 81 CALL histwrite_phy(nid_files(iff),"wind10m",itau_w,zx_tmp_fi2d) 82 ENDIF 83 84 IF (flag_wind10max(iff)<=lev_files(iff)) THEN 67 CALL histwrite_phy(nid_files(iff), 68 s o_wind10m%name,itau_w,zx_tmp_fi2d) 69 ENDIF 70 71 IF (o_wind10max%flag(iff)<=lev_files(iff)) THEN 85 72 DO i=1, klon 86 73 zx_tmp_fi2d(i)=SQRT(zu10m(i)*zu10m(i)+zv10m(i)*zv10m(i)) 87 74 ENDDO 88 CALL histwrite_phy(nid_files(iff), "wind10max",75 CALL histwrite_phy(nid_files(iff),o_wind10max%name, 89 76 $ itau_w,zx_tmp_fi2d) 90 77 ENDIF 91 78 92 IF ( flag_sicf(iff)<=lev_files(iff)) THEN79 IF (o_sicf%flag(iff)<=lev_files(iff)) THEN 93 80 DO i = 1, klon 94 81 zx_tmp_fi2d(i) = pctsrf(i,is_sic) 95 82 ENDDO 96 CALL histwrite_phy(nid_files(iff),"sicf",itau_w,zx_tmp_fi2d) 97 ENDIF 98 99 IF (flag_q2m(iff)<=lev_files(iff)) THEN 100 CALL histwrite_phy(nid_files(iff),"q2m",itau_w,zq2m) 101 ENDIF 102 103 IF (flag_u10m(iff)<=lev_files(iff)) THEN 104 CALL histwrite_phy(nid_files(iff),"u10m",itau_w,zu10m) 105 ENDIF 106 107 IF (flag_v10m(iff)<=lev_files(iff)) THEN 108 CALL histwrite_phy(nid_files(iff),"v10m",itau_w,zv10m) 109 ENDIF 110 111 IF (flag_psol(iff)<=lev_files(iff)) THEN 83 CALL histwrite_phy(nid_files(iff), 84 $ o_sicf%name,itau_w,zx_tmp_fi2d) 85 ENDIF 86 87 IF (o_q2m%flag(iff)<=lev_files(iff)) THEN 88 CALL histwrite_phy(nid_files(iff),o_q2m%name,itau_w,zq2m) 89 ENDIF 90 91 IF (o_u10m%flag(iff)<=lev_files(iff)) THEN 92 CALL histwrite_phy(nid_files(iff),o_u10m%name,itau_w,zu10m) 93 ENDIF 94 95 IF (o_v10m%flag(iff)<=lev_files(iff)) THEN 96 CALL histwrite_phy(nid_files(iff),o_v10m%name,itau_w,zv10m) 97 ENDIF 98 99 IF (o_psol%flag(iff)<=lev_files(iff)) THEN 112 100 DO i = 1, klon 113 101 zx_tmp_fi2d(i) = paprs(i,1) 114 102 ENDDO 115 CALL histwrite_phy(nid_files(iff),"psol",itau_w,zx_tmp_fi2d) 116 ENDIF 117 118 IF (flag_qsurf(iff)<=lev_files(iff)) THEN 119 CALL histwrite_phy(nid_files(iff),"qsurf",itau_w,zxqsurf) 103 CALL histwrite_phy(nid_files(iff), 104 s o_psol%name,itau_w,zx_tmp_fi2d) 105 ENDIF 106 107 IF (o_qsurf%flag(iff)<=lev_files(iff)) THEN 108 CALL histwrite_phy(nid_files(iff),o_qsurf%name,itau_w,zxqsurf) 120 109 ENDIF 121 110 122 111 if (.not. ok_veget) then 123 IF ( flag_qsol(iff)<=lev_files(iff)) THEN124 CALL histwrite_phy(nid_files(iff), "qsol",itau_w,qsol)112 IF (o_qsol%flag(iff)<=lev_files(iff)) THEN 113 CALL histwrite_phy(nid_files(iff),o_qsol%name,itau_w,qsol) 125 114 ENDIF 126 115 endif 127 116 128 IF ( flag_precip(iff)<=lev_files(iff)) THEN117 IF (o_precip%flag(iff)<=lev_files(iff)) THEN 129 118 DO i = 1, klon 130 119 zx_tmp_fi2d(i) = rain_fall(i) + snow_fall(i) 131 120 ENDDO 132 CALL histwrite_phy(nid_files(iff),"precip",itau_w,zx_tmp_fi2d) 133 ENDIF 134 135 IF (flag_ndayrain(iff)<=lev_files(iff)) THEN 136 CALL histwrite_phy(nid_files(iff),"ndayrain",itau_w,nday_rain) 137 ENDIF 138 139 IF (flag_plul(iff)<=lev_files(iff)) THEN 121 CALL histwrite_phy(nid_files(iff),o_precip%name, 122 s itau_w,zx_tmp_fi2d) 123 ENDIF 124 125 IF (o_ndayrain%flag(iff)<=lev_files(iff)) THEN 126 CALL histwrite_phy(nid_files(iff),o_ndayrain%name, 127 s itau_w,nday_rain) 128 ENDIF 129 130 IF (o_plul%flag(iff)<=lev_files(iff)) THEN 140 131 DO i = 1, klon 141 132 zx_tmp_fi2d(i) = rain_lsc(i) + snow_lsc(i) 142 133 ENDDO 143 CALL histwrite_phy(nid_files(iff), "plul",itau_w,zx_tmp_fi2d)144 ENDIF 145 146 IF ( flag_pluc(iff)<=lev_files(iff)) THEN134 CALL histwrite_phy(nid_files(iff),o_plul%name,itau_w,zx_tmp_fi2d) 135 ENDIF 136 137 IF (o_pluc%flag(iff)<=lev_files(iff)) THEN 147 138 DO i = 1, klon 148 139 zx_tmp_fi2d(i) = rain_con(i) + snow_con(i) 149 140 ENDDO 150 CALL histwrite_phy(nid_files(iff), "pluc",itau_w,zx_tmp_fi2d)151 ENDIF 152 153 IF ( flag_snow(iff)<=lev_files(iff)) THEN154 CALL histwrite_phy(nid_files(iff), "snow",itau_w,snow_fall)155 ENDIF 156 157 IF ( flag_evap(iff)<=lev_files(iff)) THEN158 CALL histwrite_phy(nid_files(iff), "evap",itau_w,evap)159 ENDIF 160 161 IF ( flag_tops(iff)<=lev_files(iff)) THEN162 CALL histwrite_phy(nid_files(iff), "tops",itau_w,topsw)163 ENDIF 164 165 IF ( flag_tops0(iff)<=lev_files(iff)) THEN166 CALL histwrite_phy(nid_files(iff), "tops0",itau_w,topsw0)167 ENDIF 168 169 IF ( flag_topl(iff)<=lev_files(iff)) THEN170 CALL histwrite_phy(nid_files(iff), "topl",itau_w,toplw)171 ENDIF 172 173 IF ( flag_topl0(iff)<=lev_files(iff)) THEN174 CALL histwrite_phy(nid_files(iff), "topl0",itau_w,toplw0)175 ENDIF 176 177 IF ( flag_SWupTOA(iff)<=lev_files(iff)) THEN141 CALL histwrite_phy(nid_files(iff),o_pluc%name,itau_w,zx_tmp_fi2d) 142 ENDIF 143 144 IF (o_snow%flag(iff)<=lev_files(iff)) THEN 145 CALL histwrite_phy(nid_files(iff),o_snow%name,itau_w,snow_fall) 146 ENDIF 147 148 IF (o_evap%flag(iff)<=lev_files(iff)) THEN 149 CALL histwrite_phy(nid_files(iff),o_evap%name,itau_w,evap) 150 ENDIF 151 152 IF (o_tops%flag(iff)<=lev_files(iff)) THEN 153 CALL histwrite_phy(nid_files(iff),o_tops%name,itau_w,topsw) 154 ENDIF 155 156 IF (o_tops0%flag(iff)<=lev_files(iff)) THEN 157 CALL histwrite_phy(nid_files(iff),o_tops0%name,itau_w,topsw0) 158 ENDIF 159 160 IF (o_topl%flag(iff)<=lev_files(iff)) THEN 161 CALL histwrite_phy(nid_files(iff),o_topl%name,itau_w,toplw) 162 ENDIF 163 164 IF (o_topl0%flag(iff)<=lev_files(iff)) THEN 165 CALL histwrite_phy(nid_files(iff),o_topl0%name,itau_w,toplw0) 166 ENDIF 167 168 IF (o_SWupTOA%flag(iff)<=lev_files(iff)) THEN 178 169 zx_tmp_fi2d(1 : klon) = swup ( 1 : klon, klevp1 ) 179 CALL histwrite_phy(nid_files(iff), "SWupTOA",itau_w,zx_tmp_fi2d) 180 ENDIF 181 182 IF (flag_SWupTOAclr(iff)<=lev_files(iff)) THEN 170 CALL histwrite_phy(nid_files(iff),o_SWupTOA%name, 171 s itau_w,zx_tmp_fi2d) 172 ENDIF 173 174 IF (o_SWupTOAclr%flag(iff)<=lev_files(iff)) THEN 183 175 zx_tmp_fi2d(1 : klon) = swup0 ( 1 : klon, klevp1 ) 184 176 CALL histwrite_phy(nid_files(iff), 185 $ "SWupTOAclr",itau_w,zx_tmp_fi2d)186 ENDIF 187 188 IF ( flag_SWdnTOA(iff)<=lev_files(iff)) THEN177 $ o_SWupTOAclr%name,itau_w,zx_tmp_fi2d) 178 ENDIF 179 180 IF (o_SWdnTOA%flag(iff)<=lev_files(iff)) THEN 189 181 zx_tmp_fi2d(1 : klon) = swdn ( 1 : klon, klevp1 ) 190 CALL histwrite_phy(nid_files(iff), "SWdnTOA",itau_w,zx_tmp_fi2d) 191 ENDIF 192 193 IF (flag_SWdnTOAclr(iff)<=lev_files(iff)) THEN 182 CALL histwrite_phy(nid_files(iff), 183 s o_SWdnTOA%name,itau_w,zx_tmp_fi2d) 184 ENDIF 185 186 IF (o_SWdnTOAclr%flag(iff)<=lev_files(iff)) THEN 194 187 zx_tmp_fi2d(1 : klon) = swdn0 ( 1 : klon, klevp1 ) 195 188 CALL histwrite_phy(nid_files(iff), 196 $ "SWdnTOAclr",itau_w,zx_tmp_fi2d) 197 ENDIF 198 199 IF (flag_SWup200(iff)<=lev_files(iff)) THEN 200 CALL histwrite_phy(nid_files(iff),"SWup200",itau_w,SWup200) 201 ENDIF 202 203 IF (flag_SWup200clr(iff)<=lev_files(iff)) THEN 204 CALL histwrite_phy(nid_files(iff),"SWup200clr",itau_w,SWup200clr) 205 ENDIF 206 207 IF (flag_SWdn200(iff)<=lev_files(iff)) THEN 208 CALL histwrite_phy(nid_files(iff),"SWdn200",itau_w,SWdn200) 209 ENDIF 210 211 IF (flag_SWdn200clr(iff)<=lev_files(iff)) THEN 212 CALL histwrite_phy(nid_files(iff),"SWdn200clr",itau_w,SWdn200clr) 213 ENDIF 214 215 IF (flag_LWup200(iff)<=lev_files(iff)) THEN 216 CALL histwrite_phy(nid_files(iff),"LWup200",itau_w,LWup200) 217 ENDIF 218 219 IF (flag_LWup200clr(iff)<=lev_files(iff)) THEN 220 CALL histwrite_phy(nid_files(iff),"LWup200clr",itau_w,LWup200clr) 221 ENDIF 222 223 IF (flag_LWdn200(iff)<=lev_files(iff)) THEN 224 CALL histwrite_phy(nid_files(iff),"LWdn200",itau_w,zx_tmp_fi2d) 225 ENDIF 226 227 IF (flag_LWdn200clr(iff)<=lev_files(iff)) THEN 228 CALL histwrite_phy(nid_files(iff),"LWdn200clr",itau_w,zx_tmp_fi2d) 229 ENDIF 230 231 IF (flag_sols(iff)<=lev_files(iff)) THEN 232 CALL histwrite_phy(nid_files(iff),"sols",itau_w,solsw) 233 ENDIF 234 235 IF (flag_sols0(iff)<=lev_files(iff)) THEN 236 CALL histwrite_phy(nid_files(iff),"sols0",itau_w,solsw0) 237 ENDIF 238 239 IF (flag_soll(iff)<=lev_files(iff)) THEN 240 CALL histwrite_phy(nid_files(iff),"soll",itau_w,sollw) 241 ENDIF 242 243 IF (flag_radsol(iff)<=lev_files(iff)) THEN 244 CALL histwrite_phy(nid_files(iff),"radsol",itau_w,radsol) 245 ENDIF 246 247 IF (flag_soll0(iff)<=lev_files(iff)) THEN 248 CALL histwrite_phy(nid_files(iff),"soll0",itau_w,sollw0) 249 ENDIF 250 251 IF (flag_SWupSFC(iff)<=lev_files(iff)) THEN 189 $ o_SWdnTOAclr%name,itau_w,zx_tmp_fi2d) 190 ENDIF 191 192 IF (o_SWup200%flag(iff)<=lev_files(iff)) THEN 193 CALL histwrite_phy(nid_files(iff),o_SWup200%name,itau_w,SWup200) 194 ENDIF 195 196 IF (o_SWup200clr%flag(iff)<=lev_files(iff)) THEN 197 CALL histwrite_phy(nid_files(iff), 198 s o_SWup200clr%name,itau_w,SWup200clr) 199 ENDIF 200 201 IF (o_SWdn200%flag(iff)<=lev_files(iff)) THEN 202 CALL histwrite_phy(nid_files(iff),o_SWdn200%name,itau_w,SWdn200) 203 ENDIF 204 205 IF (o_SWdn200clr%flag(iff)<=lev_files(iff)) THEN 206 CALL histwrite_phy(nid_files(iff), 207 s o_SWdn200clr%name,itau_w,SWdn200clr) 208 ENDIF 209 210 IF (o_LWup200%flag(iff)<=lev_files(iff)) THEN 211 CALL histwrite_phy(nid_files(iff),o_LWup200%name,itau_w,LWup200) 212 ENDIF 213 214 IF (o_LWup200clr%flag(iff)<=lev_files(iff)) THEN 215 CALL histwrite_phy(nid_files(iff), 216 s o_LWup200clr%name,itau_w,LWup200clr) 217 ENDIF 218 219 IF (o_LWdn200%flag(iff)<=lev_files(iff)) THEN 220 CALL histwrite_phy(nid_files(iff), 221 s o_LWdn200%name,itau_w,zx_tmp_fi2d) 222 ENDIF 223 224 IF (o_LWdn200clr%flag(iff)<=lev_files(iff)) THEN 225 CALL histwrite_phy(nid_files(iff), 226 s o_LWdn200clr%name,itau_w,zx_tmp_fi2d) 227 ENDIF 228 229 IF (o_sols%flag(iff)<=lev_files(iff)) THEN 230 CALL histwrite_phy(nid_files(iff),o_sols%name,itau_w,solsw) 231 ENDIF 232 233 IF (o_sols0%flag(iff)<=lev_files(iff)) THEN 234 CALL histwrite_phy(nid_files(iff),o_sols0%name,itau_w,solsw0) 235 ENDIF 236 237 IF (o_soll%flag(iff)<=lev_files(iff)) THEN 238 CALL histwrite_phy(nid_files(iff),o_soll%name,itau_w,sollw) 239 ENDIF 240 241 IF (o_radsol%flag(iff)<=lev_files(iff)) THEN 242 CALL histwrite_phy(nid_files(iff),o_radsol%name,itau_w,radsol) 243 ENDIF 244 245 IF (o_soll0%flag(iff)<=lev_files(iff)) THEN 246 CALL histwrite_phy(nid_files(iff),o_soll0%name,itau_w,sollw0) 247 ENDIF 248 249 IF (o_SWupSFC%flag(iff)<=lev_files(iff)) THEN 252 250 zx_tmp_fi2d(1 : klon) = swup ( 1 : klon, 1 ) 253 CALL histwrite_phy(nid_files(iff), "SWupSFC",itau_w,zx_tmp_fi2d) 254 ENDIF 255 256 IF (flag_SWupSFCclr(iff)<=lev_files(iff)) THEN 251 CALL histwrite_phy(nid_files(iff), 252 s o_SWupSFC%name,itau_w,zx_tmp_fi2d) 253 ENDIF 254 255 IF (o_SWupSFCclr%flag(iff)<=lev_files(iff)) THEN 257 256 zx_tmp_fi2d(1 : klon) = swup0 ( 1 : klon, 1 ) 258 257 CALL histwrite_phy(nid_files(iff), 259 $ "SWupSFCclr",itau_w,zx_tmp_fi2d)260 ENDIF 261 262 IF ( flag_SWdnSFC(iff)<=lev_files(iff)) THEN258 $ o_SWupSFCclr%name,itau_w,zx_tmp_fi2d) 259 ENDIF 260 261 IF (o_SWdnSFC%flag(iff)<=lev_files(iff)) THEN 263 262 zx_tmp_fi2d(1 : klon) = swdn ( 1 : klon, 1 ) 264 263 CALL histwrite_phy(nid_files(iff), 265 $ "SWdnSFC",itau_w,zx_tmp_fi2d)266 ENDIF 267 268 IF ( flag_SWdnSFCclr(iff)<=lev_files(iff)) THEN264 $ o_SWdnSFC%name,itau_w,zx_tmp_fi2d) 265 ENDIF 266 267 IF (o_SWdnSFCclr%flag(iff)<=lev_files(iff)) THEN 269 268 zx_tmp_fi2d(1 : klon) = swdn0 ( 1 : klon, 1 ) 270 269 CALL histwrite_phy(nid_files(iff), 271 $ "SWdnSFCclr",itau_w,zx_tmp_fi2d)272 ENDIF 273 274 IF ( flag_LWupSFC(iff)<=lev_files(iff)) THEN270 $ o_SWdnSFCclr%name,itau_w,zx_tmp_fi2d) 271 ENDIF 272 273 IF (o_LWupSFC%flag(iff)<=lev_files(iff)) THEN 275 274 zx_tmp_fi2d(1:klon)=sollwdown(1:klon)-sollw(1:klon) 276 275 CALL histwrite_phy(nid_files(iff), 277 $ "LWupSFC",itau_w,zx_tmp_fi2d)278 ENDIF 279 280 IF ( flag_LWdnSFC(iff)<=lev_files(iff)) THEN281 CALL histwrite_phy(nid_files(iff), 282 $ "LWdnSFC",itau_w,sollwdown)276 $ o_LWupSFC%name,itau_w,zx_tmp_fi2d) 277 ENDIF 278 279 IF (o_LWdnSFC%flag(iff)<=lev_files(iff)) THEN 280 CALL histwrite_phy(nid_files(iff), 281 $ o_LWdnSFC%name,itau_w,sollwdown) 283 282 ENDIF 284 283 285 284 sollwdownclr(1:klon) = -1.*lwdn0(1:klon,1) 286 IF ( flag_LWupSFCclr(iff)<=lev_files(iff)) THEN285 IF (o_LWupSFCclr%flag(iff)<=lev_files(iff)) THEN 287 286 zx_tmp_fi2d(1:klon)=sollwdownclr(1:klon)-sollw0(1:klon) 288 287 CALL histwrite_phy(nid_files(iff), 289 $ "LWupSFCclr",itau_w,zx_tmp_fi2d)290 ENDIF 291 292 IF ( flag_LWdnSFCclr(iff)<=lev_files(iff)) THEN293 CALL histwrite_phy(nid_files(iff), 294 $ "LWdnSFCclr",itau_w,sollwdownclr)295 ENDIF 296 297 IF ( flag_bils(iff)<=lev_files(iff)) THEN298 CALL histwrite_phy(nid_files(iff), "bils",itau_w,bils)299 ENDIF 300 301 IF ( flag_sens(iff)<=lev_files(iff)) THEN288 $ o_LWupSFCclr%name,itau_w,zx_tmp_fi2d) 289 ENDIF 290 291 IF (o_LWdnSFCclr%flag(iff)<=lev_files(iff)) THEN 292 CALL histwrite_phy(nid_files(iff), 293 $ o_LWdnSFCclr%name,itau_w,sollwdownclr) 294 ENDIF 295 296 IF (o_bils%flag(iff)<=lev_files(iff)) THEN 297 CALL histwrite_phy(nid_files(iff),o_bils%name,itau_w,bils) 298 ENDIF 299 300 IF (o_sens%flag(iff)<=lev_files(iff)) THEN 302 301 zx_tmp_fi2d(1:klon)=-1*sens(1:klon) 303 CALL histwrite_phy(nid_files(iff), "sens",itau_w,zx_tmp_fi2d)304 ENDIF 305 306 IF ( flag_fder(iff)<=lev_files(iff)) THEN307 CALL histwrite_phy(nid_files(iff), "fder",itau_w,fder)308 ENDIF 309 310 IF ( flag_ffonte(iff)<=lev_files(iff)) THEN311 CALL histwrite_phy(nid_files(iff), "ffonte",itau_w,zxffonte)312 ENDIF 313 314 IF ( flag_fqcalving(iff)<=lev_files(iff)) THEN302 CALL histwrite_phy(nid_files(iff),o_sens%name,itau_w,zx_tmp_fi2d) 303 ENDIF 304 305 IF (o_fder%flag(iff)<=lev_files(iff)) THEN 306 CALL histwrite_phy(nid_files(iff),o_fder%name,itau_w,fder) 307 ENDIF 308 309 IF (o_ffonte%flag(iff)<=lev_files(iff)) THEN 310 CALL histwrite_phy(nid_files(iff),o_ffonte%name,itau_w,zxffonte) 311 ENDIF 312 313 IF (o_fqcalving%flag(iff)<=lev_files(iff)) THEN 315 314 CALL histwrite_phy(nid_files(iff), 316 $ "fqcalving",itau_w,zxfqcalving)317 ENDIF 318 319 IF ( flag_fqfonte(iff)<=lev_files(iff)) THEN315 $ o_fqcalving%name,itau_w,zxfqcalving) 316 ENDIF 317 318 IF (o_fqfonte%flag(iff)<=lev_files(iff)) THEN 320 319 CALL histwrite_phy(nid_files(iff), 321 $ "fqfonte",itau_w,zxfqfonte)320 $ o_fqfonte%name,itau_w,zxfqfonte) 322 321 ENDIF 323 322 324 323 DO nsrf = 1, nbsrf 325 IF(nsrf.GE.2) THEN326 IF ( flag_pourc_sol(iff)<=lev_files(iff)) THEN324 ! IF(nsrf.GE.2) THEN 325 IF (o_pourc_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN 327 326 zx_tmp_fi2d(1 : klon) = pctsrf( 1 : klon, nsrf)*100. 328 327 CALL histwrite_phy(nid_files(iff), 329 $ "pourc_"//clnsurf(nsrf),itau_w,328 $ o_pourc_srf(nsrf)%name,itau_w, 330 329 $ zx_tmp_fi2d) 331 330 ENDIF 332 331 333 IF ( flag_fract_sol(iff)<=lev_files(iff)) THEN332 IF (o_fract_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN 334 333 zx_tmp_fi2d(1 : klon) = pctsrf( 1 : klon, nsrf) 335 334 CALL histwrite_phy(nid_files(iff), 336 $ "fract_"//clnsurf(nsrf),itau_w, 335 $ o_fract_srf(nsrf)%name,itau_w, 336 $ zx_tmp_fi2d) 337 ENDIF 338 ! ENDIF !nsrf.GT.2 339 340 IF (o_taux_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN 341 zx_tmp_fi2d(1 : klon) = fluxu( 1 : klon, 1, nsrf) 342 CALL histwrite_phy(nid_files(iff), 343 $ o_taux_srf(nsrf)%name,itau_w, 344 $ zx_tmp_fi2d) 345 ENDIF 346 347 IF (o_tauy_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN 348 zx_tmp_fi2d(1 : klon) = fluxv( 1 : klon, 1, nsrf) 349 CALL histwrite_phy(nid_files(iff), 350 $ o_tauy_srf(nsrf)%name,itau_w, 351 $ zx_tmp_fi2d) 352 ENDIF 353 354 IF (o_tsol_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN 355 zx_tmp_fi2d(1 : klon) = ftsol( 1 : klon, nsrf) 356 CALL histwrite_phy(nid_files(iff), 357 $ o_tsol_srf(nsrf)%name,itau_w, 337 358 $ zx_tmp_fi2d) 338 ENDIF 339 ENDIF !nsrf.GT.2 340 341 IF (flag_taux_sol(iff)<=lev_files(iff)) THEN 342 zx_tmp_fi2d(1 : klon) = fluxu( 1 : klon, 1, nsrf) 343 CALL histwrite_phy(nid_files(iff), 344 $ "taux_"//clnsurf(nsrf),itau_w, 345 $ zx_tmp_fi2d) 346 ENDIF 347 348 IF (flag_tauy_sol(iff)<=lev_files(iff)) THEN 349 zx_tmp_fi2d(1 : klon) = fluxv( 1 : klon, 1, nsrf) 350 CALL histwrite_phy(nid_files(iff), 351 $ "tauy_"//clnsurf(nsrf),itau_w, 352 $ zx_tmp_fi2d) 353 ENDIF 354 355 IF (flag_tsol_sol(iff)<=lev_files(iff)) THEN 356 zx_tmp_fi2d(1 : klon) = ftsol( 1 : klon, nsrf) 357 CALL histwrite_phy(nid_files(iff), 358 $ "tsol_"//clnsurf(nsrf),itau_w, 359 $ zx_tmp_fi2d) 360 ENDIF 361 362 IF (flag_u10m_sol(iff)<=lev_files(iff)) THEN 359 ENDIF 360 361 IF (o_u10m_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN 363 362 zx_tmp_fi2d(1 : klon) = u10m(1 : klon, nsrf) 364 CALL histwrite_phy(nid_files(iff), "u10m_"//clnsurf(nsrf),363 CALL histwrite_phy(nid_files(iff),o_u10m_srf(nsrf)%name, 365 364 $ itau_w,zx_tmp_fi2d) 366 365 ENDIF 367 366 368 IF ( flag_v10m_sol(iff)<=lev_files(iff)) THEN367 IF (o_v10m_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN 369 368 zx_tmp_fi2d(1 : klon) = v10m(1 : klon, nsrf) 370 CALL histwrite_phy(nid_files(iff), "v10m_"//clnsurf(nsrf),369 CALL histwrite_phy(nid_files(iff),o_v10m_srf(nsrf)%name, 371 370 $ itau_w,zx_tmp_fi2d) 372 371 ENDIF 373 372 374 IF ( flag_t2m_sol(iff)<=lev_files(iff)) THEN373 IF (o_t2m_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN 375 374 zx_tmp_fi2d(1 : klon) = t2m(1 : klon, nsrf) 376 CALL histwrite_phy(nid_files(iff), "t2m_"//clnsurf(nsrf),375 CALL histwrite_phy(nid_files(iff),o_t2m_srf(nsrf)%name, 377 376 $ itau_w,zx_tmp_fi2d) 378 377 ENDIF 379 378 380 IF ( flag_sens_sol(iff)<=lev_files(iff)) THEN379 IF (o_sens_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN 381 380 zx_tmp_fi2d(1 : klon) = fluxt( 1 : klon, 1, nsrf) 382 381 CALL histwrite_phy(nid_files(iff), 383 $ "sens_"//clnsurf(nsrf),itau_w,382 $ o_sens_srf(nsrf)%name,itau_w, 384 383 $ zx_tmp_fi2d) 385 384 ENDIF 386 385 387 IF ( flag_lat_sol(iff)<=lev_files(iff)) THEN386 IF (o_lat_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN 388 387 zx_tmp_fi2d(1 : klon) = fluxlat( 1 : klon, nsrf) 389 388 CALL histwrite_phy(nid_files(iff), 390 $ "lat_"//clnsurf(nsrf),itau_w,389 $ o_lat_srf(nsrf)%name,itau_w, 391 390 $ zx_tmp_fi2d) 392 391 ENDIF 393 392 394 IF ( flag_flw_sol(iff)<=lev_files(iff)) THEN393 IF (o_flw_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN 395 394 zx_tmp_fi2d(1 : klon) = fsollw( 1 : klon, nsrf) 396 395 CALL histwrite_phy(nid_files(iff), 397 $ "flw_"//clnsurf(nsrf),itau_w,396 $ o_flw_srf(nsrf)%name,itau_w, 398 397 $ zx_tmp_fi2d) 399 398 ENDIF 400 399 401 IF ( flag_fsw_sol(iff)<=lev_files(iff)) THEN400 IF (o_fsw_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN 402 401 zx_tmp_fi2d(1 : klon) = fsolsw( 1 : klon, nsrf) 403 402 CALL histwrite_phy(nid_files(iff), 404 $ "fsw_"//clnsurf(nsrf),itau_w,403 $ o_fsw_srf(nsrf)%name,itau_w, 405 404 $ zx_tmp_fi2d) 406 405 ENDIF 407 406 408 IF ( flag_wbils_sol(iff)<=lev_files(iff)) THEN407 IF (o_wbils_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN 409 408 zx_tmp_fi2d(1 : klon) = wfbils( 1 : klon, nsrf) 410 409 CALL histwrite_phy(nid_files(iff), 411 $ "wbils_"//clnsurf(nsrf),itau_w,410 $ o_wbils_srf(nsrf)%name,itau_w, 412 411 $ zx_tmp_fi2d) 413 412 ENDIF 414 413 415 IF ( flag_wbilo_sol(iff)<=lev_files(iff)) THEN414 IF (o_wbilo_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN 416 415 zx_tmp_fi2d(1 : klon) = wfbilo( 1 : klon, nsrf) 417 416 CALL histwrite_phy(nid_files(iff), 418 $ "wbilo_"//clnsurf(nsrf),itau_w,417 $ o_wbilo_srf(nsrf)%name,itau_w, 419 418 $ zx_tmp_fi2d) 420 419 ENDIF 421 420 422 421 if (iflag_pbl>1 .and. lev_histday.gt.10 ) then 423 IF ( flag_tke_sol(iff)<=lev_files(iff)) THEN424 CALL histwrite_phy(nid_files(iff), 425 $ "tke_"//clnsurf(nsrf),itau_w,426 $ pbl_tke(:,1:klev,nsrf))427 ENDIF 428 429 IF ( flag_tke_max_sol(iff)<=lev_files(iff)) THEN430 CALL histwrite_phy(nid_files(iff), 431 $ "tke_max_"//clnsurf(nsrf),itau_w,422 IF (o_tke_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN 423 CALL histwrite_phy(nid_files(iff), 424 $ o_tke_srf(nsrf)%name,itau_w, 425 $ pbl_tke(:,1:klev,nsrf)) 426 ENDIF 427 428 IF (o_tke_max_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN 429 CALL histwrite_phy(nid_files(iff), 430 $ o_tke_max_srf(nsrf)%name,itau_w, 432 431 $ pbl_tke(:,1:klev,nsrf)) 433 432 ENDIF … … 435 434 ENDDO 436 435 437 IF ( flag_cdrm(iff)<=lev_files(iff)) THEN438 CALL histwrite_phy(nid_files(iff), "cdrm",itau_w,cdragm)439 ENDIF 440 441 IF ( flag_cdrh(iff)<=lev_files(iff)) THEN442 CALL histwrite_phy(nid_files(iff), "cdrh",itau_w,cdragh)443 ENDIF 444 445 IF ( flag_cldl(iff)<=lev_files(iff)) THEN446 CALL histwrite_phy(nid_files(iff), "cldl",itau_w,cldl)447 ENDIF 448 449 IF ( flag_cldm(iff)<=lev_files(iff)) THEN450 CALL histwrite_phy(nid_files(iff), "cldm",itau_w,cldm)451 ENDIF 452 453 IF ( flag_cldh(iff)<=lev_files(iff)) THEN454 CALL histwrite_phy(nid_files(iff), "cldh",itau_w,cldh)455 ENDIF 456 457 IF ( flag_cldt(iff)<=lev_files(iff)) THEN458 CALL histwrite_phy(nid_files(iff), "cldt",436 IF (o_cdrm%flag(iff)<=lev_files(iff)) THEN 437 CALL histwrite_phy(nid_files(iff),o_cdrm%name,itau_w,cdragm) 438 ENDIF 439 440 IF (o_cdrh%flag(iff)<=lev_files(iff)) THEN 441 CALL histwrite_phy(nid_files(iff),o_cdrh%name,itau_w,cdragh) 442 ENDIF 443 444 IF (o_cldl%flag(iff)<=lev_files(iff)) THEN 445 CALL histwrite_phy(nid_files(iff),o_cldl%name,itau_w,cldl) 446 ENDIF 447 448 IF (o_cldm%flag(iff)<=lev_files(iff)) THEN 449 CALL histwrite_phy(nid_files(iff),o_cldm%name,itau_w,cldm) 450 ENDIF 451 452 IF (o_cldh%flag(iff)<=lev_files(iff)) THEN 453 CALL histwrite_phy(nid_files(iff),o_cldh%name,itau_w,cldh) 454 ENDIF 455 456 IF (o_cldt%flag(iff)<=lev_files(iff)) THEN 457 CALL histwrite_phy(nid_files(iff),o_cldt%name, 459 458 & itau_w,cldt*100) 460 459 ENDIF 461 460 462 IF ( flag_cldq(iff)<=lev_files(iff)) THEN463 CALL histwrite_phy(nid_files(iff), "cldq",itau_w,cldq)464 ENDIF 465 466 IF ( flag_lwp(iff)<=lev_files(iff)) THEN461 IF (o_cldq%flag(iff)<=lev_files(iff)) THEN 462 CALL histwrite_phy(nid_files(iff),o_cldq%name,itau_w,cldq) 463 ENDIF 464 465 IF (o_lwp%flag(iff)<=lev_files(iff)) THEN 467 466 zx_tmp_fi2d(1:klon) = flwp(1:klon) 468 CALL histwrite_phy(nid_files(iff),"lwp",itau_w,zx_tmp_fi2d) 469 ENDIF 470 471 IF (flag_iwp(iff)<=lev_files(iff)) THEN 467 CALL histwrite_phy(nid_files(iff), 468 s o_lwp%name,itau_w,zx_tmp_fi2d) 469 ENDIF 470 471 IF (o_iwp%flag(iff)<=lev_files(iff)) THEN 472 472 zx_tmp_fi2d(1:klon) = fiwp(1:klon) 473 CALL histwrite_phy(nid_files(iff),"iwp",itau_w,zx_tmp_fi2d) 474 ENDIF 475 476 IF (flag_ue(iff)<=lev_files(iff)) THEN 477 CALL histwrite_phy(nid_files(iff),"ue",itau_w,ue) 478 ENDIF 479 480 IF (flag_ve(iff)<=lev_files(iff)) THEN 481 CALL histwrite_phy(nid_files(iff),"ve",itau_w,ve) 482 ENDIF 483 484 IF (flag_uq(iff)<=lev_files(iff)) THEN 485 CALL histwrite_phy(nid_files(iff),"uq",itau_w,uq) 486 ENDIF 487 488 IF (flag_vq(iff)<=lev_files(iff)) THEN 489 CALL histwrite_phy(nid_files(iff),"vq",itau_w,vq) 473 CALL histwrite_phy(nid_files(iff), 474 s o_iwp%name,itau_w,zx_tmp_fi2d) 475 ENDIF 476 477 IF (o_ue%flag(iff)<=lev_files(iff)) THEN 478 CALL histwrite_phy(nid_files(iff),o_ue%name,itau_w,ue) 479 ENDIF 480 481 IF (o_ve%flag(iff)<=lev_files(iff)) THEN 482 CALL histwrite_phy(nid_files(iff),o_ve%name,itau_w,ve) 483 ENDIF 484 485 IF (o_uq%flag(iff)<=lev_files(iff)) THEN 486 CALL histwrite_phy(nid_files(iff),o_uq%name,itau_w,uq) 487 ENDIF 488 489 IF (o_vq%flag(iff)<=lev_files(iff)) THEN 490 CALL histwrite_phy(nid_files(iff),o_vq%name,itau_w,vq) 490 491 ENDIF 491 492 492 493 IF(iflag_con.GE.3) THEN ! sb 493 IF (flag_cape(iff)<=lev_files(iff)) THEN 494 CALL histwrite_phy(nid_files(iff),"cape",itau_w,cape) 495 ENDIF 496 497 IF (flag_pbase(iff)<=lev_files(iff)) THEN 498 CALL histwrite_phy(nid_files(iff),"pbase",itau_w,pbase) 499 ENDIF 500 501 IF (flag_ptop(iff)<=lev_files(iff)) THEN 502 CALL histwrite_phy(nid_files(iff),"ptop",itau_w,ema_pct) 503 ENDIF 504 505 IF (flag_fbase(iff)<=lev_files(iff)) THEN 506 CALL histwrite_phy(nid_files(iff),"fbase",itau_w,ema_cbmf) 507 ENDIF 508 509 IF (flag_prw(iff)<=lev_files(iff)) THEN 510 CALL histwrite_phy(nid_files(iff),"prw",itau_w,prw) 511 ENDIF 512 !!! IM beg 513 IF (flag_cape_max(iff)<=lev_files(iff)) THEN 514 CALL histwrite_phy(nid_files(iff),"cape_max",itau_w,cape) 515 ENDIF 516 IF (flag_upwd(iff)<=lev_files(iff)) THEN 517 CALL histwrite_phy(nid_files(iff),"upwd",itau_w,upwd) 518 ENDIF 519 IF (flag_Ma(iff)<=lev_files(iff)) THEN 520 CALL histwrite_phy(nid_files(iff),"Ma",itau_w,Ma) 521 ENDIF 522 523 IF (flag_dnwd(iff)<=lev_files(iff)) THEN 524 CALL histwrite_phy(nid_files(iff),"dnwd",itau_w,dnwd) 525 ENDIF 526 527 IF (flag_dnwd0(iff)<=lev_files(iff)) THEN 528 CALL histwrite_phy(nid_files(iff),"dnwd0",itau_w,dnwd0) 529 ENDIF 530 !!! IM end 494 IF (o_cape%flag(iff)<=lev_files(iff)) THEN 495 CALL histwrite_phy(nid_files(iff),o_cape%name,itau_w,cape) 496 ENDIF 497 498 IF (o_pbase%flag(iff)<=lev_files(iff)) THEN 499 CALL histwrite_phy(nid_files(iff),o_pbase%name,itau_w,pbase) 500 ENDIF 501 502 IF (o_ptop%flag(iff)<=lev_files(iff)) THEN 503 CALL histwrite_phy(nid_files(iff),o_ptop%name,itau_w,ema_pct) 504 ENDIF 505 506 IF (o_fbase%flag(iff)<=lev_files(iff)) THEN 507 CALL histwrite_phy(nid_files(iff),o_fbase%name,itau_w,ema_cbmf) 508 ENDIF 509 510 IF (o_prw%flag(iff)<=lev_files(iff)) THEN 511 CALL histwrite_phy(nid_files(iff),o_prw%name,itau_w,prw) 512 ENDIF 513 514 IF (o_cape_max%flag(iff)<=lev_files(iff)) THEN 515 CALL histwrite_phy(nid_files(iff),o_cape_max%name,itau_w,cape) 516 ENDIF 517 518 IF (o_upwd%flag(iff)<=lev_files(iff)) THEN 519 CALL histwrite_phy(nid_files(iff),o_upwd%name,itau_w,upwd) 520 ENDIF 521 522 IF (o_Ma%flag(iff)<=lev_files(iff)) THEN 523 CALL histwrite_phy(nid_files(iff),o_Ma%name,itau_w,Ma) 524 ENDIF 525 526 IF (o_dnwd%flag(iff)<=lev_files(iff)) THEN 527 CALL histwrite_phy(nid_files(iff),o_dnwd%name,itau_w,dnwd) 528 ENDIF 529 530 IF (o_dnwd0%flag(iff)<=lev_files(iff)) THEN 531 CALL histwrite_phy(nid_files(iff),o_dnwd0%name,itau_w,dnwd0) 532 ENDIF 533 531 534 ENDIF !iflag_con .GE. 3 532 535 533 IF ( flag_s_pblh(iff)<=lev_files(iff)) THEN534 CALL histwrite_phy(nid_files(iff), "s_pblh",itau_w,s_pblh)535 ENDIF 536 537 IF ( flag_s_pblt(iff)<=lev_files(iff)) THEN538 CALL histwrite_phy(nid_files(iff), "s_pblt",itau_w,s_pblt)539 ENDIF 540 541 IF ( flag_s_lcl(iff)<=lev_files(iff)) THEN542 CALL histwrite_phy(nid_files(iff), "s_lcl",itau_w,s_lcl)543 ENDIF 544 545 IF ( flag_s_capCL(iff)<=lev_files(iff)) THEN546 CALL histwrite_phy(nid_files(iff), "s_capCL",itau_w,s_capCL)547 ENDIF 548 549 IF ( flag_s_oliqCL(iff)<=lev_files(iff)) THEN550 CALL histwrite_phy(nid_files(iff), "s_oliqCL",itau_w,s_oliqCL)551 ENDIF 552 553 IF ( flag_s_cteiCL(iff)<=lev_files(iff)) THEN554 CALL histwrite_phy(nid_files(iff), "s_cteiCL",itau_w,s_cteiCL)555 ENDIF 556 557 IF ( flag_s_therm(iff)<=lev_files(iff)) THEN558 CALL histwrite_phy(nid_files(iff), "s_therm",itau_w,s_therm)559 ENDIF 560 561 IF ( flag_s_trmb1(iff)<=lev_files(iff)) THEN562 CALL histwrite_phy(nid_files(iff), "s_trmb1",itau_w,s_trmb1)563 ENDIF 564 565 IF ( flag_s_trmb2(iff)<=lev_files(iff)) THEN566 CALL histwrite_phy(nid_files(iff), "s_trmb2",itau_w,s_trmb2)567 ENDIF 568 569 IF ( flag_s_trmb3(iff)<=lev_files(iff)) THEN570 CALL histwrite_phy(nid_files(iff), "s_trmb3",itau_w,s_trmb3)536 IF (o_s_pblh%flag(iff)<=lev_files(iff)) THEN 537 CALL histwrite_phy(nid_files(iff),o_s_pblh%name,itau_w,s_pblh) 538 ENDIF 539 540 IF (o_s_pblt%flag(iff)<=lev_files(iff)) THEN 541 CALL histwrite_phy(nid_files(iff),o_s_pblt%name,itau_w,s_pblt) 542 ENDIF 543 544 IF (o_s_lcl%flag(iff)<=lev_files(iff)) THEN 545 CALL histwrite_phy(nid_files(iff),o_s_lcl%name,itau_w,s_lcl) 546 ENDIF 547 548 IF (o_s_capCL%flag(iff)<=lev_files(iff)) THEN 549 CALL histwrite_phy(nid_files(iff),o_s_capCL%name,itau_w,s_capCL) 550 ENDIF 551 552 IF (o_s_oliqCL%flag(iff)<=lev_files(iff)) THEN 553 CALL histwrite_phy(nid_files(iff),o_s_oliqCL%name,itau_w,s_oliqCL) 554 ENDIF 555 556 IF (o_s_cteiCL%flag(iff)<=lev_files(iff)) THEN 557 CALL histwrite_phy(nid_files(iff),o_s_cteiCL%name,itau_w,s_cteiCL) 558 ENDIF 559 560 IF (o_s_therm%flag(iff)<=lev_files(iff)) THEN 561 CALL histwrite_phy(nid_files(iff),o_s_therm%name,itau_w,s_therm) 562 ENDIF 563 564 IF (o_s_trmb1%flag(iff)<=lev_files(iff)) THEN 565 CALL histwrite_phy(nid_files(iff),o_s_trmb1%name,itau_w,s_trmb1) 566 ENDIF 567 568 IF (o_s_trmb2%flag(iff)<=lev_files(iff)) THEN 569 CALL histwrite_phy(nid_files(iff),o_s_trmb2%name,itau_w,s_trmb2) 570 ENDIF 571 572 IF (o_s_trmb3%flag(iff)<=lev_files(iff)) THEN 573 CALL histwrite_phy(nid_files(iff),o_s_trmb3%name,itau_w,s_trmb3) 571 574 ENDIF 572 575 … … 578 581 ! on ecrit u v t q a 850 700 500 200 au niv 3 579 582 583 ll=0 580 584 DO k=1, nlevSTD 581 585 IF(k.GE.2.AND.k.LE.12) bb2=clevSTD(k) … … 585 589 586 590 ! a refaire correctement !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 587 IF (flag_ulevsSTD(iff)<=lev_files(iff)) THEN588 CALL histwrite_phy(nid_files(iff),"u"//bb2,589 & itau_w,uwriteSTD(:,k,iff))590 ENDIF591 592 IF (flag_vlevsSTD(iff)<=lev_files(iff)) THEN 593 CALL histwrite_phy(nid_files(iff),"v"//bb2,594 & itau_w,vwriteSTD(:,k,iff))595 ENDIF596 597 IF (flag_wlevsSTD(iff)<=lev_files(iff)) THEN 598 CALL histwrite_phy(nid_files(iff),"w"//bb2,599 & itau_w,wwriteSTD(:,k,iff))600 ENDIF601 602 IF (flag_philevsSTD(iff)<=lev_files(iff)) THEN 603 CALL histwrite_phy(nid_files(iff),604 $ "phi"//bb2,591 ll=ll+1 592 IF (o_uSTDlevs(ll)%flag(iff)<=lev_files(iff)) THEN 593 CALL histwrite_phy(nid_files(iff),o_uSTDlevs(ll)%name, 594 & itau_w,uwriteSTD(:,k,iff)) 595 ENDIF 596 597 IF (o_vSTDlevs(ll)%flag(iff)<=lev_files(iff)) THEN 598 CALL histwrite_phy(nid_files(iff),o_vSTDlevs(ll)%name, 599 & itau_w,vwriteSTD(:,k,iff)) 600 ENDIF 601 602 IF (o_wSTDlevs(ll)%flag(iff)<=lev_files(iff)) THEN 603 CALL histwrite_phy(nid_files(iff),o_wSTDlevs(ll)%name, 604 & itau_w,wwriteSTD(:,k,iff)) 605 ENDIF 606 607 IF (o_phiSTDlevs(ll)%flag(iff)<=lev_files(iff)) THEN 608 CALL histwrite_phy(nid_files(iff),o_phiSTDlevs(ll)%name, 605 609 & itau_w,phiwriteSTD(:,k,iff)) 606 610 ENDIF 607 611 608 IF ( flag_qlevsSTD(iff)<=lev_files(iff)) THEN609 CALL histwrite_phy(nid_files(iff), "q"//bb2,610 & itau_w, qwriteSTD(:,k,iff))611 ENDIF 612 613 IF ( flag_tlevsSTD(iff)<=lev_files(iff)) THEN614 CALL histwrite_phy(nid_files(iff), "t"//bb2,615 & itau_w, twriteSTD(:,k,iff))612 IF (o_qSTDlevs(ll)%flag(iff)<=lev_files(iff)) THEN 613 CALL histwrite_phy(nid_files(iff),o_qSTDlevs(ll)%name, 614 & itau_w, qwriteSTD(:,k,iff)) 615 ENDIF 616 617 IF (o_tSTDlevs(ll)%flag(iff)<=lev_files(iff)) THEN 618 CALL histwrite_phy(nid_files(iff),o_tSTDlevs(ll)%name, 619 & itau_w, twriteSTD(:,k,iff)) 616 620 ENDIF 617 621 … … 619 623 ENDDO 620 624 621 IF ( flag_t_oce_sic(iff)<=lev_files(iff)) THEN625 IF (o_t_oce_sic%flag(iff)<=lev_files(iff)) THEN 622 626 DO i=1, klon 623 627 IF (pctsrf(i,is_oce).GT.epsfra.OR. … … 630 634 ENDIF 631 635 ENDDO 632 CALL histwrite_phy(nid_files(iff),"t_oce_sic",itau_w,zx_tmp_fi2d) 633 ENDIF 634 635 IF (type_ocean=='force ') THEN 636 636 CALL histwrite_phy(nid_files(iff), 637 s o_t_oce_sic%name,itau_w,zx_tmp_fi2d) 638 ENDIF 639 640 ! Couplage convection-couche limite 641 IF (iflag_con.GE.3) THEN 642 IF (iflag_coupl.EQ.1) THEN 643 IF (o_ale_bl%flag(iff)<=lev_files(iff)) THEN 644 CALL histwrite_phy(nid_files(iff),o_ale_bl%name,itau_w,ale_bl) 645 ENDIF 646 IF (o_alp_bl%flag(iff)<=lev_files(iff)) THEN 647 CALL histwrite_phy(nid_files(iff),o_alp_bl%name,itau_w,alp_bl) 648 ENDIF 649 ENDIF !iflag_coupl.EQ.1 650 ENDIF !(iflag_con.GE.3) 651 652 ! Wakes 637 653 IF (iflag_con.EQ.3) THEN 638 IF (flag_ale(iff)<=lev_files(iff)) THEN639 CALL histwrite_phy(nid_files(iff),"ale",itau_w,ale)640 ENDIF641 IF (flag_alp(iff)<=lev_files(iff)) THEN642 CALL histwrite_phy(nid_files(iff),"alp",itau_w,alp)643 ENDIF644 IF (flag_cin(iff)<=lev_files(iff)) THEN645 CALL histwrite_phy(nid_files(iff),"cin",itau_w,cin)646 ENDIF647 IF (iflag_coupl.EQ.1) THEN648 IF (flag_ale_bl(iff)<=lev_files(iff)) THEN649 CALL histwrite_phy(nid_files(iff),"ale_bl",itau_w,ale_bl)650 ENDIF651 IF (flag_alp_bl(iff)<=lev_files(iff)) THEN652 CALL histwrite_phy(nid_files(iff),"alp_bl",itau_w,alp_bl)653 ENDIF654 ENDIF !iflag_coupl.EQ.1655 656 654 IF (iflag_wake.EQ.1) THEN 657 IF (flag_ale_wk(iff)<=lev_files(iff)) THEN 658 CALL histwrite_phy(nid_files(iff),"ale_wk",itau_w,ale_wake) 659 ENDIF 660 IF (flag_alp_wk(iff)<=lev_files(iff)) THEN 661 CALL histwrite_phy(nid_files(iff),"alp_wk",itau_w,alp_wake) 662 ENDIF 663 664 IF (flag_wape(iff)<=lev_files(iff)) THEN 665 CALL histwrite_phy(nid_files(iff),"WAPE",itau_w,wake_pe) 666 ENDIF 667 IF (flag_wake_h(iff)<=lev_files(iff)) THEN 668 CALL histwrite_phy(nid_files(iff),"wake_h",itau_w,wake_h) 669 ENDIF 670 671 IF (flag_wake_s(iff)<=lev_files(iff)) THEN 672 CALL histwrite_phy(nid_files(iff),"wake_s",itau_w,wake_s) 673 ENDIF 674 675 IF (flag_wake_deltat(iff)<=lev_files(iff)) THEN 676 CALL histwrite_phy(nid_files(iff),"wake_deltat", 655 IF (o_ale_wk%flag(iff)<=lev_files(iff)) THEN 656 CALL histwrite_phy(nid_files(iff),o_ale_wk%name,itau_w,ale_wake) 657 ENDIF 658 IF (o_alp_wk%flag(iff)<=lev_files(iff)) THEN 659 CALL histwrite_phy(nid_files(iff),o_alp_wk%name,itau_w,alp_wake) 660 ENDIF 661 662 IF (o_ale%flag(iff)<=lev_files(iff)) THEN 663 CALL histwrite_phy(nid_files(iff),o_ale%name,itau_w,ale) 664 ENDIF 665 IF (o_alp%flag(iff)<=lev_files(iff)) THEN 666 CALL histwrite_phy(nid_files(iff),o_alp%name,itau_w,alp) 667 ENDIF 668 IF (o_cin%flag(iff)<=lev_files(iff)) THEN 669 CALL histwrite_phy(nid_files(iff),o_cin%name,itau_w,cin) 670 ENDIF 671 IF (o_wape%flag(iff)<=lev_files(iff)) THEN 672 CALL histwrite_phy(nid_files(iff),o_WAPE%name,itau_w,wake_pe) 673 ENDIF 674 IF (o_wake_h%flag(iff)<=lev_files(iff)) THEN 675 CALL histwrite_phy(nid_files(iff),o_wake_h%name,itau_w,wake_h) 676 ENDIF 677 678 IF (o_wake_s%flag(iff)<=lev_files(iff)) THEN 679 CALL histwrite_phy(nid_files(iff),o_wake_s%name,itau_w,wake_s) 680 ENDIF 681 682 IF (o_wake_deltat%flag(iff)<=lev_files(iff)) THEN 683 CALL histwrite_phy(nid_files(iff),o_wake_deltat%name, 677 684 $ itau_w,wake_deltat) 678 685 ENDIF 679 686 680 IF ( flag_wake_deltaq(iff)<=lev_files(iff)) THEN681 CALL histwrite_phy(nid_files(iff), "wake_deltaq",687 IF (o_wake_deltaq%flag(iff)<=lev_files(iff)) THEN 688 CALL histwrite_phy(nid_files(iff),o_wake_deltaq%name, 682 689 $ itau_w,wake_deltaq) 683 690 ENDIF 684 691 685 IF (flag_wake_omg(iff)<=lev_files(iff)) THEN 686 CALL histwrite_phy(nid_files(iff),"wake_omg",itau_w,wake_omg) 687 ENDIF 688 !!!IM beg 689 IF (flag_dtwak(iff)<=lev_files(iff)) THEN 690 zx_tmp_fi3d(1:klon,1:klev)=d_t_wake(1:klon,1:klev) 692 IF (o_wake_omg%flag(iff)<=lev_files(iff)) THEN 693 CALL histwrite_phy(nid_files(iff), 694 s o_wake_omg%name,itau_w,wake_omg) 695 ENDIF 696 697 IF (o_dtwak%flag(iff)<=lev_files(iff)) THEN 698 zx_tmp_fi3d(1:klon,1:klev)=d_t_wake(1:klon,1:klev) 691 699 & /pdtphys 692 CALL histwrite_phy(nid_files(iff),"dtwak",itau_w,zx_tmp_fi3d)693 ENDIF694 695 IF (flag_dqwak(iff)<=lev_files(iff)) THEN 696 zx_tmp_fi3d(1:klon,1:klev)=d_q_wake(1:klon,1:klev)/pdtphys697 CALL histwrite_phy(nid_files(iff),"dqwak",itau_w,zx_tmp_fi3d)698 ENDIF699 700 IF (flag_ftd(iff)<=lev_files(iff)) THEN701 CALL histwrite_phy(nid_files(iff),"ftd",itau_w,ftd)702 ENDIF 703 704 IF (flag_fqd(iff)<=lev_files(iff)) THEN705 CALL histwrite_phy(nid_files(iff),"fqd",itau_w,fqd)706 ENDIF 707 !!!IM end 708 ENDIF709 710 IF (flag_Vprecip(iff)<=lev_files(iff)) THEN 711 CALL histwrite_phy(nid_files(iff),"Vprecip",itau_w,Vprecip)712 ENDIF713 700 CALL histwrite_phy(nid_files(iff), 701 & o_dtwak%name,itau_w,zx_tmp_fi3d) 702 ENDIF 703 704 IF (o_dqwak%flag(iff)<=lev_files(iff)) THEN 705 zx_tmp_fi3d(1:klon,1:klev)=d_q_wake(1:klon,1:klev)/pdtphys 706 CALL histwrite_phy(nid_files(iff), 707 & o_dqwak%name,itau_w,zx_tmp_fi3d) 708 ENDIF 709 ENDIF ! iflag_wake.EQ.1 710 711 IF (o_Vprecip%flag(iff)<=lev_files(iff)) THEN 712 CALL histwrite_phy(nid_files(iff),o_Vprecip%name,itau_w,Vprecip) 713 ENDIF 714 715 IF (o_ftd%flag(iff)<=lev_files(iff)) THEN 716 CALL histwrite_phy(nid_files(iff),o_ftd%name,itau_w,ftd) 717 ENDIF 718 719 IF (o_fqd%flag(iff)<=lev_files(iff)) THEN 720 CALL histwrite_phy(nid_files(iff),o_fqd%name,itau_w,fqd) 721 ENDIF 714 722 ENDIF !(iflag_con.EQ.3) 715 723 716 ELSE IF (type_ocean=='slab ') THEN 717 718 IF ( flag_slab_bils(iff)<=lev_files(iff)) 724 IF (type_ocean=='slab ') THEN 725 IF ( o_slab_bils%flag(iff)<=lev_files(iff)) 719 726 $ CALL histwrite_phy( 720 $ nid_files(iff), "slab_wbils_oce",itau_w,slab_wfbils)727 $ nid_files(iff),o_slab_bils%name,itau_w,slab_wfbils) 721 728 722 729 ENDIF !type_ocean == force/slab 723 730 724 IF (flag_weakinv(iff)<=lev_files(iff)) THEN 725 CALL histwrite_phy(nid_files(iff),"weakinv",itau_w,weak_inversion) 726 ENDIF 727 728 IF (flag_dthmin(iff)<=lev_files(iff)) THEN 729 CALL histwrite_phy(nid_files(iff),"dthmin",itau_w,dthmin) 730 ENDIF 731 732 IF (flag_cldtau(iff)<=lev_files(iff)) THEN 733 CALL histwrite_phy(nid_files(iff),"cldtau",itau_w,cldtau) 734 ENDIF 735 736 IF (flag_cldemi(iff)<=lev_files(iff)) THEN 737 CALL histwrite_phy(nid_files(iff),"cldemi",itau_w,cldemi) 738 ENDIF 739 740 ! IF (flag_pr_con_l(iff)<=lev_files(iff)) THEN 741 ! CALL histwrite_phy(nid_files(iff),"pmflxr",itau_w,pmflxr) 731 IF (o_weakinv%flag(iff)<=lev_files(iff)) THEN 732 CALL histwrite_phy(nid_files(iff), 733 s o_weakinv%name,itau_w,weak_inversion) 734 ENDIF 735 736 IF (o_dthmin%flag(iff)<=lev_files(iff)) THEN 737 CALL histwrite_phy(nid_files(iff),o_dthmin%name,itau_w,dthmin) 738 ENDIF 739 740 IF (o_cldtau%flag(iff)<=lev_files(iff)) THEN 741 CALL histwrite_phy(nid_files(iff),o_cldtau%name,itau_w,cldtau) 742 ENDIF 743 744 IF (o_cldemi%flag(iff)<=lev_files(iff)) THEN 745 CALL histwrite_phy(nid_files(iff),o_cldemi%name,itau_w,cldemi) 746 ENDIF 747 748 ! IF (o_pr_con_l%flag(iff)<=lev_files(iff)) THEN 749 ! CALL histwrite_phy(nid_files(iff),o_pmflxr%name,itau_w,pmflxr) 742 750 ! ENDIF 743 751 744 ! IF ( flag_pr_con_i(iff)<=lev_files(iff)) THEN745 ! CALL histwrite_phy(nid_files(iff), "pmflxs",itau_w,pmflxs)752 ! IF (o_pr_con_i%flag(iff)<=lev_files(iff)) THEN 753 ! CALL histwrite_phy(nid_files(iff),o_pmflxs%name,itau_w,pmflxs) 746 754 ! ENDIF 747 755 748 ! IF ( flag_pr_lsc_l(iff)<=lev_files(iff)) THEN749 ! CALL histwrite_phy(nid_files(iff), "prfl",itau_w,prfl)756 ! IF (o_pr_lsc_l%flag(iff)<=lev_files(iff)) THEN 757 ! CALL histwrite_phy(nid_files(iff),o_prfl%name,itau_w,prfl) 750 758 ! ENDIF 751 759 752 ! IF ( flag_pr_lsc_i(iff)<=lev_files(iff)) THEN753 ! CALL histwrite_phy(nid_files(iff), "psfl",itau_w,psfl)760 ! IF (o_pr_lsc_i%flag(iff)<=lev_files(iff)) THEN 761 ! CALL histwrite_phy(nid_files(iff),o_psfl%name,itau_w,psfl) 754 762 ! ENDIF 755 763 756 IF ( flag_rh2m(iff)<=lev_files(iff)) THEN764 IF (o_rh2m%flag(iff)<=lev_files(iff)) THEN 757 765 DO i=1, klon 758 766 zx_tmp_fi2d(i)=MIN(100.,rh2m(i)*100.) 759 767 ENDDO 760 CALL histwrite_phy(nid_files(iff), "rh2m",itau_w,zx_tmp_fi2d)761 ENDIF 762 763 IF ( flag_qsat2m(iff)<=lev_files(iff)) THEN764 CALL histwrite_phy(nid_files(iff), "qsat2m",itau_w,qsat2m)765 ENDIF 766 767 IF ( flag_tpot(iff)<=lev_files(iff)) THEN768 CALL histwrite_phy(nid_files(iff), "tpot",itau_w,tpot)769 ENDIF 770 771 IF ( flag_tpote(iff)<=lev_files(iff)) THEN772 CALL histwrite_phy(nid_files(iff), "tpote",itau_w,tpote)773 ENDIF 774 775 IF ( flag_SWnetOR(iff)<=lev_files(iff)) THEN768 CALL histwrite_phy(nid_files(iff),o_rh2m%name,itau_w,zx_tmp_fi2d) 769 ENDIF 770 771 IF (o_qsat2m%flag(iff)<=lev_files(iff)) THEN 772 CALL histwrite_phy(nid_files(iff),o_qsat2m%name,itau_w,qsat2m) 773 ENDIF 774 775 IF (o_tpot%flag(iff)<=lev_files(iff)) THEN 776 CALL histwrite_phy(nid_files(iff),o_tpot%name,itau_w,tpot) 777 ENDIF 778 779 IF (o_tpote%flag(iff)<=lev_files(iff)) THEN 780 CALL histwrite_phy(nid_files(iff),o_tpote%name,itau_w,tpote) 781 ENDIF 782 783 IF (o_SWnetOR%flag(iff)<=lev_files(iff)) THEN 776 784 zx_tmp_fi2d(1 : klon) = fsolsw( 1 : klon, is_ter) 777 CALL histwrite_phy(nid_files(iff),"SWnetOR",itau_w, zx_tmp_fi2d) 778 ENDIF 779 780 IF (flag_SWdownOR(iff)<=lev_files(iff)) THEN 785 CALL histwrite_phy(nid_files(iff), 786 s o_SWnetOR%name,itau_w, zx_tmp_fi2d) 787 ENDIF 788 789 IF (o_SWdownOR%flag(iff)<=lev_files(iff)) THEN 781 790 zx_tmp_fi2d(1:klon) = solsw(1:klon)/(1.-albsol1(1:klon)) 782 CALL histwrite_phy(nid_files(iff),"SWdownOR",itau_w, zx_tmp_fi2d) 783 ENDIF 784 785 IF (flag_LWdownOR(iff)<=lev_files(iff)) THEN 786 CALL histwrite_phy(nid_files(iff),"LWdownOR",itau_w,sollwdown) 787 ENDIF 788 789 IF (flag_snowl(iff)<=lev_files(iff)) THEN 790 CALL histwrite_phy(nid_files(iff),"snowl",itau_w,snow_lsc) 791 ENDIF 792 793 IF (flag_solldown(iff)<=lev_files(iff)) THEN 794 CALL histwrite_phy(nid_files(iff),"solldown",itau_w,sollwdown) 795 ENDIF 796 797 IF (flag_dtsvdfo(iff)<=lev_files(iff)) THEN 798 CALL histwrite_phy(nid_files(iff),"dtsvdfo",itau_w,d_ts(:,is_oce)) 799 ENDIF 800 801 IF (flag_dtsvdft(iff)<=lev_files(iff)) THEN 802 CALL histwrite_phy(nid_files(iff),"dtsvdft",itau_w,d_ts(:,is_ter)) 803 ENDIF 804 805 IF (flag_dtsvdfg(iff)<=lev_files(iff)) THEN 806 CALL histwrite_phy(nid_files(iff), 807 $ "dtsvdfg",itau_w, d_ts(:,is_lic)) 808 ENDIF 809 810 IF (flag_dtsvdfi(iff)<=lev_files(iff)) THEN 811 CALL histwrite_phy(nid_files(iff),"dtsvdfi",itau_w,d_ts(:,is_sic)) 812 ENDIF 813 814 IF (flag_rugs(iff)<=lev_files(iff)) THEN 815 CALL histwrite_phy(nid_files(iff),"rugs",itau_w,zxrugs) 791 CALL histwrite_phy(nid_files(iff), 792 s o_SWdownOR%name,itau_w, zx_tmp_fi2d) 793 ENDIF 794 795 IF (o_LWdownOR%flag(iff)<=lev_files(iff)) THEN 796 CALL histwrite_phy(nid_files(iff), 797 s o_LWdownOR%name,itau_w,sollwdown) 798 ENDIF 799 800 IF (o_snowl%flag(iff)<=lev_files(iff)) THEN 801 CALL histwrite_phy(nid_files(iff),o_snowl%name,itau_w,snow_lsc) 802 ENDIF 803 804 IF (o_solldown%flag(iff)<=lev_files(iff)) THEN 805 CALL histwrite_phy(nid_files(iff), 806 s o_solldown%name,itau_w,sollwdown) 807 ENDIF 808 809 IF (o_dtsvdfo%flag(iff)<=lev_files(iff)) THEN 810 CALL histwrite_phy(nid_files(iff), 811 s o_dtsvdfo%name,itau_w,d_ts(:,is_oce)) 812 ENDIF 813 814 IF (o_dtsvdft%flag(iff)<=lev_files(iff)) THEN 815 CALL histwrite_phy(nid_files(iff), 816 s o_dtsvdft%name,itau_w,d_ts(:,is_ter)) 817 ENDIF 818 819 IF (o_dtsvdfg%flag(iff)<=lev_files(iff)) THEN 820 CALL histwrite_phy(nid_files(iff), 821 $ o_dtsvdfg%name,itau_w, d_ts(:,is_lic)) 822 ENDIF 823 824 IF (o_dtsvdfi%flag(iff)<=lev_files(iff)) THEN 825 CALL histwrite_phy(nid_files(iff), 826 s o_dtsvdfi%name,itau_w,d_ts(:,is_sic)) 827 ENDIF 828 829 IF (o_rugs%flag(iff)<=lev_files(iff)) THEN 830 CALL histwrite_phy(nid_files(iff),o_rugs%name,itau_w,zxrugs) 831 ENDIF 832 833 IF (ok_ade) THEN 834 IF (o_topswad%flag(iff)<=lev_files(iff)) THEN 835 CALL histwrite_phy(nid_files(iff),o_topswad%name,itau_w,topswad) 836 ENDIF 837 IF (o_solswad%flag(iff)<=lev_files(iff)) THEN 838 CALL histwrite_phy(nid_files(iff),o_solswad%name,itau_w,solswad) 839 ENDIF 840 ENDIF 841 842 IF (ok_aie) THEN 843 IF (o_topswai%flag(iff)<=lev_files(iff)) THEN 844 CALL histwrite_phy(nid_files(iff),o_topswai%name,itau_w,topswai) 845 ENDIF 846 IF (o_solswai%flag(iff)<=lev_files(iff)) THEN 847 CALL histwrite_phy(nid_files(iff),o_solswai%name,itau_w,solswai) 848 ENDIF 816 849 ENDIF 817 850 818 851 ! Champs 3D: 819 IF (flag_lwcon(iff)<=lev_files(iff)) THEN 820 CALL histwrite_phy(nid_files(iff),"lwcon",itau_w,flwc) 821 ENDIF 822 823 IF (flag_iwcon(iff)<=lev_files(iff)) THEN 824 CALL histwrite_phy(nid_files(iff),"iwcon",itau_w,fiwc) 825 ENDIF 826 827 IF (flag_temp(iff)<=lev_files(iff)) THEN 828 CALL histwrite_phy(nid_files(iff),"temp",itau_w,t_seri) 829 ENDIF 830 831 IF (flag_theta(iff)<=lev_files(iff)) THEN 832 CALL histwrite_phy(nid_files(iff),"theta",itau_w,theta) 833 ENDIF 834 835 IF (flag_ovap(iff)<=lev_files(iff)) THEN 836 CALL histwrite_phy(nid_files(iff),"ovap",itau_w,qx(:,:,ivap)) 837 ENDIF 838 839 IF (flag_geop(iff)<=lev_files(iff)) THEN 840 CALL histwrite_phy(nid_files(iff),"geop",itau_w,zphi) 841 ENDIF 842 843 IF (flag_vitu(iff)<=lev_files(iff)) THEN 844 CALL histwrite_phy(nid_files(iff),"vitu",itau_w,u_seri) 845 ENDIF 846 847 IF (flag_vitv(iff)<=lev_files(iff)) THEN 848 CALL histwrite_phy(nid_files(iff),"vitv",itau_w,v_seri) 849 ENDIF 850 851 IF (flag_vitw(iff)<=lev_files(iff)) THEN 852 CALL histwrite_phy(nid_files(iff),"vitw",itau_w,omega) 853 ENDIF 854 855 IF (flag_pres(iff)<=lev_files(iff)) THEN 856 CALL histwrite_phy(nid_files(iff),"pres",itau_w,pplay) 857 ENDIF 858 859 IF (flag_rneb(iff)<=lev_files(iff)) THEN 860 CALL histwrite_phy(nid_files(iff),"rneb",itau_w,cldfra) 861 ENDIF 862 863 IF (flag_rnebcon(iff)<=lev_files(iff)) THEN 864 CALL histwrite_phy(nid_files(iff),"rnebcon",itau_w,rnebcon) 865 ENDIF 866 867 IF (flag_rhum(iff)<=lev_files(iff)) THEN 868 CALL histwrite_phy(nid_files(iff),"rhum",itau_w,zx_rh) 869 ENDIF 870 871 IF (flag_ozone(iff)<=lev_files(iff)) THEN 852 IF (o_lwcon%flag(iff)<=lev_files(iff)) THEN 853 CALL histwrite_phy(nid_files(iff),o_lwcon%name,itau_w,flwc) 854 ENDIF 855 856 IF (o_iwcon%flag(iff)<=lev_files(iff)) THEN 857 CALL histwrite_phy(nid_files(iff),o_iwcon%name,itau_w,fiwc) 858 ENDIF 859 860 IF (o_temp%flag(iff)<=lev_files(iff)) THEN 861 CALL histwrite_phy(nid_files(iff),o_temp%name,itau_w,t_seri) 862 ENDIF 863 864 IF (o_theta%flag(iff)<=lev_files(iff)) THEN 865 CALL histwrite_phy(nid_files(iff),o_theta%name,itau_w,theta) 866 ENDIF 867 868 IF (o_ovap%flag(iff)<=lev_files(iff)) THEN 869 CALL histwrite_phy(nid_files(iff),o_ovap%name,itau_w,qx(:,:,ivap)) 870 ENDIF 871 872 IF (o_ovapinit%flag(iff)<=lev_files(iff)) THEN 873 CALL histwrite_phy(nid_files(iff), 874 $ o_ovapinit%name,itau_w,q_seri) 875 ENDIF 876 877 IF (o_geop%flag(iff)<=lev_files(iff)) THEN 878 CALL histwrite_phy(nid_files(iff),o_geop%name,itau_w,zphi) 879 ENDIF 880 881 IF (o_vitu%flag(iff)<=lev_files(iff)) THEN 882 CALL histwrite_phy(nid_files(iff),o_vitu%name,itau_w,u_seri) 883 ENDIF 884 885 IF (o_vitv%flag(iff)<=lev_files(iff)) THEN 886 CALL histwrite_phy(nid_files(iff),o_vitv%name,itau_w,v_seri) 887 ENDIF 888 889 IF (o_vitw%flag(iff)<=lev_files(iff)) THEN 890 CALL histwrite_phy(nid_files(iff),o_vitw%name,itau_w,omega) 891 ENDIF 892 893 IF (o_pres%flag(iff)<=lev_files(iff)) THEN 894 CALL histwrite_phy(nid_files(iff),o_pres%name,itau_w,pplay) 895 ENDIF 896 897 IF (o_rneb%flag(iff)<=lev_files(iff)) THEN 898 CALL histwrite_phy(nid_files(iff),o_rneb%name,itau_w,cldfra) 899 ENDIF 900 901 IF (o_rnebcon%flag(iff)<=lev_files(iff)) THEN 902 CALL histwrite_phy(nid_files(iff),o_rnebcon%name,itau_w,rnebcon) 903 ENDIF 904 905 IF (o_rhum%flag(iff)<=lev_files(iff)) THEN 906 CALL histwrite_phy(nid_files(iff),o_rhum%name,itau_w,zx_rh) 907 ENDIF 908 909 IF (o_ozone%flag(iff)<=lev_files(iff)) THEN 872 910 DO k=1, klev 873 911 DO i=1, klon … … 877 915 ENDDO !i 878 916 ENDDO !k 879 CALL histwrite_phy(nid_files(iff),"ozone",itau_w,zx_tmp_fi3d) 880 ENDIF 881 882 IF (flag_dtphy(iff)<=lev_files(iff)) THEN 883 CALL histwrite_phy(nid_files(iff),"dtphy",itau_w,d_t) 884 ENDIF 885 886 IF (flag_dqphy(iff)<=lev_files(iff)) THEN 887 CALL histwrite_phy(nid_files(iff),"dqphy",itau_w, d_qx(:,:,ivap)) 917 CALL histwrite_phy(nid_files(iff),o_ozone%name,itau_w,zx_tmp_fi3d) 918 ENDIF 919 920 IF (o_dtphy%flag(iff)<=lev_files(iff)) THEN 921 CALL histwrite_phy(nid_files(iff),o_dtphy%name,itau_w,d_t) 922 ENDIF 923 924 IF (o_dqphy%flag(iff)<=lev_files(iff)) THEN 925 CALL histwrite_phy(nid_files(iff), 926 s o_dqphy%name,itau_w, d_qx(:,:,ivap)) 888 927 ENDIF 889 928 890 929 DO nsrf=1, nbsrf 891 IF ( flag_albe_sol(iff)<=lev_files(iff)) THEN930 IF (o_albe_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN 892 931 zx_tmp_fi2d(1 : klon) = falb1( 1 : klon, nsrf) 893 CALL histwrite_phy(nid_files(iff),"albe_"//clnsurf(nsrf),itau_w, 932 CALL histwrite_phy(nid_files(iff), 933 s o_albe_srf(nsrf)%name,itau_w, 934 $ zx_tmp_fi2d) 935 ENDIF 936 937 IF (o_rugs_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN 938 zx_tmp_fi2d(1 : klon) = frugs( 1 : klon, nsrf) 939 CALL histwrite_phy(nid_files(iff), 940 s o_rugs_srf(nsrf)%name,itau_w, 894 941 $ zx_tmp_fi2d) 895 942 ENDIF 896 943 897 IF (flag_rugs_sol(iff)<=lev_files(iff)) THEN 898 zx_tmp_fi2d(1 : klon) = frugs( 1 : klon, nsrf) 899 CALL histwrite_phy(nid_files(iff),"rugs_"//clnsurf(nsrf),itau_w, 900 $ zx_tmp_fi2d) 901 ENDIF 902 903 IF (flag_ages_sol(iff)<=lev_files(iff)) THEN 944 IF (o_ages_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN 904 945 zx_tmp_fi2d(1 : klon) = agesno( 1 : klon, nsrf) 905 CALL histwrite_phy(nid_files(iff),"ages_"//clnsurf(nsrf),itau_w 946 CALL histwrite_phy(nid_files(iff), 947 s o_ages_srf(nsrf)%name,itau_w 906 948 $ ,zx_tmp_fi2d) 907 949 ENDIF 908 950 ENDDO !nsrf=1, nbsrf 909 951 910 IF ( flag_albs(iff)<=lev_files(iff)) THEN911 CALL histwrite_phy(nid_files(iff), "albs",itau_w,albsol1)912 ENDIF 913 914 IF ( flag_albslw(iff)<=lev_files(iff)) THEN915 CALL histwrite_phy(nid_files(iff), "albslw",itau_w,albsol2)952 IF (o_albs%flag(iff)<=lev_files(iff)) THEN 953 CALL histwrite_phy(nid_files(iff),o_albs%name,itau_w,albsol1) 954 ENDIF 955 956 IF (o_albslw%flag(iff)<=lev_files(iff)) THEN 957 CALL histwrite_phy(nid_files(iff),o_albslw%name,itau_w,albsol2) 916 958 ENDIF 917 959 … … 925 967 enddo 926 968 enddo 927 IF (flag_tke(iff)<=lev_files(iff)) THEN 928 CALL histwrite_phy(nid_files(iff),"tke",itau_w,zx_tmp_fi3d) 929 ENDIF 930 931 IF (flag_tke_max(iff)<=lev_files(iff)) THEN 932 CALL histwrite_phy(nid_files(iff),"tke_max",itau_w,zx_tmp_fi3d) 969 IF (o_tke%flag(iff)<=lev_files(iff)) THEN 970 CALL histwrite_phy(nid_files(iff),o_tke%name,itau_w,zx_tmp_fi3d) 971 ENDIF 972 973 IF (o_tke_max%flag(iff)<=lev_files(iff)) THEN 974 CALL histwrite_phy(nid_files(iff), 975 s o_tke_max%name,itau_w,zx_tmp_fi3d) 933 976 ENDIF 934 977 endif 935 978 936 IF (flag_kz(iff)<=lev_files(iff)) THEN 937 ! combinaision de cdrag et le coef melange dans la meme variable 938 zx_tmp_fi3d(:,1) = cdragh(:) 939 zx_tmp_fi3d(:,2:klev)= coefh(:,2:klev) 940 CALL histwrite_phy(nid_files(iff),"kz",itau_w,zx_tmp_fi3d) 941 ENDIF 942 943 IF (flag_kz_max(iff)<=lev_files(iff)) THEN 944 ! combinaision de cdrag et le coef melange dans la meme variable 945 zx_tmp_fi3d(:,1) = cdragh(:) 946 zx_tmp_fi3d(:,2:klev)= coefh(:,2:klev) 947 CALL histwrite_phy(nid_files(iff),"kz_max",itau_w,zx_tmp_fi3d) 948 ENDIF 949 950 IF (flag_clwcon(iff)<=lev_files(iff)) THEN 951 CALL histwrite_phy(nid_files(iff),"clwcon",itau_w,clwcon0) 952 ENDIF 953 954 IF (flag_dtdyn(iff)<=lev_files(iff)) THEN 955 CALL histwrite_phy(nid_files(iff),"dtdyn",itau_w,d_t_dyn) 956 ENDIF 957 958 IF (flag_dqdyn(iff)<=lev_files(iff)) THEN 959 CALL histwrite_phy(nid_files(iff),"dqdyn",itau_w,d_q_dyn) 960 ENDIF 961 962 IF (flag_dudyn(iff)<=lev_files(iff)) THEN 963 CALL histwrite_phy(nid_files(iff),"dudyn",itau_w,d_u_dyn) 979 IF (o_kz%flag(iff)<=lev_files(iff)) THEN 980 CALL histwrite_phy(nid_files(iff),o_kz%name,itau_w,coefh) 981 ENDIF 982 983 IF (o_kz_max%flag(iff)<=lev_files(iff)) THEN 984 CALL histwrite_phy(nid_files(iff),o_kz_max%name,itau_w,coefh) 985 ENDIF 986 987 IF (o_clwcon%flag(iff)<=lev_files(iff)) THEN 988 CALL histwrite_phy(nid_files(iff),o_clwcon%name,itau_w,clwcon0) 989 ENDIF 990 991 IF (o_dtdyn%flag(iff)<=lev_files(iff)) THEN 992 CALL histwrite_phy(nid_files(iff),o_dtdyn%name,itau_w,d_t_dyn) 993 ENDIF 994 995 IF (o_dqdyn%flag(iff)<=lev_files(iff)) THEN 996 CALL histwrite_phy(nid_files(iff),o_dqdyn%name,itau_w,d_q_dyn) 997 ENDIF 998 999 IF (o_dudyn%flag(iff)<=lev_files(iff)) THEN 1000 CALL histwrite_phy(nid_files(iff),o_dudyn%name,itau_w,d_u_dyn) 964 1001 ENDIF 965 1002 966 IF ( flag_dvdyn(iff)<=lev_files(iff)) THEN967 CALL histwrite_phy(nid_files(iff), "dvdyn",itau_w,d_v_dyn)1003 IF (o_dvdyn%flag(iff)<=lev_files(iff)) THEN 1004 CALL histwrite_phy(nid_files(iff),o_dvdyn%name,itau_w,d_v_dyn) 968 1005 ENDIF 969 1006 970 IF ( flag_dtcon(iff)<=lev_files(iff)) THEN1007 IF (o_dtcon%flag(iff)<=lev_files(iff)) THEN 971 1008 zx_tmp_fi3d(1:klon,1:klev)=d_t_con(1:klon,1:klev)/pdtphys 972 CALL histwrite_phy(nid_files(iff), "dtcon",itau_w,zx_tmp_fi3d)973 ENDIF 974 975 IF ( flag_ducon(iff)<=lev_files(iff)) THEN1009 CALL histwrite_phy(nid_files(iff),o_dtcon%name,itau_w,zx_tmp_fi3d) 1010 ENDIF 1011 1012 IF (o_ducon%flag(iff)<=lev_files(iff)) THEN 976 1013 zx_tmp_fi3d(1:klon,1:klev)=d_u_con(1:klon,1:klev)/pdtphys 977 CALL histwrite_phy(nid_files(iff), "ducon",itau_w,zx_tmp_fi3d)978 ENDIF 979 980 IF ( flag_dqcon(iff)<=lev_files(iff)) THEN1014 CALL histwrite_phy(nid_files(iff),o_ducon%name,itau_w,zx_tmp_fi3d) 1015 ENDIF 1016 1017 IF (o_dqcon%flag(iff)<=lev_files(iff)) THEN 981 1018 zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys 982 CALL histwrite_phy(nid_files(iff), "dqcon",itau_w,zx_tmp_fi3d)983 ENDIF 984 985 IF ( flag_dtlsc(iff)<=lev_files(iff)) THEN1019 CALL histwrite_phy(nid_files(iff),o_dqcon%name,itau_w,zx_tmp_fi3d) 1020 ENDIF 1021 1022 IF (o_dtlsc%flag(iff)<=lev_files(iff)) THEN 986 1023 zx_tmp_fi3d(1:klon,1:klev)=d_t_lsc(1:klon,1:klev)/pdtphys 987 CALL histwrite_phy(nid_files(iff), "dtlsc",itau_w,zx_tmp_fi3d)988 ENDIF 989 990 IF ( flag_dtlschr(iff)<=lev_files(iff)) THEN1024 CALL histwrite_phy(nid_files(iff),o_dtlsc%name,itau_w,zx_tmp_fi3d) 1025 ENDIF 1026 1027 IF (o_dtlschr%flag(iff)<=lev_files(iff)) THEN 991 1028 zx_tmp_fi3d(1:klon, 1:klev)=(d_t_lsc(1:klon,1:klev)+ 992 1029 $ d_t_eva(1:klon,1:klev))/pdtphys 993 CALL histwrite_phy(nid_files(iff),"dtlschr",itau_w,zx_tmp_fi3d) 994 ENDIF 995 996 IF (flag_dqlsc(iff)<=lev_files(iff)) THEN 1030 CALL histwrite_phy(nid_files(iff), 1031 s o_dtlschr%name,itau_w,zx_tmp_fi3d) 1032 ENDIF 1033 1034 IF (o_dqlsc%flag(iff)<=lev_files(iff)) THEN 997 1035 zx_tmp_fi3d(1:klon,1:klev)=d_q_lsc(1:klon,1:klev)/pdtphys 998 CALL histwrite_phy(nid_files(iff), "dqlsc",itau_w,zx_tmp_fi3d)999 ENDIF 1000 1001 IF ( flag_dtvdf(iff)<=lev_files(iff)) THEN1036 CALL histwrite_phy(nid_files(iff),o_dqlsc%name,itau_w,zx_tmp_fi3d) 1037 ENDIF 1038 1039 IF (o_dtvdf%flag(iff)<=lev_files(iff)) THEN 1002 1040 zx_tmp_fi3d(1:klon,1:klev)=d_t_vdf(1:klon,1:klev)/pdtphys 1003 CALL histwrite_phy(nid_files(iff), "dtvdf",itau_w,zx_tmp_fi3d)1004 ENDIF 1005 1006 IF ( flag_dqvdf(iff)<=lev_files(iff)) THEN1041 CALL histwrite_phy(nid_files(iff),o_dtvdf%name,itau_w,zx_tmp_fi3d) 1042 ENDIF 1043 1044 IF (o_dqvdf%flag(iff)<=lev_files(iff)) THEN 1007 1045 zx_tmp_fi3d(1:klon,1:klev)=d_q_vdf(1:klon,1:klev)/pdtphys 1008 CALL histwrite_phy(nid_files(iff), "dqvdf",itau_w,zx_tmp_fi3d)1009 ENDIF 1010 1011 IF ( flag_dteva(iff)<=lev_files(iff)) THEN1046 CALL histwrite_phy(nid_files(iff),o_dqvdf%name,itau_w,zx_tmp_fi3d) 1047 ENDIF 1048 1049 IF (o_dteva%flag(iff)<=lev_files(iff)) THEN 1012 1050 zx_tmp_fi3d(1:klon,1:klev)=d_t_eva(1:klon,1:klev)/pdtphys 1013 CALL histwrite_phy(nid_files(iff), "dteva",itau_w,zx_tmp_fi3d)1014 ENDIF 1015 1016 IF ( flag_dqeva(iff)<=lev_files(iff)) THEN1051 CALL histwrite_phy(nid_files(iff),o_dteva%name,itau_w,zx_tmp_fi3d) 1052 ENDIF 1053 1054 IF (o_dqeva%flag(iff)<=lev_files(iff)) THEN 1017 1055 zx_tmp_fi3d(1:klon,1:klev)=d_q_eva(1:klon,1:klev)/pdtphys 1018 CALL histwrite_phy(nid_files(iff), "dqeva",itau_w,zx_tmp_fi3d)1019 ENDIF 1020 1021 IF ( flag_ptconv(iff)<=lev_files(iff)) THEN1056 CALL histwrite_phy(nid_files(iff),o_dqeva%name,itau_w,zx_tmp_fi3d) 1057 ENDIF 1058 1059 IF (o_ptconv%flag(iff)<=lev_files(iff)) THEN 1022 1060 zpt_conv = 0. 1023 1061 where (ptconv) zpt_conv = 1. 1024 CALL histwrite_phy(nid_files(iff), "ptconv",itau_w,zpt_conv)1025 ENDIF 1026 1027 IF ( flag_ratqs(iff)<=lev_files(iff)) THEN1028 CALL histwrite_phy(nid_files(iff), "ratqs",itau_w,ratqs)1029 ENDIF 1030 1031 IF ( flag_dtthe(iff)<=lev_files(iff)) THEN1062 CALL histwrite_phy(nid_files(iff),o_ptconv%name,itau_w,zpt_conv) 1063 ENDIF 1064 1065 IF (o_ratqs%flag(iff)<=lev_files(iff)) THEN 1066 CALL histwrite_phy(nid_files(iff),o_ratqs%name,itau_w,ratqs) 1067 ENDIF 1068 1069 IF (o_dtthe%flag(iff)<=lev_files(iff)) THEN 1032 1070 zx_tmp_fi3d(1:klon,1:klev)=d_t_ajs(1:klon,1:klev)/pdtphys 1033 CALL histwrite_phy(nid_files(iff), "dtthe",itau_w,zx_tmp_fi3d)1071 CALL histwrite_phy(nid_files(iff),o_dtthe%name,itau_w,zx_tmp_fi3d) 1034 1072 ENDIF 1035 1073 1036 1074 IF (iflag_thermals.gt.1) THEN 1037 IF (flag_f_th(iff)<=lev_files(iff)) THEN 1038 CALL histwrite_phy(nid_files(iff),"f_th",itau_w,fm_therm) 1039 ENDIF 1040 1041 IF (flag_e_th(iff)<=lev_files(iff)) THEN 1042 CALL histwrite_phy(nid_files(iff),"e_th",itau_w,entr_therm) 1043 ENDIF 1044 1045 IF (flag_w_th(iff)<=lev_files(iff)) THEN 1046 CALL histwrite_phy(nid_files(iff),"w_th",itau_w,zw2) 1047 ENDIF 1048 1049 IF (flag_q_th(iff)<=lev_files(iff)) THEN 1050 CALL histwrite_phy(nid_files(iff),"q_th",itau_w,zqasc) 1051 ENDIF 1052 1053 IF (flag_lambda_th(iff)<=lev_files(iff)) THEN 1054 CALL histwrite_phy(nid_files(iff),"lambda_th",itau_w,lambda_th) 1055 ENDIF 1056 1057 IF (flag_a_th(iff)<=lev_files(iff)) THEN 1058 CALL histwrite_phy(nid_files(iff),"a_th",itau_w,fraca) 1059 ENDIF 1060 1061 IF (flag_d_th(iff)<=lev_files(iff)) THEN 1062 CALL histwrite_phy(nid_files(iff),"d_th",itau_w,detr_therm) 1075 IF (o_f_th%flag(iff)<=lev_files(iff)) THEN 1076 CALL histwrite_phy(nid_files(iff),o_f_th%name,itau_w,fm_therm) 1077 ENDIF 1078 1079 IF (o_e_th%flag(iff)<=lev_files(iff)) THEN 1080 CALL histwrite_phy(nid_files(iff),o_e_th%name,itau_w,entr_therm) 1081 ENDIF 1082 1083 IF (o_w_th%flag(iff)<=lev_files(iff)) THEN 1084 CALL histwrite_phy(nid_files(iff),o_w_th%name,itau_w,zw2) 1085 ENDIF 1086 1087 IF (o_q_th%flag(iff)<=lev_files(iff)) THEN 1088 CALL histwrite_phy(nid_files(iff),o_q_th%name,itau_w,zqasc) 1089 ENDIF 1090 1091 IF (o_lambda_th%flag(iff)<=lev_files(iff)) THEN 1092 CALL histwrite_phy(nid_files(iff), 1093 s o_lambda_th%name,itau_w,lambda_th) 1094 ENDIF 1095 1096 IF (o_a_th%flag(iff)<=lev_files(iff)) THEN 1097 CALL histwrite_phy(nid_files(iff),o_a_th%name,itau_w,fraca) 1098 ENDIF 1099 1100 IF (o_d_th%flag(iff)<=lev_files(iff)) THEN 1101 CALL histwrite_phy(nid_files(iff),o_d_th%name,itau_w,detr_therm) 1063 1102 ENDIF 1064 1103 1065 1104 ENDIF !iflag_thermals 1066 1105 1067 IF ( flag_f0_th(iff)<=lev_files(iff)) THEN1068 CALL histwrite_phy(nid_files(iff), "f0_th",itau_w,f0)1069 ENDIF 1070 1071 IF ( flag_f0_th(iff)<=lev_files(iff)) THEN1072 CALL histwrite_phy(nid_files(iff), "zmax_th",itau_w,zmax0)1073 ENDIF 1074 1075 IF ( flag_dqthe(iff)<=lev_files(iff)) THEN1106 IF (o_f0_th%flag(iff)<=lev_files(iff)) THEN 1107 CALL histwrite_phy(nid_files(iff),o_f0_th%name,itau_w,f0) 1108 ENDIF 1109 1110 IF (o_f0_th%flag(iff)<=lev_files(iff)) THEN 1111 CALL histwrite_phy(nid_files(iff),o_zmax_th%name,itau_w,zmax0) 1112 ENDIF 1113 1114 IF (o_dqthe%flag(iff)<=lev_files(iff)) THEN 1076 1115 zx_tmp_fi3d(1:klon,1:klev)=d_q_ajs(1:klon,1:klev)/pdtphys 1077 CALL histwrite_phy(nid_files(iff), "dqthe",itau_w,zx_tmp_fi3d)1078 ENDIF 1079 1080 IF ( flag_dtajs(iff)<=lev_files(iff)) THEN1116 CALL histwrite_phy(nid_files(iff),o_dqthe%name,itau_w,zx_tmp_fi3d) 1117 ENDIF 1118 1119 IF (o_dtajs%flag(iff)<=lev_files(iff)) THEN 1081 1120 zx_tmp_fi3d(1:klon,1:klev)=d_t_ajsb(1:klon,1:klev)/pdtphys 1082 CALL histwrite_phy(nid_files(iff), "dtajs",itau_w,zx_tmp_fi3d)1083 ENDIF 1084 1085 IF ( flag_dqajs(iff)<=lev_files(iff)) THEN1121 CALL histwrite_phy(nid_files(iff),o_dtajs%name,itau_w,zx_tmp_fi3d) 1122 ENDIF 1123 1124 IF (o_dqajs%flag(iff)<=lev_files(iff)) THEN 1086 1125 zx_tmp_fi3d(1:klon,1:klev)=d_q_ajsb(1:klon,1:klev)/pdtphys 1087 CALL histwrite_phy(nid_files(iff), "dqajs",itau_w,zx_tmp_fi3d)1088 ENDIF 1089 1090 IF ( flag_dtswr(iff)<=lev_files(iff)) THEN1126 CALL histwrite_phy(nid_files(iff),o_dqajs%name,itau_w,zx_tmp_fi3d) 1127 ENDIF 1128 1129 IF (o_dtswr%flag(iff)<=lev_files(iff)) THEN 1091 1130 zx_tmp_fi3d(1:klon,1:klev)=heat(1:klon,1:klev)/RDAY 1092 CALL histwrite_phy(nid_files(iff), "dtswr",itau_w,zx_tmp_fi3d)1093 ENDIF 1094 1095 IF ( flag_dtsw0(iff)<=lev_files(iff)) THEN1131 CALL histwrite_phy(nid_files(iff),o_dtswr%name,itau_w,zx_tmp_fi3d) 1132 ENDIF 1133 1134 IF (o_dtsw0%flag(iff)<=lev_files(iff)) THEN 1096 1135 zx_tmp_fi3d(1:klon,1:klev)=heat0(1:klon,1:klev)/RDAY 1097 CALL histwrite_phy(nid_files(iff), "dtsw0",itau_w,zx_tmp_fi3d)1098 ENDIF 1099 1100 IF ( flag_dtlwr(iff)<=lev_files(iff)) THEN1136 CALL histwrite_phy(nid_files(iff),o_dtsw0%name,itau_w,zx_tmp_fi3d) 1137 ENDIF 1138 1139 IF (o_dtlwr%flag(iff)<=lev_files(iff)) THEN 1101 1140 zx_tmp_fi3d(1:klon,1:klev)=-1.*cool(1:klon,1:klev)/RDAY 1102 CALL histwrite_phy(nid_files(iff), "dtlwr",itau_w,zx_tmp_fi3d)1103 ENDIF 1104 1105 IF ( flag_dtlw0(iff)<=lev_files(iff)) THEN1141 CALL histwrite_phy(nid_files(iff),o_dtlwr%name,itau_w,zx_tmp_fi3d) 1142 ENDIF 1143 1144 IF (o_dtlw0%flag(iff)<=lev_files(iff)) THEN 1106 1145 zx_tmp_fi3d(1:klon,1:klev)=-1.*cool0(1:klon,1:klev)/RDAY 1107 CALL histwrite_phy(nid_files(iff), "dtlw0",itau_w,zx_tmp_fi3d)1108 ENDIF 1109 1110 IF ( flag_dtec(iff)<=lev_files(iff)) THEN1146 CALL histwrite_phy(nid_files(iff),o_dtlw0%name,itau_w,zx_tmp_fi3d) 1147 ENDIF 1148 1149 IF (o_dtec%flag(iff)<=lev_files(iff)) THEN 1111 1150 zx_tmp_fi3d(1:klon,1:klev)=d_t_ec(1:klon,1:klev) 1112 CALL histwrite_phy(nid_files(iff), "dtec",itau_w,zx_tmp_fi3d)1113 ENDIF 1114 1115 IF ( flag_duvdf(iff)<=lev_files(iff)) THEN1151 CALL histwrite_phy(nid_files(iff),o_dtec%name,itau_w,zx_tmp_fi3d) 1152 ENDIF 1153 1154 IF (o_duvdf%flag(iff)<=lev_files(iff)) THEN 1116 1155 zx_tmp_fi3d(1:klon,1:klev)=d_u_vdf(1:klon,1:klev)/pdtphys 1117 CALL histwrite_phy(nid_files(iff), "duvdf",itau_w,zx_tmp_fi3d)1118 ENDIF 1119 1120 IF ( flag_dvvdf(iff)<=lev_files(iff)) THEN1156 CALL histwrite_phy(nid_files(iff),o_duvdf%name,itau_w,zx_tmp_fi3d) 1157 ENDIF 1158 1159 IF (o_dvvdf%flag(iff)<=lev_files(iff)) THEN 1121 1160 zx_tmp_fi3d(1:klon,1:klev)=d_v_vdf(1:klon,1:klev)/pdtphys 1122 CALL histwrite_phy(nid_files(iff), "dvvdf",itau_w,zx_tmp_fi3d)1161 CALL histwrite_phy(nid_files(iff),o_dvvdf%name,itau_w,zx_tmp_fi3d) 1123 1162 ENDIF 1124 1163 1125 1164 IF (ok_orodr) THEN 1126 IF ( flag_duoro(iff)<=lev_files(iff)) THEN1165 IF (o_duoro%flag(iff)<=lev_files(iff)) THEN 1127 1166 zx_tmp_fi3d(1:klon,1:klev)=d_u_oro(1:klon,1:klev)/pdtphys 1128 CALL histwrite_phy(nid_files(iff), "duoro",itau_w,zx_tmp_fi3d)1129 ENDIF 1130 1131 IF ( flag_dvoro(iff)<=lev_files(iff)) THEN1167 CALL histwrite_phy(nid_files(iff),o_duoro%name,itau_w,zx_tmp_fi3d) 1168 ENDIF 1169 1170 IF (o_dvoro%flag(iff)<=lev_files(iff)) THEN 1132 1171 zx_tmp_fi3d(1:klon,1:klev)=d_v_oro(1:klon,1:klev)/pdtphys 1133 CALL histwrite_phy(nid_files(iff), "dvoro",itau_w,zx_tmp_fi3d)1172 CALL histwrite_phy(nid_files(iff),o_dvoro%name,itau_w,zx_tmp_fi3d) 1134 1173 ENDIF 1135 1174 ENDIF 1136 1175 1137 1176 IF (ok_orolf) THEN 1138 IF ( flag_dulif(iff)<=lev_files(iff)) THEN1177 IF (o_dulif%flag(iff)<=lev_files(iff)) THEN 1139 1178 zx_tmp_fi3d(1:klon,1:klev)=d_u_lif(1:klon,1:klev)/pdtphys 1140 CALL histwrite_phy(nid_files(iff), "dulif",itau_w,zx_tmp_fi3d)1141 ENDIF 1142 1143 IF ( flag_dvlif(iff)<=lev_files(iff)) THEN1179 CALL histwrite_phy(nid_files(iff),o_dulif%name,itau_w,zx_tmp_fi3d) 1180 ENDIF 1181 1182 IF (o_dvlif%flag(iff)<=lev_files(iff)) THEN 1144 1183 zx_tmp_fi3d(1:klon,1:klev)=d_v_lif(1:klon,1:klev)/pdtphys 1145 CALL histwrite_phy(nid_files(iff),"dvlif",itau_w,zx_tmp_fi3d) 1146 ENDIF 1147 ENDIF 1148 1149 IF (flag_trac(iff)<=lev_files(iff)) THEN 1150 if (nqmax.GE.3) THEN 1151 DO iq=3,nqmax 1152 CALL histwrite_phy(nid_files(iff),tnom(iq),itau_w,qx(:,:,iq)) 1184 CALL histwrite_phy(nid_files(iff),o_dvlif%name,itau_w,zx_tmp_fi3d) 1185 ENDIF 1186 ENDIF 1187 1188 ! IF (o_trac%flag(iff)<=lev_files(iff)) THEN 1189 if (nqtot.GE.3) THEN 1190 ! DO iq=3,nqtot 1191 DO iq=3,4 1192 IF (o_trac(iq-2)%flag(iff)<=lev_files(iff)) THEN 1193 CALL histwrite_phy(nid_files(iff), 1194 s o_trac(iq-2)%name,itau_w,qx(:,:,iq)) 1195 ENDIF 1153 1196 ENDDO 1154 endif 1155 1156 ENDIF 1197 endif 1198 1157 1199 if (ok_sync) then 1158 1200 c$OMP MASTER -
LMDZ4/trunk/libf/phylmd/physiq.F
r1068 r1146 2 2 c#define IO_DEBUG 3 3 4 SUBROUTINE physiq (nlon,nlev, nqmax,4 SUBROUTINE physiq (nlon,nlev, 5 5 . debut,lafin,rjourvrai,gmtime,pdtphys, 6 6 . paprs,pplay,pphi,pphis,presnivs,clesphy0, … … 15 15 USE write_field_phy 16 16 USE dimphy 17 USE infotrac 17 18 USE mod_grid_phy_lmdz 18 19 USE mod_phys_lmdz_para … … 41 42 c CLEFS CPP POUR LES IO 42 43 c ===================== 43 c#define histhf44 c#define histday45 c#define histmth46 44 c#define histmthNMC 47 c#define histins48 45 c#define histISCCP 49 46 c====================================================================== … … 54 51 c nlon----input-I-nombre de points horizontaux 55 52 c nlev----input-I-nombre de couches verticales 56 c nqmax---input-I-nombre de traceurs (y compris vapeur d'eau) = 157 53 c debut---input-L-variable logique indiquant le premier passage 58 54 c lafin---input-L-variable logique indiquant le dernier passage … … 91 87 #include "clesphys.h" 92 88 #include "control.h" 93 !#include "logic.h"94 89 #include "temps.h" 95 cym#include "comgeomphy.h"96 #include "advtrac.h"97 90 #include "iniprint.h" 98 91 #include "thermcell.h" … … 188 181 INTEGER nlon 189 182 INTEGER nlev 190 INTEGER nqmax191 183 REAL rjourvrai 192 184 REAL gmtime … … 204 196 REAL v(klon,klev) 205 197 REAL t(klon,klev),theta(klon,klev) 206 REAL qx(klon,klev,nq max)198 REAL qx(klon,klev,nqtot) 207 199 REAL flxmass_w(klon,klev) 208 200 REAL omega(klon,klev) ! vitesse verticale en Pa/s … … 210 202 REAL d_v(klon,klev) 211 203 REAL d_t(klon,klev) 212 REAL d_qx(klon,klev,nq max)204 REAL d_qx(klon,klev,nqtot) 213 205 REAL d_ps(klon) 214 206 real da(klon,klev),phi(klon,klev,klev),mp(klon,klev) … … 527 519 c QUESTION : noms de variables ? 528 520 529 c#ifdef histhf530 c data ok_hf/.true./531 c#else532 c data ok_hf/.false./533 c#endif534 521 INTEGER longcles 535 522 PARAMETER ( longcles = 20 ) … … 1119 1106 write(lunout,*) 'DEBUT DE PHYSIQ !!!!!!!!!!!!!!!!!!!!' 1120 1107 write(lunout,*) 1121 s 'nlon,nlev,nq max,debut,lafin,rjourvrai,gmtime,pdtphys'1108 s 'nlon,nlev,nqtot,debut,lafin,rjourvrai,gmtime,pdtphys' 1122 1109 write(lunout,*) 1123 s nlon,nlev,nq max,debut,lafin,rjourvrai,gmtime,pdtphys1110 s nlon,nlev,nqtot,debut,lafin,rjourvrai,gmtime,pdtphys 1124 1111 1125 1112 write(lunout,*) 'papers, play, phi, u, v, t, omega' … … 1179 1166 END IF 1180 1167 ok_sync=.TRUE. 1181 IF (nqmax .LT. 2) THEN 1182 abort_message = 'eaux vapeur et liquide sont indispensables' 1183 CALL abort_gcm (modname,abort_message,1) 1184 ENDIF 1168 1185 1169 IF (debut) THEN 1186 1170 CALL suphel ! initialiser constantes et parametres phys. … … 1508 1492 #ifdef CPP_IOIPSL 1509 1493 1510 c Commente par abderrahmane 11 2 081511 c#ifdef histhf1512 c#include "ini_histhf.h"1513 c#endif1514 1515 c#ifdef histday1516 c#include "ini_histday.h"1517 cIM rajout diagnostiques bilan KP pour analyse MJO par Jun-Ichi Yano1518 c#include "ini_bilKP_ins.h"1519 c#include "ini_bilKP_ave.h"1520 c#endif1521 1522 c#ifdef histmth1523 c#include "ini_histmth.h"1524 c#endif1525 1526 c#ifdef histins1527 c#include "ini_histins.h"1528 c#endif1529 1530 1494 c$OMP MASTER 1531 call phys_output_open(jjmp1,n qmax,nlevSTD,clevSTD,nbteta,1495 call phys_output_open(jjmp1,nlevSTD,clevSTD,nbteta, 1532 1496 & ctetaSTD,dtime,presnivs,ok_veget, 1533 1497 & type_ocean,iflag_pbl,ok_mensuel,ok_journe, 1534 & ok_hf,ok_instan,ok_LES )1498 & ok_hf,ok_instan,ok_LES,ok_ade,ok_aie) 1535 1499 c$OMP END MASTER 1536 1500 c$OMP BARRIER … … 1583 1547 $ calday, 1584 1548 $ klon, 1585 $ nq max,1549 $ nqtot, 1586 1550 $ pdtphys, 1587 1551 $ annee_ref, … … 1639 1603 ENDDO 1640 1604 ENDDO 1641 DO iq = 1, nq max1605 DO iq = 1, nqtot 1642 1606 DO k = 1, klev 1643 1607 DO i = 1, klon … … 1662 1626 ENDDO 1663 1627 ENDDO 1664 IF (nq max.GE.3) THEN1665 DO iq = 3, nq max1628 IF (nqtot.GE.3) THEN 1629 DO iq = 3, nqtot 1666 1630 DO k = 1, klev 1667 1631 DO i = 1, klon … … 2061 2025 do i=1,klon 2062 2026 if (alp(i)>alp_max) then 2063 print*,'WARNING SUPER ALP (seuil=',alp_max, 2027 IF(prt_level>9)WRITE(lunout,*) & 2028 & 'WARNING SUPER ALP (seuil=',alp_max, 2064 2029 , '): i, alp, alp_wake,ale',i,alp(i),alp_wake(i),ale(i) 2065 2030 alp(i)=alp_max 2066 2031 endif 2067 2032 if (ale(i)>ale_max) then 2068 print*,'WARNING SUPER ALE (seuil=',ale_max, 2033 IF(prt_level>9)WRITE(lunout,*) & 2034 & 'WARNING SUPER ALE (seuil=',ale_max, 2069 2035 , '): i, alp, alp_wake,ale',i,ale(i),ale_wake(i),alp(i) 2070 2036 ale(i)=ale_max … … 2084 2050 CALL concvl (iflag_con,iflag_clos, 2085 2051 . dtime,paprs,pplay,t_undi,q_undi, 2086 . t_wake,q_wake, 2052 . t_wake,q_wake,wake_s, 2087 2053 . u_seri,v_seri,tr_seri,nbtr, 2088 2054 . ALE,ALP, … … 3192 3158 I debut, 3193 3159 I lafin, 3194 I nqmax-2,3195 3160 I nlon, 3196 3161 I nlev, … … 3415 3380 ENDDO 3416 3381 c 3417 IF (nq max.GE.3) THEN3418 DO iq = 3, nq max3382 IF (nqtot.GE.3) THEN 3383 DO iq = 3, nqtot 3419 3384 DO k = 1, klev 3420 3385 DO i = 1, klon … … 3450 3415 write(lunout,*) 'FIN DE PHYSIQ !!!!!!!!!!!!!!!!!!!!' 3451 3416 write(lunout,*) 3452 s 'nlon,nlev,nq max,debut,lafin,rjourvrai,gmtime,pdtphys pct tlos'3417 s 'nlon,nlev,nqtot,debut,lafin,rjourvrai,gmtime,pdtphys pct tlos' 3453 3418 write(lunout,*) 3454 s nlon,nlev,nq max,debut,lafin,rjourvrai,gmtime,pdtphys,3419 s nlon,nlev,nqtot,debut,lafin,rjourvrai,gmtime,pdtphys, 3455 3420 s pctsrf(igout,is_ter), pctsrf(igout,is_lic),pctsrf(igout,is_oce), 3456 3421 s pctsrf(igout,is_sic) … … 3506 3471 3507 3472 3508 c Commente par abderrahmane le 11 2 083509 c#ifdef histhf3510 c#include "write_histhf.h"3511 c#endif3512 3513 c#ifdef histday3514 c#include "write_histday.h"3515 c#endif3516 3517 c#ifdef histmth3518 c#include "write_histmth.h"3519 c#endif3520 3521 c#ifdef histins3522 c#include "write_histins.h"3523 c#endif3524 3525 3473 #include "phys_output_write.h" 3526 3474 -
LMDZ4/trunk/libf/phylmd/phystokenc.F
r1067 r1146 11 11 USE ioipsl 12 12 USE dimphy 13 USE infotrac, ONLY : nqtot 13 14 USE iophy 14 15 IMPLICIT none … … 21 22 c====================================================================== 22 23 #include "dimensions.h" 23 cym#include "dimphy.h"24 24 #include "tracstoke.h" 25 25 #include "indicesol.h" … … 160 160 161 161 CALL initphysto('phystoke', 162 . rlon,rlat,dtime, dtime*istphy,dtime*istphy,nq mx,physid)162 . rlon,rlat,dtime, dtime*istphy,dtime*istphy,nqtot,physid) 163 163 164 164 write(*,*) 'apres initphysto ds phystokenc' -
LMDZ4/trunk/libf/phylmd/phytrac.F
r1067 r1146 8 8 I debutphy, 9 9 I lafin, 10 I nqmax,11 10 I nlon, 12 11 I nlev, … … 67 66 USE ioipsl 68 67 USE dimphy 68 USE infotrac 69 69 USE mod_grid_phy_lmdz 70 70 USE mod_phys_lmdz_para … … 80 80 cAA Remarques en vrac: 81 81 cAA-------------------- 82 cAA 1/ le call phytrac se fait avec nqmax-2 donc nous avons bien83 cAA les vrais traceurs (nbtr) dans phytrac (pas la vapeur ni eau liquide)84 82 cAA 2/ Le choix du radon et du pb se fait juste avec un data 85 83 cAA (peu propre). Peut-etre pourrait-on prevoir dans l'avenir … … 93 91 #include "paramet.h" 94 92 #include "control.h" 95 #include "advtrac.h"96 93 #include "thermcell.h" 97 94 c====================================================================== … … 107 104 integer nlon ! nombre de points horizontaux 108 105 integer nlev ! nombre de couches verticales 109 integer nqmax ! nombre de traceurs auxquels on applique la physique110 106 integer nstep ! appel physique 111 107 integer julien !jour julien … … 140 136 141 137 REAL flxmass_w(klon,klev) 142 CHARACTER(len=8) :: solsym(n qmax)138 CHARACTER(len=8) :: solsym(nbtr) 143 139 integer la 144 140 REAL :: tau_inca(klon,klev,9,2) … … 209 205 cAA Pour l'instant seuls les cas du rn et du pb ont ete envisages. 210 206 211 REAL source(klon,n qmax) ! a voir lorsque le flux est prescrit207 REAL source(klon,nbtr) ! a voir lorsque le flux est prescrit 212 208 cAA 213 209 cAA Pour la source de radon et son reservoir de sol … … 216 212 REAL,save,allocatable :: trs(:,:) ! Conc. radon ds le sol 217 213 c$OMP THREADPRIVATE(trs) 218 cym SAVE trs219 214 REAL :: trs_tmp(klon_glo) 220 215 … … 223 218 c (1 = reservoir) ou (possible => 1 ) 224 219 c$OMP THREADPRIVATE(masktr) 225 cym SAVE masktr226 220 REAL,save,allocatable :: fshtr(:,:) ! Flux surfacique dans le reservoir de sol 227 221 c$OMP THREADPRIVATE(fshtr) 228 cym SAVE fshtr229 222 REAL,save,allocatable :: hsoltr(:) ! Epaisseur equivalente du reservoir de sol 230 223 c$OMP THREADPRIVATE(hsoltr) 231 cym SAVE hsoltr232 224 REAL,save,allocatable :: tautr(:) ! Constante de decroissance radioactive 233 225 c$OMP THREADPRIVATE(tautr) 234 cym SAVE tautr235 226 REAL,save,allocatable :: vdeptr(:) ! Vitesse de depot sec dans la couche Brownienne 236 227 c$OMP THREADPRIVATE(vdeptr) 237 cym SAVE vdeptr238 228 REAL,save,allocatable :: scavtr(:) ! Coefficient de lessivage 239 229 c$OMP THREADPRIVATE(scavtr) 240 cym SAVE scavtr241 230 cAA 242 231 CHARACTER*2 itn … … 270 259 logical,save,allocatable :: radio(:) ! radio(it)=true => decroisssance radioactive 271 260 c$OMP THREADPRIVATE(aerosol,clsol,radio) 272 cym save aerosol,clsol,radio273 261 C 274 262 c====================================================================== … … 360 348 print*,'dans phytrac ',pdtphys,ecrit_tra 361 349 362 if(nbtr.lt.nqmax) then363 c print*,'NQMAX=',nqmax364 c print*,'NBTR=',nbtr365 abort_message='See above'366 call abort_gcm(modname,abort_message,1)367 endif368 369 350 inirnpb=rnpb 370 351 PRINT*, 'La frequence de sortie traceurs est ', ecrit_tra … … 406 387 c Initialisation de la nature des traceurs 407 388 c 408 DO it = 1, n qmax389 DO it = 1, nbtr 409 390 aerosol(it) = .FALSE. ! Tous les traceurs sont des gaz par defaut 410 391 radio(it) = .FALSE. ! Par defaut pas de passage par radiornpb … … 533 514 c====================================================================== 534 515 c print*,'Avant convection' 535 do it=1,n qmax516 do it=1,nbtr 536 517 WRITE(itn,'(i2)') it 537 518 c call diagtracphy(tr_seri(:,:,it),paprs,'Avant conv'//itn) … … 541 522 542 523 c print*,'Pas de temps dans phytrac : ',pdtphys 543 DO it=1, nqmax 544 545 IF ( config_inca/='none' .AND. conv_flg(it) == 0 ) CYCLE 524 DO it=1, nbtr 525 526 IF ( config_inca/='none') THEN 527 IF ( conv_flg(it) == 0 ) CYCLE 528 END IF 546 529 547 530 if (iflag_con.lt.2) then … … 574 557 endif ! convection 575 558 c print*,'Apres convection' 576 c do it=1,n qmax559 c do it=1,nbtr 577 560 c WRITE(itn,'(i1)') it 578 561 c call diagtracphy(tr_seri(:,:,it),paprs,'Avant conv'//itn) … … 591 574 592 575 c print*,'masse dans ph ',zmasse 593 do it=1,n qmax576 do it=1,nbtr 594 577 do k=1,klev 595 578 do i=1,klon … … 604 587 c print*,'calcul de leffet des thermiques' 605 588 nsplit=10 606 DO it=1, n qmax589 DO it=1, nbtr 607 590 c WRITE(itn,'(i1)') it 608 591 c CALL minmaxqfi(tr_seri(1,1,it),1.e10,-1.e33,'conv it='//itn) … … 642 625 c====================================================================== 643 626 c print *,'Avant couchelimite' 644 c do it=1,n qmax627 c do it=1,nbtr 645 628 c WRITE(itn,'(i1)') it 646 629 c call diagtracphy(tr_seri(:,:,it),paprs,'Avant CL '//itn) … … 656 639 657 640 C maf modif pour tenir compte du cas rnpb + traceur 658 DO it=1, nqmax 659 660 IF ( config_inca/='none' .AND. pbl_flg(it) == 0 ) CYCLE 641 DO it=1, nbtr 642 643 IF ( config_inca/='none' ) THEN 644 IF( pbl_flg(it) == 0 ) CYCLE 645 END IF 661 646 662 647 c print *,'it',it,clsol(it) … … 686 671 C CALL minmaxqfi(tr_seri(1,1,it),0.,1.e33,'cltracrn it='//itn) 687 672 else ! couche limite avec flux prescrit 688 #ifndef INCA 689 673 674 IF (config_inca == 'none') THEN 690 675 Cmaf provisoire source / traceur a creer 691 DO i=1, klon692 source(i,it) = 0.0 ! pas de source, pour l'instant693 ENDDO694 C 695 #endif 676 DO i=1, klon 677 source(i,it) = 0.0 ! pas de source, pour l'instant 678 ENDDO 679 END IF 680 696 681 CALL cltrac(pdtphys, coefh,t_seri, 697 682 s tr_seri(1,1,it), source(:,it), … … 711 696 712 697 c print*,'Apres couchelimite' 713 c do it=1,n qmax698 c do it=1,nbtr 714 699 c WRITE(itn,'(i1)') it 715 700 c call diagtracphy(tr_seri(:,:,it),paprs,'Avant CL '//itn) … … 726 711 call radiornpb (tr_seri,pdtphys,tautr,d_tr_dec) 727 712 C 728 DO it=1,n qmax713 DO it=1,nbtr 729 714 if(radio(it)) then 730 715 DO k = 1, nlev … … 755 740 c tendance des aerosols nuclees et impactes 756 741 c 757 DO it = 1, n qmax742 DO it = 1, nbtr 758 743 IF (aerosol(it)) THEN 759 744 DO k = 1, nlev … … 774 759 c call dump2d(iim,jjm-1,frac_nucl(2:klon-1,10),'FRACNUCL') 775 760 c call dump2d(iim,jjm-1,tr_seri(2:klon-1,10,3),'TRACEUR3') 776 DO it = 1, n qmax761 DO it = 1, nbtr 777 762 c print*,'IT=',it,aerosol(it) 778 763 IF (aerosol(it)) THEN … … 790 775 c Flux lessivage total 791 776 c 792 DO it = 1, n qmax777 DO it = 1, nbtr 793 778 DO k = 1, nlev 794 779 DO i = 1, klon -
LMDZ4/trunk/libf/phylmd/radiornpb.F
r776 r1146 4 4 SUBROUTINE radiornpb(tr,dtime,tautr,d_tr) 5 5 USE dimphy 6 USE infotrac, ONLY : nbtr 6 7 IMPLICIT none 7 8 c====================================================================== -
LMDZ4/trunk/libf/phylmd/read_pstoke.F
r940 r1146 18 18 C****************************************************************************** 19 19 20 use netcdf 20 21 USE dimphy 21 22 IMPLICIT NONE … … 116 117 if (irec .eq. 0) then 117 118 118 ncidp=NCOPN('phystoke.nc',NCNOWRIT,rcode)119 120 varidps=NCVID(ncidp,'phis',rcode)119 rcode=nf90_open('phystoke.nc',nf90_nowrite,ncidp) 120 121 rcode = nf90_inq_varid(ncidp, 'phis', varidps) 121 122 print*,'ncidp,varidps',ncidp,varidps 122 123 123 varidpl=NCVID(ncidp,'sig_s',rcode)124 rcode = nf90_inq_varid(ncidp, 'sig_s', varidpl) 124 125 print*,'ncidp,varidpl',ncidp,varidpl 125 126 126 varidai=NCVID(ncidp,'aire',rcode)127 rcode = nf90_inq_varid(ncidp, 'aire', varidai) 127 128 print*,'ncidp,varidai',ncidp,varidai 128 129 129 130 c A FAIRE: Es-il necessaire de stocke t? 130 varidt=NCVID(ncidp,'t',rcode)131 rcode = nf90_inq_varid(ncidp, 't', varidt) 131 132 print*,'ncidp,varidt',ncidp,varidt 132 133 133 varidmfu=NCVID(ncidp,'mfu',rcode)134 rcode = nf90_inq_varid(ncidp, 'mfu', varidmfu) 134 135 print*,'ncidp,varidmfu',ncidp,varidmfu 135 136 136 varidmfd=NCVID(ncidp,'mfd',rcode)137 rcode = nf90_inq_varid(ncidp, 'mfd', varidmfd) 137 138 print*,'ncidp,varidmfd',ncidp,varidmfd 138 139 139 varidenu=NCVID(ncidp,'en_u',rcode)140 rcode = nf90_inq_varid(ncidp, 'en_u', varidenu) 140 141 print*,'ncidp,varidenu',ncidp,varidenu 141 142 142 variddeu=NCVID(ncidp,'de_u',rcode)143 rcode = nf90_inq_varid(ncidp, 'de_u', variddeu) 143 144 print*,'ncidp,variddeu',ncidp,variddeu 144 145 145 varidend=NCVID(ncidp,'en_d',rcode)146 rcode = nf90_inq_varid(ncidp, 'en_d', varidend) 146 147 print*,'ncidp,varidend',ncidp,varidend 147 148 148 varidded=NCVID(ncidp,'de_d',rcode)149 rcode = nf90_inq_varid(ncidp, 'de_d', varidded) 149 150 print*,'ncidp,varidded',ncidp,varidded 150 151 151 varidch=NCVID(ncidp,'coefh',rcode)152 rcode = nf90_inq_varid(ncidp, 'coefh', varidch) 152 153 print*,'ncidp,varidch',ncidp,varidch 153 154 154 155 c abder (pour thermiques) 155 varidfmth=NCVID(ncidp,'fm_th',rcode)156 rcode = nf90_inq_varid(ncidp, 'fm_th', varidfmth) 156 157 print*,'ncidp,varidfmth',ncidp,varidfmth 157 158 158 varidenth=NCVID(ncidp,'en_th',rcode)159 rcode = nf90_inq_varid(ncidp, 'en_th', varidenth) 159 160 print*,'ncidp,varidenth',ncidp,varidenth 160 161 161 varidfi=NCVID(ncidp,'frac_impa',rcode)162 rcode = nf90_inq_varid(ncidp, 'frac_impa', varidfi) 162 163 print*,'ncidp,varidfi',ncidp,varidfi 163 164 164 varidfn=NCVID(ncidp,'frac_nucl',rcode)165 rcode = nf90_inq_varid(ncidp, 'frac_nucl', varidfn) 165 166 print*,'ncidp,varidfn',ncidp,varidfn 166 167 167 varidyu1=NCVID(ncidp,'pyu1',rcode)168 rcode = nf90_inq_varid(ncidp, 'pyu1', varidyu1) 168 169 print*,'ncidp,varidyu1',ncidp,varidyu1 169 170 170 varidyv1=NCVID(ncidp,'pyv1',rcode)171 rcode = nf90_inq_varid(ncidp, 'pyv1', varidyv1) 171 172 print*,'ncidp,varidyv1',ncidp,varidyv1 172 173 173 varidfts1=NCVID(ncidp,'ftsol1',rcode)174 rcode = nf90_inq_varid(ncidp, 'ftsol1', varidfts1) 174 175 print*,'ncidp,varidfts1',ncidp,varidfts1 175 176 176 varidfts2=NCVID(ncidp,'ftsol2',rcode)177 rcode = nf90_inq_varid(ncidp, 'ftsol2', varidfts2) 177 178 print*,'ncidp,varidfts2',ncidp,varidfts2 178 179 179 varidfts3=NCVID(ncidp,'ftsol3',rcode)180 rcode = nf90_inq_varid(ncidp, 'ftsol3', varidfts3) 180 181 print*,'ncidp,varidfts3',ncidp,varidfts3 181 182 182 varidfts4=NCVID(ncidp,'ftsol4',rcode)183 rcode = nf90_inq_varid(ncidp, 'ftsol4', varidfts4) 183 184 print*,'ncidp,varidfts4',ncidp,varidfts4 184 185 185 varidpsr1=NCVID(ncidp,'psrf1',rcode)186 rcode = nf90_inq_varid(ncidp, 'psrf1', varidpsr1) 186 187 print*,'ncidp,varidpsr1',ncidp,varidpsr1 187 188 188 varidpsr2=NCVID(ncidp,'psrf2',rcode)189 rcode = nf90_inq_varid(ncidp, 'psrf2', varidpsr2) 189 190 print*,'ncidp,varidpsr2',ncidp,varidpsr2 190 191 191 varidpsr3=NCVID(ncidp,'psrf3',rcode)192 rcode = nf90_inq_varid(ncidp, 'psrf3', varidpsr3) 192 193 print*,'ncidp,varidpsr3',ncidp,varidpsr3 193 194 194 varidpsr4=NCVID(ncidp,'psrf4',rcode)195 rcode = nf90_inq_varid(ncidp, 'psrf4', varidpsr4) 195 196 print*,'ncidp,varidpsr4',ncidp,varidpsr4 196 197 -
LMDZ4/trunk/libf/phylmd/read_pstoke0.F
r940 r1146 17 17 C****************************************************************************** 18 18 19 19 use netcdf 20 20 USE dimphy 21 21 IMPLICIT NONE … … 121 121 if (irec .eq. 0) then 122 122 123 ncidp=NCOPN('phystoke.nc',NCNOWRIT,rcode)124 125 varidps=NCVID(ncidp,'phis',rcode)123 rcode=nf90_open('phystoke.nc',nf90_nowrite,ncidp) 124 125 rcode = nf90_inq_varid(ncidp, 'phis', varidps) 126 126 print*,'ncidp,varidps',ncidp,varidps 127 127 128 varidpl=NCVID(ncidp,'sig_s',rcode)128 rcode = nf90_inq_varid(ncidp, 'sig_s', varidpl) 129 129 print*,'ncidp,varidpl',ncidp,varidpl 130 130 131 varidai=NCVID(ncidp,'aire',rcode)131 rcode = nf90_inq_varid(ncidp, 'aire', varidai) 132 132 print*,'ncidp,varidai',ncidp,varidai 133 133 134 varidt=NCVID(ncidp,'t',rcode)134 rcode = nf90_inq_varid(ncidp, 't', varidt) 135 135 print*,'ncidp,varidt',ncidp,varidt 136 136 137 varidmfu=NCVID(ncidp,'mfu',rcode)137 rcode = nf90_inq_varid(ncidp, 'mfu', varidmfu) 138 138 print*,'ncidp,varidmfu',ncidp,varidmfu 139 139 140 varidmfd=NCVID(ncidp,'mfd',rcode)140 rcode = nf90_inq_varid(ncidp, 'mfd', varidmfd) 141 141 print*,'ncidp,varidmfd',ncidp,varidmfd 142 142 143 varidenu=NCVID(ncidp,'en_u',rcode)143 rcode = nf90_inq_varid(ncidp, 'en_u', varidenu) 144 144 print*,'ncidp,varidenu',ncidp,varidenu 145 145 146 variddeu=NCVID(ncidp,'de_u',rcode)146 rcode = nf90_inq_varid(ncidp, 'de_u', variddeu) 147 147 print*,'ncidp,variddeu',ncidp,variddeu 148 148 149 varidend=NCVID(ncidp,'en_d',rcode)149 rcode = nf90_inq_varid(ncidp, 'en_d', varidend) 150 150 print*,'ncidp,varidend',ncidp,varidend 151 151 152 varidded=NCVID(ncidp,'de_d',rcode)152 rcode = nf90_inq_varid(ncidp, 'de_d', varidded) 153 153 print*,'ncidp,varidded',ncidp,varidded 154 154 155 varidch=NCVID(ncidp,'coefh',rcode)155 rcode = nf90_inq_varid(ncidp, 'coefh', varidch) 156 156 print*,'ncidp,varidch',ncidp,varidch 157 157 158 158 c Thermiques 159 varidfmth=NCVID(ncidp,'fm_th',rcode)159 rcode = nf90_inq_varid(ncidp, 'fm_th', varidfmth) 160 160 print*,'ncidp,varidfmth',ncidp,varidfmth 161 161 162 varidenth=NCVID(ncidp,'en_th',rcode)162 rcode = nf90_inq_varid(ncidp, 'en_th', varidenth) 163 163 print*,'ncidp,varidenth',ncidp,varidenth 164 164 165 varidfi=NCVID(ncidp,'frac_impa',rcode)165 rcode = nf90_inq_varid(ncidp, 'frac_impa', varidfi) 166 166 print*,'ncidp,varidfi',ncidp,varidfi 167 167 168 varidfn=NCVID(ncidp,'frac_nucl',rcode)168 rcode = nf90_inq_varid(ncidp, 'frac_nucl', varidfn) 169 169 print*,'ncidp,varidfn',ncidp,varidfn 170 170 171 varidyu1=NCVID(ncidp,'pyu1',rcode)171 rcode = nf90_inq_varid(ncidp, 'pyu1', varidyu1) 172 172 print*,'ncidp,varidyu1',ncidp,varidyu1 173 173 174 varidyv1=NCVID(ncidp,'pyv1',rcode)174 rcode = nf90_inq_varid(ncidp, 'pyv1', varidyv1) 175 175 print*,'ncidp,varidyv1',ncidp,varidyv1 176 176 177 varidfts1=NCVID(ncidp,'ftsol1',rcode)177 rcode = nf90_inq_varid(ncidp, 'ftsol1', varidfts1) 178 178 print*,'ncidp,varidfts1',ncidp,varidfts1 179 179 180 varidfts2=NCVID(ncidp,'ftsol2',rcode)180 rcode = nf90_inq_varid(ncidp, 'ftsol2', varidfts2) 181 181 print*,'ncidp,varidfts2',ncidp,varidfts2 182 182 183 varidfts3=NCVID(ncidp,'ftsol3',rcode)183 rcode = nf90_inq_varid(ncidp, 'ftsol3', varidfts3) 184 184 print*,'ncidp,varidfts3',ncidp,varidfts3 185 185 186 varidfts4=NCVID(ncidp,'ftsol4',rcode)186 rcode = nf90_inq_varid(ncidp, 'ftsol4', varidfts4) 187 187 print*,'ncidp,varidfts4',ncidp,varidfts4 188 188 189 varidpsr1=NCVID(ncidp,'psrf1',rcode)189 rcode = nf90_inq_varid(ncidp, 'psrf1', varidpsr1) 190 190 print*,'ncidp,varidpsr1',ncidp,varidpsr1 191 191 192 varidpsr2=NCVID(ncidp,'psrf2',rcode)192 rcode = nf90_inq_varid(ncidp, 'psrf2', varidpsr2) 193 193 print*,'ncidp,varidpsr2',ncidp,varidpsr2 194 194 195 varidpsr3=NCVID(ncidp,'psrf3',rcode)195 rcode = nf90_inq_varid(ncidp, 'psrf3', varidpsr3) 196 196 print*,'ncidp,varidpsr3',ncidp,varidpsr3 197 197 198 varidpsr4=NCVID(ncidp,'psrf4',rcode)198 rcode = nf90_inq_varid(ncidp, 'psrf4', varidpsr4) 199 199 print*,'ncidp,varidpsr4',ncidp,varidpsr4 200 200 -
LMDZ4/trunk/libf/phylmd/readsulfate.F
r940 r1146 36 36 #include "chem.h" 37 37 #include "dimensions.h" 38 cym#include "dimphy.h"39 38 #include "temps.h" 39 #include "clesphys.h" 40 #include "iniprint.h" 40 41 c 41 42 c Input: … … 84 85 85 86 if (is_mpi_root) then 87 88 IF (aer_type /= 'actuel ' .AND. aer_type /= 'preind ' .AND. & 89 & aer_type /= 'scenario') THEN 90 WRITE(lunout,*)' *** Warning ***' 91 WRITE(lunout,*)'Option aer_type pour les aerosols = ', & 92 & aer_type 93 WRITE(lunout,*)'Cas non prevu, force a preind' 94 aer_type = 'preind ' 95 ENDIF 86 96 87 97 iday = INT(r_day) … … 118 128 119 129 120 IF (iyr .lt. 1850) THEN 121 cyear='.nat' 122 WRITE(*,*) 'getso4 iyr=', iyr,' ',cyear 123 CALL getso4fromfile(cyear, so4_1) 124 ELSE IF (iyr .ge. 2100) THEN 125 cyear='2100' 126 WRITE(*,*) 'getso4 iyr=', iyr,' ',cyear 127 CALL getso4fromfile(cyear, so4_1) 130 131 IF (aer_type == 'actuel ') then 132 cyear='1980' 133 CALL getso4fromfile(cyear, so4_1) 134 ELSE IF (aer_type == 'preind ') THEN 135 cyear='.nat' 136 CALL getso4fromfile(cyear, so4_1) 128 137 ELSE 138 IF (iyr .lt. 1850) THEN 139 cyear='.nat' 140 WRITE(*,*) 'getso4 iyr=', iyr,' ',cyear 141 CALL getso4fromfile(cyear, so4_1) 142 ELSE IF (iyr .ge. 2100) THEN 143 cyear='2100' 144 WRITE(*,*) 'getso4 iyr=', iyr,' ',cyear 145 CALL getso4fromfile(cyear, so4_1) 146 ELSE 129 147 130 148 ! Read in data: 131 ! a) from actual 10-yr-period 132 133 IF (iyr.LT.1900) THEN 134 iyr1 = 1850 135 iyr2 = 1900 136 ELSE IF (iyr.ge.1900.and.iyr.lt.1920) THEN 137 iyr1 = 1900 138 iyr2 = 1920 139 ELSE 140 iyr1 = INT(iyr/10)*10 141 iyr2 = INT(1+iyr/10)*10 142 ENDIF 143 WRITE(cyear,'(I4)') iyr1 144 WRITE(*,*) 'getso4 iyr=', iyr,' ',cyear 145 CALL getso4fromfile(cyear, so4_1) 149 ! a) from actual 10-yr-period 150 151 IF (iyr.LT.1900) THEN 152 iyr1 = 1850 153 iyr2 = 1900 154 ELSE IF (iyr.ge.1900.and.iyr.lt.1920) THEN 155 iyr1 = 1900 156 iyr2 = 1920 157 ELSE 158 iyr1 = INT(iyr/10)*10 159 iyr2 = INT(1+iyr/10)*10 160 ENDIF 161 WRITE(cyear,'(I4)') iyr1 162 ENDIF 163 WRITE(*,*) 'getso4 iyr=', iyr,' ',cyear 164 CALL getso4fromfile(cyear, so4_1) 146 165 147 166 148 167 ! If to read two decades: 149 IF (.NOT.lonlyone) THEN168 IF (.NOT.lonlyone) THEN 150 169 151 170 ! b) from the next following one 152 WRITE(cyear,'(I4)') iyr2 153 WRITE(*,*) 'getso4 iyr=', iyr,' ',cyear 154 CALL getso4fromfile(cyear, so4_2) 155 156 ENDIF 171 WRITE(cyear,'(I4)') iyr2 172 WRITE(*,*) 'getso4 iyr=', iyr,' ',cyear 173 CALL getso4fromfile(cyear, so4_2) 174 157 175 158 176 ! Interpolate linarily to the actual year: 159 DO it=1,12160 DO k=1,klev161 DO j=1,jjm162 DO i=1,iim163 so4_1(i,j,k,it)=so4_1(i,j,k,it)177 DO it=1,12 178 DO k=1,klev 179 DO j=1,jjm 180 DO i=1,iim 181 so4_1(i,j,k,it)=so4_1(i,j,k,it) 164 182 . - FLOAT(iyr-iyr1)/FLOAT(iyr2-iyr1) 165 183 . * (so4_1(i,j,k,it) - so4_2(i,j,k,it)) 166 ENDDO 167 ENDDO 168 ENDDO 169 ENDDO 170 171 ENDIF !lonlyone 184 ENDDO 185 ENDDO 186 ENDDO 187 ENDDO 188 189 190 ENDIF !lonlyone 191 ENDIF !aer_type 172 192 173 193 ! Transform the horizontal 2D-field into the physics-field … … 537 557 538 558 SUBROUTINE getso4fromfile (cyr, so4) 539 usedimphy559 USE dimphy 540 560 #include "netcdf.inc" 541 561 #include "dimensions.h" 542 cccc#include "dimphy.h"543 562 CHARACTER*15 fname 544 563 CHARACTER*4 cyr -
LMDZ4/trunk/libf/phylmd/surf_land_bucket_mod.F90
r1072 r1146 153 153 ! 154 154 DO i = 1, knon 155 z0_new(i) = SQRT(z0_new(i)**2+rugoro(i)**2)155 z0_new(i) = MAX(1.5e-05,SQRT(z0_new(i)**2 + rugoro(i)**2)) 156 156 END DO 157 157 -
LMDZ4/trunk/libf/phylmd/surf_land_mod.F90
r1067 r1146 15 15 AcoefU, AcoefV, BcoefU, BcoefV, & 16 16 pref, u1, v1, rugoro, pctsrf, & 17 lwdown_m, q2m, t2m, & 17 18 snow, qsol, agesno, tsoil, & 18 19 z0_new, alb1_new, alb2_new, evap, fluxsens, fluxlat, & 19 20 qsurf, tsurf_new, dflux_s, dflux_l, & 20 flux_u1, flux_v1, & 21 lwdown_m) 21 flux_u1, flux_v1 ) 22 22 23 23 USE dimphy 24 24 USE surface_data, ONLY : ok_veget 25 26 #ifdef ORCHIDEE_NOOPENMP 27 USE surf_land_orchidee_noopenmp_mod 28 #else 25 29 USE surf_land_orchidee_mod 30 #endif 26 31 USE surf_land_bucket_mod 27 32 USE calcul_fluxs_mod … … 53 58 REAL, DIMENSION(klon), INTENT(IN) :: rugoro 54 59 REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: pctsrf 55 56 60 REAL, DIMENSION(klon), INTENT(IN) :: lwdown_m ! downwelling longwave radiation at mean surface 57 61 ! corresponds to previous sollwdown 62 REAL, DIMENSION(klon), INTENT(IN) :: q2m, t2m 58 63 59 64 ! In/Output variables … … 124 129 cdragh, AcoefH, AcoefQ, BcoefH, BcoefQ, & 125 130 precip_rain, precip_snow, lwdown_m, swnet, swdown, & 126 pref_tmp, &131 pref_tmp, q2m, t2m, & 127 132 evap, fluxsens, fluxlat, & 128 133 tsol_rad, tsurf_new, alb1_new, alb2_new, & … … 133 138 ! 134 139 DO i=1,knon 135 z0_new(i) = SQRT(z0_new(i)**2 + rugoro(i)**2)140 z0_new(i) = MAX(1.5e-05,SQRT(z0_new(i)**2 + rugoro(i)**2)) 136 141 ENDDO 137 142 -
LMDZ4/trunk/libf/phylmd/surf_land_orchidee_mod.F90
r1067 r1146 1 1 ! 2 2 MODULE surf_land_orchidee_mod 3 #ifndef ORCHIDEE_NOOPENMP 3 4 ! 4 5 ! This module controles the interface towards the model ORCHIDEE … … 35 36 tq_cdrag, petAcoef, peqAcoef, petBcoef, peqBcoef, & 36 37 precip_rain, precip_snow, lwdown, swnet, swdown, & 37 ps, &38 ps, q2m, t2m, & 38 39 evap, fluxsens, fluxlat, & 39 40 tsol_rad, tsurf_new, alb1_new, alb2_new, & … … 119 120 REAL, DIMENSION(klon), INTENT(IN) :: precip_rain, precip_snow 120 121 REAL, DIMENSION(klon), INTENT(IN) :: lwdown, swnet, swdown, ps 121 REAL, DIMENSION(klon) :: swdown_vrai122 REAL, DIMENSION(klon), INTENT(IN) :: q2m, t2m 122 123 123 124 ! Parametres de sortie … … 132 133 INTEGER :: ij, jj, igrid, ireal, index 133 134 INTEGER :: error 135 REAL, DIMENSION(klon) :: swdown_vrai 134 136 CHARACTER (len = 20) :: modname = 'surf_land_orchidee' 135 137 CHARACTER (len = 80) :: abort_message … … 390 392 evap, fluxsens, fluxlat, coastalflow, riverflow, & 391 393 tsol_rad, tsurf_new, qsurf, albedo_out, emis_new, z0_new, & 392 lon_scat, lat_scat )394 lon_scat, lat_scat, q2m, t2m) 393 395 #endif 394 396 ENDIF … … 414 416 evap(1:knon), fluxsens(1:knon), fluxlat(1:knon), coastalflow(1:knon), riverflow(1:knon), & 415 417 tsol_rad(1:knon), tsurf_new(1:knon), qsurf(1:knon), albedo_out(1:knon,:), emis_new(1:knon), z0_new(1:knon), & 416 lon_scat, lat_scat )418 lon_scat, lat_scat, q2m, t2m) 417 419 #endif 418 420 ENDIF … … 632 634 !**************************************************************************************** 633 635 ! 634 636 #endif 635 637 END MODULE surf_land_orchidee_mod -
LMDZ4/trunk/libf/phylmd/surf_landice_mod.F90
r1067 r1146 164 164 ! 165 165 !**************************************************************************************** 166 z0_new(:) = rugoro(:)166 z0_new(:) = MAX(1.E-3,rugoro(:)) 167 167 168 168 !**************************************************************************************** -
LMDZ4/trunk/libf/phylmd/surf_ocean_mod.F90
r1067 r1146 79 79 !**************************************************************************************** 80 80 INTEGER :: i 81 REAL :: tmp 82 REAL, PARAMETER :: cepdu2=(0.1)**2 81 83 REAL, DIMENSION(klon) :: alb_eau 82 84 REAL, DIMENSION(klon) :: radsol … … 153 155 ! 154 156 !**************************************************************************************** 155 z0_new = SQRT(rugos**2 + rugoro**2)156 157 ! The rugosity is recalculated with another method158 z0_new(:) = 0.0159 157 DO i = 1, knon 158 tmp = MAX(cepdu2,u1(i)**2+v1(i)**2) 160 159 z0_new(i) = 0.018*cdragm(i) * (u1(i)**2+v1(i)**2)/RG & 161 + 0.11*14e-6 / SQRT(cdragm(i) * (u1(i)**2+v1(i)**2))160 + 0.11*14e-6 / SQRT(cdragm(i) * tmp) 162 161 z0_new(i) = MAX(1.5e-05,z0_new(i)) 163 ENDDO 164 162 ENDDO 165 163 ! 166 164 !**************************************************************************************** -
LMDZ4/trunk/libf/phylmd/thermcell.h
r1026 r1146 1 integer iflag_thermals,nsplit_thermals 2 real r_aspect_thermals,l_mix_thermals,tau_thermals 3 integer w2di_thermals,isplit 4 integer iflag_coupl,iflag_clos,iflag_wake 5 integer iflag_thermals_ed,iflag_thermals_optflux 1 integer :: iflag_thermals,nsplit_thermals 2 real,parameter :: r_aspect_thermals=2.,l_mix_thermals=30. 3 real :: tau_thermals 4 integer,parameter :: w2di_thermals=1 5 integer :: isplit 6 7 integer :: iflag_coupl,iflag_clos,iflag_wake 8 integer :: iflag_thermals_ed,iflag_thermals_optflux 6 9 7 10 common/ctherm1/iflag_thermals,nsplit_thermals 8 common/ctherm2/r_aspect_thermals,l_mix_thermals,tau_thermals 9 common/ctherm3/w2di_thermals 11 common/ctherm2/tau_thermals 10 12 common/ctherm4/iflag_coupl,iflag_clos,iflag_wake 11 13 common/ctherm5/iflag_thermals_ed,iflag_thermals_optflux 12 14 13 !$OMP THREADPRIVATE(/ctherm1/,/ctherm2/,/ctherm 3/,/ctherm4/)15 !$OMP THREADPRIVATE(/ctherm1/,/ctherm2/,/ctherm4/,/ctherm5/) -
LMDZ4/trunk/libf/phylmd/thermcell_closure.F90
r1057 r1146 55 55 ! f(ig)=f(ig)+(f0(ig)-f(ig))*exp((-ptimestep/ & 56 56 ! & zmax_sec(ig))*wmax_sec(ig)) 57 print*,'closure dry',f(ig),wmax_sec(ig),alim_star_tot(ig),zmax_sec(ig)57 if(prt_level.GE.10) write(lunout,*)'closure dry',f(ig),wmax_sec(ig),alim_star_tot(ig),zmax_sec(ig) 58 58 else 59 59 f(ig)=wmax(ig)*alim_star_tot(ig)/zdenom -
LMDZ4/trunk/libf/phylmd/thermcell_dv2.F90
r972 r1146 54 54 enddo 55 55 56 print*,'WARNING on initialise gamma(1:ngrid,1)=0.' 56 IF(prt_level>9)WRITE(lunout,*) & 57 & 'WARNING on initialise gamma(1:ngrid,1)=0.' 57 58 gamma(1:ngrid,1)=0. 58 59 do k=2,nlay -
LMDZ4/trunk/libf/phylmd/thermcell_flux.F90
r987 r1146 164 164 ! FH Version en cours de test; 165 165 ! par rapport a thermcell_flux, on fait une grande boucle sur "l" 166 ! et on modifie le flux avec tous les contr ôles appliques d'affilee166 ! et on modifie le flux avec tous les contr�les appliques d'affilee 167 167 ! pour la meme couche 168 168 ! Momentanement, on duplique le calcule du flux pour pouvoir comparer … … 264 264 if (entr(ig,l)<0.) then 265 265 print*,'N1 ig,l,entr',ig,l,entr(ig,l) 266 stop 'entr negatif'266 stop 'entr negatif' 267 267 endif 268 268 if (detr(ig,l).gt.fm(ig,l)) then … … 292 292 print*,'entr(ig,l)',entr(ig,l) 293 293 print*,'fm(ig,l)',fm(ig,l) 294 stop 'probleme dans thermcell flux'294 stop 'probleme dans thermcell flux' 295 295 endif 296 296 enddo … … 319 319 print*,'detr(ig,l)',detr(ig,l) 320 320 print*,'fm(ig,l)',fm(ig,l) 321 stop 'probleme dans thermcell flux'321 stop 'probleme dans thermcell flux' 322 322 endif 323 323 enddo … … 420 420 print*,'fm(ig,l+1)',fm(ig,l+1) 421 421 print*,'fm(ig,l)',fm(ig,l) 422 stop 'probleme dans thermcell_flux'422 stop 'probleme dans thermcell_flux' 423 423 endif 424 424 entr(ig,l+1)=entr(ig,l+1)-ddd -
LMDZ4/trunk/libf/phylmd/thermcell_flux2.F90
r1026 r1146 160 160 ! FH Version en cours de test; 161 161 ! par rapport a thermcell_flux, on fait une grande boucle sur "l" 162 ! et on modifie le flux avec tous les contr ôles appliques d'affilee162 ! et on modifie le flux avec tous les contr�les appliques d'affilee 163 163 ! pour la meme couche 164 164 ! Momentanement, on duplique le calcule du flux pour pouvoir comparer … … 256 256 if (entr(ig,l)<0.) then 257 257 print*,'N1 ig,l,entr',ig,l,entr(ig,l) 258 stop 'entr negatif'258 stop 'entr negatif' 259 259 endif 260 260 if (detr(ig,l).gt.fm(ig,l)) then … … 285 285 print*,'entr(ig,l)',entr(ig,l) 286 286 print*,'fm(ig,l)',fm(ig,l) 287 stop 'probleme dans thermcell flux'287 stop 'probleme dans thermcell flux' 288 288 endif 289 289 enddo … … 312 312 print*,'detr(ig,l)',detr(ig,l) 313 313 print*,'fm(ig,l)',fm(ig,l) 314 stop 'probleme dans thermcell flux'314 stop 'probleme dans thermcell flux' 315 315 endif 316 316 enddo … … 413 413 print*,'fm(ig,l+1)',fm(ig,l+1) 414 414 print*,'fm(ig,l)',fm(ig,l) 415 stop 'probleme dans thermcell_flux'415 stop 'probleme dans thermcell_flux' 416 416 endif 417 417 entr(ig,l+1)=entr(ig,l+1)-ddd -
LMDZ4/trunk/libf/phylmd/thermcell_main.F90
r1026 r1146 232 232 ! enddo 233 233 ! ENDIF !(1.eq.0) THEN 234 print*,'WARNING thermcell_main f0=max(f0,1.e-2)' 234 if (prt_level.ge.10)write(lunout,*) & 235 & 'WARNING thermcell_main f0=max(f0,1.e-2)' 235 236 do ig=1,klon 236 237 if (prt_level.ge.20) then … … 295 296 296 297 !IM 297 print*,'WARNING thermcell_main rhobarz(:,1)=rho(:,1)' 298 if (prt_level.ge.10)write(lunout,*) & 299 & 'WARNING thermcell_main rhobarz(:,1)=rho(:,1)' 298 300 rhobarz(:,1)=rho(:,1) 299 301 … … 482 484 ! Test valable seulement en 1D mais pas genant 483 485 if (.not. (f0(1).ge.0.) ) then 484 stop 'Dans thermcell_main'486 stop 'Dans thermcell_main' 485 487 endif 486 488 … … 624 626 enddo 625 627 if (prt_level.ge.1) print*,'14d OK convect8' 626 print*,'WARNING thermcell_main wth2=0. si zw2 > 1.e-10' 628 if (prt_level.ge.10)write(lunout,*) & 629 & 'WARNING thermcell_main wth2=0. si zw2 > 1.e-10' 627 630 do l=1,nlay 628 631 do ig=1,ngrid -
LMDZ4/trunk/libf/phylmd/wake.F
r1059 r1146 12 12 o ,Cstar,d_deltat_gw 13 13 o ,d_deltatw2,d_deltaqw2) 14 14 15 15 16 *************************************************************** … … 157 158 REAL alpk 158 159 REAL delta_t_min 159 REAL Pupper160 160 INTEGER nsub 161 161 REAL dtimesub 162 162 REAL sigmad, hwmin 163 REAL :: sigmaw_max 163 164 cIM 080208 164 165 LOGICAL, dimension(klon) :: gwake … … 183 184 INTEGER, DIMENSION(klon) :: ktop, kupper 184 185 186 c Sub-timestep tendencies and related variables 187 REAL d_deltatw(klon,klev),d_deltaqw(klon,klev) 188 REAL d_te(klon,klev),d_qe(klon,klev) 189 REAL d_sigmaw(klon),alpha(klon) 190 REAL q0_min(klon),q1_min(klon) 191 LOGICAL wk_adv(klon), OK_qx_qw(klon) 192 185 193 c Autres variables internes 186 194 INTEGER isubstep, k, i … … 202 210 REAL, DIMENSION(klon,klev) :: the, thu 203 211 204 REAL, DIMENSION(klon,klev) :: d_deltatw, d_deltaqw212 ! REAL, DIMENSION(klon,klev) :: d_deltatw, d_deltaqw 205 213 206 214 REAL, DIMENSION(klon,klev+1) :: omgbw 215 REAL, DIMENSION(klon) :: pupper 207 216 REAL, DIMENSION(klon) :: omgtop 208 217 REAL, DIMENSION(klon,klev) :: dp_omgbw … … 279 288 dqls(i,k) = 0. 280 289 d_deltat_gw(i,k)=0. 290 d_te(i,k) = 0. 291 d_qe(i,k) = 0. 292 d_deltatw(i,k) = 0. 293 d_deltaqw(i,k) = 0. 281 294 !IM 060508 beg 282 295 d_deltatw2(i,k)=0. … … 294 307 sigmaw(i) = amin1(sigmaw(i),0.99) 295 308 sigmaw0(i) = sigmaw(i) 309 wape(i) = 0. 310 wape2(i) = 0. 311 d_sigmaw(i) = 0. 312 ktopw(i) = 0 296 313 ENDDO 297 314 C … … 406 423 c 407 424 C Pupper = 50000. ! melting level 408 Pupper = 60000.425 c Pupper = 60000. 409 426 c Pupper = 80000. ! essais pour case_e 427 DO i = 1,klon 428 ccc Pupper(i) = 0.6*ph(i,1) 429 Pupper(i) = 60000. 430 ENDDO 431 410 432 C 411 433 C Determine Wake top pressure (Ptop) from buoyancy integral … … 481 503 DO i=1,klon 482 504 IF (ph(i,k+1) .lt. ptop(i)) ktop(i)=k 483 IF (ph(i,k+1) .lt. pupper ) kupper(i)=k505 IF (ph(i,k+1) .lt. pupper(i)) kupper(i)=k 484 506 ENDDO 485 507 ENDDO … … 622 644 ENDIF 623 645 ENDDO 624 c 625 C 646 647 c 648 c Check qx and qw positivity 649 c -------------------------- 650 DO i = 1,klon 651 q0_min(i)=min( (qe(i,1)-sigmaw(i)*deltaqw(i,1)), 652 $ (qe(i,1)+(1.-sigmaw(i))*deltaqw(i,1)) ) 653 ENDDO 654 DO k = 2,klev 655 DO i = 1,klon 656 q1_min(i)=min( (qe(i,k)-sigmaw(i)*deltaqw(i,k)), 657 $ (qe(i,k)+(1.-sigmaw(i))*deltaqw(i,k)) ) 658 IF (q1_min(i).le.q0_min(i)) THEN 659 q0_min(i)=q1_min(i) 660 ENDIF 661 ENDDO 662 ENDDO 663 c 664 DO i = 1,klon 665 OK_qx_qw(i) = q0_min(i) .GE. 0. 666 alpha(i) = 1. 667 ENDDO 668 c 626 669 CC ----------------------------------------------------------------- 627 670 C Sub-time-stepping … … 634 677 DO isubstep = 1,nsub 635 678 c------------------------------------------------------------ 636 DO i=1,klon 679 c 680 c wk_adv is the logical flag enabling wake evolution in the time advance loop 681 DO i = 1,klon 682 wk_adv(i) = OK_qx_qw(i) .AND. alpha(i) .GE. 1. 683 ENDDO 684 c 685 DO i=1,klon 686 IF (wk_adv(i)) THEN 637 687 gfl(i) = 2.*sqrt(3.14*wdens*sigmaw(i)) 638 ENDDO 639 DO i=1,klon 640 sigmaw(i) =sigmaw(i) + gfl(i)*Cstar(i)*dtimesub 641 sigmaw(i) =amin1(sigmaw(i),0.99) !!!!!!!! 688 ENDIF 689 ENDDO 690 DO i=1,klon 691 IF (wk_adv(i)) THEN 692 d_sigmaw(i) = gfl(i)*Cstar(i)*dtimesub 693 c sigmaw(i) =sigmaw(i) + gfl(i)*Cstar(i)*dtimesub 694 c sigmaw(i) =min(sigmaw(i),0.99) !!!!!!!! 642 695 c wdens = wdens0/(10.*sigmaw) 643 696 c sigmaw =max(sigmaw,sigd_con) 644 697 c sigmaw =max(sigmaw,sigmad) 698 ENDIF 645 699 ENDDO 646 700 C … … 650 704 cIM 060208 et omg sur les niveaux de 1 a klev+1, alors que avant l'on definit 651 705 cIM 060208 au niveau k=1..? 652 dp_deltomg(1:klon,1:klev)=0. 706 DO k= 1,klev 707 DO i = 1,klon 708 dp_deltomg(i,k)=0. 709 ENDDO 710 ENDDO 653 711 DO k= 1,klev+1 654 712 DO i = 1,klon … … 658 716 c 659 717 DO i=1,klon 718 IF (wk_adv(i)) THEN 660 719 z(i)= 0. 661 720 omg(i,1) = 0. 662 721 dp_deltomg(i,1) = -(gfl(i)*Cstar(i))/(sigmaw(i) * (1-sigmaw(i))) 722 ENDIF 663 723 ENDDO 664 724 c 665 725 DO k= 2,klev 666 726 DO i = 1,klon 667 IF( k .LE. ktop(i)) THEN727 IF( wk_adv(i) .AND. k .LE. ktop(i)) THEN 668 728 dz(i) = -(ph(i,k)-ph(i,k-1))/(rho(i,k-1)*rg) 669 729 z(i) = z(i)+dz(i) … … 675 735 c 676 736 DO i = 1,klon 737 IF (wk_adv(i)) THEN 677 738 dztop(i)=-(ptop(i)-ph(i,ktop(i)))/(rho(i,ktop(i))*rg) 678 739 ztop(i) = z(i)+dztop(i) 679 740 omgtop(i)=dp_deltomg(i,1)*ztop(i) 741 ENDIF 680 742 ENDDO 681 743 c … … 685 747 c 686 748 DO i=1,klon 749 IF (wk_adv(i)) THEN 687 750 omgtop(i) = -rho(i,ktop(i))*rg*omgtop(i) 688 751 dp_deltomg(i,1) = omgtop(i)/(ptop(i)-ph(i,1)) 752 ENDIF 689 753 ENDDO 690 754 c 691 755 DO k= 1,klev 692 756 DO i = 1,klon 693 IF( k .LE. ktop(i)) THEN757 IF( wk_adv(i) .AND. k .LE. ktop(i)) THEN 694 758 omg(i,k) = - rho(i,k)*rg*omg(i,k) 695 759 dp_deltomg(i,k) = dp_deltomg(i,1) … … 701 765 702 766 DO i=1,klon 703 IF ( kupper(i) .GT. ktop(i)) THEN767 IF ( wk_adv(i) .AND. kupper(i) .GT. ktop(i)) THEN 704 768 omg(i,kupper(i)+1) = - Rg*amdwn(i,kupper(i)+1)/sigmaw(i) 705 769 $ + Rg*amup(i,kupper(i)+1)/(1.-sigmaw(i)) 706 770 dp_deltomg(i,kupper(i)) = (omgtop(i)-omg(i,kupper(i)+1))/ 707 $ (ptop(i)-pupper )771 $ (ptop(i)-pupper(i)) 708 772 ENDIF 709 773 ENDDO … … 711 775 DO k= 1,klev 712 776 DO i = 1,klon 713 IF( k .GT. ktop(i) .AND. k .LE. kupper(i)) THEN777 IF( wk_adv(i) .AND. k .GT. ktop(i) .AND. k .LE. kupper(i)) THEN 714 778 dp_deltomg(i,k) = dp_deltomg(i,kupper(i)) 715 779 omg(i,k) = omgtop(i)+(ph(i,k)-ptop(i))*dp_deltomg(i,kupper(i)) … … 718 782 ENDDO 719 783 c 784 c 720 785 c-- Compute wake average vertical velocity omgbw 721 786 c … … 723 788 DO k = 1,klev+1 724 789 DO i=1,klon 790 IF ( wk_adv(i)) THEN 725 791 omgbw(i,k) = omgb(i,k)+(1.-sigmaw(i))*omg(i,k) 792 ENDIF 726 793 ENDDO 727 794 ENDDO … … 730 797 DO k = 1,klev 731 798 DO i=1,klon 799 IF ( wk_adv(i)) THEN 732 800 dp_omgbw(i,k) = (omgbw(i,k+1)-omgbw(i,k))/(ph(i,k+1)-ph(i,k)) 801 ENDIF 733 802 ENDDO 734 803 ENDDO … … 739 808 DO k = 1,klev 740 809 DO i=1,klon 741 alpha_up(i,k) = 0. 742 IF (omgb(i,k) .GT. 0.) alpha_up(i,k) = 1. 810 IF ( wk_adv(i)) THEN 811 alpha_up(i,k) = 0. 812 IF (omgb(i,k) .GT. 0.) alpha_up(i,k) = 1. 813 ENDIF 743 814 ENDDO 744 815 ENDDO … … 747 818 748 819 DO i=1,klon 749 RRe1(i) = 1.-sigmaw(i) 750 RRe2(i) = sigmaw(i) 820 IF ( wk_adv(i)) THEN 821 RRe1(i) = 1.-sigmaw(i) 822 RRe2(i) = sigmaw(i) 823 ENDIF 751 824 ENDDO 752 825 RRd1 = -1. … … 757 830 DO k= 1,klev 758 831 DO i = 1,klon 759 IF( k .LE. kupper(i)+1) THEN832 IF( wk_adv(i) .AND. k .LE. kupper(i)+1) THEN 760 833 dth(i,k) = deltatw(i,k)/ppi(i,k) 761 834 Th1(i,k) = the(i,k) - sigmaw(i) *dth(i,k) ! undisturbed area … … 778 851 DO k= 2,klev 779 852 DO i = 1,klon 780 IF( k .LE. kupper(i)+1) THEN853 IF( wk_adv(i) .AND. k .LE. kupper(i)+1) THEN 781 854 D_Th1(i,k) = Th1(i,k-1)-Th1(i,k) 782 855 D_Th2(i,k) = Th2(i,k-1)-Th2(i,k) … … 790 863 791 864 DO i=1,klon 792 omgbdth(i,1) = 0. 793 omgbdq(i,1) = 0. 865 IF( wk_adv(i)) THEN 866 omgbdth(i,1) = 0. 867 omgbdq(i,1) = 0. 868 ENDIF 794 869 ENDDO 795 870 796 871 DO k= 2,klev 797 872 DO i = 1,klon 798 IF( k .LE. kupper(i)+1) THEN ! loop on interfaces873 IF( wk_adv(i) .AND. k .LE. kupper(i)+1) THEN ! loop on interfaces 799 874 omgbdth(i,k) = omgb(i,k)*( dth(i,k-1) - dth(i,k)) 800 875 omgbdq(i,k) = omgb(i,k)*(deltaqw(i,k-1) - deltaqw(i,k)) … … 806 881 DO k= 1,klev 807 882 DO i = 1,klon 808 IF( k .LE. kupper(i)-1) THEN883 IF( wk_adv(i) .AND. k .LE. kupper(i)-1) THEN 809 884 c----------------------------------------------------------------- 810 885 c … … 829 904 c and increment large scale tendencies 830 905 c 831 dtls(i,k) = dtls(i,k) + 832 $ dtimesub*( 906 907 c 908 C 909 CC ----------------------------------------------------------------- 910 d_te(i,k) = dtimesub*( 833 911 $ ( RRe1(i)*omg(i,k )*sigmaw(i) *D_Th1(i,k) 834 912 $ -RRe2(i)*omg(i,k+1)*(1.-sigmaw(i))*D_Th2(i,k+1) ) … … 836 914 $ -sigmaw(i)*(1.-sigmaw(i))*dth(i,k)*dp_deltomg(i,k) 837 915 $ )*ppi(i,k) 838 c print*,'dtls=',dtls(i,k) 839 c 840 dqls(i,k) = dqls(i,k) + 841 $ dtimesub*( 916 c 917 d_qe(i,k) = dtimesub*( 842 918 $ ( RRe1(i)*omg(i,k )*sigmaw(i) *D_q1(i,k) 843 919 $ -RRe2(i)*omg(i,k+1)*(1.-sigmaw(i))*D_q2(i,k+1) ) … … 845 921 $ -sigmaw(i)*(1.-sigmaw(i))*deltaqw(i,k)*dp_deltomg(i,k) 846 922 $ ) 847 c print*,'dqls=',dqls(k) 848 ENDIF 923 ENDIF 924 849 925 c------------------------------------------------------------------- 850 926 ENDDO … … 856 932 DO k= 1,klev 857 933 DO i = 1,klon 858 IF( k .LE. kupper(i)-1) THEN934 IF( wk_adv(i) .AND. k .LE. kupper(i)-1) THEN 859 935 c 860 936 c Coefficient de répartition … … 912 988 913 989 IF (dtimesub*Tgw(i,k).lt.1.e-10) THEN 914 d eltatw(i,k) = deltatw(i,k)+dtimesub*915 $ (ff(i)+dtKE(i,k)+dtPBL(i,k) 990 d_deltatw(i,k) = dtimesub* 991 $ (ff(i)+dtKE(i,k)+dtPBL(i,k) 916 992 $ - spread(i,k)*deltatw(i,k)-Tgw(i,k)*deltatw(i,k)) 917 993 ELSE 918 d eltatw(i,k) = deltatw(i,k)+1/Tgw(i,k)*(1-exp(-dtimesub*994 d_deltatw(i,k) = 1/Tgw(i,k)*(1-exp(-dtimesub* 919 995 $ Tgw(i,k)))* 920 996 $ (ff(i)+dtKE(i,k)+dtPBL(i,k) 921 997 $ - spread(i,k)*deltatw(i,k)-Tgw(i,k)*deltatw(i,k)) 922 998 ENDIF 923 999 924 1000 dth(i,k) = deltatw(i,k)/ppi(i,k) 925 1001 926 1002 gg(i)=d_deltaqw(i,k)/dtimesub 927 1003 928 deltaqw(i,k) = deltaqw(i,k) + 929 $ dtimesub*(gg(i)+ dqKE(i,k)+dqPBL(i,k) - spread(i,k)* 930 $ deltaqw(i,k)) 1004 d_deltaqw(i,k) = dtimesub*(gg(i)+ dqKE(i,k)+dqPBL(i,k) 1005 $ - spread(i,k)*deltaqw(i,k)) 931 1006 932 1007 d_deltatw2(i,k)=d_deltatw2(i,k)+d_deltatw(i,k) … … 936 1011 ENDDO 937 1012 938 C And update large scale variables 1013 C 1014 C Scale tendencies so that water vapour remains positive in w and x. 1015 C 1016 call wake_vec_modulation(klon,klev,wk_adv,qe,d_qe,deltaqw, 1017 $ d_deltaqw,sigmaw,d_sigmaw,alpha) 1018 c 1019 DO k = 1,klev 1020 DO i = 1,klon 1021 IF( wk_adv(i) .AND. k .LE. kupper(i)) THEN 1022 d_te(i,k)=alpha(i)*d_te(i,k) 1023 d_qe(i,k)=alpha(i)*d_qe(i,k) 1024 d_deltatw(i,k)=alpha(i)*d_deltatw(i,k) 1025 d_deltaqw(i,k)=alpha(i)*d_deltaqw(i,k) 1026 d_deltat_gw(i,k)=alpha(i)*d_deltat_gw(i,k) 1027 ENDIF 1028 ENDDO 1029 ENDDO 1030 DO i = 1,klon 1031 IF( wk_adv(i)) THEN 1032 d_sigmaw(i)=alpha(i)*d_sigmaw(i) 1033 ENDIF 1034 ENDDO 1035 1036 C Update large scale variables and wake variables 939 1037 cIM 060208 manque DO i + remplace DO k=1,kupper(i) 940 1038 cIM 060208 DO k = 1,kupper(i) 941 1039 DO k= 1,klev 942 1040 DO i = 1,klon 943 IF(k .LE. kupper(i)) THEN 1041 IF( wk_adv(i) .AND. k .LE. kupper(i)) THEN 1042 dtls(i,k)=dtls(i,k)+d_te(i,k) 1043 dqls(i,k)=dqls(i,k)+d_qe(i,k) 1044 ENDIF 1045 ENDDO 1046 ENDDO 1047 DO k= 1,klev 1048 DO i = 1,klon 1049 IF( wk_adv(i) .AND. k .LE. kupper(i)) THEN 944 1050 te(i,k) = te0(i,k) + dtls(i,k) 945 1051 qe(i,k) = qe0(i,k) + dqls(i,k) 946 1052 the(i,k) = te(i,k)/ppi(i,k) 947 ENDIF 948 ENDDO 1053 deltatw(i,k) = deltatw(i,k)+d_deltatw(i,k) 1054 deltaqw(i,k) = deltaqw(i,k)+d_deltaqw(i,k) 1055 dth(i,k) = deltatw(i,k)/ppi(i,k) 1056 ENDIF 1057 ENDDO 1058 ENDDO 1059 DO i = 1,klon 1060 IF( wk_adv(i)) THEN 1061 sigmaw(i) = sigmaw(i)+d_sigmaw(i) 1062 ENDIF 949 1063 ENDDO 950 1064 c … … 956 1070 c 957 1071 DO i=1,klon 958 Ptop_provis(i)=ph(i,1) 1072 IF ( wk_adv(i)) THEN 1073 Ptop_provis(i)=ph(i,1) 1074 ENDIF 959 1075 ENDDO 960 1076 c 961 1077 DO k= 2,klev 962 1078 DO i=1,klon 963 IF (Ptop_provis(i) .EQ. ph(i,1) .AND. 1079 IF ( wk_adv(i) .AND. 1080 $ Ptop_provis(i) .EQ. ph(i,1) .AND. 964 1081 $ dth(i,k) .GT. -delta_t_min .and. 965 1082 $ dth(i,k-1).LT. -delta_t_min) THEN … … 981 1098 DO k = 1,klev 982 1099 DO i=1,klon 1100 IF ( wk_adv(i)) THEN 983 1101 dz(i) = -(amax1(ph(i,k+1),Ptop_provis(i))-Ph(i,k))/(rho(i,k)*rg) 984 1102 IF (dz(i) .gt. 0) THEN … … 987 1105 dthmin(i) = amin1(dthmin(i),dth(i,k)) 988 1106 ENDIF 1107 ENDIF 989 1108 ENDDO 990 1109 ENDDO … … 993 1112 994 1113 DO i=1,klon 995 hw(i) = 2.*sum_dth(i)/amin1(dthmin(i),-0.5) 996 hw(i) = amax1(hwmin,hw(i)) 1114 IF ( wk_adv(i)) THEN 1115 hw(i) = 2.*sum_dth(i)/amin1(dthmin(i),-0.5) 1116 hw(i) = amax1(hwmin,hw(i)) 1117 ENDIF 997 1118 ENDDO 998 1119 c … … 1006 1127 DO k = 1,klev 1007 1128 DO i=1,klon 1129 IF ( wk_adv(i)) THEN 1008 1130 dz(i) = amin1(-(ph(i,k+1)-Ph(i,k))/(rho(i,k)*rg),hw(i)-z(i)) 1009 1131 IF (dz(i) .gt. 0) THEN … … 1012 1134 ktop(i) = k 1013 1135 ENDIF 1136 ENDIF 1014 1137 ENDDO 1015 1138 ENDDO … … 1018 1141 c 1019 1142 DO i=1,klon 1143 IF ( wk_adv(i)) THEN 1020 1144 Ptop_new(i)=ptop(i) 1145 ENDIF 1021 1146 ENDDO 1022 1147 c … … 1024 1149 DO i=1,klon 1025 1150 cIM v3JYG; IF (k .GE. ktop(i) 1026 IF (k .LE. ktop(i) .AND. 1151 IF ( wk_adv(i) .AND. 1152 $ k .LE. ktop(i) .AND. 1027 1153 $ ptop_new(i) .EQ. ptop(i) .AND. 1028 1154 $ dth(i,k) .GT. -delta_t_min .and. … … 1037 1163 c 1038 1164 DO i=1,klon 1039 ptop(i) = ptop_new(i) 1165 IF ( wk_adv(i)) THEN 1166 ptop(i) = ptop_new(i) 1167 ENDIF 1040 1168 ENDDO 1041 1169 … … 1050 1178 DO k = 1,klev 1051 1179 DO i=1,klon 1052 IF ( k .GE. kupper(i)) THEN1180 IF ( wk_adv(i) .AND. k .GE. kupper(i)) THEN 1053 1181 deltatw(i,k) = 0. 1054 1182 deltaqw(i,k) = 0. … … 1058 1186 c 1059 1187 C 1188 c-------------Cstar computation--------------------------------- 1189 DO i=1, klon 1190 sum_thu(i) = 0. 1191 sum_tu(i) = 0. 1192 sum_qu(i) = 0. 1193 sum_thvu(i) = 0. 1194 sum_dth(i) = 0. 1195 sum_dq(i) = 0. 1196 sum_rho(i) = 0. 1197 sum_dtdwn(i) = 0. 1198 sum_dqdwn(i) = 0. 1199 1200 av_thu(i) = 0. 1201 av_tu(i) =0. 1202 av_qu(i) =0. 1203 av_thvu(i) = 0. 1204 av_dth(i) = 0. 1205 av_dq(i) = 0. 1206 av_rho(i) =0. 1207 av_dtdwn(i) =0. 1208 av_dqdwn(i) = 0. 1209 ENDDO 1210 C 1211 C Integrals (and wake top level number) 1212 C -------------------------------------- 1213 C 1214 C Initialize sum_thvu to 1st level virt. pot. temp. 1215 1216 DO i=1,klon 1217 z(i) = 1. 1218 dz(i) = 1. 1219 sum_thvu(i) = thu(i,1)*(1.+eps*qu(i,1))*dz(i) 1220 sum_dth(i) = 0. 1221 ENDDO 1222 1223 DO k = 1,klev 1224 DO i=1,klon 1225 dz(i) = -(max(ph(i,k+1),ptop(i))-ph(i,k))/(rho(i,k)*rg) 1226 IF (dz(i) .GT. 0) THEN 1227 z(i) = z(i)+dz(i) 1228 sum_thu(i) = sum_thu(i) + thu(i,k)*dz(i) 1229 sum_tu(i) = sum_tu(i) + tu(i,k)*dz(i) 1230 sum_qu(i) = sum_qu(i) + qu(i,k)*dz(i) 1231 sum_thvu(i) = sum_thvu(i) + thu(i,k)*(1.+eps*qu(i,k))*dz(i) 1232 sum_dth(i) = sum_dth(i) + dth(i,k)*dz(i) 1233 sum_dq(i) = sum_dq(i) + deltaqw(i,k)*dz(i) 1234 sum_rho(i) = sum_rho(i) + rhow(i,k)*dz(i) 1235 sum_dtdwn(i) = sum_dtdwn(i) + dtdwn(i,k)*dz(i) 1236 sum_dqdwn(i) = sum_dqdwn(i) + dqdwn(i,k)*dz(i) 1237 ENDIF 1238 ENDDO 1239 ENDDO 1240 c 1241 DO i=1,klon 1242 hw0(i) = z(i) 1243 ENDDO 1244 c 1245 C 1246 C - WAPE and mean forcing computation 1247 C --------------------------------------- 1248 C 1249 C --------------------------------------- 1250 C 1251 C Means 1252 1253 DO i=1,klon 1254 av_thu(i) = sum_thu(i)/hw0(i) 1255 av_tu(i) = sum_tu(i)/hw0(i) 1256 av_qu(i) = sum_qu(i)/hw0(i) 1257 av_thvu(i) = sum_thvu(i)/hw0(i) 1258 av_dth(i) = sum_dth(i)/hw0(i) 1259 av_dq(i) = sum_dq(i)/hw0(i) 1260 av_rho(i) = sum_rho(i)/hw0(i) 1261 av_dtdwn(i) = sum_dtdwn(i)/hw0(i) 1262 av_dqdwn(i) = sum_dqdwn(i)/hw0(i) 1263 c 1264 wape(i) = - rg*hw0(i)*(av_dth(i) 1265 $ + eps*(av_thu(i)*av_dq(i)+av_dth(i)*av_qu(i)+av_dth(i)* 1266 $ av_dq(i) ))/av_thvu(i) 1267 ENDDO 1268 C 1269 C Filter out bad wakes 1270 1271 DO k = 1,klev 1272 DO i=1,klon 1273 IF ( wape(i) .LT. 0.) THEN 1274 deltatw(i,k) = 0. 1275 deltaqw(i,k) = 0. 1276 dth(i,k) = 0. 1277 ENDIF 1278 ENDDO 1279 ENDDO 1280 c 1281 DO i=1,klon 1282 IF ( wape(i) .LT. 0.) THEN 1283 wape(i) = 0. 1284 Cstar(i) = 0. 1285 hw(i) = hwmin 1286 sigmaw(i) = max(sigmad,sigd_con(i)) 1287 fip(i) = 0. 1288 gwake(i) = .FALSE. 1289 ELSE 1290 Cstar(i) = stark*sqrt(2.*wape(i)) 1291 gwake(i) = .TRUE. 1292 ENDIF 1293 ENDDO 1294 1060 1295 ENDDO ! end sub-timestep loop 1061 1296 C … … 1065 1300 DO k = 1,klev 1066 1301 DO i=1,klon 1067 IF ( k .LE. kupper(i)-1) THEN1302 IF ( wk_adv(i) .AND. k .LE. kupper(i)-1) THEN 1068 1303 dtls(i,k) = dtls(i,k)/dtime 1069 1304 dqls(i,k) = dqls(i,k)/dtime … … 1111 1346 DO k =1,klev 1112 1347 DO i=1,klon 1348 IF ( wk_adv(i)) THEN 1113 1349 rho(i,k) = p(i,k)/(rd*te(i,k)) 1114 1350 IF(k .eq. 1) THEN … … 1125 1361 rhow(i,k) = p(i,k)/(rd*(te(i,k)+deltatw(i,k))) 1126 1362 dth(i,k) = deltatw(i,k)/ppi(i,k) 1363 ENDIF 1127 1364 ENDDO 1128 1365 ENDDO … … 1134 1371 1135 1372 DO i=1,klon 1373 IF ( wk_adv(i)) THEN 1136 1374 z(i) = 1. 1137 1375 dz(i) = 1. 1138 1376 sum_thvu(i) = thu(i,1)*(1.+eps*qu(i,1))*dz(i) 1139 1377 sum_dth(i) = 0. 1378 ENDIF 1140 1379 ENDDO 1141 1380 1142 1381 DO k = 1,klev 1143 1382 DO i=1,klon 1383 IF ( wk_adv(i)) THEN 1144 1384 dz(i) = -(amax1(ph(i,k+1),ptop(i))-ph(i,k))/(rho(i,k)*rg) 1145 1385 IF (dz(i) .GT. 0) THEN … … 1155 1395 sum_dqdwn(i) = sum_dqdwn(i) + dqdwn(i,k)*dz(i) 1156 1396 ENDIF 1157 ENDDO 1158 ENDDO 1159 c 1160 DO i=1,klon 1397 ENDIF 1398 ENDDO 1399 ENDDO 1400 c 1401 DO i=1,klon 1402 IF ( wk_adv(i)) THEN 1161 1403 hw0(i) = z(i) 1162 ENDDO 1163 c 1164 C 2.1 - WAPE and mean forcing computation 1404 ENDIF 1405 ENDDO 1406 c 1407 C - WAPE and mean forcing computation 1165 1408 C------------------------------------------------------------- 1166 1409 … … 1168 1411 1169 1412 DO i=1, klon 1413 IF ( wk_adv(i)) THEN 1170 1414 av_thu(i) = sum_thu(i)/hw0(i) 1171 1415 av_tu(i) = sum_tu(i)/hw0(i) … … 1181 1425 $ + eps*(av_thu(i)*av_dq(i)+av_dth(i)*av_qu(i)+ 1182 1426 $ av_dth(i)*av_dq(i) ))/av_thvu(i) 1183 ENDDO 1184 1185 C 2.2 Prognostic variable update 1427 ENDIF 1428 ENDDO 1429 1430 C Prognostic variable update 1186 1431 C ------------------------------------------------------------ 1187 1432 … … 1190 1435 DO k = 1,klev 1191 1436 DO i=1,klon 1192 IF ( w ape2(i) .LT. 0.) THEN1437 IF ( wk_adv(i) .AND. wape2(i) .LT. 0.) THEN 1193 1438 deltatw(i,k) = 0. 1194 1439 deltaqw(i,k) = 0. … … 1200 1445 1201 1446 DO i=1, klon 1202 IF ( wape2(i) .LT. 0.) THEN 1447 IF ( wk_adv(i)) THEN 1448 IF ( wape2(i) .LT. 0.) THEN 1203 1449 wape2(i) = 0. 1204 1450 Cstar2(i) = 0. … … 1212 1458 gwake(i) = .TRUE. 1213 1459 ENDIF 1460 ENDIF 1214 1461 ENDDO 1215 1462 c 1216 1463 DO i=1, klon 1464 IF ( wk_adv(i)) THEN 1217 1465 ktopw(i) = ktop(i) 1466 ENDIF 1218 1467 ENDDO 1219 1468 c 1220 1469 DO i=1, klon 1221 IF (ktopw(i) .gt. 0 .and. gwake(i)) then 1470 IF ( wk_adv(i)) THEN 1471 IF (ktopw(i) .gt. 0 .and. gwake(i)) then 1222 1472 1223 1473 Cjyg1 Utilisation d'un h_efficace constant ( ~ feeding layer) … … 1234 1484 FIP(i) = 0. 1235 1485 ENDIF 1486 ENDIF 1236 1487 ENDDO 1237 1488 c … … 1241 1492 C alors il disparait en se mélangeant à la partie undisturbed 1242 1493 c 1494 sigmaw_max = 0.9 1243 1495 DO k = 1,klev 1244 1496 DO i=1, klon 1245 IF ((sigmaw(i).GT.0.9).or. 1497 c correction NICOLAS $ ((wape(i).ge.wape2(i)).and.(wape2(i).le.1.0))) THEN 1498 ! print*,'wape wape2 ktopw OK_qx_qw =', 1499 ! $ wape(i),wape2(i),ktopw(i),OK_qx_qw(i) 1500 IF ((sigmaw(i).GT.sigmaw_max).or. 1246 1501 $ ((wape(i).ge.wape2(i)).and.(wape2(i).le.1.0)).or. 1247 $ (ktopw(i).le.2)) THEN 1502 $ (ktopw(i).le.2) .OR. 1503 $ .not. OK_qx_qw(i)) THEN 1248 1504 cIM cf NR/JYG 251108 $ ((wape(i).ge.wape2(i)).and.(wape2(i).le.1.0))) THEN 1249 1505 ccc IF (sigmaw(i).GT.0.9) THEN … … 1257 1513 c 1258 1514 DO i=1, klon 1259 IF ((sigmaw(i).GT.0.9).or. 1260 $ ((wape(i).ge.wape2(i)).and.(wape2(i).le.1.0))) THEN 1515 IF ( (sigmaw(i).GT.sigmaw_max).or. 1516 $ ((wape(i).ge.wape2(i)).and.(wape2(i).le.1.0)).or. 1517 $ (ktopw(i).le.2) .OR. 1518 $ .not. OK_qx_qw(i)) THEN 1519 ! correction NICOLAS $ ((wape(i).ge.wape2(i)).and.(wape2(i).le.1.0))) THEN 1261 1520 ccc IF (sigmaw(i).GT.0.9) THEN 1262 1521 wape(i) = 0. … … 1272 1531 RETURN 1273 1532 END 1533 1534 SUBROUTINE wake_vec_modulation(nlon,nl,wk_adv,qe,d_qe, 1535 $ deltaqw,d_deltaqw,sigmaw,d_sigmaw,alpha) 1536 c------------------------------------------------------ 1537 cDtermination du coefficient alpha tel que les tendances 1538 c corriges alpha*d_G, pour toutes les grandeurs G, correspondent 1539 c a une humidite positive dans la zone (x) et dans la zone (w). 1540 c------------------------------------------------------ 1541 c 1542 1543 c Input 1544 REAL qe(nlon,nl),d_qe(nlon,nl) 1545 REAL deltaqw(nlon,nl),d_deltaqw(nlon,nl) 1546 REAL sigmaw(nlon),d_sigmaw(nlon) 1547 LOGICAL wk_adv(nlon) 1548 INTEGER nl,nlon 1549 c Output 1550 REAL alpha(nlon) 1551 c Internal variables 1552 REAL alpha1(nlon) 1553 REAL x,a,b,c,discrim,zeta(nlon) 1554 REAL epsilon 1555 DATA epsilon/1.e-15/ 1556 c 1557 DO k=1,nl 1558 DO i = 1,nlon 1559 IF (wk_adv(i)) THEN 1560 IF ((deltaqw(i,k)+d_deltaqw(i,k)).ge.0.) then 1561 zeta(i)=0. 1562 ELSE 1563 zeta(i)=1. 1564 END IF 1565 ENDIF 1566 ENDDO 1567 DO i = 1,nlon 1568 IF (wk_adv(i)) THEN 1569 x = qe(i,k)+(zeta(i)-sigmaw(i))*deltaqw(i,k) 1570 $ +d_qe(i,k)+(zeta(i)-sigmaw(i))*d_deltaqw(i,k) 1571 $ -d_sigmaw(i)*(deltaqw(i,k)+d_deltaqw(i,k)) 1572 a=-d_sigmaw(i)*d_deltaqw(i,k) 1573 b=d_qe(i,k)+(zeta(i)-sigmaw(i))*d_deltaqw(i,k) 1574 $ -deltaqw(i,k)*d_sigmaw(i) 1575 c=qe(i,k)+(zeta(i)-sigmaw(i))*deltaqw(i,k)-epsilon 1576 ! c=qe(i,k)+(zeta(i)-sigmaw(i))*deltaqw(i,k) 1577 1578 discrim=b*b-4.*a*c 1579 ! print*,'ZETA *********************' 1580 ! print*,'zeta sigmaw ',zeta(:) 1581 ! print*,'SIGMA *********************' 1582 ! print*,'sigmaw ',sigmaw(:) 1583 1584 ! print*,' x ************************' 1585 ! print*,'x ',x 1586 ! print*,' a+b ************************' 1587 ! print*,'a+b ',a+b 1588 1589 ! print*,'a b c delta zeta ',a,b,c,discrim 1590 IF (a+b .GE. 0.) THEN 1591 alpha1(i)=1. 1592 ELSE 1593 IF (x .GE. 0.) THEN 1594 alpha1(i)=1. 1595 ELSE 1596 ! IF (a .GE. 0.) THEN 1597 IF (a .GT. 0.) THEN 1598 ! print*,'a b c delta zeta ',a,b,c,discrim,zeta(i) 1599 ! print*,'-b+sqrt(discrim) ',-b+sqrt(discrim) 1600 alpha1(i)=0.9*min( (2.*c)/(-b+sqrt(discrim)), 1601 $ (-b+sqrt(discrim))/(2.*a) ) 1602 ELSE IF (a.eq.0.) THEN 1603 alpha1(i)=0.9*(-c/b) 1604 ELSE 1605 ! print*,'a b c delta zeta ',a,b,c,discrim,zeta(i) 1606 ! print*,'-b+sqrt(discrim) ',-b+sqrt(discrim) 1607 alpha1(i)=0.9*max( (2.*c)/(-b+sqrt(discrim)), 1608 $ (-b+sqrt(discrim))/(2.*a) ) 1609 ENDIF 1610 ENDIF 1611 ENDIF 1612 ENDIF 1613 ENDDO 1614 ENDDO 1615 c 1616 DO i = 1,nlon 1617 IF (wk_adv(i)) THEN 1618 alpha(i) = min(alpha(i),alpha1(i)) 1619 ENDIF 1620 ENDDO 1621 c 1622 return 1623 end 1624 1274 1625 Subroutine WAKE_scal (p,ph,ppi,dtime,sigd_con 1275 1626 : ,te0,qe0,omgb … … 2315 2666 C alors il disparait en se mélangeant à la partie undisturbed 2316 2667 2668 ! correction NICOLAS . ((wape.ge.wape2).and.(wape2.le.1.0))) THEN 2317 2669 IF ((sigmaw.GT.0.9).or. 2318 2670 . ((wape.ge.wape2).and.(wape2.le.1.0)).or.(ktopw.le.2)) THEN -
LMDZ4/trunk/libf/phylmd/write_histrac.h
r1030 r1146 3 3 ! 4 4 5 IF ( config_inca == 'none') THEN5 IF (ecrit_tra>0. .AND. config_inca == 'none') THEN 6 6 ndex = 0 7 7 ndex2d = 0 … … 14 14 CALL histwrite_phy(nid_tra,"aire",itau_w,airephy) 15 15 16 DO it=1,n qmax17 C champs 2D 16 DO it=1,nbtr 17 iiq=niadv(it+2) 18 18 19 20 CALL histwrite_phy(nid_tra,tnom(it+2),itau_w,tr_seri(:,:,it)) 19 CALL histwrite_phy(nid_tra,tname(iiq),itau_w,tr_seri(:,:,it)) 21 20 if (lessivage) THEN 22 CALL histwrite_phy(nid_tra,"fl"//tn om(it+2),itau_w,21 CALL histwrite_phy(nid_tra,"fl"//tname(iiq),itau_w, 23 22 . flestottr(:,:,it)) 24 23 endif 25 24 26 25 c----Olivia 27 CALL histwrite_phy(nid_tra,"d_tr_th_"//tn om(it+2),itau_w,26 CALL histwrite_phy(nid_tra,"d_tr_th_"//tname(iiq),itau_w, 28 27 . d_tr_th(:,:,it)) 29 28 30 29 if(iflag_con.GE.2) then 31 CALL histwrite_phy(nid_tra,"d_tr_cv_"//tn om(it+2),itau_w,30 CALL histwrite_phy(nid_tra,"d_tr_cv_"//tname(iiq),itau_w, 32 31 . d_tr_cv(:,:,it)) 33 32 endif !(iflag_con.GE.2) then 34 CALL histwrite_phy(nid_tra,"d_tr_cl_"//tn om(it+2),itau_w,33 CALL histwrite_phy(nid_tra,"d_tr_cl_"//tname(iiq),itau_w, 35 34 . d_tr_cl(:,:,it)) 36 35 c---fin Olivia … … 79 78 endif 80 79 81 END IF 80 END IF !ecrit_tra>0. .AND. config_inca == 'none' 82 81 83 82 -
LMDZ4/trunk/makegcm
r1018 r1146 11 11 set phys="PHYS=$physique" 12 12 set include='-I$(LIBF)/grid -I$(LIBF)/bibio -I$(LIBF)/filtrez -I. ' 13 set ntrac = 414 13 set filtre=filtrez 15 14 set grille=reg … … 38 37 #setenv LIBOGCM $LMDGCM/libo 39 38 set INCALIB=../INCA3/config/lib 40 #set LMDGCM="`pwd`"41 #setenv LIBOGCM $LMDGCM/libo39 set LMDGCM="`pwd`" 40 setenv LIBOGCM $LMDGCM/libo 42 41 #set LMDGCM=/d4/fairhead/V4/ 43 42 #setenv LIBOGCM $LMDGCM/libo … … 48 47 #setenv NCDFINC /distrib/local/netcdf/pgi_32bits/include 49 48 #setenv NCDFLIB /distrib/local/netcdf/pgi_32bits/lib/ 50 #setenv IOIPSLDIR /d4/fairhead/Install_LMDZ4_FH/LMDZ4preV4/modipsl/lib/51 #setenv MODIPSLDIR /d4/fairhead/Install_LMDZ4_FH/LMDZ4preV4/modipsl/lib/52 #setenv NCDFINC /d4/fairhead/Install_LMDZ4_FH/LMDZ4preV4/netcdf-3.6.1/include53 #setenv NCDFLIB /d4/fairhead/Install_LMDZ4_FH/LMDZ4preV4/netcdf-3.6.1/lib49 setenv IOIPSLDIR /d4/fairhead/Install_LMDZ4_FH/LMDZ4preV4/modipsl/lib/ 50 setenv MODIPSLDIR /d4/fairhead/Install_LMDZ4_FH/LMDZ4preV4/modipsl/lib/ 51 setenv NCDFINC /d4/fairhead/Install_LMDZ4_FH/LMDZ4preV4/netcdf-3.6.1/include 52 setenv NCDFLIB /d4/fairhead/Install_LMDZ4_FH/LMDZ4preV4/netcdf-3.6.1/lib 54 53 55 54 … … 207 206 set optim90="-Wp'-P' -DCRAY -p$IOIPSLDIR "'-p$(LIBO) -eiv ' 208 207 set optim="$optim90" 209 set oplink="-Wl'-DSTACK=128 -f indef' -L$IOIPSLDIR -lioipsl -L$NCDFLIB -lnetcdf " 208 if ( $io == "ioipsl" ) then 209 set oplink="-Wl'-DSTACK=128 -f indef' -L$IOIPSLDIR -lioipsl -L$NCDFLIB -lnetcdf " 210 else 211 set oplink="-Wl'-DSTACK=128 -f indef' -L$IOIPSLDIR -L$NCDFLIB -lnetcdf " 212 endif 210 213 set mod_loc_dir=" " 211 214 set mod_suffix=" " … … 217 220 set optim90=" -fast -fixed " 218 221 set optimtru90=" -fast -free " 219 set opt_link="-lf77compat -L$MODIPSLDIR -lsechiba -lparameters -lstomate -lioipsl -L$NCDFLIB -lnetcdf " 222 if ( $io == "ioipsl" ) then 223 set opt_link="-lf77compat -L$MODIPSLDIR -lsechiba -lparameters -lstomate -lioipsl -L$NCDFLIB -lnetcdf " 224 else 225 set opt_link="-lf77compat -L$MODIPSLDIR -lsechiba -lparameters -lstomate -L$NCDFLIB -lnetcdf " 226 endif 220 227 set mod_loc_dir=$localdir 221 228 set mod_suffix=mod … … 271 278 set optim="$optim90" 272 279 set optimbis=" " 273 set opt_link=" -C hopt -float0 -ew -P static -L$MODIPSLDIR -lioipsl $NCDFLIB -lnetcdf_i8r8_v " 280 if ( $io == "ioipsl" ) then 281 set opt_link=" -C hopt -float0 -ew -P static -L$MODIPSLDIR -lioipsl $NCDFLIB -lnetcdf_i8r8_v " 282 else 283 set opt_link=" -C hopt -float0 -ew -P static -L$MODIPSLDIR $NCDFLIB -lnetcdf_i8r8_v " 284 endif 274 285 set mod_loc_dir="." 275 286 set mod_suffix="mod" … … 365 376 -d imxjmxlm ou im, jm, et lm sont resp. le nombre de longitudes, latitudes 366 377 et couches verticales. 367 368 -t ntrac selectionne le nombre de traceur advectes par la dynamique. 369 Dans les versions courantes du modele terrestre on a par exemple 370 ntrac=2 pour l'eau vapeur et liquide 371 372 L'effet des options -d et -t est d'ecraser le fichier 378 L'effet des options -d est d'ecraser le fichier 373 379 $LMDGCM/libf/grid/dimensions.h 374 qui contient sous forme de 4 PARAMETER FORTRAN les 3 dimensions 375 de la grille horizontale im, jm, lm plus le nombre de traceurs 376 advectes passivement par la dynamique ntrac, par un nouveu fichier 377 $LMDGCM/libf/grid/dimension/dimensions.im.jm.lm.tntrac 380 qui contient sous forme de 3 PARAMETER FORTRAN les 3 dimensions 381 de la grille horizontale im, jm et verticale lm, par un nouveu fichier 382 $LMDGCM/libf/grid/dimension/dimensions.im.jm.lm 378 383 Si ce fichier n'existe pas encore, il est cree par le script 379 384 $LMDGCM/libf/grid/dimension/makdim … … 472 477 set parallel="$2" ; shift ; shift ; goto top 473 478 474 case -t475 set ntrac=$2 ; shift ; shift ; goto top476 477 479 case -include 478 480 set include="$include -I$2" ; shift ; shift ; goto top … … 543 545 set phys="L_PHY= LIBPHY=" 544 546 else 545 set cppflags="$cppflags -DCPP_PHYS" 547 #Default planet type is Earth 548 set cppflags="$cppflags -DCPP_EARTH" 546 549 endif 547 550 … … 581 584 if ( "$physique" == 'nophys' ) then 582 585 set phys="L_PHY= LIBPHY=" 583 endif584 585 ########################################################################586 # choix du nombre de traceur par defaut si il n'a pas ete choisi,587 # suivant la physique588 ########################################################################589 590 if ( $ntrac == 0 ) then591 if ( "$physique" == 'nophys' ) then592 set ntrac=1593 else if ( "$physique" == 'lmd' ) then594 set ntrac=2595 else if ( "$physique" == 'lmd_test_li' ) then596 set ntrac=2597 else if ( "$physique" == 'ec' ) then598 set ntrac=1599 else600 set ntrac = 1601 endif602 586 endif 603 587 … … 631 615 set dim=`echo $dim | sed -e 's/[^0-9]/ /g'` 632 616 endif 633 set nomlib=${nomlib}${physique}_${dim_}_ t${ntrac}_$grille617 set nomlib=${nomlib}${physique}_${dim_}_$grille 634 618 ## M-A-F nomlib trop long sur CRAY pour ar 635 619 if ( $CRAY ) then 636 set nomlib=F90_${dim_} _t${ntrac}620 set nomlib=F90_${dim_} 637 621 endif 638 622 if ( $NEC || $XNEC || $X6NEC || $X8BRODIE ) then 639 set nomlib=F90_${dim_}_ t${ntrac}_'phy'${physique}${FLAG_PARA}623 set nomlib=F90_${dim_}_'phy'${physique}${FLAG_PARA} 640 624 endif 641 625 echo calcul de la dimension … … 664 648 ######################################################################## 665 649 # Gestion des dimensions du modele. 666 # on cree ou remplace le fichier des dimensions /nombre de traceur650 # on cree ou remplace le fichier des dimensions 667 651 ######################################################################## 668 652 … … 682 666 683 667 cd dimension 684 ./makdim $ ntrac $dim668 ./makdim $dim 685 669 cat $libf/grid/dimensions.h 686 670 … … 714 698 ###################################################################### 715 699 716 if ( -f $libf/phy$physique/raddim.h ) then717 if ( -f $libf/phy$physique/raddim.$dimh.h ) then718 \rm -f $libf/phy$physique/raddim.h719 cp -p $libf/phy$physique/raddim.$dimh.h $libf/phy$physique/raddim.h720 echo $libf/phy$physique/raddim.$dimh.h721 cat $libf/phy$physique/raddim.$dimh.h722 cat $libf/phy$physique/raddim.h723 else724 echo On peut diminuer la taille de l executable en creant725 echo le fichier $libf/phy$physique/raddim.$dimh.h726 \cp -p $libf/phy$physique/raddim.defaut.h $libf/phy$physique/raddim.h727 endif728 endif700 #if ( -f $libf/phy$physique/raddim.h ) then 701 # if ( -f $libf/phy$physique/raddim.$dimh.h ) then 702 # \rm -f $libf/phy$physique/raddim.h 703 # cp -p $libf/phy$physique/raddim.$dimh.h $libf/phy$physique/raddim.h 704 # echo $libf/phy$physique/raddim.$dimh.h 705 # cat $libf/phy$physique/raddim.$dimh.h 706 # cat $libf/phy$physique/raddim.h 707 # else 708 # echo On peut diminuer la taille de l executable en creant 709 # echo le fichier $libf/phy$physique/raddim.$dimh.h 710 # \cp -p $libf/phy$physique/raddim.defaut.h $libf/phy$physique/raddim.h 711 # endif 712 #endif 729 713 730 714 ###################################################################### … … 822 806 set f90=$FC_LINUX 823 807 if ( $FC_LINUX == 'pgf90' ) then 824 set opt_link=" -L$MODIPSLDIR $link_veget -L$NCDFLIB -lioipsl -lnetcdf " 808 if ( $io == "ioipsl" ) then 809 set opt_link=" -L$MODIPSLDIR $link_veget -L$NCDFLIB -lioipsl -lnetcdf " 810 else 811 set opt_link=" -L$MODIPSLDIR $link_veget -L$NCDFLIB -lnetcdf " 812 endif 825 813 else if ($FC_LINUX == 'g95') then 826 set opt_link="-L$MODIPSLDIR $link_veget -lioipsl -L$NCDFLIB -lnetcdf -lioipsl -lnetcdf " 814 if ( $io == "ioipsl" ) then 815 set opt_link="-L$MODIPSLDIR $link_veget -lioipsl -L$NCDFLIB -lnetcdf -lioipsl -lnetcdf " 816 else 817 set opt_link="-L$MODIPSLDIR $link_veget -lioipsl -L$NCDFLIB -lnetcdf -lnetcdf " 818 endif 827 819 else 828 820 set opt_link=" " … … 833 825 set f77=f90 834 826 set f90=f90 835 set opt_link="-lf77compat -L$MODIPSLDIR $link_veget -lioipsl -L$NCDFLIB -lnetcdf " 827 if ( $io == "ioipsl" ) then 828 set opt_link="-lf77compat -L$MODIPSLDIR $link_veget -lioipsl -L$NCDFLIB -lnetcdf " 829 else 830 set opt_link="-lf77compat -L$MODIPSLDIR $link_veget -L$NCDFLIB -lnetcdf " 831 endif 836 832 ################# 837 833 else if $NEC then -
LMDZ4/trunk/physiq.def
r541 r1146 1 1 # 2 # $Header$ 2 ## $Header: /home/ioipsl/CVSROOT/IPSLCM4_v1/EXP00/physiq.def,v 1.1.2.3 3 2004/01/23 16:45:45 adm Exp $ 3 4 # 5 # 6 # Automatically generated make config: don t edit 7 # 8 type_ocean=force 9 # avec ou sans orchidee 10 VEGET=n 11 #type_run = AMIP, ENSP, clim 12 type_run=AMIP 13 # 14 # Controle des sorties 15 # sorties moyennees tous les jours dans histday.nc 16 OK_journe=y 17 # sorties moyennees tous les mois dans histmth.nc 18 OK_mensuel=y 19 # sorties moyennees toutes les 6 ou bien 3h dans histhf.nc 20 ok_hf=n 21 # sorties moyennees tous les pas de temps de la physique dans histins.nc 22 OK_instan=n 23 # 24 ecrit_mth=30. 25 ecrit_day=1. 26 ecrit_hf=0.25 27 # 28 #niveau de sortie "hf" lev_histhf 29 lev_histhf=4 30 #niveau de sortie "day" lev_histday 31 lev_histday=5 32 #niveau de sortie "mth" lev_histmth 33 lev_histmth=4 4 34 5 OCEAN=force 6 VEGET=y 7 OK_journe=n 8 OK_mensuel=y 9 OK_instan=n 35 # parametres KE 10 36 if_ebil=0 11 #12 # parametres KE13 #14 37 epmax = .99 15 38 ok_adj_ema = n … … 17 40 # 18 41 # parametres nuages 19 # 20 cld_lc_lsc = 0.00026 21 cld_lc_con = 0.00026 42 cld_lc_lsc = 2.6e-4 43 cld_lc_con = 2.6e-4 22 44 cld_tau_lsc = 3600. 23 45 cld_tau_con = 3600. 24 46 ffallv_lsc = 1. 25 47 ffallv_con = 1. 26 coef_eva = 0.0000248 coef_eva = 2.e-5 27 49 reevap_ice = y 28 50 iflag_cldcon = 3 29 51 iflag_pdf = 1 30 52 fact_cldcon = 1. 31 #facttemps = 1.e-4 32 facttemps = 0.0001 53 facttemps = 1.e-4 33 54 ok_newmicro = y 55 iflag_ratqs=0 34 56 ratqsbas = 0.005 35 57 ratqshaut = 0.33 … … 37 59 rad_chau1=12 38 60 rad_chau2=11 39 #ksta_ter=1.e-7 40 ksta_ter=0.0000001 41 # 42 # parametres outputs 43 # 44 #niveau de sortie "hf" lev_histhf avec 45 # - lev_histhf=3 => defaut 46 # - lev_histhf=4 => histhf3d.nc champs 3d niveaux modele 47 lev_histhf=3 48 #niveau de sortie "day" lev_histday 49 # - lev_histday=2 => defaut 50 # - lev_histday=3 => + champs 3D => F. Lott 51 # - lev_histday=4 => + champs sous-surfaces 52 lev_histday=2 53 #niveau de sortie "mth" lev_histmth avec 54 # - lev_histmth=2 => defaut 55 # - lev_histmth=3 => albedo, rugosite sous-surfaces 56 # - lev_histmth=4 => champs tendances 3d 57 lev_histmth=2 61 ksta_ter=1.e-7 62 ksta=1.e-10 63 #ok_kzmin : calcul Kzmin dans la CL de surface 64 ok_kzmin=y 58 65 # 59 66 # parametres climatique 60 #61 67 R_ecc = 0.016715 62 68 R_peri = 102.7 … … 64 70 solaire = 1365. 65 71 co2_ppm = 348. 72 #RCO2 = co2_ppm * 1.0e-06 * 44.011/28.97 73 #RCO2 = 348. * 1.0e-06 * 44.011/28.97 74 #RCO2 = 5.286789092164308E-04 75 #RCO2 = 425.43e-06 66 76 CH4_ppb = 1650. 77 #RCH4 = 1.65E-06* 16.043/28.97 78 #RCH4 = 9.137366240938903E-07 67 79 N2O_ppb = 306. 80 #RN2O = 306.E-09* 44.013/28.97 81 #RN2O = 4.648939592682085E-07 68 82 CFC11_ppt = 280. 83 #RCFC11 = 280.E-12* 137.3686/28.97 84 #RCFC11 = 1.327690990680013E-09 69 85 CFC12_ppt = 484. 86 #RCFC12 = 484.E-12* 120.9140/28.97 87 #RCFC12 = 2.020102726958923E-09 88 # 89 # effets direct et indirect des aerosols 90 ok_ade=n 91 ok_aie=n 92 bl95_b0=1.7 93 bl95_b1=0.2 70 94 # 71 95 # parametres simulateur ISCCP 72 # 73 top_height = 3 96 #ok_isccp : y/n avec/sans simulateur ISCCP 97 ok_isccp=n 98 #top_height = 1 ou 3 99 top_height = 1 74 100 #overlap = 1, 2 ou 3 75 101 overlap = 3 76 102 #cdmmax 77 #cdmmax = 2.5E-3 78 cdmmax = 0.0025 103 cdmmax = 2.5E-3 79 104 #cdhmax 80 #cdhmax = 2.0E-3 81 cdhmax = 0.002 105 cdhmax = 2.0E-3 106 # 107 #ok_regdyn : y/n calcul/non des regymes dynamiques sur regions pre-definies 108 ok_regdyn=y 109 # 110 # Flag pour la convection (1 pour LMD, 2 pour Tiedtke, 3 KE nouvelle physique, 30 KE IPCC) 111 iflag_con=30 112 # 113 # activation thermiques wake, ... 114 iflag_thermals = 0 115 nsplit_thermals =1 116 tau_thermals=1800. 82 117 iflag_pbl = 1 83 iflag_thermals = 0 118 iflag_coupl=0 119 iflag_wake=0 120 iflag_clos=0 121 iflag_mix=1 122 qqa1=0. 123 qqa2=1. -
LMDZ4/trunk/run.def
r524 r1146 1 #2 # $Header$3 #4 1 INCLUDEDEF=physiq.def 5 2 INCLUDEDEF=gcm.def 6 3 INCLUDEDEF=orchidee.def 4 INCLUDEDEF=output.def 7 5 ## Jour de l'etat initial ( = 350 si 20 Decembre ,par expl. ,comme ici ) 8 6 dayref=1 9 7 ## Annee de l'etat initial ( avec 4 chiffres ) 10 anneeref=19 798 anneeref=1980 11 9 ## Nombre de jours d'integration 12 10 nday=1 13 11 ## periode de sortie des variables de controle (en pas) 14 iconser= 512 iconser=240 15 13 ## periode d'ecriture du fichier histoire (en jour) 16 14 iecri=1 17 ## periode de stockage fichier histmoy (en jour)18 periodav=1. 19 ## unite de sortie des impressions20 lunout=7 15 ## flag de sortie dynzon 16 ok_dynzon=n 17 ## periode de stockage fichier dynzon (en jour) 18 periodav=30.
Note: See TracChangeset
for help on using the changeset viewer.