/[MITgcm]/MITgcm/pkg/fizhi/fizhi_readparms.F
ViewVC logotype

Contents of /MITgcm/pkg/fizhi/fizhi_readparms.F

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


Revision 1.18 - (show annotations) (download)
Wed Dec 5 00:55:48 2007 UTC (16 years, 4 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64x, 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, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, 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
Changes since 1.17: +4 -3 lines
After changing "nTimeSteps", make "nEndIter" consistent with "endTime"

1 C $Header: /u/gcmpack/MITgcm/pkg/fizhi/fizhi_readparms.F,v 1.17 2007/03/13 14:04:36 molod Exp $
2 C $Name: $
3
4 #include "FIZHI_OPTIONS.h"
5
6 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7 CBOP 0
8 C !ROUTINE: FIZHI_MNC_INIT
9
10 C !INTERFACE:
11 SUBROUTINE FIZHI_READPARMS( myThid )
12
13 C !DESCRIPTION:
14 C Read Fizhi Namelist and Get the Model Date and Time from File
15
16 C !USES:
17 implicit none
18
19 #include "chronos.h"
20 #include "SIZE.h"
21 #include "fizhi_ocean_coms.h"
22 #include "fizhi_io_comms.h"
23 #include "EEPARAMS.h"
24 #include "PARAMS.h"
25
26 C !INPUT PARAMETERS:
27 integer myThid
28 CEOP
29
30 C !LOCAL VARIABLES:
31 character*(MAX_LEN_MBUF) msgBuf
32 integer ku, ku2
33 integer nymdbegin, nhmsbegin
34 integer nymdcurrent, nhmscurrent
35 real runlength
36 integer nincr
37 integer mmdd,hhmmss,nsecf2
38 integer nymdend,nhmsend
39 logical climsst, climsice
40
41 namelist / fizhi_list /
42 . nymdbegin, nhmsbegin,
43 . fizhi_mnc_write_pickup, fizhi_mnc_read_pickup,
44 . runlength, climsst, climsice
45
46 C Set defaults
47 fizhi_mdsio_read_pickup = .TRUE.
48 fizhi_mdsio_write_pickup = .TRUE.
49 fizhi_mnc_write_pickup = .FALSE.
50 fizhi_mnc_read_pickup = .FALSE.
51 runlength = 0.0
52 climsst = .TRUE.
53 climsice = .TRUE.
54
55 C Read Fizhi Namelist
56 WRITE(msgBuf,'(A)') ' FIZHI_READPARMS: opening data.fizhi'
57 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,SQUEEZE_RIGHT,1)
58
59 CALL OPEN_COPY_DATA_FILE('data.fizhi', 'FIZHI_READPARMS',
60 & ku,myThid )
61 read (ku,NML=fizhi_list)
62 close (ku)
63
64 C Read Supplemental Ascii File with Current Time Info
65 CALL MDSFINDUNIT( ku2, myThid )
66 open(ku2,file='datetime0',form='formatted')
67 read(ku2,1000)nymdcurrent,nhmscurrent
68 close (ku2)
69 1000 format(i8,2x,i6)
70
71 C Change the length of the model run, ie, change ntimesteps
72 C if runlength has been set in the fizhi namelist
73
74 if(runlength.gt.0.) then
75 mmdd = int(runlength)
76 hhmmss = int((runlength - int(runlength))*1.e6)
77 if(mmdd.lt.100) then
78 nincr = nsecf2(hhmmss,mmdd,nymdcurrent)
79 else
80 call time2freq2(mmdd,nymdcurrent,nhmscurrent,nincr)
81 endif
82 nTimeSteps = int(nincr/deltaT)
83 nEndIter = nIter0 + nTimeSteps
84 endTime = startTime + deltaT*float(nTimeSteps)
85 WRITE(msgBuf,'(A,I10)')
86 . ' CHANGING NUMBER OF MODEL TIMESTEPS TO',ntimesteps
87 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,SQUEEZE_RIGHT,1)
88 WRITE(msgBuf,'(A,F12.2)') ' CHANGING END TIME TO',endtime
89 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,SQUEEZE_RIGHT,1)
90 endif
91
92 C Fill chronos Common Block with Namelist and Other File Info
93 nymd0 = nymdbegin
94 nhms0 = nhmsbegin
95 nymd = nymdcurrent
96 nhms = nhmscurrent
97
98 C Fill ocean params common block with namelist into
99 sstclim = climsst
100 siceclim = climsice
101
102 C Echo Date and Time Info
103 _BEGIN_MASTER(myThid)
104 print *, ' Begin Date ',nymd0,' Begin Time ',nhms0
105 print *, 'Current Date ',nymd,' Current Time ',nhms
106 _END_MASTER(myThid)
107
108 return
109 end
110
111 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|

  ViewVC Help
Powered by ViewVC 1.1.22