Changeset 1824 for trunk/LMDZ.COMMON/libf/dyn3dpar
- Timestamp:
- Nov 21, 2017, 4:03:44 PM (7 years ago)
- Location:
- trunk/LMDZ.COMMON/libf/dyn3dpar
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/dyn3dpar/conf_gcm.F90
r1650 r1824 205 205 timestart=-9999 ! default value; if <0, use last stored time 206 206 call getin("timestart",timestart) 207 207 208 !Config Key = ecritstart 209 !Config Desc = Mars - frequency of restart.nc output (dyn timesteps) 210 !Config Def = 0 211 !Config Help = Mars - frequency of restart.nc output (dyn timesteps) 212 ecritstart = 0 213 CALL getin('ecritstart',ecritstart) 214 208 215 !Config Key = less1day 209 216 !Config Desc = Possibilite d'integrer moins d'un jour -
trunk/LMDZ.COMMON/libf/dyn3dpar/leapfrog_p.F
r1703 r1824 29 29 & ok_dynzon,periodav,ok_dyn_ave,iecri, 30 30 & ok_dyn_ins,output_grads_dyn, 31 & iapp_tracvl 31 & iapp_tracvl,ecritstart 32 32 use cpdet_mod, only: cpdet,tpot2t_glo_p,t2tpot_glo_p 33 33 use sponge_mod_p, only: callsponge,mode_sponge,sponge_p … … 39 39 . statcl,conser,apdiss,purmats,tidal,ok_strato 40 40 USE temps_mod, ONLY: itaufin,jD_ref,jH_ref,day_ini, 41 . day_ref,start_time,dt 41 . day_ref,start_time,dt,hour_ini 42 42 43 43 … … 141 141 c variables pour le fichier histoire 142 142 REAL dtav ! intervalle de temps elementaire 143 LOGICAL lrestart 143 144 144 145 REAL tppn(iim),tpps(iim),tpn,tps … … 304 305 c et du parallelisme !! 305 306 307 c RMBY: check that hour_ini and start_time are not both non-zero 308 if ((hour_ini.ne.0.0).and.(start_time.ne.0.0)) then 309 write(*,*) "ERROR: hour_ini = ", hour_ini, 310 & "start_time = ", start_time 311 abort_message = 'hour_ini and start_time both nonzero' 312 call abort_gcm(modname,abort_message,1) 313 endif 314 306 315 1 CONTINUE ! Matsuno Forward step begins here 307 316 … … 311 320 jD_cur = jD_ref + day_ini - day_ref + & 312 321 & (itau+1)/day_step 313 jH_cur = jH_ref + start_time + & 314 & mod(itau+1,day_step)/float(day_step) 322 IF (planet_type .eq. "mars") THEN 323 jH_cur = jH_ref + hour_ini + & 324 & mod(itau+1,day_step)/float(day_step) 325 ELSE 326 jH_cur = jH_ref + start_time + & 327 & mod(itau+1,day_step)/float(day_step) 328 ENDIF 315 329 if (jH_cur > 1.0 ) then 316 330 jD_cur = jD_cur +1. … … 416 430 jD_cur = jD_ref + day_ini - day_ref + 417 431 & (itau+1)/day_step 418 jH_cur = jH_ref + start_time + 419 & mod(itau+1,day_step)/float(day_step) 432 IF (planet_type .eq. "mars") THEN 433 jH_cur = jH_ref + hour_ini + 434 & mod(itau+1,day_step)/float(day_step) 435 ELSE 436 jH_cur = jH_ref + start_time + 437 & mod(itau+1,day_step)/float(day_step) 438 ENDIF 420 439 if (jH_cur > 1.0 ) then 421 440 jD_cur = jD_cur +1. … … 873 892 ENDIF 874 893 875 jH_cur = jH_ref + start_time + & 876 & mod(itau+1,day_step)/float(day_step) 877 IF ((planet_type .eq."generic").or. 878 & (planet_type .eq."mars")) THEN 879 jH_cur = jH_ref + start_time + & 880 & mod(itau,day_step)/float(day_step) 894 IF (planet_type .eq. "mars") THEN 895 jH_cur = jH_ref + hour_ini + & 896 & mod(itau,day_step)/float(day_step) 897 ELSE IF (planet_type .eq. "generic") THEN 898 jH_cur = jH_ref + start_time + & 899 & mod(itau,day_step)/float(day_step) 900 ELSE 901 jH_cur = jH_ref + start_time + & 902 & mod(itau+1,day_step)/float(day_step) 881 903 ENDIF 882 904 if (jH_cur > 1.0 ) then … … 1756 1778 ENDIF ! of IF(MOD(itau,iecri).EQ.0) 1757 1779 1758 IF(itau.EQ.itaufin) THEN 1759 1760 c$OMP BARRIER 1761 c$OMP MASTER 1762 1780 c Determine whether to write to the restart.nc file 1781 c Decision can't be made in one IF statement as if 1782 c ecritstart==0 there will be a divide-by-zero error 1783 lrestart = .false. 1784 IF (itau.EQ.itaufin) THEN 1785 lrestart = .true. 1786 ELSE IF (ecritstart.GT.0) THEN 1787 IF (MOD(itau,ecritstart).EQ.0) lrestart = .true. 1788 ENDIF 1789 1790 c Write to restart.nc if required 1791 IF (lrestart) THEN 1792 c$OMP BARRIER 1793 c$OMP MASTER 1763 1794 if (planet_type=="mars") then 1764 1795 CALL dynredem1_p("restart.nc",REAL(itau)/REAL(day_step), … … 1770 1801 ! CLOSE(99) 1771 1802 c$OMP END MASTER 1772 ENDIF ! of IF ( itau.EQ.itaufin)1803 ENDIF ! of IF (lrestart) 1773 1804 1774 1805 c----------------------------------------------------------------------- … … 1961 1992 ENDIF ! of IF(MOD(itau,iecri).EQ.0) 1962 1993 1963 IF(itau.EQ.itaufin) THEN 1994 c Determine whether to write to the restart.nc file 1995 c Decision can't be made in one IF statement as if 1996 c ecritstart==0 there will be a divide-by-zero error 1997 lrestart = .false. 1998 IF (itau.EQ.itaufin) THEN 1999 lrestart = .true. 2000 ELSE IF (ecritstart.GT.0) THEN 2001 IF (MOD(itau,ecritstart).EQ.0) lrestart = .true. 2002 ENDIF 2003 2004 c Write to restart.nc if required 2005 IF (lrestart) THEN 1964 2006 c$OMP MASTER 1965 2007 if (planet_type=="mars") then … … 1970 2012 CALL dynredem1_p("restart.nc",start_time, 1971 2013 & vcov,ucov,teta,q,masse,ps) 1972 1973 2014 endif 1974 2015 c$OMP END MASTER 1975 ENDIF ! of IF (itau.EQ.itaufin)2016 ENDIF ! of IF (lrestart) 1976 2017 1977 2018 forward = .TRUE.
Note: See TracChangeset
for help on using the changeset viewer.