Changeset 1357 for LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3dpar
- Timestamp:
- Apr 14, 2010, 4:03:19 PM (15 years ago)
- Location:
- LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3dpar
- Files:
-
- 2 added
- 2 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3dpar/conf_gcm.F
r1325 r1357 601 601 CALL getin('ok_dynzon',ok_dynzon) 602 602 603 !Config Key = ok_dyn_ins 604 !Config Desc = sorties instantanees dans la dynamique 605 !Config Def = n 606 !Config Help = 607 !Config 608 ok_dyn_ins = .FALSE. 609 CALL getin('ok_dyn_ins',ok_dyn_ins) 610 611 !Config Key = ok_dyn_ave 612 !Config Desc = sorties moyennes dans la dynamique 613 !Config Def = n 614 !Config Help = 615 !Config 616 ok_dyn_ave = .FALSE. 617 CALL getin('ok_dyn_ave',ok_dyn_ave) 603 618 604 619 write(lunout,*)' #########################################' … … 641 656 write(lunout,*)' config_inca = ', config_inca 642 657 write(lunout,*)' ok_dynzon = ', ok_dynzon 658 write(lunout,*)' ok_dyn_ins = ', ok_dyn_ins 659 write(lunout,*)' ok_dyn_ave = ', ok_dyn_ave 643 660 644 661 RETURN … … 773 790 ok_dynzon = .FALSE. 774 791 CALL getin('ok_dynzon',ok_dynzon) 792 793 !Config Key = ok_dyn_ins 794 !Config Desc = sorties instantanees dans la dynamique 795 !Config Def = n 796 !Config Help = 797 !Config 798 ok_dyn_ins = .FALSE. 799 CALL getin('ok_dyn_ins',ok_dyn_ins) 800 801 !Config Key = ok_dyn_ave 802 !Config Desc = sorties moyennes dans la dynamique 803 !Config Def = n 804 !Config Help = 805 !Config 806 ok_dyn_ave = .FALSE. 807 CALL getin('ok_dyn_ave',ok_dyn_ave) 775 808 776 809 !Config Key = use_filtre_fft … … 866 899 write(lunout,*)' config_inca = ', config_inca 867 900 write(lunout,*)' ok_dynzon = ', ok_dynzon 901 write(lunout,*)' ok_dyn_ins = ', ok_dyn_ins 902 write(lunout,*)' ok_dyn_ave = ', ok_dyn_ave 868 903 write(lunout,*)' use_filtre_fft = ', use_filtre_fft 869 904 write(lunout,*)' use_mpi_alloc = ', use_mpi_alloc -
LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3dpar/control_mod.F90
r1325 r1357 1 1 ! 2 ! $Id $2 ! $Id $ 3 3 ! 4 4 … … 14 14 INTEGER :: iconser,iecri,idissip,iphysiq,iecrimoy 15 15 INTEGER :: dayref,anneeref, raz_date, ip_ebil_dyn 16 LOGICAL :: offline , output_grads_dyn, ok_dynzon16 LOGICAL :: offline 17 17 CHARACTER (len=4) :: config_inca 18 CHARACTER (len=10) :: planet_type 18 CHARACTER (len=10) :: planet_type ! planet type ('earth','mars',...) 19 LOGICAL output_grads_dyn ! output dynamics diagnostics in 20 ! binary grads file 'dyn.dat' (y/n) 21 LOGICAL ok_dynzon ! output zonal transports in dynzon.nc file 22 LOGICAL ok_dyn_ins ! output instantaneous values of fields 23 ! in the dynamics in NetCDF files dyn_hist*nc 24 LOGICAL ok_dyn_ave ! output averaged values of fields in the dynamics 25 ! in NetCDF files dyn_hist*ave.nc 19 26 20 27 END MODULE -
LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3dpar/gcm.F
r1333 r1357 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 … … 335 338 . ' restart ne correspondent pas a celles lues dans ' 336 339 write(lunout,*)' gcm.def' 337 338 339 340 write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref 341 write(lunout,*)' day_ref=',day_ref," dayref=",dayref 342 write(lunout,*)' Pas de remise a zero' 340 343 ENDIF 341 c $$$if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then342 c $$$write(lunout,*)343 c $$$. 'GCM: Attention les dates initiales lues dans le fichier'344 c $$$write(lunout,*)345 c $$$. ' restart ne correspondent pas a celles lues dans '346 c $$$write(lunout,*)' gcm.def'347 c $$$write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref348 c $$$write(lunout,*)' day_ref=',day_ref," dayref=",dayref349 c $$$if (raz_date .ne. 1) then350 c $$$write(lunout,*)351 c $$$. 'GCM: On garde les dates du fichier restart'352 c $$$else353 c $$$annee_ref = anneeref354 c $$$day_ref = dayref355 c $$$day_ini = dayref356 c $$$itau_dyn = 0357 c $$$itau_phy = 0358 c $$$time_0 = 0.359 c $$$write(lunout,*)360 c $$$. 'GCM: On reinitialise a la date lue dans gcm.def'361 c $$$endif362 c $$$ELSE363 c $$$raz_date = 0364 c $$$endif344 c if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then 345 c write(lunout,*) 346 c . 'GCM: Attention les dates initiales lues dans le fichier' 347 c write(lunout,*) 348 c . ' restart ne correspondent pas a celles lues dans ' 349 c write(lunout,*)' gcm.def' 350 c write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref 351 c write(lunout,*)' day_ref=',day_ref," dayref=",dayref 352 c if (raz_date .ne. 1) then 353 c write(lunout,*) 354 c . 'GCM: On garde les dates du fichier restart' 355 c else 356 c annee_ref = anneeref 357 c day_ref = dayref 358 c day_ini = dayref 359 c itau_dyn = 0 360 c itau_phy = 0 361 c time_0 = 0. 362 c write(lunout,*) 363 c . 'GCM: On reinitialise a la date lue dans gcm.def' 364 c endif 365 c ELSE 366 c raz_date = 0 367 c endif 365 368 366 369 #ifdef CPP_IOIPSL … … 486 489 487 490 #ifdef CPP_IOIPSL 488 if ( 1.eq.1) then489 491 time_step = zdtvr 490 t_ops = iecri * daysec 491 t_wrt = iecri * daysec 492 if (ok_dyn_ins) then 493 ! initialize output file for instantaneous outputs 494 ! t_ops = iecri * daysec ! do operations every t_ops 495 t_ops =((1.0*iecri)/day_step) * daysec 496 t_wrt = daysec ! iecri * daysec ! write output every t_wrt 497 t_wrt = daysec ! iecri * daysec ! write output every t_wrt 498 CALL inithist(day_ref,annee_ref,time_step, 499 & t_ops,t_wrt) 492 500 ! CALL inithist_p(dynhist_file,day_ref,annee_ref,time_step, 493 501 ! . t_ops, t_wrt, histid, histvid) 494 495 IF (ok_dynzon) THEN 496 t_ops = iperiod * time_step 497 t_wrt = periodav * daysec 502 endif 503 504 IF (ok_dyn_ave) THEN 505 ! initialize output file for averaged outputs 506 t_ops = iperiod * time_step ! do operations every t_ops 507 t_wrt = periodav * daysec ! write output every t_wrt 508 CALL initdynav(day_ref,annee_ref,time_step, 509 & t_ops,t_wrt) 498 510 ! CALL initdynav_p(dynhistave_file,day_ref,annee_ref,time_step, 499 511 ! . t_ops, t_wrt, histaveid) 500 512 END IF 501 513 dtav = iperiod*dtvr/daysec 502 endif503 504 505 514 #endif 506 515 ! #endif of #ifdef CPP_IOIPSL -
LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3dpar/leapfrog_p.F
r1322 r1357 66 66 #include "description.h" 67 67 #include "serre.h" 68 #include "com_io_dyn.h"68 !#include "com_io_dyn.h" 69 69 #include "iniprint.h" 70 70 #include "academic.h" … … 352 352 c idissip=1 353 353 IF( purmats ) THEN 354 ! Purely Matsuno time stepping 354 355 IF( MOD(itau,iconser) .EQ.0.AND. forward ) conser = .TRUE. 355 356 IF( MOD(itau,idissip ).EQ.0.AND..NOT.forward ) apdiss = .TRUE. … … 357 358 s .and. iflag_phys.EQ.1 ) apphys = .TRUE. 358 359 ELSE 360 ! Leapfrog/Matsuno time stepping 359 361 IF( MOD(itau ,iconser) .EQ. 0 ) conser = .TRUE. 360 362 IF( MOD(itau+1,idissip) .EQ. 0 ) apdiss = .TRUE. … … 362 364 END IF 363 365 366 ! Ehouarn: for Shallow Water case (ie: 1 vertical layer), 367 ! supress dissipation step 368 if (llm.eq.1) then 369 apdiss=.false. 370 endif 371 364 372 cym ---> Pour le moment 365 373 cym apphys = .FALSE. 366 374 statcl = .FALSE. 367 conser = .FALSE. 375 conser = .FALSE. ! ie: no output of control variables to stdout in // 368 376 369 377 if (firstCaldyn) then … … 974 982 c$OMP BARRIER 975 983 call WaitRequest(Request_Physic) 976 984 c$OMP BARRIER 977 985 call friction_p(ucov,vcov,iphysiq*dtvr) 978 986 ENDIF ! of IF(iflag_phys.EQ.2) … … 1091 1099 enddo 1092 1100 c$OMP END DO NOWAIT 1093 endif 1101 endif ! of if (dissip_conservative) 1094 1102 1095 1103 ijb=ij_begin … … 1200 1208 c$OMP END MASTER 1201 1209 c$OMP BARRIER 1202 END IF 1210 END IF ! of IF(apdiss) 1203 1211 1204 1212 cc$OMP END PARALLEL … … 1339 1347 ENDIF !ok_dynzon 1340 1348 #endif 1341 ENDIF 1349 IF (ok_dyn_ave) THEN 1350 !$OMP MASTER 1351 #ifdef CPP_IOIPSL 1352 ! Ehouarn: Gather fields and make master send to output 1353 call Gather_Field(vcov,ip1jm,llm,0) 1354 call Gather_Field(ucov,ip1jmp1,llm,0) 1355 call Gather_Field(teta,ip1jmp1,llm,0) 1356 call Gather_Field(phi,ip1jmp1,llm,0) 1357 do iq=1,nqtot 1358 call Gather_Field(q(1,1,iq),ip1jmp1,llm,0) 1359 enddo 1360 call Gather_Field(masse,ip1jmp1,llm,0) 1361 call Gather_Field(ps,ip1jmp1,1,0) 1362 call Gather_Field(phis,ip1jmp1,1,0) 1363 if (mpi_rank==0) then 1364 CALL writedynav(itau,vcov, 1365 & ucov,teta,pk,phi,q,masse,ps,phis) 1366 endif 1367 #endif 1368 !$OMP END MASTER 1369 ENDIF ! of IF (ok_dyn_ave) 1370 ENDIF ! of IF((MOD(itau,iperiod).EQ.0).OR.(itau.EQ.itaufin)) 1342 1371 1343 1372 c----------------------------------------------------------------------- … … 1345 1374 c ------------------------------ 1346 1375 1347 c IF( MOD(itau,iecri).EQ.0) THEN1348 1349 IF( MOD(itau,iecri*day_step).EQ.0) THEN 1376 IF( MOD(itau,iecri).EQ.0) THEN 1377 ! Ehouarn: output only during LF or Backward Matsuno 1378 if (leapf.or.(.not.leapf.and.(.not.forward))) then 1350 1379 c$OMP BARRIER 1351 1380 c$OMP MASTER … … 1381 1410 1382 1411 #ifdef CPP_IOIPSL 1383 1412 if (ok_dyn_ins) then 1413 ! Ehouarn: Gather fields and make master write to output 1414 call Gather_Field(vcov,ip1jm,llm,0) 1415 call Gather_Field(ucov,ip1jmp1,llm,0) 1416 call Gather_Field(teta,ip1jmp1,llm,0) 1417 call Gather_Field(phi,ip1jmp1,llm,0) 1418 do iq=1,nqtot 1419 call Gather_Field(q(1,1,iq),ip1jmp1,llm,0) 1420 enddo 1421 call Gather_Field(masse,ip1jmp1,llm,0) 1422 call Gather_Field(ps,ip1jmp1,1,0) 1423 call Gather_Field(phis,ip1jmp1,1,0) 1424 if (mpi_rank==0) then 1425 CALL writehist(itau,vcov,ucov,teta,phi,q,masse,ps,phis) 1426 endif 1384 1427 ! CALL writehist_p(histid,histvid, itau,vcov, 1385 1428 ! & ucov,teta,phi,q,masse,ps,phis) 1386 1429 ! or use writefield_p 1430 ! call WriteField_p('ucov',reshape(ucov,(/iip1,jmp1,llm/))) 1431 ! call WriteField_p('vcov',reshape(vcov,(/iip1,jjm,llm/))) 1432 ! call WriteField_p('teta',reshape(teta,(/iip1,jmp1,llm/))) 1433 ! call WriteField_p('ps',reshape(ps,(/iip1,jmp1/))) 1434 endif ! of if (ok_dyn_ins) 1387 1435 #endif 1388 1436 ! For some Grads outputs of fields … … 1401 1449 endif ! of if (output_grads_dyn) 1402 1450 c$OMP END MASTER 1451 endif ! of if (leapf.or.(.not.leapf.and.(.not.forward))) 1403 1452 ENDIF ! of IF(MOD(itau,iecri).EQ.0) 1404 1453 … … 1479 1528 GO TO 2 1480 1529 1481 ELSE ! of IF(forward) 1530 ELSE ! of IF(forward) i.e. backward step 1482 1531 1483 1532 IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin) THEN … … 1490 1539 IF (ok_dynzon) THEN 1491 1540 c$OMP BARRIER 1492 1493 1541 call Register_Hallo(vcov,ip1jm,llm,1,0,0,1,TestRequest) 1494 1542 call SendRequest(TestRequest) 1495 1543 c$OMP BARRIER 1496 1544 call WaitRequest(TestRequest) 1497 1498 1545 c$OMP BARRIER 1499 1546 c$OMP MASTER … … 1505 1552 END IF !ok_dynzon 1506 1553 #endif 1554 IF (ok_dyn_ave) THEN 1555 !$OMP MASTER 1556 #ifdef CPP_IOIPSL 1557 ! Ehouarn: Gather fields and make master send to output 1558 call Gather_Field(vcov,ip1jm,llm,0) 1559 call Gather_Field(ucov,ip1jmp1,llm,0) 1560 call Gather_Field(teta,ip1jmp1,llm,0) 1561 call Gather_Field(phi,ip1jmp1,llm,0) 1562 do iq=1,nqtot 1563 call Gather_Field(q(1,1,iq),ip1jmp1,llm,0) 1564 enddo 1565 call Gather_Field(masse,ip1jmp1,llm,0) 1566 call Gather_Field(ps,ip1jmp1,1,0) 1567 call Gather_Field(phis,ip1jmp1,1,0) 1568 if (mpi_rank==0) then 1569 CALL writedynav(itau,vcov, 1570 & ucov,teta,pk,phi,q,masse,ps,phis) 1571 endif 1572 #endif 1573 !$OMP END MASTER 1574 ENDIF ! of IF (ok_dyn_ave) 1575 1507 1576 ENDIF ! of IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin) 1508 1577 1509 1578 1510 cIF(MOD(itau,iecri ).EQ.0) THEN1511 IF(MOD(itau,iecri*day_step).EQ.0) THEN1579 IF(MOD(itau,iecri ).EQ.0) THEN 1580 c IF(MOD(itau,iecri*day_step).EQ.0) THEN 1512 1581 c$OMP BARRIER 1513 1582 c$OMP MASTER … … 1542 1611 1543 1612 #ifdef CPP_IOIPSL 1544 1613 if (ok_dyn_ins) then 1614 ! Ehouarn: Gather fields and make master send to output 1615 call Gather_Field(vcov,ip1jm,llm,0) 1616 call Gather_Field(ucov,ip1jmp1,llm,0) 1617 call Gather_Field(teta,ip1jmp1,llm,0) 1618 call Gather_Field(phi,ip1jmp1,llm,0) 1619 do iq=1,nqtot 1620 call Gather_Field(q(1,1,iq),ip1jmp1,llm,0) 1621 enddo 1622 call Gather_Field(masse,ip1jmp1,llm,0) 1623 call Gather_Field(ps,ip1jmp1,1,0) 1624 call Gather_Field(phis,ip1jmp1,1,0) 1625 if (mpi_rank==0) then 1626 CALL writehist(itau,vcov,ucov,teta,phi,q,masse,ps,phis) 1627 endif 1545 1628 ! CALL writehist_p(histid, histvid, itau,vcov , 1546 1629 ! & ucov,teta,phi,q,masse,ps,phis) 1630 endif ! of if (ok_dyn_ins) 1547 1631 #endif 1548 1632 ! For some Grads output (but does it work?) … … 1562 1646 1563 1647 c$OMP END MASTER 1564 ENDIF ! of IF(MOD(itau,iecri *day_step).EQ.0)1648 ENDIF ! of IF(MOD(itau,iecri).EQ.0) 1565 1649 1566 1650 IF(itau.EQ.itaufin) THEN
Note: See TracChangeset
for help on using the changeset viewer.