3#if defined PIO_LIB && defined DISTRIBUTE
46# ifdef SINGLE_PRECISION
53# ifdef SINGLE_PRECISION
95# ifdef SINGLE_PRECISION
154#ifdef CHECK_OPEN_FILES
186 TYPE (iosystem_desc_t),
allocatable,
target ::
piosystem(:,:)
197# if defined SSH_TIDES || defined UV_TIDES
204# if defined DIAGNOSTICS_BIO && defined ECOSIM
214# ifdef ADJUST_BOUNDARY
227# ifdef ADJUST_WSTRESS
236# if defined SSH_TIDES || defined UV_TIDES
243# if defined DIAGNOSTICS_BIO && defined ECOSIM
253# ifdef ADJUST_BOUNDARY
266# ifdef ADJUST_WSTRESS
278 TYPE (io_desc_t),
pointer :: iodesx_sp_p2dvar(:)
279 TYPE (io_desc_t),
pointer :: iodesx_sp_r2dvar(:)
280 TYPE (io_desc_t),
pointer :: iodesx_sp_u2dvar(:)
281 TYPE (io_desc_t),
pointer :: iodesx_sp_v2dvar(:)
282# if defined SSH_TIDES || defined UV_TIDES
283 TYPE (io_desc_t),
pointer :: iodesx_sp_rtides(:)
287 TYPE (io_desc_t),
pointer :: iodesx_sp_b3dvar(:)
289# if defined DIAGNOSTICS_BIO && defined ECOSIM
290 TYPE (io_desc_t),
pointer :: iodesx_sp_l3dvar(:)
291 TYPE (io_desc_t),
pointer :: iodesx_sp_l4dvar(:)
293 TYPE (io_desc_t),
pointer :: iodesx_sp_p3dvar(:)
294 TYPE (io_desc_t),
pointer :: iodesx_sp_r3dvar(:)
295 TYPE (io_desc_t),
pointer :: iodesx_sp_u3dvar(:)
296 TYPE (io_desc_t),
pointer :: iodesx_sp_v3dvar(:)
297 TYPE (io_desc_t),
pointer :: iodesx_sp_w3dvar(:)
299# ifdef ADJUST_BOUNDARY
300 TYPE (io_desc_t),
pointer :: iodesx_sp_r2dobc(:)
301 TYPE (io_desc_t),
pointer :: iodesx_sp_u2dobc(:)
302 TYPE (io_desc_t),
pointer :: iodesx_sp_v2dobc(:)
304 TYPE (io_desc_t),
pointer :: iodesx_sp_r3dobc(:)
305 TYPE (io_desc_t),
pointer :: iodesx_sp_u3dobc(:)
306 TYPE (io_desc_t),
pointer :: iodesx_sp_v3dobc(:)
310 TYPE (io_desc_t),
pointer :: iodesx_sp_r2dfrc(:)
312# ifdef ADJUST_WSTRESS
313 TYPE (io_desc_t),
pointer :: iodesx_sp_u2dfrc(:)
314 TYPE (io_desc_t),
pointer :: iodesx_sp_v2dfrc(:)
317 TYPE (io_desc_t),
pointer :: iodesx_dp_p2dvar(:)
318 TYPE (io_desc_t),
pointer :: iodesx_dp_r2dvar(:)
319 TYPE (io_desc_t),
pointer :: iodesx_dp_u2dvar(:)
320 TYPE (io_desc_t),
pointer :: iodesx_dp_v2dvar(:)
321# if defined SSH_TIDES || defined UV_TIDES
322 TYPE (io_desc_t),
pointer :: iodesx_dp_rtides(:)
326 TYPE (io_desc_t),
pointer :: iodesx_dp_b3dvar(:)
328# if defined DIAGNOSTICS_BIO && defined ECOSIM
329 TYPE (io_desc_t),
pointer :: iodesx_dp_l3dvar(:)
330 TYPE (io_desc_t),
pointer :: iodesx_dp_l4dvar(:)
332 TYPE (io_desc_t),
pointer :: iodesx_dp_p3dvar(:)
333 TYPE (io_desc_t),
pointer :: iodesx_dp_r3dvar(:)
334 TYPE (io_desc_t),
pointer :: iodesx_dp_u3dvar(:)
335 TYPE (io_desc_t),
pointer :: iodesx_dp_v3dvar(:)
336 TYPE (io_desc_t),
pointer :: iodesx_dp_w3dvar(:)
338# ifdef ADJUST_BOUNDARY
339 TYPE (io_desc_t),
pointer :: iodesx_dp_r2dobc(:)
340 TYPE (io_desc_t),
pointer :: iodesx_dp_u2dobc(:)
341 TYPE (io_desc_t),
pointer :: iodesx_dp_v2dobc(:)
343 TYPE (io_desc_t),
pointer :: iodesx_dp_r3dobc(:)
344 TYPE (io_desc_t),
pointer :: iodesx_dp_u3dobc(:)
345 TYPE (io_desc_t),
pointer :: iodesx_dp_v3dobc(:)
349 TYPE (io_desc_t),
pointer :: iodesx_dp_r2dfrc(:)
351# ifdef ADJUST_WSTRESS
352 TYPE (io_desc_t),
pointer :: iodesx_dp_u2dfrc(:)
353 TYPE (io_desc_t),
pointer :: iodesx_dp_v2dfrc(:)
370# if defined GLS_MIXING || defined MY25_MIXING
387# if defined GLS_MIXING || defined MY25_MIXING
395# if defined AVERAGES && defined AVERAGES_DETIDE && \
396 (defined ssh_tides || defined uv_tides)
420#if defined PROPAGATOR && defined CHECKPOINTING
571 integer,
parameter ::
pio_fout = pio_real
576 integer,
parameter ::
pio_frst = pio_double
578# ifdef DOUBLE_PRECISION
581 integer,
parameter ::
pio_type = pio_real
593 & inp_ncname, inp_pioFile, &
595 & out_ncname, out_pioFile, &
625 integer,
intent(in) :: ng, model
626 integer,
intent(in) :: inp_VarID, out_VarID
628 character (len=*),
intent(in) :: VarName, AttName
629 character (len=*),
intent(in) :: inp_ncname, out_ncname
631 TYPE (File_desc_t),
intent(inout) :: inp_pioFile, out_pioFile
637 integer :: i, my_Atype, my_Natts
639 integer :: my_Aint(50)
641 integer(PIO_OFFSET_KIND) :: my_Alen
643 real(r8) :: my_Afloat(50)
645 character (len= 40) :: my_Aname
646 character (len=4096) :: my_Achar
648 character (len=*),
parameter :: MyFile = &
649 & __FILE__//
", pio_netcdf_copy_att"
651 TYPE (Var_Desc_t) :: pioVar
660 IF (inp_varid.eq.pio_global)
THEN
661 status=pio_inquire(inp_piofile, &
662 & nattributes = my_natts)
663 IF (status.ne.pio_noerr)
THEN
670 status=pio_inq_varid(inp_piofile, trim(varname), piovar)
671 IF (status.eq.pio_noerr)
THEN
672 status=pio_inquire_variable(inp_piofile, piovar, &
674 IF (status.ne.pio_noerr)
THEN
676 & trim(inp_ncname), &
683 & trim(inp_ncname), &
693 IF (status.eq.pio_noerr)
THEN
695 IF (inp_varid.eq.pio_global)
THEN
696 status=pio_inq_attname(inp_piofile, inp_varid, i, my_aname)
697 IF (status.eq.pio_noerr)
THEN
698 IF (trim(my_aname).eq.trim(attname))
THEN
699 status=pio_inq_att(inp_piofile, inp_varid, &
701 & xtype = my_atype, &
703 IF ((status.eq.pio_noerr).and. &
704 & (my_atype.eq.pio_char))
THEN
705 status=pio_get_att(inp_piofile, inp_varid, &
706 & trim(my_aname), my_achar)
707 IF (status.eq.pio_noerr)
THEN
708 status=pio_put_att(out_piofile, pio_global, &
709 & trim(my_aname), trim(my_achar))
711 & __line__, myfile))
THEN
713 & trim(out_ncname), &
722 & trim(inp_ncname), &
731 & trim(inp_ncname), &
741 status=pio_inq_attname(inp_piofile, piovar, i, my_aname)
742 IF (status.eq.pio_noerr)
THEN
743 status=pio_inq_att(inp_piofile, piovar, &
745 & xtype = my_atype, &
747 IF (status.eq.pio_noerr)
THEN
748 IF (my_atype.eq.pio_char)
THEN
749 status=pio_get_att(inp_piofile, piovar, &
752 IF (status.eq.pio_noerr)
THEN
753 status=pio_put_att(out_piofile, out_varid, &
757 & __line__, myfile))
THEN
759 & trim(out_ncname), &
766 ELSE IF (my_atype.eq.pio_int)
THEN
767 status=pio_get_att(inp_piofile, piovar, &
769 & my_aint(1:my_alen))
770 IF (status.eq.pio_noerr)
THEN
771 status=pio_put_att(out_piofile, out_varid, &
773 & my_aint(1:my_alen))
775 & __line__, myfile))
THEN
777 & trim(out_ncname), &
784 ELSE IF ((my_atype.eq.pio_real ).or. &
785 & (my_atype.eq.pio_double))
THEN
786 status=pio_get_att(inp_piofile, piovar, &
788 & my_afloat(1:my_alen))
789 IF (status.eq.pio_noerr)
THEN
790 status=pio_put_att(out_piofile, out_varid, &
792 & my_afloat(1:my_alen))
794 & __line__, myfile))
THEN
796 & trim(out_ncname), &
806 & trim(inp_ncname), &
813 & trim(inp_ncname), &
822 10
FORMAT (/,
' PIO_NETCDF_COPY_ATT - error while inquiring number ', &
823 &
'of global attributes',/,23x,
'in input file :',2x,a, &
824 & /, 23x,
'call from:',2x,a)
825 20
FORMAT (/,
' PIO_NETCDF_COPY_ATT - error while inquiring number ', &
826 &
'attributes in variable :',2x,a, &
827 & /,23x,
'in input file:',2x,a,/,23x,
'call from:',2x,a)
828 30
FORMAT (/,
' PIO_NETCDF_COPY_ATT - error while inquiring ', &
829 &
'variable descriptor for:',2x,a, &
830 & /,23x,
'in input file:',2x,a,/,23x,
'call from:',2x,a)
831 40
FORMAT (/,
' PIO_NETCDF_COPY_ATT - error while writing ', &
832 &
'attribute:',2x,a,/,23x,
'in output file:',2x,a, &
833 & /,23x,
'call from:',2x,a)
834 50
FORMAT (/,
' PIO_NETCDF_COPY_ATT - error while reading ', &
835 &
'attribute:',2x,a,/,23x,
'in input file:',2x,a, &
836 & /,23x,
'call from:',2x,a)
837 60
FORMAT (/,
' PIO_NETCDF_COPY_ATT - error while inquiring ',a,1x, &
838 &
'attributes',/,23x,
'in input file:',2x,a, &
839 & /,23x,
'call from:',2x,a)
845 & VarName, pioVar)
RESULT (foundit)
872 integer,
intent(in) :: ng, model
874 character (len=*),
intent(in) ::
varname
876 TYPE (file_desc_t),
intent(inout) :: piofile
877 TYPE (var_desc_t),
intent(out) :: piovar
885 character (len=*),
parameter :: myfile = &
886 & __FILE__//
", pio_netcdf_find_var"
894 status=pio_inq_varid(piofile, trim(
varname), piovar)
896 IF (status.eq.pio_noerr)
THEN
904 & DimName, DimSize, DimID)
946 integer,
intent(in) :: ng, model
947 integer,
intent(out),
optional :: dimsize
948 integer,
intent(out),
optional :: dimid
950 character (len=*),
intent(in) :: ncname
951 character (len=*),
intent(in),
optional :: dimname
953 TYPE (file_desc_t),
intent(in),
optional :: piofile
959 integer :: i, j, status
960 integer :: myid, myvalue
962 character (len=*),
parameter :: myfile = &
963 & __FILE__//
", pio_netcdf_get_dim"
965 TYPE (file_desc_t) :: my_piofile
989 IF (.not.
PRESENT(piofile))
THEN
999 IF ((status.eq.pio_noerr).and.(
n_dim.le.
mdims))
THEN
1006 status=pio_inquire_dimension(my_piofile,
dim_id(i), &
1008 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
1025 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
1036 IF (
PRESENT(dimname))
THEN
1038 IF (trim(
dim_name(i)).eq.trim(dimname))
THEN
1045 IF (
PRESENT(dimsize))
THEN
1048 IF (
PRESENT(dimid))
THEN
1052 WRITE (
stdout,40) trim(dimname), trim(ncname)
1061 IF (.not.
PRESENT(piofile))
THEN
1065 10
FORMAT (/,
' PIO_NETCDF_GET_DIM - error while reading dimension', &
1066 &
' ID:',2x,i0,/,22x,
'in input file:',2x,a, &
1067 & /,22x,
'call from:',2x,a)
1068 20
FORMAT (/,
' PIO_NETCDF_GET_DIM - too small dimension parameter,', &
1069 & a,2i5,/,22x,
'change file mod_netcdf.F and recompile')
1070 30
FORMAT (/,
' PIO_NETCDF_GET_DIM - unable to inquire about', &
1071 &
' contents of input NetCDF file:',2x,a, &
1072 & /,22x,
'call from:',2x,a)
1073 40
FORMAT (/,
' PIO_NETCDF_GET_DIM - requested dimension: ',a,/22x, &
1074 &
'not found in input file:',2x,a,/,22x,
'call from:',2x,a)
1114 integer,
intent(in) :: ng, model
1116 character (len=*),
intent(in) :: ncname
1118 TYPE (file_desc_t),
intent(in),
optional :: piofile
1122 integer :: i, status
1124 character (len=*),
parameter :: myfile = &
1125 & __FILE__//
", pio_netcdf_check_dim"
1131 IF (.not.
PRESENT(piofile))
THEN
1135 & piofile = piofile)
1144 SELECT CASE (trim(adjustl(
dim_name(i))))
1236# ifndef RBL4DVAR_FCT_SENSITIVITY
1237# ifdef ADJUST_BOUNDARY
1247# if defined ADJUST_STFLUX || defined ADJUST_WSTRESS
1261 10
FORMAT (/,
' PIO_NETCDF_CHECK_DIM - inconsistent size of', &
1262 &
' dimension: ',a,2x,2i5,/,24x,
'in file: ',a)
1305 integer,
intent(in) :: ng, model
1307 character (len=*),
intent(in) :: ncname
1309 TYPE (file_desc_t),
intent(in),
optional :: piofile
1313 integer :: idmod, npts, i, ib, ic, j, j1, j2, status
1316 real(
r8),
parameter :: roundoff = 1.0e-7_r8
1318 real(
r8) :: fvars, fvarv(50), varval
1320 character (len=80) :: text
1322 character (len=*),
parameter :: myfile = &
1323 & __FILE__//
", pio_netcdf_check_var"
1332 IF ((model.lt.1).or.(model.gt.4))
THEN
1340 IF (.not.
PRESENT(piofile))
THEN
1344 & piofile = piofile)
1353 SELECT CASE (trim(adjustl(
var_name(i))))
1357 IF (.not.
PRESENT(piofile))
THEN
1363 & piofile = piofile)
1374 CASE (
'Vstretching')
1375 IF (.not.
PRESENT(piofile))
THEN
1381 & piofile = piofile)
1393 IF (.not.
PRESENT(piofile))
THEN
1399 & piofile = piofile)
1403 IF (abs(
hc(ng)-fvars).gt.roundoff)
THEN
1411 IF (.not.
PRESENT(piofile))
THEN
1417 & piofile = piofile)
1421 IF (abs(
theta_s(ng)-fvars).gt.roundoff)
THEN
1429 IF (.not.
PRESENT(piofile))
THEN
1435 & piofile = piofile)
1439 IF (abs(
theta_b(ng)-fvars).gt.roundoff)
THEN
1447 IF (.not.
PRESENT(piofile))
THEN
1453 & piofile = piofile)
1457 IF (abs(
tcline(ng)-fvars).gt.roundoff)
THEN
1467 IF ((model.eq.5).or.(model.eq.10).or.(model.eq.11))
THEN
1469 & .and.(model.eq.5).and.(
nsa.eq.2))
THEN
1471# ifdef ADJUST_BOUNDARY
1473 & .and.(model.eq.10))
THEN
1476# if defined ADJUST_WSTRESS || defined ADJUST_STFLUX
1478 & .and.(model.eq.11))
THEN
1484 IF (.not.
PRESENT(piofile))
THEN
1490 & piofile = piofile)
1493 & __line__, myfile))
RETURN
1495 IF (abs(varval-fvars).gt.roundoff)
THEN
1503# ifdef WEAK_CONSTRAINT
1505 IF (model.eq.5)
THEN
1506 IF (.not.
PRESENT(piofile))
THEN
1512 & piofile = piofile)
1515 & __line__, myfile))
RETURN
1517 IF (abs(
hgamma(2)-fvars).gt.roundoff)
THEN
1526# ifdef ADJUST_BOUNDARY
1528 IF (model.eq.10)
THEN
1529 IF (.not.
PRESENT(piofile))
THEN
1535 & piofile = piofile)
1538 & __line__, myfile))
RETURN
1540 IF (abs(
hgamma(3)-fvars).gt.roundoff)
THEN
1549# if defined ADJUST_WSTRESS || defined ADJUST_STFLUX
1551 IF (model.eq.11)
THEN
1552 IF (.not.
PRESENT(piofile))
THEN
1558 & piofile = piofile)
1561 & __line__, myfile))
RETURN
1563 IF (abs(
hgamma(4)-fvars).gt.roundoff)
THEN
1574 IF ((model.eq.5).or.(model.eq.10))
THEN
1576 & .and.(model.eq.5).and.(
nsa.eq.2))
THEN
1578# ifdef ADJUST_BOUNDARY
1580 & .and.(model.eq.10))
THEN
1586 IF (.not.
PRESENT(piofile))
THEN
1592 & piofile = piofile)
1595 & __line__, myfile))
RETURN
1597 IF (abs(fvars-varval).gt.roundoff)
THEN
1605# ifdef WEAK_CONSTRAINT
1607 IF (model.eq.5)
THEN
1608 IF (.not.
PRESENT(piofile))
THEN
1614 & piofile = piofile)
1617 & __line__, myfile))
RETURN
1619 IF (abs(fvars-
vgamma(2)).gt.roundoff)
THEN
1628# ifdef ADJUST_BOUNDARY
1630 IF (model.eq.5)
THEN
1631 IF (.not.
PRESENT(piofile))
THEN
1637 & piofile = piofile)
1640 & __line__, myfile))
RETURN
1642 IF (abs(fvars-
vgamma(3)).gt.roundoff)
THEN
1653 IF ((model.eq.5).or.(model.eq.11))
THEN
1654 npts=ubound(
hdecay,dim=2)
1655 IF (.not.
PRESENT(piofile))
THEN
1663 & piofile = piofile, &
1669 & __line__, myfile))
RETURN
1671 IF (model.eq.5)
THEN
1678 ELSE IF (model.eq.11)
THEN
1688 IF (abs(
hdecay(1,j,ng)-fvarv(j)).gt.roundoff)
THEN
1702 IF ((model.eq.5).or.(model.eq.11))
THEN
1703 npts=ubound(
vdecay,dim=2)
1704 IF (.not.
PRESENT(piofile))
THEN
1712 & piofile = piofile, &
1717 & __line__, myfile))
RETURN
1719 IF (model.eq.5)
THEN
1722 ELSE IF (model.eq.11)
THEN
1728 IF (abs(
vdecay(1,j,ng)-fvarv(j)).gt.roundoff)
THEN
1741# ifdef WEAK_CONSTRAINT
1743 IF ((model.eq.5).and.(
nsa.eq.2))
THEN
1744 npts=ubound(
hdecay,dim=2)
1745 IF (.not.
PRESENT(piofile))
THEN
1753 & piofile = piofile, &
1758 & __line__, myfile))
RETURN
1767 IF (abs(
hdecay(
nsa,j,ng)-fvarv(j)).gt.roundoff)
THEN
1781 IF ((model.eq.5).and.(
nsa.eq.2))
THEN
1782 npts=ubound(
vdecay,dim=2)
1783 IF (.not.
PRESENT(piofile))
THEN
1791 & piofile = piofile, &
1796 & __line__, myfile))
RETURN
1802 IF (abs(
vdecay(
nsa,j,ng)-fvarv(j)).gt.roundoff)
THEN
1816# ifdef ADJUST_BOUNDARY
1818 IF (model.eq.10)
THEN
1824 IF (.not.
PRESENT(piofile))
THEN
1827 & start = (/1,1/), &
1828 & total = (/npts,4/))
1832 & piofile = piofile, &
1833 & start = (/1,1/), &
1834 & total = (/npts,4/))
1837 & __line__, myfile))
RETURN
1846 IF (
lobc(ib,j,ng))
THEN
1847 WRITE (text,
"(a,'(',i1,',',a,')')") &
1850 IF (abs(
hdecayb(j,ib,ng)-fvarv(ic)).gt. &
1865 IF (model.eq.10)
THEN
1867 IF (.not.
PRESENT(piofile))
THEN
1870 & start = (/1,1/), &
1871 & total = (/npts,4/))
1875 & piofile = piofile, &
1876 & start = (/1,1/), &
1877 & total = (/npts,4/))
1880 & __line__, myfile))
RETURN
1889 IF (
lobc(ib,j,ng))
THEN
1890 WRITE (text,
"(a,'(',i1,',',a,')')") &
1893 IF (abs(
vdecayb(j,ib,ng)-fvarv(ic)).gt. &
1912 10
FORMAT (/,
' PIO_NETCDF_CHECK_VAR - inconsistent value of', &
1913 &
' variable: ',a,2x,2i5,/,24x,
'in file: ',a)
1914 20
FORMAT (/,
' PIO_NETCDF_CHECK_VAR - inconsistent value of', &
1915 &
' variable: ',a,2x,2(1pe14.6),/,24x,
'in file: ',a)
1921 & myVarName, SearchVar, pioVar, &
1986 logical,
intent(out),
optional :: searchvar
1988 integer,
intent(in) :: ng, model
1989 integer,
intent(out),
optional :: nvardim
1990 integer,
intent(out),
optional :: nvaratt
1992 character (len=*),
intent(in) :: ncname
1993 character (len=*),
intent(in),
optional :: myvarname
1995 TYPE (file_desc_t),
intent(in),
optional :: piofile
1996 TYPE (var_desc_t),
intent(out),
optional :: piovar
2000 logical :: foundit, writeerror
2002 integer :: i, j, status
2003 integer :: att_id, my_atype, my_id
2005 integer(pio_offset_kind) :: my_alen
2007 real(
r4) :: my_afloat
2008 real(
r8) :: my_adouble
2010 character (len=1024) :: text
2012 character (len=*),
parameter :: myfile = &
2013 & __FILE__//
", pio_netcdf_inq_var"
2015 TYPE (file_desc_t) :: my_piofile
2016 TYPE (var_desc_t) :: my_piovar
2049 IF (.not.
PRESENT(piofile))
THEN
2059 IF ((status.eq.pio_noerr).and.(
n_var.le.
mvars))
THEN
2065 status=pio_inq_attname(my_piofile, pio_global, att_id, &
2067 IF (status.eq.pio_noerr)
THEN
2068 status=pio_inq_att(my_piofile, pio_global, &
2071 IF (status.ne.pio_noerr)
THEN
2090 IF (status.eq.pio_noerr)
THEN
2094 status=pio_inquire_variable(my_piofile,
var_id(i), &
2098 IF (status.eq.pio_noerr)
THEN
2099 status=pio_inq_varid(my_piofile, trim(
var_name(i)), &
2101 IF (status.eq.pio_noerr)
THEN
2103 status=pio_inq_attname(my_piofile,
var_desc(i), j, &
2105 IF (status.eq.pio_noerr)
THEN
2106 IF (trim(
var_aname(j)).eq.
'water_points'.and. &
2141 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
2152 IF (
PRESENT(myvarname))
THEN
2172 IF (trim(
var_name(i)).eq.trim(myvarname))
THEN
2185 IF (
PRESENT(piovar))
THEN
2188 IF (
PRESENT(nvardim))
THEN
2191 IF (
PRESENT(nvaratt))
THEN
2201 status=pio_inquire_dimension(my_piofile,
var_dids(i), &
2203 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
2212 IF (status.eq.pio_noerr)
THEN
2214 status=pio_inq_attname(my_piofile, my_piovar, i, &
2216 IF (status.eq.pio_noerr)
THEN
2217 status=pio_inq_att(my_piofile, my_piovar, &
2219 & xtype = my_atype, &
2221 IF (status.eq.pio_noerr)
THEN
2222 IF ((my_alen.eq.1).and. &
2223 & (my_atype.eq.pio_int))
THEN
2224 status=pio_get_att(my_piofile, my_piovar, &
2228 & __line__, myfile))
THEN
2231 & trim(myvarname), &
2238 ELSE IF ((my_alen.eq.1).and. &
2239 & (my_atype.eq.pio_real))
THEN
2240 status=pio_get_att(my_piofile, my_piovar, &
2244 & __line__, myfile))
THEN
2247 & trim(myvarname), &
2254# ifdef SINGLE_PRECISION
2260 ELSE IF ((my_alen.eq.1).and. &
2261 & (my_atype.eq.pio_double))
THEN
2262 status=pio_get_att(my_piofile, my_piovar, &
2266 & __line__, myfile))
THEN
2269 & trim(myvarname), &
2276# ifdef SINGLE_PRECISION
2282 ELSE IF (my_atype.eq.pio_char)
THEN
2283 status=pio_get_att(my_piofile, my_piovar, &
2287 & __line__, myfile))
THEN
2290 & trim(myvarname), &
2322 IF (
PRESENT(searchvar))
THEN
2328 IF (.not.foundit.and.writeerror)
THEN
2340 IF (.not.
PRESENT(piofile))
THEN
2344 10
FORMAT (/,
' PIO_NETCDF_INQ_VAR - error while inquiring global', &
2345 &
' attribute: ',i2.2,/,22x,
'in input file:',2x,a, &
2346 & /,22x,
'call from:',2x,a)
2347 20
FORMAT (/,
' PIO_NETCDF_INQ_VAR - error while inquiring attribute',&
2348 & 1x,i0,
' for variable: ',a,/,22x,
'in input file:',2x,a, &
2349 & /,22x,
'call from:',2x,a)
2350 30
FORMAT (/,
' PIO_NETCDF_INQ_VAR - error while inquiring variable', &
2351 &
' descriptor for',2x,a,/,22x,
'in input file:',2x,a, &
2352 & /,22x,
'call from:',2x,a)
2353 40
FORMAT (/,
' PIO_NETCDF_INQ_VAR - error while inquiring variable', &
2354 &
' ID:',2x,i0,/,22x,
'in input file:',2x,a, &
2355 & /,22x,
'call from:',2x,a)
2356 50
FORMAT (/,
' PIO_NETCDF_INQ_VAR - too small dimension parameter,', &
2357 & 1x,a,2i5,/,22x,
'change file mod_netcdf.F and recompile')
2358 60
FORMAT (/,
' PIO_NETCDF_INQ_VAR - unable to inquire about', &
2359 &
' contents of input NetCDF file:',2x,a, &
2360 & /,22x,
'call from:',2x,a)
2361 70
FORMAT (/,
' PIO_NETCDF_INQ_VAR - error while inquiring dimension',&
2362 & 1x,i0,
' for variable:',2x,a,/,22x,
'in input file:',2x,a, &
2363 & /,22x,
'call from:',2x,a)
2364 80
FORMAT (/,
' PIO_NETCDF_INQ_VAR - error while reading ',a, &
2365 &
'attribute:',1x,a,
' for variable ',a,/,22x, &
2366 &
'in input file:',2x,a,/,22x,
'call from:',2x,a)
2367 90
FORMAT (/,
' PIO_NETCDF_INQ_VAR - unable to inquire name of ', &
2368 &
'attribute ',i0,
' for variable ',a,/,22x, &
2369 &
'in input file:',2x,a,/,18x,
'call from:',2x,a,/,18x,a)
2370 100
FORMAT (/,
' PIO_NETCDF_INQ_VAR - requested variable:',2x,a,/22x, &
2371 &
'not found in input file:',2x,a,/,22x,
'call from:',2x,a)
2403 integer,
intent(in) :: ng, model
2405 character (len=*),
intent(in) :: ncname
2406 character (len=*),
intent(in) :: myvarname
2408 TYPE (file_desc_t),
intent(in) :: piofile
2409 TYPE (var_desc_t),
intent(out) :: piovar
2415 character (len=*),
parameter :: myfile = &
2416 & __FILE__//
", pio_netcdf_inq_varid"
2422 status=pio_inq_varid(piofile, trim(myvarname), piovar)
2423 IF (
founderror(status, nf90_noerr, __line__, myfile))
THEN
2424 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
2430 10
FORMAT (/,
' PIO_NETCDF_INQ_VARID - error while inquiring ID', &
2431 &
' for variable:',2x,a,/,24x,
'in input file:',2x,a,/, &
2432 & 24x,
'call from:',2x,a)
2437# ifdef SINGLE_PRECISION
2440 & AttName, AttValue, foundit, &
2470 integer,
intent(in) :: ng, model
2472 character (len=*),
intent(in) :: ncname
2473 character (len=*),
intent(in) :: AttName(:)
2475 logical,
intent(out) :: foundit(:)
2477 real(dp),
intent(out) :: AttValue(:)
2479 TYPE (Var_desc_t),
intent(in) :: pioVar
2480 TYPE (File_desc_t),
intent(in),
optional :: pioFile
2484 integer :: i, j, my_natts, natts, status
2486 character (len=40) :: my_Aname
2487 character (len=40) :: my_Vname
2489 character (len=*),
parameter :: MyFile = &
2490 & __FILE__//
", pio_netcdf_get_fatt_dp"
2492 TYPE (File_desc_t) :: my_pioFile
2500 natts=ubound(attname, dim=1)
2508 IF (.not.
PRESENT(piofile))
THEN
2517 IF (piovar%varID.eq.pio_global)
THEN
2518 status=pio_inquire(my_piofile, &
2519 & nattributes = my_natts)
2521 status=pio_inquire_variable(my_piofile, piovar, &
2522 & name = my_vname, &
2525 IF (status.eq.pio_noerr)
THEN
2527 status=pio_inq_attname(my_piofile, piovar, j, my_aname)
2528 IF (status.eq.pio_noerr)
THEN
2530 IF (trim(my_aname).eq.trim(attname(i)))
THEN
2531 status=pio_get_att(my_piofile, piovar, &
2532 & trim(attname(i)), attvalue(i))
2534 & __line__, myfile))
THEN
2566 IF (.not.
PRESENT(piofile))
THEN
2570 10
FORMAT (/,
' PIO_NETCDF_GET_FATT_DP - error while reading ', &
2571 &
'attribute:',1x,a,
'for variable',1x,a, &
2572 & /,26x,
'in input file:',2x,a,/,26x,
'call from:',2x,a)
2573 20
FORMAT (/,
' PIO_NETCDF_GET_FATT_DP - error while inquiring ', &
2574 &
'attribute:',1x,i2.2,
'for variable',1x,a, &
2575 & /,26x,
'in input file:',2x,a,/,26x,
'call from:',2x,a)
2576 30
FORMAT (/,
' PIO_NETCDF_GET_FATT_DP - error while inquiring ', &
2577 &
'number of attributes for variable:',1x,a, &
2578 & /,26x,
'in input file:',2x,a,/,26x,
'call from:',2x,a)
2585 & AttName, AttValue, foundit, &
2615 integer,
intent(in) :: ng, model
2617 character (len=*),
intent(in) :: ncname
2618 character (len=*),
intent(in) :: AttName(:)
2620 logical,
intent(out) :: foundit(:)
2622 real(r8),
intent(out) :: AttValue(:)
2624 TYPE (Var_desc_t),
intent(in) :: pioVar
2625 TYPE (File_desc_t),
intent(in),
optional :: pioFile
2629 integer :: i, j, my_natts, natts, status
2631 character (len=40) :: my_Aname
2632 character (len=40) :: my_Vname
2634 character (len=*),
parameter :: MyFile = &
2635 & __FILE__//
", pio_netcdf_get_fatt"
2637 TYPE (File_desc_t) :: my_pioFile
2645 natts=ubound(attname, dim=1)
2653 IF (.not.
PRESENT(piofile))
THEN
2662 IF (piovar%varID.eq.pio_global)
THEN
2663 status=pio_inquire(my_piofile, &
2664 & nattributes = my_natts)
2666 status=pio_inquire_variable(my_piofile, piovar, &
2667 & name = my_vname, &
2670 IF (status.eq.pio_noerr)
THEN
2672 status=pio_inq_attname(my_piofile, piovar, j, my_aname)
2673 IF (status.eq.pio_noerr)
THEN
2675 IF (trim(my_aname).eq.trim(attname(i)))
THEN
2676 status=pio_get_att(my_piofile, piovar, &
2677 & trim(attname(i)), attvalue(i))
2679 & __line__, myfile))
THEN
2711 IF (.not.
PRESENT(piofile))
THEN
2715 10
FORMAT (/,
' PIO_NETCDF_GET_FATT_R8 - error while reading ', &
2716 &
'attribute:',1x,a,
'for variable',1x,a, &
2717 & /,26x,
'in input file:',2x,a,/,26x,
'call from:',2x,a)
2718 20
FORMAT (/,
' PIO_NETCDF_GET_FATT_R8 - error while inquiring ', &
2719 &
'attribute:',1x,i2.2,
'for variable',1x,a, &
2720 & /,26x,
'in input file:',2x,a,/,26x,
'call from:',2x,a)
2721 30
FORMAT (/,
' PIO_NETCDF_GET_FATT_R8 - error while inquiring ', &
2722 &
'number of attributes for variable:',1x,a, &
2723 & /,26x,
'in input file:',2x,a,/,26x,
'call from:',2x,a)
2729 & AttName, AttValue, foundit, &
2762 integer,
intent(in) :: ng, model
2763 integer,
intent(in) :: varid
2765 character (len=*),
intent(in) :: ncname
2766 character (len=*),
intent(in) :: AttName(:)
2768 logical,
intent(out) :: foundit(:)
2770 character (len=*),
intent(out) :: AttValue(:)
2772 TYPE (File_desc_t),
intent(in),
optional :: pioFile
2776 integer :: i, j, my_natts, natts, status
2778 character (len=40) :: my_Aname
2779 character (len=40) :: my_Vname
2781 character (len=*),
parameter :: MyFile = &
2782 & __FILE__//
", pio_netcdf_get_satt"
2784 TYPE (File_desc_t) :: my_pioFile
2792 natts=ubound(attname, dim=1)
2800 IF (.not.
PRESENT(piofile))
THEN
2809 status=pio_inquire(my_piofile, &
2810 & nattributes = my_natts)
2811 IF (status.eq.pio_noerr)
THEN
2813 status=pio_inq_attname(my_piofile, varid, j, my_aname)
2814 IF (status.eq.pio_noerr)
THEN
2816 IF (trim(my_aname).eq.trim(attname(i)))
THEN
2817 status=pio_get_att(my_piofile, varid, &
2818 & trim(attname(i)), attvalue(i))
2820 & __line__, myfile))
THEN
2852 IF (.not.
PRESENT(piofile))
THEN
2856 10
FORMAT (/,
' PIO_NETCDF_GET_SATT_G - error while reading ', &
2857 &
'attribute:',1x,a,
'for variable',1x,a, &
2858 & /,25x,
'in input file:',2x,a,/,23x,
'call from:',2x,a)
2859 20
FORMAT (/,
' PIO_NETCDF_GET_SATT_G - error while inquiring ', &
2860 &
'attribute:',1x,i2.2,
'for variable',1x,a, &
2861 & /,25x,
'in input file:',2x,a,/,23x,
'call from:',2x,a)
2862 30
FORMAT (/,
' PIO_NETCDF_GET_SATT_G - error while inquiring', &
2863 &
' number of attributes for variable:',1x,a, &
2864 & /,25x,
'in input file:',2x,a,/,19x,
'call from:',2x,a)
2870 & AttName, AttValue, foundit, &
2902 integer,
intent(in) :: ng, model
2904 character (len=*),
intent(in) :: ncname
2905 character (len=*),
intent(in) :: AttName(:)
2907 logical,
intent(out) :: foundit(:)
2909 character (len=*),
intent(out) :: AttValue(:)
2911 TYPE (Var_desc_t),
intent(in) :: pioVar
2912 TYPE (File_desc_t),
intent(in),
optional :: pioFile
2916 integer :: i, j, my_natts, natts, status
2918 character (len=40) :: my_Aname
2919 character (len=40) :: my_Vname
2921 character (len=*),
parameter :: MyFile = &
2922 & __FILE__//
", pio_netcdf_get_satt"
2924 TYPE (File_desc_t) :: my_pioFile
2932 natts=ubound(attname, dim=1)
2940 IF (.not.
PRESENT(piofile))
THEN
2949 IF (piovar%varID.eq.pio_global)
THEN
2950 status=pio_inquire(my_piofile, &
2951 & nattributes = my_natts)
2953 status=pio_inquire_variable(my_piofile, piovar, &
2954 & name = my_vname, &
2957 IF (status.eq.pio_noerr)
THEN
2959 status=pio_inq_attname(my_piofile, piovar, j, my_aname)
2960 IF (status.eq.pio_noerr)
THEN
2962 IF (trim(my_aname).eq.trim(attname(i)))
THEN
2963 status=pio_get_att(my_piofile, piovar, &
2964 & trim(attname(i)), attvalue(i))
2966 & __line__, myfile))
THEN
2998 IF (.not.
PRESENT(piofile))
THEN
3002 10
FORMAT (/,
' PIO_NETCDF_GET_SATT_V - error while reading ', &
3003 &
'attribute:',1x,a,
'for variable',1x,a, &
3004 & /,25x,
'in input file:',2x,a,/,23x,
'call from:',2x,a)
3005 20
FORMAT (/,
' PIO_NETCDF_GET_SATT_V - error while inquiring ', &
3006 &
'attribute:',1x,i2.2,
'for variable',1x,a, &
3007 & /,25x,
'in input file:',2x,a,/,23x,
'call from:',2x,a)
3008 30
FORMAT (/,
' PIO_NETCDF_GET_SATT_V - error while inquiring', &
3009 &
' number of attributes for variable:',1x,a, &
3010 & /,25x,
'in input file:',2x,a,/,19x,
'call from:',2x,a)
3015# ifdef SINGLE_PRECISION
3018 & A, pioFile, start, total, &
3019 & broadcast, min_val, max_val)
3061 logical,
intent(in),
optional :: broadcast
3063 integer,
intent(in) :: ng, model
3065 integer,
intent(in),
optional :: start(:)
3066 integer,
intent(in),
optional :: total(:)
3068 character (len=*),
intent(in) :: ncname
3069 character (len=*),
intent(in) :: myVarName
3071 real(dp),
intent(out),
optional :: min_val
3072 real(dp),
intent(out),
optional :: max_val
3074 real(dp),
intent(out) :: A
3076 TYPE (File_desc_t),
intent(in),
optional :: pioFile
3082 real(dp),
dimension(1) :: my_A
3084 character (len=*),
parameter :: MyFile = &
3085 & __FILE__//
", pio_netcdf_get_fvar_0dp"
3087 TYPE (File_desc_t) :: my_pioFile
3088 TYPE (Var_desc_t) :: my_pioVar
3096 IF (.not.
PRESENT(piofile))
THEN
3105 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
3106 IF (status.eq.pio_noerr)
THEN
3107 IF (
PRESENT(start).and.
PRESENT(total))
THEN
3108 status=pio_get_var(my_piofile, my_piovar, start, total, my_a)
3111 status=pio_get_var(my_piofile, my_piovar, a)
3113 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
3114 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
3120 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
3130 IF (
PRESENT(min_val))
THEN
3133 IF (
PRESENT(max_val))
THEN
3139 IF (.not.
PRESENT(piofile))
THEN
3143 10
FORMAT (/,
' PIO_NETCDF_GET_FVAR_0DP - error while reading ', &
3144 &
'variable:',2x,a,/,27x,
'in input file:',2x,a, &
3145 & /,27x,
'call from:',2x,a)
3146 20
FORMAT (/,
' PIO_NETCDF_GET_FVAR_0DP - error while inquiring ', &
3147 &
'descriptor for variable:',2x,a,/,27x,
'in input file:', &
3148 & 2x,a,/,27x,
'call from:',2x,a)
3154 & A, pioFile, start, total, &
3155 & broadcast, min_val, max_val)
3199 logical,
intent(in),
optional :: broadcast
3201 integer,
intent(in) :: ng, model
3203 integer,
intent(in),
optional :: start(:)
3204 integer,
intent(in),
optional :: total(:)
3206 character (len=*),
intent(in) :: ncname
3207 character (len=*),
intent(in) :: myVarName
3209 real(dp),
intent(out),
optional :: min_val
3210 real(dp),
intent(out),
optional :: max_val
3212 real(dp),
intent(out) :: A(:)
3214 TYPE (File_desc_t),
intent(in),
optional :: pioFile
3218 logical,
dimension(3) :: foundit
3220 integer :: i, status
3222 integer,
dimension(1) :: Asize
3224 real(dp) :: Afactor, Aoffset, Aspval
3226 real(dp),
parameter :: Aepsilon = 1.0e-8_r8
3228 real(dp),
dimension(3) :: AttValue
3230 character (len=12),
dimension(3) :: AttName
3232 character (len=*),
parameter :: MyFile = &
3233 & __FILE__//
", pio_netcdf_get_fvar_1dp"
3235 TYPE (File_desc_t) :: my_pioFile
3236 TYPE (Var_desc_t) :: my_pioVar
3242 IF (
PRESENT(start).and.
PRESENT(total))
THEN
3245 asize(1)=asize(1)*total(i)
3248 asize(1)=ubound(a, dim=1)
3253 IF (.not.
PRESENT(piofile))
THEN
3262 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
3263 IF (status.eq.pio_noerr)
THEN
3264 IF (
PRESENT(start).and.
PRESENT(total))
THEN
3265 status=pio_get_var(my_piofile, my_piovar, start, total, a)
3267 status=pio_get_var(my_piofile, my_piovar, a)
3269 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
3270 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
3276 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
3295 attname(1)=
'scale_factor'
3296 attname(2)=
'add_offset '
3297 attname(3)=
'_FillValue '
3300 & attname, attvalue, foundit, &
3301 & piofile = my_piofile)
3304 IF (.not.foundit(1))
THEN
3310 IF (.not.foundit(2))
THEN
3316 IF (.not.foundit(3))
THEN
3323 IF ((foundit(3).and.(abs(a(i)-aspval).lt.aepsilon)).or. &
3324 & (.not.foundit(3).and.(abs(a(i)).ge.abs(aspval))))
THEN
3329 IF (foundit(1))
THEN
3335 IF (foundit(2))
THEN
3344 IF (
PRESENT(min_val))
THEN
3347 IF (
PRESENT(max_val))
THEN
3353 IF (.not.
PRESENT(piofile))
THEN
3357 10
FORMAT (/,
' PIO_NETCDF_GET_FVAR_1DP - error while reading ', &
3358 &
'variable:',2x,a,/,27x,
'in input file:',2x,a, &
3359 & /,27x,
'call from:',2x,a)
3360 20
FORMAT (/,
' PIO_NETCDF_GET_FVAR_1DP - error while inquiring ', &
3361 &
'descriptor for variable:',2x,a,/,27x,
'in input file:', &
3362 & 2x,a,/,27x,
'call from:',2x,a)
3368 & A, pioFile, start, total, &
3369 & broadcast, min_val, max_val)
3413 logical,
intent(in),
optional :: broadcast
3415 integer,
intent(in) :: ng, model
3417 integer,
intent(in),
optional :: start(:)
3418 integer,
intent(in),
optional :: total(:)
3420 character (len=*),
intent(in) :: ncname
3421 character (len=*),
intent(in) :: myVarName
3423 real(dp),
intent(out),
optional :: min_val
3424 real(dp),
intent(out),
optional :: max_val
3426 real(dp),
intent(out) :: A(:,:)
3428 TYPE (File_desc_t),
intent(in),
optional :: pioFile
3432 logical,
dimension(3) :: foundit
3434 integer :: i, j, status
3436 integer,
dimension(2) :: Asize
3438 real(dp) :: Afactor, Aoffset, Aspval
3440 real(dp),
parameter :: Aepsilon = 1.0e-8_r8
3442 real(dp),
dimension(3) :: AttValue
3444 character (len=12),
dimension(3) :: AttName
3446 character (len=*),
parameter :: MyFile = &
3447 & __FILE__//
", pio_netcdf_get_fvar_2dp"
3449 TYPE (File_desc_t) :: my_pioFile
3450 TYPE (Var_desc_t) :: my_pioVar
3456 IF (
PRESENT(start).and.
PRESENT(total))
THEN
3460 asize(1)=ubound(a, dim=1)
3461 asize(2)=ubound(a, dim=2)
3466 IF (.not.
PRESENT(piofile))
THEN
3475 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
3476 IF (status.eq.pio_noerr)
THEN
3477 IF (
PRESENT(start).and.
PRESENT(total))
THEN
3478 status=pio_get_var(my_piofile, my_piovar, start, total, a)
3480 status=pio_get_var(my_piofile, my_piovar, a)
3482 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
3483 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
3489 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
3508 attname(1)=
'scale_factor'
3509 attname(2)=
'add_offset '
3510 attname(3)=
'_FillValue '
3513 & attname, attvalue, foundit, &
3514 & piofile = my_piofile)
3517 IF (.not.foundit(1))
THEN
3523 IF (.not.foundit(2))
THEN
3529 IF (.not.foundit(3))
THEN
3537 IF ((foundit(3).and.(abs(a(i,j)-aspval).lt.aepsilon)).or. &
3538 & (.not.foundit(3).and.(abs(a(i,j)).ge.abs(aspval))))
THEN
3544 IF (foundit(1))
THEN
3547 a(i,j)=afactor*a(i,j)
3552 IF (foundit(2))
THEN
3555 a(i,j)=a(i,j)+aoffset
3563 IF (
PRESENT(min_val))
THEN
3566 IF (
PRESENT(max_val))
THEN
3572 IF (.not.
PRESENT(piofile))
THEN
3576 10
FORMAT (/,
' PIO_NETCDF_GET_FVAR_2DP - error while reading ', &
3577 &
'variable:',2x,a,/,27x,
'in input file:',2x,a, &
3578 & /,27x,
'call from:',2x,a)
3579 20
FORMAT (/,
' PIO_NETCDF_GET_FVAR_2DP0 - error while inquiring ', &
3580 &
'descriptor for variable:',2x,a,/,27x,
'in input file:', &
3581 & 2x,a,/,27x,
'call from:',2x,a)
3587 & A, pioFile, start, total, &
3588 & broadcast, min_val, max_val)
3629 logical,
intent(in),
optional :: broadcast
3631 integer,
intent(in) :: ng, model
3633 integer,
intent(in),
optional :: start(:)
3634 integer,
intent(in),
optional :: total(:)
3636 character (len=*),
intent(in) :: ncname
3637 character (len=*),
intent(in) :: myVarName
3639 real(dp),
intent(out),
optional :: min_val
3640 real(dp),
intent(out),
optional :: max_val
3642 real(dp),
intent(out) :: A(:,:,:)
3644 TYPE (File_desc_t),
intent(in),
optional :: pioFile
3648 logical,
dimension(3) :: foundit
3650 integer :: i, j, k, status
3652 integer,
dimension(3) :: Asize
3654 real(dp) :: Afactor, Aoffset, Aspval
3656 real(dp),
parameter :: Aepsilon = 1.0e-8_r8
3658 real(dp),
dimension(3) :: AttValue
3660 character (len=12),
dimension(3) :: AttName
3662 character (len=*),
parameter :: MyFile = &
3663 & __FILE__//
", pio_netcdf_get_fvar_3dp"
3665 TYPE (File_desc_t) :: my_pioFile
3666 TYPE (Var_desc_t) :: my_pioVar
3672 IF (
PRESENT(start).and.
PRESENT(total))
THEN
3677 asize(1)=ubound(a, dim=1)
3678 asize(2)=ubound(a, dim=2)
3679 asize(3)=ubound(a, dim=3)
3684 IF (.not.
PRESENT(piofile))
THEN
3693 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
3694 IF (status.eq.pio_noerr)
THEN
3695 IF (
PRESENT(start).and.
PRESENT(total))
THEN
3696 status=pio_get_var(my_piofile, my_piovar, start, total, a)
3698 status=pio_get_var(my_piofile, my_piovar, a)
3700 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
3701 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
3707 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
3726 attname(1)=
'scale_factor'
3727 attname(2)=
'add_offset '
3728 attname(3)=
'_FillValue '
3731 & attname, attvalue, foundit, &
3732 & piofile = my_piofile)
3735 IF (.not.foundit(1))
THEN
3741 IF (.not.foundit(2))
THEN
3747 IF (.not.foundit(3))
THEN
3756 IF ((foundit(3).and. &
3757 & (abs(a(i,j,k)-aspval).lt.aepsilon)).or. &
3758 & (.not.foundit(3).and. &
3759 & (abs(a(i,j,k)).ge.abs(aspval))))
THEN
3766 IF (foundit(1))
THEN
3770 a(i,j,k)=afactor*a(i,j,k)
3776 IF (foundit(2))
THEN
3780 a(i,j,k)=a(i,j,k)+aoffset
3789 IF (
PRESENT(min_val))
THEN
3792 IF (
PRESENT(max_val))
THEN
3798 IF (.not.
PRESENT(piofile))
THEN
3802 10
FORMAT (/,
' PIO_NETCDF_GET_FVAR_3DP - error while reading ', &
3803 &
'variable:',2x,a,/,27x,
'in input file:',2x,a, &
3804 & /,27x,
'call from:',2x,a)
3805 20
FORMAT (/,
' PIO_NETCDF_GET_FVAR_3DP - error while inquiring ', &
3806 &
'descriptor for variable:',2x,a,/,27x,
'in input file:', &
3807 & 2x,a,/,27x,
'call from:',2x,a)
3814 & A, pioFile, start, total, &
3815 & broadcast, min_val, max_val)
3857 logical,
intent(in),
optional :: broadcast
3859 integer,
intent(in) :: ng, model
3861 integer,
intent(in),
optional :: start(:)
3862 integer,
intent(in),
optional :: total(:)
3864 character (len=*),
intent(in) :: ncname
3865 character (len=*),
intent(in) :: myVarName
3867 real(r8),
intent(out),
optional :: min_val
3868 real(r8),
intent(out),
optional :: max_val
3870 real(r8),
intent(out) :: A
3872 TYPE (File_desc_t),
intent(in),
optional :: pioFile
3878 real(r8),
dimension(1) :: my_A
3880 character (len=*),
parameter :: MyFile = &
3881 & __FILE__//
", pio_netcdf_get_fvar_0d"
3883 TYPE (File_desc_t) :: my_pioFile
3884 TYPE (Var_desc_t) :: my_pioVar
3892 IF (.not.
PRESENT(piofile))
THEN
3901 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
3902 IF (status.eq.pio_noerr)
THEN
3903 IF (
PRESENT(start).and.
PRESENT(total))
THEN
3904 status=pio_get_var(my_piofile, my_piovar, start, total, my_a)
3907 status=pio_get_var(my_piofile, my_piovar, a)
3909 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
3910 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
3916 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
3926 IF (
PRESENT(min_val))
THEN
3929 IF (
PRESENT(max_val))
THEN
3935 IF (.not.
PRESENT(piofile))
THEN
3939 10
FORMAT (/,
' PIO_NETCDF_GET_FVAR_0D - error while reading ', &
3940 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
3941 & /,26x,
'call from:',2x,a)
3942 20
FORMAT (/,
' PIO_NETCDF_GET_FVAR_0D - error while inquiring ', &
3943 &
'descriptor for variable:',2x,a,/,26x,
'in input file:', &
3944 & 2x,a,/,26x,
'call from:',2x,a)
3950 & A, pioFile, start, total, &
3951 & broadcast, min_val, max_val)
3995 logical,
intent(in),
optional :: broadcast
3997 integer,
intent(in) :: ng, model
3999 integer,
intent(in),
optional :: start(:)
4000 integer,
intent(in),
optional :: total(:)
4002 character (len=*),
intent(in) :: ncname
4003 character (len=*),
intent(in) :: myVarName
4005 real(r8),
intent(out),
optional :: min_val
4006 real(r8),
intent(out),
optional :: max_val
4008 real(r8),
intent(out) :: A(:)
4010 TYPE (File_desc_t),
intent(in),
optional :: pioFile
4014 logical,
dimension(3) :: foundit
4016 integer :: i, status
4018 integer,
dimension(1) :: Asize
4020 real(r8) :: Afactor, Aoffset, Aspval
4022 real(r8),
parameter :: Aepsilon = 1.0e-8_r8
4024 real(r8),
dimension(3) :: AttValue
4026 character (len=12),
dimension(3) :: AttName
4028 character (len=*),
parameter :: MyFile = &
4029 & __FILE__//
", pio_netcdf_get_fvar_1d"
4031 TYPE (File_desc_t) :: my_pioFile
4032 TYPE (Var_desc_t) :: my_pioVar
4038 IF (
PRESENT(start).and.
PRESENT(total))
THEN
4041 asize(1)=asize(1)*total(i)
4044 asize(1)=ubound(a, dim=1)
4049 IF (.not.
PRESENT(piofile))
THEN
4058 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
4059 IF (status.eq.pio_noerr)
THEN
4060 IF (
PRESENT(start).and.
PRESENT(total))
THEN
4061 status=pio_get_var(my_piofile, my_piovar, start, total, a)
4063 status=pio_get_var(my_piofile, my_piovar, a)
4065 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
4066 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
4072 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
4091 attname(1)=
'scale_factor'
4092 attname(2)=
'add_offset '
4093 attname(3)=
'_FillValue '
4096 & attname, attvalue, foundit, &
4097 & piofile = my_piofile)
4100 IF (.not.foundit(1))
THEN
4106 IF (.not.foundit(2))
THEN
4112 IF (.not.foundit(3))
THEN
4119 IF ((foundit(3).and.(abs(a(i)-aspval).lt.aepsilon)).or. &
4120 & (.not.foundit(3).and.(abs(a(i)).ge.abs(aspval))))
THEN
4125 IF (foundit(1))
THEN
4131 IF (foundit(2))
THEN
4140 IF (
PRESENT(min_val))
THEN
4143 IF (
PRESENT(max_val))
THEN
4149 IF (.not.
PRESENT(piofile))
THEN
4153 10
FORMAT (/,
' PIO_NETCDF_GET_FVAR_1D - error while reading ', &
4154 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
4155 & /,26x,
'call from:',2x,a)
4156 20
FORMAT (/,
' PIO_NETCDF_GET_FVAR_1D - error while inquiring ', &
4157 &
'descriptor for variable:',2x,a,/,26x,
'in input file:', &
4158 & 2x,a,/,26x,
'call from:',2x,a)
4164 & A, pioFile, start, total, &
4165 & broadcast, min_val, max_val)
4209 logical,
intent(in),
optional :: broadcast
4211 integer,
intent(in) :: ng, model
4213 integer,
intent(in),
optional :: start(:)
4214 integer,
intent(in),
optional :: total(:)
4216 character (len=*),
intent(in) :: ncname
4217 character (len=*),
intent(in) :: myVarName
4219 real(r8),
intent(out),
optional :: min_val
4220 real(r8),
intent(out),
optional :: max_val
4222 real(r8),
intent(out) :: A(:,:)
4224 TYPE (File_desc_t),
intent(in),
optional :: pioFile
4228 logical,
dimension(3) :: foundit
4230 integer :: i, j, status
4232 integer,
dimension(2) :: Asize
4234 real(r8) :: Afactor, Aoffset, Aspval
4236 real(r8),
parameter :: Aepsilon = 1.0e-8_r8
4238 real(r8),
dimension(3) :: AttValue
4240 character (len=12),
dimension(3) :: AttName
4242 character (len=*),
parameter :: MyFile = &
4243 & __FILE__//
", pio_netcdf_get_fvar_2d"
4245 TYPE (File_desc_t) :: my_pioFile
4246 TYPE (Var_desc_t) :: my_pioVar
4252 IF (
PRESENT(start).and.
PRESENT(total))
THEN
4256 asize(1)=ubound(a, dim=1)
4257 asize(2)=ubound(a, dim=2)
4262 IF (.not.
PRESENT(piofile))
THEN
4271 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
4272 IF (status.eq.pio_noerr)
THEN
4273 IF (
PRESENT(start).and.
PRESENT(total))
THEN
4274 status=pio_get_var(my_piofile, my_piovar, start, total, a)
4276 status=pio_get_var(my_piofile, my_piovar, a)
4278 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
4279 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
4285 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
4304 attname(1)=
'scale_factor'
4305 attname(2)=
'add_offset '
4306 attname(3)=
'_FillValue '
4309 & attname, attvalue, foundit, &
4310 & piofile = my_piofile)
4313 IF (.not.foundit(1))
THEN
4319 IF (.not.foundit(2))
THEN
4325 IF (.not.foundit(3))
THEN
4333 IF ((foundit(3).and.(abs(a(i,j)-aspval).lt.aepsilon)).or. &
4334 & (.not.foundit(3).and.(abs(a(i,j)).ge.abs(aspval))))
THEN
4340 IF (foundit(1))
THEN
4343 a(i,j)=afactor*a(i,j)
4348 IF (foundit(2))
THEN
4351 a(i,j)=a(i,j)+aoffset
4359 IF (
PRESENT(min_val))
THEN
4362 IF (
PRESENT(max_val))
THEN
4368 IF (.not.
PRESENT(piofile))
THEN
4372 10
FORMAT (/,
' PIO_NETCDF_GET_FVAR_2D - error while reading ', &
4373 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
4374 & /,26x,
'call from:',2x,a)
4375 20
FORMAT (/,
' PIO_NETCDF_GET_FVAR_2D - error while inquiring ', &
4376 &
'descriptor for variable:',2x,a,/,26x,
'in input file:', &
4377 & 2x,a,/,26x,
'call from:',2x,a)
4383 & A, pioFile, start, total, &
4384 & broadcast, min_val, max_val)
4425 logical,
intent(in),
optional :: broadcast
4427 integer,
intent(in) :: ng, model
4429 integer,
intent(in),
optional :: start(:)
4430 integer,
intent(in),
optional :: total(:)
4432 character (len=*),
intent(in) :: ncname
4433 character (len=*),
intent(in) :: myVarName
4435 real(r8),
intent(out),
optional :: min_val
4436 real(r8),
intent(out),
optional :: max_val
4438 real(r8),
intent(out) :: A(:,:,:)
4440 TYPE (File_desc_t),
intent(in),
optional :: pioFile
4444 logical,
dimension(3) :: foundit
4446 integer :: i, j, k, status
4448 integer,
dimension(3) :: Asize
4450 real(r8) :: Afactor, Aoffset, Aspval
4452 real(r8),
parameter :: Aepsilon = 1.0e-8_r8
4454 real(r8),
dimension(3) :: AttValue
4456 character (len=12),
dimension(3) :: AttName
4458 character (len=*),
parameter :: MyFile = &
4459 & __FILE__//
", pio_netcdf_get_fvar_3d"
4461 TYPE (File_desc_t) :: my_pioFile
4462 TYPE (Var_desc_t) :: my_pioVar
4468 IF (
PRESENT(start).and.
PRESENT(total))
THEN
4473 asize(1)=ubound(a, dim=1)
4474 asize(2)=ubound(a, dim=2)
4475 asize(3)=ubound(a, dim=3)
4480 IF (.not.
PRESENT(piofile))
THEN
4489 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
4490 IF (status.eq.pio_noerr)
THEN
4491 IF (
PRESENT(start).and.
PRESENT(total))
THEN
4492 status=pio_get_var(my_piofile, my_piovar, start, total, a)
4494 status=pio_get_var(my_piofile, my_piovar, a)
4496 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
4497 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
4503 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
4522 attname(1)=
'scale_factor'
4523 attname(2)=
'add_offset '
4524 attname(3)=
'_FillValue '
4527 & attname, attvalue, foundit, &
4528 & piofile = my_piofile)
4531 IF (.not.foundit(1))
THEN
4537 IF (.not.foundit(2))
THEN
4543 IF (.not.foundit(3))
THEN
4552 IF ((foundit(3).and. &
4553 & (abs(a(i,j,k)-aspval).lt.aepsilon)).or. &
4554 & (.not.foundit(3).and. &
4555 & (abs(a(i,j,k)).ge.abs(aspval))))
THEN
4562 IF (foundit(1))
THEN
4566 a(i,j,k)=afactor*a(i,j,k)
4572 IF (foundit(2))
THEN
4576 a(i,j,k)=a(i,j,k)+aoffset
4585 IF (
PRESENT(min_val))
THEN
4588 IF (
PRESENT(max_val))
THEN
4594 IF (.not.
PRESENT(piofile))
THEN
4598 10
FORMAT (/,
' PIO_NETCDF_GET_FVAR_3D - error while reading ', &
4599 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
4600 & /,26x,
'call from:',2x,a)
4601 20
FORMAT (/,
' PIO_NETCDF_GET_FVAR_3D - error while inquiring ', &
4602 &
'descriptor for variable:',2x,a,/,26x,
'in input file:', &
4603 & 2x,a,/,26x,
'call from:',2x,a)
4609 & A, pioFile, start, total, &
4610 & broadcast, min_val, max_val)
4650 logical,
intent(in),
optional :: broadcast
4652 integer,
intent(in) :: ng, model
4654 integer,
intent(in),
optional :: start(:)
4655 integer,
intent(in),
optional :: total(:)
4657 character (len=*),
intent(in) :: ncname
4658 character (len=*),
intent(in) :: myVarName
4660 real(r8),
intent(out),
optional :: min_val
4661 real(r8),
intent(out),
optional :: max_val
4663 real(r8),
intent(out) :: A(:,:,:,:)
4665 TYPE (File_desc_t),
intent(in),
optional :: pioFile
4669 logical,
dimension(3) :: foundit
4671 integer :: i, j, k, l, status
4673 integer,
dimension(4) :: Asize
4675 real(r8) :: Afactor, Aoffset, Aspval
4677 real(r8),
parameter :: Aepsilon = 1.0e-8_r8
4679 real(r8),
dimension(3) :: AttValue
4681 character (len=12),
dimension(3) :: AttName
4683 character (len=*),
parameter :: MyFile = &
4684 & __FILE__//
", pio_netcdf_get_fvar_4d"
4686 TYPE (File_desc_t) :: my_pioFile
4687 TYPE (Var_desc_t) :: my_pioVar
4693 IF (
PRESENT(start).and.
PRESENT(total))
THEN
4699 asize(1)=ubound(a, dim=1)
4700 asize(2)=ubound(a, dim=2)
4701 asize(3)=ubound(a, dim=3)
4702 asize(4)=ubound(a, dim=4)
4707 IF (.not.
PRESENT(piofile))
THEN
4716 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
4717 IF (status.eq.pio_noerr)
THEN
4718 IF (
PRESENT(start).and.
PRESENT(total))
THEN
4719 status=pio_get_var(my_piofile, my_piovar, start, total, a)
4721 status=pio_get_var(my_piofile, my_piovar, a)
4723 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
4724 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
4730 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
4749 attname(1)=
'scale_factor'
4750 attname(2)=
'add_offset '
4751 attname(3)=
'_FillValue '
4754 & attname, attvalue, foundit, &
4755 & piofile = my_piofile)
4758 IF (.not.foundit(1))
THEN
4764 IF (.not.foundit(2))
THEN
4770 IF (.not.foundit(3))
THEN
4780 IF ((foundit(3).and. &
4781 & (abs(a(i,j,k,l)-aspval).lt.aepsilon)).or. &
4782 & (.not.foundit(3).and. &
4783 & (abs(a(i,j,k,l)).ge.abs(aspval))))
THEN
4791 IF (foundit(1))
THEN
4796 a(i,j,k,l)=afactor*a(i,j,k,l)
4803 IF (foundit(2))
THEN
4808 a(i,j,k,l)=a(i,j,k,l)+aoffset
4818 IF (
PRESENT(min_val))
THEN
4821 IF (
PRESENT(max_val))
THEN
4827 IF (.not.
PRESENT(piofile))
THEN
4831 10
FORMAT (/,
' PIO_NETCDF_GET_FVAR_4D - error while reading ', &
4832 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
4833 & /,26x,
'call from:',2x,a)
4834 20
FORMAT (/,
' PIO_NETCDF_GET_FVAR_4D - error while inquiring ', &
4835 &
'descriptor for variable:',2x,a,/,26x,
'in input file:', &
4836 & 2x,a,/,26x,
'call from:',2x,a)
4842 & A, pioFile, start, total)
4879 integer,
intent(in) :: ng, model
4881 integer,
intent(in),
optional :: start(:)
4882 integer,
intent(in),
optional :: total(:)
4884 character (len=*),
intent(in) :: ncname
4885 character (len=*),
intent(in) :: myVarName
4887 logical,
intent(out) :: A
4889 TYPE (File_desc_t),
intent(in),
optional :: pioFile
4893 integer :: my_type, status
4896 integer,
dimension(1) :: my_AI
4898 character (len=1) :: Achar(1)
4900 character (len=*),
parameter :: MyFile = &
4901 & __FILE__//
", pio_netcdf_get_lvar_0d"
4903 TYPE (File_desc_t) :: my_pioFile
4904 TYPE (Var_desc_t) :: my_pioVar
4912 IF (.not.
PRESENT(piofile))
THEN
4921 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
4922 IF (status.eq.pio_noerr)
THEN
4923 status=pio_inquire_variable(my_piofile, my_piovar, &
4925 IF (status.eq.pio_noerr)
THEN
4926 IF (my_type.eq.pio_int)
THEN
4927 IF (
PRESENT(start).and.
PRESENT(total))
THEN
4928 status=pio_get_var(my_piofile, my_piovar, start, total, &
4932 status=pio_get_var(my_piofile, my_piovar, ai)
4934 IF (status.eq.pio_noerr)
THEN
4941 ELSE IF (my_type.eq.pio_char)
THEN
4942 IF (
PRESENT(start).and.
PRESENT(total))
THEN
4943 status=pio_get_var(my_piofile, my_piovar, start, total, &
4946 status=pio_get_var(my_piofile, my_piovar, achar)
4948 IF (status.eq.pio_noerr)
THEN
4950 IF ((achar(1).eq.
't').or.(achar(1).eq.
'T'))
THEN
4955 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
4963 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
4969 IF (
master)
WRITE (
stdout,30) trim(myvarname), trim(ncname), &
4977 IF (.not.
PRESENT(piofile))
THEN
4981 10
FORMAT (/,
' PIO_NETCDF_GET_LVAR_0D - error while reading ', &
4982 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
4983 & /,26x,
'call from:',2x,a)
4984 20
FORMAT (/,
' PIO_NETCDF_GET_LVAR_0D - error while inquiring ', &
4985 &
'type for variable:',2x,a,/,26x,
'in input file:',2x,a, &
4986 & /,26x,
'call from:',2x,a)
4987 30
FORMAT (/,
' PIO_NETCDF_GET_LVAR_0D - error while inquiring ', &
4988 &
' descriptor for variable:',2x,a, &
4989 & /,26x,
'in input file:',2x,a,/,26x,
'call from:',2x,a)
4995 & A, pioFile, start, total)
5033 integer,
intent(in) :: ng, model
5035 integer,
intent(in),
optional :: start(:)
5036 integer,
intent(in),
optional :: total(:)
5038 character (len=*),
intent(in) :: ncname
5039 character (len=*),
intent(in) :: myVarName
5041 logical,
intent(out) :: A(:)
5043 TYPE (File_desc_t),
intent(in),
optional :: pioFile
5047 integer :: i, my_type, status
5049 integer,
dimension(SIZE(A,1)) :: AI
5051 character (len=1),
dimension(SIZE(A,1)) :: Achar
5053 character (len=*),
parameter :: MyFile = &
5054 & __FILE__//
", pio_netcdf_get_lvar_1d"
5056 TYPE (File_desc_t) :: my_pioFile
5057 TYPE (Var_desc_t) :: my_pioVar
5065 IF (.not.
PRESENT(piofile))
THEN
5074 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
5075 IF (status.eq.pio_noerr)
THEN
5076 status=pio_inquire_variable(my_piofile, my_piovar, &
5078 IF (status.eq.pio_noerr)
THEN
5079 IF (my_type.eq.pio_int)
THEN
5080 IF (
PRESENT(start).and.
PRESENT(total))
THEN
5081 status=pio_get_var(my_piofile, my_piovar, start, total, &
5084 status=pio_get_var(my_piofile, my_piovar, ai)
5086 IF (status.eq.pio_noerr)
THEN
5088 IF (ai(i).eq.0)
THEN
5095 ELSE IF (my_type.eq.pio_char)
THEN
5096 IF (
PRESENT(start).and.
PRESENT(total))
THEN
5097 status=pio_get_var(my_piofile, my_piovar, start, total, &
5100 status=pio_get_var(my_piofile, my_piovar, achar)
5102 IF (status.eq.pio_noerr)
THEN
5105 IF ((achar(i).eq.
't').or.(achar(i).eq.
'T'))
THEN
5111 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
5119 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
5125 IF (
master)
WRITE (
stdout,30) trim(myvarname), trim(ncname), &
5133 IF (.not.
PRESENT(piofile))
THEN
5137 10
FORMAT (/,
' PIO_NETCDF_GET_LVAR_1D - error while reading ', &
5138 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
5139 & /,26x,
'call from:',2x,a)
5140 20
FORMAT (/,
' PIO_NETCDF_GET_LVAR_1D - error while inquiring ', &
5141 &
'type for variable:',2x,a,/,26x,
'in input file:',2x,a, &
5142 & /,26x,
'call from:',2x,a)
5143 30
FORMAT (/,
' PIO_NETCDF_GET_LVAR_1D - error while inquiring ', &
5144 &
' descriptor for variable:',2x,a, &
5145 & /,26x,
'in input file:',2x,a,/,26x,
'call from:',2x,a)
5151 & A, pioFile, start, total)
5186 integer,
intent(in) :: ng, model
5188 integer,
intent(in),
optional :: start(:)
5189 integer,
intent(in),
optional :: total(:)
5191 character (len=*),
intent(in) :: ncname
5192 character (len=*),
intent(in) :: myVarName
5194 integer,
intent(out) :: A
5196 TYPE (File_desc_t),
intent(in),
optional :: pioFile
5202 integer,
dimension(1) :: my_A
5204 character (len=*),
parameter :: MyFile = &
5205 & __FILE__//
", pio_netcdf_get_ivar_0d"
5207 TYPE (File_desc_t) :: my_pioFile
5208 TYPE (Var_desc_t) :: my_pioVar
5216 IF (.not.
PRESENT(piofile))
THEN
5225 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
5226 IF (status.eq.pio_noerr)
THEN
5227 IF (
PRESENT(start).and.
PRESENT(total))
THEN
5228 status=pio_get_var(my_piofile, my_piovar, start, total, my_a)
5231 status=pio_get_var(my_piofile, my_piovar, a)
5233 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
5234 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
5240 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
5248 IF (.not.
PRESENT(piofile))
THEN
5252 10
FORMAT (/,
' PIO_NETCDF_GET_IVAR_0D - error while reading ', &
5253 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
5254 & /,26x,
'call from:',2x,a)
5255 20
FORMAT (/,
' PIO_NETCDF_GET_IVAR_0D - error while inquiring ', &
5256 &
'descriptor for variable:',2x,a, &
5257 & /,26x,
'in input file:',2x,a,/,26x,
'call from:',2x,a)
5263 & A, pioFile, start, total)
5299 integer,
intent(in) :: ng, model
5301 integer,
intent(in),
optional :: start(:)
5302 integer,
intent(in),
optional :: total(:)
5304 character (len=*),
intent(in) :: ncname
5305 character (len=*),
intent(in) :: myVarName
5307 integer,
intent(out) :: A(:)
5309 TYPE (File_desc_t),
intent(in),
optional :: pioFile
5315 character (len=*),
parameter :: MyFile = &
5316 & __FILE__//
", pio_netcdf_get_ivar_1d"
5318 TYPE (File_desc_t) :: my_pioFile
5319 TYPE (Var_desc_t) :: my_pioVar
5327 IF (.not.
PRESENT(piofile))
THEN
5336 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
5337 IF (status.eq.pio_noerr)
THEN
5338 IF (
PRESENT(start).and.
PRESENT(total))
THEN
5339 status=pio_get_var(my_piofile, my_piovar, start, total, a)
5341 status=pio_get_var(my_piofile, my_piovar, a)
5343 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
5344 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
5350 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
5358 IF (.not.
PRESENT(piofile))
THEN
5362 10
FORMAT (/,
' PIO_NETCDF_GET_IVAR_1D - error while reading ', &
5363 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
5364 & /,26x,
'call from:',2x,a)
5365 20
FORMAT (/,
' PIO_NETCDF_GET_IVAR_1D - error while inquiring ', &
5366 &
'descriptor for variable:',2x,a, &
5367 & /,26x,
'in input file:',2x,a,/,25x,
'call from:',2x,a)
5373 & A, pioFile, start, total)
5410 integer,
intent(in) :: ng, model
5412 integer,
intent(in),
optional :: start(:)
5413 integer,
intent(in),
optional :: total(:)
5415 character (len=*),
intent(in) :: ncname
5416 character (len=*),
intent(in) :: myVarName
5418 integer,
intent(out) :: A(:,:)
5420 TYPE (File_desc_t),
intent(in),
optional :: pioFile
5426 character (len=*),
parameter :: MyFile = &
5427 & __FILE__//
", pio_netcdf_get_ivar_2d"
5429 TYPE (File_desc_t) :: my_pioFile
5430 TYPE (Var_desc_t) :: my_pioVar
5438 IF (.not.
PRESENT(piofile))
THEN
5447 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
5448 IF (status.eq.pio_noerr)
THEN
5449 IF (
PRESENT(start).and.
PRESENT(total))
THEN
5450 status=pio_get_var(my_piofile, my_piovar, start, total, a)
5452 status=pio_get_var(my_piofile, my_piovar, a)
5454 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
5455 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
5461 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
5469 IF (.not.
PRESENT(piofile))
THEN
5473 10
FORMAT (/,
' PIO_NETCDF_GET_IVAR_2D - error while reading ', &
5474 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
5475 & /,26x,
'call from:',2x,a)
5476 20
FORMAT (/,
' PIO_NETCDF_GET_IVAR_2D - error while inquiring ', &
5477 &
'descriptor for variable:',2x,a, &
5478 & /,26x,
'in input file:',2x,a,/,25x,
'call from:',2x,a)
5484 & A, pioFile, start, total)
5527 integer,
intent(in) :: ng, model
5529 integer,
intent(in),
optional :: start(:)
5530 integer,
intent(in),
optional :: total(:)
5532 character (len=*),
intent(in) :: ncname
5533 character (len=*),
intent(in) :: myVarName
5535 character (len=*),
intent(out) :: A
5537 TYPE (File_desc_t),
intent(in),
optional :: pioFile
5543 character (len=LEN(A)),
dimension(1) :: my_A
5545 character (len=*),
parameter :: MyFile = &
5546 & __FILE__//
", pio_netcdf_get_svar_0d"
5548 TYPE (File_desc_t) :: my_pioFile
5549 TYPE (Var_desc_t) :: my_pioVar
5557 IF (.not.
PRESENT(piofile))
THEN
5566 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
5567 IF (status.eq.pio_noerr)
THEN
5568 IF (
PRESENT(start).and.
PRESENT(total))
THEN
5569 status=pio_get_var(my_piofile, my_piovar, start, total, my_a)
5572 status=pio_get_var(my_piofile, my_piovar, a)
5574 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
5575 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
5581 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
5589 IF (.not.
PRESENT(piofile))
THEN
5593 10
FORMAT (/,
' PIO_NETCDF_GET_SVAR_0D - error while reading ', &
5594 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
5595 & /,26x,
'call from:',2x,a)
5596 20
FORMAT (/,
' pio_NETCDF_GET_SVAR_0D - error while inquiring ', &
5597 &
'descriptor for variable:',2x,a, &
5598 & /,26x,
'in input file:',2x,a,/,26x,
'call from:',2x,a)
5604 & A, pioFile, start, total)
5645 integer,
intent(in) :: ng, model
5647 integer,
intent(in),
optional :: start(:)
5648 integer,
intent(in),
optional :: total(:)
5650 character (len=*),
intent(in) :: ncname
5651 character (len=*),
intent(in) :: myVarName
5653 character (len=*),
intent(out) :: A(:)
5655 TYPE (File_desc_t),
intent(in),
optional :: pioFile
5661 character (len=*),
parameter :: MyFile = &
5662 & __FILE__//
", pio_netcdf_get_svar_1d"
5664 TYPE (File_desc_t) :: my_pioFile
5665 TYPE (Var_desc_t) :: my_pioVar
5673 IF (.not.
PRESENT(piofile))
THEN
5682 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
5683 IF (status.eq.pio_noerr)
THEN
5684 IF (
PRESENT(start).and.
PRESENT(total))
THEN
5685 status=pio_get_var(my_piofile, my_piovar, start, total, a)
5687 status=pio_get_var(my_piofile, my_piovar, a)
5689 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
5690 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
5696 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
5704 IF (.not.
PRESENT(piofile))
THEN
5708 10
FORMAT (/,
' PIO_NETCDF_GET_SVAR_1D - error while reading ', &
5709 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
5710 & /,26x,
'call from:',2x,a)
5711 20
FORMAT (/,
' pio_NETCDF_GET_SVAR_1D - error while inquiring ', &
5712 &
'descriptor for variable:',2x,a, &
5713 & /,26x,
'in input file:',2x,a,/,26x,
'call from:',2x,a)
5719 & A, pioFile, start, total)
5760 integer,
intent(in) :: ng, model
5762 integer,
intent(in),
optional :: start(:)
5763 integer,
intent(in),
optional :: total(:)
5765 character (len=*),
intent(in) :: ncname
5766 character (len=*),
intent(in) :: myVarName
5768 character (len=*),
intent(out) :: A(:,:)
5770 TYPE (File_desc_t),
intent(in),
optional :: pioFile
5776 character (len=*),
parameter :: MyFile = &
5777 & __FILE__//
", pio_netcdf_get_svar_2d"
5779 TYPE (File_desc_t) :: my_pioFile
5780 TYPE (Var_desc_t) :: my_pioVar
5788 IF (.not.
PRESENT(piofile))
THEN
5797 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
5798 IF (status.eq.pio_noerr)
THEN
5799 IF (
PRESENT(start).and.
PRESENT(total))
THEN
5800 status=pio_get_var(my_piofile, my_piovar, start, total, a)
5802 status=pio_get_var(my_piofile, my_piovar, a)
5804 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
5805 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
5811 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
5819 IF (.not.
PRESENT(piofile))
THEN
5823 10
FORMAT (/,
' PIO_NETCDF_GET_SVAR_2D - error while reading ', &
5824 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
5825 & /,26x,
'call from:',2x,a)
5826 20
FORMAT (/,
' pio_NETCDF_GET_SVAR_2D - error while inquiring ', &
5827 &
'descriptor for variable:',2x,a, &
5828 & /,26x,
'in input file:',2x,a,/,26x,
'call from:',2x,a)
5834 & A, pioFile, start, total)
5875 integer,
intent(in) :: ng, model
5877 integer,
intent(in),
optional :: start(:)
5878 integer,
intent(in),
optional :: total(:)
5880 character (len=*),
intent(in) :: ncname
5881 character (len=*),
intent(in) :: myVarName
5883 character (len=*),
intent(out) :: A(:,:,:)
5885 TYPE (File_desc_t),
intent(in),
optional :: pioFile
5891 character (len=*),
parameter :: MyFile = &
5892 & __FILE__//
", pio_netcdf_get_svar_3d"
5894 TYPE (File_desc_t) :: my_pioFile
5895 TYPE (Var_desc_t) :: my_pioVar
5903 IF (.not.
PRESENT(piofile))
THEN
5912 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
5913 IF (status.eq.pio_noerr)
THEN
5914 IF (
PRESENT(start).and.
PRESENT(total))
THEN
5915 status=pio_get_var(my_piofile, my_piovar, start, total, a)
5917 status=pio_get_var(my_piofile, my_piovar, a)
5919 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
5920 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
5926 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
5934 IF (.not.
PRESENT(piofile))
THEN
5938 10
FORMAT (/,
' PIO_NETCDF_GET_SVAR_3D - error while reading ', &
5939 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
5940 & /,26x,
'call from:',2x,a)
5941 20
FORMAT (/,
' pio_NETCDF_GET_SVAR_3D - error while inquiring ', &
5942 &
'descriptor for variable:',2x,a, &
5943 & /,26x,
'in input file:',2x,a,/,26x,
'call from:',2x,a)
5950 & pioFile, start, total, &
5994 integer,
intent(in) :: ng, model
5996 integer,
intent(in),
optional :: start(:)
5997 integer,
intent(in),
optional :: total(:)
5999 character (len=*),
intent(in) :: ncname
6000 character (len=*),
intent(in) :: myVarName
6002 real(dp),
intent(in) :: Rdate(2)
6004 real(dp),
intent(out),
optional :: min_val
6005 real(dp),
intent(out),
optional :: max_val
6007 real(dp),
intent(out) :: A
6009 TYPE (File_desc_t),
intent(in),
optional :: pioFile
6013 logical :: JulianOffset = .false.
6014 logical :: Ldebug = .false.
6016 logical,
dimension(1) :: got_units
6017 logical,
dimension(2) :: foundit
6019 integer :: ind, lstr, status
6020 integer :: year, month, day, hour, minutes
6022 real(dp) :: Afactor, Aoffset, my_Rdate(2), seconds
6023 real(dp) :: dnum_old, dnum_new, scale
6025 real(dp),
dimension(1) :: my_A
6026 real(r8),
dimension(2) :: AttValue
6028 character (len=12) :: AttName(2)
6029 character (len=22) :: dstr_old, dstr_new
6030 character (len=40) :: UnitsAtt(1), UnitsValue(1)
6031 character (len=40) :: Units, Ustring
6033 character (len=*),
parameter :: MyFile = &
6034 & __FILE__//
", pio_netcdf_get_time_0d"
6036 TYPE (File_desc_t) :: my_pioFile
6037 TYPE (Var_desc_t) :: my_pioVar
6045 IF (.not.
PRESENT(piofile))
THEN
6054 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
6055 IF (status.eq.pio_noerr)
THEN
6056 IF (
PRESENT(start).and.
PRESENT(total))
THEN
6057 status=pio_get_var(my_piofile, my_piovar, start, total, my_a)
6060 status=pio_get_var(my_piofile, my_piovar, a)
6062 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
6063 WRITE (
stdout,10) trim(myvarname), trim(ncname), &
6069 WRITE (
stdout,20) trim(myvarname), trim(ncname), &
6088 attname(1)=
'scale_factor'
6089 attname(2)=
'add_offset '
6092 & attvalue, foundit, &
6093 & piofile = my_piofile)
6096 IF (.not.foundit(1))
THEN
6099 afactor=real(attvalue(1),dp)
6102 IF (.not.foundit(2))
THEN
6105 aoffset=real(attvalue(2),dp)
6108 IF (foundit(1))
THEN
6112 IF (foundit(2))
THEN
6114 IF (
time_ref.eq.-2) julianoffset=.true.
6125 & unitsvalue, got_units, &
6126 & piofile = my_piofile)
6129 IF (got_units(1))
THEN
6131 lstr=len_trim(units)
6132 ind=index(units,
'since')
6134 CALL time_units (trim(units), year, month, day, hour, &
6136 CALL datenum (my_rdate, year, month, day, hour, minutes, &
6138 IF (rdate(1).ne.my_rdate(1))
THEN
6139 ustring=units(1:ind-2)
6140 SELECT CASE (trim(ustring))
6141 CASE (
'second',
'seconds')
6143 IF (julianoffset)
THEN
6146 dnum_old=my_rdate(2)+a
6148 CALL datestr (dnum_old, .false., dstr_old)
6150 IF (julianoffset)
THEN
6153 a=(my_rdate(2)+a)-rdate(2)
6157 CALL datestr (dnum_new, .false., dstr_new)
6159 CASE (
'hour',
'hours')
6162 IF (julianoffset)
THEN
6165 dnum_old=my_rdate(2)+a*scale
6167 CALL datestr (dnum_old, .false., dstr_old)
6170 IF (julianoffset)
THEN
6173 a=(my_rdate(1)*scale+a)-rdate(1)*scale
6177 dnum_new=rdate(2)+a*scale
6178 CALL datestr (dnum_new, .false., dstr_new)
6180 CASE (
'day',
'days')
6182 IF (julianoffset)
THEN
6185 dnum_old=my_rdate(1)+a
6187 CALL datestr (dnum_old, .true., dstr_old)
6189 IF (julianoffset)
THEN
6192 a=(my_rdate(1)+a)-rdate(1)
6196 CALL datestr (dnum_new, .true., dstr_new)
6208 IF (
PRESENT(min_val))
THEN
6211 IF (
PRESENT(max_val))
THEN
6217 IF (.not.
PRESENT(piofile))
THEN
6221 10
FORMAT (/,
' PIO_NETCDF_GET_TIME_0D - error while reading', &
6222 &
' variable:',2x,a,/,26x,
'in input file:',2x,a, &
6223 & /,26x,
'call from:',2x,a)
6224 20
FORMAT (/,
' PIO_NETCDF_GET_TIME_0D - error while inquiring ID', &
6225 &
' for variable:',2x,a,/,26x,
'in input file:',2x,a, &
6226 & /,22x,
'call from:',2x,a)
6233 & pioFile, start, total, &
6278 integer,
intent(in) :: ng, model
6280 integer,
intent(in),
optional :: start(:)
6281 integer,
intent(in),
optional :: total(:)
6283 character (len=*),
intent(in) :: ncname
6284 character (len=*),
intent(in) :: myVarName
6286 real(dp),
intent(in) :: Rdate(2)
6288 real(dp),
intent(out),
optional :: min_val
6289 real(dp),
intent(out),
optional :: max_val
6291 real(dp),
intent(out) :: A(:)
6293 TYPE (File_desc_t),
intent(in),
optional :: pioFile
6297 logical :: JulianOffset = .false.
6298 logical :: Ldebug = .false.
6300 logical,
dimension(1) :: got_units
6301 logical,
dimension(2) :: foundit
6303 integer :: i, ind, lstr, status
6304 integer :: year, month, day, hour, minutes
6306 integer,
dimension(1) :: Asize
6308 real(dp) :: Afactor, Aoffset, my_Rdate(2), seconds
6309 real(dp) :: dnum_old, dnum_new, scale
6311 real(r8),
dimension(2) :: AttValue
6313 character (len=12) :: AttName(2)
6314 character (len=22) :: dstr_old, dstr_new
6315 character (len=40) :: UnitsAtt(1), UnitsValue(1)
6316 character (len=40) :: Units, Ustring
6318 character (len=*),
parameter :: MyFile = &
6319 & __FILE__//
", pio_netcdf_get_time_1d"
6321 TYPE (File_desc_t) :: my_pioFile
6322 TYPE (Var_desc_t) :: my_pioVar
6328 IF (
PRESENT(start).and.
PRESENT(total))
THEN
6331 asize(1)=asize(1)*total(i)
6334 asize(1)=ubound(a, dim=1)
6339 IF (.not.
PRESENT(piofile))
THEN
6348 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
6349 IF (status.eq.pio_noerr)
THEN
6350 IF (
PRESENT(start).and.
PRESENT(total))
THEN
6351 status=pio_get_var(my_piofile, my_piovar, start, total, a)
6353 status=pio_get_var(my_piofile, my_piovar, a)
6355 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
6356 WRITE (
stdout,10) trim(myvarname), trim(ncname), &
6362 WRITE (
stdout,20) trim(myvarname), trim(ncname), &
6381 attname(1)=
'scale_factor'
6382 attname(2)=
'add_offset '
6385 & attvalue, foundit, &
6386 & piofile = my_piofile)
6389 IF (.not.foundit(1))
THEN
6392 afactor=real(attvalue(1),dp)
6395 IF (.not.foundit(2))
THEN
6398 aoffset=real(attvalue(2),dp)
6401 IF (foundit(1))
THEN
6407 IF (foundit(2))
THEN
6411 IF (
time_ref.eq.-2) julianoffset=.true.
6421 & unitsvalue, got_units, &
6422 & piofile = my_piofile)
6425 IF (got_units(1))
THEN
6427 lstr=len_trim(units)
6428 ind=index(units,
'since')
6430 CALL time_units (trim(units), year, month, day, hour, &
6432 CALL datenum (my_rdate, year, month, day, hour, minutes, &
6434 IF (rdate(1).ne.my_rdate(1))
THEN
6435 ustring=units(1:ind-2)
6436 SELECT CASE (trim(ustring))
6437 CASE (
'second',
'seconds')
6439 IF (julianoffset)
THEN
6442 dnum_old=my_rdate(2)+a(1)
6444 CALL datestr (dnum_old, .false., dstr_old)
6446 IF (julianoffset)
THEN
6452 a(i)=(my_rdate(2)+a(i))-rdate(2)
6456 dnum_new=rdate(2)+a(1)
6457 CALL datestr (dnum_new, .false., dstr_new)
6459 CASE (
'hour',
'hours')
6462 IF (julianoffset)
THEN
6465 dnum_old=my_rdate(2)+a(1)*scale
6467 CALL datestr (dnum_old, .false., dstr_old)
6470 IF (julianoffset)
THEN
6472 a(i)=a(i)-rdate(1)*scale
6476 a(i)=(my_rdate(1)*scale+a(i))-rdate(1)*scale
6481 dnum_new=rdate(2)+a(1)*scale
6482 CALL datestr (dnum_new, .false., dstr_new)
6484 CASE (
'day',
'days')
6486 IF (julianoffset)
THEN
6489 dnum_old=my_rdate(1)+a(1)
6491 CALL datestr (dnum_old, .true., dstr_old)
6493 IF (julianoffset)
THEN
6499 a(i)=(my_rdate(1)+a(i))-rdate(1)
6503 dnum_new=rdate(1)+a(1)
6504 CALL datestr (dnum_new, .true., dstr_new)
6514 IF (
PRESENT(min_val))
THEN
6517 IF (
PRESENT(max_val))
THEN
6523 IF (.not.
PRESENT(piofile))
THEN
6527 10
FORMAT (/,
' PIO_NETCDF_GET_TIME_1D - error while reading', &
6528 &
' variable:',2x,a,/,26x,
'in input file:',2x,a, &
6529 & /,26x,
'call from:',2x,a)
6530 20
FORMAT (/,
' PIO_NETCDF_GET_TIME_1D - error while inquiring ID', &
6531 &
' for variable:',2x,a,/,26x,
'in input file:',2x,a, &
6532 & /,22x,
'call from:',2x,a)
6537#ifdef SINGLE_PRECISION
6540 & A, start, total, &
6578 integer,
intent(in) :: ng, model
6579 integer,
intent(in) :: start(:), total(:)
6581 real(dp),
intent(in) :: A
6583 character (len=*),
intent(in) :: ncname
6584 character (len=*),
intent(in) :: myVarName
6586 TYPE (File_desc_t),
intent(in),
optional :: pioFile
6587 TYPE (Var_desc_t),
intent(in),
optional :: pioVar
6593 real(dp),
dimension(1) :: my_A
6595 character (len=*),
parameter :: MyFile = &
6596 & __FILE__//
", pio_netcdf_put_fvar_0dp"
6598 TYPE (File_desc_t) :: my_pioFile
6599 TYPE (Var_desc_t) :: my_pioVar
6607 IF (.not.
PRESENT(piofile))
THEN
6616 IF (.not.
PRESENT(piovar))
THEN
6617 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
6618 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
6619 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
6631 IF ((start(1).eq.0).and.(total(1).eq.0))
THEN
6632 status=pio_put_var(my_piofile, my_piovar, a)
6635 status=pio_put_var(my_piofile, my_piovar, start, total, my_a)
6637 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
6638 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
6647 IF (.not.
PRESENT(piofile))
THEN
6651 10
FORMAT (/,
' PIO_NETCDF_PUT_FVAR_0DP - error while inquiring ', &
6652 &
'descriptor for variable:',2x,a,/,27x,
'in input file:', &
6653 & 2x,a,/,27x,
'call from:',2x,a)
6654 20
FORMAT (/,
' PIO_NETCDF_PUT_FVAR_0DP - error while writing ', &
6655 &
'variable:',2x,a,/,27x,
'in input file:',2x,a, &
6656 & /,27x,
'call from:',2x,a)
6662 & A, start, total, &
6700 integer,
intent(in) :: ng, model
6701 integer,
intent(in) :: start(:), total(:)
6703 real(dp),
intent(in) :: A(:)
6705 character (len=*),
intent(in) :: ncname
6706 character (len=*),
intent(in) :: myVarName
6708 TYPE (File_desc_t),
intent(in),
optional :: pioFile
6709 TYPE (Var_desc_t),
intent(in),
optional :: pioVar
6715 character (len=*),
parameter :: MyFile = &
6716 & __FILE__//
", pio_netcdf_put_fvar_1dp"
6718 TYPE (File_desc_t) :: my_pioFile
6719 TYPE (Var_desc_t) :: my_pioVar
6727 IF (.not.
PRESENT(piofile))
THEN
6736 IF (.not.
PRESENT(piovar))
THEN
6737 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
6738 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
6739 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
6751 status=pio_put_var(my_piofile, my_piovar, start, total, a)
6752 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
6753 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
6762 IF (.not.
PRESENT(piofile))
THEN
6766 10
FORMAT (/,
' PIO_NETCDF_PUT_FVAR_1DP - error while inquiring ', &
6767 &
'descriptor for variable:',2x,a,/,27x,
'in input file:', &
6768 & 2x,a,/,27x,
'call from:',2x,a)
6769 20
FORMAT (/,
' PIO_NETCDF_PUT_FVAR_1DP - error while writing ', &
6770 &
'variable:',2x,a,/,27x,
'in input file:',2x,a, &
6771 & /,27x,
'call from:',2x,a)
6777 & A, start, total, &
6815 integer,
intent(in) :: ng, model
6816 integer,
intent(in) :: start(:), total(:)
6818 real(dp),
intent(in) :: A(:,:)
6820 character (len=*),
intent(in) :: ncname
6821 character (len=*),
intent(in) :: myVarName
6823 TYPE (File_desc_t),
intent(in),
optional :: pioFile
6824 TYPE (Var_desc_t),
intent(in),
optional :: pioVar
6830 character (len=*),
parameter :: MyFile = &
6831 & __FILE__//
", pio_netcdf_put_fvar_2dp"
6833 TYPE (File_desc_t) :: my_pioFile
6834 TYPE (Var_desc_t) :: my_pioVar
6842 IF (.not.
PRESENT(piofile))
THEN
6851 IF (.not.
PRESENT(piovar))
THEN
6852 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
6853 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
6854 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
6866 status=pio_put_var(my_piofile, my_piovar, start, total, a)
6867 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
6868 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
6877 IF (.not.
PRESENT(piofile))
THEN
6881 10
FORMAT (/,
' PIO_NETCDF_PUT_FVAR_2DP - error while inquiring ', &
6882 &
'descriptor for variable:',2x,a,/,27x,
'in input file:', &
6883 & 2x,a,/,27x,
'call from:',2x,a)
6884 20
FORMAT (/,
' PIO_NETCDF_PUT_FVAR_2DP - error while writing ', &
6885 &
'variable:',2x,a,/,27x,
'in input file:',2x,a, &
6886 & /,27x,
'call from:',2x,a)
6892 & A, start, total, &
6930 integer,
intent(in) :: ng, model
6931 integer,
intent(in) :: start(:), total(:)
6933 real(dp),
intent(in) :: A(:,:,:)
6935 character (len=*),
intent(in) :: ncname
6936 character (len=*),
intent(in) :: myVarName
6938 TYPE (File_desc_t),
intent(in),
optional :: pioFile
6939 TYPE (Var_desc_t),
intent(in),
optional :: pioVar
6945 character (len=*),
parameter :: MyFile = &
6946 & __FILE__//
", pio_netcdf_put_fvar_3dp"
6948 TYPE (File_desc_t) :: my_pioFile
6949 TYPE (Var_desc_t) :: my_pioVar
6957 IF (.not.
PRESENT(piofile))
THEN
6966 IF (.not.
PRESENT(piovar))
THEN
6967 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
6968 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
6969 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
6981 status=pio_put_var(my_piofile, my_piovar, start, total, a)
6982 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
6983 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
6992 IF (.not.
PRESENT(piofile))
THEN
6996 10
FORMAT (/,
' PIO_NETCDF_PUT_FVAR_3DP - error while inquiring ', &
6997 &
'descriptor for variable:',2x,a,/,27x,
'in input file:', &
6998 & 2x,a,/,27x,
'call from:',2x,a,/,27x,a)
6999 20
FORMAT (/,
' PIO_NETCDF_PUT_FVAR_3DP - error while writing ', &
7000 &
'variable:',2x,a,/,27x,
'in input file:',2x,a, &
7001 & /,27x,
'call from:',2x,a,/,27x,a)
7008 & A, start, total, &
7046 integer,
intent(in) :: ng, model
7047 integer,
intent(in) :: start(:), total(:)
7049 real(r8),
intent(in) :: A
7051 character (len=*),
intent(in) :: ncname
7052 character (len=*),
intent(in) :: myVarName
7054 TYPE (File_desc_t),
intent(in),
optional :: pioFile
7055 TYPE (Var_desc_t),
intent(in),
optional :: pioVar
7061 real(r8),
dimension(1) :: my_A
7063 character (len=*),
parameter :: MyFile = &
7064 & __FILE__//
", pio_netcdf_put_fvar_0d"
7066 TYPE (File_desc_t) :: my_pioFile
7067 TYPE (Var_desc_t) :: my_pioVar
7075 IF (.not.
PRESENT(piofile))
THEN
7084 IF (.not.
PRESENT(piovar))
THEN
7085 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
7086 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
7087 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
7099 IF ((start(1).eq.0).and.(total(1).eq.0))
THEN
7100 status=pio_put_var(my_piofile, my_piovar, a)
7103 status=pio_put_var(my_piofile, my_piovar, start, total, my_a)
7105 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
7106 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
7115 IF (.not.
PRESENT(piofile))
THEN
7119 10
FORMAT (/,
' PIO_NETCDF_PUT_FVAR_0D - error while inquiring ', &
7120 &
'descriptor for variable:',2x,a,/,26x,
'in input file:', &
7121 & 2x,a,/,26x,
'call from:',2x,a)
7122 20
FORMAT (/,
' PIO_NETCDF_PUT_FVAR_0D - error while writing ', &
7123 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
7124 & /,26x,
'call from:',2x,a)
7130 & A, start, total, &
7168 integer,
intent(in) :: ng, model
7169 integer,
intent(in) :: start(:), total(:)
7171 real(r8),
intent(in) :: A(:)
7173 character (len=*),
intent(in) :: ncname
7174 character (len=*),
intent(in) :: myVarName
7176 TYPE (File_desc_t),
intent(in),
optional :: pioFile
7177 TYPE (Var_desc_t),
intent(in),
optional :: pioVar
7183 character (len=*),
parameter :: MyFile = &
7184 & __FILE__//
", pio_netcdf_put_fvar_1d"
7186 TYPE (File_desc_t) :: my_pioFile
7187 TYPE (Var_desc_t) :: my_pioVar
7195 IF (.not.
PRESENT(piofile))
THEN
7204 IF (.not.
PRESENT(piovar))
THEN
7205 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
7206 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
7207 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
7219 status=pio_put_var(my_piofile, my_piovar, start, total, a)
7220 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
7221 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
7230 IF (.not.
PRESENT(piofile))
THEN
7234 10
FORMAT (/,
' PIO_NETCDF_PUT_FVAR_1D - error while inquiring ', &
7235 &
'descriptor for variable:',2x,a,/,26x,
'in input file:', &
7236 & 2x,a,/,26x,
'call from:',2x,a)
7237 20
FORMAT (/,
' PIO_NETCDF_PUT_FVAR_1D - error while writing ', &
7238 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
7239 & /,26x,
'call from:',2x,a)
7245 & A, start, total, &
7283 integer,
intent(in) :: ng, model
7284 integer,
intent(in) :: start(:), total(:)
7286 real(r8),
intent(in) :: A(:,:)
7288 character (len=*),
intent(in) :: ncname
7289 character (len=*),
intent(in) :: myVarName
7291 TYPE (File_desc_t),
intent(in),
optional :: pioFile
7292 TYPE (Var_desc_t),
intent(in),
optional :: pioVar
7298 character (len=*),
parameter :: MyFile = &
7299 & __FILE__//
", pio_netcdf_put_fvar_2d"
7301 TYPE (File_desc_t) :: my_pioFile
7302 TYPE (Var_desc_t) :: my_pioVar
7310 IF (.not.
PRESENT(piofile))
THEN
7319 IF (.not.
PRESENT(piovar))
THEN
7320 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
7321 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
7322 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
7334 status=pio_put_var(my_piofile, my_piovar, start, total, a)
7335 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
7336 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
7345 IF (.not.
PRESENT(piofile))
THEN
7349 10
FORMAT (/,
' PIO_NETCDF_PUT_FVAR_2D - error while inquiring ', &
7350 &
'descriptor for variable:',2x,a,/,26x,
'in input file:', &
7351 & 2x,a,/,26x,
'call from:',2x,a)
7352 20
FORMAT (/,
' PIO_NETCDF_PUT_FVAR_2D - error while writing ', &
7353 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
7354 & /,26x,
'call from:',2x,a)
7360 & A, start, total, &
7398 integer,
intent(in) :: ng, model
7399 integer,
intent(in) :: start(:), total(:)
7401 real(r8),
intent(in) :: A(:,:,:)
7403 character (len=*),
intent(in) :: ncname
7404 character (len=*),
intent(in) :: myVarName
7406 TYPE (File_desc_t),
intent(in),
optional :: pioFile
7407 TYPE (Var_desc_t),
intent(in),
optional :: pioVar
7413 character (len=*),
parameter :: MyFile = &
7414 & __FILE__//
", pio_netcdf_put_fvar_3d"
7416 TYPE (File_desc_t) :: my_pioFile
7417 TYPE (Var_desc_t) :: my_pioVar
7425 IF (.not.
PRESENT(piofile))
THEN
7434 IF (.not.
PRESENT(piovar))
THEN
7435 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
7436 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
7437 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
7449 status=pio_put_var(my_piofile, my_piovar, start, total, a)
7450 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
7451 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
7460 IF (.not.
PRESENT(piofile))
THEN
7464 10
FORMAT (/,
' PIO_NETCDF_PUT_FVAR_3D - error while inquiring ', &
7465 &
'descriptor for variable:',2x,a,/,26x,
'in input file:', &
7466 & 2x,a,/,26x,
'call from:',2x,a,/,26x,a)
7467 20
FORMAT (/,
' PIO_NETCDF_PUT_FVAR_3D - error while writing ', &
7468 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
7469 & /,26x,
'call from:',2x,a,/,26x,a)
7475 & A, start, total, &
7513 integer,
intent(in) :: ng, model
7514 integer,
intent(in) :: start(:), total(:)
7516 real(r8),
intent(in) :: A(:,:,:,:)
7518 character (len=*),
intent(in) :: ncname
7519 character (len=*),
intent(in) :: myVarName
7521 TYPE (File_desc_t),
intent(in),
optional :: pioFile
7522 TYPE (Var_desc_t),
intent(in),
optional :: pioVar
7528 character (len=*),
parameter :: MyFile = &
7529 & __FILE__//
", pio_netcdf_put_fvar_4d"
7531 TYPE (File_desc_t) :: my_pioFile
7532 TYPE (Var_desc_t) :: my_pioVar
7540 IF (.not.
PRESENT(piofile))
THEN
7549 IF (.not.
PRESENT(piovar))
THEN
7550 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
7551 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
7552 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
7564 status=pio_put_var(my_piofile, my_piovar, start, total, a)
7565 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
7566 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
7575 IF (.not.
PRESENT(piofile))
THEN
7579 10
FORMAT (/,
' PIO_NETCDF_PUT_FVAR_4D - error while inquiring ', &
7580 &
'descriptor for variable:',2x,a,/,26x,
'in input file:', &
7581 & 2x,a,/,26x,
'call from:',2x,a,/,26x,a)
7582 20
FORMAT (/,
'PIO_NETCDF_PUT_FVAR_4D_PIO - error while writing ', &
7583 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
7584 & /,26x,
'call from:',2x,a,/,26x,a)
7590 & A, start, total, &
7628 integer,
intent(in) :: ng, model
7629 integer,
intent(in) :: start(:), total(:)
7631 integer,
intent(in) :: A
7633 character (len=*),
intent(in) :: ncname
7634 character (len=*),
intent(in) :: myVarName
7636 TYPE (File_desc_t),
intent(in),
optional :: pioFile
7637 TYPE (Var_desc_t),
intent(in),
optional :: pioVar
7643 integer,
dimension(1) :: my_A
7645 character (len=*),
parameter :: MyFile = &
7646 & __FILE__//
", pio_netcdf_put_ivar_0d"
7648 TYPE (File_desc_t) :: my_pioFile
7649 TYPE (Var_desc_t) :: my_pioVar
7657 IF (.not.
PRESENT(piofile))
THEN
7666 IF (.not.
PRESENT(piovar))
THEN
7667 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
7668 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
7669 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
7681 IF ((start(1).eq.0).and.(total(1).eq.0))
THEN
7682 status=pio_put_var(my_piofile, my_piovar, a)
7685 status=pio_put_var(my_piofile, my_piovar, start, total, my_a)
7687 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
7688 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
7697 IF (.not.
PRESENT(piofile))
THEN
7701 10
FORMAT (/,
' PIO_NETCDF_PUT_IVAR_0D - error while inquiring ', &
7702 &
'descriptor for variable:',2x,a,/,26x,
'in input file:', &
7703 & 2x,a,/,26x,
'call from:',2x,a)
7704 20
FORMAT (/,
' PIO_NETCDF_PUT_IVAR_0D - error while writing ', &
7705 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
7706 & /,26x,
'call from:',2x,a)
7712 & A, start, total, &
7750 integer,
intent(in) :: ng, model
7751 integer,
intent(in) :: start(:), total(:)
7753 integer,
intent(in) :: A(:)
7755 character (len=*),
intent(in) :: ncname
7756 character (len=*),
intent(in) :: myVarName
7758 TYPE (File_desc_t),
intent(in),
optional :: pioFile
7759 TYPE (Var_desc_t),
intent(in),
optional :: pioVar
7765 character (len=*),
parameter :: MyFile = &
7766 & __FILE__//
", pio_netcdf_put_ivar_1d"
7768 TYPE (File_desc_t) :: my_pioFile
7769 TYPE (Var_desc_t) :: my_pioVar
7777 IF (.not.
PRESENT(piofile))
THEN
7786 IF (.not.
PRESENT(piovar))
THEN
7787 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
7788 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
7789 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
7801 status=pio_put_var(my_piofile, my_piovar, start, total, a)
7802 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
7803 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
7812 IF (.not.
PRESENT(piofile))
THEN
7816 10
FORMAT (/,
' PIO_NETCDF_PUT_IVAR_1D - error while inquiring ', &
7817 &
'descriptor for variable:',2x,a,/,26x,
'in input file:', &
7818 & 2x,a,/,26x,
'call from:',2x,a)
7819 20
FORMAT (/,
' PIO_NETCDF_PUT_IVAR_1D - error while writing ', &
7820 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
7821 & /,26x,
'call from:',2x,a)
7827 & A, start, total, &
7865 integer,
intent(in) :: ng, model
7866 integer,
intent(in) :: start(:), total(:)
7868 integer,
intent(in) :: A(:,:)
7870 character (len=*),
intent(in) :: ncname
7871 character (len=*),
intent(in) :: myVarName
7873 TYPE (File_desc_t),
intent(in),
optional :: pioFile
7874 TYPE (Var_desc_t),
intent(in),
optional :: pioVar
7880 character (len=*),
parameter :: MyFile = &
7881 & __FILE__//
", pi_netcdf_put_ivar_2d"
7883 TYPE (File_desc_t) :: my_pioFile
7884 TYPE (Var_desc_t) :: my_pioVar
7892 IF (.not.
PRESENT(piofile))
THEN
7901 IF (.not.
PRESENT(piovar))
THEN
7902 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
7903 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
7904 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
7916 status=pio_put_var(my_piofile, my_piovar, start, total, a)
7917 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
7918 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
7927 IF (.not.
PRESENT(piofile))
THEN
7931 10
FORMAT (/,
' PIO_NETCDF_PUT_IVAR_2D - error while inquiring ', &
7932 &
'descriptor for variable:',2x,a,/,26x,
'in input file:', &
7933 & 2x,a,/,26x,
'call from:',2x,a)
7934 20
FORMAT (/,
' PIO_NETCDF_PUT_IVAR_2D - error while writing ', &
7935 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
7936 & /,26x,
'call from:',2x,a)
7942 & A, start, total, &
7983 integer,
intent(in) :: ng, model
7984 integer,
intent(in) :: start(:), total(:)
7986 logical,
intent(in) :: A
7988 character (len=*),
intent(in) :: ncname
7989 character (len=*),
intent(in) :: myVarName
7991 TYPE (File_desc_t),
intent(in),
optional :: pioFile
7992 TYPE (Var_desc_t),
intent(in),
optional :: pioVar
7999 integer,
dimension(1) :: my_AI
8001 character (len=*),
parameter :: MyFile = &
8002 & __FILE__//
", pio_netcdf_put_lvar_0d"
8004 TYPE (File_desc_t) :: my_pioFile
8005 TYPE (Var_desc_t) :: my_pioVar
8013 IF (.not.
PRESENT(piofile))
THEN
8022 IF (.not.
PRESENT(piovar))
THEN
8023 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
8024 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
8025 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
8046 IF ((start(1).eq.0).and.(total(1).eq.0))
THEN
8047 status=pio_put_var(my_piofile, my_piovar, ai)
8050 status=pio_put_var(my_piofile, my_piovar, start, total, my_ai)
8052 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
8053 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
8062 IF (.not.
PRESENT(piofile))
THEN
8066 10
FORMAT (/,
' PIO_NETCDF_PUT_LVAR_0D - error while inquiring ', &
8067 &
'descriptor for variable:',2x,a,/,26x,
'in input file:', &
8068 & 2x,a,/,26x,
'call from:',2x,a)
8069 20
FORMAT (/,
'PIO_NETCDF_PUT_LVAR_0D - error while writing ', &
8070 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
8071 & /,26x,
'call from:',2x,a)
8077 & A, start, total, &
8118 integer,
intent(in) :: ng, model
8119 integer,
intent(in) :: start(:), total(:)
8121 logical,
intent(in) :: A(:)
8123 character (len=*),
intent(in) :: ncname
8124 character (len=*),
intent(in) :: myVarName
8126 TYPE (File_desc_t),
intent(in),
optional :: pioFile
8127 TYPE (Var_desc_t),
intent(in),
optional :: pioVar
8131 integer :: i, status
8133 integer,
dimension(SIZE(A,1)) :: AI
8135 character (len=*),
parameter :: MyFile = &
8136 & __FILE__//
", pio_netcdf_put_lvar_1d"
8138 TYPE (File_desc_t) :: my_pioFile
8139 TYPE (Var_desc_t) :: my_pioVar
8147 IF (.not.
PRESENT(piofile))
THEN
8156 IF (.not.
PRESENT(piovar))
THEN
8157 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
8158 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
8159 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
8182 status=pio_put_var(my_piofile, my_piovar, start, total, ai)
8183 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
8184 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
8193 IF (.not.
PRESENT(piofile))
THEN
8197 10
FORMAT (/,
' PIO_NETCDF_PUT_LVAR_1D - error while inquiring ', &
8198 &
'descriptor for variable:',2x,a,/,26x,
'in input file:', &
8199 & 2x,a,/,26x,
'call from:',2x,a)
8200 20
FORMAT (/,
' PIO_NETCDF_PUT_LVAR_1D - error while writing ', &
8201 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
8202 & /,26x,
'call from:',2x,a)
8208 & A, start, total, &
8249 integer,
intent(in) :: ng, model
8250 integer,
intent(in) :: start(:), total(:)
8252 logical,
intent(in) :: A(:,:)
8254 character (len=*),
intent(in) :: ncname
8255 character (len=*),
intent(in) :: myVarName
8257 TYPE (File_desc_t),
intent(in),
optional :: pioFile
8258 TYPE (Var_desc_t),
intent(in),
optional :: pioVar
8262 integer :: i, j, status
8264 integer,
dimension(SIZE(A,1),SIZE(A,2)) :: AI
8266 character (len=*),
parameter :: MyFile = &
8267 & __FILE__//
", pio_netcdf_put_lvar_2d"
8269 TYPE (File_desc_t) :: my_pioFile
8270 TYPE (Var_desc_t) :: my_pioVar
8278 IF (.not.
PRESENT(piofile))
THEN
8287 IF (.not.
PRESENT(piovar))
THEN
8288 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
8289 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
8290 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
8315 status=pio_put_var(my_piofile, my_piovar, start, total, ai)
8316 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
8317 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
8326 IF (.not.
PRESENT(piofile))
THEN
8330 10
FORMAT (/,
' PIO_NETCDF_PUT_LVAR_2D - error while inquiring ', &
8331 &
'descriptor for variable:',2x,a,/,26x,
'in input file:', &
8332 & 2x,a,/,26x,
'call from:',2x,a)
8333 20
FORMAT (/,
' PIO_NETCDF_PUT_LVAR_2D - error while writing ', &
8334 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
8335 & /,26x,
'call from:',2x,a)
8341 & A, start, total, &
8390 integer,
intent(in) :: ng, model
8392 integer,
intent(in) :: start(:), total(:)
8394 character (len=*),
intent(in) :: A
8395 character (len=*),
intent(in) :: ncname
8396 character (len=*),
intent(in) :: myVarName
8398 TYPE (File_desc_t),
intent(in),
optional :: pioFile
8399 TYPE (Var_desc_t),
intent(in),
optional :: pioVar
8405 character (len=LEN(A)),
dimension(1) :: my_A
8407 character (len=*),
parameter :: MyFile = &
8408 & __FILE__//
", pio_netcdf_put_svar_0d"
8410 TYPE (File_desc_t) :: my_pioFile
8411 TYPE (Var_desc_t) :: my_pioVar
8419 IF (.not.
PRESENT(piofile))
THEN
8428 IF (.not.
PRESENT(piovar))
THEN
8429 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
8430 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
8431 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
8443 IF ((start(1).eq.1).and.(total(1).eq.1))
THEN
8444 status=pio_put_var(my_piofile, my_piovar, a)
8447 status=pio_put_var(my_piofile, my_piovar, start, total, my_a)
8449 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
8450 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
8459 IF (.not.
PRESENT(piofile))
THEN
8463 10
FORMAT (/,
' PIO_NETCDF_PUT_SVAR_0D - error while inquiring ', &
8464 &
'descriptor for variable:',2x,a,/,26x,
'in input file:', &
8465 & 2x,a,/,26x,
'call from:',2x,a)
8466 20
FORMAT (/,
' PIO_NETCDF_PUT_SVAR_0D - error while writing ', &
8467 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
8468 & /,26x,
'call from:',2x,a)
8474 & A, start, total, &
8524 integer,
intent(in) :: ng, model
8526 integer,
intent(in) :: start(:), total(:)
8528 character (len=*),
intent(in) :: A(:)
8530 character (len=*),
intent(in) :: ncname
8531 character (len=*),
intent(in) :: myVarName
8533 TYPE (File_desc_t),
intent(in),
optional :: pioFile
8534 TYPE (Var_desc_t),
intent(in),
optional :: pioVar
8540 character (len=*),
parameter :: MyFile = &
8541 & __FILE__//
", pio_netcdf_put_svar_1d"
8543 TYPE (File_desc_t) :: my_pioFile
8544 TYPE (Var_desc_t) :: my_pioVar
8552 IF (.not.
PRESENT(piofile))
THEN
8561 IF (.not.
PRESENT(piovar))
THEN
8562 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
8563 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
8564 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
8576 status=pio_put_var(my_piofile, my_piovar, start, total, a)
8577 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
8578 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
8587 IF (.not.
PRESENT(piofile))
THEN
8591 10
FORMAT (/,
' PIO_NETCDF_PUT_SVAR_1D - error while inquiring ', &
8592 &
'descriptor for variable:',2x,a,/,26x,
'in input file:', &
8593 & 2x,a,/,26x,
'call from:',2x,a)
8594 20
FORMAT (/,
' PIO_NETCDF_PUT_SVAR_1D - error while writing ', &
8595 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
8596 & /,26x,
'call from:',2x,a)
8602 & A, start, total, &
8652 integer,
intent(in) :: ng, model
8654 integer,
intent(in) :: start(:), total(:)
8656 character (len=*),
intent(in) :: A(:,:)
8658 character (len=*),
intent(in) :: ncname
8659 character (len=*),
intent(in) :: myVarName
8661 TYPE (File_desc_t),
intent(in),
optional :: pioFile
8662 TYPE (Var_desc_t),
intent(in),
optional :: pioVar
8668 character (len=*),
parameter :: MyFile = &
8669 & __FILE__//
", pio_netcdf_put_svar_2d"
8671 TYPE (File_desc_t) :: my_pioFile
8672 TYPE (Var_desc_t) :: my_pioVar
8680 IF (.not.
PRESENT(piofile))
THEN
8689 IF (.not.
PRESENT(piovar))
THEN
8690 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
8691 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
8692 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
8704 status=pio_put_var(my_piofile, my_piovar, start, total, a)
8705 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
8706 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
8715 IF (.not.
PRESENT(piofile))
THEN
8719 10
FORMAT (/,
' PIO_NETCDF_PUT_SVAR_2D - error while inquiring ', &
8720 &
'descriptor for variable:',2x,a,/,26x,
'in input file:', &
8721 & 2x,a,/,26x,
'call from:',2x,a)
8722 20
FORMAT (/,
' PIO_NETCDF_PUT_SVAR_2D - error while writing ', &
8723 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
8724 & /,26x,
'call from:',2x,a)
8730 & A, start, total, &
8780 integer,
intent(in) :: ng, model
8782 integer,
intent(in) :: start(:), total(:)
8784 character (len=*),
intent(in) :: A(:,:,:)
8786 character (len=*),
intent(in) :: ncname
8787 character (len=*),
intent(in) :: myVarName
8789 TYPE (File_desc_t),
intent(in),
optional :: pioFile
8790 TYPE (Var_desc_t),
intent(in),
optional :: pioVar
8796 character (len=*),
parameter :: MyFile = &
8797 & __FILE__//
", pio_netcdf_put_svar_3d"
8799 TYPE (File_desc_t) :: my_pioFile
8800 TYPE (Var_desc_t) :: my_pioVar
8808 IF (.not.
PRESENT(piofile))
THEN
8817 IF (.not.
PRESENT(piovar))
THEN
8818 status=pio_inq_varid(my_piofile, trim(myvarname), my_piovar)
8819 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
8820 IF (
master)
WRITE (
stdout,10) trim(myvarname), trim(ncname), &
8832 status=pio_put_var(my_piofile, my_piovar, start, total, a)
8833 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
8834 IF (
master)
WRITE (
stdout,20) trim(myvarname), trim(ncname), &
8843 IF (.not.
PRESENT(piofile))
THEN
8847 10
FORMAT (/,
' PIO_NETCDF_PUT_SVAR_3D - error while inquiring ', &
8848 &
'descriptor for variable:',2x,a,/,26x,
'in input file:', &
8849 & 2x,a,/,26x,
'call from:',2x,a)
8850 20
FORMAT (/,
' PIO_NETCDF_PUT_SVAR_3D - error while writing ', &
8851 &
'variable:',2x,a,/,26x,
'in input file:',2x,a, &
8852 & /,26x,
'call from:',2x,a)
8879 integer,
intent(in) :: ng, model
8881 logical,
intent(in),
optional :: lupdate
8883 character (len=*),
intent(in),
optional :: ncname
8885 TYPE (file_desc_t),
intent(inout) :: piofile
8890 logical :: my_lupdate
8893 integer :: fileh, i, status
8895 integer :: is, ie, lstr
8898 character (len=200) :: my_ncname
8900 character (len=512) :: bio_file
8903 character (len=*),
parameter :: myfile = &
8904 & __FILE__//
", pio_netcdf_close"
8910 IF (
ASSOCIATED(piofile%iosystem))
THEN
8911 DO i=1,len(my_ncname)
8915 IF (.not.
PRESENT(ncname))
THEN
8921 status=pio_get_att(piofile, pio_global,
'file', my_ncname)
8923 my_ncname=trim(ncname)
8933 IF (.not.
PRESENT(lupdate))
THEN
8941 IF (my_lupdate)
THEN
8947 lstr=len_trim(bioname(i))
8950 bio_file(is:ie)=trim(bioname(i))
8956 lstr=len_trim(bio_file)-1
8958 status=pio_put_att(piofile, pio_global,
'bio_file', &
8960 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
8962 & trim(my_ncname), &
8978 IF (
master)
WRITE (
dbout,
'(a,1x," <= ",i8,2(2x,a))') &
8983 CALL pio_closefile (piofile)
8989 10
FORMAT (/,
' PIO_NETCDF_CLOSE - error while writing global ', &
8990 &
'attribute:',2x,a,/,20x,
'file:',2x,a,/,20x, &
8991 &
'call from:',2x,a)
9020 integer,
intent(in) :: ng, model
9022 character (len=*),
intent(in) :: ncname
9024 TYPE (file_desc_t),
intent(out) :: piofile
9028 integer :: iotype, my_cmode, status
9030 character (len=80) :: text
9032 character (len=*),
parameter :: myfile = &
9033 & __FILE__//
", pio_netcdf_create"
9046 iotype=pio_iotype_pnetcdf
9048 my_cmode=ior(pio_clobber, pio_64bit_data)
9049 text=
'Parallel read and write NetCDF3 file (CDF-5 type)'
9051 my_cmode=ior(pio_clobber, pio_64bit_offset)
9052 text=
'Parallel read and write NetCDF3 file (64-bit offset)'
9055 iotype=pio_iotype_netcdf
9056 my_cmode=ior(pio_clobber, pio_64bit_offset)
9057 text=
'Serial read and write NetCDF3 file (64-bit offset)'
9059 iotype=pio_iotype_netcdf4c
9060 my_cmode=pio_clobber
9061 text=
'Parallel read and serial write NetCDF4/HDF5 file'
9063 iotype=pio_iotype_netcdf4p
9064 my_cmode=pio_clobber
9065 text=
'Parallel read and write NetCDF4/HDF5 file'
9073 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
9082 IF (
master)
WRITE (
dbout,
'(a," ** ",i8,2(2x,a))') &
9088 10
FORMAT (/,
' PIO_NETCDF_CREATE - unable to create output NetCDF ', &
9089 &
'file:',/,21x,a,/,21x,
'call from:',2x,a)
9090 20
FORMAT (21x,a,
', ioType = ',i0)
9117 integer,
intent(in) :: ng, model
9119 character (len=*),
intent(in) :: ncname
9121 TYPE (file_desc_t),
intent(inout) :: piofile
9127 character (len=*),
parameter :: myfile = &
9128 & __FILE__//
", pio_netcdf_enddef"
9134 status=pio_enddef(piofile)
9135 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
9141 10
FORMAT (/,
' PIO_NETCDF_ENDDEF - unable to end definition mode', &
9142 &
' for file:',/,21x,a,/,21x,
'call from:',2x,a)
9173 integer,
intent(in) :: ng, model, omode
9175 character (len=*),
intent(in) :: ncname
9177 TYPE (file_desc_t),
intent(out) :: piofile
9181 integer :: my_omode, status
9183 character (len=*),
parameter :: myfile = &
9184 & __FILE__//
", pio_netcdf_open"
9192 my_omode=pio_nowrite
9196 my_omode=pio_nowrite
9204 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
9211 IF (
master)
WRITE (
dbout,
'(a,2x," => ",i8,2(2x,a))') &
9217 10
FORMAT (/,
' PIO_NETCDF_OPEN - unable to open existing NetCDF ', &
9218 &
'file:',/,19x,a,/,19x,
'call from:',2x,a)
9244 integer,
intent(in) :: ng, model
9246 character (len=*),
intent(in) :: ncname
9248 TYPE (file_desc_t),
intent(inout) :: piofile
9254 character (len=*),
parameter :: myfile = &
9255 & __FILE__//
", pio_netcdf_redef"
9261 status=pio_redef(piofile)
9262 IF (
founderror(status, pio_noerr, __line__, myfile))
THEN
9268 10
FORMAT (/,
' PIO_NETCDF_REDEF - unable to put in definition mode', &
9269 &
' file:',/,20x,a,/,20x,
'call from:',2x,a)
9295 integer,
intent(in) :: ng, model
9297 character (len=*),
intent(in) :: ncname
9299 TYPE (file_desc_t) :: piofile
9303 character (len=*),
parameter :: myfile = &
9304 & __FILE__//
", pio_netcdf_sync"
9310# if defined ASYNCHRONOUS_PIO || defined ASYNCHRONOUS_SCORPIO
9313 CALL pio_syncfile (piofile)
subroutine, public datestr(datenumber, isdayunits, datestring)
subroutine, public time_units(ustring, year, month, day, hour, minutes, seconds)
subroutine, public datenum(datenumber, year, month, day, hour, minutes, seconds)
character(len=256) varname
character(len=256) sourcefile
integer, dimension(:), allocatable istvar
character(len=maxlen), dimension(6, 0:nv) vname
integer, dimension(:), allocatable idsvar
integer, dimension(nvara) var_aint
character(len=1024), dimension(nvara) var_achar
integer, dimension(mvars) var_flag
integer, dimension(mdims) dim_id
character(len=100), dimension(mdims) dim_name
integer, dimension(mvars) var_ndim
integer, dimension(mdims) dim_size
character(len=100), dimension(mvars) var_name
character(len=100), dimension(matts) att_name
integer, dimension(mvars) var_id
integer, dimension(matts) att_kind
integer, dimension(nvard, mvars) var_dim
integer, dimension(mvars) var_natt
real(r8), dimension(nvara) var_afloat
integer, dimension(nvard) var_dsize
integer, dimension(nvard) var_dids
character(len=100), dimension(nvard) var_dname
character(len=100), dimension(nvara) var_aname
integer, dimension(mvars) var_type
integer, dimension(:), allocatable n
type(t_iobounds), dimension(:), allocatable iobounds
character(len=3), dimension(4) kernelstring
integer, dimension(:), allocatable nt
type(io_desc_t), dimension(:), pointer iodesc_sp_w3dvar
type(io_desc_t), dimension(:), pointer iodesc_sp_v2dobc
type(io_desc_t), dimension(:), pointer iodesc_dp_r3dvar
type(io_desc_t), dimension(:), pointer iodesc_sp_u3dvar
type(io_desc_t), dimension(:), pointer iodesc_dp_v2dobc
integer, parameter pio_type
type(io_desc_t), dimension(:), pointer iodesc_sp_u2dfrc
subroutine, public pio_netcdf_check_var(ng, model, ncname, piofile)
type(io_desc_t), dimension(:), pointer iodesc_dp_resid
subroutine pio_netcdf_get_svar_0d(ng, model, ncname, myvarname, a, piofile, start, total)
type(io_desc_t), dimension(:), pointer iodesc_sp_bvec
type(io_desc_t), dimension(:), pointer iodesc_dp_v3dobc
type(io_desc_t), dimension(:), pointer iodesc_dp_r2dhar
subroutine pio_netcdf_copy_att(ng, model, varname, attname, inp_ncname, inp_piofile, inp_varid, out_ncname, out_piofile, out_varid)
type(iosystem_desc_t), dimension(:,:), allocatable, target piosystem
subroutine, public pio_netcdf_redef(ng, model, ncname, piofile)
subroutine pio_netcdf_put_ivar_2d(ng, model, ncname, myvarname, a, start, total, piofile, piovar)
type(io_desc_t), dimension(:), pointer iodesc_dp_tkevar
subroutine pio_netcdf_get_fvar_2dp(ng, model, ncname, myvarname, a, piofile, start, total, broadcast, min_val, max_val)
type(io_desc_t), dimension(:), pointer iodesc_sp_trcvar
type(io_desc_t), dimension(:), pointer iodesc_dp_bvec
type(io_desc_t), dimension(:), pointer iodesc_dp_p3dvar
subroutine, public pio_netcdf_sync(ng, model, ncname, piofile)
subroutine pio_netcdf_get_fvar_4d(ng, model, ncname, myvarname, a, piofile, start, total, broadcast, min_val, max_val)
type(io_desc_t), dimension(:), pointer iodesc_dp_b3dvar
type(io_desc_t), dimension(:), pointer iodesc_sp_u2dvar
type(io_desc_t), dimension(:), pointer iodesc_dp_u3dobc
type(io_desc_t), dimension(:), pointer iodesc_sp_r3dobc
type(io_desc_t), dimension(:), pointer iodesc_dp_u3dvar
type(io_desc_t), dimension(:), pointer iodesc_dp_u2dobc
subroutine pio_netcdf_get_fvar_3dp(ng, model, ncname, myvarname, a, piofile, start, total, broadcast, min_val, max_val)
subroutine pio_netcdf_put_fvar_0dp(ng, model, ncname, myvarname, a, start, total, piofile, piovar)
subroutine pio_netcdf_get_fatt_r8(ng, model, ncname, piovar, attname, attvalue, foundit, piofile)
type(io_desc_t), dimension(:), pointer iodesc_sp_r2dobc
subroutine pio_netcdf_put_fvar_1d(ng, model, ncname, myvarname, a, start, total, piofile, piovar)
integer, parameter pio_fout
type(io_desc_t), dimension(:), pointer iodesc_dp_u3dhar
subroutine pio_netcdf_put_fvar_2d(ng, model, ncname, myvarname, a, start, total, piofile, piovar)
subroutine pio_netcdf_put_fvar_3dp(ng, model, ncname, myvarname, a, start, total, piofile, piovar)
type(io_desc_t), dimension(:), pointer iodesc_dp_ubar
type(var_desc_t), dimension(:), pointer var_desc
subroutine pio_netcdf_get_svar_1d(ng, model, ncname, myvarname, a, piofile, start, total)
type(io_desc_t), dimension(:), pointer iodesc_dp_v3dhar
type(io_desc_t), dimension(:), pointer iodesc_sp_tkevar
type(io_desc_t), dimension(:), pointer iodesc_sp_r2dvar
subroutine pio_netcdf_put_fvar_4d(ng, model, ncname, myvarname, a, start, total, piofile, piovar)
type(io_desc_t), dimension(:), pointer iodesc_dp_ruvel
subroutine pio_netcdf_put_ivar_1d(ng, model, ncname, myvarname, a, start, total, piofile, piovar)
subroutine pio_netcdf_put_lvar_2d(ng, model, ncname, myvarname, a, start, total, piofile, piovar)
subroutine pio_netcdf_get_fvar_0d(ng, model, ncname, myvarname, a, piofile, start, total, broadcast, min_val, max_val)
subroutine pio_netcdf_put_svar_3d(ng, model, ncname, myvarname, a, start, total, piofile, piovar)
integer, parameter pio_frst
type(io_desc_t), dimension(:), pointer iodesc_dp_l3dvar
character(len=1024) cioranks
character(len=10) pio_methodname
type(io_desc_t), dimension(:), pointer iodesc_sp_v2dhar
subroutine pio_netcdf_put_lvar_0d(ng, model, ncname, myvarname, a, start, total, piofile, piovar)
type(io_desc_t), dimension(:), pointer iodesc_dp_rtides
subroutine, public pio_netcdf_create(ng, model, ncname, piofile)
subroutine pio_netcdf_put_ivar_0d(ng, model, ncname, myvarname, a, start, total, piofile, piovar)
type(io_desc_t), dimension(:), pointer iodesc_sp_l3dvar
character(len=1024) ccompranks
type(io_desc_t), dimension(:), pointer iodesc_dp_rzeta
subroutine pio_netcdf_get_svar_3d(ng, model, ncname, myvarname, a, piofile, start, total)
type(io_desc_t), dimension(:), pointer iodesc_sp_l4dvar
type(io_desc_t), dimension(:), pointer iodesc_sp_rzeta
type(io_desc_t), dimension(:), pointer iodesc_sp_u3dobc
subroutine pio_netcdf_get_svar_2d(ng, model, ncname, myvarname, a, piofile, start, total)
subroutine pio_netcdf_get_fvar_1dp(ng, model, ncname, myvarname, a, piofile, start, total, broadcast, min_val, max_val)
subroutine pio_netcdf_put_svar_1d(ng, model, ncname, myvarname, a, start, total, piofile, piovar)
type(io_desc_t), dimension(:), pointer iodesc_dp_u2dfrc
type(io_desc_t), dimension(:), pointer iodesc_dp_uvel
subroutine, public pio_netcdf_inq_var(ng, model, ncname, piofile, myvarname, searchvar, piovar, nvardim, nvaratt)
type(io_desc_t), dimension(:), pointer iodesc_dp_r2dobc
type(io_desc_t), dimension(:), pointer iodesc_sp_b3dvar
logical function pio_netcdf_find_var(ng, model, piofile, varname, piovar)
subroutine pio_netcdf_get_fvar_0dp(ng, model, ncname, myvarname, a, piofile, start, total, broadcast, min_val, max_val)
subroutine, public pio_netcdf_close(ng, model, piofile, ncname, lupdate)
type(io_desc_t), dimension(:), pointer iodesc_dp_v2dhar
subroutine pio_netcdf_get_lvar_1d(ng, model, ncname, myvarname, a, piofile, start, total)
type(io_desc_t), dimension(:), pointer iodesc_sp_r3dhar
type(io_desc_t), dimension(:), pointer iodesc_sp_rvvel
type(io_desc_t), dimension(:), pointer iodesc_sp_r2dhar
subroutine pio_netcdf_put_lvar_1d(ng, model, ncname, myvarname, a, start, total, piofile, piovar)
type(io_desc_t), dimension(:), pointer iodesc_sp_u2dhar
subroutine pio_netcdf_get_satt_v(ng, model, ncname, piovar, attname, attvalue, foundit, piofile)
type(io_desc_t), dimension(:), pointer iodesc_sp_u2dobc
type(io_desc_t), dimension(:), pointer iodesc_dp_rvvel
subroutine, public pio_netcdf_get_dim(ng, model, ncname, piofile, dimname, dimsize, dimid)
type(io_desc_t), dimension(:), pointer iodesc_sp_v3dhar
subroutine, public pio_netcdf_open(ng, model, ncname, omode, piofile)
type(io_desc_t), dimension(:), pointer iodesc_dp_l4dvar
type(io_desc_t), dimension(:), pointer iodesc_dp_u2dvar
type(io_desc_t), dimension(:), pointer iodesc_dp_v2dfrc
type(io_desc_t), dimension(:), pointer iodesc_sp_u3dhar
type(io_desc_t), dimension(:), pointer iodesc_dp_vvel
type(io_desc_t), dimension(:), pointer iodesc_dp_u2dhar
type(io_desc_t), dimension(:), pointer iodesc_dp_rvbar
type(io_desc_t), dimension(:), pointer iodesc_dp_p2dvar
subroutine pio_netcdf_put_fvar_2dp(ng, model, ncname, myvarname, a, start, total, piofile, piovar)
type(io_desc_t), dimension(:), pointer iodesc_dp_v3dvar
type(io_desc_t), dimension(:), pointer iodesc_sp_rtides
subroutine pio_netcdf_get_ivar_1d(ng, model, ncname, myvarname, a, piofile, start, total)
type(io_desc_t), dimension(:), pointer iodesc_sp_vbar
type(io_desc_t), dimension(:), pointer iodesc_dp_vbar
subroutine pio_netcdf_put_svar_0d(ng, model, ncname, myvarname, a, start, total, piofile, piovar)
type(io_desc_t), dimension(:), pointer iodesc_sp_v2dfrc
subroutine pio_netcdf_get_fvar_3d(ng, model, ncname, myvarname, a, piofile, start, total, broadcast, min_val, max_val)
subroutine, public pio_netcdf_check_dim(ng, model, ncname, piofile)
subroutine, public pio_netcdf_inq_varid(ng, model, ncname, myvarname, piofile, piovar)
subroutine pio_netcdf_put_fvar_1dp(ng, model, ncname, myvarname, a, start, total, piofile, piovar)
subroutine pio_netcdf_get_lvar_0d(ng, model, ncname, myvarname, a, piofile, start, total)
integer, parameter pio_tout
type(io_desc_t), dimension(:), pointer iodesc_sp_rvbar
type(io_desc_t), dimension(:), pointer iodesc_sp_sworkd
subroutine pio_netcdf_get_fvar_1d(ng, model, ncname, myvarname, a, piofile, start, total, broadcast, min_val, max_val)
type(io_desc_t), dimension(:), pointer iodesc_dp_w3dvar
type(io_desc_t), dimension(:), pointer iodesc_dp_r2dfrc
type(io_desc_t), dimension(:), pointer iodesc_sp_p3dvar
type(io_desc_t), dimension(:), pointer iodesc_dp_v2dvar
type(io_desc_t), dimension(:), pointer iodesc_dp_zeta
type(io_desc_t), dimension(:), pointer iodesc_sp_resid
type(io_desc_t), dimension(:), pointer iodesc_sp_vvel
type(io_desc_t), dimension(:), pointer iodesc_sp_ubar
type(io_desc_t), dimension(:), pointer iodesc_sp_uvel
subroutine pio_netcdf_get_time_0d(ng, model, ncname, myvarname, rdate, a, piofile, start, total, min_val, max_val)
subroutine pio_netcdf_get_satt_g(ng, model, ncname, varid, attname, attvalue, foundit, piofile)
type(io_desc_t), dimension(:), pointer iodesc_sp_zeta
type(io_desc_t), dimension(:), pointer iodesc_sp_v3dvar
type(io_desc_t), dimension(:), pointer iodesc_sp_r3dvar
subroutine pio_netcdf_get_ivar_2d(ng, model, ncname, myvarname, a, piofile, start, total)
subroutine pio_netcdf_get_fatt_dp(ng, model, ncname, piovar, attname, attvalue, foundit, piofile)
type(io_desc_t), dimension(:), pointer iodesc_dp_r2dvar
subroutine pio_netcdf_put_fvar_0d(ng, model, ncname, myvarname, a, start, total, piofile, piovar)
type(io_desc_t), dimension(:), pointer iodesc_sp_ruvel
type(io_desc_t), dimension(:), pointer iodesc_dp_r3dobc
type(io_desc_t), dimension(:), pointer iodesc_dp_rubar
type(io_desc_t), dimension(:), pointer iodesc_dp_sworkd
subroutine, public pio_netcdf_enddef(ng, model, ncname, piofile)
subroutine pio_netcdf_get_ivar_0d(ng, model, ncname, myvarname, a, piofile, start, total)
type(io_desc_t), dimension(:), pointer iodesc_sp_rubar
type(io_desc_t), dimension(:), pointer iodesc_sp_v3dobc
subroutine pio_netcdf_put_svar_2d(ng, model, ncname, myvarname, a, start, total, piofile, piovar)
type(io_desc_t), dimension(:), pointer iodesc_sp_p2dvar
type(io_desc_t), dimension(:), pointer iodesc_sp_v2dvar
type(io_desc_t), dimension(:), pointer iodesc_sp_r2dfrc
subroutine pio_netcdf_get_time_1d(ng, model, ncname, myvarname, rdate, a, piofile, start, total, min_val, max_val)
type(io_desc_t), dimension(:), pointer iodesc_dp_r3dhar
subroutine pio_netcdf_get_fvar_2d(ng, model, ncname, myvarname, a, piofile, start, total, broadcast, min_val, max_val)
subroutine pio_netcdf_put_fvar_3d(ng, model, ncname, myvarname, a, start, total, piofile, piovar)
type(io_desc_t), dimension(:), pointer iodesc_dp_trcvar
real(dp), dimension(:), allocatable theta_s
real(dp), parameter spval_check
logical, dimension(:,:,:), allocatable lobc
integer, dimension(:), allocatable nfrec
real(dp), dimension(:), allocatable tcline
real(dp), dimension(:), allocatable theta_b
real(r8), dimension(:,:,:), allocatable vdecay
real(dp), dimension(:), allocatable hc
real(r8), dimension(4) hgamma
real(r8), dimension(:,:,:), allocatable hdecayb
integer, dimension(:), allocatable nbrec
integer, dimension(:), allocatable vstretching
real(r8), dimension(:,:,:), allocatable vdecayb
real(r8), dimension(:,:,:), allocatable hdecay
real(r8), dimension(4) vgamma
integer, dimension(:), allocatable vtransform
character(len(sinp)) function, public lowercase(sinp)
logical function, public find_string(a, asize, string, aindex)
logical function, public founderror(flag, noerr, line, routine)