Changeset 127
- Timestamp:
- May 24, 2011, 1:26:29 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 23 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/chantiers/commit_importants.log
r124 r127 882 882 883 883 ********************* 884 **** commit_v12 3****884 **** commit_v124 **** 885 885 ********************* 886 886 … … 892 892 pour atteindre la concordance entre versions séq. et //. 893 893 894 ********************* 895 **** commit_v126 **** 896 ********************* 897 898 Ehouarn: suite de l'implémentation de la discrétisation verticale, quelques 899 mises à jour pour concorder avec la version terrestre. 900 -> Finalement, on met un flag "disvert_type" pour fixer la discrétisation 901 disvert_type==1 (défaut si planet_type=="earth") pour cas terrestre 902 disvert_type==2 (défaut si planet_type!="earth") pour cas planéto (z2sig.def) 903 -> au passage, pour rester en phase avec modèle terrestre on renomme 904 disvert_terre en disvert (le disvert "alternatif" demeure 'disvert_noterre') -
trunk/chantiers/meschantiers-Ehouarn.txt
r124 r127 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. OK, c'est fait, on peut compiler/tourner sans physique 3 - En priorité: faire qu'on puisse compiler un/des cas test (sans physique) 4 pour pouvoir tester les modifs au fur et à mesure. OK, c'est fait, on 5 peut compiler/tourner sans physique 4 6 5 7 - Uniformiser les mises à jour dyn séq. et // (commencé avec la rev. 8) … … 7 9 - Peut-être revoir l'interface dynamique/physique ? 8 10 9 - Attention à la discrétisation verticale ... 11 - Attention à la discrétisation verticale ... ( débuté avec la r109 par Seb 12 puis mes modifs en r124 et finalement r126) donc a priori 13 OK maintenant 10 14 -
trunk/libf/dyn3d/comvert.h
r124 r127 1 1 ! 2 ! $Id: comvert.h 1 279 2009-12-10 09:02:56Z fairhead$2 ! $Id: comvert.h 1520 2011-05-23 11:37:09Z emillour $ 3 3 ! 4 4 !----------------------------------------------------------------------- 5 5 ! INCLUDE 'comvert.h' 6 6 7 COMMON/comvert /ap(llm+1),bp(llm+1),presnivs(llm),dpres(llm),&7 COMMON/comvertr/ap(llm+1),bp(llm+1),presnivs(llm),dpres(llm), & 8 8 & pa,preff,nivsigs(llm),nivsig(llm+1), & 9 9 & aps(llm),bps(llm),scaleheight 10 10 11 REAL ap,bp,presnivs,dpres,pa,preff,nivsigs,nivsig,aps,bps 11 common/comverti/disvert_type 12 13 real ap ! hybrid pressure contribution at interlayers 14 real bp ! hybrid sigma contribution at interlayer 15 real presnivs ! (reference) pressure at mid-layers 16 real dpres 17 real pa ! reference pressure (Pa) at which hybrid coordinates 18 ! become purely pressure 19 real preff ! reference surface pressure (Pa) 20 real nivsigs 21 real nivsig 22 real aps ! hybrid pressure contribution at mid-layers 23 real bps ! hybrid sigma contribution at mid-layers 12 24 real scaleheight ! atmospheric (reference) scale height (km) 13 25 26 integer disvert_type ! type of vertical discretization: 27 ! 1: Earth (default for planet_type==earth), 28 ! automatic generation 29 ! 2: Planets (default for planet_type!=earth), 30 ! using 'z2sig.def' (or 'esasig.def) file 31 14 32 !----------------------------------------------------------------------- -
trunk/libf/dyn3d/disvert.F90
r126 r127 1 ! $Id: disvert.F90 1 480 2011-01-31 21:29:58Z jghattas$1 ! $Id: disvert.F90 1520 2011-05-23 11:37:09Z emillour $ 2 2 3 SUBROUTINE disvert _terre(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, *)'disvert: 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,*)'disvert: 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,*) 'disvert: 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, *) 'disvert: BP '129 write(lunout, *) trim(modname),': BP ' 122 130 write(lunout, *) bp 123 write(lunout, *) 'disvert: 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, *) 'disvert: PRESNIVS '147 write(lunout, *) trim(modname),': PRESNIVS ' 140 148 write(lunout, *) presnivs 141 149 142 END SUBROUTINE disvert _terre150 END SUBROUTINE disvert -
trunk/libf/dyn3d/disvert_noterre.F
r124 r127 1 ! $Id: $ 1 2 SUBROUTINE disvert_noterre 2 3 … … 22 23 c 23 24 c======================================================================= 24 c Discretisation verticale en coordonnée hybride 25 c Discretisation verticale en coordonnée hybride (ou sigma) 25 26 c 26 27 c======================================================================= … … 49 50 integer iz 50 51 real z, ps,p 52 character(len=*),parameter :: modname="disvert_noterre" 51 53 52 54 c … … 54 56 c 55 57 ! Initializations: 56 pi=2.*ASIN(1.) 58 ! pi=2.*ASIN(1.) ! already done in iniconst 57 59 58 60 hybrid=.true. ! default value for hybrid (ie: use hybrid coordinates) 59 61 CALL getin('hybrid',hybrid) 60 write(lunout,*) 'disvert_noterre: hybrid=',hybrid62 write(lunout,*) trim(modname),': hybrid=',hybrid 61 63 62 64 ! Ouverture possible de fichiers typiquement E.T. … … 156 158 157 159 DO l=1,llm 158 nivsigs(l) = FLOAT(l)160 nivsigs(l) = REAL(l) 159 161 ENDDO 160 162 161 163 DO l=1,llmp1 162 nivsig(l)= FLOAT(l)164 nivsig(l)= REAL(l) 163 165 ENDDO 164 166 … … 199 201 bp(llmp1) = 0. 200 202 201 write(lunout,*) 'BP '203 write(lunout,*) trim(modname),': BP ' 202 204 write(lunout,*) bp 203 write(lunout,*) 'AP '205 write(lunout,*) trim(modname),': AP ' 204 206 write(lunout,*) ap 205 207 … … 225 227 end if 226 228 227 write(lunout,*) 'BPs '229 write(lunout,*) trim(modname),': BPs ' 228 230 write(lunout,*) bps 229 write(lunout,*) 'APs'231 write(lunout,*) trim(modname),': APs' 230 232 write(lunout,*) aps 231 233 … … 235 237 ENDDO 236 238 237 write(lunout,*) 'PRESNIVS'239 write(lunout,*)trim(modname),' : PRESNIVS' 238 240 write(lunout,*)presnivs 239 241 write(lunout,*)'Pseudo altitude of Presnivs : (for a scale ', -
trunk/libf/dyn3d/etat0_netcdf.F90
r66 r127 1 1 ! 2 ! $Id: etat0_netcdf.F90 1 486 2011-02-11 12:07:39Z fairhead$2 ! $Id: etat0_netcdf.F90 1520 2011-05-23 11:37:09Z emillour $ 3 3 ! 4 4 !------------------------------------------------------------------------------- 5 5 ! 6 SUBROUTINE etat0_netcdf(ib, masque, letat0)6 SUBROUTINE etat0_netcdf(ib, masque, phis, letat0) 7 7 ! 8 8 !------------------------------------------------------------------------------- … … 37 37 LOGICAL, INTENT(IN) :: ib ! barycentric interpolat. 38 38 REAL, DIMENSION(iip1,jjp1), INTENT(INOUT) :: masque ! land mask 39 REAL, DIMENSION(iip1,jjp1), INTENT(OUT) :: phis ! geopotentiel au sol 39 40 LOGICAL, INTENT(IN) :: letat0 ! F: masque only required 40 41 #ifndef CPP_EARTH … … 51 52 REAL, DIMENSION(klon) :: tsol, qsol 52 53 REAL, DIMENSION(klon) :: sn, rugmer, run_off_lic_0 53 REAL, DIMENSION(iip1,jjp1) :: orog, rugo, psol , phis54 REAL, DIMENSION(iip1,jjp1) :: orog, rugo, psol 54 55 REAL, DIMENSION(iip1,jjp1,llm+1) :: p3d 55 56 REAL, DIMENSION(iip1,jjp1,llm) :: uvent, t3d, tpot, qsat, qd … … 138 139 flag_aerosol, new_aod, & 139 140 bl95_b0, bl95_b1, & 140 iflag_thermals,nsplit_thermals,tau_thermals, & 141 iflag_thermals_ed,iflag_thermals_optflux, & 142 iflag_coupl,iflag_clos,iflag_wake, read_climoz, & 141 read_climoz, & 143 142 alp_offset) 144 143 … … 252 251 !******************************************************************************* 253 252 CALL pression(ip1jmp1, ap, bp, psol, p3d) 254 CALL exner_hyb(ip1jmp1, psol, p3d, alpha, beta, pks, pk, y) 253 if (disvert_type.eq.1) then 254 CALL exner_hyb(ip1jmp1, psol, p3d, alpha, beta, pks, pk, y) 255 else ! we assume that we are in the disvert_type==2 case 256 CALL exner_milieu(ip1jmp1,psol,p3d,beta,pks,pk,y) 257 endif 255 258 pls(:,:,:)=preff*(pk(:,:,:)/cpp)**(1./kappa) 256 259 ! WRITE(lunout,*) 'P3D :', p3d(10,20,:) -
trunk/libf/dyn3d/exner_hyb.F
r1 r127 51 51 REAL SSUM 52 52 c 53 logical,save :: firstcall=.true. 54 character(len=*),parameter :: modname="exner_hyb" 55 56 ! Sanity check 57 if (firstcall) then 58 ! check that vertical discretization is compatible 59 ! with this routine 60 if (disvert_type.ne.1) then 61 call abort_gcm(modname, 62 & "this routine should only be called if disvert_type==1",42) 63 endif 64 65 ! sanity checks for Shallow Water case (1 vertical layer) 66 if (llm.eq.1) then 67 if (kappa.ne.1) then 68 call abort_gcm(modname, 69 & "kappa!=1 , but running in Shallow Water mode!!",42) 70 endif 71 if (cpp.ne.r) then 72 call abort_gcm(modname, 73 & "cpp!=r , but running in Shallow Water mode!!",42) 74 endif 75 endif ! of if (llm.eq.1) 76 77 firstcall=.false. 78 endif ! of if (firstcall) 53 79 54 80 if (llm.eq.1) then 55 ! Specific behaviour for Shallow Water (1 vertical layer) case56 57 ! Sanity checks58 if (kappa.ne.1) then59 call abort_gcm("exner_hyb",60 & "kappa!=1 , but running in Shallow Water mode!!",42)61 endif62 if (cpp.ne.r) then63 call abort_gcm("exner_hyb",64 & "cpp!=r , but running in Shallow Water mode!!",42)65 endif66 81 67 82 ! Compute pks(:),pk(:),pkf(:) … … 77 92 ! our work is done, exit routine 78 93 return 94 79 95 endif ! of if (llm.eq.1) 80 96 97 !!!! General case: 81 98 82 99 unpl2k = 1.+ 2.* kappa -
trunk/libf/dyn3d/exner_milieu.F
r124 r127 48 48 REAL SSUM 49 49 EXTERNAL SSUM 50 logical,save :: firstcall=.true. 51 character(len=*),parameter :: modname="exner_milieu" 50 52 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) 53 ! Sanity check 54 if (firstcall) then 55 ! check that vertical discretization is compatible 56 ! with this routine 57 if (disvert_type.ne.2) then 58 call abort_gcm(modname, 59 & "this routine should only be called if disvert_type==2",42) 62 60 endif 63 61 62 ! sanity checks for Shallow Water case (1 vertical layer) 63 if (llm.eq.1) then 64 if (kappa.ne.1) then 65 call abort_gcm(modname, 66 & "kappa!=1 , but running in Shallow Water mode!!",42) 67 endif 68 if (cpp.ne.r) then 69 call abort_gcm(modname, 70 & "cpp!=r , but running in Shallow Water mode!!",42) 71 endif 72 endif ! of if (llm.eq.1) 73 74 firstcall=.false. 75 endif ! of if (firstcall) 76 77 !!!! Specific behaviour for Shallow Water (1 vertical layer) case: 78 if (llm.eq.1) then 79 64 80 ! Compute pks(:),pk(:),pkf(:) 65 81 … … 74 90 ! our work is done, exit routine 75 91 return 92 76 93 endif ! of if (llm.eq.1) 77 94 78 95 !!!! General case: 96 79 97 c ------------- 80 98 c Calcul de pks -
trunk/libf/dyn3d/guide_mod.F90
r1 r127 644 644 ! ----------------------------------------------------------------- 645 645 CALL pression( ip1jmp1, ap, bp, psi, p ) 646 CALL exner_hyb(ip1jmp1,psi,p,alpha,beta,pks,pk,pkf) 647 646 if (disvert_type==1) then 647 CALL exner_hyb(ip1jmp1,psi,p,alpha,beta,pks,pk,pkf) 648 else ! we assume that we are in the disvert_type==2 case 649 CALL exner_milieu(ip1jmp1,psi,p,beta,pks,pk,pkf) 650 endif 648 651 ! .... Calcul de pls , pression au milieu des couches ,en Pascals 649 652 unskap=1./kappa -
trunk/libf/dyn3d/iniacademic.F90
r124 r127 1 1 ! 2 ! $Id: iniacademic.F90 1 474 2011-01-14 11:04:45Z lguez$2 ! $Id: iniacademic.F90 1520 2011-05-23 11:37:09Z emillour $ 3 3 ! 4 4 SUBROUTINE iniacademic(vcov,ucov,teta,q,masse,ps,phis,time_0) … … 71 71 72 72 REAL alpha(ip1jmp1,llm),beta(ip1jmp1,llm),zdtvr 73 74 character(len=*),parameter :: modname="iniacademic" 75 character(len=80) :: abort_message 73 76 74 77 !----------------------------------------------------------------------- … … 76 79 ! -------------------------------------- 77 80 ! 78 79 write(lunout,*) 'Iniacademic'80 81 81 ! initialize planet radius, rotation rate,... 82 82 call conf_planete … … 136 136 teta0=315. ! mean Teta (S.H. 315K) 137 137 CALL getin('teta0',teta0) 138 write(lunout,*) 'Iniacademic - teta0 ',teta0139 write(lunout,*) 'Iniacademic - rad ',rad140 138 ttp=200. ! Tropopause temperature (S.H. 200K) 141 139 CALL getin('ttp',ttp) … … 183 181 tetajl(j,l)=teta0-delt_y*ddsin*ddsin+eps*ddsin & 184 182 -delt_z*(1.-ddsin*ddsin)*log(zsig) 185 !! Aymeric -- tests particuliers186 183 if (planet_type=="giant") then 187 184 tetajl(j,l)=teta0+(delt_y* & … … 207 204 enddo 208 205 enddo 209 ! write(lunout,*) 'Iniacademic - check',tetajl(:,int(llm/2)),rlatu(:)210 206 211 207 ! 3. Initialize fields (if necessary) … … 217 213 218 214 CALL pression ( ip1jmp1, ap, bp, ps, p ) 219 if (planet_type=="earth") then 220 CALL exner_hyb(ip1jmp1,ps,p,alpha,beta,pks,pk,pkf) 215 if (disvert_type.eq.1) then 216 CALL exner_hyb( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf ) 217 elseif (disvert_type.eq.2) then 218 call exner_milieu(ip1jmp1,ps,p,beta,pks,pk,pkf) 221 219 else 222 call exner_milieu(ip1jmp1,ps,p,alpha,beta,pks,pk,pkf) 220 write(abort_message,*) "Wrong value for disvert_type: ", & 221 disvert_type 222 call abort_gcm(modname,abort_message,0) 223 223 endif 224 224 CALL massdair(p,masse) -
trunk/libf/dyn3d/iniconst.F
r109 r127 1 1 ! 2 ! $Id: iniconst.F 1 403 2010-07-01 09:02:53Z fairhead$2 ! $Id: iniconst.F 1520 2011-05-23 11:37:09Z emillour $ 3 3 ! 4 4 SUBROUTINE iniconst 5 5 6 6 USE control_mod 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 7 13 8 14 IMPLICIT NONE … … 22 28 23 29 30 character(len=*),parameter :: modname="iniconst" 31 character(len=80) :: abort_message 24 32 c 25 33 c … … 49 57 r = cpp * kappa 50 58 51 write(lunout,*) 'iniconst: R CP Kappa ', r , cpp,kappa59 write(lunout,*) trim(modname),': R CP Kappa ',r,cpp,kappa 52 60 c 53 61 c----------------------------------------------------------------------- 54 62 55 if (planet_type.eq."earth") then 56 CALL disvert_terre(pa,preff,ap,bp,dpres,presnivs,nivsigs,nivsig) 63 ! vertical discretization: default behavior depends on planet_type flag 64 if (planet_type=="earth") then 65 disvert_type=1 57 66 else 58 CALL disvert_noterre67 disvert_type=2 59 68 endif 60 c 61 RETURN 62 END 69 ! but user can also specify using one or the other in run.def: 70 call getin('disvert_type',disvert_type) 71 write(lunout,*) trim(modname),': disvert_type=',disvert_type 72 73 if (disvert_type==1) then 74 ! standard case for Earth (automatic generation of levels) 75 call disvert(pa,preff,ap,bp,dpres,presnivs,nivsigs,nivsig, 76 & scaleheight) 77 else if (disvert_type==2) then 78 ! standard case for planets (levels generated using z2sig.def file) 79 call disvert_noterre 80 else 81 write(abort_message,*) "Wrong value for disvert_type: ", 82 & disvert_type 83 call abort_gcm(modname,abort_message,0) 84 endif 85 86 END -
trunk/libf/dyn3d/leapfrog.F
r119 r127 178 178 179 179 character*80 dynhist_file, dynhistave_file 180 character(len= 20) :: modname180 character(len=*),parameter :: modname="leapfrog" 181 181 character*80 abort_message 182 182 … … 206 206 endif 207 207 itaufinp1 = itaufin +1 208 modname="leapfrog"209 208 210 209 c INITIALISATIONS … … 238 237 dq(:,:,:)=0. 239 238 CALL pression ( ip1jmp1, ap, bp, ps, p ) 240 if ( planet_type.eq."earth") then239 if (disvert_type==1) then 241 240 CALL exner_hyb( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf ) 242 else 241 else ! we assume that we are in the disvert_type==2 case 243 242 CALL exner_milieu( ip1jmp1, ps, p, beta, pks, pk, pkf ) 244 243 endif … … 409 408 410 409 CALL pression ( ip1jmp1, ap, bp, ps, p ) 411 if ( planet_type.eq."earth") then412 CALL exner_hyb( ip1jmp1, ps, p,alpha,beta,pks, pk, pkf )413 else 410 if (disvert_type==1) then 411 CALL exner_hyb( ip1jmp1, ps, p,alpha,beta,pks, pk, pkf ) 412 else ! we assume that we are in the disvert_type==2 case 414 413 CALL exner_milieu( ip1jmp1, ps, p, beta, pks, pk, pkf ) 415 414 endif … … 531 530 532 531 CALL pression ( ip1jmp1, ap, bp, ps, p ) 533 if ( planet_type.eq."earth") then532 if (disvert_type==1) then 534 533 CALL exner_hyb( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf ) 535 else 534 else ! we assume that we are in the disvert_type==2 case 536 535 CALL exner_milieu( ip1jmp1, ps, p, beta, pks, pk, pkf ) 537 536 endif -
trunk/libf/dyn3d/logic.h
r124 r127 1 1 ! 2 ! $Id: logic.h 1 319 2010-02-23 21:29:54Z fairhead$2 ! $Id: logic.h 1520 2011-05-23 11:37:09Z emillour $ 3 3 ! 4 4 ! … … 11 11 & statcl,conser,apdiss,apdelq,saison,ecripar,fxyhypb,ysinus & 12 12 & ,read_start,ok_guide,ok_strato,ok_gradsfile & 13 & ,ok_limit,ok_etat0, hybrid13 & ,ok_limit,ok_etat0,grilles_gcm_netcdf,hybrid 14 14 15 15 COMMON/logici/ iflag_phys,iflag_trac … … 18 18 & apdiss,apdelq,saison,ecripar,fxyhypb,ysinus & 19 19 & ,read_start,ok_guide,ok_strato,ok_gradsfile & 20 & ,ok_limit,ok_etat0 21 logical hybrid ! vertcal coordinate is hybrid if true (sigma otherwise) 20 & ,ok_limit,ok_etat0,grilles_gcm_netcdf 21 logical hybrid ! vertical coordinate is hybrid if true (sigma otherwise) 22 ! (only used if disvert_type==2) 22 23 23 INTEGERiflag_phys,iflag_trac24 integer iflag_phys,iflag_trac 24 25 !----------------------------------------------------------------------- -
trunk/libf/dyn3dpar/comvert.h
r124 r127 1 1 ! 2 ! $Id: comvert.h 1 279 2009-12-10 09:02:56Z fairhead$2 ! $Id: comvert.h 1520 2011-05-23 11:37:09Z emillour $ 3 3 ! 4 4 !----------------------------------------------------------------------- 5 5 ! INCLUDE 'comvert.h' 6 6 7 COMMON/comvert /ap(llm+1),bp(llm+1),presnivs(llm),dpres(llm),&7 COMMON/comvertr/ap(llm+1),bp(llm+1),presnivs(llm),dpres(llm), & 8 8 & pa,preff,nivsigs(llm),nivsig(llm+1), & 9 9 & aps(llm),bps(llm),scaleheight 10 10 11 REAL ap,bp,presnivs,dpres,pa,preff,nivsigs,nivsig,aps,bps 11 common/comverti/disvert_type 12 13 real ap ! hybrid pressure contribution at interlayers 14 real bp ! hybrid sigma contribution at interlayer 15 real presnivs ! (reference) pressure at mid-layers 16 real dpres 17 real pa ! reference pressure (Pa) at which hybrid coordinates 18 ! become purely pressure 19 real preff ! reference surface pressure (Pa) 20 real nivsigs 21 real nivsig 22 real aps ! hybrid pressure contribution at mid-layers 23 real bps ! hybrid sigma contribution at mid-layers 12 24 real scaleheight ! atmospheric (reference) scale height (km) 13 25 26 integer disvert_type ! type of vertical discretization: 27 ! 1: Earth (default for planet_type==earth), 28 ! automatic generation 29 ! 2: Planets (default for planet_type!=earth), 30 ! using 'z2sig.def' (or 'esasig.def) file 31 14 32 !----------------------------------------------------------------------- -
trunk/libf/dyn3dpar/disvert.F90
r126 r127 1 ! $Id: disvert.F90 1 480 2011-01-31 21:29:58Z jghattas$1 ! $Id: disvert.F90 1520 2011-05-23 11:37:09Z emillour $ 2 2 3 SUBROUTINE disvert _terre(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, *)'disvert: 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,*)'disvert: 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,*) 'disvert: 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, *) 'disvert: BP '129 write(lunout, *) trim(modname),': BP ' 122 130 write(lunout, *) bp 123 write(lunout, *) 'disvert: 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, *) 'disvert: PRESNIVS '147 write(lunout, *) trim(modname),': PRESNIVS ' 140 148 write(lunout, *) presnivs 141 149 142 END SUBROUTINE disvert _terre150 END SUBROUTINE disvert -
trunk/libf/dyn3dpar/etat0_netcdf.F90
r66 r127 1 1 ! 2 ! $Id: etat0_netcdf.F90 1 486 2011-02-11 12:07:39Z fairhead$2 ! $Id: etat0_netcdf.F90 1520 2011-05-23 11:37:09Z emillour $ 3 3 ! 4 4 !------------------------------------------------------------------------------- 5 5 ! 6 SUBROUTINE etat0_netcdf(ib, masque, letat0)6 SUBROUTINE etat0_netcdf(ib, masque, phis, letat0) 7 7 ! 8 8 !------------------------------------------------------------------------------- … … 37 37 LOGICAL, INTENT(IN) :: ib ! barycentric interpolat. 38 38 REAL, DIMENSION(iip1,jjp1), INTENT(INOUT) :: masque ! land mask 39 REAL, DIMENSION(iip1,jjp1), INTENT(OUT) :: phis ! geopotentiel au sol 39 40 LOGICAL, INTENT(IN) :: letat0 ! F: masque only required 40 41 #ifndef CPP_EARTH … … 51 52 REAL, DIMENSION(klon) :: tsol, qsol 52 53 REAL, DIMENSION(klon) :: sn, rugmer, run_off_lic_0 53 REAL, DIMENSION(iip1,jjp1) :: orog, rugo, psol , phis54 REAL, DIMENSION(iip1,jjp1) :: orog, rugo, psol 54 55 REAL, DIMENSION(iip1,jjp1,llm+1) :: p3d 55 56 REAL, DIMENSION(iip1,jjp1,llm) :: uvent, t3d, tpot, qsat, qd … … 138 139 flag_aerosol, new_aod, & 139 140 bl95_b0, bl95_b1, & 140 iflag_thermals,nsplit_thermals,tau_thermals, & 141 iflag_thermals_ed,iflag_thermals_optflux, & 142 iflag_coupl,iflag_clos,iflag_wake, read_climoz, & 141 read_climoz, & 143 142 alp_offset) 144 143 … … 252 251 !******************************************************************************* 253 252 CALL pression(ip1jmp1, ap, bp, psol, p3d) 254 CALL exner_hyb(ip1jmp1, psol, p3d, alpha, beta, pks, pk, y) 253 if (disvert_type.eq.1) then 254 CALL exner_hyb(ip1jmp1, psol, p3d, alpha, beta, pks, pk, y) 255 else ! we assume that we are in the disvert_type==2 case 256 CALL exner_milieu(ip1jmp1,psol,p3d,beta,pks,pk,y) 257 endif 255 258 pls(:,:,:)=preff*(pk(:,:,:)/cpp)**(1./kappa) 256 259 ! WRITE(lunout,*) 'P3D :', p3d(10,20,:) -
trunk/libf/dyn3dpar/exner_hyb.F
r1 r127 51 51 REAL SSUM 52 52 c 53 logical,save :: firstcall=.true. 54 character(len=*),parameter :: modname="exner_hyb" 55 56 ! Sanity check 57 if (firstcall) then 58 ! check that vertical discretization is compatible 59 ! with this routine 60 if (disvert_type.ne.1) then 61 call abort_gcm(modname, 62 & "this routine should only be called if disvert_type==1",42) 63 endif 64 65 ! sanity checks for Shallow Water case (1 vertical layer) 66 if (llm.eq.1) then 67 if (kappa.ne.1) then 68 call abort_gcm(modname, 69 & "kappa!=1 , but running in Shallow Water mode!!",42) 70 endif 71 if (cpp.ne.r) then 72 call abort_gcm(modname, 73 & "cpp!=r , but running in Shallow Water mode!!",42) 74 endif 75 endif ! of if (llm.eq.1) 76 77 firstcall=.false. 78 endif ! of if (firstcall) 53 79 54 80 if (llm.eq.1) then 55 ! Specific behaviour for Shallow Water (1 vertical layer) case56 57 ! Sanity checks58 if (kappa.ne.1) then59 call abort_gcm("exner_hyb",60 & "kappa!=1 , but running in Shallow Water mode!!",42)61 endif62 if (cpp.ne.r) then63 call abort_gcm("exner_hyb",64 & "cpp!=r , but running in Shallow Water mode!!",42)65 endif66 81 67 82 ! Compute pks(:),pk(:),pkf(:) … … 77 92 ! our work is done, exit routine 78 93 return 94 79 95 endif ! of if (llm.eq.1) 80 96 97 !!!! General case: 81 98 82 99 unpl2k = 1.+ 2.* kappa -
trunk/libf/dyn3dpar/exner_hyb_p.F
r1 r127 53 53 EXTERNAL SSUM 54 54 INTEGER ije,ijb,jje,jjb 55 c 56 c$OMP BARRIER 57 58 if (llm.eq.1) then 59 ! Specific behaviour for Shallow Water (1 vertical layer) case 60 61 ! Sanity checks 62 if (kappa.ne.1) then 63 call abort_gcm("exner_hyb", 64 & "kappa!=1 , but running in Shallow Water mode!!",42) 65 endif 66 if (cpp.ne.r) then 67 call abort_gcm("exner_hyb", 68 & "cpp!=r , but running in Shallow Water mode!!",42) 55 logical,save :: firstcall=.true. 56 !$OMP THREADPRIVATE(firstcall) 57 character(len=*),parameter :: modname="exner_hyb_p" 58 c 59 60 ! Sanity check 61 if (firstcall) then 62 ! check that vertical discretization is compatible 63 ! with this routine 64 if (disvert_type.ne.1) then 65 call abort_gcm(modname, 66 & "this routine should only be called if disvert_type==1",42) 69 67 endif 70 68 69 ! sanity checks for Shallow Water case (1 vertical layer) 70 if (llm.eq.1) then 71 if (kappa.ne.1) then 72 call abort_gcm(modname, 73 & "kappa!=1 , but running in Shallow Water mode!!",42) 74 endif 75 if (cpp.ne.r) then 76 call abort_gcm(modname, 77 & "cpp!=r , but running in Shallow Water mode!!",42) 78 endif 79 endif ! of if (llm.eq.1) 80 81 firstcall=.false. 82 endif ! of if (firstcall) 83 84 c$OMP BARRIER 85 86 ! Specific behaviour for Shallow Water (1 vertical layer) case 87 if (llm.eq.1) then 88 71 89 ! Compute pks(:),pk(:),pkf(:) 72 90 ijb=ij_begin … … 116 134 endif ! of if (llm.eq.1) 117 135 136 !!!! General case: 118 137 119 138 unpl2k = 1.+ 2.* kappa -
trunk/libf/dyn3dpar/exner_milieu.F
r124 r127 48 48 REAL SSUM 49 49 EXTERNAL SSUM 50 logical,save :: firstcall=.true. 51 character(len=*),parameter :: modname="exner_milieu" 50 52 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) 53 ! Sanity check 54 if (firstcall) then 55 ! check that vertical discretization is compatible 56 ! with this routine 57 if (disvert_type.ne.2) then 58 call abort_gcm(modname, 59 & "this routine should only be called if disvert_type==2",42) 62 60 endif 63 61 62 ! sanity checks for Shallow Water case (1 vertical layer) 63 if (llm.eq.1) then 64 if (kappa.ne.1) then 65 call abort_gcm(modname, 66 & "kappa!=1 , but running in Shallow Water mode!!",42) 67 endif 68 if (cpp.ne.r) then 69 call abort_gcm(modname, 70 & "cpp!=r , but running in Shallow Water mode!!",42) 71 endif 72 endif ! of if (llm.eq.1) 73 74 firstcall=.false. 75 endif ! of if (firstcall) 76 77 !!!! Specific behaviour for Shallow Water (1 vertical layer) case: 78 if (llm.eq.1) then 79 64 80 ! Compute pks(:),pk(:),pkf(:) 65 81 … … 74 90 ! our work is done, exit routine 75 91 return 92 76 93 endif ! of if (llm.eq.1) 77 94 78 95 !!!! General case: 96 79 97 c ------------- 80 98 c Calcul de pks -
trunk/libf/dyn3dpar/exner_milieu_p.F
r124 r127 50 50 EXTERNAL SSUM 51 51 INTEGER ije,ijb,jje,jjb 52 53 c$OMP BARRIER 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) 52 logical,save :: firstcall=.true. 53 !$OMP THREADPRIVATE(firstcall) 54 character(len=*),parameter :: modname="exner_milieu_p" 55 56 ! Sanity check 57 if (firstcall) then 58 ! check that vertical discretization is compatible 59 ! with this routine 60 if (disvert_type.ne.2) then 61 call abort_gcm(modname, 62 & "this routine should only be called if disvert_type==2",42) 66 63 endif 67 64 65 ! sanity checks for Shallow Water case (1 vertical layer) 66 if (llm.eq.1) then 67 if (kappa.ne.1) then 68 call abort_gcm(modname, 69 & "kappa!=1 , but running in Shallow Water mode!!",42) 70 endif 71 if (cpp.ne.r) then 72 call abort_gcm(modname, 73 & "cpp!=r , but running in Shallow Water mode!!",42) 74 endif 75 endif ! of if (llm.eq.1) 76 77 firstcall=.false. 78 endif ! of if (firstcall) 79 80 c$OMP BARRIER 81 82 ! Specific behaviour for Shallow Water (1 vertical layer) case 83 if (llm.eq.1) then 84 68 85 ! Compute pks(:),pk(:),pkf(:) 69 86 ijb=ij_begin … … 113 130 endif ! of if (llm.eq.1) 114 131 132 !!!! General case: 133 115 134 c ------------- 116 135 c Calcul de pks -
trunk/libf/dyn3dpar/guide_p_mod.F90
r1 r127 19 19 ! --------------------------------------------- 20 20 INTEGER, PRIVATE, SAVE :: iguide_read,iguide_int,iguide_sav 21 INTEGER, PRIVATE, SAVE :: nlevnc 21 INTEGER, PRIVATE, SAVE :: nlevnc, guide_plevs 22 22 LOGICAL, PRIVATE, SAVE :: guide_u,guide_v,guide_T,guide_Q,guide_P 23 23 LOGICAL, PRIVATE, SAVE :: guide_hr,guide_teta 24 24 LOGICAL, PRIVATE, SAVE :: guide_BL,guide_reg,guide_add,gamma4,guide_zon 25 LOGICAL, PRIVATE, SAVE :: guide_modele,invert_p,invert_y,ini_anal26 LOGICAL, PRIVATE, SAVE :: guide_2D,guide_sav 25 LOGICAL, PRIVATE, SAVE :: invert_p,invert_y,ini_anal 26 LOGICAL, PRIVATE, SAVE :: guide_2D,guide_sav,guide_modele 27 27 28 28 REAL, PRIVATE, SAVE :: tau_min_u,tau_max_u … … 48 48 REAL, ALLOCATABLE, DIMENSION(:,:,:), PRIVATE, SAVE :: tnat1,tnat2 49 49 REAL, ALLOCATABLE, DIMENSION(:,:,:), PRIVATE, SAVE :: qnat1,qnat2 50 REAL, ALLOCATABLE, DIMENSION(:,:,:), PRIVATE, SAVE :: pnat1,pnat2 50 51 REAL, ALLOCATABLE, DIMENSION(:,:), PRIVATE, SAVE :: psnat1,psnat2 51 52 REAL, ALLOCATABLE, DIMENSION(:), PRIVATE, SAVE :: apnc,bpnc … … 65 66 66 67 SUBROUTINE guide_init 67 68 68 69 USE control_mod 69 70 IMPLICIT NONE … … 127 128 ! Parametres pour lecture des fichiers 128 129 CALL getpar('iguide_read',4,iguide_read,'freq. lecture guidage') 129 CALL getpar('iguide_int',4,iguide_int,'freq. lecture guidage') 130 IF (iguide_int.GT.0) THEN 130 CALL getpar('iguide_int',4,iguide_int,'freq. interpolation vert') 131 IF (iguide_int.EQ.0) THEN 132 iguide_int=1 133 ELSEIF (iguide_int.GT.0) THEN 131 134 iguide_int=day_step/iguide_int 132 135 ELSE 133 136 iguide_int=day_step*iguide_int 134 137 ENDIF 135 CALL getpar('guide_modele',.false.,guide_modele,'guidage niveaux modele') 138 CALL getpar('guide_plevs',0,guide_plevs,'niveaux pression fichiers guidage') 139 ! Pour compatibilite avec ancienne version avec guide_modele 140 CALL getpar('guide_modele',.false.,guide_modele,'niveaux pression ap+bp*psol') 141 IF (guide_modele) THEN 142 guide_plevs=1 143 ENDIF 144 ! Fin raccord 136 145 CALL getpar('ini_anal',.false.,ini_anal,'Etat initial = analyse') 137 146 CALL getpar('guide_invertp',.true.,invert_p,'niveaux p inverses') … … 144 153 ! --------------------------------------------- 145 154 ncidpl=-99 146 if (guide_ modele) then155 if (guide_plevs.EQ.1) then 147 156 if (ncidpl.eq.-99) rcod=nf90_open('apbp.nc',Nf90_NOWRITe, ncidpl) 148 else 149 if (guide_u) then150 if (ncidpl.eq.-99) rcod=nf90_open('u.nc',Nf90_NOWRITe,ncidpl)151 elseif (guide_v) then152 if (ncidpl.eq.-99) rcod=nf90_open('v.nc',nf90_nowrite,ncidpl)153 elseif (guide_T) then154 if (ncidpl.eq.-99) rcod=nf90_open('T.nc',nf90_nowrite,ncidpl)155 elseif (guide_Q) then156 if (ncidpl.eq.-99) rcod=nf90_open('hur.nc',nf90_nowrite, ncidpl)157 endif157 elseif (guide_plevs.EQ.2) then 158 if (ncidpl.EQ.-99) rcod=nf90_open('P.nc',Nf90_NOWRITe,ncidpl) 159 elseif (guide_u) then 160 if (ncidpl.eq.-99) rcod=nf90_open('u.nc',Nf90_NOWRITe,ncidpl) 161 elseif (guide_v) then 162 if (ncidpl.eq.-99) rcod=nf90_open('v.nc',nf90_nowrite,ncidpl) 163 elseif (guide_T) then 164 if (ncidpl.eq.-99) rcod=nf90_open('T.nc',nf90_nowrite,ncidpl) 165 elseif (guide_Q) then 166 if (ncidpl.eq.-99) rcod=nf90_open('hur.nc',nf90_nowrite, ncidpl) 158 167 endif 159 168 error=NF_INQ_DIMID(ncidpl,'LEVEL',rid) … … 240 249 ENDIF 241 250 242 IF (guide_P.OR.guide_modele) THEN 251 IF (guide_plevs.EQ.2) THEN 252 ALLOCATE(pnat1(iip1,jjp1,nlevnc), stat = error) 253 IF (error /= 0) CALL abort_gcm(modname,abort_message,1) 254 ALLOCATE(pnat2(iip1,jjp1,nlevnc), stat = error) 255 IF (error /= 0) CALL abort_gcm(modname,abort_message,1) 256 pnat1=0.;pnat2=0.; 257 ENDIF 258 259 IF (guide_P.OR.guide_plevs.EQ.1) THEN 243 260 ALLOCATE(psnat1(iip1,jjp1), stat = error) 244 261 IF (error /= 0) CALL abort_gcm(modname,abort_message,1) … … 267 284 IF (guide_T) tnat1=tnat2 268 285 IF (guide_Q) qnat1=qnat2 269 IF (guide_P.OR.guide_modele) psnat1=psnat2 286 IF (guide_plevs.EQ.2) pnat1=pnat2 287 IF (guide_P.OR.guide_plevs.EQ.1) psnat1=psnat2 270 288 271 289 END SUBROUTINE guide_init … … 293 311 LOGICAL :: f_out ! sortie guidage 294 312 REAL, DIMENSION (ip1jmp1,llm) :: f_add ! var aux: champ de guidage 295 REAL, DIMENSION (ip1jmp1,llm) :: p ! besoin si guide_P 313 ! Variables pour fonction Exner (P milieu couche) 314 REAL, DIMENSION (iip1,jjp1,llm) :: pk, pkf 315 REAL, DIMENSION (iip1,jjp1,llm) :: alpha, beta 316 REAL, DIMENSION (iip1,jjp1) :: pks 317 REAL :: unskap 318 REAL, DIMENSION (ip1jmp1,llmp1) :: p ! besoin si guide_P 296 319 ! Compteurs temps: 297 320 INTEGER, SAVE :: step_rea,count_no_rea,itau_test ! lecture guidage … … 300 323 REAL, SAVE :: factt ! pas de temps en fraction de jour 301 324 302 INTEGER :: l325 INTEGER :: i,j,l 303 326 304 327 ijb_u=ij_begin ; ije_u=ij_end ; ijn_u=ije_u-ijb_u+1 … … 313 336 ENDIF 314 337 315 316 317 338 PRINT *,'---> on rentre dans guide_main' 318 339 ! CALL AllGather_Field(ucov,ip1jmp1,llm) … … 380 401 dday_step=real(day_step) 381 402 IF (iguide_read.LT.0) THEN 382 tau=ditau/dday_step/ 403 tau=ditau/dday_step/REAL(iguide_read) 383 404 ELSE 384 tau= 405 tau=REAL(iguide_read)*ditau/dday_step 385 406 ENDIF 386 407 reste=tau-AINT(tau) … … 394 415 IF (guide_T) tnat1(:,jjb_u:jje_u,:)=tnat2(:,jjb_u:jje_u,:) 395 416 IF (guide_Q) qnat1(:,jjb_u:jje_u,:)=qnat2(:,jjb_u:jje_u,:) 396 IF (guide_P.OR.guide_modele) psnat1(:,jjb_u:jje_u)=psnat2(:,jjb_u:jje_u) 417 IF (guide_plevs.EQ.2) pnat1(:,jjb_u:jje_u,:)=pnat2(:,jjb_u:jje_u,:) 418 IF (guide_P.OR.guide_plevs.EQ.1) psnat1(:,jjb_u:jje_u)=psnat2(:,jjb_u:jje_u) 397 419 step_rea=step_rea+1 398 420 itau_test=itau … … 430 452 ! Sauvegarde du guidage? 431 453 f_out=((MOD(itau,iguide_sav).EQ.0).AND.guide_sav) 432 IF (f_out) CALL guide_out("S",jjp1,1,ps) 454 IF (f_out) THEN 455 ! Calcul niveaux pression milieu de couches 456 CALL pression_p( ip1jmp1, ap, bp, ps, p ) 457 if (disvert_type==1) then 458 CALL exner_hyb_p(ip1jmp1,ps,p,alpha,beta,pks,pk,pkf) 459 else 460 CALL exner_milieu_p(ip1jmp1,ps,p,beta,pks,pk,pkf) 461 endif 462 unskap=1./kappa 463 DO l = 1, llm 464 DO j=jjb_u,jje_u 465 DO i =1, iip1 466 p(i+(j-1)*iip1,l) = preff * ( pk(i,j,l)/cpp) ** unskap 467 ENDDO 468 ENDDO 469 ENDDO 470 CALL guide_out("P",jjp1,llm,p(1:ip1jmp1,1:llm),1.) 471 ENDIF 433 472 434 473 if (guide_u) then … … 441 480 if (guide_zon) CALL guide_zonave(1,jjp1,llm,f_add) 442 481 CALL guide_addfield(ip1jmp1,llm,f_add,alpha_u) 443 IF (f_out) CALL guide_out("U",jjp1,llm,f_add /factt)482 IF (f_out) CALL guide_out("U",jjp1,llm,f_add(:,:),factt) 444 483 ucov(ijb_u:ije_u,:)=ucov(ijb_u:ije_u,:)+f_add(ijb_u:ije_u,:) 445 484 endif … … 453 492 if (guide_zon) CALL guide_zonave(2,jjp1,llm,f_add) 454 493 CALL guide_addfield(ip1jmp1,llm,f_add,alpha_T) 455 IF (f_out) CALL guide_out("T",jjp1,llm,f_add /factt)494 IF (f_out) CALL guide_out("T",jjp1,llm,f_add(:,:),factt) 456 495 teta(ijb_u:ije_u,:)=teta(ijb_u:ije_u,:)+f_add(ijb_u:ije_u,:) 457 496 endif … … 465 504 if (guide_zon) CALL guide_zonave(2,jjp1,1,f_add(1:ip1jmp1,1)) 466 505 CALL guide_addfield(ip1jmp1,1,f_add(1:ip1jmp1,1),alpha_P) 467 IF (f_out) CALL guide_out(" P",jjp1,1,f_add(1:ip1jmp1,1)/factt)506 IF (f_out) CALL guide_out("SP",jjp1,1,f_add(1:ip1jmp1,1),factt) 468 507 ps(ijb_u:ije_u)=ps(ijb_u:ije_u)+f_add(ijb_u:ije_u,1) 469 508 CALL pression_p(ip1jmp1,ap,bp,ps,p) … … 479 518 if (guide_zon) CALL guide_zonave(2,jjp1,llm,f_add) 480 519 CALL guide_addfield(ip1jmp1,llm,f_add,alpha_Q) 481 IF (f_out) CALL guide_out("Q",jjp1,llm,f_add /factt)520 IF (f_out) CALL guide_out("Q",jjp1,llm,f_add(:,:),factt) 482 521 q(ijb_u:ije_u,:)=q(ijb_u:ije_u,:)+f_add(ijb_u:ije_u,:) 483 522 endif … … 492 531 if (guide_zon) CALL guide_zonave(2,jjm,llm,f_add(1:ip1jm,:)) 493 532 CALL guide_addfield(ip1jm,llm,f_add(1:ip1jm,:),alpha_v) 494 IF (f_out) CALL guide_out("V",jjm,llm,f_add(1:ip1jm,:) /factt)533 IF (f_out) CALL guide_out("V",jjm,llm,f_add(1:ip1jm,:),factt) 495 534 vcov(ijb_v:ije_v,:)=vcov(ijb_v:ije_v,:)+f_add(ijb_v:ije_v,:) 496 535 endif … … 580 619 ENDDO 581 620 ENDDO 582 fieldm(:,l)=fieldm(:,l)/ 621 fieldm(:,l)=fieldm(:,l)/REAL(imax(typ)-imin(typ)+1) 583 622 ! Compute forcing 584 623 DO j=jjb_v,jje_v … … 598 637 ENDDO 599 638 ENDDO 600 fieldm(:,l)=fieldm(:,l)/ 639 fieldm(:,l)=fieldm(:,l)/REAL(imax(typ)-imin(typ)+1) 601 640 ! Compute forcing 602 641 DO j=jjb_u,jje_u … … 640 679 REAL, DIMENSION (iip1,jjp1,llm) :: alpha, beta 641 680 REAL, DIMENSION (iip1,jjp1) :: pks 642 REAL :: prefkap,unskap681 REAL :: unskap 643 682 ! Pression de vapeur saturante 644 683 REAL, DIMENSION (ip1jmp1,llm) :: qsat … … 652 691 print *,'Guide: conversion variables guidage' 653 692 ! ----------------------------------------------------------------- 654 ! Calcul des niveaux de pression champs guidage 693 ! Calcul des niveaux de pression champs guidage (pour T et Q) 655 694 ! ----------------------------------------------------------------- 656 if (guide_modele) then 657 do i=1,iip1 658 do j=jjb_u,jje_u 659 do l=1,nlevnc 660 plnc2(i,j,l)=apnc(l)+bpnc(l)*psnat2(i,j) 661 plnc1(i,j,l)=apnc(l)+bpnc(l)*psnat1(i,j) 662 enddo 663 enddo 664 enddo 665 else 666 do i=1,iip1 667 do j=jjb_u,jje_u 668 do l=1,nlevnc 669 plnc2(i,j,l)=apnc(l) 670 plnc1(i,j,l)=apnc(l) 671 enddo 672 enddo 673 enddo 674 675 endif 695 IF (guide_plevs.EQ.0) THEN 696 DO l=1,nlevnc 697 DO j=jjb_u,jje_u 698 DO i=1,iip1 699 plnc2(i,j,l)=apnc(l) 700 plnc1(i,j,l)=apnc(l) 701 ENDDO 702 ENDDO 703 ENDDO 704 ENDIF 705 676 706 if (first) then 677 707 first=.FALSE. … … 683 713 enddo 684 714 print*,'Fichiers guidage' 685 do l=1,nlevnc 686 print*,'PL(',l,')=',plnc2(1,jjb_u,l) 687 enddo 715 SELECT CASE (guide_plevs) 716 CASE (0) 717 do l=1,nlevnc 718 print*,'PL(',l,')=',plnc2(1,jjb_u,l) 719 enddo 720 CASE (1) 721 DO l=1,nlevnc 722 print*,'PL(',l,')=',apnc(l)+bpnc(l)*psnat2(i,jjb_u) 723 ENDDO 724 CASE (2) 725 do l=1,nlevnc 726 print*,'PL(',l,')=',pnat2(1,jjb_u,l) 727 enddo 728 END SELECT 688 729 print *,'inversion de l''ordre: invert_p=',invert_p 689 730 if (guide_u) then … … 702 743 ! Calcul niveaux pression modele 703 744 ! ----------------------------------------------------------------- 704 CALL pression_p( ip1jmp1, ap, bp, psi, p )705 CALL exner_hyb_p(ip1jmp1,psi,p,alpha,beta,pks,pk,pkf)706 745 707 746 ! .... Calcul de pls , pression au milieu des couches ,en Pascals 708 unskap=1./kappa709 prefkap = preff ** kappa710 DO l = 1, llm 711 DO j=jjb_u,jje_u 712 DO i =1, iip1713 pls(i,j,l) = preff * ( pk(i,j,l)/cpp) ** unskap 714 747 IF (guide_plevs.EQ.1) THEN 748 DO l=1,llm 749 DO j=jjb_u,jje_u 750 DO i =1, iip1 751 pls(i,j,l)=(ap(l)+ap(l+1))/2.+psi(i,j)*(bp(l)+bp(l+1))/2. 752 ENDDO 753 ENDDO 715 754 ENDDO 716 ENDDO 755 ELSE 756 CALL pression_p( ip1jmp1, ap, bp, psi, p ) 757 if (disvert_type==1) then 758 CALL exner_hyb_p(ip1jmp1,psi,p,alpha,beta,pks,pk,pkf) 759 else ! we assume that we are in the disvert_type==2 case 760 CALL exner_milieu_p(ip1jmp1,psi,p,beta,pks,pk,pkf) 761 endif 762 unskap=1./kappa 763 DO l = 1, llm 764 DO j=jjb_u,jje_u 765 DO i =1, iip1 766 pls(i,j,l) = preff * ( pk(i,j,l)/cpp) ** unskap 767 ENDDO 768 ENDDO 769 ENDDO 770 ENDIF 717 771 718 772 ! calcul des pressions pour les grilles u et v … … 747 801 748 802 ! ----------------------------------------------------------------- 749 ! Interpolation champs guidage sur niveaux modele (+inversion N/S)803 ! Interpolation verticale champs guidage sur niveaux modele 750 804 ! Conversion en variables gcm (ucov, vcov...) 751 805 ! ----------------------------------------------------------------- … … 762 816 endif 763 817 818 IF (guide_T) THEN 819 ! Calcul des nouvelles valeurs des niveaux de pression du guidage 820 IF (guide_plevs.EQ.1) THEN 821 DO l=1,nlevnc 822 DO j=jjb_u,jje_u 823 DO i=1,iip1 824 plnc2(i,j,l)=apnc(l)+bpnc(l)*psnat2(i,j) 825 plnc1(i,j,l)=apnc(l)+bpnc(l)*psnat1(i,j) 826 ENDDO 827 ENDDO 828 ENDDO 829 ELSE IF (guide_plevs.EQ.2) THEN 830 DO l=1,nlevnc 831 DO j=jjb_u,jje_u 832 DO i=1,iip1 833 plnc2(i,j,l)=pnat2(i,j,l) 834 plnc1(i,j,l)=pnat1(i,j,l) 835 ENDDO 836 ENDDO 837 ENDDO 838 ENDIF 839 840 ! Interpolation verticale 841 CALL pres2lev(tnat1(:,jjb_u:jje_u,:),zu1(:,jjb_u:jje_u,:),nlevnc,llm, & 842 plnc1(:,jjb_u:jje_u,:),plsnc(:,jjb_u:jje_u,:),iip1,jjn_u,invert_p) 843 CALL pres2lev(tnat2(:,jjb_u:jje_u,:),zu2(:,jjb_u:jje_u,:),nlevnc,llm, & 844 plnc2(:,jjb_u:jje_u,:),plsnc(:,jjb_u:jje_u,:),iip1,jjn_u,invert_p) 845 846 ! Conversion en variables GCM 847 do l=1,llm 848 do j=jjb_u,jje_u 849 IF (guide_teta) THEN 850 do i=1,iim 851 ij=(j-1)*iip1+i 852 tgui1(ij,l)=zu1(i,j,l) 853 tgui2(ij,l)=zu2(i,j,l) 854 enddo 855 ELSE 856 do i=1,iim 857 ij=(j-1)*iip1+i 858 tgui1(ij,l)=zu1(i,j,l)*cpp/pk(i,j,l) 859 tgui2(ij,l)=zu2(i,j,l)*cpp/pk(i,j,l) 860 enddo 861 ENDIF 862 tgui1(j*iip1,l)=tgui1((j-1)*iip1+1,l) 863 tgui2(j*iip1,l)=tgui2((j-1)*iip1+1,l) 864 enddo 865 do i=1,iip1 866 tgui1(i,l)=tgui1(1,l) 867 tgui1(ip1jm+i,l)=tgui1(ip1jm+1,l) 868 tgui2(i,l)=tgui2(1,l) 869 tgui2(ip1jm+i,l)=tgui2(ip1jm+1,l) 870 enddo 871 enddo 872 ENDIF 873 874 IF (guide_Q) THEN 875 ! Calcul des nouvelles valeurs des niveaux de pression du guidage 876 IF (guide_plevs.EQ.1) THEN 877 DO l=1,nlevnc 878 DO j=jjb_u,jje_u 879 DO i=1,iip1 880 plnc2(i,j,l)=apnc(l)+bpnc(l)*psnat2(i,j) 881 plnc1(i,j,l)=apnc(l)+bpnc(l)*psnat1(i,j) 882 ENDDO 883 ENDDO 884 ENDDO 885 ELSE IF (guide_plevs.EQ.2) THEN 886 DO l=1,nlevnc 887 DO j=jjb_u,jje_u 888 DO i=1,iip1 889 plnc2(i,j,l)=pnat2(i,j,l) 890 plnc1(i,j,l)=pnat1(i,j,l) 891 ENDDO 892 ENDDO 893 ENDDO 894 ENDIF 895 896 ! Interpolation verticale 897 CALL pres2lev(qnat1(:,jjb_u:jje_u,:),zu1(:,jjb_u:jje_u,:),nlevnc,llm, & 898 plnc1(:,jjb_u:jje_u,:),plsnc(:,jjb_u:jje_u,:),iip1,jjn_u,invert_p) 899 CALL pres2lev(qnat2(:,jjb_u:jje_u,:),zu2(:,jjb_u:jje_u,:),nlevnc,llm, & 900 plnc2(:,jjb_u:jje_u,:),plsnc(:,jjb_u:jje_u,:),iip1,jjn_u,invert_p) 901 902 ! Conversion en variables GCM 903 ! On suppose qu'on a la bonne variable dans le fichier de guidage: 904 ! Hum.Rel si guide_hr, Hum.Spec. sinon. 905 do l=1,llm 906 do j=jjb_u,jje_u 907 do i=1,iim 908 ij=(j-1)*iip1+i 909 qgui1(ij,l)=zu1(i,j,l) 910 qgui2(ij,l)=zu2(i,j,l) 911 enddo 912 qgui1(j*iip1,l)=qgui1((j-1)*iip1+1,l) 913 qgui2(j*iip1,l)=qgui2((j-1)*iip1+1,l) 914 enddo 915 do i=1,iip1 916 qgui1(i,l)=qgui1(1,l) 917 qgui1(ip1jm+i,l)=qgui1(ip1jm+1,l) 918 qgui2(i,l)=qgui2(1,l) 919 qgui2(ip1jm+i,l)=qgui2(ip1jm+1,l) 920 enddo 921 enddo 922 IF (guide_hr) THEN 923 CALL q_sat(iip1*jjn_u*llm,teta(:,jjb_u:jje_u,:)*pk(:,jjb_u:jje_u,:)/cpp, & 924 plsnc(:,jjb_u:jje_u,:),qsat(ijb_u:ije_u,:)) 925 qgui1(ijb_u:ije_u,:)=qgui1(ijb_u:ije_u,:)*qsat(ijb_u:ije_u,:)*0.01 !hum. rel. en % 926 qgui2(ijb_u:ije_u,:)=qgui2(ijb_u:ije_u,:)*qsat(ijb_u:ije_u,:)*0.01 927 ENDIF 928 ENDIF 929 764 930 IF (guide_u) THEN 931 ! Calcul des nouvelles valeurs des niveaux de pression du guidage 932 IF (guide_plevs.EQ.1) THEN 933 DO l=1,nlevnc 934 DO j=jjb_u,jje_u 935 DO i=1,iim 936 plnc2(i,j,l)=apnc(l)+bpnc(l)*(psnat2(i,j)*aire(i,j)*alpha1p2(i,j) & 937 & +psnat2(i+1,j)*aire(i+1,j)*alpha3p4(i+1,j))/aireu(i,j) 938 plnc1(i,j,l)=apnc(l)+bpnc(l)*(psnat1(i,j)*aire(i,j)*alpha1p2(i,j) & 939 & +psnat1(i+1,j)*aire(i+1,j)*alpha3p4(i+1,j))/aireu(i,j) 940 ENDDO 941 plnc2(iip1,j,l)=plnc2(1,j,l) 942 plnc1(iip1,j,l)=plnc1(1,j,l) 943 ENDDO 944 ENDDO 945 ELSE IF (guide_plevs.EQ.2) THEN 946 DO l=1,nlevnc 947 DO j=jjb_u,jje_u 948 DO i=1,iim 949 plnc2(i,j,l)=(pnat2(i,j,l)*aire(i,j)*alpha1p2(i,j) & 950 & +pnat2(i+1,j,l)*aire(i,j)*alpha3p4(i+1,j))/aireu(i,j) 951 plnc1(i,j,l)=(pnat1(i,j,l)*aire(i,j)*alpha1p2(i,j) & 952 & +pnat1(i+1,j,l)*aire(i,j)*alpha3p4(i+1,j))/aireu(i,j) 953 ENDDO 954 plnc2(iip1,j,l)=plnc2(1,j,l) 955 plnc1(iip1,j,l)=plnc1(1,j,l) 956 ENDDO 957 ENDDO 958 ENDIF 959 960 ! Interpolation verticale 765 961 CALL pres2lev(unat1(:,jjb_u:jje_u,:),zu1(:,jjb_u:jje_u,:),nlevnc,llm, & 766 962 plnc1(:,jjb_u:jje_u,:),plunc(:,jjb_u:jje_u,:),iip1,jjn_u,invert_p) … … 768 964 plnc2(:,jjb_u:jje_u,:),plunc(:,jjb_u:jje_u,:),iip1,jjn_u,invert_p) 769 965 966 ! Conversion en variables GCM 770 967 do l=1,llm 771 968 do j=jjb_u,jje_u … … 787 984 ENDIF 788 985 789 IF (guide_T) THEN790 CALL pres2lev(tnat1(:,jjb_u:jje_u,:),zu1(:,jjb_u:jje_u,:),nlevnc,llm, &791 plnc1(:,jjb_u:jje_u,:),plsnc(:,jjb_u:jje_u,:),iip1,jjn_u,invert_p)792 CALL pres2lev(tnat2(:,jjb_u:jje_u,:),zu2(:,jjb_u:jje_u,:),nlevnc,llm, &793 plnc2(:,jjb_u:jje_u,:),plsnc(:,jjb_u:jje_u,:),iip1,jjn_u,invert_p)794 795 do l=1,llm796 do j=jjb_u,jje_u797 IF (guide_teta) THEN798 do i=1,iim799 ij=(j-1)*iip1+i800 tgui1(ij,l)=zu1(i,j,l)801 tgui2(ij,l)=zu2(i,j,l)802 enddo803 ELSE804 do i=1,iim805 ij=(j-1)*iip1+i806 tgui1(ij,l)=zu1(i,j,l)*cpp/pk(i,j,l)807 tgui2(ij,l)=zu2(i,j,l)*cpp/pk(i,j,l)808 enddo809 ENDIF810 tgui1(j*iip1,l)=tgui1((j-1)*iip1+1,l)811 tgui2(j*iip1,l)=tgui2((j-1)*iip1+1,l)812 enddo813 do i=1,iip1814 tgui1(i,l)=tgui1(1,l)815 tgui1(ip1jm+i,l)=tgui1(ip1jm+1,l)816 tgui2(i,l)=tgui2(1,l)817 tgui2(ip1jm+i,l)=tgui2(ip1jm+1,l)818 enddo819 enddo820 ENDIF821 822 986 IF (guide_v) THEN 823 987 ! Calcul des nouvelles valeurs des niveaux de pression du guidage 988 IF (guide_plevs.EQ.1) THEN 989 CALL Register_SwapFieldHallo(psnat1,psnat1,ip1jmp1,1,jj_Nb_caldyn,1,2,Req) 990 CALL SendRequest(Req) 991 CALL WaitRequest(Req) 992 CALL Register_SwapFieldHallo(psnat2,psnat2,ip1jmp1,1,jj_Nb_caldyn,1,2,Req) 993 CALL SendRequest(Req) 994 CALL WaitRequest(Req) 995 DO l=1,nlevnc 996 DO j=jjb_v,jje_v 997 DO i=1,iip1 998 plnc2(i,j,l)=apnc(l)+bpnc(l)*(psnat2(i,j)*aire(i,j)*alpha2p3(i,j) & 999 & +psnat2(i,j+1)*aire(i,j+1)*alpha1p4(i,j+1))/airev(i,j) 1000 plnc1(i,j,l)=apnc(l)+bpnc(l)*(psnat1(i,j)*aire(i,j)*alpha2p3(i,j) & 1001 & +psnat1(i,j+1)*aire(i,j+1)*alpha1p4(i,j+1))/airev(i,j) 1002 ENDDO 1003 ENDDO 1004 ENDDO 1005 ELSE IF (guide_plevs.EQ.2) THEN 1006 CALL Register_SwapFieldHallo(pnat1,pnat1,ip1jmp1,llm,jj_Nb_caldyn,1,2,Req) 1007 CALL SendRequest(Req) 1008 CALL WaitRequest(Req) 1009 CALL Register_SwapFieldHallo(pnat2,pnat2,ip1jmp1,llm,jj_Nb_caldyn,1,2,Req) 1010 CALL SendRequest(Req) 1011 CALL WaitRequest(Req) 1012 DO l=1,nlevnc 1013 DO j=jjb_v,jje_v 1014 DO i=1,iip1 1015 plnc2(i,j,l)=(pnat2(i,j,l)*aire(i,j)*alpha2p3(i,j) & 1016 & +pnat2(i,j+1,l)*aire(i,j)*alpha1p4(i,j+1))/airev(i,j) 1017 plnc1(i,j,l)=(pnat1(i,j,l)*aire(i,j)*alpha2p3(i,j) & 1018 & +pnat1(i,j+1,l)*aire(i,j)*alpha1p4(i,j+1))/airev(i,j) 1019 ENDDO 1020 ENDDO 1021 ENDDO 1022 ENDIF 1023 ! Interpolation verticale 824 1024 CALL pres2lev(vnat1(:,jjb_v:jje_v,:),zv1(:,jjb_v:jje_v,:),nlevnc,llm, & 825 1025 plnc1(:,jjb_v:jje_v,:),plvnc(:,jjb_v:jje_v,:),iip1,jjn_v,invert_p) 826 1026 CALL pres2lev(vnat2(:,jjb_v:jje_v,:),zv2(:,jjb_v:jje_v,:),nlevnc,llm, & 827 1027 plnc2(:,jjb_v:jje_v,:),plvnc(:,jjb_v:jje_v,:),iip1,jjn_v,invert_p) 828 1028 ! Conversion en variables GCM 829 1029 do l=1,llm 830 1030 do j=jjb_v,jje_v … … 840 1040 ENDIF 841 1041 842 IF (guide_Q) THEN843 ! On suppose qu'on a la bonne variable dans le fichier de guidage:844 ! Hum.Rel si guide_hr, Hum.Spec. sinon.845 CALL pres2lev(qnat1(:,jjb_u:jje_u,:),zu1(:,jjb_u:jje_u,:),nlevnc,llm, &846 plnc1(:,jjb_u:jje_u,:),plsnc(:,jjb_u:jje_u,:),iip1,jjn_u,invert_p)847 CALL pres2lev(qnat2(:,jjb_u:jje_u,:),zu2(:,jjb_u:jje_u,:),nlevnc,llm, &848 plnc2(:,jjb_u:jje_u,:),plsnc(:,jjb_u:jje_u,:),iip1,jjn_u,invert_p)849 850 do l=1,llm851 do j=jjb_u,jjb_v852 do i=1,iim853 ij=(j-1)*iip1+i854 qgui1(ij,l)=zu1(i,j,l)855 qgui2(ij,l)=zu2(i,j,l)856 enddo857 qgui1(j*iip1,l)=qgui1((j-1)*iip1+1,l)858 qgui2(j*iip1,l)=qgui2((j-1)*iip1+1,l)859 enddo860 do i=1,iip1861 qgui1(i,l)=qgui1(1,l)862 qgui1(ip1jm+i,l)=qgui1(ip1jm+1,l)863 qgui2(i,l)=qgui2(1,l)864 qgui2(ip1jm+i,l)=qgui2(ip1jm+1,l)865 enddo866 enddo867 IF (guide_hr) THEN868 CALL q_sat(iip1*jjn_u*llm,teta(:,jjb_u:jje_u,:)*pk(:,jjb_u:jje_u,:)/cpp, &869 plsnc(:,jjb_u:jje_u,:),qsat(ijb_u:ije_u,:))870 qgui1(ijb_u:ije_u,:)=qgui1(ijb_u:ije_u,:)*qsat(ijb_u:ije_u,:)*0.01 !hum. rel. en %871 qgui2(ijb_u:ije_u,:)=qgui2(ijb_u:ije_u,:)*qsat(ijb_u:ije_u,:)*0.01872 ENDIF873 ENDIF874 1042 875 1043 END SUBROUTINE guide_interp … … 1055 1223 LOGICAL, SAVE :: first=.TRUE. 1056 1224 ! Identification fichiers et variables NetCDF: 1057 INTEGER, SAVE :: ncidu,varidu,ncidv,varidv,ncid Q1058 INTEGER, SAVE :: varidQ,ncidt,varidt,ncidps,varidps1225 INTEGER, SAVE :: ncidu,varidu,ncidv,varidv,ncidp,varidp 1226 INTEGER, SAVE :: ncidQ,varidQ,ncidt,varidt,ncidps,varidps 1059 1227 INTEGER :: ncidpl,varidpl,varidap,varidbp 1060 1228 ! Variables auxiliaires NetCDF: … … 1068 1236 ncidpl=-99 1069 1237 print*,'Guide: ouverture des fichiers guidage ' 1070 ! Niveaux de pression si non constants1071 if (guide_ modele) then1072 print *,'Lecture du guidage sur niveaux mod �le'1238 ! Ap et Bp si Niveaux de pression hybrides 1239 if (guide_plevs.EQ.1) then 1240 print *,'Lecture du guidage sur niveaux modele' 1073 1241 rcode = nf90_open('apbp.nc', nf90_nowrite, ncidpl) 1074 1242 rcode = nf90_inq_varid(ncidpl, 'AP', varidap) 1075 1243 rcode = nf90_inq_varid(ncidpl, 'BP', varidbp) 1076 1244 print*,'ncidpl,varidap',ncidpl,varidap 1245 endif 1246 ! Pression si guidage sur niveaux P variables 1247 if (guide_plevs.EQ.2) then 1248 rcode = nf90_open('P.nc', nf90_nowrite, ncidp) 1249 rcode = nf90_inq_varid(ncidp, 'PRES', varidp) 1250 print*,'ncidp,varidp',ncidp,varidp 1251 if (ncidpl.eq.-99) ncidpl=ncidp 1077 1252 endif 1078 1253 ! Vent zonal … … 1105 1280 endif 1106 1281 ! Pression de surface 1107 if ((guide_P).OR.(guide_ modele)) then1282 if ((guide_P).OR.(guide_plevs.EQ.1)) then 1108 1283 rcode = nf90_open('ps.nc', nf90_nowrite, ncidps) 1109 1284 rcode = nf90_inq_varid(ncidps, 'SP', varidps) … … 1111 1286 endif 1112 1287 ! Coordonnee verticale 1113 if ( .not.guide_modele) then1288 if (guide_plevs.EQ.0) then 1114 1289 rcode = nf90_inq_varid(ncidpl, 'LEVEL', varidpl) 1115 1290 IF (rcode.NE.0) rcode = nf90_inq_varid(ncidpl, 'PRESSURE', varidpl) … … 1117 1292 endif 1118 1293 ! Coefs ap, bp pour calcul de la pression aux differents niveaux 1119 if (guide_modele) then1294 IF (guide_plevs.EQ.1) THEN 1120 1295 #ifdef NC_DOUBLE 1121 1296 status=NF_GET_VARA_DOUBLE(ncidpl,varidap,1,nlevnc,apnc) … … 1125 1300 status=NF_GET_VARA_REAL(ncidpl,varidbp,1,nlevnc,bpnc) 1126 1301 #endif 1127 else1302 ELSEIF (guide_plevs.EQ.0) THEN 1128 1303 #ifdef NC_DOUBLE 1129 1304 status=NF_GET_VARA_DOUBLE(ncidpl,varidpl,1,nlevnc,apnc) … … 1133 1308 apnc=apnc*100.! conversion en Pascals 1134 1309 bpnc(:)=0. 1135 endif1310 ENDIF 1136 1311 first=.FALSE. 1137 endif! (first)1312 ENDIF ! (first) 1138 1313 1139 1314 ! ----------------------------------------------------------------- … … 1152 1327 count(4)=1 1153 1328 1329 ! Pression 1330 if (guide_plevs.EQ.2) then 1331 #ifdef NC_DOUBLE 1332 status=NF_GET_VARA_DOUBLE(ncidp,varidp,start,count,pnat2) 1333 #else 1334 status=NF_GET_VARA_REAL(ncidp,varidp,start,count,pnat2) 1335 #endif 1336 IF (invert_y) THEN 1337 CALL invert_lat(iip1,jjp1,nlevnc,pnat2) 1338 ENDIF 1339 endif 1340 1154 1341 ! Vent zonal 1155 1342 if (guide_u) then … … 1204 1391 1205 1392 ! Pression de surface 1206 if ((guide_P).OR.(guide_ modele)) then1393 if ((guide_P).OR.(guide_plevs.EQ.1)) then 1207 1394 start(3)=timestep 1208 1395 start(4)=0 … … 1235 1422 LOGICAL, SAVE :: first=.TRUE. 1236 1423 ! Identification fichiers et variables NetCDF: 1237 INTEGER, SAVE :: ncidu,varidu,ncidv,varidv,ncid Q1238 INTEGER, SAVE :: varidQ,ncidt,varidt,ncidps,varidps1424 INTEGER, SAVE :: ncidu,varidu,ncidv,varidv,ncidp,varidp 1425 INTEGER, SAVE :: ncidQ,varidQ,ncidt,varidt,ncidps,varidps 1239 1426 INTEGER :: ncidpl,varidpl,varidap,varidbp 1240 1427 ! Variables auxiliaires NetCDF: … … 1252 1439 ncidpl=-99 1253 1440 print*,'Guide: ouverture des fichiers guidage ' 1254 ! Niveaux de pression si non constants1255 if (guide_ modele) then1441 ! Ap et Bp si niveaux de pression hybrides 1442 if (guide_plevs.EQ.1) then 1256 1443 print *,'Lecture du guidage sur niveaux mod�le' 1257 1444 rcode = nf90_open('apbp.nc', nf90_nowrite, ncidpl) … … 1259 1446 rcode = nf90_inq_varid(ncidpl, 'BP', varidbp) 1260 1447 print*,'ncidpl,varidap',ncidpl,varidap 1448 endif 1449 ! Pression 1450 if (guide_plevs.EQ.2) then 1451 rcode = nf90_open('P.nc', nf90_nowrite, ncidp) 1452 rcode = nf90_inq_varid(ncidp, 'PRES', varidp) 1453 print*,'ncidp,varidp',ncidp,varidp 1454 if (ncidpl.eq.-99) ncidpl=ncidp 1261 1455 endif 1262 1456 ! Vent zonal … … 1289 1483 endif 1290 1484 ! Pression de surface 1291 if ((guide_P).OR.(guide_ modele)) then1485 if ((guide_P).OR.(guide_plevs.EQ.1)) then 1292 1486 rcode = nf90_open('ps.nc', nf90_nowrite, ncidps) 1293 1487 rcode = nf90_inq_varid(ncidps, 'SP', varidps) … … 1295 1489 endif 1296 1490 ! Coordonnee verticale 1297 if ( .not.guide_modele) then1491 if (guide_plevs.EQ.0) then 1298 1492 rcode = nf90_inq_varid(ncidpl, 'LEVEL', varidpl) 1299 1493 IF (rcode.NE.0) rcode = nf90_inq_varid(ncidpl, 'PRESSURE', varidpl) … … 1301 1495 endif 1302 1496 ! Coefs ap, bp pour calcul de la pression aux differents niveaux 1303 if (guide_ modele) then1497 if (guide_plevs.EQ.1) then 1304 1498 #ifdef NC_DOUBLE 1305 1499 status=NF_GET_VARA_DOUBLE(ncidpl,varidap,1,nlevnc,apnc) … … 1309 1503 status=NF_GET_VARA_REAL(ncidpl,varidbp,1,nlevnc,bpnc) 1310 1504 #endif 1311 else 1505 elseif (guide_plevs.EQ.0) THEN 1312 1506 #ifdef NC_DOUBLE 1313 1507 status=NF_GET_VARA_DOUBLE(ncidpl,varidpl,1,nlevnc,apnc) … … 1336 1530 count(4)=1 1337 1531 1532 ! Pression 1533 if (guide_plevs.EQ.2) then 1534 #ifdef NC_DOUBLE 1535 status=NF_GET_VARA_DOUBLE(ncidp,varidp,start,count,zu) 1536 #else 1537 status=NF_GET_VARA_REAL(ncidp,varidp,start,count,zu) 1538 #endif 1539 DO i=1,iip1 1540 pnat2(i,:,:)=zu(:,:) 1541 ENDDO 1542 1543 IF (invert_y) THEN 1544 CALL invert_lat(iip1,jjp1,nlevnc,pnat2) 1545 ENDIF 1546 endif 1338 1547 ! Vent zonal 1339 1548 if (guide_u) then … … 1350 1559 CALL invert_lat(iip1,jjp1,nlevnc,unat2) 1351 1560 ENDIF 1352 1353 1561 endif 1354 1562 … … 1367 1575 CALL invert_lat(iip1,jjp1,nlevnc,tnat2) 1368 1576 ENDIF 1369 1370 1577 endif 1371 1578 … … 1384 1591 CALL invert_lat(iip1,jjp1,nlevnc,qnat2) 1385 1592 ENDIF 1386 1387 1593 endif 1388 1594 … … 1402 1608 CALL invert_lat(iip1,jjm,nlevnc,vnat2) 1403 1609 ENDIF 1404 1405 1610 endif 1406 1611 1407 1612 ! Pression de surface 1408 if ((guide_P).OR.(guide_ modele)) then1613 if ((guide_P).OR.(guide_plevs.EQ.1)) then 1409 1614 start(3)=timestep 1410 1615 start(4)=0 … … 1424 1629 CALL invert_lat(iip1,jjp1,1,psnat2) 1425 1630 ENDIF 1426 1427 1631 endif 1428 1632 … … 1430 1634 1431 1635 !======================================================================= 1432 SUBROUTINE guide_out(varname,hsize,vsize,field )1636 SUBROUTINE guide_out(varname,hsize,vsize,field,factt) 1433 1637 USE parallel 1434 1638 IMPLICIT NONE … … 1445 1649 INTEGER, INTENT (IN) :: hsize,vsize 1446 1650 REAL, DIMENSION (iip1,hsize,vsize), INTENT(IN) :: field 1651 REAL, INTENT (IN) :: factt 1447 1652 1448 1653 ! Variables locales … … 1507 1712 ! -------------------------------------------------------------------- 1508 1713 ierr = NF_REDEF(nid) 1509 ! Surface pressure (GCM)1510 dim 3=(/id_lonv,id_latu,id_tim/)1511 ierr = NF_DEF_VAR(nid," SP",NF_FLOAT,3,dim3,varid)1714 ! Pressure (GCM) 1715 dim4=(/id_lonv,id_latu,id_lev,id_tim/) 1716 ierr = NF_DEF_VAR(nid,"P",NF_FLOAT,4,dim4,varid) 1512 1717 ! Surface pressure (guidage) 1513 1718 IF (guide_P) THEN … … 1543 1748 ! Enregistrement du champ 1544 1749 ! -------------------------------------------------------------------- 1750 1545 1751 ierr=NF_OPEN("guide_ins.nc",NF_WRITE,nid) 1546 1752 1547 1753 SELECT CASE (varname) 1548 CASE (" S")1754 CASE ("P") 1549 1755 timestep=timestep+1 1550 ierr = NF_INQ_VARID(nid," SP",varid)1551 start=(/1,1, timestep,0/)1552 count=(/iip1,jjp1, 1,0/)1756 ierr = NF_INQ_VARID(nid,"P",varid) 1757 start=(/1,1,1,timestep/) 1758 count=(/iip1,jjp1,llm,1/) 1553 1759 #ifdef NC_DOUBLE 1554 1760 ierr = NF_PUT_VARA_DOUBLE(nid,varid,start,count,field) … … 1556 1762 ierr = NF_PUT_VARA_REAL(nid,varid,start,count,field) 1557 1763 #endif 1558 CASE (" P")1764 CASE ("SP") 1559 1765 ierr = NF_INQ_VARID(nid,"ps",varid) 1560 1766 start=(/1,1,timestep,0/) 1561 1767 count=(/iip1,jjp1,1,0/) 1562 1768 #ifdef NC_DOUBLE 1563 ierr = NF_PUT_VARA_DOUBLE(nid,varid,start,count,field )1564 #else 1565 ierr = NF_PUT_VARA_REAL(nid,varid,start,count,field )1769 ierr = NF_PUT_VARA_DOUBLE(nid,varid,start,count,field/factt) 1770 #else 1771 ierr = NF_PUT_VARA_REAL(nid,varid,start,count,field/factt) 1566 1772 #endif 1567 1773 CASE ("U") … … 1570 1776 count=(/iip1,jjp1,llm,1/) 1571 1777 #ifdef NC_DOUBLE 1572 ierr = NF_PUT_VARA_DOUBLE(nid,varid,start,count,field )1573 #else 1574 ierr = NF_PUT_VARA_REAL(nid,varid,start,count,field )1778 ierr = NF_PUT_VARA_DOUBLE(nid,varid,start,count,field/factt) 1779 #else 1780 ierr = NF_PUT_VARA_REAL(nid,varid,start,count,field/factt) 1575 1781 #endif 1576 1782 CASE ("V") … … 1579 1785 count=(/iip1,jjm,llm,1/) 1580 1786 #ifdef NC_DOUBLE 1581 ierr = NF_PUT_VARA_DOUBLE(nid,varid,start,count,field )1582 #else 1583 ierr = NF_PUT_VARA_REAL(nid,varid,start,count,field )1787 ierr = NF_PUT_VARA_DOUBLE(nid,varid,start,count,field/factt) 1788 #else 1789 ierr = NF_PUT_VARA_REAL(nid,varid,start,count,field/factt) 1584 1790 #endif 1585 1791 CASE ("T") … … 1588 1794 count=(/iip1,jjp1,llm,1/) 1589 1795 #ifdef NC_DOUBLE 1590 ierr = NF_PUT_VARA_DOUBLE(nid,varid,start,count,field )1591 #else 1592 ierr = NF_PUT_VARA_REAL(nid,varid,start,count,field )1796 ierr = NF_PUT_VARA_DOUBLE(nid,varid,start,count,field/factt) 1797 #else 1798 ierr = NF_PUT_VARA_REAL(nid,varid,start,count,field/factt) 1593 1799 #endif 1594 1800 CASE ("Q") … … 1597 1803 count=(/iip1,jjp1,llm,1/) 1598 1804 #ifdef NC_DOUBLE 1599 ierr = NF_PUT_VARA_DOUBLE(nid,varid,start,count,field )1600 #else 1601 ierr = NF_PUT_VARA_REAL(nid,varid,start,count,field )1805 ierr = NF_PUT_VARA_DOUBLE(nid,varid,start,count,field/factt) 1806 #else 1807 ierr = NF_PUT_VARA_REAL(nid,varid,start,count,field/factt) 1602 1808 #endif 1603 1809 END SELECT -
trunk/libf/dyn3dpar/iniacademic.F90
r124 r127 1 1 ! 2 ! $Id: iniacademic.F90 1 474 2011-01-14 11:04:45Z lguez$2 ! $Id: iniacademic.F90 1520 2011-05-23 11:37:09Z emillour $ 3 3 ! 4 4 SUBROUTINE iniacademic(vcov,ucov,teta,q,masse,ps,phis,time_0) … … 71 71 72 72 REAL alpha(ip1jmp1,llm),beta(ip1jmp1,llm),zdtvr 73 74 character(len=*),parameter :: modname="iniacademic" 75 character(len=80) :: abort_message 73 76 74 77 !----------------------------------------------------------------------- … … 76 79 ! -------------------------------------- 77 80 ! 78 79 write(lunout,*) 'Iniacademic'80 81 81 ! initialize planet radius, rotation rate,... 82 82 call conf_planete … … 136 136 teta0=315. ! mean Teta (S.H. 315K) 137 137 CALL getin('teta0',teta0) 138 write(lunout,*) 'Iniacademic - teta0 ',teta0139 write(lunout,*) 'Iniacademic - rad ',rad140 138 ttp=200. ! Tropopause temperature (S.H. 200K) 141 139 CALL getin('ttp',ttp) … … 183 181 tetajl(j,l)=teta0-delt_y*ddsin*ddsin+eps*ddsin & 184 182 -delt_z*(1.-ddsin*ddsin)*log(zsig) 185 !! Aymeric -- tests particuliers186 183 if (planet_type=="giant") then 187 184 tetajl(j,l)=teta0+(delt_y* & … … 207 204 enddo 208 205 enddo 209 ! write(lunout,*) 'Iniacademic - check',tetajl(:,int(llm/2)),rlatu(:)210 206 211 207 ! 3. Initialize fields (if necessary) … … 217 213 218 214 CALL pression ( ip1jmp1, ap, bp, ps, p ) 219 if (planet_type=="earth") then 220 CALL exner_hyb(ip1jmp1,ps,p,alpha,beta,pks,pk,pkf) 215 if (disvert_type.eq.1) then 216 CALL exner_hyb( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf ) 217 elseif (disvert_type.eq.2) then 218 call exner_milieu(ip1jmp1,ps,p,beta,pks,pk,pkf) 221 219 else 222 call exner_milieu(ip1jmp1,ps,p,alpha,beta,pks,pk,pkf) 220 write(abort_message,*) "Wrong value for disvert_type: ", & 221 disvert_type 222 call abort_gcm(modname,abort_message,0) 223 223 endif 224 224 CALL massdair(p,masse) -
trunk/libf/dyn3dpar/iniconst.F
r109 r127 1 1 ! 2 ! $Id: iniconst.F 1 403 2010-07-01 09:02:53Z fairhead$2 ! $Id: iniconst.F 1520 2011-05-23 11:37:09Z emillour $ 3 3 ! 4 4 SUBROUTINE iniconst 5 5 6 6 USE control_mod 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 7 13 8 14 IMPLICIT NONE … … 22 28 23 29 30 character(len=*),parameter :: modname="iniconst" 31 character(len=80) :: abort_message 24 32 c 25 33 c … … 49 57 r = cpp * kappa 50 58 51 write(lunout,*) 'iniconst: R CP Kappa ', r , cpp,kappa59 write(lunout,*) trim(modname),': R CP Kappa ',r,cpp,kappa 52 60 c 53 61 c----------------------------------------------------------------------- 54 62 55 if (planet_type.eq."earth") then 56 CALL disvert_terre(pa,preff,ap,bp,dpres,presnivs,nivsigs,nivsig) 63 ! vertical discretization: default behavior depends on planet_type flag 64 if (planet_type=="earth") then 65 disvert_type=1 57 66 else 58 CALL disvert_noterre67 disvert_type=2 59 68 endif 60 c 61 RETURN 62 END 69 ! but user can also specify using one or the other in run.def: 70 call getin('disvert_type',disvert_type) 71 write(lunout,*) trim(modname),': disvert_type=',disvert_type 72 73 if (disvert_type==1) then 74 ! standard case for Earth (automatic generation of levels) 75 call disvert(pa,preff,ap,bp,dpres,presnivs,nivsigs,nivsig, 76 & scaleheight) 77 else if (disvert_type==2) then 78 ! standard case for planets (levels generated using z2sig.def file) 79 call disvert_noterre 80 else 81 write(abort_message,*) "Wrong value for disvert_type: ", 82 & disvert_type 83 call abort_gcm(modname,abort_message,0) 84 endif 85 86 END -
trunk/libf/dyn3dpar/leapfrog_p.F
r124 r127 271 271 272 272 CALL pression ( ip1jmp1, ap, bp, ps, p ) 273 if ( planet_type.eq."earth") then273 if (disvert_type==1) then 274 274 CALL exner_hyb( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf ) 275 else 275 else ! we assume that we are in the disvert_type==2 case 276 276 CALL exner_milieu( ip1jmp1, ps, p, beta, pks, pk, pkf ) 277 277 endif … … 751 751 752 752 c$OMP BARRIER 753 if ( planet_type.eq."earth") then754 CALL exner_hyb_p( ip1jmp1, ps, p,alpha,beta,pks, pk, pkf )755 else 756 CALL exner_milieu_p( ip1jmp1, ps, p, beta, pks, pk, pkf )753 if (disvert_type==1) then 754 CALL exner_hyb_p( ip1jmp1, ps, p,alpha,beta,pks, pk, pkf ) 755 else ! we assume that we are in the disvert_type==2 case 756 CALL exner_milieu_p( ip1jmp1, ps, p, beta, pks, pk, pkf ) 757 757 endif 758 758 c$OMP BARRIER … … 1105 1105 CALL pression_p ( ip1jmp1, ap, bp, ps, p ) 1106 1106 c$OMP BARRIER 1107 if ( planet_type.eq."earth") then1107 if (disvert_type==1) then 1108 1108 CALL exner_hyb_p( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf ) 1109 else 1109 else ! we assume that we are in the disvert_type==2 case 1110 1110 CALL exner_milieu_p( ip1jmp1, ps, p, beta, pks, pk, pkf ) 1111 1111 endif -
trunk/libf/dyn3dpar/logic.h
r124 r127 1 1 ! 2 ! $Id: logic.h 1 319 2010-02-23 21:29:54Z fairhead$2 ! $Id: logic.h 1520 2011-05-23 11:37:09Z emillour $ 3 3 ! 4 4 ! … … 11 11 & statcl,conser,apdiss,apdelq,saison,ecripar,fxyhypb,ysinus & 12 12 & ,read_start,ok_guide,ok_strato,ok_gradsfile & 13 & ,ok_limit,ok_etat0, hybrid13 & ,ok_limit,ok_etat0,grilles_gcm_netcdf,hybrid 14 14 15 15 COMMON/logici/ iflag_phys,iflag_trac … … 18 18 & apdiss,apdelq,saison,ecripar,fxyhypb,ysinus & 19 19 & ,read_start,ok_guide,ok_strato,ok_gradsfile & 20 & ,ok_limit,ok_etat0 21 logical hybrid ! vertcal coordinate is hybrid if true (sigma otherwise) 20 & ,ok_limit,ok_etat0,grilles_gcm_netcdf 21 logical hybrid ! vertical coordinate is hybrid if true (sigma otherwise) 22 ! (only used if disvert_type==2) 22 23 23 INTEGERiflag_phys,iflag_trac24 integer iflag_phys,iflag_trac 24 25 !$OMP THREADPRIVATE(/logicl/) 25 26 !$OMP THREADPRIVATE(/logici/)
Note: See TracChangeset
for help on using the changeset viewer.