Changeset 1657 for LMDZ5/trunk/libf/dyn3dmem/gcm.F
- Timestamp:
- Oct 2, 2012, 5:57:45 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/dyn3dmem/gcm.F
r1632 r1657 1 1 ! 2 ! $Id: gcm.F 13 16 2010-02-22 14:51:12Z acozic$2 ! $Id: gcm.F 1397 2010-06-02 12:57:39Z emillour $ 3 3 ! 4 4 c … … 70 70 #include "description.h" 71 71 #include "serre.h" 72 #include "com_io_dyn.h"72 !#include "com_io_dyn.h" 73 73 #include "iniprint.h" 74 74 #include "tracstoke.h" 75 #ifdef INCA 76 ! Only INCA needs these informations (from the Earth's physics) 75 77 #include "indicesol.h" 78 #endif 76 79 77 80 INTEGER longcles … … 273 276 if (read_start) then 274 277 ! we still need to run iniacademic to initialize some 275 ! constants & fields, if we run the 'newtonian' case:276 if (iflag_phys. eq.2) then278 ! constants & fields, if we run the 'newtonian' or 'SW' cases: 279 if (iflag_phys.ne.1) then 277 280 CALL iniacademic(vcov,ucov,teta,q,masse,ps,phis,time_0) 278 281 endif 279 !#ifdef CPP_IOIPSL 282 280 283 if (planet_type.eq."earth") then 281 284 #ifdef CPP_EARTH 282 285 ! Load an Earth-format start file 283 286 CALL dynetat0_loc("start.nc",vcov,ucov, 284 . teta,q,masse,ps,phis, time_0) 287 & teta,q,masse,ps,phis, time_0) 288 #else 289 ! SW model also has Earth-format start files 290 ! (but can be used without the CPP_EARTH directive) 291 if (iflag_phys.eq.0) then 292 CALL dynetat0_loc("start.nc",vcov,ucov, 293 & teta,q,masse,ps,phis, time_0) 294 endif 285 295 #endif 286 296 endif ! of if (planet_type.eq."earth") … … 326 336 C on remet le calendrier à zero si demande 327 337 c 328 if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then 338 IF (raz_date == 1) THEN 339 annee_ref = anneeref 340 day_ref = dayref 341 day_ini = dayref 342 itau_dyn = 0 343 itau_phy = 0 344 time_0 = 0. 345 write(lunout,*) 346 . 'GCM: On reinitialise a la date lue dans gcm.def' 347 ELSE IF (annee_ref .ne. anneeref .or. day_ref .ne. dayref) THEN 329 348 write(lunout,*) 330 349 . 'GCM: Attention les dates initiales lues dans le fichier' … … 332 351 . ' restart ne correspondent pas a celles lues dans ' 333 352 write(lunout,*)' gcm.def' 334 write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref 335 write(lunout,*)' day_ref=',day_ref," dayref=",dayref 336 if (raz_date .ne. 1) then 337 write(lunout,*) 338 . 'GCM: On garde les dates du fichier restart' 339 else 340 annee_ref = anneeref 341 day_ref = dayref 342 day_ini = dayref 343 itau_dyn = 0 344 itau_phy = 0 345 time_0 = 0. 346 write(lunout,*) 347 . 'GCM: On reinitialise a la date lue dans gcm.def' 348 endif 349 ELSE 350 raz_date = 0 351 endif 353 write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref 354 write(lunout,*)' day_ref=',day_ref," dayref=",dayref 355 write(lunout,*)' Pas de remise a zero' 356 ENDIF 357 c if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then 358 c write(lunout,*) 359 c . 'GCM: Attention les dates initiales lues dans le fichier' 360 c write(lunout,*) 361 c . ' restart ne correspondent pas a celles lues dans ' 362 c write(lunout,*)' gcm.def' 363 c write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref 364 c write(lunout,*)' day_ref=',day_ref," dayref=",dayref 365 c if (raz_date .ne. 1) then 366 c write(lunout,*) 367 c . 'GCM: On garde les dates du fichier restart' 368 c else 369 c annee_ref = anneeref 370 c day_ref = dayref 371 c day_ini = dayref 372 c itau_dyn = 0 373 c itau_phy = 0 374 c time_0 = 0. 375 c write(lunout,*) 376 c . 'GCM: On reinitialise a la date lue dans gcm.def' 377 c endif 378 c ELSE 379 c raz_date = 0 380 c endif 352 381 353 382 #ifdef CPP_IOIPSL … … 428 457 if (planet_type.eq."earth") then 429 458 #ifdef CPP_EARTH 430 CALL iniphysiq(ngridmx,llm,daysec,day_ini,dtphys ,459 CALL iniphysiq(ngridmx,llm,daysec,day_ini,dtphys/nsplit_phys , 431 460 , latfi,lonfi,airefi,zcufi,zcvfi,rad,g,r,cpp ) 432 461 #endif … … 473 502 474 503 #ifdef CPP_IOIPSL 475 if ( 1.eq.1) then476 504 time_step = zdtvr 477 t_ops = iecri * daysec 478 t_wrt = iecri * daysec 479 ! CALL inithist_p(dynhist_file,day_ref,annee_ref,time_step, 480 ! . t_ops, t_wrt, histid, histvid) 505 IF (mpi_rank==0) then 506 if (ok_dyn_ins) then 507 ! initialize output file for instantaneous outputs 508 ! t_ops = iecri * daysec ! do operations every t_ops 509 t_ops =((1.0*iecri)/day_step) * daysec 510 t_wrt = daysec ! iecri * daysec ! write output every t_wrt 511 t_wrt = daysec ! iecri * daysec ! write output every t_wrt 512 CALL inithist(day_ref,annee_ref,time_step, 513 & t_ops,t_wrt) 514 endif 481 515 482 516 IF (ok_dyn_ave) THEN 483 t_ops = iperiod * time_step 484 t_wrt = periodav * daysec 517 ! initialize output file for averaged outputs 518 t_ops = iperiod * time_step ! do operations every t_ops 519 t_wrt = periodav * daysec ! write output every t_wrt 485 520 CALL initdynav_loc(day_ref,annee_ref,time_step,t_ops,t_wrt) 486 END IF 521 END IF 522 ENDIF 487 523 dtav = iperiod*dtvr/daysec 488 endif489 490 491 524 #endif 492 525 ! #endif of #ifdef CPP_IOIPSL
Note: See TracChangeset
for help on using the changeset viewer.