MOM6
time_utils_mod::esmf2fms_time Interface Reference

Detailed Description

Converts time from FMS to ESMF format.

Definition at line 27 of file time_utils.F90.

Private functions

type(time_type) function esmf2fms_time_t (time)
 Converts date from ESMF format to FMS format. More...
 
type(time_type) function esmf2fms_timestep (timestep)
 Converts time-interval from ESMF format to FMS format. More...
 

Functions and subroutines

◆ esmf2fms_time_t()

type(time_type) function time_utils_mod::esmf2fms_time::esmf2fms_time_t ( type(esmf_time), intent(in)  time)
private

Converts date from ESMF format to FMS format.

Returns
FMS time structure
Parameters
[in]timeESMF time structure

Definition at line 82 of file time_utils.F90.

82  type(Time_type) :: esmf2fms_time_t !< FMS time structure
83  type(ESMF_Time), intent(in) :: time !< ESMF time structure
84 
85  ! Local Variables
86  integer :: yy, mm, dd, h, m, s
87  type(ESMF_CALKIND_FLAG) :: calkind
88 
89  integer :: rc
90 
91  call esmf_timeget(time, yy=yy, mm=mm, dd=dd, h=h, m=m, s=s, &
92  calkindflag=calkind, rc=rc)
93  if (esmf_logfounderror(rctocheck=rc, msg=esmf_logerr_passthru, &
94  line=__line__, &
95  file=__file__)) &
96  return ! bail out
97 
98  esmf2fms_time_t = set_date(yy, mm, dd, h, m, s)
99 

◆ esmf2fms_timestep()

type(time_type) function time_utils_mod::esmf2fms_time::esmf2fms_timestep ( type(esmf_timeinterval), intent(in)  timestep)
private

Converts time-interval from ESMF format to FMS format.

Returns
FMS time structure
Parameters
[in]timesteptime-interval following ESMF format [s]

Definition at line 104 of file time_utils.F90.

104  type(Time_type) :: esmf2fms_timestep !< FMS time structure
105  type(ESMF_TimeInterval), intent(in):: timestep !< time-interval following
106  !! ESMF format [s]
107  ! Local Variables
108  integer :: s
109  type(ESMF_CALKIND_FLAG) :: calkind
110 
111  integer :: rc
112 
113  call esmf_timeintervalget(timestep, s=s, calkindflag=calkind, rc=rc)
114  if (esmf_logfounderror(rctocheck=rc, msg=esmf_logerr_passthru, &
115  line=__line__, &
116  file=__file__)) &
117  return ! bail out
118 
119  esmf2fms_timestep = set_time(s, 0)
120 

The documentation for this interface was generated from the following file: