Changeset 1201 for LMDZ4/branches/LMDZ4-dev/libf/dyn3d
- Timestamp:
- Jul 7, 2009, 4:01:00 PM (15 years ago)
- Location:
- LMDZ4/branches/LMDZ4-dev/libf/dyn3d
- Files:
-
- 8 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)
Note: See TracChangeset
for help on using the changeset viewer.