- Timestamp:
- Sep 21, 2012, 12:50:01 PM (12 years ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/README
r788 r791 1799 1799 altitude above surface levels as well as the possibility to specify min, 1800 1800 max and number of levels. 1801 1802 == 21/09/2012 == EM 1803 >> Adapted code so that it can run fractions of days: e.g. if "nday=1.5" in 1804 run.def, then run a sol and a half, "nday=0.75" to run three quarters of 1805 a sol... Of course the fraction should correspond to a number of complete 1806 dynamics/physics cycles. The fraction of the sol that a (re)start.nc 1807 file corresponds to is (read)written as 'Time' in the file. -
trunk/LMDZ.MARS/libf/dyn3d/caldyn.F
r38 r791 41 41 REAL dteta(ip1jmp1,llm),dp(ip1jmp1) 42 42 REAL pbaru(ip1jmp1,llm),pbarv(ip1jm,llm) 43 REAL time 43 REAL time ! elapsed time (in days) since begining of the run 44 44 45 45 c Local: -
trunk/LMDZ.MARS/libf/dyn3d/control.h
r38 r791 5 5 ! 6 6 7 COMMON/control /nday,day_step,&7 COMMON/control_i/day_step, & 8 8 & iperiod,iconser,idissip,iphysiq , & 9 & periodav,ecritphy,anneeref 9 & anneeref 10 COMMON/control_r/periodav,ecritphy,nday_r 10 11 11 INTEGER nday,day_step,iperiod,iconser, & 12 & idissip,iphysiq,anneeref 13 REAL periodav, ecritphy 12 INTEGER day_step ! # of dynamical time steps per day 13 INTEGER iperiod ! make a Matsuno step before avery iperiod-1 LF steps 14 INTEGER iconser ! 15 INTEGER idissip ! apply dissipation every idissip dynamical step 16 INTEGER iphysiq ! call physics every iphysiq dynamical steps 17 INTEGER anneeref ! reference year # ! not used 18 REAL periodav 19 REAL ecritphy ! output data in "diagfi.nc" every ecritphy dynamical steps 20 real nday_r ! number of days to run (possibly including a fraction of day) 14 21 15 22 !----------------------------------------------------------------------- -
trunk/LMDZ.MARS/libf/dyn3d/defrun_new.F
r575 r791 95 95 WRITE(tapeout,*) "" 96 96 WRITE(tapeout,*) "Number of days to run:" 97 nday =1 ! default value98 call getin("nday",nday )99 WRITE(tapeout,*)" nday = ",nday 97 nday_r=1 ! default value 98 call getin("nday",nday_r) 99 WRITE(tapeout,*)" nday = ",nday_r 100 100 101 101 WRITE(tapeout,*) "" … … 110 110 iperiod=5 ! default value 111 111 call getin("iperiod",iperiod) 112 WRITE(tapeout,*)" iperiod = ",iperiod 113 112 ! verify that day_step is a multiple of iperiod 113 if (((1.*day_step)/iperiod).ne.(day_step/iperiod)) then 114 write(tapeout,*)" Error! iperiod must be such that", 115 & " day_step is a multiple of iperiod, but iperiod=", 116 & iperiod," and day_step=",day_step 117 else 118 WRITE(tapeout,*)" iperiod = ",iperiod 119 endif 120 114 121 WRITE(tapeout,*) "" 115 122 WRITE(tapeout,*) "periode de sortie des variables de ", … … 207 214 iphysiq=20 ! default value 208 215 call getin("iphysiq",iphysiq) 209 WRITE(tapeout,*)" iphysiq = ",iphysiq 216 ! verify that day_step is a multiple of iphysiq 217 if (((1.*day_step)/iphysiq).ne.(day_step/iphysiq)) then 218 write(tapeout,*)" Error! iphysiq must be such that", 219 & " day_step is a multiple of iphysiq, but iphysiq=", 220 & iphysiq," and day_step=",day_step 221 else 222 WRITE(tapeout,*)" iphysiq = ",iphysiq 223 endif 210 224 211 225 WRITE(tapeout,*) "" … … 222 236 ecritphy=240 223 237 call getin("ecritphy",ecritphy) 224 WRITE(tapeout,*)" ecritphy = ",ecritphy 238 ! verify that ecriphy is indeed a multiple of iphysiq 239 if (((1.*ecritphy)/iphysiq).ne.(ecritphy/iphysiq)) then 240 write(tapeout,*)" Error! ecritphy must be a multiple", 241 & " of iphysiq, but ecritphy=",ecritphy," and iphysiq=", 242 & iphysiq 243 else 244 WRITE(tapeout,*)" ecritphy = ",ecritphy 245 endif 225 246 226 247 ccc .... P. Le Van , ajout le 7/03/95 .pour le zoom ... -
trunk/LMDZ.MARS/libf/dyn3d/dynetat0.F
r38 r791 48 48 REAL ps(iip1,jjp1),phis(iip1,jjp1) 49 49 50 REAL time 50 REAL time ! fraction of day the fields correspond to 51 51 52 52 c Variables … … 383 383 ierr=nf90_close(nid) 384 384 385 day_ini=day_ini+INT(time)386 time=time-INT(time)385 ! day_ini=day_ini+INT(time) ! obsolete stuff ; 0<time<1 anyways 386 ! time=time-INT(time) 387 387 388 388 1 FORMAT(//10x,'la valeur de im =',i4,2x,'lue sur le fichier de dem -
trunk/LMDZ.MARS/libf/dyn3d/gcm.F
r38 r791 199 199 iday = iday+1 200 200 ENDIF 201 itaufin = nday*day_step 201 itaufin=nint(nday_r*day_step) ! nint() to avoid problematic roundoffs 202 ! check that this is compatible with call sequence dyn/phys/dissip 203 ! i.e. that itaufin is a multiple of iphysiq and idissip 204 if ((modulo(itaufin,iphysiq).ne.0).or. 205 & (modulo(itaufin,idissip).ne.0)) then 206 write(*,*) "gcm: Problem: incompatibility between nday=",nday_r, 207 & " day_step=",day_step," which imply itaufin=",itaufin 208 write(*,*) " whereas iphysiq=",iphysiq," and idissip=", 209 & idissip 210 stop 211 endif 212 ! write(*,*)"gcm: itaufin=",itaufin 202 213 c ******************************** 203 214 c itaufin = 120 ! temporaire !! … … 205 216 itaufinp1 = itaufin +1 206 217 207 day_end = day_ini + nday218 day_end = day_ini + floor(nday_r+time_0) 208 219 PRINT 300, itau,itaufin,day_ini,day_end 209 220 300 FORMAT('1'/,15x,'run du pas',i7,2x,'au pas',i7,2x, … … 231 242 IF( MOD( itau, 10* day_step ).EQ.0 ) THEN 232 243 CALL test_period ( ucov,vcov,teta,q,p,phis ) 233 PRINT *,' ---- Test_period apres continue OK ! -----', itau 244 write(*,*)' GCM ---- Test_period apres continue OK ! -----', 245 & ' itau: ',itau 234 246 ENDIF 235 247 … … 508 520 509 521 510 PRINT *,' Appel test_period avant redem ',itau522 write(*,*)' GCM: Appel test_period avant redem ; itau=',itau 511 523 CALL test_period ( ucov,vcov,teta,q,p,phis ) 512 CALL dynredem1("restart.nc", 0.0,524 CALL dynredem1("restart.nc",time, 513 525 . vcov,ucov,teta,q,nqmx,masse,ps) 514 526 … … 585 597 586 598 IF(itau.EQ.itaufin) 587 . CALL dynredem1("restart.nc", 0.0,599 . CALL dynredem1("restart.nc",time, 588 600 . vcov,ucov,teta,q,nqmx,masse,ps) 589 601 -
trunk/LMDZ.MARS/libf/dyn3d/sortvarc.F
r38 r791 38 38 REAL phi(ip1jmp1,llm),bern(ip1jmp1,llm) 39 39 REAL dp(ip1jmp1) 40 REAL time 40 REAL time ! elapsed time (in days) since begining of the run 41 41 REAL pk(ip1jmp1,llm) 42 42 … … 60 60 dtvrs1j = dtvr/daysec 61 61 rjour = REAL( INT( itau * dtvrs1j )) 62 heure = ( itau*dtvrs1j-rjour ) * 24. 62 ! heure = ( itau*dtvrs1j-rjour ) * 24. 63 heure = (time-floor(time))*24. 63 64 imjmp1 = iim * jjp1 64 65 IF(ABS(heure - 24.).LE.0.0001 ) heure = 0. -
trunk/LMDZ.MARS/libf/dyn3d/temps.h
r340 r791 2 2 c INCLUDE 'temps.h' 3 3 4 COMMON/temps_i/itaufin, 5 s day_ini,day_end,anne_ini 4 COMMON/temps_i/day_ini,day_end,anne_ini,itaufin 6 5 COMMON/temps_r/dt 7 6 8 INTEGER itaufin 9 INTEGER*4 day_ini,day_end,anne_ini 10 REAL dt 7 INTEGER itaufin ! total number of dynamical steps for the run 8 INTEGER*4 day_ini ! initial day # of simulation sequence 9 INTEGER*4 day_end ! final day # ; i.e. day # when this simulation ends 10 INTEGER*4 anne_ini ! initial year # of simulation sequence ? Not used. 11 REAL dt ! (dynamics) time step (changes if doing Matsuno or LF step) 11 12 12 13 c-----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.