/[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.16 - (show annotations) (download)
Mon Mar 12 21:49:00 2007 UTC (17 years, 3 months ago) by molod
Branch: MAIN
Changes since 1.15: +9 -2 lines
Read in new namelist info and send to correct place

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

  ViewVC Help
Powered by ViewVC 1.1.22