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

Contents of /MITgcm/pkg/exf/exf_getfield_start.F

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


Revision 1.1 - (show annotations) (download)
Sat Apr 7 20:06:52 2012 UTC (12 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64o, checkpoint64a, checkpoint63r, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint64n, checkpoint64b, checkpoint63m, checkpoint64e, checkpoint63q, checkpoint64d, checkpoint64c, checkpoint64g, checkpoint64f, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint63n, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint64i, checkpoint63o, checkpoint63p, checkpoint64h, checkpoint63s, checkpoint64k, checkpoint64, checkpoint65, checkpoint64j, checkpoint64m, checkpoint64l
new S/R EXF_GETFIELD_START to return starting-time of a forcing field
(according to useExfYearlyFields). This save the repetition (32 times)
of the same sequence of code in exf_init_fixed.F

1 C $Header: /u/gcmpack/MITgcm/pkg/exf/exf_interp.F,v 1.30 2012/04/02 21:24:54 jmc Exp $
2 C $Name: $
3
4 #include "EXF_OPTIONS.h"
5
6 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7
8 CBOP
9 C !ROUTINE: EXF_GETFIELD_START
10 C !INTERFACE:
11 SUBROUTINE EXF_GETFIELD_START(
12 I useYearlyFields,
13 I fld_startdate1, fld_startdate2,
14 O fld_start_time,
15 I myThid )
16
17 C !DESCRIPTION: \bv
18 C *==========================================================*
19 C | SUBROUTINE EXF_GETFIELD_START
20 C | o get forcing-field starting-time (in secs);
21 C | distinguish between using Yearly-Fields or not.
22 C *==========================================================*
23 C \ev
24
25 C !USES:
26 IMPLICIT NONE
27 C === Global variables ===
28 #include "SIZE.h"
29 #include "EEPARAMS.h"
30 c#include "cal.h"
31 #include "PARAMS.h"
32
33 C !INPUT/OUTPUT PARAMETERS:
34 C useYearlyFields :: select if using EXF Yearly-fields or not
35 C fld_startdate1 :: field starting date (YYYYMMDD)
36 C fld_startdate2 :: field starting date (HHMMSS)
37 C fld_start_time :: corresponding starting time (in sec) for this field
38 C myThid :: My Thread Id number
39 LOGICAL useYearlyFields
40 INTEGER fld_startdate1, fld_startdate2
41 _RL fld_start_time
42 INTEGER myThid
43
44 C !FUNCTIONS:
45
46 C !LOCAL VARIABLES:
47 C msgBuf :: Informational/error message buffer
48 c CHARACTER*(MAX_LEN_MBUF) msgBuf
49 INTEGER date_array(4), difftime(4), yearStartDate(4)
50 INTEGER gcm_startdate(4)
51 CEOP
52
53 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
54
55 CALL CAL_FULLDATE( fld_startdate1, fld_startdate2,
56 & date_array, myThid )
57 IF ( useYearlyFields ) THEN
58 yearStartDate(1) = INT(date_array(1)/10000.) * 10000 + 101
59 yearStartDate(2) = 0
60 yearStartDate(3) = date_array(3)
61 yearStartDate(4) = date_array(4)
62 CALL cal_TimePassed( yearStartDate,date_array,difftime,myThid)
63 CALL cal_ToSeconds ( difftime, fld_start_time, myThid)
64 ELSE
65 C-- with "cal.h" header file:
66 c CALL cal_TimePassed(modelstartdate,date_array,difftime,myThid)
67 c CALL cal_ToSeconds ( difftime, fld_start_time, myThid)
68 c fld_start_time = modelstart + fld_start_time
69 C-- with "PARAMS.h" header file:
70 CALL cal_getdate( nIter0, startTime, gcm_startdate, myThid )
71 CALL cal_TimePassed( gcm_startdate,date_array,difftime,myThid)
72 CALL cal_ToSeconds ( difftime, fld_start_time, myThid)
73 fld_start_time = startTime + fld_start_time
74 ENDIF
75
76 RETURN
77 END

  ViewVC Help
Powered by ViewVC 1.1.22