Changeset 117 for trunk/mars/libf/phymars
- Timestamp:
- May 10, 2011, 6:33:29 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mars/libf/phymars/newsedim.F
r38 r117 67 67 68 68 69 70 69 c ** un petit test de coherence 71 70 c -------------------------- … … 138 137 k=0 139 138 139 w(ig,l) = 0. !! JF+AS ajout initialisation 140 140 c ************************************************************** 141 141 c Simple Method 142 w(ig,l) = 143 & (1- exp(-dztop*g/(r*pt(ig,l))))*pplev(ig,l) / g 144 cc write(*,*) 'OK simple method l,w =', l, w(ig,l) 145 cc write(*,*) 'OK simple method dztop =', dztop 142 143 cc w(ig,l) = 144 cc & (1.- exp(-dztop*g/(r*pt(ig,l))))*pplev(ig,l) / g 145 cccc write(*,*) 'OK simple method l,w =', l, w(ig,l) 146 cccc write(*,*) 'OK simple method dztop =', dztop 147 148 w(ig,l) = 1. - exp(-dztop*g/(r*pt(ig,l))) 149 !!! Diagnostic: JF. Fix: AS. Date: 05/11 150 !!! Probleme arrondi avec la quantite ci-dessus 151 !!! ---> vaut 0 pour -dztop*g/(r*pt(ig,l)) trop petit 152 !!! ---> dans ce cas on utilise le developpement limite ! 153 !!! ---> exp(-x) = 1 - x lorsque x --> 0 avec une erreur de x^2 / 2 154 IF ( w(ig,l) .eq. 0. ) THEN 155 w(ig,l) = ( dztop*g/(r*pt(ig,l)) ) * pplev(ig,l) / g 156 ELSE 157 w(ig,l) = w(ig,l) * pplev(ig,l) / g 158 ENDIF 159 160 146 161 c ************************************************************** 147 162 cccc Complex method : 148 if (dztop.gt.epaisseur(ig,l)) then 163 if (dztop.gt.epaisseur(ig,l)) then !!!if on traverse plus d'une couche 149 164 cccc Cas ou on "epuise" la couche l : On calcule le flux 150 165 cccc Venant de dessus en tenant compte de la variation de Vstokes 151 166 c ************************************************************** 152 167 Ep= epaisseur(ig,l) 153 168 Stra= traversee(ig,l) … … 159 174 enddo 160 175 Ep = Ep - epaisseur(ig,l+k) 161 end if 162 ptop=pplev(ig,l+k)*exp(-(dztop-Ep)*g/(r*pt(ig,l+k))) 163 w(ig,l) = (pplev(ig,l) -Ptop)/g 164 c 176 !ptop=pplev(ig,l+k)*exp(-(dztop-Ep)*g/(r*pt(ig,l+k))) 177 178 !!! JF+AS 05/11 Probleme arrondi potentiel, meme solution que ci-dessus 179 ptop=exp(-(dztop-Ep)*g/(r*pt(ig,l+k))) 180 IF ( ptop .eq. 1. ) THEN 181 PRINT*, 'exposant trop petit ', ig, l 182 ptop=pplev(ig,l+k) * ( 1. - (dztop-Ep)*g/(r*pt(ig,l+k))) 183 ELSE 184 ptop=pplev(ig,l+k) * ptop 185 ENDIF 186 w(ig,l) = (pplev(ig,l) - Ptop)/g 187 188 endif !!!!!if complex method 189 190 165 191 cc write(*,*) 'OK new method l,w =', l, w(ig,l) 166 192 cc write(*,*) 'OK new method dztop =', dztop … … 171 197 cc if(l.eq.8)write(*,*)'l=8,k, w',k, w(1,l) 172 198 c ************************************************************** 199 200 173 201 end do 174 202 end do
Note: See TracChangeset
for help on using the changeset viewer.