Changeset 1824
- Timestamp:
- Nov 21, 2017, 4:03:44 PM (7 years ago)
- Location:
- trunk/LMDZ.COMMON
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/ioipsl/install_ioipsl_ifort.bash
r1567 r1824 4 4 5 5 #0. Preliminary stuff 6 NETCDF="/opt/netcdf3/ifort" 6 7 netcdf_include="$NETCDF/include" 7 8 netcdf_lib="$NETCDF/lib" -
trunk/LMDZ.COMMON/libf/dyn3d/conf_gcm.F90
r1650 r1824 16 16 offline, ok_dyn_ave, ok_dyn_ins, ok_dynzon, & 17 17 output_grads_dyn, periodav, planet_type, & 18 raz_date, resetvarc, starttime, timestart 18 raz_date, resetvarc, starttime, timestart, & 19 ecritstart 19 20 USE infotrac, ONLY : type_trac 20 21 use assert_m, only: assert … … 183 184 call getin("timestart",timestart) 184 185 186 !Config Key = ecritstart 187 !Config Desc = Mars - frequency of restart.nc output (dyn timesteps) 188 !Config Def = 0 189 !Config Help = Mars - frequency of restart.nc output (dyn timesteps) 190 ecritstart = 0 191 CALL getin('ecritstart',ecritstart) 192 185 193 !Config Key = less1day 186 194 !Config Desc = Possibilite d'integrer moins d'un jour -
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. -
trunk/LMDZ.COMMON/libf/dyn3d_common/dynetat0.F90
r1508 r1824 307 307 s1='value of '//TRIM(str1)//' =' 308 308 s2=' read in starting file differs from parametrized '//TRIM(str2)//' =' 309 WRITE(msg,'(10x,a,i4,2x,a,i4)') ,s1,n1,s2,n2309 WRITE(msg,'(10x,a,i4,2x,a,i4)')TRIM(s1),n1,TRIM(s2),n2 310 310 CALL ABORT_gcm(TRIM(modname),TRIM(msg),1) 311 311 END IF -
trunk/LMDZ.COMMON/libf/dyn3d_common/dynredem_mod.F90
r1508 r1824 34 34 INTEGER :: start(4), count(4) 35 35 !=============================================================================== 36 start(:)=[1,1,1,1]; count(:)=[iip1,jjp1,ll,nb] 36 IF (ll.eq.1) THEN 37 start(:)=[1,1,nb,1] 38 count(:)=[iip1,jjp1,1,1] 39 ELSE 40 start(:)=[1,1,1,nb] 41 count(:)=[iip1,jjp1,ll,1] 42 ENDIF 37 43 CALL err(NF90_INQ_VARID(ncid,id,nvarid),"inq",id) 38 44 CALL err(NF90_PUT_VAR(ncid,nvarid,var,start,count),"put",id) … … 60 66 INTEGER :: start(4), count(4) 61 67 !=============================================================================== 62 start(:)=[1,1,1,1]; count(:)=[iip1,jjm,ll,nb] 68 IF (ll.eq.1) THEN 69 start(:)=[1,1,nb,1] 70 count(:)=[iip1,jjm,1,1] 71 ELSE 72 start(:)=[1,1,1,nb] 73 count(:)=[iip1,jjm,ll,1] 74 ENDIF 63 75 CALL err(NF90_INQ_VARID(ncid,id,nvarid),"inq",id) 64 76 CALL err(NF90_PUT_VAR(ncid,nvarid,var,start,count),"put",id) -
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.