Changeset 1760 for trunk/LMDZ.GENERIC/libf
- Timestamp:
- Jul 28, 2017, 12:54:31 PM (8 years ago)
- File:
-
- 1 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"
Note: See TracChangeset
for help on using the changeset viewer.