Changeset 1520 for LMDZ5/trunk/libf/dyn3dpar/disvert.F90
- Timestamp:
- May 23, 2011, 1:37:09 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/dyn3dpar/disvert.F90
r1492 r1520 1 1 ! $Id$ 2 2 3 SUBROUTINE disvert(pa, preff, ap, bp, dpres, presnivs, nivsigs, nivsig)3 SUBROUTINE disvert(pa,preff,ap,bp,dpres,presnivs,nivsigs,nivsig,scaleheight) 4 4 5 5 ! Auteur : P. Le Van … … 17 17 ! ds(l) : distance entre les couches l et l-1 en coord.s 18 18 19 REAL pa, preff 20 REAL ap(llmp1), bp(llmp1), dpres(llm), nivsigs(llm), nivsig(llmp1) 21 REAL presnivs(llm) 19 real,intent(in) :: pa, preff 20 real,intent(out) :: ap(llmp1), bp(llmp1) 21 real,intent(out) :: dpres(llm), nivsigs(llm), nivsig(llmp1) 22 real,intent(out) :: presnivs(llm) 23 real,intent(out) :: scaleheight 22 24 23 25 REAL sig(llm+1), dsig(llm) … … 26 28 INTEGER l 27 29 REAL dsigmin 28 REAL alpha, beta, deltaz, h30 REAL alpha, beta, deltaz,scaleheight 29 31 INTEGER iostat 30 REAL pi, x 32 REAL x 33 character(len=*),parameter :: modname="disvert" 31 34 32 35 !----------------------------------------------------------------------- 33 36 34 pi = 2 * ASIN(1.) 37 ! default scaleheight is 8km for earth 38 scaleheight=8. 35 39 36 40 OPEN(99, file='sigma.def', status='old', form='formatted', iostat=iostat) … … 38 42 IF (iostat == 0) THEN 39 43 ! cas 1 on lit les options dans sigma.def: 40 READ(99, *) h! hauteur d'echelle 8.44 READ(99, *) scaleheight ! hauteur d'echelle 8. 41 45 READ(99, *) deltaz ! epaiseur de la premiere couche 0.04 42 46 READ(99, *) beta ! facteur d'acroissement en haut 1.3 … … 44 48 READ(99, *) k1 ! nombre de couches dans la transition haute 45 49 CLOSE(99) 46 alpha=deltaz/(llm*h) 47 write(lunout, *)'h, alpha, k0, k1, beta' 50 alpha=deltaz/(llm*scaleheight) 51 write(lunout, *)trim(modname),':scaleheight, alpha, k0, k1, beta', & 52 scaleheight, alpha, k0, k1, beta 48 53 49 54 alpha=deltaz/tanh(1./k0)*2. … … 51 56 sig(1)=1. 52 57 do l=1, llm 53 sig(l+1)=(cosh(l/k0))**(-alpha*k0/h) & 54 *exp(-alpha/h*tanh((llm-k1)/k0)*beta**(l-(llm-k1))/log(beta)) 55 zk=-h*log(sig(l+1)) 58 sig(l+1)=(cosh(l/k0))**(-alpha*k0/scaleheight) & 59 *exp(-alpha/scaleheight*tanh((llm-k1)/k0) & 60 *beta**(l-(llm-k1))/log(beta)) 61 zk=-scaleheight*log(sig(l+1)) 56 62 57 63 dzk1=alpha*tanh(l/k0) … … 73 79 dsigmin=1. 74 80 else 75 WRITE(LUNOUT,*) 'ATTENTION discretisation z a ajuster' 81 write(lunout,*) trim(modname), & 82 ' ATTENTION discretisation z a ajuster' 76 83 dsigmin=1. 77 84 endif 78 WRITE(LUNOUT,*) 'Discretisation verticale DSIGMIN=',dsigmin 85 write(lunout,*) trim(modname), & 86 ' Discretisation verticale DSIGMIN=',dsigmin 79 87 endif 80 88 … … 119 127 ap(llmp1) = pa * ( sig(llmp1) - bp(llmp1) ) 120 128 121 write(lunout, *) 'BP '129 write(lunout, *) trim(modname),': BP ' 122 130 write(lunout, *) bp 123 write(lunout, *) 'AP '131 write(lunout, *) trim(modname),': AP ' 124 132 write(lunout, *) ap 125 133 126 134 write(lunout, *) 'Niveaux de pressions approximatifs aux centres des' 127 135 write(lunout, *)'couches calcules pour une pression de surface =', preff 128 write(lunout, *) 'et altitudes equivalentes pour une hauteur d echelle de '129 write(lunout, *) '8km'136 write(lunout, *) 'et altitudes equivalentes pour une hauteur d echelle de ' 137 write(lunout, *) scaleheight,' km' 130 138 DO l = 1, llm 131 139 dpres(l) = bp(l) - bp(l+1) 132 140 presnivs(l) = 0.5 *( ap(l)+bp(l)*preff + ap(l+1)+bp(l+1)*preff ) 133 141 write(lunout, *)'PRESNIVS(', l, ')=', presnivs(l), ' Z ~ ', & 134 log(preff/presnivs(l))* 8.&135 , ' DZ ~ ', 8.*log((ap(l)+bp(l)*preff)/ &142 log(preff/presnivs(l))*scaleheight & 143 , ' DZ ~ ', scaleheight*log((ap(l)+bp(l)*preff)/ & 136 144 max(ap(l+1)+bp(l+1)*preff, 1.e-10)) 137 145 ENDDO 138 146 139 write(lunout, *) 'PRESNIVS '147 write(lunout, *) trim(modname),': PRESNIVS ' 140 148 write(lunout, *) presnivs 141 149
Note: See TracChangeset
for help on using the changeset viewer.