** Warning **
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::mysql::db handle dbname=MITgcm at /usr/local/share/lxr/lib/LXR/Common.pm line 1224.
Last-Modified: Fri, 31 Oct 2024 05:11:45 GMT
Content-Type: text/html; charset=utf-8
MITgcm/MITgcm/pkg/cal/cal_intmonths.F
File indexing completed on 2018-03-02 18:38:15 UTC
view on github raw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
6d54cf9ca1 Ed H* 0001 #include "CAL_OPTIONS.h "
a63ed37559 Patr* 0002
0003 integer function cal_IntMonths (
0004 I mythid
0005 & )
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031 implicit none
0032
0033
0034
0035 #include "cal.h "
0036
0037
0038
0039 integer mythid
0040
0041
0042
0043 integer endmonth
0044 integer startmonth
0045 integer endyear
0046 integer startyear
0047
0048
0049
0050 startmonth = mod(modelstartdate (1)/100,100)
0051 endmonth = mod( modelenddate (1)/100,100)
0052 startyear = modelstartdate (1)/10000
0053 endyear = modelenddate (1)/10000
0054
0055
0056
0057
0058
0059 if ( startyear .ne. endyear ) then
0060 cal_IntMonths = (nmonthyear - startmonth + 1) +
0061 & nmonthyear *(endyear - startyear - 1) +
0062 & endmonth
0063 else
0064 cal_IntMonths = endmonth - startmonth + 1
0065 endif
0066
0067 if ( ( modelenddate (2) .eq. 0) .and.
0068 & ( mod(modelenddate (1),100) .eq. 1) ) then
0069 cal_IntMonths = cal_IntMonths - 1
0070 endif
0071
0072 return
0073 end
0074