/[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.3 by dimitri, Sat Dec 28 10:11:11 2002 UTC revision 1.7 by heimbach, Tue Jun 24 16:07:32 2003 UTC
# Line 83  c     == local variables == Line 83  c     == local variables ==
83  #endif  #endif
84    
85  c     == end of interface ==  c     == end of interface ==
 c      print *,'exf_GetFFieldRec: fldstartdate',fldstartdate  
 c      print *,'exf_GetFFieldRec: fldperiod',fldperiod  
 c      print *,'exf_GetFFieldRec: fac',fac  
 c      print *,'exf_GetFFieldRec: first',first  
 c      print *,'exf_GetFFieldRec: changed',changed  
 c      print *,'exf_GetFFieldRec: count0',count0  
 c      print *,'exf_GetFFieldRec: count1',count1  
86    
87  c     Determine the current date.  c     Determine the current date.
88        call cal_GetDate( myiter, mytime, mydate, mythid )        call cal_GetDate( myiter, mytime, mydate, mythid )
# Line 97  c     Determine the current date. Line 90  c     Determine the current date.
90  c     Determine the flux record just before mycurrentdate.  c     Determine the flux record just before mycurrentdate.
91        call cal_TimePassed( fldstartdate, mydate, difftime, mythid )        call cal_TimePassed( fldstartdate, mydate, difftime, mythid )
92        call cal_ToSeconds( difftime, fldsecs, mythid )        call cal_ToSeconds( difftime, fldsecs, mythid )
93        fldsecs  = int(fldsecs/fldperiod)*fldperiod        fldsecs  = int((fldsecs+0.5)/fldperiod)*fldperiod
94        fldcount = int(fldsecs/fldperiod) + 1        fldcount = int((fldsecs+0.5)/fldperiod) + 1
95    
96  c     If using repeating data (e.g. monthly means) then make  c     If using repeating data (e.g. monthly means) then make
97  c     fldsecs cycle around  c     fldsecs cycle around
# Line 106  c     fldsecs cycle around Line 99  c     fldsecs cycle around
99           fldsecs0=mod(fldsecs,repeatPeriod)           fldsecs0=mod(fldsecs,repeatPeriod)
100  c        print *,'repeat: ',fldsecs  c        print *,'repeat: ',fldsecs
101  c     Determine the flux record just after mycurrentdate.  c     Determine the flux record just after mycurrentdate.
102           count0 = int(fldsecs0/fldperiod) + 1           count0 = int(fldsecs0+0.5/fldperiod) + 1
103           fldsecs1  = int((fldsecs+fldperiod)/fldperiod)*fldperiod           fldsecs1  = int((fldsecs+fldperiod+0.5)/fldperiod)*fldperiod
104           fldsecs1=mod(fldsecs1,repeatPeriod)           fldsecs1=mod(fldsecs1,repeatPeriod+0.5)
105  c        print *,'repeat: ',fldsecs1  c        print *,'repeat: ',fldsecs1
106           count1 = int(fldsecs1/fldperiod) + 1           count1 = int((fldsecs1+0.5)/fldperiod) + 1
107        endif        endif
108    
109  c     Set switches for reading new records.  c     Set switches for reading new records.
# Line 125  c     Set switches for reading new recor Line 118  c     Set switches for reading new recor
118          call cal_TimePassed( fldstartdate, previousdate, difftime,          call cal_TimePassed( fldstartdate, previousdate, difftime,
119       &                       mythid )       &                       mythid )
120          call cal_ToSeconds( difftime, prevfldsecs, mythid )          call cal_ToSeconds( difftime, prevfldsecs, mythid )
121          prevfldsecs  = int(prevfldsecs/fldperiod)*fldperiod          prevfldsecs  = int((prevfldsecs+0.5)/fldperiod)*fldperiod
122          prevfldcount = int(prevfldsecs/fldperiod) + 1          prevfldcount = int((prevfldsecs+0.5)/fldperiod) + 1
123    
124          if (fldcount .ne. prevfldcount) then          if (fldcount .ne. prevfldcount) then
125            changed = .true.            changed = .true.

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

  ViewVC Help
Powered by ViewVC 1.1.22