37 |
|
|
38 |
integer errio |
integer errio |
39 |
integer il |
integer il |
40 |
|
integer iUnit |
41 |
|
|
42 |
character*(max_len_prec) record |
character*(max_len_prec) record |
43 |
|
character*(max_len_mbuf) msgbuf |
44 |
|
|
45 |
c == external == |
c == external == |
46 |
|
|
72 |
eps = -1.e-6 |
eps = -1.e-6 |
73 |
nupdate = 0 |
nupdate = 0 |
74 |
|
|
75 |
c-- Check versions. |
WRITE(msgBuf,'(A)') 'OPTIM_READPARMS: opening data.optim' |
76 |
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
77 |
|
& SQUEEZE_RIGHT , 1) |
78 |
|
|
79 |
|
CALL OPEN_COPY_DATA_FILE( |
80 |
|
I 'data.optim', 'OPTIM_READPARMS', |
81 |
|
O iUnit, |
82 |
|
I myThid ) |
83 |
|
|
84 |
|
READ(unit = iUnit, nml = optim) |
85 |
|
|
86 |
|
WRITE(msgBuf,'(A)') |
87 |
|
& 'OPTIM_READPARMS: finished reading data.optim' |
88 |
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
89 |
|
& SQUEEZE_RIGHT , 1) |
90 |
|
|
91 |
open(unit=scrunit1,status='scratch') |
CLOSE( iUnit ) |
|
|
|
|
c-- Next, read the forcing data file. |
|
|
open(unit = modeldataunit,file = 'data.optim', |
|
|
& status = 'old', iostat = errio) |
|
|
if ( errio .lt. 0 ) then |
|
|
stop ' stopped in optim_readparms.' |
|
|
endif |
|
|
|
|
|
do while ( .true. ) |
|
|
read(modeldataunit, fmt='(a)', end=1001) record |
|
|
il = max(ilnblnk(record),1) |
|
|
if ( record(1:1) .ne. commentcharacter ) |
|
|
& write(unit=scrunit1, fmt='(a)') record(:il) |
|
|
enddo |
|
|
1001 continue |
|
|
close( modeldataunit ) |
|
|
|
|
|
rewind( scrunit1 ) |
|
|
read(unit = scrunit1, nml = optim) |
|
|
close( scrunit1 ) |
|
92 |
|
|
93 |
_END_MASTER( mythid ) |
_END_MASTER( mythid ) |
94 |
|
|