3#if (defined FOUR_DVAR || defined VERIFICATION) && defined OBSERVATIONS
34# if defined PIO_LIB && defined DISTRIBUTE
46 logical,
intent(in) :: backward
48 integer,
intent(in) :: ng, model
52 character (len=*),
parameter :: myfile = &
59 SELECT CASE (
obs(ng)%IOtype)
63# if defined PIO_LIB && defined DISTRIBUTE
73 10
FORMAT (
' OBS_READ - Illegal input file type, io_type = ',i0, &
74 & /,12x,
'Check KeyWord ''INP_LIB'' in ''roms.in''.')
87 logical,
intent(in) :: backward
89 integer,
intent(in) :: ng, model
93 logical :: readnlmod, readtlmod
96 integer :: i, iobs, itrc, status
98 character (len=22) :: t_code
100 character (len=*),
parameter :: myfile = &
101 & __FILE__//
", obs_read_nf90"
112# if defined I4DVAR_ANA_SENSITIVITY
154# ifdef WEAK_CONSTRAINT
166 & ncid =
obs(ng)%ncid, &
168 & total = (/
nobs(ng)/))
175 & ncid =
obs(ng)%ncid, &
177 & total = (/
nobs(ng)/))
184 & ncid =
obs(ng)%ncid, &
186 & total = (/
nobs(ng)/))
193 & ncid =
obs(ng)%ncid, &
195 & total = (/
nobs(ng)/))
202 & ncid =
obs(ng)%ncid, &
204 & total = (/
nobs(ng)/))
219 & ncid =
obs(ng)%ncid, &
221 & total = (/
nobs(ng)/))
227 & ncid =
obs(ng)%ncid, &
229 & total = (/
nobs(ng)/))
233 IF ((minval(
zobs).lt.0.0_r8).or. &
234 & (maxval(
zobs).lt.0.0_r8))
THEN
255 & ncid =
obs(ng)%ncid, &
257 & total = (/
nobs(ng)/))
266 & ncid =
obs(ng)%ncid, &
268 & total = (/
nobs(ng)/))
272# ifdef WEAK_CONSTRAINT
281 & ncid =
obs(ng)%ncid, &
283 & total = (/
nobs(ng)/))
286# ifndef WEAK_CONSTRAINT
295# if defined VERIFICATION || defined TLM_CHECK
299 & ncid =
dav(ng)%ncid, &
301 & total = (/
nobs(ng)/))
307 & ncid =
dav(ng)%ncid, &
309 & total = (/
nobs(ng),1/))
312# ifdef BGQC_NOT_NEEDED
316 & ncid =
dav(ng)%ncid, &
318 & total = (/
nobs(ng)/))
323 & ncid =
dav(ng)%ncid, &
325 & total = (/
nobs(ng)/))
330# if defined TLM_OBS && !defined WEAK_CONSTRAINT
339 & ncid =
dav(ng)%ncid, &
341 & total = (/
nobs(ng)/))
350 tlmodval(iobs)=0.0_r8
413 10
FORMAT (/,
' Number of State Observations Processed:',2x, &
414 &
'ObsTime = ',f12.4,
',',t68,a,/,/, &
415 & 10x,
'Variable',10x,
'IstrObs',4x,
'IendObs',6x,
'Count', &
421# if defined PIO_LIB && defined DISTRIBUTE
431 logical,
intent(in) :: backward
433 integer,
intent(in) :: ng, model
437 logical :: readnlmod, readtlmod
439 integer :: mstr, mend
440 integer :: i, iobs, itrc, status
442 character (len=22) :: t_code
444 character (len=*),
parameter :: myfile = &
445 & __FILE__//
", obs_read_pio"
456# if defined I4DVAR_ANA_SENSITIVITY
498# ifdef WEAK_CONSTRAINT
511 & piofile =
obs(ng)%pioFile, &
513 & total = (/
nobs(ng)/))
521 & piofile =
obs(ng)%pioFile, &
523 & total = (/
nobs(ng)/))
531 & piofile =
obs(ng)%pioFile, &
533 & total = (/
nobs(ng)/))
541 & piofile =
obs(ng)%pioFile, &
543 & total = (/
nobs(ng)/))
551 & piofile =
obs(ng)%pioFile, &
553 & total = (/
nobs(ng)/))
568 & piofile =
obs(ng)%pioFile, &
570 & total = (/
nobs(ng)/))
576 & piofile =
obs(ng)%pioFile, &
578 & total = (/
nobs(ng)/))
582 IF ((minval(
zobs).lt.0.0_r8).or. &
583 & (maxval(
zobs).lt.0.0_r8))
THEN
602 & piofile =
obs(ng)%pioFile, &
604 & total = (/
nobs(ng)/))
613 & piofile =
obs(ng)%pioFile, &
615 & total = (/
nobs(ng)/))
619# ifdef WEAK_CONSTRAINT
629 & piofile =
obs(ng)%pioFile, &
631 & total = (/
nobs(ng)/))
634# ifndef WEAK_CONSTRAINT
647 & piofile =
dav(ng)%pioFile, &
649 & total = (/
nobs(ng)/))
655 & piofile =
dav(ng)%pioFile, &
657 & total = (/
nobs(ng),1/))
660# ifdef BGQC_NOT_NEEDED
664 & piofile =
dav(ng)%pioFile, &
666 & total = (/
nobs(ng)/))
672 & piofile =
dav(ng)%pioFile, &
674 & total = (/
nobs(ng)/))
679# if defined TLM_OBS && !defined WEAK_CONSTRAINT
688 & piofile =
dav(ng)%pioFile, &
690 & total = (/
nobs(ng)/))
699 tlmodval(iobs)=0.0_r8
762 10
FORMAT (/,
' Number of State Observations Processed:',2x, &
763 &
'ObsTime = ',f12.4,
',',t68,a,/,/, &
764 & 10x,
'Variable',10x,
'IstrObs',4x,
'IendObs',6x,
'Count', &
subroutine, public time_string(mytime, date_string)
type(t_fourdvar), dimension(:), allocatable fourdvar
integer, dimension(:), allocatable obsprov
integer, dimension(:), allocatable nobs
integer, dimension(:), allocatable nobsvar
real(r8), dimension(:), allocatable obsval
logical, dimension(:), allocatable havenlmod
real(r8), dimension(:), allocatable bgerr
logical, dimension(:), allocatable wrote_zobs
real(r8), dimension(:), allocatable obsscale
real(r8), dimension(:), allocatable obserr
real(r8), dimension(:), allocatable obsmeta
logical, dimension(:), allocatable load_zobs
integer, dimension(:), allocatable obstype
logical, dimension(:), allocatable haveobsmeta
logical, dimension(:), allocatable havetlmod
integer, dimension(:), allocatable nsurvey
real(r8), dimension(:), allocatable zobs
real(r8), dimension(:), allocatable nlmodval
real(dp), dimension(:), allocatable tobs
integer, dimension(:), allocatable obssurvey
real(r8), dimension(:), allocatable xobs
integer, dimension(:), allocatable obsstate2type
real(r8), dimension(:), allocatable yobs
integer, dimension(:), allocatable nstrobs
logical, dimension(:), allocatable processobs
integer, dimension(:), allocatable nendobs
type(t_io), dimension(:), allocatable obs
type(t_io), dimension(:), allocatable dav
character(len=256) sourcefile
integer, parameter io_nf90
integer, parameter io_pio
integer, dimension(:), allocatable istvar
character(len=maxlen), dimension(6, 0:nv) vname
integer, dimension(:), allocatable nt
real(dp), parameter day2sec
real(dp), dimension(:), allocatable obstime
real(dp), parameter sec2day
subroutine, private obs_read_pio(ng, model, backward)
subroutine, private obs_read_nf90(ng, model, backward)
subroutine, public obs_read(ng, model, backward)
logical function, public founderror(flag, noerr, line, routine)
subroutine obs_depth(ng, tile, model)