108 & LBi, UBi, LBj, UBj, LBij, UBij, &
111#if defined PIO_LIB && defined DISTRIBUTE
116 & rmask, umask, vmask, &
118#ifdef ADJUST_BOUNDARY
120 & s_t_obc, s_u_obc, s_v_obc, &
122 & s_ubar_obc, s_vbar_obc, &
141 integer,
intent(in) :: ng, tile, model, iotype
142 integer,
intent(in) :: lbi, ubi, lbj, ubj, lbij, ubij
143 integer,
intent(in) :: lout, rec, nopen
145 integer,
intent(inout) :: ncid
147#if defined PIO_LIB && defined DISTRIBUTE
149 TYPE (file_desc_t),
intent(inout) :: piofile
152 character (len=*),
intent(in) :: ncname
156 real(r8),
intent(in) :: rmask(lbi:,lbj:)
157 real(r8),
intent(in) :: umask(lbi:,lbj:)
158 real(r8),
intent(in) :: vmask(lbi:,lbj:)
160# ifdef ADJUST_BOUNDARY
162 real(r8),
intent(inout) :: s_t_obc(lbij:,:,:,:,:,:)
163 real(r8),
intent(inout) :: s_u_obc(lbij:,:,:,:,:)
164 real(r8),
intent(inout) :: s_v_obc(lbij:,:,:,:,:)
166 real(r8),
intent(inout) :: s_ubar_obc(lbij:,:,:,:)
167 real(r8),
intent(inout) :: s_vbar_obc(lbij:,:,:,:)
168 real(r8),
intent(inout) :: s_zeta_obc(lbij:,:,:,:)
170# ifdef ADJUST_WSTRESS
171 real(r8),
intent(inout) :: s_ustr(lbi:,lbj:,:,:)
172 real(r8),
intent(inout) :: s_vstr(lbi:,lbj:,:,:)
176 real(r8),
intent(inout) :: s_tflux(lbi:,lbj:,:,:,:)
178 real(r8),
intent(inout) :: s_t(lbi:,lbj:,:,:,:)
179 real(r8),
intent(inout) :: s_u(lbi:,lbj:,:,:)
180 real(r8),
intent(inout) :: s_v(lbi:,lbj:,:,:)
182 real(r8),
intent(inout) :: s_ubar(lbi:,lbj:,:)
183 real(r8),
intent(inout) :: s_vbar(lbi:,lbj:,:)
185 real(r8),
intent(inout) :: s_zeta(lbi:,lbj:,:)
190 real(r8),
intent(in) :: rmask(lbi:ubi,lbj:ubj)
191 real(r8),
intent(in) :: umask(lbi:ubi,lbj:ubj)
192 real(r8),
intent(in) :: vmask(lbi:ubi,lbj:ubj)
194# ifdef ADJUST_BOUNDARY
196 real(r8),
intent(inout) :: s_t_obc(lbij:ubij,
n(ng),4, &
197 & Nbrec(ng),2,NT(ng))
198 real(r8),
intent(inout) :: s_u_obc(lbij:ubij,
n(ng),4,
nbrec(ng),2)
199 real(r8),
intent(inout) :: s_v_obc(lbij:ubij,
n(ng),4,
nbrec(ng),2)
201 real(r8),
intent(inout) :: s_ubar_obc(lbij:ubij,4,
nbrec(ng),2)
202 real(r8),
intent(inout) :: s_vbar_obc(lbij:ubij,4,
nbrec(ng),2)
203 real(r8),
intent(inout) :: s_zeta_obc(lbij:ubij,4,
nbrec(ng),2)
205# ifdef ADJUST_WSTRESS
206 real(r8),
intent(inout) :: s_ustr(lbi:ubi,lbj:ubj,
nfrec(ng),2)
207 real(r8),
intent(inout) :: s_vstr(lbi:ubi,lbj:ubj,
nfrec(ng),2)
211 real(r8),
intent(inout) :: s_tflux(lbi:ubi,lbj:ubj, &
212 & Nfrec(ng),2,NT(ng))
214 real(r8),
intent(inout) :: s_t(lbi:ubi,lbj:ubj,
n(ng),3,
nt(ng))
215 real(r8),
intent(inout) :: s_u(lbi:ubi,lbj:ubj,
n(ng),2)
216 real(r8),
intent(inout) :: s_v(lbi:ubi,lbj:ubj,
n(ng),2)
218 real(r8),
intent(inout) :: s_ubar(lbi:ubi,lbj:ubj,:)
219 real(r8),
intent(inout) :: s_vbar(lbi:ubi,lbj:ubj,:)
221 real(r8),
intent(inout) :: s_zeta(lbi:ubi,lbj:ubj,:)
226 logical :: lreport = .false.
228 character (len=*),
parameter :: myfile = &
240 & lbi, ubi, lbj, ubj, lbij, ubij, &
242 & nopen, ncid, ncname, &
244 & rmask, umask, vmask, &
246#ifdef ADJUST_BOUNDARY
248 & s_t_obc, s_u_obc, s_v_obc, &
250 & s_ubar_obc, s_vbar_obc, &
266#if defined PIO_LIB && defined DISTRIBUTE
269 & lbi, ubi, lbj, ubj, lbij, ubij, &
271 & nopen, piofile, ncname, &
273 & rmask, umask, vmask, &
275# ifdef ADJUST_BOUNDARY
277 & s_t_obc, s_u_obc, s_v_obc, &
279 & s_ubar_obc, s_vbar_obc, &
282# ifdef ADJUST_WSTRESS
301 10
FORMAT (
' STATE_READ - Illegal inpput file type, io_type = ',i0, &
302 & /,14x,
'Check KeyWord ''INP_LIB'' in ''roms.in''.')
309 & LBi, UBi, LBj, UBj, LBij, UBij, &
311 & nopen, ncid, ncname, &
313 & rmask, umask, vmask, &
315#ifdef ADJUST_BOUNDARY
317 & s_t_obc, s_u_obc, s_v_obc, &
319 & s_ubar_obc, s_vbar_obc, &
340 logical,
intent(in) :: lreport
342 integer,
intent(in) :: ng, tile, model
343 integer,
intent(in) :: lbi, ubi, lbj, ubj, lbij, ubij
344 integer,
intent(in) :: lout, rec, nopen
346 integer,
intent(inout) :: ncid
348 character (len=*),
intent(in) :: ncname
352 real(r8),
intent(in) :: rmask(lbi:,lbj:)
353 real(r8),
intent(in) :: umask(lbi:,lbj:)
354 real(r8),
intent(in) :: vmask(lbi:,lbj:)
356# ifdef ADJUST_BOUNDARY
358 real(r8),
intent(inout) :: s_t_obc(lbij:,:,:,:,:,:)
359 real(r8),
intent(inout) :: s_u_obc(lbij:,:,:,:,:)
360 real(r8),
intent(inout) :: s_v_obc(lbij:,:,:,:,:)
362 real(r8),
intent(inout) :: s_ubar_obc(lbij:,:,:,:)
363 real(r8),
intent(inout) :: s_vbar_obc(lbij:,:,:,:)
364 real(r8),
intent(inout) :: s_zeta_obc(lbij:,:,:,:)
366# ifdef ADJUST_WSTRESS
367 real(r8),
intent(inout) :: s_ustr(lbi:,lbj:,:,:)
368 real(r8),
intent(inout) :: s_vstr(lbi:,lbj:,:,:)
372 real(r8),
intent(inout) :: s_tflux(lbi:,lbj:,:,:,:)
374 real(r8),
intent(inout) :: s_t(lbi:,lbj:,:,:,:)
375 real(r8),
intent(inout) :: s_u(lbi:,lbj:,:,:)
376 real(r8),
intent(inout) :: s_v(lbi:,lbj:,:,:)
378 real(r8),
intent(inout) :: s_ubar(lbi:,lbj:,:)
379 real(r8),
intent(inout) :: s_vbar(lbi:,lbj:,:)
381 real(r8),
intent(inout) :: s_zeta(lbi:,lbj:,:)
386 real(r8),
intent(in) :: rmask(lbi:ubi,lbj:ubj)
387 real(r8),
intent(in) :: umask(lbi:ubi,lbj:ubj)
388 real(r8),
intent(in) :: vmask(lbi:ubi,lbj:ubj)
390# ifdef ADJUST_BOUNDARY
392 real(r8),
intent(inout) :: s_t_obc(lbij:ubij,
n(ng),4, &
393 & Nbrec(ng),2,NT(ng))
394 real(r8),
intent(inout) :: s_u_obc(lbij:ubij,
n(ng),4,
nbrec(ng),2)
395 real(r8),
intent(inout) :: s_v_obc(lbij:ubij,
n(ng),4,
nbrec(ng),2)
397 real(r8),
intent(inout) :: s_ubar_obc(lbij:ubij,4,
nbrec(ng),2)
398 real(r8),
intent(inout) :: s_vbar_obc(lbij:ubij,4,
nbrec(ng),2)
399 real(r8),
intent(inout) :: s_zeta_obc(lbij:ubij,4,
nbrec(ng),2)
401# ifdef ADJUST_WSTRESS
402 real(r8),
intent(inout) :: s_ustr(lbi:ubi,lbj:ubj,
nfrec(ng),2)
403 real(r8),
intent(inout) :: s_vstr(lbi:ubi,lbj:ubj,
nfrec(ng),2)
407 real(r8),
intent(inout) :: s_tflux(lbi:ubi,lbj:ubj, &
408 & Nfrec(ng),2,NT(ng))
410 real(r8),
intent(inout) :: s_t(lbi:ubi,lbj:ubj,
n(ng),3,
nt(ng))
411 real(r8),
intent(inout) :: s_u(lbi:ubi,lbj:ubj,
n(ng),2)
412 real(r8),
intent(inout) :: s_v(lbi:ubi,lbj:ubj,
n(ng),2)
414 real(r8),
intent(inout) :: s_ubar(lbi:ubi,lbj:ubj,:)
415 real(r8),
intent(inout) :: s_vbar(lbi:ubi,lbj:ubj,:)
417 real(r8),
intent(inout) :: s_zeta(lbi:ubi,lbj:ubj,:)
422 integer :: sstr, send
424 integer :: ifield, itrc
425 integer :: gtype, my_ncid, status, varid
427 integer,
dimension(4) :: vsize
429 real(r8) :: fmin, fmax
430 real(dp) :: stime, scale
432 character (len=15) :: tstring
433 character (len=22) :: t_code
435 character (len=*),
parameter :: myfile = &
436 & __FILE__//
", state_read_nf90"
438#include "set_bounds.h"
450 CALL wclock_on (ng, model, 80, __line__, myfile)
455 IF ((nopen.gt.0).or.(ncid.eq.-1))
THEN
481 &
rclock%DateNumber, stime, &
482 & my_ncid, (/rec/), (/1/))
491 WRITE (tstring,
'(f15.4)') stime*
sec2day
492 WRITE (
stdout,10)
'Reading state fields,', t_code, &
493 & ng, tstring, trim(ncname), rec, lout, &
505 status=
nf_fread2d(ng, model, ncname, my_ncid, &
507 & rec, gtype, vsize, &
508 & lbi, ubi, lbj, ubj, &
509 & scale, fmin, fmax, &
514 IF (
founderror(status, nf90_noerr, __line__, myfile))
THEN
522 IF (
master.and.lreport)
THEN
527#ifdef ADJUST_BOUNDARY
540 &
vname(1,ifield), varid, &
542 & lbij, ubij,
nbrec(ng), &
543 & scale, fmin, fmax, &
544 & s_zeta_obc(:,:,:,lout))
545 IF (
founderror(status, nf90_noerr, __line__, myfile))
THEN
547 WRITE (
stdout,30) trim(
vname(1,ifield)), rec, trim(ncname)
553 IF (
master.and.lreport)
THEN
554 WRITE (
stdout,40) trim(
vname(2,ifield)), fmin, fmax
570 status=
nf_fread2d(ng, model, ncname, my_ncid, &
572 & rec, gtype, vsize, &
573 & lbi, ubi, lbj, ubj, &
574 & scale, fmin, fmax, &
579 IF (
founderror(status, nf90_noerr, __line__, myfile))
THEN
587 IF (
master.and.lreport)
THEN
600 status=
nf_fread2d(ng, model, ncname, my_ncid, &
602 & rec, gtype, vsize, &
603 & lbi, ubi, lbj, ubj, &
604 & scale, fmin, fmax, &
609 IF (
founderror(status, nf90_noerr, __line__, myfile))
THEN
617 IF (
master.and.lreport)
THEN
623#ifdef ADJUST_BOUNDARY
636 &
vname(1,ifield), varid, &
638 & lbij, ubij,
nbrec(ng), &
639 & scale, fmin, fmax, &
640 & s_ubar_obc(:,:,:,lout))
641 IF (
founderror(status, nf90_noerr, __line__, myfile))
THEN
643 WRITE (
stdout,30) trim(
vname(1,ifield)), rec, trim(ncname)
649 IF (
master.and.lreport)
THEN
650 WRITE (
stdout,40) trim(
vname(2,ifield)), fmin, fmax
666 &
vname(1,ifield), varid, &
668 & lbij, ubij,
nbrec(ng), &
669 & scale, fmin, fmax, &
670 & s_vbar_obc(:,:,:,lout))
671 IF (
founderror(status, nf90_noerr, __line__, myfile))
THEN
673 WRITE (
stdout,30) trim(
vname(1,ifield)), rec, trim(ncname)
679 IF (
master.and.lreport)
THEN
680 WRITE (
stdout,40) trim(
vname(2,ifield)), fmin, fmax
696 status=
nf_fread3d(ng, model, ncname, my_ncid, &
698 & rec, gtype, vsize, &
699 & lbi, ubi, lbj, ubj, 1,
nfrec(ng), &
700 & scale, fmin, fmax, &
704 & s_ustr(:,:,:,lout))
705 IF (
founderror(status, nf90_noerr, __line__, myfile))
THEN
713 IF (
master.and.lreport)
THEN
724 status=
nf_fread3d(ng, model, ncname, my_ncid, &
726 & rec, gtype, vsize, &
727 & lbi, ubi, lbj, ubj, 1,
nfrec(ng), &
728 & scale, fmin, fmax, &
732 & s_vstr(:,:,:,lout))
733 IF (
founderror(status, nf90_noerr, __line__, myfile))
THEN
741 IF (
master.and.lreport)
THEN
757 status=
nf_fread3d(ng, model, ncname, my_ncid, &
759 & rec, gtype, vsize, &
760 & lbi, ubi, lbj, ubj, 1,
n(ng), &
761 & scale, fmin, fmax, &
766 IF (
founderror(status, nf90_noerr, __line__, myfile))
THEN
774 IF (
master.and.lreport)
THEN
779# ifdef ADJUST_BOUNDARY
792 &
vname(1,ifield), varid, &
794 & lbij, ubij, 1,
n(ng),
nbrec(ng), &
795 & scale, fmin, fmax, &
796 & s_u_obc(:,:,:,:,lout))
797 IF (
founderror(status, nf90_noerr, __line__, myfile))
THEN
799 WRITE (
stdout,30) trim(
vname(1,ifield)), rec, trim(ncname)
805 IF (
master.and.lreport)
THEN
806 WRITE (
stdout,40) trim(
vname(1,ifield)), fmin, fmax
820 status=
nf_fread3d(ng, model, ncname, my_ncid, &
822 & rec, gtype, vsize, &
823 & lbi, ubi, lbj, ubj, 1,
n(ng), &
824 & scale, fmin, fmax, &
829 IF (
founderror(status, nf90_noerr, __line__, myfile))
THEN
837 IF (
master.and.lreport)
THEN
842# ifdef ADJUST_BOUNDARY
855 &
vname(1,ifield), varid, &
857 & lbij, ubij, 1,
n(ng),
nbrec(ng), &
858 & scale, fmin, fmax, &
859 & s_v_obc(:,:,:,:,lout))
860 IF (
founderror(status, nf90_noerr, __line__, myfile))
THEN
862 WRITE (
stdout,30) trim(
vname(1,ifield)), rec, trim(ncname)
868 IF (
master.and.lreport)
THEN
869 WRITE (
stdout,40) trim(
vname(2,ifield)), fmin, fmax
884 status=
nf_fread3d(ng, model, ncname, my_ncid, &
886 & rec, gtype, vsize, &
887 & lbi, ubi, lbj, ubj, 1,
n(ng), &
888 & scale, fmin, fmax, &
892 & s_t(:,:,:,lout,itrc))
893 IF (
founderror(status, nf90_noerr, __line__, myfile))
THEN
902 IF (
master.and.lreport)
THEN
908# ifdef ADJUST_BOUNDARY
922 &
vname(1,ifield), varid, &
924 & lbij, ubij, 1,
n(ng),
nbrec(ng), &
925 & scale, fmin, fmax, &
926 & s_t_obc(:,:,:,:,lout,itrc))
927 IF (
founderror(status, nf90_noerr, __line__, myfile))
THEN
929 WRITE (
stdout,30) trim(
vname(1,ifield)), rec, trim(ncname)
935 IF (
master.and.lreport)
THEN
936 WRITE (
stdout,40) trim(
vname(2,ifield)), fmin, fmax
955 status=
nf_fread3d(ng, model, ncname, my_ncid, &
957 & rec, gtype, vsize, &
958 & lbi, ubi, lbj, ubj, 1,
nfrec(ng), &
959 & scale, fmin, fmax, &
963 & s_tflux(:,:,:,lout,itrc))
964 IF (
founderror(status, nf90_noerr, __line__, myfile))
THEN
973 IF (
master.and.lreport)
THEN
974 WRITE (
stdout,40) trim(
vname(2,ifield)), fmin, fmax
993 CALL wclock_off (ng, model, 80, __line__, myfile)
996 10
FORMAT (
'STATE_READ_NF90 - ',a,t75,a, &
997 & /,19x,
'(Grid ',i2.2,
', t = ',a,
', File: ',a, &
998 &
', Rec=',i4.4,
', Index=',i1,
')', &
999 & /,19x,
'Called from ''',a,
'''')
1000 20
FORMAT (
' STATE_READ_NF90 - unable to open NetCDF file: ',a)
1001 30
FORMAT (
' STATE_READ_NF90 - error while reading variable: ',a,2x, &
1002 &
'at time record = ',i3,/,14x,
'in NetCDF file: ',a)
1003 40
FORMAT (16x,
'- ',a,/,19x,
'(Min = ',1p,e15.8, &
1004 &
' Max = ',1p,e15.8,
')')
1013 & LBi, UBi, LBj, UBj, LBij, UBij, &
1015 & nopen, pioFile, ncname, &
1017 & rmask, umask, vmask, &
1019# ifdef ADJUST_BOUNDARY
1021 & s_t_obc, s_u_obc, s_v_obc, &
1023 & s_ubar_obc, s_vbar_obc, &
1026# ifdef ADJUST_WSTRESS
1030# ifdef ADJUST_STFLUX
1044 logical,
intent(in) :: lreport
1046 integer,
intent(in) :: ng, tile, model
1047 integer,
intent(in) :: lbi, ubi, lbj, ubj, lbij, ubij
1048 integer,
intent(in) :: lout, rec, nopen
1050 TYPE (file_desc_t),
intent(inout) :: piofile
1052 character (len=*),
intent(in) :: ncname
1054# ifdef ASSUMED_SHAPE
1056 real(r8),
intent(in) :: rmask(lbi:,lbj:)
1057 real(r8),
intent(in) :: umask(lbi:,lbj:)
1058 real(r8),
intent(in) :: vmask(lbi:,lbj:)
1060# ifdef ADJUST_BOUNDARY
1062 real(r8),
intent(inout) :: s_t_obc(lbij:,:,:,:,:,:)
1063 real(r8),
intent(inout) :: s_u_obc(lbij:,:,:,:,:)
1064 real(r8),
intent(inout) :: s_v_obc(lbij:,:,:,:,:)
1066 real(r8),
intent(inout) :: s_ubar_obc(lbij:,:,:,:)
1067 real(r8),
intent(inout) :: s_vbar_obc(lbij:,:,:,:)
1068 real(r8),
intent(inout) :: s_zeta_obc(lbij:,:,:,:)
1070# ifdef ADJUST_WSTRESS
1071 real(r8),
intent(inout) :: s_ustr(lbi:,lbj:,:,:)
1072 real(r8),
intent(inout) :: s_vstr(lbi:,lbj:,:,:)
1075# ifdef ADJUST_STFLUX
1076 real(r8),
intent(inout) :: s_tflux(lbi:,lbj:,:,:,:)
1078 real(r8),
intent(inout) :: s_t(lbi:,lbj:,:,:,:)
1079 real(r8),
intent(inout) :: s_u(lbi:,lbj:,:,:)
1080 real(r8),
intent(inout) :: s_v(lbi:,lbj:,:,:)
1082 real(r8),
intent(inout) :: s_ubar(lbi:,lbj:,:)
1083 real(r8),
intent(inout) :: s_vbar(lbi:,lbj:,:)
1085 real(r8),
intent(inout) :: s_zeta(lbi:,lbj:,:)
1090 real(r8),
intent(in) :: rmask(lbi:ubi,lbj:ubj)
1091 real(r8),
intent(in) :: umask(lbi:ubi,lbj:ubj)
1092 real(r8),
intent(in) :: vmask(lbi:ubi,lbj:ubj)
1094# ifdef ADJUST_BOUNDARY
1096 real(r8),
intent(inout) :: s_t_obc(lbij:ubij,
n(ng),4, &
1097 & Nbrec(ng),2,NT(ng))
1098 real(r8),
intent(inout) :: s_u_obc(lbij:ubij,
n(ng),4,
nbrec(ng),2)
1099 real(r8),
intent(inout) :: s_v_obc(lbij:ubij,
n(ng),4,
nbrec(ng),2)
1101 real(r8),
intent(inout) :: s_ubar_obc(lbij:ubij,4,
nbrec(ng),2)
1102 real(r8),
intent(inout) :: s_vbar_obc(lbij:ubij,4,
nbrec(ng),2)
1103 real(r8),
intent(inout) :: s_zeta_obc(lbij:ubij,4,
nbrec(ng),2)
1105# ifdef ADJUST_WSTRESS
1106 real(r8),
intent(inout) :: s_ustr(lbi:ubi,lbj:ubj,
nfrec(ng),2)
1107 real(r8),
intent(inout) :: s_vstr(lbi:ubi,lbj:ubj,
nfrec(ng),2)
1110# ifdef ADJUST_STFLUX
1111 real(r8),
intent(inout) :: s_tflux(lbi:ubi,lbj:ubj, &
1112 & Nfrec(ng),2,NT(ng))
1114 real(r8),
intent(inout) :: s_t(lbi:ubi,lbj:ubj,
n(ng),3,
nt(ng))
1115 real(r8),
intent(inout) :: s_u(lbi:ubi,lbj:ubj,
n(ng),2)
1116 real(r8),
intent(inout) :: s_v(lbi:ubi,lbj:ubj,
n(ng),2)
1118 real(r8),
intent(inout) :: s_ubar(lbi:ubi,lbj:ubj,:)
1119 real(r8),
intent(inout) :: s_vbar(lbi:ubi,lbj:ubj,:)
1121 real(r8),
intent(inout) :: s_zeta(lbi:ubi,lbj:ubj,:)
1126 integer :: sstr, send
1128 integer :: ifield, itrc
1131 integer,
dimension(4) :: vsize
1133 real(r8) :: fmin, fmax
1134 real(dp) :: stime, scale
1136 character (len=15) :: tstring
1137 character (len=22) :: t_code
1139 character (len=*),
parameter :: myfile = &
1140 & __FILE__//
", state_read_pio"
1142 TYPE (io_desc_t),
pointer :: my_iodesc
1143 TYPE (file_desc_t) :: my_piofile
1146# include "set_bounds.h"
1158 CALL wclock_on (ng, model, 80, __line__, myfile)
1163 IF ((nopen.gt.0).or.(piofile%fh.eq.-1))
THEN
1189 &
rclock%DateNumber, stime, &
1190 & my_piofile, (/rec/), (/1/))
1199 WRITE (tstring,
'(f15.4)') stime*
sec2day
1200 WRITE (
stdout,10)
'Reading state fields,', t_code, &
1201 & ng, tstring, trim(ncname), rec, lout, &
1209 & my_piofile, my_piovar%vd)
1213 IF (kind(s_zeta).eq.8)
THEN
1214 my_piovar%dkind=pio_double
1217 my_piovar%dkind=pio_real
1221 status=
nf_fread2d(ng, model, ncname, my_piofile, &
1223 & rec, my_iodesc, vsize, &
1224 & lbi, ubi, lbj, ubj, &
1225 & scale, fmin, fmax, &
1230 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
1238 IF (
master.and.lreport)
THEN
1243# ifdef ADJUST_BOUNDARY
1251 & my_piofile, my_piovar%vd)
1255 IF (kind(s_zeta_obc).eq.8)
THEN
1256 my_piovar%dkind=pio_double
1259 my_piovar%dkind=pio_real
1264 &
vname(1,ifield), my_piovar, &
1266 & lbij, ubij,
nbrec(ng), &
1267 & scale, fmin, fmax, &
1268 & s_zeta_obc(:,:,:,lout))
1269 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
1271 WRITE (
stdout,30) trim(
vname(1,ifield)), rec, trim(ncname)
1277 IF (
master.and.lreport)
THEN
1278 WRITE (
stdout,40) trim(
vname(2,ifield)), fmin, fmax
1290 & my_piofile, my_piovar%vd)
1294 IF (kind(s_ubar).eq.8)
THEN
1295 my_piovar%dkind=pio_double
1298 my_piovar%dkind=pio_real
1302 status=
nf_fread2d(ng, model, ncname, my_piofile, &
1304 & rec, my_iodesc, vsize, &
1305 & lbi, ubi, lbj, ubj, &
1306 & scale, fmin, fmax, &
1311 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
1319 IF (
master.and.lreport)
THEN
1328 & my_piofile, my_piovar%vd)
1332 IF (kind(s_vbar).eq.8)
THEN
1333 my_piovar%dkind=pio_double
1336 my_piovar%dkind=pio_real
1340 status=
nf_fread2d(ng, model, ncname, my_piofile, &
1342 & rec, my_iodesc, vsize, &
1343 & lbi, ubi, lbj, ubj, &
1344 & scale, fmin, fmax, &
1349 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
1357 IF (
master.and.lreport)
THEN
1363# ifdef ADJUST_BOUNDARY
1371 & my_piofile, my_piovar%vd)
1375 IF (kind(s_ubar_obc).eq.8)
THEN
1376 my_piovar%dkind=pio_double
1379 my_piovar%dkind=pio_real
1384 &
vname(1,ifield), my_piovar, &
1386 & lbij, ubij,
nbrec(ng), &
1387 & scale, fmin, fmax, &
1388 & s_ubar_obc(:,:,:,lout))
1389 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
1391 WRITE (
stdout,30) trim(
vname(1,ifield)), rec, trim(ncname)
1397 IF (
master.and.lreport)
THEN
1398 WRITE (
stdout,40) trim(
vname(2,ifield)), fmin, fmax
1409 & my_piofile, my_piovar%vd)
1413 IF (kind(s_vbar_obc).eq.8)
THEN
1414 my_piovar%dkind=pio_double
1417 my_piovar%dkind=pio_real
1422 &
vname(1,ifield), my_piovar, &
1424 & lbij, ubij,
nbrec(ng), &
1425 & scale, fmin, fmax, &
1426 & s_vbar_obc(:,:,:,lout))
1427 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
1429 WRITE (
stdout,30) trim(
vname(1,ifield)), rec, trim(ncname)
1435 IF (
master.and.lreport)
THEN
1436 WRITE (
stdout,40) trim(
vname(2,ifield)), fmin, fmax
1442# ifdef ADJUST_WSTRESS
1448 & my_piofile, my_piovar%vd)
1452 IF (kind(s_ustr).eq.8)
THEN
1453 my_piovar%dkind=pio_double
1456 my_piovar%dkind=pio_real
1460 status=
nf_fread3d(ng, model, ncname, my_piofile, &
1462 & rec, my_iodesc, vsize, &
1463 & lbi, ubi, lbj, ubj, 1,
nfrec(ng), &
1464 & scale, fmin, fmax, &
1468 & s_ustr(:,:,:,lout))
1469 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
1477 IF (
master.and.lreport)
THEN
1484 & my_piofile, my_piovar%vd)
1488 IF (kind(s_vstr).eq.8)
THEN
1489 my_piovar%dkind=pio_double
1492 my_piovar%dkind=pio_real
1496 status=
nf_fread3d(ng, model, ncname, my_piofile, &
1498 & rec, my_iodesc, vsize, &
1499 & lbi, ubi, lbj, ubj, 1,
nfrec(ng), &
1500 & scale, fmin, fmax, &
1504 & s_vstr(:,:,:,lout))
1505 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
1513 IF (
master.and.lreport)
THEN
1525 & my_piofile, my_piovar%vd)
1529 IF (kind(s_u).eq.8)
THEN
1530 my_piovar%dkind=pio_double
1533 my_piovar%dkind=pio_real
1537 status=
nf_fread3d(ng, model, ncname, my_piofile, &
1539 & rec, my_iodesc, vsize, &
1540 & lbi, ubi, lbj, ubj, 1,
n(ng), &
1541 & scale, fmin, fmax, &
1546 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
1554 IF (
master.and.lreport)
THEN
1559# ifdef ADJUST_BOUNDARY
1567 & my_piofile, my_piovar%vd)
1571 IF (kind(s_u_obc).eq.8)
THEN
1572 my_piovar%dkind=pio_double
1575 my_piovar%dkind=pio_real
1580 &
vname(1,ifield), my_piovar, &
1582 & lbij, ubij, 1,
n(ng),
nbrec(ng), &
1583 & scale, fmin, fmax, &
1584 & s_u_obc(:,:,:,:,lout))
1585 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
1587 WRITE (
stdout,30) trim(
vname(1,ifield)), rec, trim(ncname)
1593 IF (
master.and.lreport)
THEN
1594 WRITE (
stdout,40) trim(
vname(1,ifield)), fmin, fmax
1604 & my_piofile, my_piovar%vd)
1608 IF (kind(s_v).eq.8)
THEN
1609 my_piovar%dkind=pio_double
1612 my_piovar%dkind=pio_real
1616 status=
nf_fread3d(ng, model, ncname, my_piofile, &
1618 & rec, my_iodesc, vsize, &
1619 & lbi, ubi, lbj, ubj, 1,
n(ng), &
1620 & scale, fmin, fmax, &
1625 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
1633 IF (
master.and.lreport)
THEN
1638# ifdef ADJUST_BOUNDARY
1646 & my_piofile, my_piovar%vd)
1650 IF (kind(s_v_obc).eq.8)
THEN
1651 my_piovar%dkind=pio_double
1654 my_piovar%dkind=pio_real
1659 &
vname(1,ifield), my_piovar, &
1661 & lbij, ubij, 1,
n(ng),
nbrec(ng), &
1662 & scale, fmin, fmax, &
1663 & s_v_obc(:,:,:,:,lout))
1664 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
1666 WRITE (
stdout,30) trim(
vname(1,ifield)), rec, trim(ncname)
1672 IF (
master.and.lreport)
THEN
1673 WRITE (
stdout,40) trim(
vname(2,ifield)), fmin, fmax
1685 & my_piofile, my_piovar%vd)
1689 IF (kind(s_t).eq.8)
THEN
1690 my_piovar%dkind=pio_double
1693 my_piovar%dkind=pio_real
1697 status=
nf_fread3d(ng, model, ncname, my_piofile, &
1699 & rec, my_iodesc, vsize, &
1700 & lbi, ubi, lbj, ubj, 1,
n(ng), &
1701 & scale, fmin, fmax, &
1705 & s_t(:,:,:,lout,itrc))
1706 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
1715 IF (
master.and.lreport)
THEN
1716 WRITE (
stdout,40) trim(
vname(2,ifield)), fmin, fmax
1721# ifdef ADJUST_BOUNDARY
1730 &
vname(1,ifield), &
1731 & my_piofile, my_piovar%vd)
1735 IF (kind(s_t_obc).eq.8)
THEN
1736 my_piovar%dkind=pio_double
1739 my_piovar%dkind=pio_real
1744 &
vname(1,ifield), my_piovar, &
1746 & lbij, ubij, 1,
n(ng),
nbrec(ng), &
1747 & scale, fmin, fmax, &
1748 & s_t_obc(:,:,:,:,lout,itrc))
1749 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
1751 WRITE (
stdout,30) trim(
vname(1,ifield)), rec, trim(ncname)
1757 IF (
master.and.lreport)
THEN
1758 WRITE (
stdout,40) trim(
vname(2,ifield)), fmin, fmax
1765# ifdef ADJUST_STFLUX
1774 & my_piofile, my_piovar%vd)
1778 IF (kind(s_tflux).eq.8)
THEN
1779 my_piovar%dkind=pio_double
1782 my_piovar%dkind=pio_real
1786 status=
nf_fread3d(ng, model, ncname, my_piofile, &
1788 & rec, my_iodesc, vsize, &
1789 & lbi, ubi, lbj, ubj, 1,
nfrec(ng), &
1790 & scale, fmin, fmax, &
1794 & s_tflux(:,:,:,lout,itrc))
1795 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
1804 IF (
master.and.lreport)
THEN
1805 WRITE (
stdout,40) trim(
vname(2,ifield)), fmin, fmax
1815 IF (nopen.gt.0)
THEN
1824 CALL wclock_off (ng, model, 80, __line__, myfile)
1827 10
FORMAT (
'STATE_READ_PIO - ',a,t75,a, &
1828 & /,19x,
'(Grid ',i2.2,
', t = ',a,
', File: ',a, &
1829 &
', Rec=',i4.4,
', Index=',i1,
')', &
1830 & /,19x,
'Called from ''',a,
'''')
1831 20
FORMAT (
' STATE_READ_PIO - unable to open NetCDF file: ',a)
1832 30
FORMAT (
' STATE_READ_PIO - error while reading variable: ',a,2x, &
1833 &
'at time record = ',i3,/,14x,
'in NetCDF file: ',a)
1834 40
FORMAT (16x,
'- ',a,/,19x,
'(Min = ',1p,e15.8, &
1835 &
' Max = ',1p,e15.8,
')')