24# if defined FOUR_DVAR || defined VERIFICATION
76# if defined AVERAGES && defined AVERAGES_DETIDE && \
77 (defined ssh_tides || defined uv_tides)
85 integer,
intent(in) :: ng
89 logical :: Ldefine, Lupdate, NewFile
91 integer :: Fcount, ifile, status, tile
93 character (len=*),
parameter :: MyFile = &
170 his(ng)%load=
his(ng)%load+1
171 IF (
his(ng)%load.gt.
his(ng)%Nfiles)
THEN
173 WRITE (
stdout,10)
'HIS(ng)%load = ',
his(ng)%load, &
174 &
his(ng)%Nfiles, trim(
his(ng)%base), &
179 & __line__, myfile))
RETURN
182 his(ng)%Nrec(fcount)=0
184 WRITE (
his(ng)%name,20) trim(
his(ng)%base), ifile
189 his(ng)%files(fcount)=trim(
his(ng)%name)
215 & (mod(
iic(ng)-1,
nhis(ng)).eq.0))
THEN
222 IF (mod(
iic(ng)-1,
nhis(ng)).eq.0)
THEN
271 xtr(ng)%load=
xtr(ng)%load+1
272 IF (
xtr(ng)%load.gt.
xtr(ng)%Nfiles)
THEN
274 WRITE (
stdout,10)
'XTR(ng)%load = ',
xtr(ng)%load, &
275 &
xtr(ng)%Nfiles, trim(
xtr(ng)%base), &
280 & __line__, myfile))
RETURN
283 xtr(ng)%Nrec(fcount)=0
285 WRITE (
xtr(ng)%name,20) trim(
xtr(ng)%base), ifile
290 xtr(ng)%files(fcount)=trim(
xtr(ng)%name)
292 CALL def_extract (ng, newfile)
302 CALL def_extract (ng,
ldefout(ng))
316 & (mod(
iic(ng)-1,
nxtr(ng)).eq.0))
THEN
318 CALL wrt_extract (ng, tile)
323 IF (mod(
iic(ng)-1,
nxtr(ng)).eq.0)
THEN
324 CALL wrt_extract (ng, tile)
371 qck(ng)%load=
qck(ng)%load+1
372 IF (
qck(ng)%load.gt.
qck(ng)%Nfiles)
THEN
374 WRITE (
stdout,10)
'QCK(ng)%load = ',
qck(ng)%load, &
375 &
qck(ng)%Nfiles, trim(
qck(ng)%base), &
380 & __line__, myfile))
RETURN
383 qck(ng)%Nrec(fcount)=0
385 WRITE (
qck(ng)%name,20) trim(
qck(ng)%base), ifile
390 qck(ng)%files(fcount)=trim(
qck(ng)%name)
416 & (mod(
iic(ng)-1,
nqck(ng)).eq.0))
THEN
423 IF (mod(
iic(ng)-1,
nqck(ng)).eq.0)
THEN
478 avg(ng)%load=
avg(ng)%load+1
479 IF (
avg(ng)%load.gt.
avg(ng)%Nfiles)
THEN
481 WRITE (
stdout,10)
'AVG(ng)%load = ',
avg(ng)%load, &
482 &
avg(ng)%Nfiles, trim(
avg(ng)%base), &
487 & __line__, myfile))
RETURN
490 avg(ng)%Nrec(fcount)=0
492 WRITE (
avg(ng)%name,20) trim(
avg(ng)%base), ifile
497 avg(ng)%files(fcount)=trim(
avg(ng)%name)
517 & (mod(
iic(ng)-1,
navg(ng)).eq.0)).or. &
521# if defined AVERAGES_DETIDE && (defined SSH_TIDES || defined UV_TIDES)
577 dia(ng)%load=
dia(ng)%load+1
578 IF (
dia(ng)%load.gt.
dia(ng)%Nfiles)
THEN
580 WRITE (
stdout,10)
'DIA(ng)%load = ',
dia(ng)%load, &
581 &
dia(ng)%Nfiles, trim(
dia(ng)%base), &
586 & __line__, myfile))
RETURN
589 dia(ng)%Nrec(fcount)=0
591 WRITE (
dia(ng)%name,20) trim(
dia(ng)%base), ifile
596 dia(ng)%files(fcount)=trim(
dia(ng)%name)
616 & (mod(
iic(ng)-1,
ndia(ng)).eq.0)).or. &
644 IF (mod(
iic(ng)-1,
nsta(ng)).eq.0)
THEN
664 IF (
frrec(ng).eq.0)
THEN
676 IF ((mod(
iic(ng)-1,
nflt(ng)).eq.0).and. &
702 & (mod(
iic(ng)-1,
nrst(ng)).eq.0))
THEN
708# if (defined FOUR_DVAR || \
709 defined verification) && \
729# if !(defined R4DVAR || defined VERIFICATION)
747 10
FORMAT (/,
' OUTPUT - multi-file counter ',a,i0, &
748 &
', is greater than Nfiles = ',i0,1x,
'dimension', &
749 & /,10x,
'in structure when creating next file: ', &
750 & a,
'_',i4.4,
'.nc', &
751 & /,10x,
'Incorrect OutFiles logic in ''read_phypar''.')
752 20
FORMAT (a,
'_',i4.4,
'.nc')
subroutine, public close_file(ng, model, s, ncname, lupdate)
subroutine, public def_avg(ng, ldef)
subroutine, public def_diags(ng, ldef)
subroutine, public def_floats(ng, ldef)
subroutine, public def_his(ng, ldef)
subroutine, public def_quick(ng, ldef)
subroutine, public def_rst(ng)
subroutine, public def_station(ng, ldef)
integer, dimension(:), allocatable frrec
logical, dimension(:), allocatable lsadd
logical, dimension(:), allocatable processobs
type(t_io), dimension(:), allocatable his
type(t_io), dimension(:), allocatable xtr
type(t_io), dimension(:), allocatable qck
type(t_io), dimension(:), allocatable avg
character(len=256) sourcefile
type(t_io), dimension(:), allocatable dia
integer, dimension(:), allocatable idefqck
integer, dimension(:), allocatable idefavg
integer, dimension(:), allocatable idefdia
integer, dimension(:), allocatable idefxtr
integer, dimension(:), allocatable idefhis
integer, dimension(:), allocatable nfloats
integer, dimension(:), allocatable nstation
logical, dimension(:), allocatable lwrtqck
logical, dimension(:), allocatable lfloats
logical, dimension(:), allocatable lwrtdia
integer, dimension(:), allocatable nrrec
real(dp), dimension(:), allocatable obstime
integer, dimension(:), allocatable nxtr
integer, dimension(:), allocatable iic
integer, dimension(:), allocatable ndefhis
real(dp), dimension(:), allocatable dt
logical, dimension(:), allocatable lwrtxtr
logical, dimension(:), allocatable ldefflt
logical, dimension(:), allocatable ldefdia
integer, dimension(:), allocatable nrst
integer, dimension(:), allocatable nqck
logical, dimension(:), allocatable ldefavg
logical, dimension(:), allocatable ldefqck
integer, dimension(:), allocatable nflt
integer, dimension(:), allocatable navg
logical, dimension(:), allocatable lwrtavg
logical, dimension(:), allocatable ldefhis
integer, dimension(:), allocatable ntend
integer, dimension(:), allocatable ndefqck
integer, dimension(:), allocatable nsta
integer, dimension(:), allocatable nhis
integer, dimension(:), allocatable ndefavg
logical, dimension(:), allocatable lwrtper
logical, dimension(:), allocatable ldefxtr
integer, dimension(:), allocatable ndefxtr
logical, dimension(:), allocatable lwrthis
logical, dimension(:), allocatable ldefrst
logical, dimension(:), allocatable ldefout
logical, dimension(:), allocatable lwrtrst
real(dp), dimension(:), allocatable time
logical, dimension(:), allocatable ldefsta
logical, dimension(:), allocatable lstations
integer, dimension(:), allocatable ntstart
integer, dimension(:), allocatable ndia
integer, dimension(:), allocatable ntsdia
integer, dimension(:), allocatable ntsavg
integer, dimension(:), allocatable ndefdia
subroutine, public obs_read(ng, model, backward)
subroutine, public obs_write(ng, tile, model)
logical function, public founderror(flag, noerr, line, routine)
subroutine, public wrt_avg(ng, tile)
subroutine, public wrt_diags(ng, tile)
subroutine, public wrt_floats(ng)
subroutine, public wrt_his(ng, tile)
subroutine, public wrt_quick(ng, tile)
subroutine, public wrt_rst(ng, tile)
subroutine, public wrt_station(ng, tile)
subroutine, public wrt_tides(ng, tile)
subroutine obs_cost(ng, model)
recursive subroutine wclock_off(ng, model, region, line, routine)
recursive subroutine wclock_on(ng, model, region, line, routine)