25#ifdef RBL4DVAR_FCT_SENSITIVITY
30#if defined RBL4DVAR_FCT_SENSITIVITY && !defined OBS_SPACE
57#if defined RBL4DVAR_FCT_SENSITIVITY && defined OBS_SPACE
109#if defined PIO_LIB && defined DISTRIBUTE
130#if defined PIO_LIB && defined DISTRIBUTE
144#if defined PIO_LIB && defined DISTRIBUTE
152 TYPE (var_desc_t) :: vd
171 integer,
pointer :: nrec(:)
172 integer,
pointer :: vid(:)
173 integer,
pointer :: tid(:)
174 real(
dp),
pointer :: time_min(:)
175 real(
dp),
pointer :: time_max(:)
176 character (len=50 ) :: label
177 character (len=256) :: head
178 character (len=256) :: base
179 character (len=256) :: name
180 character (len=256),
pointer :: files(:)
181#if defined PIO_LIB && defined DISTRIBUTE
182 TYPE (file_desc_t) :: piofile
209#ifdef RBL4DVAR_FCT_SENSITIVITY
213#if defined RBL4DVAR_FCT_SENSITIVITY && !defined OBS_SPACE
214 TYPE(
t_io),
allocatable :: foia(:)
215 TYPE(
t_io),
allocatable :: foib(:)
233#if defined RBL4DVAR_FCT_SENSITIVITY && defined OBS_SPACE
258#if defined PIO_LIB && defined DISTRIBUTE
259 TYPE (file_desc_t),
allocatable ::
brydesc(:,:)
268#if defined PIO_LIB && defined DISTRIBUTE
269 TYPE (file_desc_t),
allocatable ::
clmdesc(:,:)
278#if defined PIO_LIB && defined DISTRIBUTE
279 TYPE (file_desc_t),
allocatable ::
frcdesc(:,:)
285 character (len=50),
dimension(9) ::
rerror = &
286 & (/
' ROMS - Blows up ................ exit_flag: ', &
287 &
' ROMS - Input error ............. exit_flag: ', &
288 &
' ROMS - Output error ............ exit_flag: ', &
289 &
' ROMS - I/O error ............... exit_flag: ', &
290 &
' ROMS - Configuration error ..... exit_flag: ', &
291 &
' ROMS - Partition error ......... exit_flag: ', &
292 &
' ROMS - Illegal input parameter . exit_flag: ', &
293 &
' ROMS - Fatal algorithm result .. exit_flag: ', &
294 &
' ROMS - Coupling error .......... exit_flag: ' /)
333 integer,
intent(in) :: ngrids
337 integer :: i, lstr, ng
339 character (len=1),
parameter :: blank =
' '
345 IF (.not.
allocated(
adm))
THEN
346 allocate (
adm(ngrids) )
348 IF (.not.
allocated(
ads))
THEN
349 allocate (
ads(ngrids) )
351 IF (.not.
allocated(
avg))
THEN
352 allocate (
avg(ngrids) )
354 IF (.not.
allocated(
blk))
THEN
355 allocate (
blk(ngrids) )
357 IF (.not.
allocated(
dai))
THEN
358 allocate (
dai(ngrids) )
360 IF (.not.
allocated(
dav))
THEN
361 allocate (
dav(ngrids) )
363 IF (.not.
allocated(
dia))
THEN
364 allocate (
dia(ngrids) )
366 IF (.not.
allocated(
err))
THEN
367 allocate (
err(ngrids) )
369 IF (.not.
allocated(
flt))
THEN
370 allocate (
flt(ngrids) )
372#ifdef RBL4DVAR_FCT_SENSITIVITY
373 IF (.not.
allocated(
fcta))
THEN
374 allocate (
fcta(ngrids) )
376 IF (.not.
allocated(
fctb))
THEN
377 allocate (
fctb(ngrids) )
380#if defined RBL4DVAR_FCT_SENSITIVITY && !defined OBS_SPACE
381 IF (.not.
allocated(foia))
THEN
382 allocate ( foia(ngrids) )
384 IF (.not.
allocated(foib))
THEN
385 allocate ( foib(ngrids) )
388 IF (.not.
allocated(
fwd))
THEN
389 allocate (
fwd(ngrids) )
391 IF (.not.
allocated(
grd))
THEN
392 allocate (
grd(ngrids) )
394 IF (.not.
allocated(
grx))
THEN
395 allocate (
grx(ngrids) )
397 IF (.not.
allocated(
gst))
THEN
398 allocate (
gst(ngrids) )
400 IF (.not.
allocated(
har))
THEN
401 allocate (
har(ngrids) )
403 IF (.not.
allocated(
his))
THEN
404 allocate (
his(ngrids) )
406 IF (.not.
allocated(
hss))
THEN
407 allocate (
hss(ngrids) )
409 IF (.not.
allocated(
iad))
THEN
410 allocate (
iad(ngrids) )
412 IF (.not.
allocated(
ini))
THEN
413 allocate (
ini(ngrids) )
415 IF (.not.
allocated(
irp))
THEN
416 allocate (
irp(ngrids) )
418 IF (.not.
allocated(
itl))
THEN
419 allocate (
itl(ngrids) )
421 IF (.not.
allocated(
lcz))
THEN
422 allocate (
lcz(ngrids) )
424 IF (.not.
allocated(
lze))
THEN
425 allocate (
lze(ngrids) )
427 IF (.not.
allocated(
nud))
THEN
428 allocate (
nud(ngrids) )
430 IF (.not.
allocated(
obs))
THEN
431 allocate (
obs(ngrids) )
433#if defined RBL4DVAR_FCT_SENSITIVITY && defined OBS_SPACE
434 IF (.not.
allocated(
oifa))
THEN
435 allocate (
oifa(ngrids) )
437 IF (.not.
allocated(
oifb))
THEN
438 allocate (
oifb(ngrids) )
441 IF (.not.
allocated(
qck))
THEN
442 allocate (
qck(ngrids) )
444 IF (.not.
allocated(
rst))
THEN
445 allocate (
rst(ngrids) )
448 IF (.not.
allocated(
sca))
THEN
449 allocate (
sca(ngrids) )
451 IF (.not.
allocated(
sct))
THEN
452 allocate (
sct(ngrids) )
454 IF (.not.
allocated(
spa))
THEN
455 allocate (
spa(ngrids) )
457 IF (.not.
allocated(
spt))
THEN
458 allocate (
spt(ngrids) )
461 IF (.not.
allocated(
ssf))
THEN
462 allocate (
ssf(ngrids) )
464 IF (.not.
allocated(
sta))
THEN
465 allocate (
sta(ngrids) )
467 IF (.not.
allocated(
tide))
THEN
468 allocate (
tide(ngrids) )
470 IF (.not.
allocated(
tlf))
THEN
471 allocate (
tlf(ngrids) )
473 IF (.not.
allocated(
tlm))
THEN
474 allocate (
tlm(ngrids) )
476 IF (.not.
allocated(
xtr))
THEN
477 allocate (
xtr(ngrids) )
480 IF (.not.
allocated(
nrm))
THEN
481 allocate (
nrm(4,ngrids) )
483 IF (.not.
allocated(
std))
THEN
484 allocate (
std(5,ngrids) )
497 IF (.not.
allocated(
nffiles))
THEN
515#ifdef RBL4DVAR_FCT_SENSITIVITY
519#if defined RBL4DVAR_FCT_SENSITIVITY && !defined OBS_SPACE
538#if defined RBL4DVAR_FCT_SENSITIVITY && defined OBS_SPACE
562 lstr=len(
his(ng)%name)
564 adm(ng)%head(i:i)=blank
565 adm(ng)%base(i:i)=blank
566 adm(ng)%name(i:i)=blank
568 ads(ng)%head(i:i)=blank
569 ads(ng)%base(i:i)=blank
570 ads(ng)%name(i:i)=blank
572 avg(ng)%head(i:i)=blank
573 avg(ng)%base(i:i)=blank
574 avg(ng)%name(i:i)=blank
576 blk(ng)%head(i:i)=blank
577 blk(ng)%base(i:i)=blank
578 blk(ng)%name(i:i)=blank
580 dai(ng)%head(i:i)=blank
581 dai(ng)%base(i:i)=blank
582 dai(ng)%name(i:i)=blank
584 dav(ng)%head(i:i)=blank
585 dav(ng)%base(i:i)=blank
586 dav(ng)%name(i:i)=blank
588 dia(ng)%head(i:i)=blank
589 dia(ng)%base(i:i)=blank
590 dia(ng)%name(i:i)=blank
592 err(ng)%head(i:i)=blank
593 err(ng)%base(i:i)=blank
594 err(ng)%name(i:i)=blank
596 flt(ng)%head(i:i)=blank
597 flt(ng)%base(i:i)=blank
598 flt(ng)%name(i:i)=blank
600#ifdef RBL4DVAR_FCT_SENSITIVITY
601 fcta(ng)%head(i:i)=blank
602 fcta(ng)%base(i:i)=blank
603 fcta(ng)%name(i:i)=blank
605 fctb(ng)%head(i:i)=blank
606 fctb(ng)%base(i:i)=blank
607 fctb(ng)%name(i:i)=blank
610#if defined RBL4DVAR_FCT_SENSITIVITY && !defined OBS_SPACE
611 foia(ng)%head(i:i)=blank
612 foia(ng)%base(i:i)=blank
613 foia(ng)%name(i:i)=blank
615 foib(ng)%head(i:i)=blank
616 foib(ng)%base(i:i)=blank
617 foib(ng)%name(i:i)=blank
620 fwd(ng)%head(i:i)=blank
621 fwd(ng)%base(i:i)=blank
622 fwd(ng)%name(i:i)=blank
624 grd(ng)%head(i:i)=blank
625 grd(ng)%base(i:i)=blank
626 grd(ng)%name(i:i)=blank
628 grx(ng)%head(i:i)=blank
629 grx(ng)%base(i:i)=blank
630 grx(ng)%name(i:i)=blank
632 gst(ng)%head(i:i)=blank
633 gst(ng)%base(i:i)=blank
634 gst(ng)%name(i:i)=blank
636 har(ng)%head(i:i)=blank
637 har(ng)%base(i:i)=blank
638 har(ng)%name(i:i)=blank
640 his(ng)%head(i:i)=blank
641 his(ng)%base(i:i)=blank
642 his(ng)%name(i:i)=blank
644 hss(ng)%head(i:i)=blank
645 hss(ng)%base(i:i)=blank
646 hss(ng)%name(i:i)=blank
648 iad(ng)%head(i:i)=blank
649 iad(ng)%base(i:i)=blank
650 iad(ng)%name(i:i)=blank
652 ini(ng)%head(i:i)=blank
653 ini(ng)%base(i:i)=blank
654 ini(ng)%name(i:i)=blank
656 irp(ng)%head(i:i)=blank
657 irp(ng)%base(i:i)=blank
658 irp(ng)%name(i:i)=blank
660 itl(ng)%head(i:i)=blank
661 itl(ng)%base(i:i)=blank
662 itl(ng)%name(i:i)=blank
664 lcz(ng)%head(i:i)=blank
665 lcz(ng)%base(i:i)=blank
666 lcz(ng)%name(i:i)=blank
668 lze(ng)%head(i:i)=blank
669 lze(ng)%base(i:i)=blank
670 lze(ng)%name(i:i)=blank
672 nud(ng)%head(i:i)=blank
673 nud(ng)%base(i:i)=blank
674 nud(ng)%name(i:i)=blank
676 obs(ng)%head(i:i)=blank
677 obs(ng)%base(i:i)=blank
678 obs(ng)%name(i:i)=blank
680#if defined RBL4DVAR_FCT_SENSITIVITY && defined OBS_SPACE
681 oifa(ng)%head(i:i)=blank
682 oifa(ng)%base(i:i)=blank
683 oifa(ng)%name(i:i)=blank
685 oifb(ng)%head(i:i)=blank
686 oifb(ng)%base(i:i)=blank
687 oifb(ng)%name(i:i)=blank
690 qck(ng)%head(i:i)=blank
691 qck(ng)%base(i:i)=blank
692 qck(ng)%name(i:i)=blank
694 rst(ng)%head(i:i)=blank
695 rst(ng)%base(i:i)=blank
696 rst(ng)%name(i:i)=blank
698 ssf(ng)%head(i:i)=blank
699 ssf(ng)%base(i:i)=blank
700 ssf(ng)%name(i:i)=blank
702 sta(ng)%head(i:i)=blank
703 sta(ng)%base(i:i)=blank
704 sta(ng)%name(i:i)=blank
706 tlf(ng)%head(i:i)=blank
707 tlf(ng)%base(i:i)=blank
708 tlf(ng)%name(i:i)=blank
710 tlm(ng)%head(i:i)=blank
711 tlm(ng)%base(i:i)=blank
712 tlm(ng)%name(i:i)=blank
714 tide(ng)%head(i:i)=blank
715 tide(ng)%base(i:i)=blank
716 tide(ng)%name(i:i)=blank
718 xtr(ng)%head(i:i)=blank
719 xtr(ng)%base(i:i)=blank
720 xtr(ng)%name(i:i)=blank
722 nrm(1:4,ng)%head(i:i)=blank
723 nrm(1:4,ng)%base(i:i)=blank
724 nrm(1:4,ng)%name(i:i)=blank
726 std(1:5,ng)%head(i:i)=blank
727 std(1:5,ng)%base(i:i)=blank
728 std(1:5,ng)%name(i:i)=blank
759 IF (
allocated(
adm))
deallocate (
adm )
760 IF (
allocated(
ads))
deallocate (
ads )
761 IF (
allocated(
avg))
deallocate (
avg )
762 IF (
allocated(
blk))
deallocate (
blk )
763 IF (
allocated(
bry))
deallocate (
bry )
764 IF (
allocated(
clm))
deallocate (
clm )
765 IF (
allocated(
dai))
deallocate (
dai )
766 IF (
allocated(
dav))
deallocate (
dav )
767 IF (
allocated(
dia))
deallocate (
dia )
768 IF (
allocated(
err))
deallocate (
err )
769 IF (
allocated(
flt))
deallocate (
flt )
770 IF (
allocated(
frc))
deallocate (
frc )
772#ifdef RBL4DVAR_FCT_SENSITIVITY
773 IF (
allocated(
fcta))
deallocate (
fcta )
774 IF (
allocated(
fctb))
deallocate (
fctb )
777#if defined RBL4DVAR_FCT_SENSITIVITY && !defined OBS_SPACE
778 IF (
allocated(foia))
deallocate ( foia )
779 IF (
allocated(foib))
deallocate ( foib )
782 IF (
allocated(
fwd))
deallocate (
fwd )
783 IF (
allocated(
grd))
deallocate (
grd )
784 IF (
allocated(
grx))
deallocate (
grx )
785 IF (
allocated(
gst))
deallocate (
gst )
786 IF (
allocated(
har))
deallocate (
har )
787 IF (
allocated(
his))
deallocate (
his )
788 IF (
allocated(
hss))
deallocate (
hss )
789 IF (
allocated(
iad))
deallocate (
iad )
790 IF (
allocated(
ini))
deallocate (
ini )
791 IF (
allocated(
irp))
deallocate (
irp )
792 IF (
allocated(
itl))
deallocate (
itl )
793 IF (
allocated(
lcz))
deallocate (
lcz )
794 IF (
allocated(
lze))
deallocate (
lze )
795 IF (
allocated(
nud))
deallocate (
nud )
796 IF (
allocated(
obs))
deallocate (
obs )
798#if defined RBL4DVAR_FCT_SENSITIVITY && defined OBS_SPACE
799 IF (
allocated(
oifa))
deallocate (
oifa )
800 IF (
allocated(
oifb))
deallocate (
oifb )
803 IF (
allocated(
qck))
deallocate (
qck )
804 IF (
allocated(
rst))
deallocate (
rst )
807 IF (
allocated(
sca))
deallocate (
sca )
808 IF (
allocated(
sct))
deallocate (
sct )
809 IF (
allocated(
spa))
deallocate (
spa )
810 IF (
allocated(
spt))
deallocate (
spt )
813 IF (
allocated(
ssf))
deallocate (
ssf )
814 IF (
allocated(
sta))
deallocate (
sta )
815 IF (
allocated(
tide))
deallocate (
tide )
816 IF (
allocated(
tlf))
deallocate (
tlf )
817 IF (
allocated(
tlm))
deallocate (
tlm )
818 IF (
allocated(
xtr))
deallocate (
xtr )
820 IF (
allocated(
nrm))
deallocate (
nrm )
821 IF (
allocated(
std))
deallocate (
std )
828#if defined PIO_LIB && defined DISTRIBUTE
832#if defined PIO_LIB && defined DISTRIBUTE
836#if defined PIO_LIB && defined DISTRIBUTE
type(t_io), dimension(:), allocatable ads
character(len=256) aparnam
type(t_io), dimension(:), allocatable lcz
type(t_io), dimension(:), allocatable spa
type(t_io), dimension(:,:), allocatable std
character(len=50), dimension(9) rerror
character(len=256) calledfrom
character(len=256) fbionam
type(t_io), dimension(:), allocatable his
type(t_io), dimension(:), allocatable ssf
type(t_io), dimension(:), allocatable oifa
type(t_io), dimension(:,:), allocatable nrm
type(t_io), dimension(:), allocatable grx
type(t_io), dimension(:), allocatable adm
type(t_io), dimension(:), allocatable spt
type(t_io), dimension(:), allocatable iad
type(t_io), dimension(:), allocatable irp
type(t_io), dimension(:), allocatable fcta
integer, dimension(:,:), allocatable clmids
type(t_io), dimension(:), allocatable flt
type(t_io), dimension(:), allocatable obs
type(t_io), dimension(:), allocatable nud
type(t_io), dimension(:), allocatable sct
type(t_io), dimension(:), allocatable oifb
type(t_io), dimension(:), allocatable tlf
type(t_io), dimension(:), allocatable hss
type(t_io), dimension(:), allocatable xtr
character(len=256) myappcpp
type(t_io), dimension(:), allocatable fctb
integer, dimension(:), allocatable nclmfiles
character(len=256) bparnam
type(t_io), dimension(:), allocatable har
type(t_io), dimension(:), allocatable tlm
type(t_io), dimension(:), allocatable sca
type(t_io), dimension(:), allocatable itl
type(file_desc_t), dimension(:,:), allocatable brydesc
type(t_io), dimension(:), allocatable blk
type(t_io), dimension(:,:), allocatable frc
type(t_io), dimension(:), allocatable lze
character(len=256) ngcname
type(t_io), dimension(:), allocatable dai
integer, dimension(:,:), allocatable bryids
type(t_io), dimension(:), allocatable dav
type(t_io), dimension(:), allocatable tide
type(t_io), dimension(:), allocatable qck
subroutine, public allocate_iounits(ngrids)
type(t_io), dimension(:), allocatable grd
character(len=256) ncfile
type(t_io), dimension(:,:), allocatable bry
type(t_io), dimension(:), allocatable fwd
type(t_io), dimension(:), allocatable rst
integer, dimension(:), allocatable nbcfiles
type(file_desc_t), dimension(:,:), allocatable clmdesc
character(len=256) usrname
type(t_io), dimension(:), allocatable gst
type(t_io), dimension(:), allocatable ini
character(len=256) sparnam
type(t_io), dimension(:,:), allocatable clm
integer, dimension(:,:), allocatable frcids
type(t_io), dimension(:), allocatable avg
type(t_io), dimension(:), allocatable sta
type(t_io), dimension(:), allocatable err
character(len=256) fposnam
type(file_desc_t), dimension(:,:), allocatable frcdesc
character(len=256) varname
character(len=256) sourcefile
type(t_io), dimension(:), allocatable dia
character(len=256) iparnam
character(len=256) sposnam
integer, dimension(:), allocatable nffiles
subroutine, public deallocate_iounits