Changeset 1201 for LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar
- Timestamp:
- Jul 7, 2009, 4:01:00 PM (15 years ago)
- Location:
- LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/calfis_p.F
r1142 r1201 1 1 ! 2 ! $ Header$2 ! $Id$ 3 3 ! 4 4 C 5 5 C 6 6 SUBROUTINE calfis_p(lafin, 7 $ rdayvrai,7 $ jD_cur, jH_cur, 8 8 $ heure, 9 9 $ pucov, … … 209 209 SAVE firstcal,debut 210 210 c$OMP THREADPRIVATE(firstcal,debut) 211 REAL rdayvrai211 REAL :: jD_cur, jH_cur 212 212 213 213 REAL,SAVE,dimension(1:iim,1:llm):: du_send,du_recv,dv_send,dv_recv … … 334 334 c --------------- 335 335 c 336 336 n 337 337 DO iq=1,nqtot 338 338 iiq=niadv(iq) … … 665 665 . debut, 666 666 . lafin, 667 . rdayvrai,668 . heure,667 . jD_cur, 668 . jH_cur, 669 669 . dtphys, 670 670 . zplev_omp, -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/conf_gcm.F
r1190 r1201 44 44 !#include "clesphys.h" 45 45 #include "iniprint.h" 46 #include "temps.h" 46 47 #include "comconst.h" 47 48 … … 122 123 CALL getin('planet_type',planet_type) 123 124 125 !Config Key = calend 126 !Config Desc = type de calendrier utilise 127 !Config Def = earth_360d 128 !Config Help = valeur possible: earth_360d, earth_365d, earth_366d 129 !Config 130 calend = 'earth_360d' 131 CALL getin('calend', calend) 132 124 133 !Config Key = dayref 125 134 !Config Desc = Jour de l'etat initial … … 588 597 write(lunout,*)' Configuration des parametres du gcm: ' 589 598 write(lunout,*)' planet_type = ', planet_type 599 write(lunout,*)' calend = ', calend 590 600 write(lunout,*)' dayref = ', dayref 591 601 write(lunout,*)' anneeref = ', anneeref … … 812 822 write(lunout,*)' Configuration des parametres du gcm: ' 813 823 write(lunout,*)' planet_type = ', planet_type 824 write(lunout,*)' calend = ', calend 814 825 write(lunout,*)' dayref = ', dayref 815 826 write(lunout,*)' anneeref = ', anneeref -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/gcm.F
r1200 r1201 1 1 ! 2 ! $ Header$2 ! $Id$ 3 3 ! 4 4 c … … 113 113 real time_step, t_wrt, t_ops 114 114 115 c REAL rdayvrai,rdaym_ini,rday_ecri116 c LOGICAL first117 115 118 116 LOGICAL call_iniphys … … 133 131 134 132 character (len=80) :: dynhist_file, dynhistave_file 135 character (len=20) :: modname136 character (len=80) :: abort_message137 138 C Calendrier139 LOGICAL true_calendar140 PARAMETER (true_calendar = .false.) 133 character (len=20) :: modname 134 character (len=80) :: abort_message 135 ! locales pour gestion du temps 136 INTEGER :: an, mois, jour 137 REAL :: heure 138 141 139 142 140 c----------------------------------------------------------------------- … … 165 163 166 164 167 c----------------------------------------------------------------------- 168 c Choix du calendrier 169 c ------------------- 170 171 #ifdef CPP_IOIPSL 172 if (true_calendar) then 173 call ioconf_calendar('gregorian') 174 else 175 call ioconf_calendar('360d') 176 endif 177 #endif 165 178 166 c---------------------------------------------------------------------- 179 167 c lecture des fichiers gcm.def ou run.def … … 221 209 #endif 222 210 endif ! of if (planet_type.eq."earth") 211 212 c----------------------------------------------------------------------- 213 c Choix du calendrier 214 c ------------------- 215 216 c calend = 'earth_365d' 217 218 #ifdef CPP_IOIPSL 219 if (calend == 'earth_360d') then 220 call ioconf_calendar('360d') 221 write(lunout,*)'CALENDRIER CHOISI: Terrestre a 360 jours/an' 222 else if (calend == 'earth_365d') then 223 call ioconf_calendar('noleap') 224 write(lunout,*)'CALENDRIER CHOISI: Terrestre a 365 jours/an' 225 else if (calend == 'earth_366d') then 226 call ioconf_calendar('gregorian') 227 write(lunout,*)'CALENDRIER CHOISI: Terrestre bissextile' 228 else 229 abort_message = 'Mauvais choix de calendrier' 230 call abort_gcm(modname,abort_message,1) 231 endif 232 #endif 223 233 224 234 IF (config_inca /= 'none') THEN … … 306 316 if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then 307 317 write(lunout,*) 308 . ' Attention les dates initiales lues dans le fichier'318 . 'GCM: Attention les dates initiales lues dans le fichier' 309 319 write(lunout,*) 310 320 . ' restart ne correspondent pas a celles lues dans ' … … 312 322 if (raz_date .ne. 1) then 313 323 write(lunout,*) 314 . ' On garde les dates du fichier restart'324 . 'GCM: On garde les dates du fichier restart' 315 325 else 316 326 annee_ref = anneeref 317 327 day_ref = dayref 318 day_ini = dayref328 day_ini = 1 319 329 itau_dyn = 0 320 330 itau_phy = 0 321 331 time_0 = 0. 322 332 write(lunout,*) 323 . ' On reinitialise a la date lue dans gcm.def'333 . 'GCM: On reinitialise a la date lue dans gcm.def' 324 334 endif 325 335 ELSE … … 327 337 endif 328 338 329 #ifdef CPP_IOIPSL 330 call ioconf_startdate(annee_ref,0,day_ref,0.) 331 #endif 339 mois = 1 340 heure = 0. 341 call ymds2ju(annee_ref, mois, day_ref, heure, jD_ref) 342 jH_ref = jD_ref - int(jD_ref) 343 jD_ref = int(jD_ref) 344 345 #ifdef CPP_IOIPSL 346 call ioconf_startdate(annee_ref,0,day_ref, 0.) 347 #endif 348 349 write(lunout,*)'DEBUG' 350 write(lunout,*)'annee_ref, mois, day_ref, heure, jD_ref' 351 write(lunout,*)annee_ref, mois, day_ref, heure, jD_ref 352 call ju2ymds(jD_ref+jH_ref,an, mois, jour, heure) 353 write(lunout,*)'jD_ref+jH_ref,an, mois, jour, heure' 354 write(lunout,*)jD_ref+jH_ref,an, mois, jour, heure 332 355 333 356 c nombre d'etats dans les fichiers demarrage et histoire … … 413 436 WRITE(lunout,300)day_ini,day_end 414 437 300 FORMAT('1'/,15x,'run du jour',i7,2x,'au jour',i7//) 438 call ju2ymds(jD_ref+day_ini-1,an, mois, jour, heure) 439 write (lunout,301)jour, mois, an 440 call ju2ymds(jD_ref+day_end-1,an, mois, jour, heure) 441 write (lunout,302)jour, mois, an 442 301 FORMAT('1'/,15x,'run du ', i2,'/',i2,'/',i4) 443 302 FORMAT('1'/,15x,' au ', i2,'/',i2,'/',i4) 415 444 416 445 !#ifdef CPP_IOIPSL -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/leapfrog_p.F
r1195 r1201 1 1 ! 2 ! $ Header$2 ! $Id$ 3 3 ! 4 4 c … … 120 120 c 121 121 INTEGER itau,itaufinp1,iav 122 INTEGER*4iday ! jour julien123 REAL time ! Heure de la journee en fraction d'1 jour122 ! INTEGER iday ! jour julien 123 REAL time 124 124 125 125 REAL SSUM … … 134 134 real time_step, t_wrt, t_ops 135 135 136 REAL rdayvrai,rdaym_ini 136 ! jD_cur: jour julien courant 137 ! jH_cur: heure julienne courante 138 REAL :: jD_cur, jH_cur 139 INTEGER :: an, mois, jour 140 REAL :: secondes 141 137 142 LOGICAL first,callinigrads 138 143 … … 162 167 character*80 abort_message 163 168 164 C Calendrier165 LOGICAL true_calendar166 PARAMETER (true_calendar = .false.)167 169 168 170 logical,PARAMETER :: dissip_conservative=.TRUE. … … 207 209 208 210 itau = 0 209 iday = day_ini+itau/day_step210 time = FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0211 IF(time.GT.1.) THEN212 time = time-1.213 iday = iday+1214 ENDIF211 c$$$ iday = day_ini+itau/day_step 212 c$$$ time = FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0 213 c$$$ IF(time.GT.1.) THEN 214 c$$$ time = time-1. 215 c$$$ iday = iday+1 216 c$$$ ENDIF 215 217 216 218 c Allocate variables depending on dynamic variable nqtot … … 241 243 1 CONTINUE 242 244 243 c$OMP MASTER 244 245 CALL barrier 246 247 c$OMP END MASTER 248 c$OMP BARRIER 245 jD_cur = jD_ref + (day_ini - 1) + int (itau * dtvr / daysec) 246 jH_cur = jH_ref + & 247 & (itau * dtvr / daysec - int(itau * dtvr / daysec)) 249 248 250 249 … … 551 550 c$OMP BARRIER 552 551 ! CALL FTRACE_REGION_BEGIN("caldyn") 552 time = jD_cur + jH_cur 553 553 CALL caldyn_p 554 554 $ ( itau,ucov,vcov,teta,ps,masse,pk,pkf,phis , 555 $ phi,conser,du,dv,dteta,dp,w, pbaru,pbarv, time +iday-day_ini)555 $ phi,conser,du,dv,dteta,dp,w, pbaru,pbarv, time ) 556 556 557 557 ! CALL FTRACE_REGION_END("caldyn") … … 684 684 CALL exner_hyb_p( ip1jmp1, ps, p,alpha,beta,pks, pk, pkf ) 685 685 c$OMP BARRIER 686 rdaym_ini = itau * dtvr / daysec 687 rdayvrai = rdaym_ini + day_ini 688 686 jD_cur = jD_ref + (day_ini -1) + int (itau * dtvr / daysec) 687 jH_cur = jH_ref + & 688 & (itau * dtvr / daysec - int(itau * dtvr / daysec)) 689 call ju2ymds(jD_cur+jH_cur, an, mois, jour, secondes) 689 690 690 691 c rajout debug … … 773 774 cc$OMP BARRIER 774 775 ! CALL FTRACE_REGION_BEGIN("calfis") 775 CALL calfis_p(lafin , rdayvrai,time,776 CALL calfis_p(lafin ,jD_cur, jH_cur, 776 777 $ ucov,vcov,teta,q,masse,ps,p,pk,phis,phi , 777 778 $ du,dv,dteta,dq, … … 1274 1275 IF(forward. OR. leapf) THEN 1275 1276 itau= itau + 1 1276 iday= day_ini+itau/day_step1277 time= FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_01278 IF(time.GT.1.) THEN1279 time = time-1.1280 iday = iday+11281 ENDIF1277 c$$$ iday= day_ini+itau/day_step 1278 c$$$ time= FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0 1279 c$$$ IF(time.GT.1.) THEN 1280 c$$$ time = time-1. 1281 c$$$ iday = iday+1 1282 c$$$ ENDIF 1282 1283 ENDIF 1283 1284 … … 1444 1445 1445 1446 itau = itau + 1 1446 iday = day_ini+itau/day_step1447 time = FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_01448 1449 IF(time.GT.1.) THEN1450 time = time-1.1451 iday = iday+11452 ENDIF1447 c$$$ iday = day_ini+itau/day_step 1448 c$$$ time = FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0 1449 c$$$ 1450 c$$$ IF(time.GT.1.) THEN 1451 c$$$ time = time-1. 1452 c$$$ iday = iday+1 1453 c$$$ ENDIF 1453 1454 1454 1455 forward = .FALSE. -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/sortvarc.F
r774 r1201 129 129 ang = SSUM( llm, angl, 1 ) 130 130 131 rday = FLOAT(INT ( day_ini + time ))131 c rday = FLOAT(INT ( day_ini + time )) 132 132 c 133 rday = FLOAT(INT(time-jD_ref-jH_ref)) 133 134 IF(ptot0.eq.0.) THEN 134 135 PRINT 3500, itau, rday, heure,time … … 156 157 RETURN 157 158 158 3500 FORMAT('0'10(1h*),4x,'pas'i7,5x,'jour'f 5.0,'heure'f5.1,4x159 * ,'date',f1 0.5,4x,10(1h*))159 3500 FORMAT('0'10(1h*),4x,'pas'i7,5x,'jour'f9.0,'heure'f5.1,4x 160 * ,'date',f14.4,4x,10(1h*)) 160 161 4000 FORMAT(10x,'masse',4x,'rmsdpdt',7x,'energie',2x,'enstrophie' 161 162 * ,2x,'entropie',3x,'rmsv',4x,'mt.ang',/,'GLOB ' -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/temps.h
r1154 r1201 1 1 ! 2 ! $ Header$2 ! $Id$ 3 3 ! 4 4 ! ATTENTION!!!!: ce fichier include est compatible format fixe/format libre … … 8 8 ! 9 9 ! 10 ! jD_ref = jour julien de la date de reference (lancement de l'experience) 11 ! hD_ref = "heure" julienne de la date de reference 10 12 !----------------------------------------------------------------------- 11 13 ! INCLUDE 'temps.h' 12 14 13 15 COMMON/temps/itaufin, dt, day_ini, day_end, annee_ref, day_ref, & 14 & itau_dyn, itau_phy 16 & itau_dyn, itau_phy, jD_ref, jH_ref, calend 15 17 16 18 INTEGER itaufin 17 INTEGER(kind=4) itau_dyn, itau_phy 18 INTEGER(kind=4) day_ini, day_end, annee_ref, day_ref 19 REAL dt 20 !$OMP THREADPRIVATE(/temps/) 19 INTEGER itau_dyn, itau_phy 20 INTEGER day_ini, day_end, annee_ref, day_ref 21 REAL dt, jD_ref, jH_ref 22 CHARACTER (len=10) :: calend 23 24 !-----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.