Changeset 808 for trunk/LMDZ.VENUS/libf
- Timestamp:
- Oct 16, 2012, 12:57:35 PM (12 years ago)
- Location:
- trunk/LMDZ.VENUS/libf/phyvenus
- Files:
-
- 7 added
- 12 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.VENUS/libf/phyvenus/clcdrag.F90
r97 r808 40 40 INTEGER :: i 41 41 REAL :: zdu2, ztsolv, ztvd, zscf 42 REAL :: zucf , zcr42 REAL :: zucf 43 43 REAL :: friv, frih 44 44 REAL, dimension(klon) :: zcfm1, zcfm2 … … 93 93 pcfh(i) = zcdn(i)* fins(zri(i)) 94 94 ENDIF 95 zcr = (0.0016/(zcdn(i)*SQRT(zdu2)))*ABS(ztvd-ztsolv)**(1./3.)96 95 ENDIF 97 96 END DO -
trunk/LMDZ.VENUS/libf/phyvenus/clmain.F
r101 r808 342 342 y_cd_m(1:knon) = ycoefh(1:knon,1) 343 343 endif 344 344 345 call ustarhb(knon,yu,yv,y_cd_m, yustar) 345 346 -
trunk/LMDZ.VENUS/libf/phyvenus/flott_gwd_ran.F90
r778 r808 50 50 ! 0.3.1 GRAVITY-WAVES SPECIFICATIONS 51 51 52 !VENUS INTEGER, PARAMETER:: NK = 4, NP = 4, NO = 4, NW = NK * NP * NO 52 !VENUS 53 INTEGER, PARAMETER:: NK = 2, NP = 2, NO = 2, NW = NK * NP * NO 53 54 !Online output: change NO 54 INTEGER, PARAMETER:: NK = 1, NP = 2, NO = 10, NW = NK * NP * NO55 ! INTEGER, PARAMETER:: NK = 1, NP = 2, NO = 11, NW = NK * NP * NO 55 56 INTEGER JK, JP, JO, JW 56 57 REAL KMIN, KMAX ! Min and Max horizontal wavenumbers … … 85 86 ! 0.3.3 BACKGROUND FLOW AT 1/2 LEVELS AND VERTICAL COORDINATE 86 87 87 REAL H0(KLON, KLEV) ! Characteristic Height of the atmosphere 88 REAL PR ! Reference Pressure 89 90 REAL ZH(KLON, KLEV + 1) ! Log-pressure altitude 88 REAL H0bis(KLON, KLEV) ! Characteristic Height of the atmosphere 89 REAL H0 ! Characteristic Height of the atmosphere 90 REAL PR, TR ! Reference Pressure and Temperature 91 92 REAL ZH(KLON, KLEV + 1) ! Log-pressure altitude (constant H0) 93 REAL ZHbis(KLON, KLEV + 1) ! Log-pressure altitude (varying H) 91 94 92 95 REAL UH(KLON, KLEV + 1), VH(KLON, KLEV + 1) ! Winds at 1/2 levels … … 109 112 DATA firstcall/.true./ 110 113 114 REAL ALEAS 115 EXTERNAL ALEAS 116 111 117 !----------------------------------------------------------------- 112 118 ! 1. INITIALISATIONS … … 130 136 !Online output: one value only 131 137 if (output) then 132 KMIN = 1.3E-5133 KMAX = 1.3E-5138 KMIN = 6.3E-6 139 KMAX = 6.3E-6 134 140 endif 135 141 CMIN = 1. ! Min phase velocity 136 CMAX = 6 0. ! Max phase speed velocity142 CMAX = 61. ! Max phase speed velocity 137 143 XLAUNCH=0.6 ! Parameter that control launching altitude 138 144 139 145 PR = 9.2e6 ! Reference pressure ! VENUS!! 146 TR = 240. ! Reference Temperature ! VENUS: cloud layer 147 H0 = RD * TR / RG ! Characteristic vertical scale height 140 148 141 149 BVSEC = 1.E-5 ! Security to avoid negative BVF 142 PSEC = 1.E- 6! Security to avoid division by 0 pressure143 ZOISEC = 1.E- 6! Security FOR 0 INTRINSIC FREQ150 PSEC = 1.E-8 ! Security to avoid division by 0 pressure 151 ZOISEC = 1.E-8 ! Security FOR 0 INTRINSIC FREQ 144 152 145 153 IF(DELTAT.LT.DTIME)THEN … … 171 179 DO II = 1, KLON 172 180 ! Horizontal wavenumber amplitude 173 ZK(JW, II) = KMIN + (KMAX - KMIN) * MOD(TT(II, JW) * 100., 1.) 181 ! ZK(JW, II) = KMIN + (KMAX - KMIN) * MOD(TT(II, JW) * 100., 1.) 182 ZK(JW, II) = KMIN + (KMAX - KMIN) * ALEAS(0.) 174 183 ! Horizontal phase speed 175 CPHA = CMIN + (CMAX - CMIN) * MOD(TT(II, JW)**2, 1.) 184 ! CPHA = CMIN + (CMAX - CMIN) * MOD(TT(II, JW)**2, 1.) 185 CPHA = CMIN + (CMAX - CMIN) * ALEAS(0.) 176 186 !Online output: linear 177 if (output) CPHA = CMIN + (CMAX - CMIN) * JO/NO187 if (output) CPHA = CMIN + (CMAX - CMIN) * (JO-1)/(NO-1) 178 188 ! Intrinsic frequency 179 189 ZO(JW, II) = CPHA * ZK(JW, II) … … 181 191 ! RUW0(JW, II) = RUWMAX / REAL(NW) & 182 192 RUW0(JW, II) = RUWMAX & 183 * MOD(100. * (UU(II, JW)**2 + VV(II, JW)**2), 1.) 193 ! * MOD(100. * (UU(II, JW)**2 + VV(II, JW)**2), 1.) 194 * ALEAS(0.) 195 !Online output: fixed to max 196 if (output) RUW0(JW, II) = RUWMAX 184 197 ENDDO 185 198 end DO … … 209 222 210 223 ! Log pressure vert. coordinate (altitude above surface) 211 ZH (:,1) = 0.224 ZHbis(:,1) = 0. 212 225 DO LL = 2, KLEV + 1 213 H0(:, LL-1) = RD * TT(:, LL-1) / RG 214 ZH(:, LL) = ZH(:, LL-1) + H0(:, LL-1)*(PH(:, LL-1)-PH(:,LL))/PP(:, LL-1) 215 end DO 226 H0bis(:, LL-1) = RD * TT(:, LL-1) / RG 227 ZHbis(:, LL) = ZHbis(:, LL-1) & 228 + H0bis(:, LL-1)*(PH(:, LL-1)-PH(:,LL))/PP(:, LL-1) 229 end DO 230 ! Log pressure vert. coordinate 231 DO LL = 1, KLEV + 1 232 ZH(:, LL) = H0 * LOG(PR / (PH(:, LL) + PSEC)) 233 end DO 234 216 235 217 236 ! Winds and BV frequency … … 221 240 ! BVSEC: BV Frequency 222 241 ! VENUS ATTENTION: CP VARIABLE PSTAB CALCULE EN AMONT DES PARAMETRISATIONS 223 BV(:, LL) = SQRT(MAX(BVSEC,pn2(:,LL)))242 BV(:, LL) = MAX(BVSEC,SQRT(pn2(:,LL))) 224 243 end DO 225 244 BV(:, 1) = BV(:, 2) … … 269 288 270 289 !Online output 271 write(str2,'(i2)') NW+ 1290 write(str2,'(i2)') NW+2 272 291 outform="("//str2//"(E12.4,1X))" 273 if (output) WRITE(11,outform) ZH(IEQ, 1) / 1000., (ZO(JW, IEQ)/ZK(JW, IEQ)*COS(ZP(JW)), JW = 1, NW) 292 if (output) WRITE(11,outform) ZH(IEQ, 1) / 1000., ZHbis(IEQ, 1) / 1000., & 293 (ZO(JW, IEQ)/ZK(JW, IEQ)*COS(ZP(JW)), JW = 1, NW) 274 294 275 295 DO LL = LAUNCH, KLEV - 1 … … 300 320 ! Saturation (Eq. 12) 301 321 * ZOP(JW, :)**2 / ZK(JW, :)/BV(:, LL+1) & 302 * EXP(-ZH(:, LL + 1)/2./H0 (:,LL)) * SAT)322 * EXP(-ZH(:, LL + 1)/2./H0) * SAT) 303 323 end DO 304 324 … … 310 330 RUWP(JW, :) = ZOP(JW, :)/MAX(ABS(ZOP(JW, :)), ZOISEC)**2 & 311 331 *BV(:,LL+1)& 312 * COS(ZP(JW)) * MAX(WWP(JW, :),1e-30)**2332 * COS(ZP(JW)) * WWP(JW, :)**2 313 333 RVWP(JW, :) = ZOP(JW, :)/MAX(ABS(ZOP(JW, :)), ZOISEC)**2 & 314 334 *BV(:,LL+1)& 315 * SIN(ZP(JW)) * MAX(WWP(JW, :),1e-30)**2335 * SIN(ZP(JW)) * WWP(JW, :)**2 316 336 end DO 317 337 ! … … 324 344 end DO 325 345 !Online output 326 if (output) WRITE(11,outform) ZH(IEQ, LL + 1) / 1000., (RUWP(JW, IEQ), JW = 1, NW) 346 if (output) then 347 do JW=1,NW 348 if(RUWP(JW, IEQ).gt.0.) then 349 RUWP(JW, IEQ) = max(RUWP(JW, IEQ), 1.e-99) 350 else 351 RUWP(JW, IEQ) = min(RUWP(JW, IEQ), -1.e-99) 352 endif 353 enddo 354 WRITE(11,outform) ZH(IEQ, LL+1) / 1000., & 355 ZHbis(IEQ, LL+1) / 1000., & 356 (RUWP(JW, IEQ), JW = 1, NW) 357 endif 327 358 328 359 end DO … … 357 388 / (PH(:, LL + 1) - PH(:, LL)) * DTIME 358 389 ENDDO 390 d_t = 0. 359 391 ! ON CONSERVE LA MEMOIRE un certain temps AVEC UN SAVE 360 392 d_u = DTIME/DELTAT/REAL(NW) * d_u + (1.-DTIME/DELTAT) * d_u_sav … … 373 405 374 406 END SUBROUTINE FLOTT_GWD_RAN 407 408 !=================================================================== 409 !=================================================================== 410 !=================================================================== 411 !=================================================================== 412 413 FUNCTION ALEAS (R) 414 !***BEGIN PROLOGUE ALEAS 415 !***PURPOSE Generate a uniformly distributed random number. 416 !***LIBRARY SLATEC (FNLIB) 417 !***CATEGORY L6A21 418 !***TYPE SINGLE PRECISION (ALEAS-S) 419 !***KEYWORDS FNLIB, ALEAS NUMBER, SPECIAL FUNCTIONS, UNIFORM 420 !***AUTHOR Fullerton, W., (LANL) 421 !***DESCRIPTION 422 ! 423 ! This pseudo-random number generator is portable among a wide 424 ! variety of computers. RAND(R) undoubtedly is not as good as many 425 ! readily available installation dependent versions, and so this 426 ! routine is not recommended for widespread usage. Its redeeming 427 ! feature is that the exact same random numbers (to within final round- 428 ! off error) can be generated from machine to machine. Thus, programs 429 ! that make use of random numbers can be easily transported to and 430 ! checked in a new environment. 431 ! 432 ! The random numbers are generated by the linear congruential 433 ! method described, e.g., by Knuth in Seminumerical Methods (p.9), 434 ! Addison-Wesley, 1969. Given the I-th number of a pseudo-random 435 ! sequence, the I+1 -st number is generated from 436 ! X(I+1) = (A*X(I) + C) MOD M, 437 ! where here M = 2**22 = 4194304, C = 1731 and several suitable values 438 ! of the multiplier A are discussed below. Both the multiplier A and 439 ! random number X are represented in double precision as two 11-bit 440 ! words. The constants are chosen so that the period is the maximum 441 ! possible, 4194304. 442 ! 443 ! In order that the same numbers be generated from machine to 444 ! machine, it is necessary that 23-bit integers be reducible modulo 445 ! 2**11 exactly, that 23-bit integers be added exactly, and that 11-bit 446 ! integers be multiplied exactly. Furthermore, if the restart option 447 ! is used (where R is between 0 and 1), then the product R*2**22 = 448 ! R*4194304 must be correct to the nearest integer. 449 ! 450 ! The first four random numbers should be .0004127026, 451 ! .6750836372, .1614754200, and .9086198807. The tenth random number 452 ! is .5527787209, and the hundredth is .3600893021 . The thousandth 453 ! number should be .2176990509 . 454 ! 455 ! In order to generate several effectively independent sequences 456 ! with the same generator, it is necessary to know the random number 457 ! for several widely spaced calls. The I-th random number times 2**22, 458 ! where I=K*P/8 and P is the period of the sequence (P = 2**22), is 459 ! still of the form L*P/8. In particular we find the I-th random 460 ! number multiplied by 2**22 is given by 461 ! I = 0 1*P/8 2*P/8 3*P/8 4*P/8 5*P/8 6*P/8 7*P/8 8*P/8 462 ! RAND= 0 5*P/8 2*P/8 7*P/8 4*P/8 1*P/8 6*P/8 3*P/8 0 463 ! Thus the 4*P/8 = 2097152 random number is 2097152/2**22. 464 ! 465 ! Several multipliers have been subjected to the spectral test 466 ! (see Knuth, p. 82). Four suitable multipliers roughly in order of 467 ! goodness according to the spectral test are 468 ! 3146757 = 1536*2048 + 1029 = 2**21 + 2**20 + 2**10 + 5 469 ! 2098181 = 1024*2048 + 1029 = 2**21 + 2**10 + 5 470 ! 3146245 = 1536*2048 + 517 = 2**21 + 2**20 + 2**9 + 5 471 ! 2776669 = 1355*2048 + 1629 = 5**9 + 7**7 + 1 472 ! 473 ! In the table below LOG10(NU(I)) gives roughly the number of 474 ! random decimal digits in the random numbers considered I at a time. 475 ! C is the primary measure of goodness. In both cases bigger is better. 476 ! 477 ! LOG10 NU(I) C(I) 478 ! A I=2 I=3 I=4 I=5 I=2 I=3 I=4 I=5 479 ! 480 ! 3146757 3.3 2.0 1.6 1.3 3.1 1.3 4.6 2.6 481 ! 2098181 3.3 2.0 1.6 1.2 3.2 1.3 4.6 1.7 482 ! 3146245 3.3 2.2 1.5 1.1 3.2 4.2 1.1 0.4 483 ! 2776669 3.3 2.1 1.6 1.3 2.5 2.0 1.9 2.6 484 ! Best 485 ! Possible 3.3 2.3 1.7 1.4 3.6 5.9 9.7 14.9 486 ! 487 ! Input Argument -- 488 ! R If R=0., the next random number of the sequence is generated. 489 ! If R .LT. 0., the last generated number will be returned for 490 ! possible use in a restart procedure. 491 ! If R .GT. 0., the sequence of random numbers will start with 492 ! the seed R mod 1. This seed is also returned as the value of 493 ! RAND provided the arithmetic is done exactly. 494 ! 495 ! Output Value -- 496 ! RAND a pseudo-random number between 0. and 1. 497 ! 498 !***REFERENCES (NONE) 499 !***ROUTINES CALLED (NONE) 500 !***REVISION HISTORY (YYMMDD) 501 ! 770401 DATE WRITTEN 502 ! 890531 Changed all specific intrinsics to generic. (WRB) 503 ! 890531 REVISION DATE from Version 3.2 504 ! 891214 Prologue converted to Version 4.0 format. (BAB) 505 !***END PROLOGUE RAND 506 SAVE IA1, IA0, IA1MA0, IC, IX1, IX0 507 DATA IA1, IA0, IA1MA0 /1536, 1029, 507/ 508 DATA IC /1731/ 509 DATA IX1, IX0 /0, 0/ 510 !***FIRST EXECUTABLE STATEMENT RAND 511 ! 512 ! A*X = 2**22*IA1*IX1 + 2**11*(IA1*IX1 + (IA1-IA0)*(IX0-IX1) 513 ! + IA0*IX0) + IA0*IX0 514 ! 515 IF (R.EQ.0.) THEN 516 IY0 = IA0*IX0 517 IY1 = IA1*IX1 + IA1MA0*(IX0-IX1) + IY0 518 IY0 = IY0 + IC 519 IX0 = MOD (IY0, 2048) 520 IY1 = IY1 + (IY0-IX0)/2048 521 IX1 = MOD (IY1, 2048) 522 ENDIF 523 524 IF (R.GT.0.) THEN 525 IX1 = MOD(R,1.)*4194304. + 0.5 526 IX0 = MOD (IX1, 2048) 527 IX1 = (IX1-IX0)/2048 528 ENDIF 529 530 ALEAS = IX1*2048 + IX0 531 ALEAS = ALEAS / 4194304. 532 RETURN 533 534 END 535 536 -
trunk/LMDZ.VENUS/libf/phyvenus/grid_noro.F
r800 r808 7 7 . imar, jmar, x, y, 8 8 . zphi,zmea,zstd,zsig,zgam,zthe, 9 . zpic,zval ,mask)9 . zpic,zval) 10 10 c======================================================================= 11 11 c (F. Lott) (voir aussi z.x. Li, A. Harzallah et L. Fairhead) … … 40 40 c xdata, ydata: coordinates X and Y input field 41 41 c zdata: Input field 42 c In this version it is assumed that the entry data come from43 c the USNavy dataset: imdep=iusn=2160, jmdep=jusn=1080.44 42 c OUTPUT: 45 43 c imar, jmar: dimensions X and Y Output field … … 57 55 IMPLICIT REAL(X,Z) 58 56 59 parameter(iusn=2160,jusn=1080,iext=216, epsfra = 1.e-5)60 57 #include "dimensions.h" 61 REAL xusn(iusn+2*iext),yusn(jusn+2)62 REAL zusn(iusn+2*iext,jusn+2)63 58 64 59 INTEGER imdep, jmdep … … 67 62 c 68 63 INTEGER imar, jmar 64 c parametres lies au fichier d entree... A documenter... 65 parameter(iext=216, epsfra = 1.e-5) 66 REAL xusn(imdep+2*iext),yusn(jmdep+2) 67 REAL zusn(imdep+2*iext,jmdep+2) 69 68 70 69 C INTERMEDIATE FIELDS (CORRELATIONS OF OROGRAPHY GRADIENT) … … 76 75 C CORRELATIONS OF USN OROGRAPHY GRADIENTS 77 76 78 REAL zxtzxusn(iusn+2*iext,jusn+2),zytzyusn(iusn+2*iext,jusn+2) 79 REAL zxtzyusn(iusn+2*iext,jusn+2) 77 REAL zxtzxusn(imdep+2*iext,jmdep+2) 78 REAL zytzyusn(imdep+2*iext,jmdep+2) 79 REAL zxtzyusn(imdep+2*iext,jmdep+2) 80 80 REAL x(imar+1),y(jmar),zphi(imar+1,jmar) 81 81 REAL zmea(imar+1,jmar),zstd(imar+1,jmar) 82 REAL zmea0(imar+1,jmar) ! GK211005 (CG)83 82 REAL zsig(imar+1,jmar),zgam(imar+1,jmar),zthe(imar+1,jmar) 84 83 REAL zpic(imar+1,jmar),zval(imar+1,jmar) 85 cx$$ PB integer mask(imar+1,jmar)86 real mask(imar+1,jmar), mask_tmp(imar+1,jmar)87 84 real num_tot(2200,1100),num_lan(2200,1100) 88 85 c 89 86 REAL a(2200),b(2200),c(1100),d(1100) 90 logical masque_lu91 87 c 92 88 print *,' parametres de l orographie a l echelle sous maille' 93 89 xpi=acos(-1.) 94 90 rad = 6 371 229. 95 zdeltay=2.*xpi/REAL(jusn)*rad 96 c 97 c utilise-t'on un masque lu? 98 c 99 masque_lu = .true. 100 if (maxval(mask) == -99999 .and. minval(mask) == -99999) then 101 masque_lu= .false. 102 masque = 0.0 103 endif 104 write(*,*)'Masque lu', masque_lu 91 zdeltay=2.*xpi/REAL(jmdep)*rad 105 92 c 106 93 c quelques tests de dimensions: … … 114 101 ENDIF 115 102 116 IF(imdep.ne.iusn.or.jmdep.ne.jusn)then117 print *,' imdep or jmdep bad dimensions:',imdep,jmdep118 call abort119 ENDIF120 121 103 IF(imar+1.ne.iim+1.or.jmar.ne.jjm+1)THEN 122 104 print *,' imar or jmar bad dimensions:',imar,jmar … … 133 115 C BOUNDARIES: 134 116 c 135 DO j=1,j usn117 DO j=1,jmdep 136 118 yusn(j+1)=ydata(j) 137 DO i=1,i usn119 DO i=1,imdep 138 120 zusn(i+iext,j+1)=zdata(i,j) 139 121 xusn(i+iext)=xdata(i) 140 122 ENDDO 141 123 DO i=1,iext 142 zusn(i,j+1)=zdata(i usn-iext+i,j)143 xusn(i)=xdata(i usn-iext+i)-2.*xpi144 zusn(i usn+iext+i,j+1)=zdata(i,j)145 xusn(i usn+iext+i)=xdata(i)+2.*xpi124 zusn(i,j+1)=zdata(imdep-iext+i,j) 125 xusn(i)=xdata(imdep-iext+i)-2.*xpi 126 zusn(imdep+iext+i,j+1)=zdata(i,j) 127 xusn(imdep+iext+i)=xdata(i)+2.*xpi 146 128 ENDDO 147 129 ENDDO 148 130 149 131 yusn(1)=ydata(1)+(ydata(1)-ydata(2)) 150 yusn(j usn+2)=ydata(jusn)+(ydata(jusn)-ydata(jusn-1))151 DO i=1,i usn/2+iext152 zusn(i,1)=zusn(i+i usn/2,2)153 zusn(i+i usn/2+iext,1)=zusn(i,2)154 zusn(i,j usn+2)=zusn(i+iusn/2,jusn+1)155 zusn(i+i usn/2+iext,jusn+2)=zusn(i,jusn+1)132 yusn(jmdep+2)=ydata(jmdep)+(ydata(jmdep)-ydata(jmdep-1)) 133 DO i=1,imdep/2+iext 134 zusn(i,1)=zusn(i+imdep/2,2) 135 zusn(i+imdep/2+iext,1)=zusn(i,2) 136 zusn(i,jmdep+2)=zusn(i+imdep/2,jmdep+1) 137 zusn(i+imdep/2+iext,jmdep+2)=zusn(i,jmdep+1) 156 138 ENDDO 157 139 c … … 194 176 c COMPUTE SLOPES CORRELATIONS ON USN GRID 195 177 c 196 DO j = 1,j usn+2197 DO i = 1, i usn+2*iext178 DO j = 1,jmdep+2 179 DO i = 1, imdep+2*iext 198 180 zytzyusn(i,j)=0.0 199 181 zxtzxusn(i,j)=0.0 … … 203 185 204 186 205 DO j = 2,j usn+1187 DO j = 2,jmdep+1 206 188 zdeltax=zdeltay*cos(yusn(j)) 207 DO i = 2, i usn+2*iext-1189 DO i = 2, imdep+2*iext-1 208 190 zytzyusn(i,j)=(zusn(i,j+1)-zusn(i,j-1))**2/zdeltay**2 209 191 zxtzxusn(i,j)=(zusn(i+1,j)-zusn(i-1,j))**2/zdeltax**2 … … 215 197 c SUMMATION OVER GRIDPOINT AREA 216 198 c 217 zleny=xpi/REAL(j usn)*rad218 xincr=xpi/2./REAL(j usn)199 zleny=xpi/REAL(jmdep)*rad 200 xincr=xpi/2./REAL(jmdep) 219 201 DO ii = 1, imar+1 220 202 DO jj = 1, jmar … … 222 204 num_lan(ii,jj)=0. 223 205 c PRINT *,' iteration ii jj:',ii,jj 224 DO j = 2,j usn+1225 c DO j = 3,j usn206 DO j = 2,jmdep+1 207 c DO j = 3,jmdep 226 208 zlenx=zleny*cos(yusn(j)) 227 209 zdeltax=zdeltay*cos(yusn(j)) … … 231 213 * amin1(zbordnor,zbordsud,zleny)) 232 214 IF(weighy.ne.0)THEN 233 DO i = 2, i usn+2*iext-1215 DO i = 2, imdep+2*iext-1 234 216 zbordest=(xusn(i)-a(ii)+xincr)*rad*cos(yusn(j)) 235 217 zbordoue=(b(ii)+xincr-xusn(i))*rad*cos(yusn(j)) … … 273 255 DO jj = 1, jmar 274 256 IF (weight(ii,jj) .NE. 0.0) THEN 275 c Mask276 cx$$ if(num_lan(ii,jj)/num_tot(ii,jj).ge.0.5)then277 cx$$ mask(ii,jj)=1278 cx$$ else279 cx$$ mask(ii,jj)=0280 cx$$ ENDIF281 if (.not. masque_lu) then282 mask(ii,jj) = num_lan(ii,jj)/num_tot(ii,jj)283 endif284 257 c Mean Orography: 285 258 zmea (ii,jj)=zmea (ii,jj)/weight(ii,jj) … … 311 284 C FIRST FILTER, MOVING AVERAGE OVER 9 POINTS. 312 285 313 zmea0(:,:) = zmea(:,:) ! GK211005 (CG) on sauvegarde la topo non lissee314 286 CALL MVA9(zmea,iim+1,jjm+1) 315 287 CALL MVA9(zstd,iim+1,jjm+1) … … 319 291 CALL MVA9(zxtzy,iim+1,jjm+1) 320 292 CALL MVA9(zytzy,iim+1,jjm+1) 321 Cx$$ Masque prenant en compte maximum de terre322 Cx$$ On seuil a 10% de terre de terre car en dessous les parametres de surface n'on323 Cx$$ pas de sens (PB)324 mask_tmp= 0.0325 WHERE(mask .GE. 0.1) mask_tmp = 1.326 293 327 294 DO ii = 1, imar … … 339 306 if(abs(xm).le.xw) xm=xw*sign(1.,xm) 340 307 c slope: 341 cx$$ zsig(ii,jj)=sqrt(xq)*mask(ii,jj) 342 cx$$c isotropy: 343 cx$$ zgam(ii,jj)=xp/xq*mask(ii,jj) 344 cx$$c angle theta: 345 cx$$ zthe(ii,jj)=57.29577951*atan2(xm,xl)/2.*mask(ii,jj) 346 cx$$ zphi(ii,jj)=zmea(ii,jj)*mask(ii,jj) 347 cx$$ zmea(ii,jj)=zmea(ii,jj)*mask(ii,jj) 348 cx$$ zpic(ii,jj)=zpic(ii,jj)*mask(ii,jj) 349 cx$$ zval(ii,jj)=zval(ii,jj)*mask(ii,jj) 350 cx$$ zstd(ii,jj)=zstd(ii,jj)*mask(ii,jj) 351 Cx$* PB modif pour maque de terre fractionnaire 352 c slope: 353 zsig(ii,jj)=sqrt(xq)*mask_tmp(ii,jj) 308 zsig(ii,jj)=sqrt(xq) 354 309 c isotropy: 355 zgam(ii,jj)=xp/xq *mask_tmp(ii,jj)310 zgam(ii,jj)=xp/xq 356 311 c angle theta: 357 zthe(ii,jj)=57.29577951*atan2(xm,xl)/2.*mask_tmp(ii,jj) 358 ! GK211005 (CG) ne pas forcement lisser la topo 359 ! zphi(ii,jj)=zmea(ii,jj)*mask_tmp(ii,jj) 360 zphi(ii,jj)=zmea0(ii,jj)*mask_tmp(ii,jj) 312 zthe(ii,jj)=57.29577951*atan2(xm,xl)/2. 313 zphi(ii,jj)=zmea(ii,jj) 361 314 ! 362 zmea(ii,jj)=zmea(ii,jj) *mask_tmp(ii,jj)363 zpic(ii,jj)=zpic(ii,jj) *mask_tmp(ii,jj)364 zval(ii,jj)=zval(ii,jj) *mask_tmp(ii,jj)365 zstd(ii,jj)=zstd(ii,jj) *mask_tmp(ii,jj)315 zmea(ii,jj)=zmea(ii,jj) 316 zpic(ii,jj)=zpic(ii,jj) 317 zval(ii,jj)=zval(ii,jj) 318 zstd(ii,jj)=zstd(ii,jj) 366 319 c print 101,ii,jj, 367 320 c * zmea(ii,jj),zstd(ii,jj),zsig(ii,jj),zgam(ii,jj), … … 385 338 print *,' PENTE:',zllmsig 386 339 print *,' ANISOTROP:',zllmgam 387 print *,' ANGLE:',zminthe,zllmthe 340 print *,' ANGLE:',zminthe,zllmthe 388 341 print *,' pic:',zllmpic 389 342 print *,' val:',zllmval -
trunk/LMDZ.VENUS/libf/phyvenus/gwprofil.F
r101 r808 151 151 zriw=pri(jl,jk)*(1.-zalfa)/(1+zalfa*zsqr)**2 152 152 if(zriw.lt.grcrit) then 153 C print *,' breaking!!!',ptau(jl,jk) 153 c print *,' breaking!!!',ptau(jl,jk),zsqr 154 154 zdel=4./zsqr/grcrit+1./grcrit**2+4./grcrit 155 155 zb=1./grcrit+2./zsqr -
trunk/LMDZ.VENUS/libf/phyvenus/ini_histday.h
r97 r808 5 5 c 6 6 zsto = dtime 7 zout = dtime * FLOAT(ecrit_day)8 zsto1= dtime * FLOAT(ecrit_day)7 zout = dtime * REAL(ecrit_day) 8 zsto1= dtime * REAL(ecrit_day) 9 9 c 10 10 idayref = day_ref -
trunk/LMDZ.VENUS/libf/phyvenus/ini_histrac.h
r3 r808 21 21 . klev, zpresnivs, nvert) 22 22 23 zout = pdtphys * FLOAT(ecrit_tra)23 zout = pdtphys * REAL(ecrit_tra) 24 24 c 25 25 CALL histdef(nid_tra, "phis", "Surface geop. height", "-", -
trunk/LMDZ.VENUS/libf/phyvenus/lw_venus_ve.F
r101 r808 115 115 116 116 c calcul direct OU calcul par schema implicit 117 if (1.eq. 0) then117 if (1.eq.1) then 118 118 do j=1,kflev 119 119 ! ADAPTATION GCM POUR CP(T) -
trunk/LMDZ.VENUS/libf/phyvenus/physiq.F
r175 r808 527 527 ENDIF 528 528 c 529 IF (dtime* FLOAT(radpas).GT.(RDAY*0.25).AND.cycle_diurne)529 IF (dtime*REAL(radpas).GT.(RDAY*0.25).AND.cycle_diurne) 530 530 $ THEN 531 531 WRITE(lunout,*)'Nbre d appels au rayonnement insuffisant' … … 718 718 719 719 IF (cycle_diurne) THEN 720 zdtime=dtime* FLOAT(radpas) ! pas de temps du rayonnement (s)720 zdtime=dtime*REAL(radpas) ! pas de temps du rayonnement (s) 721 721 CALL zenang(zlongi,gmtime,zdtime,rlatd,rlond,rmu0,fract) 722 722 ELSE … … 781 781 782 782 ! ADAPTATION GCM POUR CP(T) 783 783 784 CALL clmain(dtime,itap, 784 785 e t_seri,u_seri,v_seri, … … 951 952 c $ ' (itaprad=',itaprad,'/radpas=',radpas,')' 952 953 953 dtimerad = dtime* FLOAT(radpas) ! pas de temps du rayonnement (s)954 dtimerad = dtime*REAL(radpas) ! pas de temps du rayonnement (s) 954 955 c PRINT*,'dtimerad,dtime,radpas',dtimerad,dtime,radpas 955 956 … … 958 959 c print*,"sollw avant radlwsw=",sollw(klon/2) 959 960 c print*,"avant radlwsw" 961 960 962 CALL radlwsw 961 963 e (dist, rmu0, fract, … … 965 967 s sollwdown, 966 968 s lwnet, swnet) 969 967 970 c print*,"apres radlwsw" 968 969 971 c print*,"radsol apres radlwsw=",radsol(klon/2) 970 972 c print*,"solsw apres radlwsw=",solsw(klon/2) … … 1027 1029 zn2(i,k) = max(zn2(i,k),1.e-12) ! securite 1028 1030 enddo 1031 zn2(i,1) = 1.e-12 ! securite 1029 1032 enddo 1030 1033 … … 1055 1058 s d_t_oro, d_u_oro, d_v_oro) 1056 1059 1060 c print*,"d_u_oro=",d_u_oro(klon/2,:) 1057 1061 c ajout des tendances 1058 1062 t_seri(:,:) = t_seri(:,:) + d_t_oro(:,:) … … 1074 1078 c ----------------------------OROLIFT 1075 1079 IF (ok_orolf) THEN 1080 print*,"ok_orolf NOT IMPLEMENTED !" 1081 stop 1076 1082 c 1077 1083 c selection des points pour lesquels le shema est actif: … … 1380 1386 ENDIF 1381 1387 1382 1383 1388 RETURN 1384 1389 END -
trunk/LMDZ.VENUS/libf/phyvenus/readstartphy.F
r778 r808 8 8 . albe, solsw, sollw, 9 9 . fder,radsol, 10 . zmea, zstd, zsig, zgam, zthe, zpic, zval, 10 11 . tabcntr0) 11 12 c====================================================================== … … 35 36 real solsw(ngridmx) 36 37 real fder(ngridmx) 38 REAL zmea(ngridmx), zstd(ngridmx) 39 REAL zsig(ngridmx), zgam(ngridmx), zthe(ngridmx) 40 REAL zpic(ngridmx), zval(ngridmx) 37 41 INTEGER length 38 42 PARAMETER (length=100) … … 294 298 ENDDO 295 299 PRINT*,'Rayonnement net au sol radsol:', xmin, xmax 300 301 c 302 c Lecture des parametres orographie sous-maille: 303 c 304 ierr = NF_INQ_VARID (nid, "ZMEA", nvarid) 305 IF (ierr.NE.NF_NOERR) THEN 306 PRINT*, 'phyetat0: Le champ <ZMEA> est absent' 307 PRINT*, 'mis a zero' 308 zmea = 0. 309 ELSE 310 #ifdef NC_DOUBLE 311 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zmea) 312 #else 313 ierr = NF_GET_VAR_REAL(nid, nvarid, zmea) 314 #endif 315 IF (ierr.NE.NF_NOERR) THEN 316 PRINT*, 'phyetat0: Lecture echouee pour <ZMEA>' 317 CALL abort 318 ENDIF 319 ENDIF 320 xmin = 1.0E+20 321 xmax = -1.0E+20 322 DO i = 1, ngridmx 323 xmin = MIN(zmea(i),xmin) 324 xmax = MAX(zmea(i),xmax) 325 ENDDO 326 PRINT*,'zmea:', xmin, xmax 327 c 328 ierr = NF_INQ_VARID (nid, "ZSTD", nvarid) 329 IF (ierr.NE.NF_NOERR) THEN 330 PRINT*, 'phyetat0: Le champ <ZSTD> est absent' 331 PRINT*, 'mis a zero' 332 zstd = 0. 333 ELSE 334 #ifdef NC_DOUBLE 335 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zstd) 336 #else 337 ierr = NF_GET_VAR_REAL(nid, nvarid, zstd) 338 #endif 339 IF (ierr.NE.NF_NOERR) THEN 340 PRINT*, 'phyetat0: Lecture echouee pour <ZSTD>' 341 CALL abort 342 ENDIF 343 ENDIF 344 xmin = 1.0E+20 345 xmax = -1.0E+20 346 DO i = 1, ngridmx 347 xmin = MIN(zstd(i),xmin) 348 xmax = MAX(zstd(i),xmax) 349 ENDDO 350 PRINT*,'zstd:', xmin, xmax 351 c 352 ierr = NF_INQ_VARID (nid, "ZSIG", nvarid) 353 IF (ierr.NE.NF_NOERR) THEN 354 PRINT*, 'phyetat0: Le champ <ZSIG> est absent' 355 PRINT*, 'mis a zero' 356 zsig = 0. 357 ELSE 358 #ifdef NC_DOUBLE 359 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zsig) 360 #else 361 ierr = NF_GET_VAR_REAL(nid, nvarid, zsig) 362 #endif 363 IF (ierr.NE.NF_NOERR) THEN 364 PRINT*, 'phyetat0: Lecture echouee pour <ZSIG>' 365 CALL abort 366 ENDIF 367 ENDIF 368 xmin = 1.0E+20 369 xmax = -1.0E+20 370 DO i = 1, ngridmx 371 xmin = MIN(zsig(i),xmin) 372 xmax = MAX(zsig(i),xmax) 373 ENDDO 374 PRINT*,'zsig:', xmin, xmax 375 c 376 ierr = NF_INQ_VARID (nid, "ZGAM", nvarid) 377 IF (ierr.NE.NF_NOERR) THEN 378 PRINT*, 'phyetat0: Le champ <ZGAM> est absent' 379 PRINT*, 'mis a zero' 380 zgam = 0. 381 ELSE 382 #ifdef NC_DOUBLE 383 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zgam) 384 #else 385 ierr = NF_GET_VAR_REAL(nid, nvarid, zgam) 386 #endif 387 IF (ierr.NE.NF_NOERR) THEN 388 PRINT*, 'phyetat0: Lecture echouee pour <ZGAM>' 389 CALL abort 390 ENDIF 391 ENDIF 392 xmin = 1.0E+20 393 xmax = -1.0E+20 394 DO i = 1, ngridmx 395 xmin = MIN(zgam(i),xmin) 396 xmax = MAX(zgam(i),xmax) 397 ENDDO 398 PRINT*,'zgam:', xmin, xmax 399 c 400 ierr = NF_INQ_VARID (nid, "ZTHE", nvarid) 401 IF (ierr.NE.NF_NOERR) THEN 402 PRINT*, 'phyetat0: Le champ <ZTHE> est absent' 403 PRINT*, 'mis a zero' 404 zthe = 0. 405 ELSE 406 #ifdef NC_DOUBLE 407 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zthe) 408 #else 409 ierr = NF_GET_VAR_REAL(nid, nvarid, zthe) 410 #endif 411 IF (ierr.NE.NF_NOERR) THEN 412 PRINT*, 'phyetat0: Lecture echouee pour <ZTHE>' 413 CALL abort 414 ENDIF 415 ENDIF 416 xmin = 1.0E+20 417 xmax = -1.0E+20 418 DO i = 1, ngridmx 419 xmin = MIN(zthe(i),xmin) 420 xmax = MAX(zthe(i),xmax) 421 ENDDO 422 PRINT*,'zthe:', xmin, xmax 423 c 424 ierr = NF_INQ_VARID (nid, "ZPIC", nvarid) 425 IF (ierr.NE.NF_NOERR) THEN 426 PRINT*, 'phyetat0: Le champ <ZPIC> est absent' 427 PRINT*, 'mis a zero' 428 zpic = 0. 429 ELSE 430 #ifdef NC_DOUBLE 431 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zpic) 432 #else 433 ierr = NF_GET_VAR_REAL(nid, nvarid, zpic) 434 #endif 435 IF (ierr.NE.NF_NOERR) THEN 436 PRINT*, 'phyetat0: Lecture echouee pour <ZPIC>' 437 CALL abort 438 ENDIF 439 ENDIF 440 xmin = 1.0E+20 441 xmax = -1.0E+20 442 DO i = 1, ngridmx 443 xmin = MIN(zpic(i),xmin) 444 xmax = MAX(zpic(i),xmax) 445 ENDDO 446 PRINT*,'zpic:', xmin, xmax 447 c 448 ierr = NF_INQ_VARID (nid, "ZVAL", nvarid) 449 IF (ierr.NE.NF_NOERR) THEN 450 PRINT*, 'phyetat0: Le champ <ZVAL> est absent' 451 PRINT*, 'mis a zero' 452 zval = 0. 453 ELSE 454 #ifdef NC_DOUBLE 455 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zval) 456 #else 457 ierr = NF_GET_VAR_REAL(nid, nvarid, zval) 458 #endif 459 IF (ierr.NE.NF_NOERR) THEN 460 PRINT*, 'phyetat0: Lecture echouee pour <ZVAL>' 461 CALL abort 462 ENDIF 463 ENDIF 464 xmin = 1.0E+20 465 xmax = -1.0E+20 466 DO i = 1, ngridmx 467 xmin = MIN(zval(i),xmin) 468 xmax = MAX(zval(i),xmax) 469 ENDDO 470 PRINT*,'zval:', xmin, xmax 296 471 c 297 472 c Fermer le fichier: … … 301 476 RETURN 302 477 END 478 -
trunk/LMDZ.VENUS/libf/phyvenus/startvar.F90
r800 r808 49 49 ! all in LMDZ. A convention is required. 50 50 !------------------------------------------------------------------------------- 51 #ifdef CPP_EARTH52 51 USE ioipsl 53 52 IMPLICIT NONE … … 69 68 REAL, DIMENSION(:), ALLOCATABLE, TARGET, SAVE :: levdyn_ini 70 69 REAL, DIMENSION(:,:), ALLOCATABLE, TARGET, SAVE :: relief, zstd, zsig, zgam 71 REAL, DIMENSION(:,:), ALLOCATABLE, TARGET, SAVE :: masque,zthe, zpic, zval70 REAL, DIMENSION(:,:), ALLOCATABLE, TARGET, SAVE :: zthe, zpic, zval 72 71 REAL, DIMENSION(:,:), ALLOCATABLE, TARGET, SAVE :: rugo, phis, tsol, qsol 73 72 REAL, DIMENSION(:,:), ALLOCATABLE, TARGET, SAVE :: psol_dyn … … 170 169 ! 171 170 SUBROUTINE startget_phys2d(varname, iml, jml, lon_in, lat_in, champ, val_exp, & 172 jml2, lon_in2, lat_in2 , ibar , msk)171 jml2, lon_in2, lat_in2 , ibar) 173 172 ! 174 173 !------------------------------------------------------------------------------- … … 187 186 REAL, DIMENSION(jml2), INTENT(IN) :: lat_in2 188 187 LOGICAL, INTENT(IN) :: ibar 189 REAL, DIMENSION(iml,jml), INTENT(IN), OPTIONAL :: msk190 188 !------------------------------------------------------------------------------- 191 189 ! Local variables: 192 190 #include "iniprint.h" 193 191 REAL, DIMENSION(:,:), POINTER :: v2d=>NULL() 194 LOGICAL :: lrelief1, lrelief2195 192 !------------------------------------------------------------------------------- 196 193 v2d=>NULL() 197 lrelief1=(.NOT.ALLOCATED(relief).AND. PRESENT(msk))198 lrelief2=(.NOT.ALLOCATED(relief).AND..NOT.PRESENT(msk))199 194 IF(MINVAL(champ)==MAXVAL(champ).AND.MINVAL(champ)==val_exp) THEN 200 195 … … 205 200 CALL start_init_dyn (iml,jml,lon_in,lat_in,jml2,lon_in2,lat_in2,ibar) 206 201 CASE('relief') 207 IF(lrelief1) CALL start_init_orog(iml,jml,lon_in,lat_in,msk) 208 IF(lrelief2) CALL start_init_orog(iml,jml,lon_in,lat_in) 202 IF(.NOT.ALLOCATED(relief)) CALL start_init_orog(iml,jml,lon_in,lat_in) 209 203 CASE('surfgeo') 210 204 IF(.NOT.ALLOCATED(phis)) CALL start_init_orog(iml,jml,lon_in,lat_in) 211 CASE('rugosite' ,'masque')205 CASE('rugosite') 212 206 IF(.NOT.ALLOCATED(rugo)) CALL start_init_orog(iml,jml,lon_in,lat_in) 213 207 CASE DEFAULT … … 222 216 CASE('relief'); v2d=>relief 223 217 CASE('rugosite'); v2d=>rugo 224 CASE('masque'); v2d=>masque225 218 CASE('surfgeo'); v2d=>phis 226 219 END SELECT … … 369 362 !------------------------------------------------------------------------------- 370 363 ! 371 SUBROUTINE start_init_orog(iml,jml,lon_in,lat_in ,masque_lu)364 SUBROUTINE start_init_orog(iml,jml,lon_in,lat_in) 372 365 ! 373 366 !------------------------------------------------------------------------------- … … 376 369 REAL, DIMENSION(iml), INTENT(IN) :: lon_in 377 370 REAL, DIMENSION(jml), INTENT(IN) :: lat_in 378 REAL, DIMENSION(iml,jml), INTENT(IN), OPTIONAL :: masque_lu379 371 !------------------------------------------------------------------------------- 380 372 ! Local variables: 381 373 #include "iniprint.h" 374 #include "comconst.h" 382 375 CHARACTER(LEN=25) :: title 383 376 CHARACTER(LEN=120) :: orofname … … 426 419 ALLOCATE(zval(iml,jml)) ! Hauteur vallees de la SSO 427 420 ALLOCATE(relief(iml,jml)) ! Orographie moyenne 428 ALLOCATE(masque(iml,jml)) ! Masque terre ocean429 masque = -99999.430 IF(PRESENT(masque_lu)) masque=masque_lu431 421 432 422 CALL grid_noro(iml_rel, jml_rel, lon_rad, lat_rad, relief_hi, iml-1, jml, & 433 lon_in, lat_in, phis, relief, zstd, zsig, zgam, zthe, zpic, zval , masque)434 phis = phis * 9.81423 lon_in, lat_in, phis, relief, zstd, zsig, zgam, zthe, zpic, zval) 424 phis = phis * g 435 425 436 426 !--- SURFACE ROUGHNESS COMPUTATION (UNUSED FOR THE MOMENT !!! ) … … 776 766 !------------------------------------------------------------------------------- 777 767 778 #endif779 ! of #ifdef CPP_EARTH780 781 768 END MODULE startvar 782 769 ! -
trunk/LMDZ.VENUS/libf/phyvenus/write_histday.h
r97 r808 13 13 c 14 14 zsto = dtime 15 zout = dtime * FLOAT(ecrit_day)15 zout = dtime * REAL(ecrit_day) 16 16 itau_w = itau_phy + itap 17 17 -
trunk/LMDZ.VENUS/libf/phyvenus/write_histrac.h
r3 r808 7 7 c 8 8 zsto = pdtphys 9 zout = pdtphys * FLOAT(ecrit_tra)9 zout = pdtphys * REAL(ecrit_tra) 10 10 itau_w = itau_phy + nstep 11 11 -
trunk/LMDZ.VENUS/libf/phyvenus/writerestartphy.F
r779 r808 4 4 . solsw, sollw,fder, 5 5 . radsol, 6 . zmea, zstd, zsig, zgam, zthe, zpic, zval, 6 7 . t_ancien) 7 8 … … 27 28 real fder(klon) 28 29 REAL radsol(klon) 30 REAL zmea(klon), zstd(klon) 31 REAL zsig(klon), zgam(klon), zthe(klon) 32 REAL zpic(klon), zval(klon) 29 33 REAL t_ancien(klon,klev) 30 34 c … … 218 222 ierr = NF_REDEF (nid) 219 223 #ifdef NC_DOUBLE 224 ierr = NF_DEF_VAR (nid, "ZMEA", NF_DOUBLE, 1, idim2,nvarid) 225 #else 226 ierr = NF_DEF_VAR (nid, "ZMEA", NF_FLOAT, 1, idim2,nvarid) 227 #endif 228 ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, 229 . "zmea Orographie sous-maille") 230 ierr = NF_ENDDEF(nid) 231 #ifdef NC_DOUBLE 232 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zmea) 233 #else 234 ierr = NF_PUT_VAR_REAL (nid,nvarid,zmea) 235 #endif 236 c 237 ierr = NF_REDEF (nid) 238 #ifdef NC_DOUBLE 239 ierr = NF_DEF_VAR (nid, "ZSTD", NF_DOUBLE, 1, idim2,nvarid) 240 #else 241 ierr = NF_DEF_VAR (nid, "ZSTD", NF_FLOAT, 1, idim2,nvarid) 242 #endif 243 ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, 244 . "zstd Orographie sous-maille") 245 ierr = NF_ENDDEF(nid) 246 #ifdef NC_DOUBLE 247 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zstd) 248 #else 249 ierr = NF_PUT_VAR_REAL (nid,nvarid,zstd) 250 #endif 251 c 252 ierr = NF_REDEF (nid) 253 #ifdef NC_DOUBLE 254 ierr = NF_DEF_VAR (nid, "ZSIG", NF_DOUBLE, 1, idim2,nvarid) 255 #else 256 ierr = NF_DEF_VAR (nid, "ZSIG", NF_FLOAT, 1, idim2,nvarid) 257 #endif 258 ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, 259 . "zsig Orographie sous-maille") 260 ierr = NF_ENDDEF(nid) 261 #ifdef NC_DOUBLE 262 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zsig) 263 #else 264 ierr = NF_PUT_VAR_REAL (nid,nvarid,zsig) 265 #endif 266 c 267 ierr = NF_REDEF (nid) 268 #ifdef NC_DOUBLE 269 ierr = NF_DEF_VAR (nid, "ZGAM", NF_DOUBLE, 1, idim2,nvarid) 270 #else 271 ierr = NF_DEF_VAR (nid, "ZGAM", NF_FLOAT, 1, idim2,nvarid) 272 #endif 273 ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, 274 . "zgam Orographie sous-maille") 275 ierr = NF_ENDDEF(nid) 276 #ifdef NC_DOUBLE 277 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zgam) 278 #else 279 ierr = NF_PUT_VAR_REAL (nid,nvarid,zgam) 280 #endif 281 c 282 ierr = NF_REDEF (nid) 283 #ifdef NC_DOUBLE 284 ierr = NF_DEF_VAR (nid, "ZTHE", NF_DOUBLE, 1, idim2,nvarid) 285 #else 286 ierr = NF_DEF_VAR (nid, "ZTHE", NF_FLOAT, 1, idim2,nvarid) 287 #endif 288 ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, 289 . "zthe Orographie sous-maille") 290 ierr = NF_ENDDEF(nid) 291 #ifdef NC_DOUBLE 292 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zthe) 293 #else 294 ierr = NF_PUT_VAR_REAL (nid,nvarid,zthe) 295 #endif 296 c 297 ierr = NF_REDEF (nid) 298 #ifdef NC_DOUBLE 299 ierr = NF_DEF_VAR (nid, "ZPIC", NF_DOUBLE, 1, idim2,nvarid) 300 #else 301 ierr = NF_DEF_VAR (nid, "ZPIC", NF_FLOAT, 1, idim2,nvarid) 302 #endif 303 ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, 304 . "zpic Orographie sous-maille") 305 ierr = NF_ENDDEF(nid) 306 #ifdef NC_DOUBLE 307 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zpic) 308 #else 309 ierr = NF_PUT_VAR_REAL (nid,nvarid,zpic) 310 #endif 311 c 312 ierr = NF_REDEF (nid) 313 #ifdef NC_DOUBLE 314 ierr = NF_DEF_VAR (nid, "ZVAL", NF_DOUBLE, 1, idim2,nvarid) 315 #else 316 ierr = NF_DEF_VAR (nid, "ZVAL", NF_FLOAT, 1, idim2,nvarid) 317 #endif 318 ierr = NF_PUT_ATT_TEXT (nid,nvarid,"title", 28, 319 . "zval Orographie sous-maille") 320 ierr = NF_ENDDEF(nid) 321 #ifdef NC_DOUBLE 322 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zval) 323 #else 324 ierr = NF_PUT_VAR_REAL (nid,nvarid,zval) 325 #endif 326 c 327 ierr = NF_REDEF (nid) 328 #ifdef NC_DOUBLE 220 329 ierr = NF_DEF_VAR (nid, "TANCIEN", NF_DOUBLE, 1, idim3,nvarid) 221 330 #else
Note: See TracChangeset
for help on using the changeset viewer.