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

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

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


Revision 1.10 - (hide annotations) (download)
Mon May 23 19:30:37 2005 UTC (19 years, 1 month ago) by molod
Branch: MAIN
Changes since 1.9: +21 -5 lines
New way of accounting for run length using real time

1 molod 1.10 C $Header: /u/gcmpack/MITgcm/pkg/fizhi/fizhi_readparms.F,v 1.9 2005/05/23 02:15:51 molod Exp $
2 molod 1.1 C $Name: $
3    
4 molod 1.5 #include "FIZHI_OPTIONS.h"
5 edhill 1.6
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 molod 1.1 implicit none
18    
19     #include "chronos.h"
20 edhill 1.6 #include "fizhi_io_comms.h"
21 molod 1.1 #include "EEPARAMS.h"
22 molod 1.9 #include "SIZE.h"
23     #include "PARAMS.h"
24 molod 1.1
25 edhill 1.6 C !INPUT PARAMETERS:
26 molod 1.1 integer myThid
27 edhill 1.6 CEOP
28 molod 1.1
29 edhill 1.6 C !LOCAL VARIABLES:
30 molod 1.1 character*(MAX_LEN_MBUF) msgBuf
31 molod 1.10 integer ku, ku2
32 molod 1.1 integer nymdbegin, nhmsbegin
33     integer nymdcurrent, nhmscurrent
34 molod 1.9 real runlength
35 molod 1.10 integer nincr
36     integer mmdd,hhmmss,nsecf2
37 molod 1.1
38 edhill 1.6 namelist / fizhi_list /
39 molod 1.9 . nymdbegin, nhmsbegin,
40     . fizhi_mnc_write_pickup, fizhi_mnc_read_pickup,
41     . runlength
42 edhill 1.6
43     C Set defaults
44 molod 1.7 fizhi_mdsio_read_pickup = .TRUE.
45     fizhi_mdsio_write_pickup = .TRUE.
46     fizhi_mnc_write_pickup = .FALSE.
47     fizhi_mnc_read_pickup = .FALSE.
48 molod 1.9 runlength = 0.0
49 molod 1.1
50 edhill 1.6 C Read Fizhi Namelist
51 molod 1.1 WRITE(msgBuf,'(A)') ' FIZHI_READPARMS: opening data.fizhi'
52     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,SQUEEZE_RIGHT,1)
53    
54     CALL OPEN_COPY_DATA_FILE('data.fizhi', 'FIZHI_READPARMS',
55 edhill 1.6 & ku,myThid )
56 molod 1.1 read (ku,NML=fizhi_list)
57     close (ku)
58    
59 edhill 1.6 C Read Supplemental Ascii File with Current Time Info
60 molod 1.10 CALL MDSFINDUNIT( ku2, myThid )
61     open(ku2,file='datetime0',form='formatted')
62     read(ku2,1000)nymdcurrent,nhmscurrent
63     close (ku2)
64 molod 1.1 1000 format(i8,2x,i6)
65    
66 molod 1.10 C Change the length of the model run, ie, change ntimesteps
67     C if runlength has been set in the fizhi namelist
68    
69     if(runlength.gt.0.) then
70     mmdd = int(runlength)
71     hhmmss = int((runlength - int(runlength))*1.e6)
72     nincr = nsecf2(hhmmss,mmdd,nymdcurrent)
73     ntimesteps = int(nincr/deltat)
74     WRITE(msgBuf,'(A,I8)')
75     . ' CHANGING NUMBER OF MODEL TIMESTEPS TO',ntimesteps
76     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,SQUEEZE_RIGHT,1)
77     endif
78    
79 edhill 1.6 C Fill chronos Common Block with Namelist and Other File Info
80 molod 1.1 nymd0 = nymdbegin
81     nhms0 = nhmsbegin
82     nymd = nymdcurrent
83     nhms = nhmscurrent
84    
85 edhill 1.6 C Echo Date and Time Info
86 molod 1.2 _BEGIN_MASTER(myThid)
87 molod 1.1 print *, ' Begin Date ',nymd0,' Begin Time ',nhms0
88     print *, 'Current Date ',nymd,' Current Time ',nhms
89     _END_MASTER(myThid)
90    
91     return
92     end
93 edhill 1.6
94     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|

  ViewVC Help
Powered by ViewVC 1.1.22