Changeset 1824 for trunk/LMDZ.COMMON/libf/dyn3d/leapfrog.F
- Timestamp:
- Nov 21, 2017, 4:03:44 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/dyn3d/leapfrog.F
r1703 r1824 19 19 & dissip_period,offline,ip_ebil_dyn, 20 20 & ok_dynzon,periodav,ok_dyn_ave,iecri, 21 & ok_dyn_ins,output_grads_dyn 21 & ok_dyn_ins,output_grads_dyn,ecritstart 22 22 use exner_hyb_m, only: exner_hyb 23 23 use exner_milieu_m, only: exner_milieu … … 31 31 . statcl,conser,apdiss,purmats,tidal,ok_strato 32 32 USE temps_mod, ONLY: jD_ref,jH_ref,itaufin,day_ini,day_ref, 33 . start_time,dt 33 . start_time,dt,hour_ini 34 34 35 35 IMPLICIT NONE … … 131 131 c variables pour le fichier histoire 132 132 ! REAL dtav ! intervalle de temps elementaire 133 LOGICAL lrestart 133 134 134 135 REAL tppn(iim),tpps(iim),tpn,tps … … 289 290 c ---------------------------------- 290 291 292 c RMBY: check that hour_ini and start_time are not both non-zero 293 if ((hour_ini.ne.0.0).and.(start_time.ne.0.0)) then 294 write(*,*) "ERROR: hour_ini = ", hour_ini, 295 & "start_time = ", start_time 296 abort_message = 'hour_ini and start_time both nonzero' 297 call abort_gcm(modname,abort_message,1) 298 endif 299 291 300 1 CONTINUE ! Matsuno Forward step begins here 292 301 … … 296 305 jD_cur = jD_ref + day_ini - day_ref + & 297 306 & (itau+1)/day_step 298 jH_cur = jH_ref + start_time + & 299 & mod(itau+1,day_step)/float(day_step) 307 IF (planet_type .eq. "mars") THEN 308 jH_cur = jH_ref + hour_ini + & 309 & mod(itau+1,day_step)/float(day_step) 310 ELSE 311 jH_cur = jH_ref + start_time + & 312 & mod(itau+1,day_step)/float(day_step) 313 ENDIF 300 314 jD_cur = jD_cur + int(jH_cur) 301 315 jH_cur = jH_cur - int(jH_cur) … … 351 365 jD_cur = jD_ref + day_ini - day_ref + 352 366 & (itau+1)/day_step 353 jH_cur = jH_ref + start_time + 354 & mod(itau+1,day_step)/float(day_step) 367 IF (planet_type .eq. "mars") THEN 368 jH_cur = jH_ref + hour_ini + 369 & mod(itau+1,day_step)/float(day_step) 370 ELSE 371 jH_cur = jH_ref + start_time + 372 & mod(itau+1,day_step)/float(day_step) 373 ENDIF 355 374 jD_cur = jD_cur + int(jH_cur) 356 375 jH_cur = jH_cur - int(jH_cur) … … 529 548 ENDIF 530 549 531 jH_cur = jH_ref + start_time + &532 & mod(itau+1,day_step)/float(day_step)533 IF ((planet_type .eq."generic").or.534 & (planet_type .eq."mars")) THEN550 IF (planet_type .eq. "mars") THEN 551 jH_cur = jH_ref + hour_ini + & 552 & mod(itau,day_step)/float(day_step) 553 ELSE IF (planet_type .eq. "generic") THEN 535 554 jH_cur = jH_ref + start_time + & 536 & mod(itau,day_step)/float(day_step) 555 & mod(itau,day_step)/float(day_step) 556 ELSE 557 jH_cur = jH_ref + start_time + & 558 & mod(itau+1,day_step)/float(day_step) 537 559 ENDIF 538 560 jD_cur = jD_cur + int(jH_cur) … … 861 883 ENDIF ! of IF(MOD(itau,iecri).EQ.0) 862 884 863 IF(itau.EQ.itaufin) THEN 864 885 c Determine whether to write to the restart.nc file 886 c Decision can't be made in one IF statement as if 887 c ecritstart==0 there will be a divide-by-zero error 888 lrestart = .false. 889 IF (itau.EQ.itaufin) THEN 890 lrestart = .true. 891 ELSE IF (ecritstart.GT.0) THEN 892 IF (MOD(itau,ecritstart).EQ.0) lrestart = .true. 893 ENDIF 894 895 c Write to the restart.nc file 896 IF (lrestart) THEN 865 897 if (planet_type=="mars") then 866 898 CALL dynredem1("restart.nc",REAL(itau)/REAL(day_step), … … 872 904 CLOSE(99) 873 905 !!! Ehouarn: Why not stop here and now? 874 ENDIF ! of IF ( itau.EQ.itaufin)906 ENDIF ! of IF (lrestart) 875 907 876 908 c----------------------------------------------------------------------- … … 992 1024 ENDIF ! of IF(MOD(itau,iecri ).EQ.0) 993 1025 994 IF(itau.EQ.itaufin) THEN 1026 c Determine whether to write to the restart.nc file 1027 c Decision can't be made in one IF statement as if 1028 c ecritstart==0 there will be a divide-by-zero error 1029 lrestart = .false. 1030 IF (itau.EQ.itaufin) THEN 1031 lrestart = .true. 1032 ELSE IF (ecritstart.GT.0) THEN 1033 IF (MOD(itau,ecritstart).EQ.0) lrestart = .true. 1034 ENDIF 1035 1036 c Write to the restart.nc file 1037 IF (lrestart) THEN 995 1038 if (planet_type=="mars") then 996 1039 CALL dynredem1("restart.nc",REAL(itau)/REAL(day_step), … … 1000 1043 & vcov,ucov,teta,q,masse,ps) 1001 1044 endif 1002 ENDIF ! of IF (itau.EQ.itaufin)1045 ENDIF ! of IF (lrestart) 1003 1046 1004 1047 forward = .TRUE.
Note: See TracChangeset
for help on using the changeset viewer.