/[MITgcm]/MITgcm/pkg/atm2d/calc_fileload.F
ViewVC logotype

Annotation of /MITgcm/pkg/atm2d/calc_fileload.F

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


Revision 1.2 - (hide annotations) (download)
Mon Oct 8 23:48:28 2007 UTC (16 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint65, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59k, checkpoint59j, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y, HEAD
Changes since 1.1: +9 -6 lines
add missing cvs $Header:$ or $Name:$

1 jmc 1.2 C $Header: $
2     C $Name: $
3    
4 jscott 1.1 #include "ctrparam.h"
5     #include "ATM2D_OPTIONS.h"
6     C
7     SUBROUTINE CALC_FILELOAD( curTime, iloop, aloop,
8     & wght0, wght1,
9     & intime0, intime1,
10     & ifTime, myThid)
11    
12     C *==========================================================*
13     C | Determines weights to be used for external files. |
14     C *==========================================================*
15    
16     IMPLICIT NONE
17    
18     #include "ATMSIZE.h"
19     #include "SIZE.h"
20     #include "EEPARAMS.h"
21     #include "ATM2D_VARS.h"
22    
23     C !INPUT/OUTPUT PARAMETERS:
24     C === Routine arguments ===
25     C curTime - Simulation time (s) starting from year 0
26     C iloop - loop counter for main loop (coupled periods)
27     C aloop - loop counter for atm time steps (within a coupled per.)
28     C wght0, wght1 - weights of the two months to average
29     C intime0 - first of the two month to average
30     C intime1 - latter of the two months to average
31     C iftime - return true if time to do a file re-load
32     C myThid - Thread no. that called this routine.
33 jmc 1.2 _RL curTime
34 jscott 1.1 INTEGER iloop
35     INTEGER aloop
36     _RL wght0
37     _RL wght1
38     INTEGER intime0
39     INTEGER intime1
40     LOGICAL ifTime
41     INTEGER myThid
42    
43    
44     C !LOCAL VARIABLES
45    
46     _RL dmonth(0:13)
47     DATA dmonth /-1339200.D0, 1339200.D0, 3888000.D0, 6436800.D0,
48     & 9072000.D0, 11707200.D0, 14342400.D0, 16977600.D0,
49     & 19656000.D0, 22291200.D0, 24926400.D0, 27561600.D0,
50     & 30196800.D0, 32875200.D0/
51     C /-15.5D0*86400.D0, 15.5D0*86400.D0, 45.0D0*86400.D0,
52     C & 74.5D0*86400.D0, 105.0D0*86400.D0, 135.5D0*86400.D0,
53     C & 166.0D0*86400.D0, 196.5D0*86400.D0, 227.5D0*86400.D0,
54     C & 258.0D0*86400.D0, 288.5D0*86400.D0, 319.0D0*86400.D0,
55     C & 349.5D0*86400.D0, 380.5D0*86400.D0/
56     _RL secYr
57     DATA secYr /31536000.D0/ !ignore externForcingCycle from data
58     _RL ifcyc ! time in current year, in seconds
59     INTEGER mn ! loop counter
60    
61     iftime=.FALSE.
62     ifcyc=mod(curTime,secYr)
63 jmc 1.2
64 jscott 1.1 DO mn=1,13
65    
66 jmc 1.2 IF ((ifcyc.GT.dmonth(mn-1)).AND.(ifcyc.LE.dmonth(mn)))
67 jscott 1.1 & intime1=mn
68    
69     ENDDO
70    
71     C hence if curTime falls exactly mid-month, it is dmonth(intime1)
72     C although this should never happen if passed curTime is a mid-step time
73 jmc 1.2
74 jscott 1.1 intime0=intime1-1
75 jmc 1.2 wght1=(ifcyc - dmonth(intime0)) /
76 jscott 1.1 & (dmonth(intime1) - dmonth(intime0))
77     wght0= 1. _d 0-wght1
78    
79     IF (ifcyc.LE.dmonth(intime0) + dtatmo) ifTime=.TRUE.
80     IF ((iloop.EQ.1).AND.(aloop.EQ.1)) ifTime= .TRUE.
81    
82     IF (intime0.EQ.0) intime0=12
83     IF (intime1.EQ.13) intime1=1
84 jmc 1.2
85 jscott 1.1 RETURN
86     END

  ViewVC Help
Powered by ViewVC 1.1.22