prism_calc_newdate_real.F90
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 subroutine prism_calc_newdate_real ( date, date_incr, ierror )
00014
00015
00016
00017 use PRISM, dummy_interface => prism_calc_newdate_real
00018 use PRISM_calendar
00019
00020 use PSMILE, only : ch_id, len_cvs_string
00021
00022 implicit none
00023
00024
00025
00026 Real, Intent(In) :: date_incr
00027
00028
00029
00030 Type (PRISM_Time_struct), Intent(InOut) :: date
00031
00032
00033
00034 Integer, Intent(Out) :: ierror
00035
00036
00037
00038 Double Precision :: julian_day, julian_sec
00039
00040 Integer :: add_days
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062 Character(len=len_cvs_string), save :: mycvs =
00063 '$Id: prism_calc_newdate_real.F90 2325 2010-04-21 15:00:07Z valcke $'
00064
00065
00066
00067 #ifdef VERBOSE
00068 print *, trim(ch_id), ': prism_calc_newdate_real '
00069
00070 call psmile_flushstd
00071 #endif /* VERBOSE */
00072
00073
00074
00075 ierror = 0
00076 add_days = 0
00077
00078 call psmile_date2ju ( date, julian_day, julian_sec )
00079
00080 julian_sec = julian_sec + date_incr
00081 add_days = floor(julian_sec / 86400.0)
00082 julian_day = julian_day + add_days
00083 julian_sec = julian_sec - float(add_days) * 86400.0
00084
00085 call psmile_ju2date ( date, julian_day, julian_sec )
00086
00087
00088 #ifdef VERBOSE
00089 print *, trim(ch_id), ': prism_calc_newdate_real eof ierror ', ierror
00090
00091 call psmile_flushstd
00092 #endif /* VERBOSE */
00093
00094
00095 end subroutine prism_calc_newdate_real