/[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.19 - (show annotations) (download)
Tue May 27 23:56:23 2014 UTC (10 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64z, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, 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
Changes since 1.18: +19 -9 lines
add a call to S/R packages_unused_msg.F to print a weak warning
when parameter file "data.this_pkg" exist but  but useTHIS_PKG=F

1 C $Header: /u/gcmpack/MITgcm/pkg/fizhi/fizhi_readparms.F,v 1.18 2007/12/05 00:55:48 jmc 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---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
47
48 IF ( .NOT.useFizhi ) THEN
49 C- pkg FIZHI is not used
50 _BEGIN_MASTER(myThid)
51 C- Track pkg activation status:
52 C print a (weak) warning if data.fizhi is found
53 CALL PACKAGES_UNUSED_MSG( 'useFizhi', ' ', ' ' )
54 _END_MASTER(myThid)
55 RETURN
56 ENDIF
57
58 C Set defaults
59 fizhi_mdsio_read_pickup = .TRUE.
60 fizhi_mdsio_write_pickup = .TRUE.
61 fizhi_mnc_write_pickup = .FALSE.
62 fizhi_mnc_read_pickup = .FALSE.
63 runlength = 0.0
64 climsst = .TRUE.
65 climsice = .TRUE.
66
67 C Read Fizhi Namelist
68 WRITE(msgBuf,'(A)') ' FIZHI_READPARMS: opening data.fizhi'
69 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,SQUEEZE_RIGHT,1)
70
71 CALL OPEN_COPY_DATA_FILE('data.fizhi', 'FIZHI_READPARMS',
72 & ku,myThid )
73 read (ku,NML=fizhi_list)
74 close (ku)
75
76 C Read Supplemental Ascii File with Current Time Info
77 CALL MDSFINDUNIT( ku2, myThid )
78 open(ku2,file='datetime0',form='formatted')
79 read(ku2,1000)nymdcurrent,nhmscurrent
80 close (ku2)
81 1000 format(i8,2x,i6)
82
83 C Change the length of the model run, ie, change ntimesteps
84 C if runlength has been set in the fizhi namelist
85
86 if(runlength.gt.0.) then
87 mmdd = int(runlength)
88 hhmmss = int((runlength - int(runlength))*1.e6)
89 if(mmdd.lt.100) then
90 nincr = nsecf2(hhmmss,mmdd,nymdcurrent)
91 else
92 call time2freq2(mmdd,nymdcurrent,nhmscurrent,nincr)
93 endif
94 nTimeSteps = int(nincr/deltaT)
95 nEndIter = nIter0 + nTimeSteps
96 endTime = startTime + deltaT*float(nTimeSteps)
97 WRITE(msgBuf,'(A,I10)')
98 & ' CHANGING NUMBER OF MODEL TIMESTEPS TO',ntimesteps
99 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,SQUEEZE_RIGHT,1)
100 WRITE(msgBuf,'(A,F12.2)') ' CHANGING END TIME TO',endtime
101 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,SQUEEZE_RIGHT,1)
102 endif
103
104 C Fill chronos Common Block with Namelist and Other File Info
105 nymd0 = nymdbegin
106 nhms0 = nhmsbegin
107 nymd = nymdcurrent
108 nhms = nhmscurrent
109
110 C Fill ocean params common block with namelist into
111 sstclim = climsst
112 siceclim = climsice
113
114 C Echo Date and Time Info
115 _BEGIN_MASTER(myThid)
116 print *, ' Begin Date ',nymd0,' Begin Time ',nhms0
117 print *, 'Current Date ',nymd,' Current Time ',nhms
118 _END_MASTER(myThid)
119
120 return
121 end

  ViewVC Help
Powered by ViewVC 1.1.22