Definition at line 197 of file mod_nctools.f90.
◆ get_file_time_ncf()
type(time) function mod_nctools::get_file_time::get_file_time_ncf |
( |
type(ncfile), pointer |
NCF, |
|
|
integer, intent(in) |
STKCNT |
|
) |
| |
Definition at line 8035 of file mod_nctools.f90.
8036 TYPE(TIME) :: THETIME
8037 TYPE(NCFILE),
POINTER :: NCF
8038 INTEGER,
intent(in) :: STKCNT
8039 TYPE(NCFTIME),
POINTER :: FTM
8041 IF(.NOT.
ASSOCIATED(ncf))
CALL fatal_error &
8042 & (
"GET_FILE_TIME_NCF: FILE object argument is not assocaited!")
8045 IF(.NOT.
ASSOCIATED(ncf%FTIME))
THEN 8046 CALL print_file(ncf)
8047 CALL fatal_error(
"GET_FILE_TIME_NCF: FILE object's FTIME is not assocaited!")
8052 thetime = get_file_time(ftm,stkcnt)
◆ get_file_time_ncftime()
type(time) function mod_nctools::get_file_time::get_file_time_ncftime |
( |
type(ncftime), pointer |
FTM, |
|
|
integer, intent(in) |
STKCNT |
|
) |
| |
Definition at line 8058 of file mod_nctools.f90.
8059 TYPE(TIME) :: THETIME
8060 TYPE(NCFTIME),
POINTER :: FTM
8061 TYPE(NCVAR),
POINTER :: VAR1, VAR2
8062 TYPE(NCATT),
POINTER :: ATT
8063 INTEGER,
intent(in) :: STKCNT
8064 REAL(SP),
target :: float_time
8065 INTEGER,
target :: mjd,msec
8066 Character(len=80),
target :: dstring
8068 Character(len=80) :: dformat
8071 IF(.NOT.
ASSOCIATED(ftm))
THEN 8072 CALL fatal_error(
"GET_FILE_TIME_NCFTIME: THE ARGUMENT FTM is not assocaited!")
8076 IF(stkcnt .LE. 0)
CALL fatal_error&
8077 &(
'GET_FILE_TIME: YOU CAN NOT GET TIME FOR A STACK COUNT LESS THAN ONE!')
8079 SELECT CASE(ftm%TMTYPE)
8080 CASE(tmtype_float_days)
8084 CALL nc_connect_avar(var1,float_time)
8085 CALL nc_read_var(var1,stkcnt)
8089 CASE(tmtype_float_seconds)
8093 CALL nc_connect_avar(var1,float_time)
8094 CALL nc_read_var(var1,stkcnt)
8098 CASE(tmtype_int2_mjd)
8102 CALL nc_connect_avar(var1,mjd)
8103 CALL nc_read_var(var1,stkcnt)
8107 CALL nc_connect_avar(var2,msec)
8108 CALL nc_read_var(var2,stkcnt)
8111 thetime%MuSod= int(msec,
itime)* int(1000,
itime)
8113 thetime = thetime -
time_zone(ftm%TIMEZONE,status)
8115 CASE(tmtype_char_date)
8121 CALL nc_connect_avar(var1,dstring)
8122 CALL nc_read_var(var1,stkcnt)
8124 thetime =
read_datetime(dstring,dformat,ftm%TIMEZONE,status)
8125 if(status == 0)
THEN 8126 CALL print_ftime(ftm)
8127 CALL fatal_error(
"GET_FILE_TIME: COULD NOT TRANSLATE TIME STRING",&
8128 "FILE RETURNED: "//trim(dstring))
8133 CALL print_ftime(ftm)
8134 CALL fatal_error(
"GET_FILE_TIME: FILE object's FTIME is an unrecognized type")
type(time) function read_datetime(timestr, frmt, TZONE, status)
type(time) function time_zone(TZONE, status)
The documentation for this interface was generated from the following file: