Changeset 1400 for trunk/LMDZ.GENERIC/libf/dyn3d/defrun_new.F
- Timestamp:
- Mar 23, 2015, 8:58:21 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/dyn3d/defrun_new.F
r1216 r1400 48 48 #include "serre.h" 49 49 #include "comdissnew.h" 50 #include "iniprint.h" 50 51 c 51 52 c arguments: … … 59 60 60 61 CHARACTER ch1*72,ch2*72,ch3*72,ch4*8 ! to store various strings 61 INTEGER tapeout ! unit numbers for (standard) outputs62 parameter (tapeout=6)63 62 integer tapeerr ! unit number for error message 64 63 parameter (tapeerr=0) … … 75 74 c ---------------- 76 75 77 ! tapeout=676 ! lunout=6 78 77 79 78 c----------------------------------------------------------------------- … … 92 91 CLOSE(tapedef) ! first call to getin will open the file 93 92 93 !lunout: default unit for the text outputs 94 lunout=6 95 CALL getin('lunout', lunout) 96 IF (lunout /= 5 .and. lunout /= 6) THEN 97 OPEN(UNIT=lunout,FILE='lmdz.out',ACTION='write', 98 & STATUS='unknown',FORM='formatted') 99 ENDIF 100 94 101 IF(ierr.EQ.0) THEN ! if file run.def is found 95 WRITE( tapeout,*) "DEFRUN_NEW: reading file run.def"102 WRITE(lunout,*) "DEFRUN_NEW: reading file run.def" 96 103 97 WRITE( tapeout,*) ""98 WRITE( tapeout,*) "Number of days to run:"104 WRITE(lunout,*) "" 105 WRITE(lunout,*) "Number of days to run:" 99 106 nday=1 ! default value 100 107 call getin("nday",nday) 101 WRITE( tapeout,*)" nday = ",nday102 103 WRITE( tapeout,*) ""104 WRITE( tapeout,*) "Number of dynamical steps per day:",108 WRITE(lunout,*)" nday = ",nday 109 110 WRITE(lunout,*) "" 111 WRITE(lunout,*) "Number of dynamical steps per day:", 105 112 & "(should be a multiple of iperiod)" 106 113 day_step=960 ! default value 107 114 call getin("day_step",day_step) 108 WRITE( tapeout,*)" day_step = ",day_step109 110 WRITE( tapeout,*) ""111 WRITE( tapeout,*) "periode pour le pas Matsuno (en pas)"115 WRITE(lunout,*)" day_step = ",day_step 116 117 WRITE(lunout,*) "" 118 WRITE(lunout,*) "periode pour le pas Matsuno (en pas)" 112 119 iperiod=5 ! default value 113 120 call getin("iperiod",iperiod) 114 WRITE( tapeout,*)" iperiod = ",iperiod115 116 WRITE( tapeout,*) ""117 WRITE( tapeout,*) "periode de sortie des variables de ",121 WRITE(lunout,*)" iperiod = ",iperiod 122 123 WRITE(lunout,*) "" 124 WRITE(lunout,*) "periode de sortie des variables de ", 118 125 & "controle (en pas)" 119 126 iconser=120 ! default value 120 127 call getin("iconser",iconser) 121 WRITE( tapeout,*)" iconser = ",iconser122 123 WRITE( tapeout,*) ""124 WRITE( tapeout,*) "periode de la dissipation (en pas)"128 WRITE(lunout,*)" iconser = ",iconser 129 130 WRITE(lunout,*) "" 131 WRITE(lunout,*) "periode de la dissipation (en pas)" 125 132 idissip=5 ! default value 126 133 call getin("idissip",idissip) 127 WRITE( tapeout,*)" idissip = ",idissip134 WRITE(lunout,*)" idissip = ",idissip 128 135 129 136 ccc .... P. Le Van , modif le 29/04/97 .pour la dissipation ... 130 137 ccc 131 WRITE( tapeout,*) ""132 WRITE( tapeout,*) "choix de l'operateur de dissipation ",138 WRITE(lunout,*) "" 139 WRITE(lunout,*) "choix de l'operateur de dissipation ", 133 140 & "(star ou non star )" 134 141 lstardis=.true. ! default value 135 142 call getin("lstardis",lstardis) 136 WRITE( tapeout,*)" lstardis = ",lstardis137 138 WRITE( tapeout,*) ""139 WRITE( tapeout,*) "avec ou sans coordonnee hybrides"143 WRITE(lunout,*)" lstardis = ",lstardis 144 145 WRITE(lunout,*) "" 146 WRITE(lunout,*) "avec ou sans coordonnee hybrides" 140 147 hybrid=.true. ! default value 141 148 call getin("hybrid",hybrid) 142 WRITE( tapeout,*)" hybrid = ",hybrid143 144 WRITE( tapeout,*) ""145 WRITE( tapeout,*) "nombre d'iterations de l'operateur de ",149 WRITE(lunout,*)" hybrid = ",hybrid 150 151 WRITE(lunout,*) "" 152 WRITE(lunout,*) "nombre d'iterations de l'operateur de ", 146 153 & "dissipation gradiv " 147 154 nitergdiv=1 ! default value 148 155 call getin("nitergdiv",nitergdiv) 149 WRITE( tapeout,*)" nitergdiv = ",nitergdiv150 151 WRITE( tapeout,*) ""152 WRITE( tapeout,*) "nombre d'iterations de l'operateur de ",156 WRITE(lunout,*)" nitergdiv = ",nitergdiv 157 158 WRITE(lunout,*) "" 159 WRITE(lunout,*) "nombre d'iterations de l'operateur de ", 153 160 & "dissipation nxgradrot" 154 161 nitergrot=2 ! default value 155 162 call getin("nitergrot",nitergrot) 156 WRITE( tapeout,*)" nitergrot = ",nitergrot157 158 WRITE( tapeout,*) ""159 WRITE( tapeout,*) "nombre d'iterations de l'operateur de ",163 WRITE(lunout,*)" nitergrot = ",nitergrot 164 165 WRITE(lunout,*) "" 166 WRITE(lunout,*) "nombre d'iterations de l'operateur de ", 160 167 & "dissipation divgrad" 161 168 niterh=2 ! default value 162 169 call getin("niterh",niterh) 163 WRITE( tapeout,*)" niterh = ",niterh164 165 WRITE( tapeout,*) ""166 WRITE( tapeout,*) "temps de dissipation des plus petites ",170 WRITE(lunout,*)" niterh = ",niterh 171 172 WRITE(lunout,*) "" 173 WRITE(lunout,*) "temps de dissipation des plus petites ", 167 174 & "long.d ondes pour u,v (gradiv)" 168 175 tetagdiv=4000. ! default value 169 176 call getin("tetagdiv",tetagdiv) 170 WRITE( tapeout,*)" tetagdiv = ",tetagdiv171 172 WRITE( tapeout,*) ""173 WRITE( tapeout,*) "temps de dissipation des plus petites ",177 WRITE(lunout,*)" tetagdiv = ",tetagdiv 178 179 WRITE(lunout,*) "" 180 WRITE(lunout,*) "temps de dissipation des plus petites ", 174 181 & "long.d ondes pour u,v(nxgradrot)" 175 182 tetagrot=5000. ! default value 176 183 call getin("tetagrot",tetagrot) 177 WRITE( tapeout,*)" tetagrot = ",tetagrot178 179 WRITE( tapeout,*) ""180 WRITE( tapeout,*) "temps de dissipation des plus petites ",184 WRITE(lunout,*)" tetagrot = ",tetagrot 185 186 WRITE(lunout,*) "" 187 WRITE(lunout,*) "temps de dissipation des plus petites ", 181 188 & "long.d ondes pour h ( divgrad)" 182 189 tetatemp=5000. ! default value 183 190 call getin("tetatemp",tetatemp) 184 WRITE( tapeout,*)" tetatemp = ",tetatemp185 186 WRITE( tapeout,*) ""187 WRITE( tapeout,*) "coefficient pour gamdissip"191 WRITE(lunout,*)" tetatemp = ",tetatemp 192 193 WRITE(lunout,*) "" 194 WRITE(lunout,*) "coefficient pour gamdissip" 188 195 coefdis=0. ! default value 189 196 call getin("coefdis",coefdis) 190 WRITE( tapeout,*)" coefdis = ",coefdis197 WRITE(lunout,*)" coefdis = ",coefdis 191 198 c 192 199 c ............................................................... 193 200 194 WRITE( tapeout,*) ""195 WRITE( tapeout,*) "choix du shema d'integration temporelle ",201 WRITE(lunout,*) "" 202 WRITE(lunout,*) "choix du shema d'integration temporelle ", 196 203 & "(true==Matsuno ou false==Matsuno-leapfrog)" 197 204 purmats=.false. ! default value 198 205 call getin("purmats",purmats) 199 WRITE( tapeout,*)" purmats = ",purmats200 201 WRITE( tapeout,*) ""202 WRITE( tapeout,*) "avec ou sans physique"206 WRITE(lunout,*)" purmats = ",purmats 207 208 WRITE(lunout,*) "" 209 WRITE(lunout,*) "avec ou sans physique" 203 210 physic=.true. ! default value 204 211 call getin("physic",physic) 205 WRITE( tapeout,*)" physic = ",physic206 207 WRITE( tapeout,*) ""208 WRITE( tapeout,*) "periode de la physique (en pas)"212 WRITE(lunout,*)" physic = ",physic 213 214 WRITE(lunout,*) "" 215 WRITE(lunout,*) "periode de la physique (en pas)" 209 216 iphysiq=20 ! default value 210 217 call getin("iphysiq",iphysiq) 211 WRITE( tapeout,*)" iphysiq = ",iphysiq212 213 WRITE( tapeout,*) ""214 WRITE( tapeout,*) "choix d'une grille reguliere"218 WRITE(lunout,*)" iphysiq = ",iphysiq 219 220 WRITE(lunout,*) "" 221 WRITE(lunout,*) "choix d'une grille reguliere" 215 222 grireg=.true. 216 223 call getin("grireg",grireg) 217 WRITE( tapeout,*)" grireg = ",grireg224 WRITE(lunout,*)" grireg = ",grireg 218 225 219 226 ccc .... P.Le Van, ajout le 03/01/96 pour l'ecriture phys ... 220 227 c 221 WRITE( tapeout,*) ""222 WRITE( tapeout,*) "frequence (en pas) de l'ecriture ",228 WRITE(lunout,*) "" 229 WRITE(lunout,*) "frequence (en pas) de l'ecriture ", 223 230 & "du fichier diagfi.nc" 224 231 ecritphy=240 225 232 call getin("ecritphy",ecritphy) 226 WRITE( tapeout,*)" ecritphy = ",ecritphy233 WRITE(lunout,*)" ecritphy = ",ecritphy 227 234 228 235 ccc .... P. Le Van , ajout le 7/03/95 .pour le zoom ... … … 374 381 ELSE ! Below, case when etainit=.true. 375 382 376 WRITE( tapeout,*) ""377 WRITE( tapeout,*) "longitude en degres du centre du zoom"383 WRITE(lunout,*) "" 384 WRITE(lunout,*) "longitude en degres du centre du zoom" 378 385 clon=63. ! default value 379 386 call getin("clon",clon) 380 WRITE( tapeout,*)" clon = ",clon387 WRITE(lunout,*)" clon = ",clon 381 388 382 389 c 383 WRITE( tapeout,*) ""384 WRITE( tapeout,*) "latitude en degres du centre du zoom "390 WRITE(lunout,*) "" 391 WRITE(lunout,*) "latitude en degres du centre du zoom " 385 392 clat=0. ! default value 386 393 call getin("clat",clat) 387 WRITE( tapeout,*)" clat = ",clat388 389 WRITE( tapeout,*) ""390 WRITE( tapeout,*) "facteur de grossissement du zoom,",394 WRITE(lunout,*)" clat = ",clat 395 396 WRITE(lunout,*) "" 397 WRITE(lunout,*) "facteur de grossissement du zoom,", 391 398 & " selon longitude" 392 399 grossismx=1.0 ! default value 393 400 call getin("grossismx",grossismx) 394 WRITE( tapeout,*)" grossismx = ",grossismx395 396 WRITE( tapeout,*) ""397 WRITE( tapeout,*) "facteur de grossissement du zoom ,",401 WRITE(lunout,*)" grossismx = ",grossismx 402 403 WRITE(lunout,*) "" 404 WRITE(lunout,*) "facteur de grossissement du zoom ,", 398 405 & " selon latitude" 399 406 grossismy=1.0 ! default value 400 407 call getin("grossismy",grossismy) 401 WRITE( tapeout,*)" grossismy = ",grossismy408 WRITE(lunout,*)" grossismy = ",grossismy 402 409 403 410 IF( grossismx.LT.1. ) THEN … … 417 424 PRINT *,' Defrun alphax alphay ',alphax,alphay 418 425 c 419 WRITE( tapeout,*) ""420 WRITE( tapeout,*) "Fonction f(y) hyperbolique si = .true.",426 WRITE(lunout,*) "" 427 WRITE(lunout,*) "Fonction f(y) hyperbolique si = .true.", 421 428 & ", sinon sinusoidale" 422 429 fxyhypb=.false. ! default value 423 430 call getin("fxyhypb",fxyhypb) 424 WRITE( tapeout,*)" fxyhypb = ",fxyhypb425 426 WRITE( tapeout,*) ""427 WRITE( tapeout,*) "extension en longitude de la zone du zoom",431 WRITE(lunout,*)" fxyhypb = ",fxyhypb 432 433 WRITE(lunout,*) "" 434 WRITE(lunout,*) "extension en longitude de la zone du zoom", 428 435 & " (fraction de la zone totale)" 429 436 dzoomx=0. ! default value 430 437 call getin("dzoomx",dzoomx) 431 WRITE( tapeout,*)" dzoomx = ",dzoomx432 433 WRITE( tapeout,*) ""434 WRITE( tapeout,*) "extension en latitude de la zone du zoom",438 WRITE(lunout,*)" dzoomx = ",dzoomx 439 440 WRITE(lunout,*) "" 441 WRITE(lunout,*) "extension en latitude de la zone du zoom", 435 442 & " (fraction de la zone totale)" 436 443 dzoomy=0. ! default value 437 444 call getin("dzoomy",dzoomy) 438 WRITE( tapeout,*)" dzoomy = ",dzoomy439 440 WRITE( tapeout,*) ""441 WRITE( tapeout,*) "raideur du zoom en X"445 WRITE(lunout,*)" dzoomy = ",dzoomy 446 447 WRITE(lunout,*) "" 448 WRITE(lunout,*) "raideur du zoom en X" 442 449 taux=2. ! default value 443 450 call getin("taux",taux) 444 WRITE( tapeout,*)" taux = ",taux445 446 WRITE( tapeout,*) ""447 WRITE( tapeout,*) "raideur du zoom en Y"451 WRITE(lunout,*)" taux = ",taux 452 453 WRITE(lunout,*) "" 454 WRITE(lunout,*) "raideur du zoom en Y" 448 455 tauy=2.0 ! default value 449 456 call getin("tauy",tauy) 450 WRITE( tapeout,*)" tauy = ",tauy457 WRITE(lunout,*)" tauy = ",tauy 451 458 452 459 END IF ! of if (.not.etatinit ) 453 460 454 WRITE( tapeout,*) ""455 WRITE( tapeout,*) "Use a sponge layer?"461 WRITE(lunout,*) "" 462 WRITE(lunout,*) "Use a sponge layer?" 456 463 callsponge=.true. ! default value 457 464 call getin("callsponge",callsponge) 458 WRITE( tapeout,*)" callsponge = ",callsponge459 460 WRITE( tapeout,*) ""461 WRITE( tapeout,*) "Sponge: number of layers over which",465 WRITE(lunout,*)" callsponge = ",callsponge 466 467 WRITE(lunout,*) "" 468 WRITE(lunout,*) "Sponge: number of layers over which", 462 469 & " sponge extends" 463 470 nsponge=3 ! default value 464 471 call getin("nsponge",nsponge) 465 WRITE( tapeout,*)" nsponge = ",nsponge466 467 WRITE( tapeout,*)""468 WRITE( tapeout,*)"Sponge mode: (forcing is towards ..."469 WRITE( tapeout,*)" over upper nsponge layers)"470 WRITE( tapeout,*)" 0: (h=hmean,u=v=0)"471 WRITE( tapeout,*)" 1: (h=hmean,u=umean,v=0)"472 WRITE( tapeout,*)" 2: (h=hmean,u=umean,v=vmean)"472 WRITE(lunout,*)" nsponge = ",nsponge 473 474 WRITE(lunout,*)"" 475 WRITE(lunout,*)"Sponge mode: (forcing is towards ..." 476 WRITE(lunout,*)" over upper nsponge layers)" 477 WRITE(lunout,*)" 0: (h=hmean,u=v=0)" 478 WRITE(lunout,*)" 1: (h=hmean,u=umean,v=0)" 479 WRITE(lunout,*)" 2: (h=hmean,u=umean,v=vmean)" 473 480 mode_sponge=2 ! default value 474 481 call getin("mode_sponge",mode_sponge) 475 WRITE( tapeout,*)" mode_sponge = ",mode_sponge476 477 WRITE( tapeout,*) ""478 WRITE( tapeout,*) "Sponge: characteristic time scale tetasponge"479 WRITE( tapeout,*) "(seconds) at topmost layer (time scale then "480 WRITE( tapeout,*) " doubles with decreasing layer index)."482 WRITE(lunout,*)" mode_sponge = ",mode_sponge 483 484 WRITE(lunout,*) "" 485 WRITE(lunout,*) "Sponge: characteristic time scale tetasponge" 486 WRITE(lunout,*) "(seconds) at topmost layer (time scale then " 487 WRITE(lunout,*) " doubles with decreasing layer index)." 481 488 tetasponge=50000.0 482 489 call getin("tetasponge",tetasponge) 483 WRITE( tapeout,*)" tetasponge = ",tetasponge484 485 486 WRITE( tapeout,*) '-----------------------------------------------'487 WRITE( tapeout,*) ' '488 WRITE( tapeout,*) ' '490 WRITE(lunout,*)" tetasponge = ",tetasponge 491 492 493 WRITE(lunout,*) '-----------------------------------------------' 494 WRITE(lunout,*) ' ' 495 WRITE(lunout,*) ' ' 489 496 c 490 497 … … 493 500 494 501 495 WRITE( tapeout,*) '-----------------------------------------------'496 WRITE( tapeout,*) ' '497 WRITE( tapeout,*) ' '502 WRITE(lunout,*) '-----------------------------------------------' 503 WRITE(lunout,*) ' ' 504 WRITE(lunout,*) ' ' 498 505 cc 499 506 ELSE … … 506 513 if((grossismx.eq.1).and.(grossismy.eq.1)) then 507 514 c Pas de zoom : 508 write( tapeout,*) 'No zoom ? -> fxyhypb set to False'515 write(lunout,*) 'No zoom ? -> fxyhypb set to False' 509 516 & ,' (It runs better that way)' 510 517 fxyhypb = .false.
Note: See TracChangeset
for help on using the changeset viewer.