Changeset 1399
- Timestamp:
- Mar 23, 2015, 8:46:14 AM (10 years ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/README
r1395 r1399 2164 2164 == 12/03/2015 == EM 2165 2165 - Some cleanup in the dynamics/physics interface. 2166 2167 == 23/03/2015 == EM 2168 - Follow-up to cleanup in dynamics/physics interface. Add iniprint.h to be 2169 in line with what is done in LMDZ.COMMON dynamics. -
trunk/LMDZ.MARS/libf/dyn3d/defrun_new.F
r1130 r1399 49 49 #include "comdissnew.h" 50 50 #include "sponge.h" 51 #include "iniprint.h" 51 52 c 52 53 c arguments: … … 60 61 61 62 CHARACTER ch1*72,ch2*72,ch3*72,ch4*8 ! to store various strings 62 INTEGER tapeout ! unit numbers for (standard) outputs63 parameter (tapeout=6)64 63 integer tapeerr ! unit number for error message 65 64 parameter (tapeerr=0) … … 76 75 c ---------------- 77 76 78 ! tapeout=677 ! lunout=6 79 78 80 79 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_r=1 ! default value 100 107 call getin("nday",nday_r) 101 WRITE( tapeout,*)" nday = ",nday_r108 WRITE(lunout,*)" nday = ",nday_r 102 109 103 110 ndynstep=-9999 ! default value 104 111 call getin("ndynstep",ndynstep) 105 112 if (ndynstep .gt. 0) then 106 WRITE( tapeout,*) ""107 WRITE( tapeout,*) "Number of dynamical steps to run:"108 WRITE( tapeout,*) " ndynstep = ",ndynstep109 WRITE( tapeout,*) " nday value is now discarded "113 WRITE(lunout,*) "" 114 WRITE(lunout,*) "Number of dynamical steps to run:" 115 WRITE(lunout,*) " ndynstep = ",ndynstep 116 WRITE(lunout,*) " nday value is now discarded " 110 117 endif 111 118 112 WRITE( tapeout,*) ""113 WRITE( tapeout,*) "Number of dynamical steps per day:",119 WRITE(lunout,*) "" 120 WRITE(lunout,*) "Number of dynamical steps per day:", 114 121 & "(should be a multiple of iperiod)" 115 122 day_step=960 ! default value 116 123 call getin("day_step",day_step) 117 WRITE( tapeout,*)" day_step = ",day_step118 119 WRITE( tapeout,*) ""120 WRITE( tapeout,*) "periode pour le pas Matsuno (en pas)"124 WRITE(lunout,*)" day_step = ",day_step 125 126 WRITE(lunout,*) "" 127 WRITE(lunout,*) "periode pour le pas Matsuno (en pas)" 121 128 iperiod=5 ! default value 122 129 call getin("iperiod",iperiod) 123 130 ! verify that day_step is a multiple of iperiod 124 131 if (((1.*day_step)/iperiod).ne.(day_step/iperiod)) then 125 write( tapeout,*)" Error! iperiod must be such that",132 write(lunout,*)" Error! iperiod must be such that", 126 133 & " day_step is a multiple of iperiod, but iperiod=", 127 134 & iperiod," and day_step=",day_step 128 135 else 129 WRITE( tapeout,*)" iperiod = ",iperiod136 WRITE(lunout,*)" iperiod = ",iperiod 130 137 endif 131 138 132 WRITE( tapeout,*) ""133 WRITE( tapeout,*) "periode de sortie des variables de ",139 WRITE(lunout,*) "" 140 WRITE(lunout,*) "periode de sortie des variables de ", 134 141 & "controle (en pas)" 135 142 iconser=120 ! default value 136 143 call getin("iconser",iconser) 137 WRITE( tapeout,*)" iconser = ",iconser138 139 WRITE( tapeout,*) ""140 WRITE( tapeout,*) "periode de la dissipation (en pas)"144 WRITE(lunout,*)" iconser = ",iconser 145 146 WRITE(lunout,*) "" 147 WRITE(lunout,*) "periode de la dissipation (en pas)" 141 148 idissip=5 ! default value 142 149 call getin("idissip",idissip) 143 WRITE( tapeout,*)" idissip = ",idissip150 WRITE(lunout,*)" idissip = ",idissip 144 151 145 152 ccc .... P. Le Van , modif le 29/04/97 .pour la dissipation ... 146 153 ccc 147 WRITE( tapeout,*) ""148 WRITE( tapeout,*) "choix de l'operateur de dissipation ",154 WRITE(lunout,*) "" 155 WRITE(lunout,*) "choix de l'operateur de dissipation ", 149 156 & "(star ou non star )" 150 157 lstardis=.true. ! default value 151 158 call getin("lstardis",lstardis) 152 WRITE( tapeout,*)" lstardis = ",lstardis153 154 WRITE( tapeout,*) ""155 WRITE( tapeout,*) "avec ou sans coordonnee hybrides"159 WRITE(lunout,*)" lstardis = ",lstardis 160 161 WRITE(lunout,*) "" 162 WRITE(lunout,*) "avec ou sans coordonnee hybrides" 156 163 hybrid=.true. ! default value 157 164 call getin("hybrid",hybrid) 158 WRITE( tapeout,*)" hybrid = ",hybrid159 160 WRITE( tapeout,*) ""161 WRITE( tapeout,*) "nombre d'iterations de l'operateur de ",165 WRITE(lunout,*)" hybrid = ",hybrid 166 167 WRITE(lunout,*) "" 168 WRITE(lunout,*) "nombre d'iterations de l'operateur de ", 162 169 & "dissipation gradiv " 163 170 nitergdiv=1 ! default value 164 171 call getin("nitergdiv",nitergdiv) 165 WRITE( tapeout,*)" nitergdiv = ",nitergdiv166 167 WRITE( tapeout,*) ""168 WRITE( tapeout,*) "nombre d'iterations de l'operateur de ",172 WRITE(lunout,*)" nitergdiv = ",nitergdiv 173 174 WRITE(lunout,*) "" 175 WRITE(lunout,*) "nombre d'iterations de l'operateur de ", 169 176 & "dissipation nxgradrot" 170 177 nitergrot=2 ! default value 171 178 call getin("nitergrot",nitergrot) 172 WRITE( tapeout,*)" nitergrot = ",nitergrot173 174 WRITE( tapeout,*) ""175 WRITE( tapeout,*) "nombre d'iterations de l'operateur de ",179 WRITE(lunout,*)" nitergrot = ",nitergrot 180 181 WRITE(lunout,*) "" 182 WRITE(lunout,*) "nombre d'iterations de l'operateur de ", 176 183 & "dissipation divgrad" 177 184 niterh=2 ! default value 178 185 call getin("niterh",niterh) 179 WRITE( tapeout,*)" niterh = ",niterh180 181 WRITE( tapeout,*) ""182 WRITE( tapeout,*) "temps de dissipation des plus petites ",186 WRITE(lunout,*)" niterh = ",niterh 187 188 WRITE(lunout,*) "" 189 WRITE(lunout,*) "temps de dissipation des plus petites ", 183 190 & "long.d ondes pour u,v (gradiv)" 184 191 tetagdiv=4000. ! default value 185 192 call getin("tetagdiv",tetagdiv) 186 WRITE( tapeout,*)" tetagdiv = ",tetagdiv187 188 WRITE( tapeout,*) ""189 WRITE( tapeout,*) "temps de dissipation des plus petites ",193 WRITE(lunout,*)" tetagdiv = ",tetagdiv 194 195 WRITE(lunout,*) "" 196 WRITE(lunout,*) "temps de dissipation des plus petites ", 190 197 & "long.d ondes pour u,v(nxgradrot)" 191 198 tetagrot=5000. ! default value 192 199 call getin("tetagrot",tetagrot) 193 WRITE( tapeout,*)" tetagrot = ",tetagrot194 195 WRITE( tapeout,*) ""196 WRITE( tapeout,*) "temps de dissipation des plus petites ",200 WRITE(lunout,*)" tetagrot = ",tetagrot 201 202 WRITE(lunout,*) "" 203 WRITE(lunout,*) "temps de dissipation des plus petites ", 197 204 & "long.d ondes pour h ( divgrad)" 198 205 tetatemp=5000. ! default value 199 206 call getin("tetatemp",tetatemp) 200 WRITE( tapeout,*)" tetatemp = ",tetatemp201 202 WRITE( tapeout,*) ""203 WRITE( tapeout,*) "coefficient pour gamdissip"207 WRITE(lunout,*)" tetatemp = ",tetatemp 208 209 WRITE(lunout,*) "" 210 WRITE(lunout,*) "coefficient pour gamdissip" 204 211 coefdis=0. ! default value 205 212 call getin("coefdis",coefdis) 206 WRITE( tapeout,*)" coefdis = ",coefdis213 WRITE(lunout,*)" coefdis = ",coefdis 207 214 c 208 215 c ............................................................... 209 216 210 WRITE( tapeout,*) ""211 WRITE( tapeout,*) "choix du shema d'integration temporelle ",217 WRITE(lunout,*) "" 218 WRITE(lunout,*) "choix du shema d'integration temporelle ", 212 219 & "(true==Matsuno ou false==Matsuno-leapfrog)" 213 220 purmats=.false. ! default value 214 221 call getin("purmats",purmats) 215 WRITE( tapeout,*)" purmats = ",purmats216 217 WRITE( tapeout,*) ""218 WRITE( tapeout,*) "avec ou sans physique"222 WRITE(lunout,*)" purmats = ",purmats 223 224 WRITE(lunout,*) "" 225 WRITE(lunout,*) "avec ou sans physique" 219 226 physic=.true. ! default value 220 227 call getin("physic",physic) 221 WRITE( tapeout,*)" physic = ",physic222 223 WRITE( tapeout,*) ""224 WRITE( tapeout,*) "periode de la physique (en pas)"228 WRITE(lunout,*)" physic = ",physic 229 230 WRITE(lunout,*) "" 231 WRITE(lunout,*) "periode de la physique (en pas)" 225 232 iphysiq=20 ! default value 226 233 call getin("iphysiq",iphysiq) 227 234 ! verify that day_step is a multiple of iphysiq 228 235 if (((1.*day_step)/iphysiq).ne.(day_step/iphysiq)) then 229 write( tapeout,*)" Error! iphysiq must be such that",236 write(lunout,*)" Error! iphysiq must be such that", 230 237 & " day_step is a multiple of iphysiq, but iphysiq=", 231 238 & iphysiq," and day_step=",day_step 232 239 else 233 WRITE( tapeout,*)" iphysiq = ",iphysiq240 WRITE(lunout,*)" iphysiq = ",iphysiq 234 241 endif 235 242 236 WRITE( tapeout,*) ""237 WRITE( tapeout,*) "choix d'une grille reguliere"243 WRITE(lunout,*) "" 244 WRITE(lunout,*) "choix d'une grille reguliere" 238 245 grireg=.true. 239 246 call getin("grireg",grireg) 240 WRITE( tapeout,*)" grireg = ",grireg247 WRITE(lunout,*)" grireg = ",grireg 241 248 242 249 ccc .... P.Le Van, ajout le 03/01/96 pour l'ecriture phys ... 243 250 c 244 WRITE( tapeout,*) ""245 WRITE( tapeout,*) "frequence (en pas) de l'ecriture ",251 WRITE(lunout,*) "" 252 WRITE(lunout,*) "frequence (en pas) de l'ecriture ", 246 253 & "du fichier diagfi.nc" 247 254 ecritphy=240 … … 249 256 ! verify that ecriphy is indeed a multiple of iphysiq 250 257 if (((1.*ecritphy)/iphysiq).ne.(ecritphy/iphysiq)) then 251 write( tapeout,*)" Error! ecritphy must be a multiple",258 write(lunout,*)" Error! ecritphy must be a multiple", 252 259 & " of iphysiq, but ecritphy=",ecritphy," and iphysiq=", 253 260 & iphysiq 254 261 else 255 WRITE( tapeout,*)" ecritphy = ",ecritphy262 WRITE(lunout,*)" ecritphy = ",ecritphy 256 263 endif 257 264 258 265 ccc .... T.Navarro, read start time (06/2013) ... 259 266 c 260 WRITE( tapeout,*) ""261 WRITE( tapeout,*) "date de debut dans le fichier start.nc"267 WRITE(lunout,*) "" 268 WRITE(lunout,*) "date de debut dans le fichier start.nc" 262 269 timestart=-9999 263 270 call getin("timestart",timestart) 264 WRITE( tapeout,*)" timestart = ",timestart271 WRITE(lunout,*)" timestart = ",timestart 265 272 266 273 ccc .... T.Navarro, start output (01/2013) ... 267 274 c 268 WRITE( tapeout,*) ""269 WRITE( tapeout,*) "frequence (en pas) de l'ecriture ",275 WRITE(lunout,*) "" 276 WRITE(lunout,*) "frequence (en pas) de l'ecriture ", 270 277 & "du fichier start.nc" 271 278 ecritstart=0 … … 274 281 if ( ((real(ecritstart))/iphysiq) 275 282 & .ne.(real(ecritstart)/iphysiq) ) then 276 write( tapeout,*)" Error! ecritstart must be a multiple",283 write(lunout,*)" Error! ecritstart must be a multiple", 277 284 & " of iphysiq, but ecritstart=",ecritstart," and iphysiq=", 278 285 & iphysiq 279 286 else 280 WRITE( tapeout,*)" ecritstart = ",ecritstart287 WRITE(lunout,*)" ecritstart = ",ecritstart 281 288 endif 282 289 … … 429 436 ELSE ! Below, case when etainit=.true. 430 437 431 WRITE( tapeout,*) ""432 WRITE( tapeout,*) "longitude en degres du centre du zoom"438 WRITE(lunout,*) "" 439 WRITE(lunout,*) "longitude en degres du centre du zoom" 433 440 clon=63. ! default value 434 441 call getin("clon",clon) 435 WRITE( tapeout,*)" clon = ",clon442 WRITE(lunout,*)" clon = ",clon 436 443 437 444 c 438 WRITE( tapeout,*) ""439 WRITE( tapeout,*) "latitude en degres du centre du zoom "445 WRITE(lunout,*) "" 446 WRITE(lunout,*) "latitude en degres du centre du zoom " 440 447 clat=0. ! default value 441 448 call getin("clat",clat) 442 WRITE( tapeout,*)" clat = ",clat443 444 WRITE( tapeout,*) ""445 WRITE( tapeout,*) "facteur de grossissement du zoom,",449 WRITE(lunout,*)" clat = ",clat 450 451 WRITE(lunout,*) "" 452 WRITE(lunout,*) "facteur de grossissement du zoom,", 446 453 & " selon longitude" 447 454 grossismx=1.0 ! default value 448 455 call getin("grossismx",grossismx) 449 WRITE( tapeout,*)" grossismx = ",grossismx450 451 WRITE( tapeout,*) ""452 WRITE( tapeout,*) "facteur de grossissement du zoom ,",456 WRITE(lunout,*)" grossismx = ",grossismx 457 458 WRITE(lunout,*) "" 459 WRITE(lunout,*) "facteur de grossissement du zoom ,", 453 460 & " selon latitude" 454 461 grossismy=1.0 ! default value 455 462 call getin("grossismy",grossismy) 456 WRITE( tapeout,*)" grossismy = ",grossismy463 WRITE(lunout,*)" grossismy = ",grossismy 457 464 458 465 IF( grossismx.LT.1. ) THEN … … 472 479 PRINT *,' Defrun alphax alphay ',alphax,alphay 473 480 c 474 WRITE( tapeout,*) ""475 WRITE( tapeout,*) "Fonction f(y) hyperbolique si = .true.",481 WRITE(lunout,*) "" 482 WRITE(lunout,*) "Fonction f(y) hyperbolique si = .true.", 476 483 & ", sinon sinusoidale" 477 484 fxyhypb=.false. ! default value 478 485 call getin("fxyhypb",fxyhypb) 479 WRITE( tapeout,*)" fxyhypb = ",fxyhypb480 481 WRITE( tapeout,*) ""482 WRITE( tapeout,*) "extension en longitude de la zone du zoom",486 WRITE(lunout,*)" fxyhypb = ",fxyhypb 487 488 WRITE(lunout,*) "" 489 WRITE(lunout,*) "extension en longitude de la zone du zoom", 483 490 & " (fraction de la zone totale)" 484 491 dzoomx=0. ! default value 485 492 call getin("dzoomx",dzoomx) 486 WRITE( tapeout,*)" dzoomx = ",dzoomx487 488 WRITE( tapeout,*) ""489 WRITE( tapeout,*) "extension en latitude de la zone du zoom",493 WRITE(lunout,*)" dzoomx = ",dzoomx 494 495 WRITE(lunout,*) "" 496 WRITE(lunout,*) "extension en latitude de la zone du zoom", 490 497 & " (fraction de la zone totale)" 491 498 dzoomy=0. ! default value 492 499 call getin("dzoomy",dzoomy) 493 WRITE( tapeout,*)" dzoomy = ",dzoomy494 495 WRITE( tapeout,*) ""496 WRITE( tapeout,*) "raideur du zoom en X"500 WRITE(lunout,*)" dzoomy = ",dzoomy 501 502 WRITE(lunout,*) "" 503 WRITE(lunout,*) "raideur du zoom en X" 497 504 taux=2. ! default value 498 505 call getin("taux",taux) 499 WRITE( tapeout,*)" taux = ",taux500 501 WRITE( tapeout,*) ""502 WRITE( tapeout,*) "raideur du zoom en Y"506 WRITE(lunout,*)" taux = ",taux 507 508 WRITE(lunout,*) "" 509 WRITE(lunout,*) "raideur du zoom en Y" 503 510 tauy=2.0 ! default value 504 511 call getin("tauy",tauy) 505 WRITE( tapeout,*)" tauy = ",tauy512 WRITE(lunout,*)" tauy = ",tauy 506 513 507 514 END IF ! of if (.not.etatinit ) 508 515 509 WRITE( tapeout,*) ""510 WRITE( tapeout,*) "Avec sponge layer"516 WRITE(lunout,*) "" 517 WRITE(lunout,*) "Avec sponge layer" 511 518 callsponge=.true. ! default value 512 519 call getin("callsponge",callsponge) 513 WRITE( tapeout,*)" callsponge = ",callsponge514 515 WRITE( tapeout,*) ""516 WRITE( tapeout,*) "Sponge: number of layers over which",520 WRITE(lunout,*)" callsponge = ",callsponge 521 522 WRITE(lunout,*) "" 523 WRITE(lunout,*) "Sponge: number of layers over which", 517 524 & " sponge extends" 518 525 nsponge=3 ! default value 519 526 call getin("nsponge",nsponge) 520 WRITE( tapeout,*)" nsponge = ",nsponge521 522 WRITE( tapeout,*)""523 WRITE( tapeout,*)"Sponge mode: (forcing is towards ..."524 WRITE( tapeout,*)" over upper nsponge layers)"525 WRITE( tapeout,*)" 0: (h=hmean,u=v=0)"526 WRITE( tapeout,*)" 1: (h=hmean,u=umean,v=0)"527 WRITE( tapeout,*)" 2: (h=hmean,u=umean,v=vmean)"527 WRITE(lunout,*)" nsponge = ",nsponge 528 529 WRITE(lunout,*)"" 530 WRITE(lunout,*)"Sponge mode: (forcing is towards ..." 531 WRITE(lunout,*)" over upper nsponge layers)" 532 WRITE(lunout,*)" 0: (h=hmean,u=v=0)" 533 WRITE(lunout,*)" 1: (h=hmean,u=umean,v=0)" 534 WRITE(lunout,*)" 2: (h=hmean,u=umean,v=vmean)" 528 535 mode_sponge=2 ! default value 529 536 call getin("mode_sponge",mode_sponge) 530 WRITE( tapeout,*)" mode_sponge = ",mode_sponge531 532 WRITE( tapeout,*) ""533 WRITE( tapeout,*) "Sponge: characteristice time scale tetasponge"534 WRITE( tapeout,*) "(seconds) at topmost layer (time scale then "535 WRITE( tapeout,*) " doubles with decreasing layer index)."537 WRITE(lunout,*)" mode_sponge = ",mode_sponge 538 539 WRITE(lunout,*) "" 540 WRITE(lunout,*) "Sponge: characteristice time scale tetasponge" 541 WRITE(lunout,*) "(seconds) at topmost layer (time scale then " 542 WRITE(lunout,*) " doubles with decreasing layer index)." 536 543 tetasponge=30000.0 537 544 call getin("tetasponge",tetasponge) 538 WRITE( tapeout,*)" tetasponge = ",tetasponge539 540 541 WRITE( tapeout,*) '-----------------------------------------------'542 WRITE( tapeout,*) ' '543 WRITE( tapeout,*) ' '545 WRITE(lunout,*)" tetasponge = ",tetasponge 546 547 548 WRITE(lunout,*) '-----------------------------------------------' 549 WRITE(lunout,*) ' ' 550 WRITE(lunout,*) ' ' 544 551 c 545 552 … … 548 555 549 556 550 WRITE( tapeout,*) '-----------------------------------------------'551 WRITE( tapeout,*) ' '552 WRITE( tapeout,*) ' '557 WRITE(lunout,*) '-----------------------------------------------' 558 WRITE(lunout,*) ' ' 559 WRITE(lunout,*) ' ' 553 560 cc 554 561 ELSE … … 561 568 if((grossismx.eq.1).and.(grossismy.eq.1)) then 562 569 c Pas de zoom : 563 write( tapeout,*) 'No zoom ? -> fxyhypb set to False'570 write(lunout,*) 'No zoom ? -> fxyhypb set to False' 564 571 & ,' (It runs better that way)' 565 572 fxyhypb = .false.
Note: See TracChangeset
for help on using the changeset viewer.