- Timestamp:
- Jul 28, 2017, 12:54:31 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/xios_output_mod.F90
r1682 r1760 101 101 !$OMP MASTER 102 102 ! 3. Declare calendar and time step 103 if (prt_level>=10) write(lunout,*) "initialize_xios_output: build calendar" 103 if (prt_level>=10) then 104 write(lunout,*) "initialize_xios_output: build calendar" 105 endif 104 106 timestep%second=dtphys 105 ! time origin of the simulation (default: 1st year/1st month/1st day, Ls=0) 106 time_origin=xios_date(1,1,1,0,0,0) 107 ! start date of the simulation (i.e time elapsed since last Ls=0) 108 start_date=xios_date(1,1,1,0,0,nint((day+timeofday)*daysec)) 107 if (nint(dtphys).ne.dtphys) then 108 write(*,*) "initialize_xios_output: warning physics timestep is not an integer!" 109 endif 110 if (nint(daysec).ne.daysec) then 111 write(*,*) "initialize_xios_output: warning day length is not an integer!" 112 endif 113 ! Important: do no operations involving dates and calendars 114 ! before defining the calendar! 109 115 CALL xios_define_calendar(type="user_defined", & 110 116 timestep=timestep, & 111 117 day_length=nint(daysec), & 112 start_date=start_date, &113 time_origin=time_origin, &114 118 month_lengths=[30,30,30,30,30,30,30,30,30,30,30,30]) 115 119 !NB: it would make more sense to define months and their length in the 120 ! xml files and not to have them hard coded here.... to be improved... 121 122 ! time origin of the simulation (default: 1st year/1st month/1st day, Ls=0) 123 time_origin=xios_date(1,1,1,0,0,0) 124 CALL xios_set_time_origin(time_origin=time_origin) 125 ! if (prt_level>=10) then 126 write(lunout,*) "initialize_xios_output: time_origin=",time_origin 127 ! endif 128 129 ! Now define the start time of this simulation 130 ! NB: we substract dtphys because we want to set the origin of the time axis 131 start_date=time_origin+xios_duration(0,0,day,0,0,timeofday*daysec-dtphys) 132 call xios_set_start_date(start_date=start_date) 133 if (prt_level>=10) then 134 write(lunout,*) "initialize_xios_output: start_date=",start_date 135 endif 136 116 137 ! 4. Finalize the context: 117 138 if (prt_level>=10) write(*,*) "initialize_xios_output: call wxios_closedef" -
trunk/LMDZ.VENUS/libf/phyvenus/xios_output_mod.F90
r1682 r1760 102 102 !$OMP MASTER 103 103 ! 3. Declare calendar and time step 104 if (prt_level>=10) write(lunout,*) "initialize_xios_output: build calendar" 105 timestep%second=dtphys 106 ! time origin of the simulation (default: 1st year/1st month/1st day, Ls=0) 107 time_origin=xios_date(1,1,1,0,0,0) 108 ! start date of the simulation (i.e time elapsed since last Ls=0) 109 start_date=xios_date(1,1,1,0,0,nint((day+timeofday)*daysec)) 104 if (prt_level>=10) then 105 write(lunout,*) "initialize_xios_output: build calendar" 106 endif 107 timestep%second=nint(dtphys) 108 if (nint(dtphys).ne.dtphys) then 109 write(*,*) "initialize_xios_output: warning physics timestep is not an integer!" 110 endif 111 if (nint(daysec).ne.daysec) then 112 write(*,*) "initialize_xios_output: warning day length is not an integer!" 113 endif 114 ! Important: do no operations involving dates and calendars 115 ! before defining the calendar! 110 116 CALL xios_define_calendar(type="user_defined", & 111 117 timestep=timestep, & 112 118 day_length=nint(daysec), & 113 start_date=start_date, & 114 time_origin=time_origin, & 115 month_lengths=[2]) 119 month_lengths=[2]) ! one month, 2 days long 120 121 ! time origin of the simulation (default: 1st year/1st month/1st day, Ls=0) 122 time_origin=xios_date(1,1,1,0,0,0) 123 CALL xios_set_time_origin(time_origin=time_origin) 124 if (prt_level>=10) then 125 write(lunout,*) "initialize_xios_output: time_origin=",time_origin 126 endif 127 128 ! Now define the start time of this simulation 129 ! NB: we substract dtphys because we want to set the origin of the time axis 130 start_date=time_origin+xios_duration(0,0,day,0,0,timeofday*daysec-dtphys) 131 call xios_set_start_date(start_date=start_date) 132 if (prt_level>=10) then 133 write(lunout,*) "initialize_xios_output: start_date=",start_date 134 endif 116 135 117 136 ! 4. Finalize the context:
Note: See TracChangeset
for help on using the changeset viewer.