/[MITgcm]/MITgcm/pkg/exf/exf_getffieldrec.F
ViewVC logotype

Diff of /MITgcm/pkg/exf/exf_getffieldrec.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2 by cheisey, Thu Dec 19 13:44:51 2002 UTC revision 1.3 by dimitri, Sat Dec 28 10:11:11 2002 UTC
# Line 25  c Line 25  c
25  c     started: Christian Eckert eckert@mit.edu  30-Jun-1999  c     started: Christian Eckert eckert@mit.edu  30-Jun-1999
26  c  c
27  c     changed: Christian Eckert eckert@mit.edu  14-Jan-2000  c     changed: Christian Eckert eckert@mit.edu  14-Jan-2000
 c  
28  c              - Restructured the code in order to create a package  c              - Restructured the code in order to create a package
29  c                for the MITgcmUV.  c                for the MITgcmUV.
30  c  c
31  c              Christian Eckert eckert@mit.edu  12-Feb-2000  c              Christian Eckert eckert@mit.edu  12-Feb-2000
 c  
32  c              - Changed Routine names (package prefix: exf_)  c              - Changed Routine names (package prefix: exf_)
33  c  c
34    c              Curtis Heisey cheisey@mit.edu    19-Dec-2002
35    c              - added "repeatPeriod" for cycling of forcing datasets
36    c
37    c              Dimitris Menemenlis menemenlis@jpl.nasa.gov 27-Dec-2002
38    c              - bug fix for verification/global_with_exf
39    c
40  c     ==================================================================  c     ==================================================================
41  c     SUBROUTINE exf_GetFFieldRec  c     SUBROUTINE exf_GetFFieldRec
42  c     ==================================================================  c     ==================================================================
# Line 73  c     == local variables == Line 77  c     == local variables ==
77        _RL     prevfldsecs        _RL     prevfldsecs
78        integer flddate(4)        integer flddate(4)
79    
80    
81  #ifdef EXF_VERBOSE  #ifdef EXF_VERBOSE
82        character*(max_len_mbuf) msgbuf        character*(max_len_mbuf) msgbuf
83  #endif  #endif
# Line 94  c     Determine the flux record just bef Line 99  c     Determine the flux record just bef
99        call cal_ToSeconds( difftime, fldsecs, mythid )        call cal_ToSeconds( difftime, fldsecs, mythid )
100        fldsecs  = int(fldsecs/fldperiod)*fldperiod        fldsecs  = int(fldsecs/fldperiod)*fldperiod
101        fldcount = int(fldsecs/fldperiod) + 1        fldcount = int(fldsecs/fldperiod) + 1
102    
103  c     If using repeating data (e.g. monthly means) then make  c     If using repeating data (e.g. monthly means) then make
104  C     fldsecs cycle around  c     fldsecs cycle around
105        if (repeatPeriod.ne.0.) then        if (repeatPeriod.ne.0.) then
106         fldsecs0=mod(fldsecs,repeatPeriod)           fldsecs0=mod(fldsecs,repeatPeriod)
107  c       print *,'repeat: ',fldsecs  c        print *,'repeat: ',fldsecs
       endif  
108  c     Determine the flux record just after mycurrentdate.  c     Determine the flux record just after mycurrentdate.
109        count0 = int(fldsecs0/fldperiod) + 1           count0 = int(fldsecs0/fldperiod) + 1
110        fldsecs1  = int((fldsecs+fldperiod)/fldperiod)*fldperiod           fldsecs1  = int((fldsecs+fldperiod)/fldperiod)*fldperiod
111        if (repeatPeriod.ne.0.) then           fldsecs1=mod(fldsecs1,repeatPeriod)
112         fldsecs1=mod(fldsecs1,repeatPeriod)  c        print *,'repeat: ',fldsecs1
113  c       print *,'repeat: ',fldsecs1           count1 = int(fldsecs1/fldperiod) + 1
114        endif        endif
       count1 = int(fldsecs1/fldperiod) + 1  
115    
116  c     Set switches for reading new records.  c     Set switches for reading new records.
117        first = ((mytime - modelstart) .lt. 0.5*modelstep)        first = ((mytime - modelstart) .lt. 0.5*modelstep)
# Line 131  c     Set switches for reading new recor Line 135  c     Set switches for reading new recor
135          endif          endif
136        endif        endif
137    
138          if (.NOT.repeatPeriod.ne.0.) then
139             count0 = fldcount
140             count1 = fldcount + 1
141          endif
142    
143        call cal_TimeInterval( fldsecs, 'secs', difftime, mythid )        call cal_TimeInterval( fldsecs, 'secs', difftime, mythid )
144        call cal_AddTime( fldstartdate, difftime, flddate, mythid )        call cal_AddTime( fldstartdate, difftime, flddate, mythid )
145        call cal_TimePassed( flddate, mydate, difftime, mythid )        call cal_TimePassed( flddate, mydate, difftime, mythid )

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.22