Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:38:15 UTC

view on githubraw 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_IntYears(
                0004      I                               mythid
                0005      &                             )
                0006 
                0007 c     ==================================================================
                0008 c     FUNCTION cal_IntYears
                0009 c     ==================================================================
                0010 c
                0011 c     o Return the number of calendar years that are affected by the 
                0012 c       current model integration.
                0013 c
                0014 c              
                0015 c     started: Christian Eckert eckert@mit.edu  30-Jun-1999
                0016 c
                0017 c     changed: Christian Eckert eckert@mit.edu  29-Dec-1999
                0018 c
                0019 c              - restructured the original version in order to have a
                0020 c                better interface to the MITgcmUV.
                0021 c
                0022 c              Christian Eckert eckert@mit.edu  03-Feb-2000
                0023 c
                0024 c              - Introduced new routine and function names, cal_<NAME>,
                0025 c                for verion 0.1.3.
                0026 c
                0027 c     ==================================================================
                0028 c     FUNCTION cal_IntYears
                0029 c     ==================================================================
                0030 
                0031       implicit none
                0032 
                0033 c     == global variables ==
                0034 
                0035 #include "cal.h"
                0036 
                0037 c     == routine arguments ==
                0038 
                0039       integer mythid
                0040 
                0041 c     == end of interface ==
                0042 
                0043       cal_IntYears = ( modelenddate(1)  /10000 -
                0044      &             modelstartdate(1)/10000   ) + 1
                0045 
                0046       if ( ( modelenddate(2) .eq. 0) .and.
                0047      &     ( mod(modelenddate(1),100) .eq. 1 ) .and.
                0048      &       mod(modelenddate(1)/100,100) .eq. 1 ) then
                0049         cal_IntYears = cal_IntYears -1
                0050       endif
                0051 
                0052       return
                0053       end