Changeset 1403 for LMDZ4/trunk/libf/dyn3d/gcm.F
- Timestamp:
- Jul 1, 2010, 11:02:53 AM (14 years ago)
- Location:
- LMDZ4/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/trunk
- Property svn:mergeinfo changed
-
LMDZ4/trunk/libf/dyn3d/gcm.F
r1315 r1403 15 15 USE filtreg_mod 16 16 USE infotrac 17 USE control_mod 17 18 18 19 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 68 69 #include "logic.h" 69 70 #include "temps.h" 70 #include "control.h"71 !!!!!!!!!!!#include "control.h" 71 72 #include "ener.h" 72 73 #include "description.h" 73 74 #include "serre.h" 74 #include "com_io_dyn.h"75 !#include "com_io_dyn.h" 75 76 #include "iniprint.h" 76 77 #include "tracstoke.h" 78 #ifdef INCA 79 ! Only INCA needs these informations (from the Earth's physics) 77 80 #include "indicesol.h" 78 81 #endif 79 82 INTEGER longcles 80 83 PARAMETER ( longcles = 20 ) … … 181 184 if (planet_type.eq."earth") then 182 185 #ifdef CPP_EARTH 183 CALL Init_Phys_lmdz(iim,jjp1,llm,1,( jjm-1)*iim+2)186 CALL Init_Phys_lmdz(iim,jjp1,llm,1,(/(jjm-1)*iim+2/)) 184 187 call InitComgeomphy 185 188 #endif … … 241 244 if (read_start) then 242 245 ! we still need to run iniacademic to initialize some 243 ! constants & fields, if we run the 'newtonian' case:244 if (iflag_phys. eq.2) then246 ! constants & fields, if we run the 'newtonian' or 'SW' cases: 247 if (iflag_phys.ne.1) then 245 248 CALL iniacademic(vcov,ucov,teta,q,masse,ps,phis,time_0) 246 249 endif 247 !#ifdef CPP_IOIPSL 250 248 251 if (planet_type.eq."earth") then 249 252 #ifdef CPP_EARTH 250 253 ! Load an Earth-format start file 251 254 CALL dynetat0("start.nc",vcov,ucov, 252 . teta,q,masse,ps,phis, time_0) 255 & teta,q,masse,ps,phis, time_0) 256 #else 257 ! SW model also has Earth-format start files 258 ! (but can be used without the CPP_EARTH directive) 259 if (iflag_phys.eq.0) then 260 CALL dynetat0("start.nc",vcov,ucov, 261 & teta,q,masse,ps,phis, time_0) 262 endif 253 263 #endif 254 264 endif ! of if (planet_type.eq."earth") 265 255 266 c write(73,*) 'ucov',ucov 256 267 c write(74,*) 'vcov',vcov … … 294 305 ENDIF 295 306 296 zdtvr = daysec/ FLOAT(day_step)307 zdtvr = daysec/REAL(day_step) 297 308 IF(dtvr.NE.zdtvr) THEN 298 309 WRITE(lunout,*) … … 303 314 C on remet le calendrier à zero si demande 304 315 c 305 if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then 316 IF (raz_date == 1) THEN 317 annee_ref = anneeref 318 day_ref = dayref 319 day_ini = dayref 320 itau_dyn = 0 321 itau_phy = 0 322 time_0 = 0. 323 write(lunout,*) 324 . 'GCM: On reinitialise a la date lue dans gcm.def' 325 ELSE IF (annee_ref .ne. anneeref .or. day_ref .ne. dayref) THEN 306 326 write(lunout,*) 307 327 . 'GCM: Attention les dates initiales lues dans le fichier' … … 309 329 . ' restart ne correspondent pas a celles lues dans ' 310 330 write(lunout,*)' gcm.def' 311 write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref 312 write(lunout,*)' day_ref=',day_ref," dayref=",dayref 313 if (raz_date .ne. 1) then 314 write(lunout,*) 315 . 'GCM: On garde les dates du fichier restart' 316 else 317 annee_ref = anneeref 318 day_ref = dayref 319 day_ini = dayref 320 itau_dyn = 0 321 itau_phy = 0 322 time_0 = 0. 323 write(lunout,*) 324 . 'GCM: On reinitialise a la date lue dans gcm.def' 325 endif 326 ELSE 327 raz_date = 0 328 endif 331 write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref 332 write(lunout,*)' day_ref=',day_ref," dayref=",dayref 333 write(lunout,*)' Pas de remise a zero' 334 ENDIF 335 336 c if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then 337 c write(lunout,*) 338 c . 'GCM: Attention les dates initiales lues dans le fichier' 339 c write(lunout,*) 340 c . ' restart ne correspondent pas a celles lues dans ' 341 c write(lunout,*)' gcm.def' 342 c write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref 343 c write(lunout,*)' day_ref=',day_ref," dayref=",dayref 344 c if (raz_date .ne. 1) then 345 c write(lunout,*) 346 c . 'GCM: On garde les dates du fichier restart' 347 c else 348 c annee_ref = anneeref 349 c day_ref = dayref 350 c day_ini = dayref 351 c itau_dyn = 0 352 c itau_phy = 0 353 c time_0 = 0. 354 c write(lunout,*) 355 c . 'GCM: On reinitialise a la date lue dans gcm.def' 356 c endif 357 c ELSE 358 c raz_date = 0 359 c endif 329 360 330 361 #ifdef CPP_IOIPSL … … 355 386 nbetatmoy = nday / periodav + 1 356 387 388 if (iflag_phys.eq.1) then 389 ! these initialisations have already been done (via iniacademic) 390 ! if running in SW or Newtonian mode 357 391 c----------------------------------------------------------------------- 358 392 c Initialisation des constantes dynamiques : 359 393 c ------------------------------------------ 360 dtvr = zdtvr361 CALL iniconst394 dtvr = zdtvr 395 CALL iniconst 362 396 363 397 c----------------------------------------------------------------------- 364 398 c Initialisation de la geometrie : 365 399 c -------------------------------- 366 CALL inigeom400 CALL inigeom 367 401 368 402 c----------------------------------------------------------------------- 369 403 c Initialisation du filtre : 370 404 c -------------------------- 371 CALL inifilr 405 CALL inifilr 406 endif ! of if (iflag_phys.eq.1) 372 407 c 373 408 c----------------------------------------------------------------------- … … 405 440 if (planet_type.eq."earth") then 406 441 #ifdef CPP_EARTH 407 CALL iniphysiq(ngridmx,llm,daysec,day_ini,dtphys ,442 CALL iniphysiq(ngridmx,llm,daysec,day_ini,dtphys/nsplit_phys , 408 443 , latfi,lonfi,airefi,zcufi,zcvfi,rad,g,r,cpp ) 409 444 #endif … … 440 475 441 476 #ifdef CPP_IOIPSL 442 if ( 1.eq.1) then443 477 time_step = zdtvr 444 t_ops = iecri * daysec 445 t_wrt = iecri * daysec 446 ! CALL inithist(dynhist_file,day_ref,annee_ref,time_step, 447 ! . t_ops, t_wrt, histid, histvid) 448 449 ! IF (ok_dynzon) THEN 450 ! t_ops = iperiod * time_step 451 ! t_wrt = periodav * daysec 452 ! CALL initdynav(dynhistave_file,day_ref,annee_ref,time_step, 453 ! . t_ops, t_wrt, histaveid) 454 ! END IF 478 if (ok_dyn_ins) then 479 ! initialize output file for instantaneous outputs 480 ! t_ops = iecri * daysec ! do operations every t_ops 481 t_ops =((1.0*iecri)/day_step) * daysec 482 t_wrt = daysec ! iecri * daysec ! write output every t_wrt 483 CALL inithist(day_ref,annee_ref,time_step, 484 & t_ops,t_wrt) 485 endif 486 487 IF (ok_dyn_ave) THEN 488 ! initialize output file for averaged outputs 489 t_ops = iperiod * time_step ! do operations every t_ops 490 t_wrt = periodav * daysec ! write output every t_wrt 491 CALL initdynav(day_ref,annee_ref,time_step, 492 & t_ops,t_wrt) 493 END IF 455 494 dtav = iperiod*dtvr/daysec 456 endif457 458 459 495 #endif 460 496 ! #endif of #ifdef CPP_IOIPSL
Note: See TracChangeset
for help on using the changeset viewer.