- Timestamp:
- May 19, 2011, 5:05:39 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/chantiers/commit_importants.log
r119 r124 881 881 correction d'un certain nombre de bugs. 882 882 883 ********************* 884 **** commit_v123 **** 885 ********************* 886 887 Ehouarn: suite de l'implémentation de la discrétisation verticale 888 -> insertion flag 'hybrid' pour discretisation verticale en sigma/hybrid 889 dans disvert_noterre.F 890 -> ajout parametre 'scaleheight' (lu dans z2sig.def) dans comvert.h 891 -> quelques corrections de bug (en //), mais il faudra plus de travail 892 pour atteindre la concordance entre versions séq. et //. 893 -
trunk/chantiers/meschantiers-Ehouarn.txt
r8 r124 1 1 >>> choses à faire: 2 2 3 - En priorité: faire qu'on puisse compiler un/des cas test (sans physique) pour pouvoir tester les modifs au fur et à mesure. 3 - En priorité: faire qu'on puisse compiler un/des cas test (sans physique) pour pouvoir tester les modifs au fur et à mesure. OK, c'est fait, on peut compiler/tourner sans physique 4 4 5 5 - Uniformiser les mises à jour dyn séq. et // (commencé avec la rev. 8) … … 7 7 - Peut-être revoir l'interface dynamique/physique ? 8 8 9 - Attention à la discrétisation verticale ... 9 - Attention à la discrétisation verticale ... 10 10 -
trunk/documentation/disvert.tex
r109 r124 37 37 38 38 \vspace{1cm} 39 S\'ebastien Lebonnois 39 S\'ebastien Lebonnois, Ehouarn Millour 40 40 41 41 \vspace{1cm} … … 70 70 This is done only once, called at the beginning from \textsf{iniconst.F}. 71 71 72 In the Earth version the vertical coordinates are hybrid (sigma-pressure), 73 and generated automaticaly (or generated from parameters read from file 74 \textsf{sigma.def}, if that file is present in the directory where the 75 gcm is run). 76 77 In the planetary version, the vertical coordinates can be hybrid (default 78 behavior) or sigma (set using parameter "hybrid" in \textsf{run.def}; true 79 implies hybrid coordinate, false implies sigma coordinate). the distribution 80 of model levels is set from file \textsf{esasig.def} or \textsf{z2sig.def}, 81 depending on which is present (in the directory where the gcm is run). 82 The first line of the \textsf{z2sig.def} file should give the value of the 83 reference atmospheric scale height (in km), followed by the (rough estimate) 84 of the altitude (in km) of the atmospheric level (one per line of the file). 85 72 86 \item Interface pressures: 73 87 computed in \textsf{caldyn0.F, caldyn.F, integrd.F, leapfrog.F} -
trunk/libf/dyn3d/comvert.h
r109 r124 7 7 COMMON/comvert/ap(llm+1),bp(llm+1),presnivs(llm),dpres(llm), & 8 8 & pa,preff,nivsigs(llm),nivsig(llm+1), & 9 & aps(llm),bps(llm) 9 & aps(llm),bps(llm),scaleheight 10 10 11 11 REAL ap,bp,presnivs,dpres,pa,preff,nivsigs,nivsig,aps,bps 12 real scaleheight ! atmospheric (reference) scale height (km) 12 13 13 14 !----------------------------------------------------------------------- -
trunk/libf/dyn3d/disvert_noterre.F
r110 r124 4 4 c Nouvelle version 100% Mars !! 5 5 c On l'utilise aussi pour Venus et Titan, legerment modifiee. 6 7 #ifdef CPP_IOIPSL 8 use IOIPSL 9 #else 10 ! if not using IOIPSL, we still need to use (a local version of) getin 11 use ioipsl_getincom 12 #endif 6 13 7 14 IMPLICIT NONE … … 12 19 #include "comconst.h" 13 20 #include "logic.h" 21 #include "iniprint.h" 14 22 c 15 23 c======================================================================= … … 24 32 INTEGER l,ll 25 33 REAL snorm 26 REAL alpha,beta,gama,delta,deltaz,h,quoi,quand 34 REAL alpha,beta,gama,delta,deltaz 35 real quoi,quand 27 36 REAL zsig(llm),sig(llm+1) 28 37 INTEGER np,ierr … … 44 53 c----------------------------------------------------------------------- 45 54 c 55 ! Initializations: 46 56 pi=2.*ASIN(1.) 57 58 hybrid=.true. ! default value for hybrid (ie: use hybrid coordinates) 59 CALL getin('hybrid',hybrid) 60 write(lunout,*)'disvert_noterre: hybrid=',hybrid 47 61 48 62 ! Ouverture possible de fichiers typiquement E.T. … … 67 81 c <-> energie cinetique, d'apres la note de Frederic Hourdin... 68 82 69 PRINT*,'*****************************'70 PRINT*,'WARNING Lecture deesasig.def'71 PRINT*,'*****************************'72 READ(99,*) h83 write(lunout,*)'*****************************' 84 write(lunout,*)'WARNING reading esasig.def' 85 write(lunout,*)'*****************************' 86 READ(99,*) scaleheight 73 87 READ(99,*) dz0 74 88 READ(99,*) dz1 … … 76 90 CLOSE(99) 77 91 78 dz0=dz0/ h79 dz1=dz1/ h92 dz0=dz0/scaleheight 93 dz1=dz1/scaleheight 80 94 81 95 sig1=(1.-dz1)/tanh(.5*(llm-1)/nhaut) … … 116 130 117 131 ELSE IF(ierr4.eq.0) then 118 PRINT*,'****************************'119 PRINT*,'Lecture dez2sig.def'120 PRINT*,'****************************'121 122 READ(99,*) h132 write(lunout,*)'****************************' 133 write(lunout,*)'Reading z2sig.def' 134 write(lunout,*)'****************************' 135 136 READ(99,*) scaleheight 123 137 do l=1,llm 124 138 read(99,*) zsig(l) … … 128 142 sig(1) =1 129 143 do l=2,llm 130 sig(l) = 0.5 * ( exp(-zsig(l)/h) + exp(-zsig(l-1)/h) ) 144 sig(l) = 0.5 * ( exp(-zsig(l)/scaleheight) + 145 & exp(-zsig(l-1)/scaleheight) ) 131 146 end do 132 147 sig(llm+1) =0 … … 134 149 c----------------------------------------------------------------------- 135 150 ELSE 136 write( *,*) 'didn t you forget something ??? '137 write( *,*) 'We need the file z2sig.def ! (OR esasig.def)'151 write(lunout,*) 'didn t you forget something ??? ' 152 write(lunout,*) 'We need file z2sig.def ! (OR esasig.def)' 138 153 stop 139 154 ENDIF … … 156 171 c----------------------------------------------------------------------- 157 172 c 158 c se trouvait dans Titan... Verifier... 159 c h = 40. 160 161 if (1.eq.1) then ! toujours hybrides 162 write(*,*) "*******************************" 163 write(*,*) "Systeme en coordonnees hybrides" 164 write(*,*) 173 174 if (hybrid) then ! use hybrid coordinates 175 write(lunout,*) "*********************************" 176 write(lunout,*) "Using hybrid vertical coordinates" 177 write(lunout,*) 165 178 c Coordonnees hybrides avec mod 166 179 DO l = 1, llm … … 172 185 bp(llmp1) = 0. 173 186 ap(llmp1) = 0. 174 else 175 write( *,*) "****************************"176 write( *,*) "Systeme en coordonnees sigma"177 write( *,*)187 else ! use sigma coordinates 188 write(lunout,*) "********************************" 189 write(lunout,*) "Using sigma vertical coordinates" 190 write(lunout,*) 178 191 c Pour ne pas passer en coordonnees hybrides 179 192 DO l = 1, llm … … 186 199 bp(llmp1) = 0. 187 200 188 PRINT *,' BP '189 PRINT *,bp190 PRINT *,' AP '191 PRINT *,ap201 write(lunout,*)' BP ' 202 write(lunout,*) bp 203 write(lunout,*)' AP ' 204 write(lunout,*) ap 192 205 193 206 c Calcul au milieu des couches : … … 197 210 c (on met la meme distance (en log pression) entre P(llm) 198 211 c et P(llm -1) qu'entre P(llm-1) et P(llm-2) ) est 199 c Specifique. Ce choix est spécifié ici ET dans exner_ hyb.F212 c Specifique. Ce choix est spécifié ici ET dans exner_milieu.F 200 213 201 214 DO l = 1, llm-1 … … 204 217 ENDDO 205 218 206 cif (hybrid) then219 if (hybrid) then 207 220 aps(llm) = aps(llm-1)**2 / aps(llm-2) 208 221 bps(llm) = 0.5*(bp(llm) + bp(llm+1)) 209 celse210 cbps(llm) = bps(llm-1)**2 / bps(llm-2)211 caps(llm) = 0.212 cend if213 214 PRINT *,' BPs '215 PRINT *,bps216 PRINT *,' APs'217 PRINT *,aps222 else 223 bps(llm) = bps(llm-1)**2 / bps(llm-2) 224 aps(llm) = 0. 225 end if 226 227 write(lunout,*)' BPs ' 228 write(lunout,*) bps 229 write(lunout,*)' APs' 230 write(lunout,*) aps 218 231 219 232 DO l = 1, llm 220 233 presnivs(l) = aps(l)+bps(l)*preff 221 pseudoalt(l) = - h*log(presnivs(l)/preff)234 pseudoalt(l) = -scaleheight*log(presnivs(l)/preff) 222 235 ENDDO 223 236 224 PRINT *,' PRESNIVS' 225 PRINT *,presnivs 226 PRINT *,'Pseudo altitude des Presnivs : (avec H = ',h,' km)' 227 PRINT *,pseudoalt 237 write(lunout,*)' PRESNIVS' 238 write(lunout,*)presnivs 239 write(lunout,*)'Pseudo altitude of Presnivs : (for a scale ', 240 & 'height of ',scaleheight,' km)' 241 write(lunout,*)pseudoalt 228 242 229 243 c -------------------------------------------------- … … 232 246 c -------------------------------------------------- 233 247 c open (53,file='testhybrid.tab') 234 c h=15.5248 c scaleheight=15.5 235 249 c do iz=0,34 236 250 c z = -5 + min(iz,34-iz) 237 251 c approximation of scale height for Venus 238 c h= 15.5 - z/55.*10.239 c ps = preff*exp(-z/ h)240 c zsig(1)= - h*log((aps(1) + bps(1)*ps)/preff)252 c scaleheight = 15.5 - z/55.*10. 253 c ps = preff*exp(-z/scaleheight) 254 c zsig(1)= -scaleheight*log((aps(1) + bps(1)*ps)/preff) 241 255 c do l=2,llm 242 256 c approximation of scale height for Venus 243 257 c if (zsig(l-1).le.55.) then 244 c h= 15.5 - zsig(l-1)/55.*10.258 c scaleheight = 15.5 - zsig(l-1)/55.*10. 245 259 c else 246 c h= 5.5 - (zsig(l-1)-55.)/35.*2.260 c scaleheight = 5.5 - (zsig(l-1)-55.)/35.*2. 247 261 c endif 248 c zsig(l)= zsig(l-1)- h*262 c zsig(l)= zsig(l-1)-scaleheight* 249 263 c . log((aps(l) + bps(l)*ps)/(aps(l-1) + bps(l-1)*ps)) 250 264 c end do -
trunk/libf/dyn3d/exner_milieu.F
r109 r124 1 ! 2 ! $Id $ 3 ! 1 4 SUBROUTINE exner_milieu ( ngrid, ps, p,beta, pks, pk, pkf ) 2 5 c … … 44 47 REAL xpn, xps 45 48 REAL SSUM 46 EXTERNAL filtreg, SSUM 49 EXTERNAL SSUM 50 51 if (llm.eq.1) then 52 ! Specific behaviour for Shallow Water (1 vertical layer) case 53 54 ! Sanity checks 55 if (kappa.ne.1) then 56 call abort_gcm("exner_hyb", 57 & "kappa!=1 , but running in Shallow Water mode!!",42) 58 endif 59 if (cpp.ne.r) then 60 call abort_gcm("exner_hyb", 61 & "cpp!=r , but running in Shallow Water mode!!",42) 62 endif 63 64 ! Compute pks(:),pk(:),pkf(:) 65 66 DO ij = 1, ngrid 67 pks(ij) = (cpp/preff) * ps(ij) 68 pk(ij,1) = .5*pks(ij) 69 ENDDO 70 71 CALL SCOPY ( ngrid * llm, pk, 1, pkf, 1 ) 72 CALL filtreg ( pkf, jmp1, llm, 2, 1, .TRUE., 1 ) 73 74 ! our work is done, exit routine 75 return 76 endif ! of if (llm.eq.1) 77 47 78 48 79 c ------------- -
trunk/libf/dyn3d/iniacademic.F90
r66 r124 207 207 enddo 208 208 enddo 209 write(lunout,*) 'Iniacademic - check',tetajl(:,int(llm/2)),rlatu(:)209 ! write(lunout,*) 'Iniacademic - check',tetajl(:,int(llm/2)),rlatu(:) 210 210 211 211 ! 3. Initialize fields (if necessary) … … 217 217 218 218 CALL pression ( ip1jmp1, ap, bp, ps, p ) 219 CALL exner_hyb( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf ) 219 if (planet_type=="earth") then 220 CALL exner_hyb(ip1jmp1,ps,p,alpha,beta,pks,pk,pkf) 221 else 222 call exner_milieu(ip1jmp1,ps,p,alpha,beta,pks,pk,pkf) 223 endif 220 224 CALL massdair(p,masse) 221 225 -
trunk/libf/dyn3d/logic.h
r119 r124 3 3 ! 4 4 ! 5 ! 5 ! NB: keep items of different kinds in seperate common blocs to avoid 6 ! "misaligned commons" issues 6 7 !----------------------------------------------------------------------- 7 8 ! INCLUDE 'logic.h' 8 9 9 COMMON/logic / purmats,iflag_phys,forward,leapf,apphys,&10 COMMON/logicl/ purmats,forward,leapf,apphys, & 10 11 & statcl,conser,apdiss,apdelq,saison,ecripar,fxyhypb,ysinus & 11 12 & ,read_start,ok_guide,ok_strato,ok_gradsfile & 12 & ,ok_limit,ok_etat0, iflag_trac13 & ,ok_limit,ok_etat0,hybrid 13 14 15 COMMON/logici/ iflag_phys,iflag_trac 16 14 17 LOGICAL purmats,forward,leapf,apphys,statcl,conser, & 15 18 & apdiss,apdelq,saison,ecripar,fxyhypb,ysinus & 16 19 & ,read_start,ok_guide,ok_strato,ok_gradsfile & 17 20 & ,ok_limit,ok_etat0 21 logical hybrid ! vertcal coordinate is hybrid if true (sigma otherwise) 18 22 19 23 INTEGER iflag_phys,iflag_trac -
trunk/libf/dyn3d/sortvarc.F
r101 r124 63 63 64 64 c----------------------------------------------------------------------- 65 ! Ehouarn: when no initialization fields from file, resetvarc should be 66 ! set to false 67 if (firstcal) then 68 if (.not.read_start) then 69 resetvarc=.true. 70 endif 71 endif 65 72 66 73 dtvrs1j = dtvr/daysec -
trunk/libf/dyn3dpar/comvert.h
r109 r124 7 7 COMMON/comvert/ap(llm+1),bp(llm+1),presnivs(llm),dpres(llm), & 8 8 & pa,preff,nivsigs(llm),nivsig(llm+1), & 9 & aps(llm),bps(llm) 9 & aps(llm),bps(llm),scaleheight 10 10 11 11 REAL ap,bp,presnivs,dpres,pa,preff,nivsigs,nivsig,aps,bps 12 real scaleheight ! atmospheric (reference) scale height (km) 12 13 13 14 !----------------------------------------------------------------------- -
trunk/libf/dyn3dpar/disvert_noterre.F
r110 r124 4 4 c Nouvelle version 100% Mars !! 5 5 c On l'utilise aussi pour Venus et Titan, legerment modifiee. 6 7 #ifdef CPP_IOIPSL 8 use IOIPSL 9 #else 10 ! if not using IOIPSL, we still need to use (a local version of) getin 11 use ioipsl_getincom 12 #endif 6 13 7 14 IMPLICIT NONE … … 12 19 #include "comconst.h" 13 20 #include "logic.h" 21 #include "iniprint.h" 14 22 c 15 23 c======================================================================= … … 24 32 INTEGER l,ll 25 33 REAL snorm 26 REAL alpha,beta,gama,delta,deltaz,h,quoi,quand 34 REAL alpha,beta,gama,delta,deltaz 35 real quoi,quand 27 36 REAL zsig(llm),sig(llm+1) 28 37 INTEGER np,ierr … … 44 53 c----------------------------------------------------------------------- 45 54 c 55 ! Initializations: 46 56 pi=2.*ASIN(1.) 57 58 hybrid=.true. ! default value for hybrid (ie: use hybrid coordinates) 59 CALL getin('hybrid',hybrid) 60 write(lunout,*)'disvert_noterre: hybrid=',hybrid 47 61 48 62 ! Ouverture possible de fichiers typiquement E.T. … … 67 81 c <-> energie cinetique, d'apres la note de Frederic Hourdin... 68 82 69 PRINT*,'*****************************'70 PRINT*,'WARNING Lecture deesasig.def'71 PRINT*,'*****************************'72 READ(99,*) h83 write(lunout,*)'*****************************' 84 write(lunout,*)'WARNING reading esasig.def' 85 write(lunout,*)'*****************************' 86 READ(99,*) scaleheight 73 87 READ(99,*) dz0 74 88 READ(99,*) dz1 … … 76 90 CLOSE(99) 77 91 78 dz0=dz0/ h79 dz1=dz1/ h92 dz0=dz0/scaleheight 93 dz1=dz1/scaleheight 80 94 81 95 sig1=(1.-dz1)/tanh(.5*(llm-1)/nhaut) … … 116 130 117 131 ELSE IF(ierr4.eq.0) then 118 PRINT*,'****************************'119 PRINT*,'Lecture dez2sig.def'120 PRINT*,'****************************'121 122 READ(99,*) h132 write(lunout,*)'****************************' 133 write(lunout,*)'Reading z2sig.def' 134 write(lunout,*)'****************************' 135 136 READ(99,*) scaleheight 123 137 do l=1,llm 124 138 read(99,*) zsig(l) … … 128 142 sig(1) =1 129 143 do l=2,llm 130 sig(l) = 0.5 * ( exp(-zsig(l)/h) + exp(-zsig(l-1)/h) ) 144 sig(l) = 0.5 * ( exp(-zsig(l)/scaleheight) + 145 & exp(-zsig(l-1)/scaleheight) ) 131 146 end do 132 147 sig(llm+1) =0 … … 134 149 c----------------------------------------------------------------------- 135 150 ELSE 136 write( *,*) 'didn t you forget something ??? '137 write( *,*) 'We need the file z2sig.def ! (OR esasig.def)'151 write(lunout,*) 'didn t you forget something ??? ' 152 write(lunout,*) 'We need file z2sig.def ! (OR esasig.def)' 138 153 stop 139 154 ENDIF … … 156 171 c----------------------------------------------------------------------- 157 172 c 158 c se trouvait dans Titan... Verifier... 159 c h = 40. 160 161 if (1.eq.1) then ! toujours hybrides 162 write(*,*) "*******************************" 163 write(*,*) "Systeme en coordonnees hybrides" 164 write(*,*) 173 174 if (hybrid) then ! use hybrid coordinates 175 write(lunout,*) "*********************************" 176 write(lunout,*) "Using hybrid vertical coordinates" 177 write(lunout,*) 165 178 c Coordonnees hybrides avec mod 166 179 DO l = 1, llm … … 172 185 bp(llmp1) = 0. 173 186 ap(llmp1) = 0. 174 else 175 write( *,*) "****************************"176 write( *,*) "Systeme en coordonnees sigma"177 write( *,*)187 else ! use sigma coordinates 188 write(lunout,*) "********************************" 189 write(lunout,*) "Using sigma vertical coordinates" 190 write(lunout,*) 178 191 c Pour ne pas passer en coordonnees hybrides 179 192 DO l = 1, llm … … 186 199 bp(llmp1) = 0. 187 200 188 PRINT *,' BP '189 PRINT *,bp190 PRINT *,' AP '191 PRINT *,ap201 write(lunout,*)' BP ' 202 write(lunout,*) bp 203 write(lunout,*)' AP ' 204 write(lunout,*) ap 192 205 193 206 c Calcul au milieu des couches : … … 197 210 c (on met la meme distance (en log pression) entre P(llm) 198 211 c et P(llm -1) qu'entre P(llm-1) et P(llm-2) ) est 199 c Specifique. Ce choix est spécifié ici ET dans exner_ hyb.F212 c Specifique. Ce choix est spécifié ici ET dans exner_milieu.F 200 213 201 214 DO l = 1, llm-1 … … 204 217 ENDDO 205 218 206 cif (hybrid) then219 if (hybrid) then 207 220 aps(llm) = aps(llm-1)**2 / aps(llm-2) 208 221 bps(llm) = 0.5*(bp(llm) + bp(llm+1)) 209 celse210 cbps(llm) = bps(llm-1)**2 / bps(llm-2)211 caps(llm) = 0.212 cend if213 214 PRINT *,' BPs '215 PRINT *,bps216 PRINT *,' APs'217 PRINT *,aps222 else 223 bps(llm) = bps(llm-1)**2 / bps(llm-2) 224 aps(llm) = 0. 225 end if 226 227 write(lunout,*)' BPs ' 228 write(lunout,*) bps 229 write(lunout,*)' APs' 230 write(lunout,*) aps 218 231 219 232 DO l = 1, llm 220 233 presnivs(l) = aps(l)+bps(l)*preff 221 pseudoalt(l) = - h*log(presnivs(l)/preff)234 pseudoalt(l) = -scaleheight*log(presnivs(l)/preff) 222 235 ENDDO 223 236 224 PRINT *,' PRESNIVS' 225 PRINT *,presnivs 226 PRINT *,'Pseudo altitude des Presnivs : (avec H = ',h,' km)' 227 PRINT *,pseudoalt 237 write(lunout,*)' PRESNIVS' 238 write(lunout,*)presnivs 239 write(lunout,*)'Pseudo altitude of Presnivs : (for a scale ', 240 & 'height of ',scaleheight,' km)' 241 write(lunout,*)pseudoalt 228 242 229 243 c -------------------------------------------------- … … 232 246 c -------------------------------------------------- 233 247 c open (53,file='testhybrid.tab') 234 c h=15.5248 c scaleheight=15.5 235 249 c do iz=0,34 236 250 c z = -5 + min(iz,34-iz) 237 251 c approximation of scale height for Venus 238 c h= 15.5 - z/55.*10.239 c ps = preff*exp(-z/ h)240 c zsig(1)= - h*log((aps(1) + bps(1)*ps)/preff)252 c scaleheight = 15.5 - z/55.*10. 253 c ps = preff*exp(-z/scaleheight) 254 c zsig(1)= -scaleheight*log((aps(1) + bps(1)*ps)/preff) 241 255 c do l=2,llm 242 256 c approximation of scale height for Venus 243 257 c if (zsig(l-1).le.55.) then 244 c h= 15.5 - zsig(l-1)/55.*10.258 c scaleheight = 15.5 - zsig(l-1)/55.*10. 245 259 c else 246 c h= 5.5 - (zsig(l-1)-55.)/35.*2.260 c scaleheight = 5.5 - (zsig(l-1)-55.)/35.*2. 247 261 c endif 248 c zsig(l)= zsig(l-1)- h*262 c zsig(l)= zsig(l-1)-scaleheight* 249 263 c . log((aps(l) + bps(l)*ps)/(aps(l-1) + bps(l-1)*ps)) 250 264 c end do -
trunk/libf/dyn3dpar/exner_milieu.F
r109 r124 1 ! 2 ! $Id $ 3 ! 1 4 SUBROUTINE exner_milieu ( ngrid, ps, p,beta, pks, pk, pkf ) 2 5 c … … 44 47 REAL xpn, xps 45 48 REAL SSUM 46 EXTERNAL filtreg, SSUM 49 EXTERNAL SSUM 50 51 if (llm.eq.1) then 52 ! Specific behaviour for Shallow Water (1 vertical layer) case 53 54 ! Sanity checks 55 if (kappa.ne.1) then 56 call abort_gcm("exner_hyb", 57 & "kappa!=1 , but running in Shallow Water mode!!",42) 58 endif 59 if (cpp.ne.r) then 60 call abort_gcm("exner_hyb", 61 & "cpp!=r , but running in Shallow Water mode!!",42) 62 endif 63 64 ! Compute pks(:),pk(:),pkf(:) 65 66 DO ij = 1, ngrid 67 pks(ij) = (cpp/preff) * ps(ij) 68 pk(ij,1) = .5*pks(ij) 69 ENDDO 70 71 CALL SCOPY ( ngrid * llm, pk, 1, pkf, 1 ) 72 CALL filtreg ( pkf, jmp1, llm, 2, 1, .TRUE., 1 ) 73 74 ! our work is done, exit routine 75 return 76 endif ! of if (llm.eq.1) 77 47 78 48 79 c ------------- -
trunk/libf/dyn3dpar/exner_milieu_p.F
r109 r124 1 SUBROUTINE exner_milieu ( ngrid, ps, p,beta, pks, pk, pkf ) 1 ! 2 ! $Id $ 3 ! 4 SUBROUTINE exner_milieu_p ( ngrid, ps, p,beta, pks, pk, pkf ) 2 5 c 3 6 c Auteurs : F. Forget , Y. Wanherdrick … … 50 53 c$OMP BARRIER 51 54 55 if (llm.eq.1) then 56 ! Specific behaviour for Shallow Water (1 vertical layer) case 57 58 ! Sanity checks 59 if (kappa.ne.1) then 60 call abort_gcm("exner_hyb", 61 & "kappa!=1 , but running in Shallow Water mode!!",42) 62 endif 63 if (cpp.ne.r) then 64 call abort_gcm("exner_hyb", 65 & "cpp!=r , but running in Shallow Water mode!!",42) 66 endif 67 68 ! Compute pks(:),pk(:),pkf(:) 69 ijb=ij_begin 70 ije=ij_end 71 !$OMP DO SCHEDULE(STATIC) 72 DO ij=ijb, ije 73 pks(ij)=(cpp/preff)*ps(ij) 74 pk(ij,1) = .5*pks(ij) 75 pkf(ij,1)=pk(ij,1) 76 ENDDO 77 !$OMP ENDDO 78 79 !$OMP MASTER 80 if (pole_nord) then 81 DO ij = 1, iim 82 ppn(ij) = aire( ij ) * pks( ij ) 83 ENDDO 84 xpn = SSUM(iim,ppn,1) /apoln 85 86 DO ij = 1, iip1 87 pks( ij ) = xpn 88 pk(ij,1) = .5*pks(ij) 89 pkf(ij,1)=pk(ij,1) 90 ENDDO 91 endif 92 93 if (pole_sud) then 94 DO ij = 1, iim 95 pps(ij) = aire(ij+ip1jm) * pks(ij+ip1jm ) 96 ENDDO 97 xps = SSUM(iim,pps,1) /apols 98 99 DO ij = 1, iip1 100 pks( ij+ip1jm ) = xps 101 pk(ij+ip1jm,1)=.5*pks(ij+ip1jm) 102 pkf(ij+ip1jm,1)=pk(ij+ip1jm,1) 103 ENDDO 104 endif 105 !$OMP END MASTER 106 107 jjb=jj_begin 108 jje=jj_end 109 CALL filtreg_p ( pkf,jjb,jje, jmp1, llm, 2, 1, .TRUE., 1 ) 110 111 ! our work is done, exit routine 112 return 113 endif ! of if (llm.eq.1) 114 52 115 c ------------- 53 116 c Calcul de pks -
trunk/libf/dyn3dpar/gcm.F
r101 r124 487 487 c -------------------------------------- 488 488 IF (config_inca /= 'none') THEN 489 #ifdef INCA 489 490 !$OMP PARALLEL 490 #ifdef INCA491 491 CALL init_inca_dim(klon_omp,llm,iim,jjm, 492 492 $ rlonu,rlatu,rlonv,rlatv) 493 #endif494 493 !$OMP END PARALLEL 494 #endif 495 495 END IF 496 496 … … 574 574 c write(78,*) 'q',q 575 575 576 c$OMP PARALLEL DEFAULT(SHARED) COPYIN(/temps/,/logic /)576 c$OMP PARALLEL DEFAULT(SHARED) COPYIN(/temps/,/logici/,/logicl/) 577 577 CALL leapfrog_p(ucov,vcov,teta,ps,masse,phis,q, 578 578 . time_0) -
trunk/libf/dyn3dpar/iniacademic.F90
r66 r124 207 207 enddo 208 208 enddo 209 write(lunout,*) 'Iniacademic - check',tetajl(:,int(llm/2)),rlatu(:)209 ! write(lunout,*) 'Iniacademic - check',tetajl(:,int(llm/2)),rlatu(:) 210 210 211 211 ! 3. Initialize fields (if necessary) … … 217 217 218 218 CALL pression ( ip1jmp1, ap, bp, ps, p ) 219 CALL exner_hyb( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf ) 219 if (planet_type=="earth") then 220 CALL exner_hyb(ip1jmp1,ps,p,alpha,beta,pks,pk,pkf) 221 else 222 call exner_milieu(ip1jmp1,ps,p,alpha,beta,pks,pk,pkf) 223 endif 220 224 CALL massdair(p,masse) 221 225 -
trunk/libf/dyn3dpar/leapfrog_p.F
r110 r124 600 600 !$OMP END DO 601 601 602 c$OMP MASTER 602 603 IF (prt_level>9) THEN 603 604 WRITE(lunout,*)"leapfrog_p: Iteration No",True_itau … … 1520 1521 c$OMP MASTER 1521 1522 nbetat = nbetatdem 1523 c$OMP END MASTER 1524 c$OMP BARRIER 1522 1525 1523 1526 ! ADAPTATION GCM POUR CP(T) … … 1530 1533 enddo 1531 1534 !$OMP END DO 1535 1536 !$OMP MASTER 1532 1537 ! CALL geopot_p(ip1jmp1,teta,pk,pks,phis,phi) 1533 1538 CALL geopot_p ( ip1jmp1, tsurpk , pk , pks, phis , phi ) … … 1599 1604 endif 1600 1605 endif ! of if (output_grads_dyn) 1601 c$OMP END MASTER1606 !$OMP END MASTER 1602 1607 endif ! of if (leapf.or.(.not.leapf.and.(.not.forward))) 1603 1608 ENDIF ! of IF(MOD(itau,iecri).EQ.0) … … 1744 1749 c$OMP MASTER 1745 1750 nbetat = nbetatdem 1751 c$OMP END MASTER 1752 c$OMP BARRIER 1753 1746 1754 ! ADAPTATION GCM POUR CP(T) 1747 1755 call tpot2t_p(ip1jmp1,llm,teta,temp,pk) … … 1754 1762 enddo 1755 1763 !$OMP END DO 1764 1765 !$OMP MASTER 1756 1766 ! CALL geopot_p(ip1jmp1,teta,pk,pks,phis,phi) 1757 1767 CALL geopot_p(ip1jmp1,tsurpk,pk,pks,phis,phi) … … 1818 1828 endif ! of if (output_grads_dyn) 1819 1829 1820 c$OMP END MASTER1830 !$OMP END MASTER 1821 1831 ENDIF ! of IF(MOD(itau,iecri).EQ.0) 1822 1832 -
trunk/libf/dyn3dpar/logic.h
r119 r124 3 3 ! 4 4 ! 5 ! 5 ! NB: keep items of different kinds in seperate common blocs to avoid 6 ! "misaligned commons" issues 6 7 !----------------------------------------------------------------------- 7 8 ! INCLUDE 'logic.h' 8 9 9 COMMON/logic / purmats,iflag_phys,forward,leapf,apphys,&10 COMMON/logicl/ purmats,forward,leapf,apphys, & 10 11 & statcl,conser,apdiss,apdelq,saison,ecripar,fxyhypb,ysinus & 11 12 & ,read_start,ok_guide,ok_strato,ok_gradsfile & 12 & ,ok_limit,ok_etat0, iflag_trac13 & ,ok_limit,ok_etat0,hybrid 13 14 15 COMMON/logici/ iflag_phys,iflag_trac 16 14 17 LOGICAL purmats,forward,leapf,apphys,statcl,conser, & 15 18 & apdiss,apdelq,saison,ecripar,fxyhypb,ysinus & 16 19 & ,read_start,ok_guide,ok_strato,ok_gradsfile & 17 20 & ,ok_limit,ok_etat0 21 logical hybrid ! vertcal coordinate is hybrid if true (sigma otherwise) 18 22 19 23 INTEGER iflag_phys,iflag_trac 20 !$OMP THREADPRIVATE(/logic/) 24 !$OMP THREADPRIVATE(/logicl/) 25 !$OMP THREADPRIVATE(/logici/) 21 26 !----------------------------------------------------------------------- -
trunk/libf/dyn3dpar/sortvarc.F
r101 r124 63 63 64 64 c----------------------------------------------------------------------- 65 ! Ehouarn: when no initialization fields from file, resetvarc should be 66 ! set to false 67 if (firstcal) then 68 if (.not.read_start) then 69 resetvarc=.true. 70 endif 71 endif 65 72 66 73 dtvrs1j = dtvr/daysec … … 121 128 * cosphi(ij) 122 129 ENDDO 123 angl(l) = rad sg*130 angl(l) = rad * 124 131 s (SSUM(ip1jm-iip1,ge(iip2),1)-SSUM(jjm-1,ge(iip2),iip1)) 125 132 ENDDO -
trunk/libf/dyn3dpar/top_bound_p.F
r110 r124 50 50 ! & (/(0., i =1,llm-NDAMP),0.125E-5,.25E-5,.5E-5,1.E-5/) 51 51 LOGICAL,SAVE :: first=.true. 52 53 REAL zkm 52 54 INTEGER j,l,jjb,jje 53 55 … … 100 102 IF (pole_sud) jje=jj_end-1 101 103 102 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)103 104 if (mode_top_bound.ge.2) then 105 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 104 106 do l=1,llm 105 107 do j=jjb,jje … … 116 118 enddo 117 119 enddo 120 !$OMP END DO NOWAIT 118 121 else 122 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 119 123 do l=1,llm 120 124 do j=jjb,jje … … 122 126 enddo 123 127 enddo 124 endif 125 c$OMP END DO NOWAIT 128 !$OMP END DO NOWAIT 129 endif 126 130 127 131 C AMORTISSEMENTS LINEAIRES: 128 132 129 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)130 133 if (mode_top_bound.ge.1) then 134 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 131 135 do l=1,llm 132 136 do j=jjb,jje … … 136 140 enddo 137 141 enddo 138 endif 139 c$OMP END DO NOWAIT 142 !$OMP END DO NOWAIT 143 endif 140 144 141 145 C POUR U ET H … … 148 152 IF (pole_sud) jje=jj_end-1 149 153 150 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)151 154 if (mode_top_bound.ge.2) then 155 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 152 156 do l=1,llm 153 157 do j=jjb,jje … … 161 165 enddo 162 166 enddo 167 !$OMP END DO NOWAIT 163 168 else 169 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 164 170 do l=1,llm 165 171 do j=jjb,jje … … 167 173 enddo 168 174 enddo 169 endif 170 c$OMP END DO NOWAIT 171 172 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 175 !$OMP END DO NOWAIT 176 endif 177 173 178 if (mode_top_bound.ge.3) then 179 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 174 180 do l=1,llm 175 181 do j=jjb,jje … … 183 189 enddo 184 190 enddo 185 endif 186 c$OMP END DO NOWAIT 191 !$OMP END DO NOWAIT 192 endif 187 193 188 194 C AMORTISSEMENTS LINEAIRES: 189 195 190 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)191 196 if (mode_top_bound.ge.1) then 197 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 192 198 do l=1,llm 193 199 do j=jjb,jje … … 197 203 enddo 198 204 enddo 199 endif 200 c$OMP END DO NOWAIT 205 !$OMP END DO NOWAIT 206 endif 201 207 202 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)203 208 if (mode_top_bound.ge.3) then 209 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 204 210 do l=1,llm 205 211 do j=jjb,jje … … 209 215 enddo 210 216 enddo 211 endif 212 c$OMP END DO NOWAIT 213 214 217 !$OMP END DO NOWAIT 218 endif 219 220 !$OMP BARRIER 215 221 RETURN 216 222 END
Note: See TracChangeset
for help on using the changeset viewer.