Changeset 1201
- Timestamp:
- Jul 7, 2009, 4:01:00 PM (15 years ago)
- Location:
- LMDZ4/branches/LMDZ4-dev/libf
- Files:
-
- 2 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/LMDZ4-dev/libf/dyn3d/calfis.F
r1114 r1201 1 1 ! 2 ! $ Header$2 ! $Id$ 3 3 ! 4 4 C 5 5 C 6 6 SUBROUTINE calfis(lafin, 7 $ rdayvrai, 8 $ heure, 7 $ jD_cur, jH_cur, 9 8 $ pucov, 10 9 $ pvcov, … … 102 101 c ----------- 103 102 LOGICAL lafin 104 REAL heure 103 105 104 106 105 REAL pvcov(iip1,jjm,llm) … … 170 169 DATA firstcal/.true./ 171 170 SAVE firstcal,debut 172 REAL rdayvrai 171 ! REAL rdayvrai 172 REAL :: jD_cur, jH_cur 173 173 c 174 174 c----------------------------------------------------------------------- … … 445 445 . debut, 446 446 . lafin, 447 . rdayvrai,448 . heure,447 . jD_cur, 448 . jH_cur, 449 449 . dtphys, 450 450 . zplev, -
LMDZ4/branches/LMDZ4-dev/libf/dyn3d/conf_gcm.F
r1190 r1201 38 38 #include "serre.h" 39 39 #include "comdissnew.h" 40 #include "temps.h" 40 41 #include "comconst.h" 41 42 … … 111 112 planet_type="earth" 112 113 CALL getin('planet_type',planet_type) 114 115 !Config Key = calend 116 !Config Desc = type de calendrier utilise 117 !Config Def = earth_360d 118 !Config Help = valeur possible: earth_360d, earth_365d, earth_366d 119 !Config 120 calend = 'earth_360d' 121 CALL getin('calend', calend) 113 122 114 123 !Config Key = dayref … … 576 585 write(lunout,*)' Configuration des parametres du gcm: ' 577 586 write(lunout,*)' planet_type = ', planet_type 587 write(lunout,*)' calend = ', calend 578 588 write(lunout,*)' dayref = ', dayref 579 589 write(lunout,*)' anneeref = ', anneeref … … 762 772 write(lunout,*)' Configuration des parametres du gcm: ' 763 773 write(lunout,*)' planet_type = ', planet_type 774 write(lunout,*)' calend = ', calend 764 775 write(lunout,*)' dayref = ', dayref 765 776 write(lunout,*)' anneeref = ', anneeref -
LMDZ4/branches/LMDZ4-dev/libf/dyn3d/gcm.F
r1200 r1201 113 113 real time_step, t_wrt, t_ops 114 114 115 REAL rdayvrai,rdaym_ini,rday_ecri116 115 LOGICAL first 117 116 … … 135 134 character (len=20) :: modname 136 135 character (len=80) :: abort_message 137 138 C Calendrier139 LOGICAL true_calendar140 PARAMETER (true_calendar = .false.) 136 ! locales pour gestion du temps 137 INTEGER :: an, mois, jour 138 REAL :: heure 139 141 140 142 141 c----------------------------------------------------------------------- … … 163 162 164 163 165 c-----------------------------------------------------------------------166 c Choix du calendrier167 c -------------------168 169 #ifdef CPP_IOIPSL170 if (true_calendar) then171 call ioconf_calendar('gregorian')172 else173 call ioconf_calendar('360d')174 endif175 #endif176 164 c---------------------------------------------------------------------- 177 165 c lecture des fichiers gcm.def ou run.def … … 197 185 endif 198 186 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 187 c----------------------------------------------------------------------- 188 c Choix du calendrier 189 c ------------------- 190 191 c calend = 'earth_365d' 192 193 #ifdef CPP_IOIPSL 194 if (calend == 'earth_360d') then 195 call ioconf_calendar('360d') 196 write(lunout,*)'CALENDRIER CHOISI: Terrestre a 360 jours/an' 197 else if (calend == 'earth_365d') then 198 call ioconf_calendar('noleap') 199 write(lunout,*)'CALENDRIER CHOISI: Terrestre a 365 jours/an' 200 else if (calend == 'earth_366d') then 201 call ioconf_calendar('gregorian') 202 write(lunout,*)'CALENDRIER CHOISI: Terrestre bissextile' 203 else 204 abort_message = 'Mauvais choix de calendrier' 205 call abort_gcm(modname,abort_message,1) 206 endif 207 #endif 208 c----------------------------------------------------------------------- 199 209 200 210 IF (config_inca /= 'none') THEN … … 303 313 annee_ref = anneeref 304 314 day_ref = dayref 305 day_ini = dayref315 day_ini = 1 306 316 itau_dyn = 0 307 317 itau_phy = 0 … … 314 324 endif 315 325 326 mois = 1 327 heure = 0. 328 call ymds2ju(annee_ref, mois, day_ref, heure, jD_ref) 329 jH_ref = jD_ref - int(jD_ref) 330 jD_ref = int(jD_ref) 331 316 332 #ifdef CPP_IOIPSL 317 333 call ioconf_startdate(annee_ref,0,day_ref, 0.) 318 334 #endif 319 335 336 write(lunout,*)'DEBUG' 337 write(lunout,*)'annee_ref, mois, day_ref, heure, jD_ref' 338 write(lunout,*)annee_ref, mois, day_ref, heure, jD_ref 339 call ju2ymds(jD_ref+jH_ref,an, mois, jour, heure) 340 write(lunout,*)'jD_ref+jH_ref,an, mois, jour, heure' 341 write(lunout,*)jD_ref+jH_ref,an, mois, jour, heure 320 342 321 343 c nombre d'etats dans les fichiers demarrage et histoire … … 391 413 WRITE(lunout,300)day_ini,day_end 392 414 300 FORMAT('1'/,15x,'run du jour',i7,2x,'au jour',i7//) 415 call ju2ymds(jD_ref+day_ini-1,an, mois, jour, heure) 416 write (lunout,301)jour, mois, an 417 call ju2ymds(jD_ref+day_end-1,an, mois, jour, heure) 418 write (lunout,302)jour, mois, an 419 301 FORMAT('1'/,15x,'run du ', i2,'/',i2,'/',i4) 420 302 FORMAT('1'/,15x,' au ', i2,'/',i2,'/',i4) 393 421 394 422 if (planet_type.eq."earth") then -
LMDZ4/branches/LMDZ4-dev/libf/dyn3d/ini_paramLMDZ_dyn.h
r956 r1201 2 2 dt_cum = dtvr*day_step 3 3 4 zan = annee_ref5 dayref = day_ref6 CALL ymds2ju(zan, 1, dayref, 0.0, zjulian)4 ! zan = annee_ref 5 ! dayref = day_ref 6 ! CALL ymds2ju(zan, 1, dayref, 0.0, zjulian) 7 7 tau0 = itau_dyn 8 8 c … … 15 15 . iip1,rlong, jjp1,rlatg, 16 16 . 1,1,1,1, 17 . tau0, zjulian, dt_cum,17 . tau0, jD_ref+jH_ref , dt_cum, 18 18 . thoriid, nid_ctesGCM) 19 19 c … … 134 134 c 135 135 CALL histdef(nid_ctesGCM, "true_calendar", 136 ."Choix du calendrier : 1=gregorien ,0=calen. a 360 j",136 ."Choix du calendrier", 137 137 . "-",iip1,jjp1,thoriid, 1,1,1, -99, 32, 138 138 . "once", dt_cum,dt_cum) -
LMDZ4/branches/LMDZ4-dev/libf/dyn3d/leapfrog.F
r1190 r1201 1 ! 2 ! $Id$ 1 3 ! 2 4 c … … 112 114 c 113 115 INTEGER itau,itaufinp1,iav 114 INTEGER*4iday ! jour julien115 REAL time ! Heure de la journee en fraction d'1 jour116 ! INTEGER iday ! jour julien 117 REAL time 116 118 117 119 REAL SSUM … … 125 127 real time_step, t_wrt, t_ops 126 128 127 REAL rdayvrai,rdaym_ini 129 ! REAL rdayvrai,rdaym_ini 130 ! jD_cur: jour julien courant 131 ! jH_cur: heure julienne courante 132 REAL :: jD_cur, jH_cur 133 INTEGER :: an, mois, jour 134 REAL :: secondes 135 128 136 LOGICAL first,callinigrads 129 137 cIM : pour sortir les param. du modele dans un fis. netcdf 110106 130 138 save first 131 139 data first/.true./ 132 real dt_cum , zjulian140 real dt_cum 133 141 character*10 infile 134 142 integer zan, tau0, thoriid … … 167 175 character*80 abort_message 168 176 169 C Calendrier170 LOGICAL true_calendar171 PARAMETER (true_calendar = .false.)172 173 177 logical dissip_conservative 174 178 save dissip_conservative … … 193 197 194 198 itau = 0 195 iday = day_ini+itau/day_step196 time = FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0197 IF(time.GT.1.) THEN198 time = time-1.199 iday = iday+1200 ENDIF199 c$$$ iday = day_ini+itau/day_step 200 c$$$ time = FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0 201 c$$$ IF(time.GT.1.) THEN 202 c$$$ time = time-1. 203 c$$$ iday = iday+1 204 c$$$ ENDIF 201 205 202 206 … … 214 218 215 219 1 CONTINUE 220 221 jD_cur = jD_ref + (day_ini - 1) + int (itau * dtvr / daysec) 222 jH_cur = jH_ref + & 223 & (itau * dtvr / daysec - int(itau * dtvr / daysec)) 216 224 217 225 … … 284 292 CALL geopot ( ip1jmp1, teta , pk , pks, phis , phi ) 285 293 294 time = jD_cur + jH_cur 286 295 CALL caldyn 287 296 $ ( itau,ucov,vcov,teta,ps,masse,pk,pkf,phis , 288 $ phi,conser,du,dv,dteta,dp,w, pbaru,pbarv, time +iday-day_ini)297 $ phi,conser,du,dv,dteta,dp,w, pbaru,pbarv, time ) 289 298 290 299 … … 345 354 CALL exner_hyb( ip1jmp1, ps, p,alpha,beta,pks, pk, pkf ) 346 355 347 rdaym_ini = itau * dtvr / daysec 348 rdayvrai = rdaym_ini + day_ini 349 356 ! rdaym_ini = itau * dtvr / daysec 357 ! rdayvrai = rdaym_ini + day_ini 358 jD_cur = jD_ref + (day_ini - 1) + int (itau * dtvr / daysec) 359 jH_cur = jH_ref + & 360 & (itau * dtvr / daysec - int(itau * dtvr / daysec)) 361 ! write(lunout,*)'itau, jD_cur = ', itau, jD_cur, jH_cur 362 ! call ju2ymds(jD_cur+jH_cur, an, mois, jour, secondes) 363 ! write(lunout,*)'current date = ',an, mois, jour, secondes 350 364 351 365 c rajout debug … … 379 393 #endif 380 394 ! #endif of #ifdef CPP_IOIPSL 381 CALL calfis( lafin , rdayvrai,time,395 CALL calfis( lafin , jD_cur, jH_cur, 382 396 $ ucov,vcov,teta,q,masse,ps,p,pk,phis,phi , 383 397 $ du,dv,dteta,dq, … … 507 521 IF(forward. OR. leapf) THEN 508 522 itau= itau + 1 509 iday= day_ini+itau/day_step510 time= FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0511 IF(time.GT.1.) THEN512 time = time-1.513 iday = iday+1514 ENDIF523 c$$$ iday= day_ini+itau/day_step 524 c$$$ time= FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0 525 c$$$ IF(time.GT.1.) THEN 526 c$$$ time = time-1. 527 c$$$ iday = iday+1 528 c$$$ ENDIF 515 529 ENDIF 516 530 … … 632 646 633 647 itau = itau + 1 634 iday = day_ini+itau/day_step635 time = FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0636 637 IF(time.GT.1.) THEN638 time = time-1.639 iday = iday+1640 ENDIF648 c$$$ iday = day_ini+itau/day_step 649 c$$$ time = FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0 650 c$$$ 651 c$$$ IF(time.GT.1.) THEN 652 c$$$ time = time-1. 653 c$$$ iday = iday+1 654 c$$$ ENDIF 641 655 642 656 forward = .FALSE. -
LMDZ4/branches/LMDZ4-dev/libf/dyn3d/sortvarc.F
r524 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/dyn3d/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 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 20 23 21 24 !----------------------------------------------------------------------- -
LMDZ4/branches/LMDZ4-dev/libf/dyn3d/write_paramLMDZ_dyn.h
r956 r1201 107 107 . zx_tmp_2d,iip1*jjp1,ndex2d) 108 108 c 109 IF(true_calendar) THEN 110 zx_tmp_2d(1:iip1,1:jjp1)=1. 111 ELSE 112 zx_tmp_2d(1:iip1,1:jjp1)=0. 113 ENDIF 109 if (calend == 'earth_360d') then 110 zx_tmp_2d(1:iip1,1:jjp1)=1. 111 else if (calend == 'earth_365d') then 112 zx_tmp_2d(1:iip1,1:jjp1)=2. 113 else if (calend == 'earth_366d') then 114 zx_tmp_2d(1:iip1,1:jjp1)=3. 115 endif 116 114 117 CALL histwrite(nid_ctesGCM, "true_calendar", itau_w, 115 118 . zx_tmp_2d,iip1*jjp1,ndex2d) -
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 !----------------------------------------------------------------------- -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/hgardfou.F
r1145 r1201 1 1 ! 2 ! $Id$ 2 3 SUBROUTINE hgardfou (t,tsol,text) 3 4 use dimphy … … 12 13 REAL t(klon,klev), tsol(klon,nbsrf) 13 14 CHARACTER*(*) text 15 character (len=20) :: modname = 'hgardfou' 16 character (len=80) :: abort_message 14 17 C 15 18 INTEGER i, k, nsrf … … 124 127 c 125 128 IF (.NOT. ok) THEN 126 PRINT*, 'hgardfou s arrete ',text127 CALL abort 129 abort_message= 'hgardfou s arrete '//text 130 CALL abort_gcm (modname,abort_message,1) 128 131 ENDIF 129 132 -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/physiq.F
r1196 r1201 4 4 5 5 SUBROUTINE physiq (nlon,nlev, 6 . debut,lafin, rjourvrai,gmtime,pdtphys,6 . debut,lafin,jD_cur, jH_cur,pdtphys, 7 7 . paprs,pplay,pphi,pphis,presnivs,clesphy0, 8 8 . u,v,t,qx, … … 60 60 c debut---input-L-variable logique indiquant le premier passage 61 61 c lafin---input-L-variable logique indiquant le dernier passage 62 c rjour---input-R-numero du jour de l'experience63 c gmtime--input-R-temps universel dans la journee (0 a 86400 s)62 c jD_cur--input-R-jour courant a l'appel de la physique (jour julien) 63 c jH_cur--input-R-heure courante a l'appel de la physique (jour julien) 64 64 c pdtphys-input-R-pas d'integration pour la physique (seconde) 65 65 c paprs---input-R-pression pour chaque inter-couche (en Pa) … … 186 186 INTEGER nlon 187 187 INTEGER nlev 188 REAL rjourvrai189 REAL gmtime 188 REAL :: jD_cur, jH_cur 189 190 190 REAL pdtphys 191 191 LOGICAL debut, lafin … … 703 703 c Conditions aux limites 704 704 c 705 INTEGER julien 705 ! 706 ! Gestion calendrier 707 ! 708 REAL :: jD_1jan, jH_1jan 709 INTEGER :: year_cur, mth_cur, day_cur, days_elapsed 710 REAL :: hour, day_since_equinox 711 ! Date de l'equinoxe de printemps 712 INTEGER, parameter :: mth_eq=3, day_eq=21 713 REAL :: jD_eq 714 715 LOGICAL, parameter :: new_orbit = .true. 716 706 717 c 707 718 INTEGER lmt_pas … … 1087 1098 c$OMP THREADPRIVATE(first) 1088 1099 1100 integer iunit 1101 1089 1102 logical, save:: read_climoz ! read ozone climatology 1090 1103 integer, save:: ncid_climoz ! NetCDF file containing ozone climatology … … 1114 1127 write(lunout,*) 'DEBUT DE PHYSIQ !!!!!!!!!!!!!!!!!!!!' 1115 1128 write(lunout,*) 1116 s 'nlon,klev,nqtot,debut,lafin, rjourvrai,gmtime,pdtphys'1129 s 'nlon,klev,nqtot,debut,lafin, jD_cur, jH_cur,pdtphys' 1117 1130 write(lunout,*) 1118 s nlon,klev,nqtot,debut,lafin, rjourvrai,gmtime,pdtphys1131 s nlon,klev,nqtot,debut,lafin, jD_cur, jH_cur,pdtphys 1119 1132 1120 1133 write(lunout,*) 'papers, play, phi, u, v, t, omega' … … 1184 1197 1185 1198 c====================================================================== 1186 xjour = rjourvrai 1199 ! Gestion calendrier 1200 ! 1201 call ju2ymds(jD_cur+jH_cur, year_cur, mth_cur, day_cur, hour) 1202 call ymds2ju(year_cur, 1, 1, 0., jD_1jan) 1203 jH_1jan = jD_1jan - int (jD_1jan) 1204 jD_1jan = int (jD_1jan) 1205 xjour = jD_cur - jD_1jan 1206 days_elapsed = jD_cur - jD_1jan 1207 1187 1208 c 1188 1209 c Si c'est le debut, il faut initialiser plusieurs choses … … 1472 1493 1473 1494 cXXXPB Positionner date0 pour initialisation de ORCHIDEE 1474 date0 = zjulian 1475 C date0 = day_ini 1495 date0 = jD_ref 1476 1496 WRITE(*,*) 'physiq date0 : ',date0 1477 1497 c … … 1491 1511 CALL VTe(VTphysiq) 1492 1512 CALL VTb(VTinca) 1493 iii = MOD(NINT(xjour),360) 1494 calday = FLOAT(iii) + gmtime 1495 WRITE(lunout,*) 'initial time ', xjour, calday 1513 ! iii = MOD(NINT(xjour),360) 1514 ! calday = FLOAT(iii) + jH_cur 1515 calday = FLOAT(days_elapsed) + jH_cur 1516 WRITE(lunout,*) 'initial time chemini', days_elapsed, calday 1496 1517 1497 1518 CALL chemini( … … 1534 1555 ! 1535 1556 itap = itap + 1 1536 julien = MOD(NINT(xjour),360)1537 if (julien .eq. 0) julien = 3601538 1539 1557 ! 1540 1558 ! Update fraction of the sub-surfaces (pctsrf) and … … 1542 1560 ! on the surface fraction. 1543 1561 ! 1544 CALL change_srf_frac(itap, dtime, julien,1562 CALL change_srf_frac(itap, dtime, days_elapsed+1, 1545 1563 * pctsrf, falb1, falb2, ftsol, u10m, v10m, pbl_tke) 1546 1547 1564 1548 1565 ! Tendances bidons pour les processus qui n'affectent pas certaines … … 1697 1714 if (read_climoz) then 1698 1715 C Ozone climatology from a NetCDF file 1699 call regr_pr_av(ncid_climoz, "tro3", julien, press_climoz, 1716 call regr_pr_av(ncid_climoz, "tro3", days_elapsed+1, 1717 & press_climoz, 1700 1718 $ paprs, wo) 1701 1719 ! Convert from mole fraction of ozone to column density of ozone in a … … 1707 1725 C "zmasse" changes a little.) 1708 1726 else 1709 CALL ozonecm(real(julien), rlat, paprs, wo) 1727 CALL ozonecm(real(days_elapsed+1), rlat, paprs, wo) 1728 1710 1729 end if 1711 1730 ENDIF … … 1749 1768 ! doit donc etre placé avant radlwsw et pbl_surface 1750 1769 1770 ! calcul selon la routine utilisee pour les planetes 1771 if (new_orbit) then 1772 call ymds2ju(year_cur, mth_eq, day_eq,0., jD_eq) 1773 day_since_equinox = (jD_cur + jH_cur) - jD_eq 1774 ! day_since_equinox = (jD_cur) - jD_eq 1775 call solarlong(day_since_equinox, zlongi, dist) 1776 else 1777 ! calcul selon la routine utilisee pour l'AR4 1751 1778 ! choix entre calcul de la longitude solaire vraie ou valeur fixee a 1752 1779 ! solarlong0 1753 1754 if (solarlong0<-999.) then1755 CALL orbite(FLOAT(julien),zlongi,dist)1756 else1757 zlongi=solarlong0 ! longitude solaire vraie1758 dist=1. ! distance au soleil / moyenne1780 if (solarlong0<-999.) then 1781 CALL orbite(FLOAT(days_elapsed+1),zlongi,dist) 1782 else 1783 zlongi=solarlong0 ! longitude solaire vraie 1784 dist=1. ! distance au soleil / moyenne 1785 endif 1759 1786 endif 1760 1761 if(prt_level.ge.1) print*,'Longitude solaire ',zlongi,solarlong01787 if(prt_level.ge.1) & 1788 & write(lunout,*)'Longitude solaire ',zlongi,solarlong0,dist 1762 1789 1763 1790 ! Avec ou sans cycle diurne 1764 1791 IF (cycle_diurne) THEN 1765 1792 zdtime=dtime*FLOAT(radpas) ! pas de temps du rayonnement (s) 1766 CALL zenang(zlongi, gmtime,zdtime,rlat,rlon,rmu0,fract)1793 CALL zenang(zlongi,jH_cur,zdtime,rlat,rlon,rmu0,fract) 1767 1794 ELSE 1768 1795 CALL angle(zlongi, rlat, fract, rmu0) … … 1797 1824 1798 1825 CALL pbl_surface( 1799 e dtime, date0, itap, julien,1826 e dtime, date0, itap, days_elapsed+1, 1800 1827 e debut, lafin, 1801 1828 e rlon, rlat, rugoro, rmu0, … … 2094 2121 2095 2122 if (itop_con(i).gt.klev-3) then 2096 print*,'La convection monte trop haut ' 2097 print*,'itop_con(,',i,',)=',itop_con(i) 2123 if(prt_level >= 9) then 2124 write(lunout,*)'La convection monte trop haut ' 2125 write(lunout,*)'itop_con(,',i,',)=',itop_con(i) 2126 endif 2098 2127 endif 2099 2128 ENDDO … … 2635 2664 IF (.NOT. aerosol_couple) 2636 2665 & CALL readaerosol_optic( 2637 & debut, new_aod, flag_aerosol, rjourvrai, pdtphys,2666 & debut, new_aod, flag_aerosol, jD_cur-jD_ref, pdtphys, 2638 2667 & pplay, paprs, t_seri, rhcl, 2639 2668 & mass_solu_aero, mass_solu_aero_pi, … … 2764 2793 CALL VTe(VTphysiq) 2765 2794 CALL VTb(VTinca) 2766 calday = FLOAT( julien) + gmtime2795 calday = FLOAT(days_elapsed + 1) + jH_cur 2767 2796 2768 2797 IF (config_inca == 'aero') THEN … … 2775 2804 2776 2805 CALL chemhook_begin (calday, 2777 $ julien,2778 $ gmtime,2806 $ days_elapsed, 2807 $ jH_cur, 2779 2808 $ pctsrf(1,1), 2780 2809 $ rlat, … … 3106 3135 IF (is_sequential) THEN 3107 3136 3108 CALL aaam_bud (27,klon,klev, rjourvrai,gmtime,3137 CALL aaam_bud (27,klon,klev,jD_cur-jD_ref,jH_cur, 3109 3138 C ra,rg,romega, 3110 3139 C rlat,rlon,pphis, … … 3133 3162 3134 3163 call phytrac ( 3135 I itap, julien, gmtime, debut,3164 I itap, days_elapsed+1, jH_cur, debut, 3136 3165 I lafin, dtime, u, v, t, 3137 3166 I paprs, pplay, pmfu, pmfd, … … 3351 3380 write(lunout,*) 'FIN DE PHYSIQ !!!!!!!!!!!!!!!!!!!!' 3352 3381 write(lunout,*) 3353 s 'nlon,klev,nqtot,debut,lafin, rjourvrai,gmtime,pdtphys pct tlos'3382 s 'nlon,klev,nqtot,debut,lafin,jD_cur, jH_cur, pdtphys pct tlos' 3354 3383 write(lunout,*) 3355 s nlon,klev,nqtot,debut,lafin, rjourvrai,gmtime,pdtphys,3384 s nlon,klev,nqtot,debut,lafin, jD_cur, jH_cur ,pdtphys, 3356 3385 s pctsrf(igout,is_ter), pctsrf(igout,is_lic),pctsrf(igout,is_oce), 3357 3386 s pctsrf(igout,is_sic) … … 3447 3476 ENDIF 3448 3477 3478 ! first=.false. 3449 3479 3450 3480 RETURN
Note: See TracChangeset
for help on using the changeset viewer.