diff --git a/.travis.yml b/.travis.yml index c775591bda1..264281f128c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,8 +42,10 @@ env: script: - autoreconf -i - export CFLAGS='-std=c99 -fsanitize=address -fno-omit-frame-pointer' - - export FFLAGS='-std=c99 -fsanitize=address -fno-omit-frame-pointer' - - ./configure + - export FFLAGS='-fsanitize=address -fno-omit-frame-pointer' + - export FCFLAGS='-fsanitize=address -fno-omit-frame-pointer' + - export DISTCHECK_CONFIGURE_FLAGS='--enable-fortran' + - ./configure --enable-fortran - make -j distcheck - rm -rf build - mkdir build diff --git a/Makefile.am b/Makefile.am index b0f8f56ba49..cfb6176cb0e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,3 +6,5 @@ SUBDIRS = src tests examples # Look in the m4 directory for autotools stuff. ACLOCAL_AMFLAGS= -I m4 + +EXTRA_DIST = CMakeLists.txt set_flags.am diff --git a/configure.ac b/configure.ac index 4246aa0e991..ddb0da877ca 100644 --- a/configure.ac +++ b/configure.ac @@ -12,6 +12,9 @@ AC_CONFIG_MACRO_DIR([m4]) # Find and learn about the C compiler. AC_PROG_CC +# Find and learn about the Fortran compiler. +AC_PROG_FC + # Libtool initialisation. AC_PROG_LIBTOOL @@ -38,6 +41,16 @@ if test "x$enable_logging" = xyes; then AC_DEFINE([PIO_ENABLE_LOGGING], 1, [If true, turn on logging.]) fi + +# Does the user want to enable Fortran library? +AC_MSG_CHECKING([whether Fortran library should be build]) +AC_ARG_ENABLE([fortran], + [AS_HELP_STRING([--enable-fortran], + [build the PIO Fortran library.])]) +test "x$enable_fortran" = xyes || enable_fortran=no +AC_MSG_RESULT([$enable_fortran]) +AM_CONDITIONAL(BUILD_FORTRAN, [test "x$enable_fortran" = xyes]) + # Does the user want to disable pnetcdf? AC_MSG_CHECKING([whether pnetcdf is to be used]) AC_ARG_ENABLE([pnetcdf], @@ -45,16 +58,11 @@ AC_ARG_ENABLE([pnetcdf], [Disable pnetcdf use.])]) test "x$enable_pnetcdf" = xno || enable_pnetcdf=yes AC_MSG_RESULT([$enable_pnetcdf]) -if test "x$enable_logging" = xyes; then - AC_DEFINE([PIO_ENABLE_LOGGING], 1, [If true, turn on logging.]) -fi +AM_CONDITIONAL(BUILD_PNETCDF, [test "x$enable_pnetcdf" = xyes]) # NetCDF (at least classic) is required for PIO to build. AC_DEFINE([_NETCDF], [1], [netCDF classic library available]) -# Is parallel-netcdf library available? -#AC_DEFINE([_PNETCDF], [1], [parallel-netcdf library available]) - # The PIO version, again. AC_DEFINE([PIO_VERSION_MAJOR], [2], [PIO major version]) AC_DEFINE([PIO_VERSION_MINOR], [4], [PIO minor version]) @@ -100,6 +108,7 @@ AC_MSG_RESULT([${have_netcdf_par}]) if test x$have_netcdf_par = xyes; then AC_DEFINE([_NETCDF4],[1],[Does netCDF library provide netCDF-4 with parallel access]) fi +AM_CONDITIONAL(BUILD_NETCDF4, [test "x$have_netcdf_par" = xyes]) # Not working for some reason, so I will just set it... AC_CHECK_TYPE([MPI_Offset], [], [], [#include ]) @@ -112,6 +121,15 @@ fi #AC_CHECK_SIZEOF([MPI_Offset], [], [[#include ]]) #AC_DEFINE([SIZEOF_MPI_OFFSET], [8], [netCDF classic library available]) +AC_CONFIG_FILES(src/flib/piodarray.F90:src/flib/piodarray.F90.in2) +AC_CONFIG_FILES(src/flib/pionfatt_mod.F90:src/flib/pionfatt_mod.F90.in2) +AC_CONFIG_FILES(src/flib/pionfget_mod.F90:src/flib/pionfget_mod.F90.in2) +AC_CONFIG_FILES(src/flib/pionfput_mod.F90:src/flib/pionfput_mod.F90.in2) + +AC_CONFIG_FILES([tests/general/pio_tutil.F90:tests/general/util/pio_tutil.F90]) + +AC_CONFIG_LINKS([tests/unit/input.nl:tests/unit/input.nl]) + # Create the config.h file. AC_CONFIG_HEADERS([config.h]) @@ -119,7 +137,11 @@ AC_CONFIG_HEADERS([config.h]) AC_OUTPUT(Makefile src/Makefile src/clib/Makefile + src/flib/Makefile tests/Makefile tests/cunit/Makefile + tests/unit/Makefile + tests/general/Makefile + tests/general/util/Makefile examples/Makefile examples/c/Makefile) diff --git a/set_flags.am b/set_flags.am new file mode 100644 index 00000000000..438deee610d --- /dev/null +++ b/set_flags.am @@ -0,0 +1,18 @@ +# This is part of the PIO package. +# +# Assemble the CPPFLAGS and for PIO Fortran tests. +# +# Ed Hartnett 3/26/19 + +# Set the CPPFLAGS. +AM_CPPFLAGS = -I$(top_srcdir)/src/flib -D_NETCDF + +# Is the user building with pnetcdf? +if BUILD_PNETCDF +AM_CPPFLAGS += -D_PETCDF +endif + +# Is the user building with netCDF-4 parallel I/O? +if BUILD_NETCDF4 +AM_CPPFLAGS += -D_NETCDF4 +endif diff --git a/src/Makefile.am b/src/Makefile.am index 82d1b94a386..68e4497dfb0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,4 +2,11 @@ # Ed Hartnett -SUBDIRS = clib +# Does the user want to build fortran? +if BUILD_FORTRAN +FLIB = flib +endif + +SUBDIRS = clib $(FLIB) + +EXTRA_DIST = CMakeLists.txt diff --git a/src/clib/Makefile.am b/src/clib/Makefile.am index c3cb37d1515..1703f5d0e01 100644 --- a/src/clib/Makefile.am +++ b/src/clib/Makefile.am @@ -17,3 +17,5 @@ libpio_la_SOURCES = bget.c pioc_sc.c pio_darray.c pio_file.c \ pio_getput_int.c pio_msg.c pio_nc.c pio_rearrange.c pioc.c \ pioc_support.c pio_darray_int.c pio_get_nc.c pio_lists.c pio_nc4.c \ pio_put_nc.c pio_spmd.c pio_internal.h bget.h uthash.h + +EXTRA_DIST = CMakeLists.txt diff --git a/src/flib/Makefile.am b/src/flib/Makefile.am new file mode 100644 index 00000000000..6557dd9ecf1 --- /dev/null +++ b/src/flib/Makefile.am @@ -0,0 +1,62 @@ +## This is the automake file to build the PIO Fortran library. +# Ed Hartnett 3/19/19 + +# Turn off parallel builds in this directory. +.NOTPARALLEL: + +# The library we are building. +lib_LTLIBRARIES = libpiof.la + +AM_CPPFLAGS = -D_NETCDF -D_NETCDF4 -D_PETCDF + +# These linker flags specify libtool version info. +# See http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning +# for information regarding incrementing `-version-info`. +libpiof_la_LDFLAGS = -version-info 1:0:0 + +# The library soure files. +libpiof_la_LIBADD = libpio_nf.la libpio_kinds.la \ +libpio_support.la libpiodarray.la libpionfatt.la libpionfget.la \ +libpionfput.la libpiolib_mod.la libpio.la + +libpiof_la_SOURCES = pio_types.F90 + +# Build these uninstalled convenience libraries. +noinst_LTLIBRARIES = libpio_kinds.la libpio_types.la \ +libpio_support.la libpio_nf.la libpiodarray.la libpionfatt.la \ +libpionfget.la libpionfput.la libpiolib_mod.la libpio.la + +# The convenience libraries depends on their source. +libpio_kinds_la_SOURCES = pio_kinds.F90 +libpio_types_la_SOURCES = pio_types.F90 +libpio_support_la_SOURCES = pio_support.F90 +libpio_nf_la_SOURCES = pio_nf.F90 +libpiodarray_la_SOURCES = piodarray.F90 +libpionfatt_la_SOURCES = pionfatt_mod.F90 +libpionfget_la_SOURCES = pionfget_mod.F90 +libpionfput_la_SOURCES = pionfput_mod.F90 +libpiolib_mod_la_SOURCES = piolib_mod.F90 +libpio_la_SOURCES = pio.F90 + +# Each mod file depends on the .o file. +pio_kinds.mod: pio_kinds.$(OBJEXT) +pio_types.mod: pio_types.$(OBJEXT) +pio_support.mod: pio_support.$(OBJEXT) +pio_nf.mod: pio_nf.$(OBJEXT) +piodarray.mod: piodarray.$(OBJEXT) +pionfatt_mod.mod: pionfatt_mod.$(OBJEXT) +pionfget_mod.mod: pionfget_mod.$(OBJEXT) +pionfput_mod.mod: pionfput_mod.$(OBJEXT) +piolib_mod.mod: piolib_mod.$(OBJEXT) +pio.mod: pio.$(OBJEXT) + +# Mod files are built and then installed as headers. +MODFILES = pio_kinds.mod pio_types.mod pio_support.mod pio_nf.mod \ +piodarray.mod pionfatt_mod.mod pionfget_mod.mod pionfput_mod.mod \ +piolib_mod.mod pio.mod +BUILT_SOURCES = $(MODFILES) +include_HEADERS = $(MODFILES) + +CLEANFILES = *.mod + +EXTRA_DIST = CMakeLists.txt diff --git a/src/flib/piodarray.F90.in2 b/src/flib/piodarray.F90.in2 new file mode 100644 index 00000000000..2aa70dfd5c3 --- /dev/null +++ b/src/flib/piodarray.F90.in2 @@ -0,0 +1,2787 @@ +!=================================================== +! DO NOT EDIT THIS FILE, it was generated using genf90/src/genf90/genf90.pl +! Any changes you make to this file may be lost +!=================================================== +#define __PIO_FILE__ 'piodarray' +!> +!! @file +!! @brief Read and write routines for decomposed data. +!< +module piodarray + use pio_types, only : file_desc_t, io_desc_t, var_desc_t + use pio_kinds, only : i4, r4, r8, pio_offset_kind + use pio_support, only : piodie + use iso_c_binding +#ifdef TIMING + use perf_mod, only : t_startf, t_stopf !_EXTERNAL +#endif + implicit none + + private + public :: pio_read_darray, pio_write_darray, pio_set_buffer_size_limit + + +!> +!! @defgroup PIO_write_darray PIO_write_darray +!! @brief The overloaded PIO_write_darray writes a distributed array to disk. +!< +# 24 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + interface PIO_write_darray +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure write_darray_1d_real +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure write_darray_2d_real +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure write_darray_3d_real +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure write_darray_4d_real +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure write_darray_5d_real +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure write_darray_6d_real +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure write_darray_7d_real +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure write_darray_1d_int +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure write_darray_2d_int +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure write_darray_3d_int +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure write_darray_4d_int +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure write_darray_5d_int +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure write_darray_6d_int +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure write_darray_7d_int +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure write_darray_1d_double +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure write_darray_2d_double +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure write_darray_3d_double +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure write_darray_4d_double +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure write_darray_5d_double +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure write_darray_6d_double +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure write_darray_7d_double +! TYPE real,int,double + module procedure write_darray_multi_1d_real +! TYPE real,int,double + module procedure write_darray_multi_1d_int +! TYPE real,int,double + module procedure write_darray_multi_1d_double + end interface + + +!> +!! @defgroup PIO_read_darray PIO_read_darray +!! @brief The overloaded PIO_read_darray function reads a distributed array from disk. +!< +# 37 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + interface PIO_read_darray +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure read_darray_1d_real +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure read_darray_2d_real +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure read_darray_3d_real +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure read_darray_4d_real +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure read_darray_5d_real +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure read_darray_6d_real +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure read_darray_7d_real +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure read_darray_1d_int +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure read_darray_2d_int +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure read_darray_3d_int +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure read_darray_4d_int +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure read_darray_5d_int +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure read_darray_6d_int +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure read_darray_7d_int +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure read_darray_1d_double +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure read_darray_2d_double +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure read_darray_3d_double +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure read_darray_4d_double +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure read_darray_5d_double +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure read_darray_6d_double +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 + module procedure read_darray_7d_double + end interface + + + character(len=*), parameter, private :: modName='piodarray' + +#ifdef MEMCHK +integer :: msize, rss, mshare, mtext, mstack, lastrss=0 +#endif + +# 50 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" +interface +# 51 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + integer(C_INT) function PIOc_write_darray(ncid, vid, ioid, arraylen, array, fillvalue) & + bind(C,name="PIOc_write_darray") + use iso_c_binding + integer(C_INT), value :: ncid + integer(C_INT), value :: vid + integer(C_INT), value :: ioid + integer(C_SIZE_T), value :: arraylen + type(c_ptr), value :: array + type(C_PTR), value :: fillvalue +# 60 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end function PIOc_write_darray +end interface + +# 63 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" +interface +# 64 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + integer(C_INT) function PIOc_write_darray_multi(ncid, vid, ioid, nvars, arraylen, array, fillvalue) & + bind(C,name="PIOc_write_darray_multi") + use iso_c_binding + integer(C_INT), value :: ncid + integer(C_INT) :: vid(nvars) + integer(C_INT), value :: ioid + integer(C_INT), value :: nvars + integer(C_SIZE_T), value :: arraylen + type(c_ptr), value :: array + type(C_PTR), value :: fillvalue +# 74 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end function PIOc_write_darray_multi +end interface + +# 77 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" +interface +# 78 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + integer(C_INT) function PIOc_read_darray(ncid, vid, ioid, arraylen, array) & + bind(C,name="PIOc_read_darray") + use iso_c_binding + integer(C_INT), value :: ncid + integer(C_INT), value :: vid + integer(C_INT), value :: ioid + integer(C_SIZE_T), value :: arraylen + type(C_PTR), value :: array +# 86 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end function PIOc_read_darray +end interface + + +# 90 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" +contains + +# 92 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine pio_set_buffer_size_limit(limit) + integer(PIO_OFFSET_KIND), intent(in) :: limit + integer(PIO_OFFSET_KIND) :: oldval +# 95 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + interface +# 96 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + integer(C_LONG_LONG) function PIOc_set_buffer_size_limit(limit) & + bind(C,name="PIOc_set_buffer_size_limit") + use iso_c_binding + integer(C_LONG_LONG), value :: limit +# 100 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end function PIOc_set_buffer_size_limit + end interface + if(limit<0) then + call piodie(__PIO_FILE__,__LINE__,' bad value to buffer_size_limit: ',int(limit)) + end if + oldval = PIOc_set_buffer_size_limit(limit) + +# 107 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine pio_set_buffer_size_limit + +! TYPE real,int,double +# 110 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_1d_cinterface_real (File,varDesc,ioDesc, arraylen, array, iostat, fillval) + use iso_c_binding + ! !DESCRIPTION: + ! Writes a 2-d slab of TYPE to a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + real(r4), dimension(*), target, intent(in) :: & + array ! array to be written + + real(r4), optional, target, intent(in) :: fillval ! rearrange receiver fill value + + integer,intent(in) :: arraylen + integer(i4), intent(out) :: iostat + integer(C_SIZE_T) :: carraylen + type(C_PTR) :: cptr + carraylen = int(arraylen,C_SIZE_T) + cptr = C_LOC(array) +#ifdef TIMING + call t_startf("PIO:write_darray_real") +#endif + if(present(fillval)) then + iostat = PIOc_write_darray(file%fh, varDesc%varid-1, iodesc%ioid, carraylen,cptr, C_LOC(fillval)) + else + iostat = PIOc_write_darray(file%fh, varDesc%varid-1, iodesc%ioid, carraylen, cptr, C_NULL_PTR) + endif +#ifdef TIMING + call t_stopf("PIO:write_darray_real") +#endif +# 151 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_1d_cinterface_real +! TYPE real,int,double +# 110 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_1d_cinterface_int (File,varDesc,ioDesc, arraylen, array, iostat, fillval) + use iso_c_binding + ! !DESCRIPTION: + ! Writes a 2-d slab of TYPE to a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + integer(i4), dimension(*), target, intent(in) :: & + array ! array to be written + + integer(i4), optional, target, intent(in) :: fillval ! rearrange receiver fill value + + integer,intent(in) :: arraylen + integer(i4), intent(out) :: iostat + integer(C_SIZE_T) :: carraylen + type(C_PTR) :: cptr + carraylen = int(arraylen,C_SIZE_T) + cptr = C_LOC(array) +#ifdef TIMING + call t_startf("PIO:write_darray_int") +#endif + if(present(fillval)) then + iostat = PIOc_write_darray(file%fh, varDesc%varid-1, iodesc%ioid, carraylen,cptr, C_LOC(fillval)) + else + iostat = PIOc_write_darray(file%fh, varDesc%varid-1, iodesc%ioid, carraylen, cptr, C_NULL_PTR) + endif +#ifdef TIMING + call t_stopf("PIO:write_darray_int") +#endif +# 151 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_1d_cinterface_int +! TYPE real,int,double +# 110 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_1d_cinterface_double (File,varDesc,ioDesc, arraylen, array, iostat, fillval) + use iso_c_binding + ! !DESCRIPTION: + ! Writes a 2-d slab of TYPE to a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + real(r8), dimension(*), target, intent(in) :: & + array ! array to be written + + real(r8), optional, target, intent(in) :: fillval ! rearrange receiver fill value + + integer,intent(in) :: arraylen + integer(i4), intent(out) :: iostat + integer(C_SIZE_T) :: carraylen + type(C_PTR) :: cptr + carraylen = int(arraylen,C_SIZE_T) + cptr = C_LOC(array) +#ifdef TIMING + call t_startf("PIO:write_darray_double") +#endif + if(present(fillval)) then + iostat = PIOc_write_darray(file%fh, varDesc%varid-1, iodesc%ioid, carraylen,cptr, C_LOC(fillval)) + else + iostat = PIOc_write_darray(file%fh, varDesc%varid-1, iodesc%ioid, carraylen, cptr, C_NULL_PTR) + endif +#ifdef TIMING + call t_stopf("PIO:write_darray_double") +#endif +# 151 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_1d_cinterface_double + +! TYPE real,int,double +# 154 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_multi_1d_cinterface_real (File,varDesc,ioDesc,nvars,arraylen, array, iostat, fillval) + use iso_c_binding + ! !DESCRIPTION: + ! Writes a 2-d slab of TYPE to a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc(:) ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + integer, intent(in) :: nvars + + real(r4), dimension(*), target, intent(in) :: array ! array to be written + + real(r4), optional, target, intent(in) :: fillval ! rearrange receiver fill value + + integer,intent(in) :: arraylen + integer(i4), intent(out) :: iostat + integer(C_INT) :: varid(nvars) + integer(C_SIZE_T) :: carraylen + type(C_PTR) :: cptr + integer :: i + carraylen = int(arraylen,C_SIZE_T) + + cptr = C_LOC(array) + do i=1,nvars + varid(i) = vardesc(i)%varid-1 + end do + + if(present(fillval)) then + iostat = PIOc_write_darray_multi(file%fh, varid, iodesc%ioid, nvars, carraylen,cptr, C_LOC(fillval)) + else + iostat = PIOc_write_darray_multi(file%fh, varid, iodesc%ioid, nvars, carraylen, cptr, C_NULL_PTR) + endif + +# 198 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_multi_1d_cinterface_real +! TYPE real,int,double +# 154 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_multi_1d_cinterface_int (File,varDesc,ioDesc,nvars,arraylen, array, iostat, fillval) + use iso_c_binding + ! !DESCRIPTION: + ! Writes a 2-d slab of TYPE to a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc(:) ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + integer, intent(in) :: nvars + + integer(i4), dimension(*), target, intent(in) :: array ! array to be written + + integer(i4), optional, target, intent(in) :: fillval ! rearrange receiver fill value + + integer,intent(in) :: arraylen + integer(i4), intent(out) :: iostat + integer(C_INT) :: varid(nvars) + integer(C_SIZE_T) :: carraylen + type(C_PTR) :: cptr + integer :: i + carraylen = int(arraylen,C_SIZE_T) + + cptr = C_LOC(array) + do i=1,nvars + varid(i) = vardesc(i)%varid-1 + end do + + if(present(fillval)) then + iostat = PIOc_write_darray_multi(file%fh, varid, iodesc%ioid, nvars, carraylen,cptr, C_LOC(fillval)) + else + iostat = PIOc_write_darray_multi(file%fh, varid, iodesc%ioid, nvars, carraylen, cptr, C_NULL_PTR) + endif + +# 198 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_multi_1d_cinterface_int +! TYPE real,int,double +# 154 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_multi_1d_cinterface_double (File,varDesc,ioDesc,nvars,arraylen, array, iostat, fillval) + use iso_c_binding + ! !DESCRIPTION: + ! Writes a 2-d slab of TYPE to a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc(:) ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + integer, intent(in) :: nvars + + real(r8), dimension(*), target, intent(in) :: array ! array to be written + + real(r8), optional, target, intent(in) :: fillval ! rearrange receiver fill value + + integer,intent(in) :: arraylen + integer(i4), intent(out) :: iostat + integer(C_INT) :: varid(nvars) + integer(C_SIZE_T) :: carraylen + type(C_PTR) :: cptr + integer :: i + carraylen = int(arraylen,C_SIZE_T) + + cptr = C_LOC(array) + do i=1,nvars + varid(i) = vardesc(i)%varid-1 + end do + + if(present(fillval)) then + iostat = PIOc_write_darray_multi(file%fh, varid, iodesc%ioid, nvars, carraylen,cptr, C_LOC(fillval)) + else + iostat = PIOc_write_darray_multi(file%fh, varid, iodesc%ioid, nvars, carraylen, cptr, C_NULL_PTR) + endif + +# 198 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_multi_1d_cinterface_double + +! TYPE real,int,double +!> +!! @public +!! @ingroup PIO_write_darray +!! @brief Writes a 1D array of type real. +!! @details +!! @param File \ref file_desc_t +!! @param varDesc \ref var_desc_t +!! @param ioDesc \ref io_desc_t +!! @param array : The data to be written +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!! @param fillval : An optional fill value to fill holes in the data written +!< +# 213 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_multi_1d_real (File,varDesc,ioDesc, array, iostat, fillval) + ! !DESCRIPTION: + ! Writes a block of TYPE to a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc(:) ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + real(r4), dimension(:), target, intent(in) :: & + array ! array to be written + + real(r4), optional, target, intent(in) :: fillval ! rearrange receiver fill value + integer(i4), intent(out) :: iostat + + character(len=*), parameter :: subName=modName//'::write_darray_real' + integer :: nvars + + nvars = size(vardesc) + + call write_darray_multi_1d_cinterface_real (file, varDesc, iodesc, nvars, size(array), array, iostat, fillval) + +# 244 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_multi_1d_real +! TYPE real,int,double +!> +!! @public +!! @ingroup PIO_write_darray +!! @brief Writes a 1D array of type int. +!! @details +!! @param File \ref file_desc_t +!! @param varDesc \ref var_desc_t +!! @param ioDesc \ref io_desc_t +!! @param array : The data to be written +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!! @param fillval : An optional fill value to fill holes in the data written +!< +# 213 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_multi_1d_int (File,varDesc,ioDesc, array, iostat, fillval) + ! !DESCRIPTION: + ! Writes a block of TYPE to a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc(:) ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + integer(i4), dimension(:), target, intent(in) :: & + array ! array to be written + + integer(i4), optional, target, intent(in) :: fillval ! rearrange receiver fill value + integer(i4), intent(out) :: iostat + + character(len=*), parameter :: subName=modName//'::write_darray_int' + integer :: nvars + + nvars = size(vardesc) + + call write_darray_multi_1d_cinterface_int (file, varDesc, iodesc, nvars, size(array), array, iostat, fillval) + +# 244 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_multi_1d_int +! TYPE real,int,double +!> +!! @public +!! @ingroup PIO_write_darray +!! @brief Writes a 1D array of type double. +!! @details +!! @param File \ref file_desc_t +!! @param varDesc \ref var_desc_t +!! @param ioDesc \ref io_desc_t +!! @param array : The data to be written +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!! @param fillval : An optional fill value to fill holes in the data written +!< +# 213 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_multi_1d_double (File,varDesc,ioDesc, array, iostat, fillval) + ! !DESCRIPTION: + ! Writes a block of TYPE to a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc(:) ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + real(r8), dimension(:), target, intent(in) :: & + array ! array to be written + + real(r8), optional, target, intent(in) :: fillval ! rearrange receiver fill value + integer(i4), intent(out) :: iostat + + character(len=*), parameter :: subName=modName//'::write_darray_double' + integer :: nvars + + nvars = size(vardesc) + + call write_darray_multi_1d_cinterface_double (file, varDesc, iodesc, nvars, size(array), array, iostat, fillval) + +# 244 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_multi_1d_double + +! TYPE real,int,double +# 247 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_1d_real (File,varDesc,ioDesc, array, iostat, fillval) + ! !DESCRIPTION: + ! Writes a block of TYPE to a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + real(r4), dimension(:), target, intent(in) :: & + array ! array to be written + + real(r4), optional, target, intent(in) :: fillval ! rearrange receiver fill value + integer(i4), intent(out) :: iostat + + character(len=*), parameter :: subName=modName//'::write_darray_real' + + call write_darray_1d_cinterface_real (file, varDesc, iodesc, size(array), array, iostat, fillval) + +# 275 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_1d_real +! TYPE real,int,double +# 247 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_1d_int (File,varDesc,ioDesc, array, iostat, fillval) + ! !DESCRIPTION: + ! Writes a block of TYPE to a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + integer(i4), dimension(:), target, intent(in) :: & + array ! array to be written + + integer(i4), optional, target, intent(in) :: fillval ! rearrange receiver fill value + integer(i4), intent(out) :: iostat + + character(len=*), parameter :: subName=modName//'::write_darray_int' + + call write_darray_1d_cinterface_int (file, varDesc, iodesc, size(array), array, iostat, fillval) + +# 275 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_1d_int +! TYPE real,int,double +# 247 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_1d_double (File,varDesc,ioDesc, array, iostat, fillval) + ! !DESCRIPTION: + ! Writes a block of TYPE to a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + real(r8), dimension(:), target, intent(in) :: & + array ! array to be written + + real(r8), optional, target, intent(in) :: fillval ! rearrange receiver fill value + integer(i4), intent(out) :: iostat + + character(len=*), parameter :: subName=modName//'::write_darray_double' + + call write_darray_1d_cinterface_double (file, varDesc, iodesc, size(array), array, iostat, fillval) + +# 275 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_1d_double + +! TYPE real,int,double +! DIMS 2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_write_darray +!! @brief Writes a 2D array of type real. +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The data to be written +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!! @param fillval : An optional fill value to fill holes in the data written +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_2d_real (File,varDesc,ioDesc, array, iostat, fillval) + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + real(r4), intent(in) :: & + array(:,:) ! array to be written + + real(r4), optional, intent(in) :: fillval ! rearrange receiver fill value + + integer(i4), intent(out) :: iostat + real(r4) :: transvar(1), dumbvar(0) + +! This code is required due to a bug in gfortran 4.7.2 +#if (__GFORTRAN__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 8) + real(r4), allocatable :: acopy(:) + integer :: isize + + isize= size(array) + allocate(acopy(isize)) + acopy = reshape(array,(/isize/)) + call write_darray_1d_real (File, varDesc, iodesc, acopy, iostat, fillval) + deallocate(acopy) + return +#else +! cannot call transfer function with a 0 sized array + if(size(array)==0) then + call write_darray_1d_real (File, varDesc, iodesc, dumbvar, iostat) + else + call write_darray_1d_real (File, varDesc, iodesc, transfer(array,transvar), iostat, fillval) + end if +#endif +# 330 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_2d_real +! TYPE real,int,double +! DIMS 2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_write_darray +!! @brief Writes a 3D array of type real. +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The data to be written +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!! @param fillval : An optional fill value to fill holes in the data written +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_3d_real (File,varDesc,ioDesc, array, iostat, fillval) + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + real(r4), intent(in) :: & + array(:,:,:) ! array to be written + + real(r4), optional, intent(in) :: fillval ! rearrange receiver fill value + + integer(i4), intent(out) :: iostat + real(r4) :: transvar(1), dumbvar(0) + +! This code is required due to a bug in gfortran 4.7.2 +#if (__GFORTRAN__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 8) + real(r4), allocatable :: acopy(:) + integer :: isize + + isize= size(array) + allocate(acopy(isize)) + acopy = reshape(array,(/isize/)) + call write_darray_1d_real (File, varDesc, iodesc, acopy, iostat, fillval) + deallocate(acopy) + return +#else +! cannot call transfer function with a 0 sized array + if(size(array)==0) then + call write_darray_1d_real (File, varDesc, iodesc, dumbvar, iostat) + else + call write_darray_1d_real (File, varDesc, iodesc, transfer(array,transvar), iostat, fillval) + end if +#endif +# 330 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_3d_real +! TYPE real,int,double +! DIMS 2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_write_darray +!! @brief Writes a 4D array of type real. +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The data to be written +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!! @param fillval : An optional fill value to fill holes in the data written +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_4d_real (File,varDesc,ioDesc, array, iostat, fillval) + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + real(r4), intent(in) :: & + array(:,:,:,:) ! array to be written + + real(r4), optional, intent(in) :: fillval ! rearrange receiver fill value + + integer(i4), intent(out) :: iostat + real(r4) :: transvar(1), dumbvar(0) + +! This code is required due to a bug in gfortran 4.7.2 +#if (__GFORTRAN__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 8) + real(r4), allocatable :: acopy(:) + integer :: isize + + isize= size(array) + allocate(acopy(isize)) + acopy = reshape(array,(/isize/)) + call write_darray_1d_real (File, varDesc, iodesc, acopy, iostat, fillval) + deallocate(acopy) + return +#else +! cannot call transfer function with a 0 sized array + if(size(array)==0) then + call write_darray_1d_real (File, varDesc, iodesc, dumbvar, iostat) + else + call write_darray_1d_real (File, varDesc, iodesc, transfer(array,transvar), iostat, fillval) + end if +#endif +# 330 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_4d_real +! TYPE real,int,double +! DIMS 2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_write_darray +!! @brief Writes a 5D array of type real. +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The data to be written +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!! @param fillval : An optional fill value to fill holes in the data written +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_5d_real (File,varDesc,ioDesc, array, iostat, fillval) + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + real(r4), intent(in) :: & + array(:,:,:,:,:) ! array to be written + + real(r4), optional, intent(in) :: fillval ! rearrange receiver fill value + + integer(i4), intent(out) :: iostat + real(r4) :: transvar(1), dumbvar(0) + +! This code is required due to a bug in gfortran 4.7.2 +#if (__GFORTRAN__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 8) + real(r4), allocatable :: acopy(:) + integer :: isize + + isize= size(array) + allocate(acopy(isize)) + acopy = reshape(array,(/isize/)) + call write_darray_1d_real (File, varDesc, iodesc, acopy, iostat, fillval) + deallocate(acopy) + return +#else +! cannot call transfer function with a 0 sized array + if(size(array)==0) then + call write_darray_1d_real (File, varDesc, iodesc, dumbvar, iostat) + else + call write_darray_1d_real (File, varDesc, iodesc, transfer(array,transvar), iostat, fillval) + end if +#endif +# 330 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_5d_real +! TYPE real,int,double +! DIMS 2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_write_darray +!! @brief Writes a 6D array of type real. +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The data to be written +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!! @param fillval : An optional fill value to fill holes in the data written +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_6d_real (File,varDesc,ioDesc, array, iostat, fillval) + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + real(r4), intent(in) :: & + array(:,:,:,:,:,:) ! array to be written + + real(r4), optional, intent(in) :: fillval ! rearrange receiver fill value + + integer(i4), intent(out) :: iostat + real(r4) :: transvar(1), dumbvar(0) + +! This code is required due to a bug in gfortran 4.7.2 +#if (__GFORTRAN__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 8) + real(r4), allocatable :: acopy(:) + integer :: isize + + isize= size(array) + allocate(acopy(isize)) + acopy = reshape(array,(/isize/)) + call write_darray_1d_real (File, varDesc, iodesc, acopy, iostat, fillval) + deallocate(acopy) + return +#else +! cannot call transfer function with a 0 sized array + if(size(array)==0) then + call write_darray_1d_real (File, varDesc, iodesc, dumbvar, iostat) + else + call write_darray_1d_real (File, varDesc, iodesc, transfer(array,transvar), iostat, fillval) + end if +#endif +# 330 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_6d_real +! TYPE real,int,double +! DIMS 2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_write_darray +!! @brief Writes a 7D array of type real. +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The data to be written +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!! @param fillval : An optional fill value to fill holes in the data written +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_7d_real (File,varDesc,ioDesc, array, iostat, fillval) + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + real(r4), intent(in) :: & + array(:,:,:,:,:,:,:) ! array to be written + + real(r4), optional, intent(in) :: fillval ! rearrange receiver fill value + + integer(i4), intent(out) :: iostat + real(r4) :: transvar(1), dumbvar(0) + +! This code is required due to a bug in gfortran 4.7.2 +#if (__GFORTRAN__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 8) + real(r4), allocatable :: acopy(:) + integer :: isize + + isize= size(array) + allocate(acopy(isize)) + acopy = reshape(array,(/isize/)) + call write_darray_1d_real (File, varDesc, iodesc, acopy, iostat, fillval) + deallocate(acopy) + return +#else +! cannot call transfer function with a 0 sized array + if(size(array)==0) then + call write_darray_1d_real (File, varDesc, iodesc, dumbvar, iostat) + else + call write_darray_1d_real (File, varDesc, iodesc, transfer(array,transvar), iostat, fillval) + end if +#endif +# 330 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_7d_real +! TYPE real,int,double +! DIMS 2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_write_darray +!! @brief Writes a 2D array of type int. +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The data to be written +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!! @param fillval : An optional fill value to fill holes in the data written +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_2d_int (File,varDesc,ioDesc, array, iostat, fillval) + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + integer(i4), intent(in) :: & + array(:,:) ! array to be written + + integer(i4), optional, intent(in) :: fillval ! rearrange receiver fill value + + integer(i4), intent(out) :: iostat + integer(i4) :: transvar(1), dumbvar(0) + +! This code is required due to a bug in gfortran 4.7.2 +#if (__GFORTRAN__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 8) + integer(i4), allocatable :: acopy(:) + integer :: isize + + isize= size(array) + allocate(acopy(isize)) + acopy = reshape(array,(/isize/)) + call write_darray_1d_int (File, varDesc, iodesc, acopy, iostat, fillval) + deallocate(acopy) + return +#else +! cannot call transfer function with a 0 sized array + if(size(array)==0) then + call write_darray_1d_int (File, varDesc, iodesc, dumbvar, iostat) + else + call write_darray_1d_int (File, varDesc, iodesc, transfer(array,transvar), iostat, fillval) + end if +#endif +# 330 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_2d_int +! TYPE real,int,double +! DIMS 2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_write_darray +!! @brief Writes a 3D array of type int. +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The data to be written +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!! @param fillval : An optional fill value to fill holes in the data written +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_3d_int (File,varDesc,ioDesc, array, iostat, fillval) + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + integer(i4), intent(in) :: & + array(:,:,:) ! array to be written + + integer(i4), optional, intent(in) :: fillval ! rearrange receiver fill value + + integer(i4), intent(out) :: iostat + integer(i4) :: transvar(1), dumbvar(0) + +! This code is required due to a bug in gfortran 4.7.2 +#if (__GFORTRAN__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 8) + integer(i4), allocatable :: acopy(:) + integer :: isize + + isize= size(array) + allocate(acopy(isize)) + acopy = reshape(array,(/isize/)) + call write_darray_1d_int (File, varDesc, iodesc, acopy, iostat, fillval) + deallocate(acopy) + return +#else +! cannot call transfer function with a 0 sized array + if(size(array)==0) then + call write_darray_1d_int (File, varDesc, iodesc, dumbvar, iostat) + else + call write_darray_1d_int (File, varDesc, iodesc, transfer(array,transvar), iostat, fillval) + end if +#endif +# 330 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_3d_int +! TYPE real,int,double +! DIMS 2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_write_darray +!! @brief Writes a 4D array of type int. +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The data to be written +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!! @param fillval : An optional fill value to fill holes in the data written +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_4d_int (File,varDesc,ioDesc, array, iostat, fillval) + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + integer(i4), intent(in) :: & + array(:,:,:,:) ! array to be written + + integer(i4), optional, intent(in) :: fillval ! rearrange receiver fill value + + integer(i4), intent(out) :: iostat + integer(i4) :: transvar(1), dumbvar(0) + +! This code is required due to a bug in gfortran 4.7.2 +#if (__GFORTRAN__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 8) + integer(i4), allocatable :: acopy(:) + integer :: isize + + isize= size(array) + allocate(acopy(isize)) + acopy = reshape(array,(/isize/)) + call write_darray_1d_int (File, varDesc, iodesc, acopy, iostat, fillval) + deallocate(acopy) + return +#else +! cannot call transfer function with a 0 sized array + if(size(array)==0) then + call write_darray_1d_int (File, varDesc, iodesc, dumbvar, iostat) + else + call write_darray_1d_int (File, varDesc, iodesc, transfer(array,transvar), iostat, fillval) + end if +#endif +# 330 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_4d_int +! TYPE real,int,double +! DIMS 2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_write_darray +!! @brief Writes a 5D array of type int. +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The data to be written +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!! @param fillval : An optional fill value to fill holes in the data written +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_5d_int (File,varDesc,ioDesc, array, iostat, fillval) + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + integer(i4), intent(in) :: & + array(:,:,:,:,:) ! array to be written + + integer(i4), optional, intent(in) :: fillval ! rearrange receiver fill value + + integer(i4), intent(out) :: iostat + integer(i4) :: transvar(1), dumbvar(0) + +! This code is required due to a bug in gfortran 4.7.2 +#if (__GFORTRAN__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 8) + integer(i4), allocatable :: acopy(:) + integer :: isize + + isize= size(array) + allocate(acopy(isize)) + acopy = reshape(array,(/isize/)) + call write_darray_1d_int (File, varDesc, iodesc, acopy, iostat, fillval) + deallocate(acopy) + return +#else +! cannot call transfer function with a 0 sized array + if(size(array)==0) then + call write_darray_1d_int (File, varDesc, iodesc, dumbvar, iostat) + else + call write_darray_1d_int (File, varDesc, iodesc, transfer(array,transvar), iostat, fillval) + end if +#endif +# 330 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_5d_int +! TYPE real,int,double +! DIMS 2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_write_darray +!! @brief Writes a 6D array of type int. +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The data to be written +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!! @param fillval : An optional fill value to fill holes in the data written +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_6d_int (File,varDesc,ioDesc, array, iostat, fillval) + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + integer(i4), intent(in) :: & + array(:,:,:,:,:,:) ! array to be written + + integer(i4), optional, intent(in) :: fillval ! rearrange receiver fill value + + integer(i4), intent(out) :: iostat + integer(i4) :: transvar(1), dumbvar(0) + +! This code is required due to a bug in gfortran 4.7.2 +#if (__GFORTRAN__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 8) + integer(i4), allocatable :: acopy(:) + integer :: isize + + isize= size(array) + allocate(acopy(isize)) + acopy = reshape(array,(/isize/)) + call write_darray_1d_int (File, varDesc, iodesc, acopy, iostat, fillval) + deallocate(acopy) + return +#else +! cannot call transfer function with a 0 sized array + if(size(array)==0) then + call write_darray_1d_int (File, varDesc, iodesc, dumbvar, iostat) + else + call write_darray_1d_int (File, varDesc, iodesc, transfer(array,transvar), iostat, fillval) + end if +#endif +# 330 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_6d_int +! TYPE real,int,double +! DIMS 2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_write_darray +!! @brief Writes a 7D array of type int. +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The data to be written +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!! @param fillval : An optional fill value to fill holes in the data written +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_7d_int (File,varDesc,ioDesc, array, iostat, fillval) + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + integer(i4), intent(in) :: & + array(:,:,:,:,:,:,:) ! array to be written + + integer(i4), optional, intent(in) :: fillval ! rearrange receiver fill value + + integer(i4), intent(out) :: iostat + integer(i4) :: transvar(1), dumbvar(0) + +! This code is required due to a bug in gfortran 4.7.2 +#if (__GFORTRAN__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 8) + integer(i4), allocatable :: acopy(:) + integer :: isize + + isize= size(array) + allocate(acopy(isize)) + acopy = reshape(array,(/isize/)) + call write_darray_1d_int (File, varDesc, iodesc, acopy, iostat, fillval) + deallocate(acopy) + return +#else +! cannot call transfer function with a 0 sized array + if(size(array)==0) then + call write_darray_1d_int (File, varDesc, iodesc, dumbvar, iostat) + else + call write_darray_1d_int (File, varDesc, iodesc, transfer(array,transvar), iostat, fillval) + end if +#endif +# 330 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_7d_int +! TYPE real,int,double +! DIMS 2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_write_darray +!! @brief Writes a 2D array of type double. +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The data to be written +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!! @param fillval : An optional fill value to fill holes in the data written +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_2d_double (File,varDesc,ioDesc, array, iostat, fillval) + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + real(r8), intent(in) :: & + array(:,:) ! array to be written + + real(r8), optional, intent(in) :: fillval ! rearrange receiver fill value + + integer(i4), intent(out) :: iostat + real(r8) :: transvar(1), dumbvar(0) + +! This code is required due to a bug in gfortran 4.7.2 +#if (__GFORTRAN__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 8) + real(r8), allocatable :: acopy(:) + integer :: isize + + isize= size(array) + allocate(acopy(isize)) + acopy = reshape(array,(/isize/)) + call write_darray_1d_double (File, varDesc, iodesc, acopy, iostat, fillval) + deallocate(acopy) + return +#else +! cannot call transfer function with a 0 sized array + if(size(array)==0) then + call write_darray_1d_double (File, varDesc, iodesc, dumbvar, iostat) + else + call write_darray_1d_double (File, varDesc, iodesc, transfer(array,transvar), iostat, fillval) + end if +#endif +# 330 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_2d_double +! TYPE real,int,double +! DIMS 2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_write_darray +!! @brief Writes a 3D array of type double. +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The data to be written +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!! @param fillval : An optional fill value to fill holes in the data written +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_3d_double (File,varDesc,ioDesc, array, iostat, fillval) + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + real(r8), intent(in) :: & + array(:,:,:) ! array to be written + + real(r8), optional, intent(in) :: fillval ! rearrange receiver fill value + + integer(i4), intent(out) :: iostat + real(r8) :: transvar(1), dumbvar(0) + +! This code is required due to a bug in gfortran 4.7.2 +#if (__GFORTRAN__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 8) + real(r8), allocatable :: acopy(:) + integer :: isize + + isize= size(array) + allocate(acopy(isize)) + acopy = reshape(array,(/isize/)) + call write_darray_1d_double (File, varDesc, iodesc, acopy, iostat, fillval) + deallocate(acopy) + return +#else +! cannot call transfer function with a 0 sized array + if(size(array)==0) then + call write_darray_1d_double (File, varDesc, iodesc, dumbvar, iostat) + else + call write_darray_1d_double (File, varDesc, iodesc, transfer(array,transvar), iostat, fillval) + end if +#endif +# 330 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_3d_double +! TYPE real,int,double +! DIMS 2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_write_darray +!! @brief Writes a 4D array of type double. +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The data to be written +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!! @param fillval : An optional fill value to fill holes in the data written +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_4d_double (File,varDesc,ioDesc, array, iostat, fillval) + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + real(r8), intent(in) :: & + array(:,:,:,:) ! array to be written + + real(r8), optional, intent(in) :: fillval ! rearrange receiver fill value + + integer(i4), intent(out) :: iostat + real(r8) :: transvar(1), dumbvar(0) + +! This code is required due to a bug in gfortran 4.7.2 +#if (__GFORTRAN__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 8) + real(r8), allocatable :: acopy(:) + integer :: isize + + isize= size(array) + allocate(acopy(isize)) + acopy = reshape(array,(/isize/)) + call write_darray_1d_double (File, varDesc, iodesc, acopy, iostat, fillval) + deallocate(acopy) + return +#else +! cannot call transfer function with a 0 sized array + if(size(array)==0) then + call write_darray_1d_double (File, varDesc, iodesc, dumbvar, iostat) + else + call write_darray_1d_double (File, varDesc, iodesc, transfer(array,transvar), iostat, fillval) + end if +#endif +# 330 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_4d_double +! TYPE real,int,double +! DIMS 2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_write_darray +!! @brief Writes a 5D array of type double. +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The data to be written +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!! @param fillval : An optional fill value to fill holes in the data written +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_5d_double (File,varDesc,ioDesc, array, iostat, fillval) + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + real(r8), intent(in) :: & + array(:,:,:,:,:) ! array to be written + + real(r8), optional, intent(in) :: fillval ! rearrange receiver fill value + + integer(i4), intent(out) :: iostat + real(r8) :: transvar(1), dumbvar(0) + +! This code is required due to a bug in gfortran 4.7.2 +#if (__GFORTRAN__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 8) + real(r8), allocatable :: acopy(:) + integer :: isize + + isize= size(array) + allocate(acopy(isize)) + acopy = reshape(array,(/isize/)) + call write_darray_1d_double (File, varDesc, iodesc, acopy, iostat, fillval) + deallocate(acopy) + return +#else +! cannot call transfer function with a 0 sized array + if(size(array)==0) then + call write_darray_1d_double (File, varDesc, iodesc, dumbvar, iostat) + else + call write_darray_1d_double (File, varDesc, iodesc, transfer(array,transvar), iostat, fillval) + end if +#endif +# 330 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_5d_double +! TYPE real,int,double +! DIMS 2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_write_darray +!! @brief Writes a 6D array of type double. +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The data to be written +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!! @param fillval : An optional fill value to fill holes in the data written +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_6d_double (File,varDesc,ioDesc, array, iostat, fillval) + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + real(r8), intent(in) :: & + array(:,:,:,:,:,:) ! array to be written + + real(r8), optional, intent(in) :: fillval ! rearrange receiver fill value + + integer(i4), intent(out) :: iostat + real(r8) :: transvar(1), dumbvar(0) + +! This code is required due to a bug in gfortran 4.7.2 +#if (__GFORTRAN__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 8) + real(r8), allocatable :: acopy(:) + integer :: isize + + isize= size(array) + allocate(acopy(isize)) + acopy = reshape(array,(/isize/)) + call write_darray_1d_double (File, varDesc, iodesc, acopy, iostat, fillval) + deallocate(acopy) + return +#else +! cannot call transfer function with a 0 sized array + if(size(array)==0) then + call write_darray_1d_double (File, varDesc, iodesc, dumbvar, iostat) + else + call write_darray_1d_double (File, varDesc, iodesc, transfer(array,transvar), iostat, fillval) + end if +#endif +# 330 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_6d_double +! TYPE real,int,double +! DIMS 2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_write_darray +!! @brief Writes a 7D array of type double. +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The data to be written +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!! @param fillval : An optional fill value to fill holes in the data written +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine write_darray_7d_double (File,varDesc,ioDesc, array, iostat, fillval) + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! variable descriptor + + real(r8), intent(in) :: & + array(:,:,:,:,:,:,:) ! array to be written + + real(r8), optional, intent(in) :: fillval ! rearrange receiver fill value + + integer(i4), intent(out) :: iostat + real(r8) :: transvar(1), dumbvar(0) + +! This code is required due to a bug in gfortran 4.7.2 +#if (__GFORTRAN__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 8) + real(r8), allocatable :: acopy(:) + integer :: isize + + isize= size(array) + allocate(acopy(isize)) + acopy = reshape(array,(/isize/)) + call write_darray_1d_double (File, varDesc, iodesc, acopy, iostat, fillval) + deallocate(acopy) + return +#else +! cannot call transfer function with a 0 sized array + if(size(array)==0) then + call write_darray_1d_double (File, varDesc, iodesc, dumbvar, iostat) + else + call write_darray_1d_double (File, varDesc, iodesc, transfer(array,transvar), iostat, fillval) + end if +#endif +# 330 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine write_darray_7d_double + +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_read_darray +!! @brief Read distributed array of type real from a netCDF variable of 1 dimension(s). +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The read data +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!< +# 345 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine read_darray_1d_real (File,varDesc, ioDesc, array, iostat) + use iso_c_binding +! use ifcore, only: tracebackqq + ! !DESCRIPTION: + ! Reads a slab of TYPE from a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! iodecomp descriptor + + real(r4), intent(out) :: array(:) ! array to be read + + integer(i4), intent(out) :: iostat + integer(C_SIZE_T) :: tlen + + tlen = size(array) + call read_darray_internal_real (File%fh, vardesc%varid, iodesc%ioid, tlen, array, iostat) + +# 373 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine read_darray_1d_real +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_read_darray +!! @brief Read distributed array of type real from a netCDF variable of 2 dimension(s). +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The read data +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!< +# 345 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine read_darray_2d_real (File,varDesc, ioDesc, array, iostat) + use iso_c_binding +! use ifcore, only: tracebackqq + ! !DESCRIPTION: + ! Reads a slab of TYPE from a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! iodecomp descriptor + + real(r4), intent(out) :: array(:,:) ! array to be read + + integer(i4), intent(out) :: iostat + integer(C_SIZE_T) :: tlen + + tlen = size(array) + call read_darray_internal_real (File%fh, vardesc%varid, iodesc%ioid, tlen, array, iostat) + +# 373 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine read_darray_2d_real +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_read_darray +!! @brief Read distributed array of type real from a netCDF variable of 3 dimension(s). +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The read data +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!< +# 345 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine read_darray_3d_real (File,varDesc, ioDesc, array, iostat) + use iso_c_binding +! use ifcore, only: tracebackqq + ! !DESCRIPTION: + ! Reads a slab of TYPE from a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! iodecomp descriptor + + real(r4), intent(out) :: array(:,:,:) ! array to be read + + integer(i4), intent(out) :: iostat + integer(C_SIZE_T) :: tlen + + tlen = size(array) + call read_darray_internal_real (File%fh, vardesc%varid, iodesc%ioid, tlen, array, iostat) + +# 373 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine read_darray_3d_real +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_read_darray +!! @brief Read distributed array of type real from a netCDF variable of 4 dimension(s). +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The read data +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!< +# 345 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine read_darray_4d_real (File,varDesc, ioDesc, array, iostat) + use iso_c_binding +! use ifcore, only: tracebackqq + ! !DESCRIPTION: + ! Reads a slab of TYPE from a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! iodecomp descriptor + + real(r4), intent(out) :: array(:,:,:,:) ! array to be read + + integer(i4), intent(out) :: iostat + integer(C_SIZE_T) :: tlen + + tlen = size(array) + call read_darray_internal_real (File%fh, vardesc%varid, iodesc%ioid, tlen, array, iostat) + +# 373 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine read_darray_4d_real +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_read_darray +!! @brief Read distributed array of type real from a netCDF variable of 5 dimension(s). +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The read data +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!< +# 345 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine read_darray_5d_real (File,varDesc, ioDesc, array, iostat) + use iso_c_binding +! use ifcore, only: tracebackqq + ! !DESCRIPTION: + ! Reads a slab of TYPE from a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! iodecomp descriptor + + real(r4), intent(out) :: array(:,:,:,:,:) ! array to be read + + integer(i4), intent(out) :: iostat + integer(C_SIZE_T) :: tlen + + tlen = size(array) + call read_darray_internal_real (File%fh, vardesc%varid, iodesc%ioid, tlen, array, iostat) + +# 373 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine read_darray_5d_real +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_read_darray +!! @brief Read distributed array of type real from a netCDF variable of 6 dimension(s). +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The read data +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!< +# 345 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine read_darray_6d_real (File,varDesc, ioDesc, array, iostat) + use iso_c_binding +! use ifcore, only: tracebackqq + ! !DESCRIPTION: + ! Reads a slab of TYPE from a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! iodecomp descriptor + + real(r4), intent(out) :: array(:,:,:,:,:,:) ! array to be read + + integer(i4), intent(out) :: iostat + integer(C_SIZE_T) :: tlen + + tlen = size(array) + call read_darray_internal_real (File%fh, vardesc%varid, iodesc%ioid, tlen, array, iostat) + +# 373 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine read_darray_6d_real +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_read_darray +!! @brief Read distributed array of type real from a netCDF variable of 7 dimension(s). +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The read data +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!< +# 345 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine read_darray_7d_real (File,varDesc, ioDesc, array, iostat) + use iso_c_binding +! use ifcore, only: tracebackqq + ! !DESCRIPTION: + ! Reads a slab of TYPE from a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! iodecomp descriptor + + real(r4), intent(out) :: array(:,:,:,:,:,:,:) ! array to be read + + integer(i4), intent(out) :: iostat + integer(C_SIZE_T) :: tlen + + tlen = size(array) + call read_darray_internal_real (File%fh, vardesc%varid, iodesc%ioid, tlen, array, iostat) + +# 373 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine read_darray_7d_real +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_read_darray +!! @brief Read distributed array of type int from a netCDF variable of 1 dimension(s). +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The read data +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!< +# 345 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine read_darray_1d_int (File,varDesc, ioDesc, array, iostat) + use iso_c_binding +! use ifcore, only: tracebackqq + ! !DESCRIPTION: + ! Reads a slab of TYPE from a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! iodecomp descriptor + + integer(i4), intent(out) :: array(:) ! array to be read + + integer(i4), intent(out) :: iostat + integer(C_SIZE_T) :: tlen + + tlen = size(array) + call read_darray_internal_int (File%fh, vardesc%varid, iodesc%ioid, tlen, array, iostat) + +# 373 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine read_darray_1d_int +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_read_darray +!! @brief Read distributed array of type int from a netCDF variable of 2 dimension(s). +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The read data +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!< +# 345 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine read_darray_2d_int (File,varDesc, ioDesc, array, iostat) + use iso_c_binding +! use ifcore, only: tracebackqq + ! !DESCRIPTION: + ! Reads a slab of TYPE from a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! iodecomp descriptor + + integer(i4), intent(out) :: array(:,:) ! array to be read + + integer(i4), intent(out) :: iostat + integer(C_SIZE_T) :: tlen + + tlen = size(array) + call read_darray_internal_int (File%fh, vardesc%varid, iodesc%ioid, tlen, array, iostat) + +# 373 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine read_darray_2d_int +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_read_darray +!! @brief Read distributed array of type int from a netCDF variable of 3 dimension(s). +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The read data +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!< +# 345 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine read_darray_3d_int (File,varDesc, ioDesc, array, iostat) + use iso_c_binding +! use ifcore, only: tracebackqq + ! !DESCRIPTION: + ! Reads a slab of TYPE from a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! iodecomp descriptor + + integer(i4), intent(out) :: array(:,:,:) ! array to be read + + integer(i4), intent(out) :: iostat + integer(C_SIZE_T) :: tlen + + tlen = size(array) + call read_darray_internal_int (File%fh, vardesc%varid, iodesc%ioid, tlen, array, iostat) + +# 373 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine read_darray_3d_int +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_read_darray +!! @brief Read distributed array of type int from a netCDF variable of 4 dimension(s). +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The read data +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!< +# 345 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine read_darray_4d_int (File,varDesc, ioDesc, array, iostat) + use iso_c_binding +! use ifcore, only: tracebackqq + ! !DESCRIPTION: + ! Reads a slab of TYPE from a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! iodecomp descriptor + + integer(i4), intent(out) :: array(:,:,:,:) ! array to be read + + integer(i4), intent(out) :: iostat + integer(C_SIZE_T) :: tlen + + tlen = size(array) + call read_darray_internal_int (File%fh, vardesc%varid, iodesc%ioid, tlen, array, iostat) + +# 373 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine read_darray_4d_int +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_read_darray +!! @brief Read distributed array of type int from a netCDF variable of 5 dimension(s). +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The read data +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!< +# 345 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine read_darray_5d_int (File,varDesc, ioDesc, array, iostat) + use iso_c_binding +! use ifcore, only: tracebackqq + ! !DESCRIPTION: + ! Reads a slab of TYPE from a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! iodecomp descriptor + + integer(i4), intent(out) :: array(:,:,:,:,:) ! array to be read + + integer(i4), intent(out) :: iostat + integer(C_SIZE_T) :: tlen + + tlen = size(array) + call read_darray_internal_int (File%fh, vardesc%varid, iodesc%ioid, tlen, array, iostat) + +# 373 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine read_darray_5d_int +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_read_darray +!! @brief Read distributed array of type int from a netCDF variable of 6 dimension(s). +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The read data +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!< +# 345 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine read_darray_6d_int (File,varDesc, ioDesc, array, iostat) + use iso_c_binding +! use ifcore, only: tracebackqq + ! !DESCRIPTION: + ! Reads a slab of TYPE from a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! iodecomp descriptor + + integer(i4), intent(out) :: array(:,:,:,:,:,:) ! array to be read + + integer(i4), intent(out) :: iostat + integer(C_SIZE_T) :: tlen + + tlen = size(array) + call read_darray_internal_int (File%fh, vardesc%varid, iodesc%ioid, tlen, array, iostat) + +# 373 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine read_darray_6d_int +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_read_darray +!! @brief Read distributed array of type int from a netCDF variable of 7 dimension(s). +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The read data +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!< +# 345 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine read_darray_7d_int (File,varDesc, ioDesc, array, iostat) + use iso_c_binding +! use ifcore, only: tracebackqq + ! !DESCRIPTION: + ! Reads a slab of TYPE from a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! iodecomp descriptor + + integer(i4), intent(out) :: array(:,:,:,:,:,:,:) ! array to be read + + integer(i4), intent(out) :: iostat + integer(C_SIZE_T) :: tlen + + tlen = size(array) + call read_darray_internal_int (File%fh, vardesc%varid, iodesc%ioid, tlen, array, iostat) + +# 373 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine read_darray_7d_int +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_read_darray +!! @brief Read distributed array of type double from a netCDF variable of 1 dimension(s). +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The read data +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!< +# 345 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine read_darray_1d_double (File,varDesc, ioDesc, array, iostat) + use iso_c_binding +! use ifcore, only: tracebackqq + ! !DESCRIPTION: + ! Reads a slab of TYPE from a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! iodecomp descriptor + + real(r8), intent(out) :: array(:) ! array to be read + + integer(i4), intent(out) :: iostat + integer(C_SIZE_T) :: tlen + + tlen = size(array) + call read_darray_internal_double (File%fh, vardesc%varid, iodesc%ioid, tlen, array, iostat) + +# 373 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine read_darray_1d_double +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_read_darray +!! @brief Read distributed array of type double from a netCDF variable of 2 dimension(s). +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The read data +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!< +# 345 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine read_darray_2d_double (File,varDesc, ioDesc, array, iostat) + use iso_c_binding +! use ifcore, only: tracebackqq + ! !DESCRIPTION: + ! Reads a slab of TYPE from a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! iodecomp descriptor + + real(r8), intent(out) :: array(:,:) ! array to be read + + integer(i4), intent(out) :: iostat + integer(C_SIZE_T) :: tlen + + tlen = size(array) + call read_darray_internal_double (File%fh, vardesc%varid, iodesc%ioid, tlen, array, iostat) + +# 373 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine read_darray_2d_double +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_read_darray +!! @brief Read distributed array of type double from a netCDF variable of 3 dimension(s). +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The read data +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!< +# 345 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine read_darray_3d_double (File,varDesc, ioDesc, array, iostat) + use iso_c_binding +! use ifcore, only: tracebackqq + ! !DESCRIPTION: + ! Reads a slab of TYPE from a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! iodecomp descriptor + + real(r8), intent(out) :: array(:,:,:) ! array to be read + + integer(i4), intent(out) :: iostat + integer(C_SIZE_T) :: tlen + + tlen = size(array) + call read_darray_internal_double (File%fh, vardesc%varid, iodesc%ioid, tlen, array, iostat) + +# 373 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine read_darray_3d_double +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_read_darray +!! @brief Read distributed array of type double from a netCDF variable of 4 dimension(s). +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The read data +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!< +# 345 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine read_darray_4d_double (File,varDesc, ioDesc, array, iostat) + use iso_c_binding +! use ifcore, only: tracebackqq + ! !DESCRIPTION: + ! Reads a slab of TYPE from a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! iodecomp descriptor + + real(r8), intent(out) :: array(:,:,:,:) ! array to be read + + integer(i4), intent(out) :: iostat + integer(C_SIZE_T) :: tlen + + tlen = size(array) + call read_darray_internal_double (File%fh, vardesc%varid, iodesc%ioid, tlen, array, iostat) + +# 373 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine read_darray_4d_double +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_read_darray +!! @brief Read distributed array of type double from a netCDF variable of 5 dimension(s). +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The read data +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!< +# 345 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine read_darray_5d_double (File,varDesc, ioDesc, array, iostat) + use iso_c_binding +! use ifcore, only: tracebackqq + ! !DESCRIPTION: + ! Reads a slab of TYPE from a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! iodecomp descriptor + + real(r8), intent(out) :: array(:,:,:,:,:) ! array to be read + + integer(i4), intent(out) :: iostat + integer(C_SIZE_T) :: tlen + + tlen = size(array) + call read_darray_internal_double (File%fh, vardesc%varid, iodesc%ioid, tlen, array, iostat) + +# 373 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine read_darray_5d_double +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_read_darray +!! @brief Read distributed array of type double from a netCDF variable of 6 dimension(s). +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The read data +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!< +# 345 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine read_darray_6d_double (File,varDesc, ioDesc, array, iostat) + use iso_c_binding +! use ifcore, only: tracebackqq + ! !DESCRIPTION: + ! Reads a slab of TYPE from a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! iodecomp descriptor + + real(r8), intent(out) :: array(:,:,:,:,:,:) ! array to be read + + integer(i4), intent(out) :: iostat + integer(C_SIZE_T) :: tlen + + tlen = size(array) + call read_darray_internal_double (File%fh, vardesc%varid, iodesc%ioid, tlen, array, iostat) + +# 373 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine read_darray_6d_double +! TYPE real,int,double +! DIMS 1,2,3,4,5,6,7 +!> +!! @public +!! @ingroup PIO_read_darray +!! @brief Read distributed array of type double from a netCDF variable of 7 dimension(s). +!! @details +!! @param File @ref file_desc_t +!! @param varDesc @ref var_desc_t +!! @param ioDesc @ref io_desc_t +!! @param array : The read data +!! @param iostat : The status returned from this routine (see \ref PIO_seterrorhandling for details) +!< +# 345 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine read_darray_7d_double (File,varDesc, ioDesc, array, iostat) + use iso_c_binding +! use ifcore, only: tracebackqq + ! !DESCRIPTION: + ! Reads a slab of TYPE from a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + + type (File_desc_t), intent(inout) :: & + File ! file information + + type (var_desc_t), intent(inout) :: & + varDesc ! variable descriptor + + type (io_desc_t), intent(inout) :: & + ioDesc ! iodecomp descriptor + + real(r8), intent(out) :: array(:,:,:,:,:,:,:) ! array to be read + + integer(i4), intent(out) :: iostat + integer(C_SIZE_T) :: tlen + + tlen = size(array) + call read_darray_internal_double (File%fh, vardesc%varid, iodesc%ioid, tlen, array, iostat) + +# 373 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine read_darray_7d_double + +! TYPE real,int,double + +# 377 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine read_darray_internal_real (ncid, varid, ioid, alen, array, iostat) + use iso_c_binding + ! !DESCRIPTION: + ! Reads a slab of TYPE from a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + integer, intent(in) :: ncid, varid, ioid + integer(C_SIZE_T), intent(in) :: alen + + real(r4), target :: array(*) ! array to be read + + integer(i4), intent(out) :: iostat + type(C_PTR) :: cptr + character(len=*), parameter :: subName=modName//'::read_darray_real' + + cptr = C_LOC(array) + iostat = PIOc_read_darray(ncid, varid-1, ioid, alen, cptr) + +# 398 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine read_darray_internal_real +! TYPE real,int,double + +# 377 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine read_darray_internal_int (ncid, varid, ioid, alen, array, iostat) + use iso_c_binding + ! !DESCRIPTION: + ! Reads a slab of TYPE from a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + integer, intent(in) :: ncid, varid, ioid + integer(C_SIZE_T), intent(in) :: alen + + integer(i4), target :: array(*) ! array to be read + + integer(i4), intent(out) :: iostat + type(C_PTR) :: cptr + character(len=*), parameter :: subName=modName//'::read_darray_int' + + cptr = C_LOC(array) + iostat = PIOc_read_darray(ncid, varid-1, ioid, alen, cptr) + +# 398 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine read_darray_internal_int +! TYPE real,int,double + +# 377 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + subroutine read_darray_internal_double (ncid, varid, ioid, alen, array, iostat) + use iso_c_binding + ! !DESCRIPTION: + ! Reads a slab of TYPE from a netcdf file. + ! + ! !REVISION HISTORY: + ! same as module + + ! !INPUT PARAMETERS: + integer, intent(in) :: ncid, varid, ioid + integer(C_SIZE_T), intent(in) :: alen + + real(r8), target :: array(*) ! array to be read + + integer(i4), intent(out) :: iostat + type(C_PTR) :: cptr + character(len=*), parameter :: subName=modName//'::read_darray_double' + + cptr = C_LOC(array) + iostat = PIOc_read_darray(ncid, varid-1, ioid, alen, cptr) + +# 398 "/home/ed/tmp/ParallelIO/src/flib/piodarray.F90.in" + end subroutine read_darray_internal_double + +end module piodarray diff --git a/src/flib/pionfatt_mod.F90.in2 b/src/flib/pionfatt_mod.F90.in2 new file mode 100644 index 00000000000..bb68372e3f5 --- /dev/null +++ b/src/flib/pionfatt_mod.F90.in2 @@ -0,0 +1,1009 @@ +!=================================================== +! DO NOT EDIT THIS FILE, it was generated using genf90/src/genf90/genf90.pl +! Any changes you make to this file may be lost +!=================================================== +#define __PIO_FILE__ "pionfatt_mod.F90" +!> +!! @file +!! @brief NetCDF attribute interface to PIO +!< +module pionfatt_mod + use pio_kinds, only : r4, r8, i4, pio_offset_kind + use pio_types + use pio_support, only : replace_c_null + use iso_c_binding + implicit none + + + !> + !! @private + !< + public :: put_att +# 18 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + interface put_att + module procedure put_att_id_text, put_att_desc_text, put_att_vid_text + module procedure put_att_id_real, put_att_desc_real, put_att_vid_real + module procedure put_att_id_double, put_att_desc_double, put_att_vid_double + module procedure put_att_id_int, put_att_desc_int, put_att_vid_int + ! TYPE real,int,double + module procedure put_att_1d_id_real + ! TYPE real,int,double + module procedure put_att_1d_id_int + ! TYPE real,int,double + module procedure put_att_1d_id_double + ! TYPE real,int,double + module procedure put_att_1d_desc_real + ! TYPE real,int,double + module procedure put_att_1d_desc_int + ! TYPE real,int,double + module procedure put_att_1d_desc_double + ! TYPE real,int,double + module procedure put_att_1d_vid_real + ! TYPE real,int,double + module procedure put_att_1d_vid_int + ! TYPE real,int,double + module procedure put_att_1d_vid_double + end interface + + + !> + !! @private + !< + public :: get_att +# 33 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + interface get_att + module procedure get_att_text, get_att_desc_text, get_att_id_text + module procedure get_att_real, get_att_desc_real, get_att_id_real + module procedure get_att_double, get_att_desc_double, get_att_id_double + module procedure get_att_int, get_att_desc_int, get_att_id_int + ! TYPE real,int,double + module procedure get_att_1d_real, get_att_desc_1d_real, get_att_1d_id_real + ! TYPE real,int,double + module procedure get_att_1d_int, get_att_desc_1d_int, get_att_1d_id_int + ! TYPE real,int,double + module procedure get_att_1d_double, get_att_desc_1d_double, get_att_1d_id_double + end interface + + !> + !! @public + !! @defgroup PIO_put_att PIO_put_att + !! @brief Writes an netcdf attribute to a file + !< + !> + !! @public + !! @defgroup PIO_get_att PIO_get_att + !! @brief Reads an netcdf attribute from a file + !< + + private :: modName + character(len=*), parameter :: modName='pionfatt_mod' +# 52 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + interface + !> @brief Write a netCDF text attribute. +# 54 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer(C_INT) function PIOc_put_att_text (ncid, varid, name, len, op) & + bind(C,name="PIOc_put_att_text") + use iso_c_binding + integer(C_INT), value :: ncid + integer(C_INT), value :: varid + character(C_CHAR) :: name(*) + integer(C_SIZE_T), value :: len + character(C_char) :: op +# 62 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function PIOc_put_att_text + end interface +# 64 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + interface +# 65 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer(C_INT) function PIOc_get_att_text (ncid, varid, name, op) & + bind(C,name="PIOc_get_att_text") + use iso_c_binding + integer(C_INT), value :: ncid + integer(C_INT), value :: varid + character(C_CHAR) :: name(*) + character(C_char) :: op(*) +# 72 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function PIOc_get_att_text + end interface + + +# 76 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + interface +# 77 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer(C_INT) function PIOc_put_att_int (ncid, varid, name, xtype, len, op) & + bind(C,name="PIOc_put_att_int") + use iso_c_binding + integer(C_INT), value :: ncid + integer(C_INT), value :: varid + character(C_CHAR) :: name(*) + integer(C_INT), value :: xtype + integer(C_SIZE_T), value :: len + integer(C_INT) :: op +# 86 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function PIOc_put_att_int + end interface +# 88 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + interface +# 89 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer(C_INT) function PIOc_put_att_float (ncid, varid, name, xtype, len, op) & + bind(C,name="PIOc_put_att_float") + use iso_c_binding + integer(C_INT), value :: ncid + integer(C_INT), value :: varid + character(C_CHAR) :: name(*) + integer(C_INT), value :: xtype + integer(C_SIZE_T), value :: len + real(C_FLOAT) :: op +# 98 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function PIOc_put_att_float + end interface +# 100 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + interface +# 101 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer(C_INT) function PIOc_put_att_double (ncid, varid, name, xtype, len, op) & + bind(C,name="PIOc_put_att_double") + use iso_c_binding + integer(C_INT), value :: ncid + integer(C_INT), value :: varid + character(C_CHAR) :: name(*) + integer(C_INT), value :: xtype + integer(C_SIZE_T), value :: len + real(C_DOUBLE) :: op +# 110 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function PIOc_put_att_double + end interface + + +# 114 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + interface +# 115 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer(C_INT) function PIOc_get_att_int (ncid, varid, name, op) & + bind(C,name="PIOc_get_att_int") + use iso_c_binding + integer(C_INT), value :: ncid + integer(C_INT), value :: varid + character(C_CHAR) :: name(*) + integer(C_INT), intent(out) :: op +# 122 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function PIOc_get_att_int + end interface + +# 125 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + interface +# 126 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer(C_INT) function PIOc_get_att_float (ncid, varid, name, op) & + bind(C,name="PIOc_get_att_float") + use iso_c_binding + integer(C_INT), value :: ncid + integer(C_INT), value :: varid + character(C_CHAR) :: name(*) + real(C_FLOAT), intent(out) :: op +# 133 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function PIOc_get_att_float + end interface + +# 136 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + interface +# 137 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer(C_INT) function PIOc_get_att_double (ncid, varid, name, op) & + bind(C,name="PIOc_get_att_double") + use iso_c_binding + integer(C_INT), value :: ncid + integer(C_INT), value :: varid + character(C_CHAR) :: name(*) + real(C_DOUBLE), intent(out) :: op +# 144 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function PIOc_get_att_double + end interface + + +# 148 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" +contains + + !> + !! @public + !! @ingroup PIO_put_att + !! @brief Writes an netcdf attribute to a file + !! @details + !! @param File @copydoc file_desc_t + !! @param varid : The netcdf variable identifier + !! @param name : name of the attribute to add + !! @param var : The value for the netcdf attribute + !! @retval ierr @copydoc error_return + !< +# 161 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_desc_text (File, vdesc, name, values) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vdesc + character(len=*), intent(in) :: name + character(len=*), intent(in) :: values + + ierr = put_att_id_text (File%fh,vdesc%varid,name,values) + +# 169 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_desc_text +# 161 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_desc_real (File, vdesc, name, values) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vdesc + character(len=*), intent(in) :: name + real(r4), intent(in) :: values + + ierr = put_att_id_real (File%fh,vdesc%varid,name,values) + +# 169 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_desc_real +# 161 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_desc_double (File, vdesc, name, values) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vdesc + character(len=*), intent(in) :: name + real(r8), intent(in) :: values + + ierr = put_att_id_double (File%fh,vdesc%varid,name,values) + +# 169 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_desc_double +# 161 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_desc_int (File, vdesc, name, values) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vdesc + character(len=*), intent(in) :: name + integer(i4), intent(in) :: values + + ierr = put_att_id_int (File%fh,vdesc%varid,name,values) + +# 169 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_desc_int +# 170 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_vid_text (File, varid, name, value) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + character(len=*), intent(in) :: name + character(len=*), intent(in) :: value + + ierr = put_att_id_text (File%fh,varid,name,value) + +# 178 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_vid_text +# 170 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_vid_real (File, varid, name, value) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + character(len=*), intent(in) :: name + real(r4), intent(in) :: value + + ierr = put_att_id_real (File%fh,varid,name,value) + +# 178 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_vid_real +# 170 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_vid_double (File, varid, name, value) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + character(len=*), intent(in) :: name + real(r8), intent(in) :: value + + ierr = put_att_id_double (File%fh,varid,name,value) + +# 178 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_vid_double +# 170 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_vid_int (File, varid, name, value) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + character(len=*), intent(in) :: name + integer(i4), intent(in) :: value + + ierr = put_att_id_int (File%fh,varid,name,value) + +# 178 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_vid_int + ! TYPE int,real,double +# 180 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_id_int (ncid, varid, name, values) result(ierr) + use iso_c_binding + integer, intent(in) :: ncid + integer, intent(in) :: varid + character(len=*), intent(in) :: name + integer(i4), intent(in) :: values + + + ierr = PIOc_put_att_int (ncid,varid-1,trim(name)//C_NULL_CHAR, PIO_int, 1_C_SIZE_T, values) + +# 190 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_id_int + ! TYPE int,real,double +# 180 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_id_real (ncid, varid, name, values) result(ierr) + use iso_c_binding + integer, intent(in) :: ncid + integer, intent(in) :: varid + character(len=*), intent(in) :: name + real(r4), intent(in) :: values + + + ierr = PIOc_put_att_float (ncid,varid-1,trim(name)//C_NULL_CHAR, PIO_real, 1_C_SIZE_T, values) + +# 190 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_id_real + ! TYPE int,real,double +# 180 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_id_double (ncid, varid, name, values) result(ierr) + use iso_c_binding + integer, intent(in) :: ncid + integer, intent(in) :: varid + character(len=*), intent(in) :: name + real(r8), intent(in) :: values + + + ierr = PIOc_put_att_double (ncid,varid-1,trim(name)//C_NULL_CHAR, PIO_double, 1_C_SIZE_T, values) + +# 190 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_id_double +# 191 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_id_text (ncid, varid, name, values) result(ierr) + use iso_c_binding + integer, intent(in) :: ncid + integer, intent(in) :: varid + character(len=*), intent(in) :: name + character(len=*), intent(in) :: values + character(c_char), allocatable :: cvar(:) + integer(C_SIZE_T) :: clen + integer :: i + + clen = len_trim(values) + allocate(cvar(clen+1)) + cvar = C_NULL_CHAR + do i=1,clen + cvar(i) = values(i:i) + end do + ierr = PIOc_put_att_text (ncid,varid-1,trim(name)//C_NULL_CHAR, clen, cvar(1)) + deallocate(cvar) +# 209 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_id_text + +# 211 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_1d_id_text (ncid, varid, name, value) result(ierr) + use iso_c_binding + integer, intent(in) :: ncid + integer, intent(in) :: varid + character(len=*), intent(in) :: name + character(len=*), intent(in) :: value(:) + character, allocatable :: nvalue(:) + integer :: slen, alen, i, j, k + + slen = len(value(1)) + alen = size(value) + allocate(nvalue(slen*alen)) + + do i=1,alen + j= len_trim(value(i)) + do k=1,j + nvalue(k+(i-1)*slen) = value(i)(k:k) + end do + nvalue(j+1+(i-1)*slen) = C_NULL_CHAR + end do + ierr = put_att_1d_id_text_internal (ncid, varid, name, slen*alen, nvalue) + + deallocate(nvalue) + +# 235 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_1d_id_text + + +# 238 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_1d_id_text_internal (ncid, varid, name, arrlen, values) result(ierr) + use iso_c_binding + integer, intent(in) :: ncid + integer, intent(in) :: varid + character(len=*), intent(in) :: name + integer, intent(in) :: arrlen + character(len=*), intent(in) :: values(arrlen) + integer :: vallen + + + ierr = PIOc_put_att_text (ncid,varid-1,trim(name)//C_NULL_CHAR, int(arrlen,C_SIZE_T),values(1)) + + +# 251 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_1d_id_text_internal + + + +# 255 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function get_att_id_text (ncid, varid, name, values) result(ierr) + use iso_c_binding + integer, intent(in) :: ncid + integer, intent(in) :: varid + character(len=*), intent(in) :: name + character(len=*), intent(out) :: values + + values = ' ' + ierr = PIOc_get_att_text (ncid,varid-1,trim(name)//C_NULL_CHAR, values) + call replace_c_null(values) +# 265 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function get_att_id_text + + ! TYPE real,double,int + !> + !! @public + !! @ingroup PIO_put_att + !! @brief Writes an netcdf attribute to a file + !! @details + !! @param File @copydoc file_desc_t + !! @param varid : The netcdf variable identifier + !! @param name : name of the attribute to add + !! @param values : The value for the netcdf attribute + !! @retval ierr @copydoc error_return + !< +# 280 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_1d_id_real (ncid, varid, name, values) result(ierr) + integer, intent(in) :: ncid + integer, intent(in) :: varid + character(len=*), intent(in) :: name + real(r4), intent(in) :: values(:) + integer(PIO_OFFSET_KIND) :: len + + len = size(values) + ierr = put_att_1d_id_internal_real (ncid, varid, name, len, values) + +# 290 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_1d_id_real + ! TYPE real,double,int + !> + !! @public + !! @ingroup PIO_put_att + !! @brief Writes an netcdf attribute to a file + !! @details + !! @param File @copydoc file_desc_t + !! @param varid : The netcdf variable identifier + !! @param name : name of the attribute to add + !! @param values : The value for the netcdf attribute + !! @retval ierr @copydoc error_return + !< +# 280 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_1d_id_double (ncid, varid, name, values) result(ierr) + integer, intent(in) :: ncid + integer, intent(in) :: varid + character(len=*), intent(in) :: name + real(r8), intent(in) :: values(:) + integer(PIO_OFFSET_KIND) :: len + + len = size(values) + ierr = put_att_1d_id_internal_double (ncid, varid, name, len, values) + +# 290 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_1d_id_double + ! TYPE real,double,int + !> + !! @public + !! @ingroup PIO_put_att + !! @brief Writes an netcdf attribute to a file + !! @details + !! @param File @copydoc file_desc_t + !! @param varid : The netcdf variable identifier + !! @param name : name of the attribute to add + !! @param values : The value for the netcdf attribute + !! @retval ierr @copydoc error_return + !< +# 280 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_1d_id_int (ncid, varid, name, values) result(ierr) + integer, intent(in) :: ncid + integer, intent(in) :: varid + character(len=*), intent(in) :: name + integer(i4), intent(in) :: values(:) + integer(PIO_OFFSET_KIND) :: len + + len = size(values) + ierr = put_att_1d_id_internal_int (ncid, varid, name, len, values) + +# 290 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_1d_id_int + + ! TYPE real,double,int +# 293 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_1d_id_internal_real (ncid, varid, name, len, values) result(ierr) + integer, intent(in) :: ncid + integer, intent(in) :: varid + integer(PIO_OFFSET_KIND), intent(in) :: len + character(len=*), intent(in) :: name + real(r4), intent(in), target :: values(*) + + + ierr = PIOc_put_att_float (ncid, varid-1, trim(name)//C_NULL_CHAR, PIO_real , len, values(1)) + +# 303 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_1d_id_internal_real + ! TYPE real,double,int +# 293 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_1d_id_internal_double (ncid, varid, name, len, values) result(ierr) + integer, intent(in) :: ncid + integer, intent(in) :: varid + integer(PIO_OFFSET_KIND), intent(in) :: len + character(len=*), intent(in) :: name + real(r8), intent(in), target :: values(*) + + + ierr = PIOc_put_att_double (ncid, varid-1, trim(name)//C_NULL_CHAR, PIO_double , len, values(1)) + +# 303 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_1d_id_internal_double + ! TYPE real,double,int +# 293 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_1d_id_internal_int (ncid, varid, name, len, values) result(ierr) + integer, intent(in) :: ncid + integer, intent(in) :: varid + integer(PIO_OFFSET_KIND), intent(in) :: len + character(len=*), intent(in) :: name + integer(i4), intent(in), target :: values(*) + + + ierr = PIOc_put_att_int (ncid, varid-1, trim(name)//C_NULL_CHAR, PIO_int , len, values(1)) + +# 303 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_1d_id_internal_int + + + ! TYPE real,int,double + !> + !! @public + !! @ingroup PIO_put_att + !! @brief Writes an netcdf attribute to a file + !! @details + !! @param File @copydoc file_desc_t + !! @param varDesc @copydoc var_desc_t + !! @param name : name of the attribute to add + !! @param var : The value for the netcdf attribute + !! @retval ierr @copydoc error_return + !< +# 318 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_1d_desc_real (File,varDesc,name,values) result(ierr) + + type (File_desc_t), intent(inout) , target :: File + type (VAR_desc_t), intent(in) :: varDesc + character(len=*), intent(in) :: name + real(r4), intent(in) :: values(:) + + ierr = put_att_1d_id_real (File%fh,varDesc%varid,name,values) + +# 327 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_1d_desc_real + ! TYPE real,int,double + !> + !! @public + !! @ingroup PIO_put_att + !! @brief Writes an netcdf attribute to a file + !! @details + !! @param File @copydoc file_desc_t + !! @param varDesc @copydoc var_desc_t + !! @param name : name of the attribute to add + !! @param var : The value for the netcdf attribute + !! @retval ierr @copydoc error_return + !< +# 318 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_1d_desc_int (File,varDesc,name,values) result(ierr) + + type (File_desc_t), intent(inout) , target :: File + type (VAR_desc_t), intent(in) :: varDesc + character(len=*), intent(in) :: name + integer(i4), intent(in) :: values(:) + + ierr = put_att_1d_id_int (File%fh,varDesc%varid,name,values) + +# 327 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_1d_desc_int + ! TYPE real,int,double + !> + !! @public + !! @ingroup PIO_put_att + !! @brief Writes an netcdf attribute to a file + !! @details + !! @param File @copydoc file_desc_t + !! @param varDesc @copydoc var_desc_t + !! @param name : name of the attribute to add + !! @param var : The value for the netcdf attribute + !! @retval ierr @copydoc error_return + !< +# 318 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_1d_desc_double (File,varDesc,name,values) result(ierr) + + type (File_desc_t), intent(inout) , target :: File + type (VAR_desc_t), intent(in) :: varDesc + character(len=*), intent(in) :: name + real(r8), intent(in) :: values(:) + + ierr = put_att_1d_id_double (File%fh,varDesc%varid,name,values) + +# 327 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_1d_desc_double + +# 329 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_1d_vid_text (File,varid,name,value) result(ierr) + + type (File_desc_t), intent(inout) , target :: File + integer, intent(in) :: varid + character(len=*), intent(in) :: name + character(len=*), intent(in) :: value(:) + + ierr = put_att_1d_id_text (File%fh,varid,name,value) + +# 338 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_1d_vid_text +# 329 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_1d_vid_real (File,varid,name,value) result(ierr) + + type (File_desc_t), intent(inout) , target :: File + integer, intent(in) :: varid + character(len=*), intent(in) :: name + real(r4), intent(in) :: value(:) + + ierr = put_att_1d_id_real (File%fh,varid,name,value) + +# 338 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_1d_vid_real +# 329 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_1d_vid_double (File,varid,name,value) result(ierr) + + type (File_desc_t), intent(inout) , target :: File + integer, intent(in) :: varid + character(len=*), intent(in) :: name + real(r8), intent(in) :: value(:) + + ierr = put_att_1d_id_double (File%fh,varid,name,value) + +# 338 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_1d_vid_double +# 329 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function put_att_1d_vid_int (File,varid,name,value) result(ierr) + + type (File_desc_t), intent(inout) , target :: File + integer, intent(in) :: varid + character(len=*), intent(in) :: name + integer(i4), intent(in) :: value(:) + + ierr = put_att_1d_id_int (File%fh,varid,name,value) + +# 338 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function put_att_1d_vid_int + + + !> + !! @public + !! @ingroup PIO_get_att + !! @brief Reads an netcdf attribute from a file + !! @details + !! @param File @copydoc file_desc_t + !! @param varDesc @copydoc var_desc_t + !! @param name : name of the attribute to get + !! @param values : The value for the netcdf attribute + !! @retval ierr @copydoc error_return + !< +# 352 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function get_att_desc_text (File,varDesc,name,values) result(ierr) + + type (File_desc_t), intent(inout) , target :: File + type (VAR_desc_t), intent(in) :: varDesc + character(len=*), intent(in) :: name + character(len=*), intent(out) :: values + + ierr = get_att_text (File,varDesc%varid,name,values) + +# 361 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function get_att_desc_text +# 352 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function get_att_desc_real (File,varDesc,name,values) result(ierr) + + type (File_desc_t), intent(inout) , target :: File + type (VAR_desc_t), intent(in) :: varDesc + character(len=*), intent(in) :: name + real(r4), intent(out) :: values + + ierr = get_att_real (File,varDesc%varid,name,values) + +# 361 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function get_att_desc_real +# 352 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function get_att_desc_double (File,varDesc,name,values) result(ierr) + + type (File_desc_t), intent(inout) , target :: File + type (VAR_desc_t), intent(in) :: varDesc + character(len=*), intent(in) :: name + real(r8), intent(out) :: values + + ierr = get_att_double (File,varDesc%varid,name,values) + +# 361 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function get_att_desc_double +# 352 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function get_att_desc_int (File,varDesc,name,values) result(ierr) + + type (File_desc_t), intent(inout) , target :: File + type (VAR_desc_t), intent(in) :: varDesc + character(len=*), intent(in) :: name + integer(i4), intent(out) :: values + + ierr = get_att_int (File,varDesc%varid,name,values) + +# 361 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function get_att_desc_int + + !> + !! @public + !! @ingroup PIO_get_att + !! @brief Reads an netcdf attribute from a file + !! @details + !! @param File @copydoc file_desc_t + !! @param varDesc @copydoc var_desc_t + !! @param name : name of the attribute to get + !! @param values : The value for the netcdf attribute + !! @retval ierr @copydoc error_return + !< + ! TYPE int,real,double +# 375 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function get_att_desc_1d_int (File,varDesc,name,values) result(ierr) + + type (File_desc_t), intent(inout) , target :: File + type (VAR_desc_t), intent(in) :: varDesc + character(len=*), intent(in) :: name + integer(i4), intent(out) :: values(:) + + character(len=*), parameter :: subName=modName//'::get_att_desc_1d_int' + + ierr = get_att_1d_id_int (File%fh,varDesc%varid,name,values) + +# 386 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function get_att_desc_1d_int + ! TYPE int,real,double +# 375 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function get_att_desc_1d_real (File,varDesc,name,values) result(ierr) + + type (File_desc_t), intent(inout) , target :: File + type (VAR_desc_t), intent(in) :: varDesc + character(len=*), intent(in) :: name + real(r4), intent(out) :: values(:) + + character(len=*), parameter :: subName=modName//'::get_att_desc_1d_real' + + ierr = get_att_1d_id_real (File%fh,varDesc%varid,name,values) + +# 386 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function get_att_desc_1d_real + ! TYPE int,real,double +# 375 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function get_att_desc_1d_double (File,varDesc,name,values) result(ierr) + + type (File_desc_t), intent(inout) , target :: File + type (VAR_desc_t), intent(in) :: varDesc + character(len=*), intent(in) :: name + real(r8), intent(out) :: values(:) + + character(len=*), parameter :: subName=modName//'::get_att_desc_1d_double' + + ierr = get_att_1d_id_double (File%fh,varDesc%varid,name,values) + +# 386 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function get_att_desc_1d_double + + !> + !! @public + !! @ingroup PIO_get_att + !! @brief Reads an netcdf attribute from a file + !! @details + !! @param File @copydoc file_desc_t + !! @param varid : The netcdf variable identifier + !! @param name : name of the attribute to get + !! @param values : The value for the netcdf attribute + !! @retval ierr @copydoc error_return + !< + ! TYPE int,real,double +# 400 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function get_att_id_int (ncid, varid, name, values) result(ierr) + use iso_c_binding + integer, intent(in) :: ncid + integer, intent(in) :: varid + character(len=*), intent(in) :: name + integer(i4), intent(out), target :: values + + + ierr = PIOc_get_att_int (ncid,varid-1,trim(name)//C_NULL_CHAR, values) + +# 410 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function get_att_id_int + ! TYPE int,real,double +# 400 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function get_att_id_real (ncid, varid, name, values) result(ierr) + use iso_c_binding + integer, intent(in) :: ncid + integer, intent(in) :: varid + character(len=*), intent(in) :: name + real(r4), intent(out), target :: values + + + ierr = PIOc_get_att_float (ncid,varid-1,trim(name)//C_NULL_CHAR, values) + +# 410 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function get_att_id_real + ! TYPE int,real,double +# 400 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function get_att_id_double (ncid, varid, name, values) result(ierr) + use iso_c_binding + integer, intent(in) :: ncid + integer, intent(in) :: varid + character(len=*), intent(in) :: name + real(r8), intent(out), target :: values + + + ierr = PIOc_get_att_double (ncid,varid-1,trim(name)//C_NULL_CHAR, values) + +# 410 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function get_att_id_double + + + +# 414 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function get_att_text (File,varid,name,values) result(ierr) + type (File_desc_t), intent(in) , target :: File + integer(i4), intent(in) :: varid + character(len=*), intent(in) :: name + character(len=*), intent(out) :: values + + + ierr = get_att_id_text (file%fh, varid, name, values) + + +# 424 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function get_att_text +# 414 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function get_att_real (File,varid,name,values) result(ierr) + type (File_desc_t), intent(in) , target :: File + integer(i4), intent(in) :: varid + character(len=*), intent(in) :: name + real(r4), intent(out) :: values + + + ierr = get_att_id_real (file%fh, varid, name, values) + + +# 424 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function get_att_real +# 414 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function get_att_double (File,varid,name,values) result(ierr) + type (File_desc_t), intent(in) , target :: File + integer(i4), intent(in) :: varid + character(len=*), intent(in) :: name + real(r8), intent(out) :: values + + + ierr = get_att_id_double (file%fh, varid, name, values) + + +# 424 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function get_att_double +# 414 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function get_att_int (File,varid,name,values) result(ierr) + type (File_desc_t), intent(in) , target :: File + integer(i4), intent(in) :: varid + character(len=*), intent(in) :: name + integer(i4), intent(out) :: values + + + ierr = get_att_id_int (file%fh, varid, name, values) + + +# 424 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function get_att_int + + ! TYPE real,int,double + !> + !! @public + !! @ingroup PIO_get_att + !! @brief Reads an netcdf attribute from a file + !! @details + !! @param File @copydoc file_desc_t + !! @param varid : The netcdf variable identifier + !! @param name : name of the attribute to get + !! @param values : The value for the netcdf attribute + !! @retval ierr @copydoc error_return + !< +# 438 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function get_att_1d_real (File,varid,name,values) result(ierr) + type (File_desc_t), intent(in) , target :: File + integer(i4), intent(in) :: varid + character(len=*), intent(in) :: name + real(r4), intent(out) :: values(:) + + ierr = get_att_1d_id_real (file%fh, varid, name, values) + +# 446 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function get_att_1d_real + ! TYPE real,int,double + !> + !! @public + !! @ingroup PIO_get_att + !! @brief Reads an netcdf attribute from a file + !! @details + !! @param File @copydoc file_desc_t + !! @param varid : The netcdf variable identifier + !! @param name : name of the attribute to get + !! @param values : The value for the netcdf attribute + !! @retval ierr @copydoc error_return + !< +# 438 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function get_att_1d_int (File,varid,name,values) result(ierr) + type (File_desc_t), intent(in) , target :: File + integer(i4), intent(in) :: varid + character(len=*), intent(in) :: name + integer(i4), intent(out) :: values(:) + + ierr = get_att_1d_id_int (file%fh, varid, name, values) + +# 446 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function get_att_1d_int + ! TYPE real,int,double + !> + !! @public + !! @ingroup PIO_get_att + !! @brief Reads an netcdf attribute from a file + !! @details + !! @param File @copydoc file_desc_t + !! @param varid : The netcdf variable identifier + !! @param name : name of the attribute to get + !! @param values : The value for the netcdf attribute + !! @retval ierr @copydoc error_return + !< +# 438 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function get_att_1d_double (File,varid,name,values) result(ierr) + type (File_desc_t), intent(in) , target :: File + integer(i4), intent(in) :: varid + character(len=*), intent(in) :: name + real(r8), intent(out) :: values(:) + + ierr = get_att_1d_id_double (file%fh, varid, name, values) + +# 446 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function get_att_1d_double + + + ! TYPE real,int,double +# 450 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function get_att_1d_id_real (ncid,varid,name,values) result(ierr) + integer, intent(in) :: ncid + integer(i4), intent(in) :: varid + character(len=*), intent(in) :: name + real(r4), intent(out) , target :: values(*) + + ierr = PIOc_get_att_float (ncid, varid-1, trim(name)//C_NULL_CHAR, values(1)) + + +# 459 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function get_att_1d_id_real + ! TYPE real,int,double +# 450 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function get_att_1d_id_int (ncid,varid,name,values) result(ierr) + integer, intent(in) :: ncid + integer(i4), intent(in) :: varid + character(len=*), intent(in) :: name + integer(i4), intent(out) , target :: values(*) + + ierr = PIOc_get_att_int (ncid, varid-1, trim(name)//C_NULL_CHAR, values(1)) + + +# 459 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function get_att_1d_id_int + ! TYPE real,int,double +# 450 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + integer function get_att_1d_id_double (ncid,varid,name,values) result(ierr) + integer, intent(in) :: ncid + integer(i4), intent(in) :: varid + character(len=*), intent(in) :: name + real(r8), intent(out) , target :: values(*) + + ierr = PIOc_get_att_double (ncid, varid-1, trim(name)//C_NULL_CHAR, values(1)) + + +# 459 "/home/ed/tmp/ParallelIO/src/flib/pionfatt_mod.F90.in" + end function get_att_1d_id_double + + +end module pionfatt_mod diff --git a/src/flib/pionfget_mod.F90.in2 b/src/flib/pionfget_mod.F90.in2 new file mode 100644 index 00000000000..5532d1c73ca --- /dev/null +++ b/src/flib/pionfget_mod.F90.in2 @@ -0,0 +1,2727 @@ +!=================================================== +! DO NOT EDIT THIS FILE, it was generated using genf90/src/genf90/genf90.pl +! Any changes you make to this file may be lost +!=================================================== +#define __PIO_FILE__ "pionfget_mod.F90" +!> +!! @file +!! @brief Read Routines for non-decomposed NetCDF data. +!< +module pionfget_mod + use iso_c_binding +#ifdef TIMING + use perf_mod, only : t_startf, t_stopf ! _EXTERNAL +#endif + use pio_kinds, only: i4,r4,r8 + use pio_types, only : file_desc_t, var_desc_t + use pio_support, only : replace_c_null + implicit none + private +!> +!! @defgroup PIO_get_var PIO_get_var +!! @brief Reads non-decomposed data from a NetCDF file +!! @details The get_var interface is provided as a simplified interface to +!! read variables from a NetCDF format file. The variable is read on the +!! root IO task and broadcast in its entirety to all tasks. +!< + public :: get_var +# 24 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + interface get_var + module procedure get_var_0d_text, get_var_vdesc_0d_text + module procedure get_var_1d_text, get_var_vdesc_1d_text + module procedure get_var_2d_text, get_var_vdesc_2d_text + module procedure get_var_3d_text, get_var_vdesc_3d_text + module procedure get_var_4d_text, get_var_vdesc_4d_text + module procedure get_var_5d_text, get_var_vdesc_5d_text + module procedure get_var_0d_real, get_var_vdesc_0d_real + module procedure get_var_1d_real, get_var_vdesc_1d_real + module procedure get_var_2d_real, get_var_vdesc_2d_real + module procedure get_var_3d_real, get_var_vdesc_3d_real + module procedure get_var_4d_real, get_var_vdesc_4d_real + module procedure get_var_5d_real, get_var_vdesc_5d_real + module procedure get_var_0d_double, get_var_vdesc_0d_double + module procedure get_var_1d_double, get_var_vdesc_1d_double + module procedure get_var_2d_double, get_var_vdesc_2d_double + module procedure get_var_3d_double, get_var_vdesc_3d_double + module procedure get_var_4d_double, get_var_vdesc_4d_double + module procedure get_var_5d_double, get_var_vdesc_5d_double + module procedure get_var_0d_int, get_var_vdesc_0d_int + module procedure get_var_1d_int, get_var_vdesc_1d_int + module procedure get_var_2d_int, get_var_vdesc_2d_int + module procedure get_var_3d_int, get_var_vdesc_3d_int + module procedure get_var_4d_int, get_var_vdesc_4d_int + module procedure get_var_5d_int, get_var_vdesc_5d_int + ! DIMS 1,2,3,4,5 + module procedure get_vara_1d_text, get_vara_vdesc_1d_text + ! DIMS 1,2,3,4,5 + module procedure get_vara_2d_text, get_vara_vdesc_2d_text + ! DIMS 1,2,3,4,5 + module procedure get_vara_3d_text, get_vara_vdesc_3d_text + ! DIMS 1,2,3,4,5 + module procedure get_vara_4d_text, get_vara_vdesc_4d_text + ! DIMS 1,2,3,4,5 + module procedure get_vara_5d_text, get_vara_vdesc_5d_text + ! DIMS 1,2,3,4,5 + module procedure get_vara_1d_real, get_vara_vdesc_1d_real + ! DIMS 1,2,3,4,5 + module procedure get_vara_2d_real, get_vara_vdesc_2d_real + ! DIMS 1,2,3,4,5 + module procedure get_vara_3d_real, get_vara_vdesc_3d_real + ! DIMS 1,2,3,4,5 + module procedure get_vara_4d_real, get_vara_vdesc_4d_real + ! DIMS 1,2,3,4,5 + module procedure get_vara_5d_real, get_vara_vdesc_5d_real + ! DIMS 1,2,3,4,5 + module procedure get_vara_1d_double, get_vara_vdesc_1d_double + ! DIMS 1,2,3,4,5 + module procedure get_vara_2d_double, get_vara_vdesc_2d_double + ! DIMS 1,2,3,4,5 + module procedure get_vara_3d_double, get_vara_vdesc_3d_double + ! DIMS 1,2,3,4,5 + module procedure get_vara_4d_double, get_vara_vdesc_4d_double + ! DIMS 1,2,3,4,5 + module procedure get_vara_5d_double, get_vara_vdesc_5d_double + ! DIMS 1,2,3,4,5 + module procedure get_vara_1d_int, get_vara_vdesc_1d_int + ! DIMS 1,2,3,4,5 + module procedure get_vara_2d_int, get_vara_vdesc_2d_int + ! DIMS 1,2,3,4,5 + module procedure get_vara_3d_int, get_vara_vdesc_3d_int + ! DIMS 1,2,3,4,5 + module procedure get_vara_4d_int, get_vara_vdesc_4d_int + ! DIMS 1,2,3,4,5 + module procedure get_vara_5d_int, get_vara_vdesc_5d_int + module procedure get_var1_text, get_var1_vdesc_text + module procedure get_var1_real, get_var1_vdesc_real + module procedure get_var1_double, get_var1_vdesc_double + module procedure get_var1_int, get_var1_vdesc_int + end interface + + character(len=*), parameter :: modName='pionfget_mod' + +# 33 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + interface +# 34 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer(C_INT) function PIOc_get_var_text (ncid, varid, ival) & + bind(C,name="PIOc_get_var_text") + use iso_c_binding + integer(C_INT), value :: ncid + integer(C_INT), value :: varid + character(C_CHAR) :: ival(*) +# 40 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function PIOc_get_var_text + end interface +# 42 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + interface +# 43 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer(C_INT) function PIOc_get_var_int (ncid, varid, ival) & + bind(C,name="PIOc_get_var_int") + use iso_c_binding + integer(C_INT), value :: ncid + integer(C_INT), value :: varid + integer(C_INT) :: ival(*) +# 49 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function PIOc_get_var_int + end interface +# 51 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + interface +# 52 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer(C_INT) function PIOc_get_var_float (ncid, varid, ival) & + bind(C,name="PIOc_get_var_float") + use iso_c_binding + integer(C_INT), value :: ncid + integer(C_INT), value :: varid + real(C_float) :: ival(*) +# 58 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function PIOc_get_var_float + end interface +# 60 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + interface +# 61 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer(C_INT) function PIOc_get_var_double (ncid, varid, ival) & + bind(C,name="PIOc_get_var_double") + use iso_c_binding + integer(C_INT), value :: ncid + integer(C_INT), value :: varid + real(C_DOUBLE) :: ival(*) +# 67 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function PIOc_get_var_double + end interface + +# 70 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + interface +# 71 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer(C_INT) function PIOc_get_vara_int (ncid, varid, start, count, ival) & + bind(C,name="PIOc_get_vara_int") + use iso_c_binding + integer(C_INT), value :: ncid + integer(C_INT), value :: varid + integer(C_SIZE_T) :: start(*) + integer(C_SIZE_T) :: count(*) + integer(C_INT) :: ival(*) +# 79 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function PIOc_get_vara_int + end interface +# 81 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + interface +# 82 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer(C_INT) function PIOc_get_vara_float (ncid, varid, start, count, ival) & + bind(C,name="PIOc_get_vara_float") + use iso_c_binding + integer(C_INT), value :: ncid + integer(C_INT), value :: varid + integer(C_SIZE_T) :: start(*) + integer(C_SIZE_T) :: count(*) + real(C_FLOAT) :: ival(*) +# 90 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function PIOc_get_vara_float + end interface +# 92 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + interface +# 93 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer(C_INT) function PIOc_get_vara_double (ncid, varid, start, count, ival) & + bind(C,name="PIOc_get_vara_double") + use iso_c_binding + integer(C_INT), value :: ncid + integer(C_INT), value :: varid + integer(C_SIZE_T) :: start(*) + integer(C_SIZE_T) :: count(*) + real(C_DOUBLE) :: ival(*) +# 101 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function PIOc_get_vara_double + end interface +# 103 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + interface +# 104 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer(C_INT) function PIOc_get_vara_text (ncid, varid, start, count, ival) & + bind(C,name="PIOc_get_vara_text") + use iso_c_binding + integer(C_INT), value :: ncid + integer(C_INT), value :: varid + integer(C_SIZE_T) :: start(*) + integer(C_SIZE_T) :: count(*) + character(C_CHAR) :: ival(*) +# 112 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function PIOc_get_vara_text + end interface +# 114 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" +CONTAINS + +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Reads non-decomposed fields from a NetCDF file +!! @details +!! @param File @ref file_desc_t +!! @param varid : The netcdf variable identifier +!! @param index : a multidimensional index that specifies which value to get +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 127 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var1_text (File,varid, index, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid, index(:) + character(len=*), intent(out) :: ival + + + ierr = get_var1_id_text (file%fh, varid, index, ival) + +# 135 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var1_text +# 127 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var1_real (File,varid, index, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid, index(:) + real(r4), intent(out) :: ival + + + ierr = get_var1_id_real (file%fh, varid, index, ival) + +# 135 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var1_real +# 127 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var1_double (File,varid, index, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid, index(:) + real(r8), intent(out) :: ival + + + ierr = get_var1_id_double (file%fh, varid, index, ival) + +# 135 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var1_double +# 127 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var1_int (File,varid, index, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid, index(:) + integer(i4), intent(out) :: ival + + + ierr = get_var1_id_int (file%fh, varid, index, ival) + +# 135 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var1_int +! TYPE int,real,double +# 137 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var1_id_int (ncid,varid, index, ival) result(ierr) + integer, intent(in) :: ncid + integer, intent(in) :: varid, index(:) + integer(i4), intent(out) :: ival + integer(C_SIZE_T), allocatable :: cindex(:) + integer :: i, clen +# 143 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + interface +# 144 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer(C_INT) function PIOc_get_var1_int (ncid, varid, index, ival) & + bind(C,name="PIOc_get_var1_int") + use iso_c_binding + integer(C_INT), value :: ncid + integer(C_INT), value :: varid + integer(C_SIZE_T) :: index(*) + integer(C_INT) :: ival +# 151 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function PIOc_get_var1_int + end interface + +#ifdef TIMING + call t_startf("PIO:get_var1_int") +#endif + clen = size(index) + allocate(cindex(clen)) + do i=1,clen + cindex(i)=index(clen-i+1)-1 + end do + + ierr = PIOc_get_var1_int (ncid, varid-1, cindex, ival) + deallocate(cindex) +#ifdef TIMING + call t_stopf("PIO:get_var1_int") +#endif +# 168 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var1_id_int +! TYPE int,real,double +# 137 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var1_id_real (ncid,varid, index, ival) result(ierr) + integer, intent(in) :: ncid + integer, intent(in) :: varid, index(:) + real(r4), intent(out) :: ival + integer(C_SIZE_T), allocatable :: cindex(:) + integer :: i, clen +# 143 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + interface +# 144 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer(C_INT) function PIOc_get_var1_float (ncid, varid, index, ival) & + bind(C,name="PIOc_get_var1_float") + use iso_c_binding + integer(C_INT), value :: ncid + integer(C_INT), value :: varid + integer(C_SIZE_T) :: index(*) + real(C_FLOAT) :: ival +# 151 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function PIOc_get_var1_float + end interface + +#ifdef TIMING + call t_startf("PIO:get_var1_real") +#endif + clen = size(index) + allocate(cindex(clen)) + do i=1,clen + cindex(i)=index(clen-i+1)-1 + end do + + ierr = PIOc_get_var1_float (ncid, varid-1, cindex, ival) + deallocate(cindex) +#ifdef TIMING + call t_stopf("PIO:get_var1_real") +#endif +# 168 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var1_id_real +! TYPE int,real,double +# 137 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var1_id_double (ncid,varid, index, ival) result(ierr) + integer, intent(in) :: ncid + integer, intent(in) :: varid, index(:) + real(r8), intent(out) :: ival + integer(C_SIZE_T), allocatable :: cindex(:) + integer :: i, clen +# 143 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + interface +# 144 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer(C_INT) function PIOc_get_var1_double (ncid, varid, index, ival) & + bind(C,name="PIOc_get_var1_double") + use iso_c_binding + integer(C_INT), value :: ncid + integer(C_INT), value :: varid + integer(C_SIZE_T) :: index(*) + real(C_DOUBLE) :: ival +# 151 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function PIOc_get_var1_double + end interface + +#ifdef TIMING + call t_startf("PIO:get_var1_double") +#endif + clen = size(index) + allocate(cindex(clen)) + do i=1,clen + cindex(i)=index(clen-i+1)-1 + end do + + ierr = PIOc_get_var1_double (ncid, varid-1, cindex, ival) + deallocate(cindex) +#ifdef TIMING + call t_stopf("PIO:get_var1_double") +#endif +# 168 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var1_id_double + + + +# 172 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var1_id_text_internal(ncid,varid, index, vlen, ival) result(ierr) + integer, intent(in) :: ncid + integer, intent(in) :: varid, index(:) + integer,intent(in) :: vlen + character, intent(out) :: ival(vlen) + + integer(C_SIZE_T), allocatable :: cindex(:) + integer(C_SIZE_T), allocatable :: count(:) + integer :: i, clen +!!$ interface +!!$ integer(C_INT) function PIOc_get_var1_text (ncid, varid, index, ival) & +!!$ bind(C,name="PIOc_get_var1_text") +!!$ use iso_c_binding +!!$ integer(C_INT), value :: ncid +!!$ integer(C_INT), value :: varid +!!$ integer(C_SIZE_T) :: index(*) +!!$ character :: ival(*) +!!$ end function PIOc_get_var1_text +!!$ end interface + +#ifdef TIMING + call t_startf("PIO:get_var1_text") +#endif + clen = size(index) + allocate(cindex(clen)) + do i=1,clen + cindex(i)=index(clen-i+1)-1 + end do + allocate(count(clen)) + count=1 + count(clen) = vlen + ierr = PIOc_get_vara_text (ncid, varid-1, cindex, count, ival) + deallocate(cindex) + deallocate(count) +#ifdef TIMING + call t_stopf("PIO:get_var1_text") +#endif +# 209 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var1_id_text_internal + +# 211 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var1_id_text (ncid,varid, index, ival) result(ierr) + integer, intent(in) :: ncid + integer, intent(in) :: varid, index(:) + character(len=*), intent(out) :: ival + character, allocatable :: cval(:) + integer :: clen, i + + clen = len(ival) + allocate(cval(clen)) + cval=C_NULL_CHAR + ival='' + ierr = get_var1_id_text_internal(ncid,varid,index,clen,cval) + i=1 + do while(i<=clen ) + if(cval(i) == C_NULL_CHAR ) exit + ival(i:i) = cval(i) + i=i+1 + enddo + deallocate(cval) +! print *,__FILE__,__LINE__,trim(ival) + + +# 233 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var1_id_text + + + +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param vardesc @ref var_desc_t +!! @param index : a multidimensional index that specifies which value to get +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 248 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var1_vdesc_text (File,vardesc, index, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: index(:) + character(len=*), intent(out) :: ival + + character(len=*), parameter :: subName=modName//'::get_var1_vdesc_text' + + ierr = get_var1_text (File, vardesc%varid, index, ival) + +# 258 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var1_vdesc_text +# 248 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var1_vdesc_real (File,vardesc, index, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: index(:) + real(r4), intent(out) :: ival + + character(len=*), parameter :: subName=modName//'::get_var1_vdesc_real' + + ierr = get_var1_real (File, vardesc%varid, index, ival) + +# 258 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var1_vdesc_real +# 248 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var1_vdesc_double (File,vardesc, index, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: index(:) + real(r8), intent(out) :: ival + + character(len=*), parameter :: subName=modName//'::get_var1_vdesc_double' + + ierr = get_var1_double (File, vardesc%varid, index, ival) + +# 258 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var1_vdesc_double +# 248 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var1_vdesc_int (File,vardesc, index, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: index(:) + integer(i4), intent(out) :: ival + + character(len=*), parameter :: subName=modName//'::get_var1_vdesc_int' + + ierr = get_var1_int (File, vardesc%varid, index, ival) + +# 258 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var1_vdesc_int + + +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_1d_int (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid, start(:), count(:) + integer(i4), intent(out) :: ival(:) + + ierr = get_vara_int_internal (File%fh, varid, start, count, ival) + +# 298 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_1d_int +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_2d_int (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid, start(:), count(:) + integer(i4), intent(out) :: ival(:,:) + + ierr = get_vara_int_internal (File%fh, varid, start, count, ival) + +# 298 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_2d_int +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_3d_int (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid, start(:), count(:) + integer(i4), intent(out) :: ival(:,:,:) + + ierr = get_vara_int_internal (File%fh, varid, start, count, ival) + +# 298 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_3d_int +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_4d_int (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid, start(:), count(:) + integer(i4), intent(out) :: ival(:,:,:,:) + + ierr = get_vara_int_internal (File%fh, varid, start, count, ival) + +# 298 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_4d_int +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_5d_int (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid, start(:), count(:) + integer(i4), intent(out) :: ival(:,:,:,:,:) + + ierr = get_vara_int_internal (File%fh, varid, start, count, ival) + +# 298 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_5d_int +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_1d_real (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid, start(:), count(:) + real(r4), intent(out) :: ival(:) + + ierr = get_vara_real_internal (File%fh, varid, start, count, ival) + +# 298 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_1d_real +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_2d_real (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid, start(:), count(:) + real(r4), intent(out) :: ival(:,:) + + ierr = get_vara_real_internal (File%fh, varid, start, count, ival) + +# 298 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_2d_real +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_3d_real (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid, start(:), count(:) + real(r4), intent(out) :: ival(:,:,:) + + ierr = get_vara_real_internal (File%fh, varid, start, count, ival) + +# 298 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_3d_real +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_4d_real (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid, start(:), count(:) + real(r4), intent(out) :: ival(:,:,:,:) + + ierr = get_vara_real_internal (File%fh, varid, start, count, ival) + +# 298 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_4d_real +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_5d_real (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid, start(:), count(:) + real(r4), intent(out) :: ival(:,:,:,:,:) + + ierr = get_vara_real_internal (File%fh, varid, start, count, ival) + +# 298 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_5d_real +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_1d_double (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid, start(:), count(:) + real(r8), intent(out) :: ival(:) + + ierr = get_vara_double_internal (File%fh, varid, start, count, ival) + +# 298 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_1d_double +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_2d_double (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid, start(:), count(:) + real(r8), intent(out) :: ival(:,:) + + ierr = get_vara_double_internal (File%fh, varid, start, count, ival) + +# 298 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_2d_double +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_3d_double (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid, start(:), count(:) + real(r8), intent(out) :: ival(:,:,:) + + ierr = get_vara_double_internal (File%fh, varid, start, count, ival) + +# 298 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_3d_double +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_4d_double (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid, start(:), count(:) + real(r8), intent(out) :: ival(:,:,:,:) + + ierr = get_vara_double_internal (File%fh, varid, start, count, ival) + +# 298 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_4d_double +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 291 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_5d_double (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid, start(:), count(:) + real(r8), intent(out) :: ival(:,:,:,:,:) + + ierr = get_vara_double_internal (File%fh, varid, start, count, ival) + +# 298 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_5d_double + +! DIMS 1,2,3,4,5 +# 301 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_1d_text (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid, start(:), count(:) + character(len=*), intent(out) :: ival(:) + ival = ' ' + ierr = get_vara_text_internal (File%fh, varid, start, count, size(ival), ival) + +# 308 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_1d_text +! DIMS 1,2,3,4,5 +# 301 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_2d_text (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid, start(:), count(:) + character(len=*), intent(out) :: ival(:,:) + ival = ' ' + ierr = get_vara_text_internal (File%fh, varid, start, count, size(ival), ival) + +# 308 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_2d_text +! DIMS 1,2,3,4,5 +# 301 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_3d_text (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid, start(:), count(:) + character(len=*), intent(out) :: ival(:,:,:) + ival = ' ' + ierr = get_vara_text_internal (File%fh, varid, start, count, size(ival), ival) + +# 308 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_3d_text +! DIMS 1,2,3,4,5 +# 301 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_4d_text (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid, start(:), count(:) + character(len=*), intent(out) :: ival(:,:,:,:) + ival = ' ' + ierr = get_vara_text_internal (File%fh, varid, start, count, size(ival), ival) + +# 308 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_4d_text +! DIMS 1,2,3,4,5 +# 301 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_5d_text (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid, start(:), count(:) + character(len=*), intent(out) :: ival(:,:,:,:,:) + ival = ' ' + ierr = get_vara_text_internal (File%fh, varid, start, count, size(ival), ival) + +# 308 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_5d_text + +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param vardesc @ref var_desc_t +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 339 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_vdesc_1d_text (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + character(len=*), intent(out) :: ival(:) + + character(len=*), parameter :: subName=modName//'::get_vara_vdesc_1d_text' + + ierr = get_vara_1d_text (File, vardesc%varid, start, count, ival) + +# 349 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_vdesc_1d_text +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param vardesc @ref var_desc_t +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 339 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_vdesc_2d_text (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + character(len=*), intent(out) :: ival(:,:) + + character(len=*), parameter :: subName=modName//'::get_vara_vdesc_2d_text' + + ierr = get_vara_2d_text (File, vardesc%varid, start, count, ival) + +# 349 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_vdesc_2d_text +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param vardesc @ref var_desc_t +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 339 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_vdesc_3d_text (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + character(len=*), intent(out) :: ival(:,:,:) + + character(len=*), parameter :: subName=modName//'::get_vara_vdesc_3d_text' + + ierr = get_vara_3d_text (File, vardesc%varid, start, count, ival) + +# 349 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_vdesc_3d_text +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param vardesc @ref var_desc_t +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 339 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_vdesc_4d_text (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + character(len=*), intent(out) :: ival(:,:,:,:) + + character(len=*), parameter :: subName=modName//'::get_vara_vdesc_4d_text' + + ierr = get_vara_4d_text (File, vardesc%varid, start, count, ival) + +# 349 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_vdesc_4d_text +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param vardesc @ref var_desc_t +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 339 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_vdesc_5d_text (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + character(len=*), intent(out) :: ival(:,:,:,:,:) + + character(len=*), parameter :: subName=modName//'::get_vara_vdesc_5d_text' + + ierr = get_vara_5d_text (File, vardesc%varid, start, count, ival) + +# 349 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_vdesc_5d_text +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param vardesc @ref var_desc_t +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 339 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_vdesc_1d_real (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + real(r4), intent(out) :: ival(:) + + character(len=*), parameter :: subName=modName//'::get_vara_vdesc_1d_real' + + ierr = get_vara_1d_real (File, vardesc%varid, start, count, ival) + +# 349 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_vdesc_1d_real +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param vardesc @ref var_desc_t +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 339 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_vdesc_2d_real (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + real(r4), intent(out) :: ival(:,:) + + character(len=*), parameter :: subName=modName//'::get_vara_vdesc_2d_real' + + ierr = get_vara_2d_real (File, vardesc%varid, start, count, ival) + +# 349 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_vdesc_2d_real +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param vardesc @ref var_desc_t +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 339 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_vdesc_3d_real (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + real(r4), intent(out) :: ival(:,:,:) + + character(len=*), parameter :: subName=modName//'::get_vara_vdesc_3d_real' + + ierr = get_vara_3d_real (File, vardesc%varid, start, count, ival) + +# 349 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_vdesc_3d_real +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param vardesc @ref var_desc_t +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 339 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_vdesc_4d_real (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + real(r4), intent(out) :: ival(:,:,:,:) + + character(len=*), parameter :: subName=modName//'::get_vara_vdesc_4d_real' + + ierr = get_vara_4d_real (File, vardesc%varid, start, count, ival) + +# 349 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_vdesc_4d_real +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param vardesc @ref var_desc_t +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 339 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_vdesc_5d_real (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + real(r4), intent(out) :: ival(:,:,:,:,:) + + character(len=*), parameter :: subName=modName//'::get_vara_vdesc_5d_real' + + ierr = get_vara_5d_real (File, vardesc%varid, start, count, ival) + +# 349 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_vdesc_5d_real +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param vardesc @ref var_desc_t +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 339 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_vdesc_1d_double (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + real(r8), intent(out) :: ival(:) + + character(len=*), parameter :: subName=modName//'::get_vara_vdesc_1d_double' + + ierr = get_vara_1d_double (File, vardesc%varid, start, count, ival) + +# 349 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_vdesc_1d_double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param vardesc @ref var_desc_t +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 339 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_vdesc_2d_double (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + real(r8), intent(out) :: ival(:,:) + + character(len=*), parameter :: subName=modName//'::get_vara_vdesc_2d_double' + + ierr = get_vara_2d_double (File, vardesc%varid, start, count, ival) + +# 349 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_vdesc_2d_double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param vardesc @ref var_desc_t +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 339 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_vdesc_3d_double (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + real(r8), intent(out) :: ival(:,:,:) + + character(len=*), parameter :: subName=modName//'::get_vara_vdesc_3d_double' + + ierr = get_vara_3d_double (File, vardesc%varid, start, count, ival) + +# 349 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_vdesc_3d_double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param vardesc @ref var_desc_t +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 339 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_vdesc_4d_double (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + real(r8), intent(out) :: ival(:,:,:,:) + + character(len=*), parameter :: subName=modName//'::get_vara_vdesc_4d_double' + + ierr = get_vara_4d_double (File, vardesc%varid, start, count, ival) + +# 349 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_vdesc_4d_double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param vardesc @ref var_desc_t +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 339 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_vdesc_5d_double (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + real(r8), intent(out) :: ival(:,:,:,:,:) + + character(len=*), parameter :: subName=modName//'::get_vara_vdesc_5d_double' + + ierr = get_vara_5d_double (File, vardesc%varid, start, count, ival) + +# 349 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_vdesc_5d_double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param vardesc @ref var_desc_t +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 339 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_vdesc_1d_int (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + integer(i4), intent(out) :: ival(:) + + character(len=*), parameter :: subName=modName//'::get_vara_vdesc_1d_int' + + ierr = get_vara_1d_int (File, vardesc%varid, start, count, ival) + +# 349 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_vdesc_1d_int +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param vardesc @ref var_desc_t +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 339 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_vdesc_2d_int (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + integer(i4), intent(out) :: ival(:,:) + + character(len=*), parameter :: subName=modName//'::get_vara_vdesc_2d_int' + + ierr = get_vara_2d_int (File, vardesc%varid, start, count, ival) + +# 349 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_vdesc_2d_int +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param vardesc @ref var_desc_t +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 339 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_vdesc_3d_int (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + integer(i4), intent(out) :: ival(:,:,:) + + character(len=*), parameter :: subName=modName//'::get_vara_vdesc_3d_int' + + ierr = get_vara_3d_int (File, vardesc%varid, start, count, ival) + +# 349 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_vdesc_3d_int +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param vardesc @ref var_desc_t +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 339 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_vdesc_4d_int (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + integer(i4), intent(out) :: ival(:,:,:,:) + + character(len=*), parameter :: subName=modName//'::get_vara_vdesc_4d_int' + + ierr = get_vara_4d_int (File, vardesc%varid, start, count, ival) + +# 349 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_vdesc_4d_int +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param vardesc @ref var_desc_t +!! @param start : A vector of size_t integers specifying the index in +!! the variable where the first of the data values will be read. The +!! indices are relative to 0, so for example, the first data value of +!! a variable would have index (0, 0, ... , 0). The length of start +!! must be the same as the number of dimensions of the specified +!! variable. The elements of start correspond, in order, to the +!! variable's dimensions. Hence, if the variable is a record variable, +!! the first index would correspond to the starting record number for +!! reading the data values. +!! @param count : A vector of size_t integers specifying the edge +!! lengths along each dimension of the block of data values to be +!! read. To read a single value, for example, specify count as (1, 1, +!! ... , 1). The length of count is the number of dimensions of the +!! specified variable. The elements of count correspond, in order, to +!! the variable's dimensions. Hence, if the variable is a record +!! variable, the first element of count corresponds to a count of the +!! number of records to read. +!! Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything. +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 339 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_vdesc_5d_int (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + integer(i4), intent(out) :: ival(:,:,:,:,:) + + character(len=*), parameter :: subName=modName//'::get_vara_vdesc_5d_int' + + ierr = get_vara_5d_int (File, vardesc%varid, start, count, ival) + +# 349 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_vdesc_5d_int + +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 361 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_0d_text (File,varid, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + character(len=*), intent(out) :: ival + + + ival =C_NULL_CHAR + ierr = PIOc_get_var_text(File%fh, varid-1, ival) + call replace_c_null(ival) +! print *,__FILE__,__LINE__,trim(ival) +# 371 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function Get_var_0d_text + + +! TYPE int,real,double +! DIMS 0 +# 376 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_0d_int (File,varid, ival) result(ierr) + use iso_c_binding + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + integer(i4), intent(out) :: ival + integer(i4) :: aival(1) + + + ierr = PIOc_get_var_int (File%fh, varid-1, aival) + ival = aival(1) + +# 387 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function Get_var_0d_int +! TYPE int,real,double +! DIMS 0 +# 376 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_0d_real (File,varid, ival) result(ierr) + use iso_c_binding + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + real(r4), intent(out) :: ival + real(r4) :: aival(1) + + + ierr = PIOc_get_var_float (File%fh, varid-1, aival) + ival = aival(1) + +# 387 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function Get_var_0d_real +! TYPE int,real,double +! DIMS 0 +# 376 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_0d_double (File,varid, ival) result(ierr) + use iso_c_binding + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + real(r8), intent(out) :: ival + real(r8) :: aival(1) + + + ierr = PIOc_get_var_double (File%fh, varid-1, aival) + ival = aival(1) + +# 387 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function Get_var_0d_double + +! DIMS 1,2,3,4,5 +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_1d_text (File,varid, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + character(len=*), intent(out) :: ival(:) + ival = ' ' + ierr = get_var_text_internal(File%fh, varid, size(ival), ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_1d_text +! DIMS 1,2,3,4,5 +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_2d_text (File,varid, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + character(len=*), intent(out) :: ival(:,:) + ival = ' ' + ierr = get_var_text_internal(File%fh, varid, size(ival), ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_2d_text +! DIMS 1,2,3,4,5 +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_3d_text (File,varid, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + character(len=*), intent(out) :: ival(:,:,:) + ival = ' ' + ierr = get_var_text_internal(File%fh, varid, size(ival), ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_3d_text +! DIMS 1,2,3,4,5 +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_4d_text (File,varid, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + character(len=*), intent(out) :: ival(:,:,:,:) + ival = ' ' + ierr = get_var_text_internal(File%fh, varid, size(ival), ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_4d_text +! DIMS 1,2,3,4,5 +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_5d_text (File,varid, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + character(len=*), intent(out) :: ival(:,:,:,:,:) + ival = ' ' + ierr = get_var_text_internal(File%fh, varid, size(ival), ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_5d_text + +# 399 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_text_internal (ncid,varid, nstrs, ival) result(ierr) + integer, intent(in) :: ncid + integer, intent(in) :: varid + integer, intent(in) :: nstrs + character(len=*), intent(out) :: ival(*) + integer :: j + + ierr = PIOc_get_var_text(ncid, varid-1, ival) + do j=1,nstrs + call replace_c_null(ival(j)) + end do + +# 411 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_text_internal + +! TYPE int,real,double +# 414 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_int_internal (ncid,varid, ival) result(ierr) + integer, intent(in) :: ncid + integer, intent(in) :: varid + integer(i4), intent(out), target :: ival(*) + + ierr = PIOc_get_var_int (ncid, varid-1, ival) + +# 421 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_int_internal +! TYPE int,real,double +# 414 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_real_internal (ncid,varid, ival) result(ierr) + integer, intent(in) :: ncid + integer, intent(in) :: varid + real(r4), intent(out), target :: ival(*) + + ierr = PIOc_get_var_float (ncid, varid-1, ival) + +# 421 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_real_internal +! TYPE int,real,double +# 414 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_double_internal (ncid,varid, ival) result(ierr) + integer, intent(in) :: ncid + integer, intent(in) :: varid + real(r8), intent(out), target :: ival(*) + + ierr = PIOc_get_var_double (ncid, varid-1, ival) + +# 421 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_double_internal + +! TYPE int,real,double +# 424 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_int_internal (ncid,varid, start, count, ival) result(ierr) + use pio_nf, only : pio_inq_varndims + integer, intent(in) :: ncid + integer, intent(in) :: varid + integer, intent(in) :: start(:) + integer, intent(in) :: count(:) + integer(i4), target, intent(out) :: ival(*) + integer(C_SIZE_T), allocatable :: cstart(:), ccount(:) + integer :: i, ndims + + ierr = pio_inq_varndims(ncid,varid, ndims) + allocate(cstart(ndims),ccount(ndims)) + do i=1,ndims + cstart(i) = start(ndims-i+1)-1 + ccount(i) = count(ndims-i+1) + enddo + + ierr = PIOc_get_vara_int (ncid, varid-1, cstart, ccount, ival) + deallocate(cstart, ccount) + +# 444 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_int_internal +! TYPE int,real,double +# 424 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_real_internal (ncid,varid, start, count, ival) result(ierr) + use pio_nf, only : pio_inq_varndims + integer, intent(in) :: ncid + integer, intent(in) :: varid + integer, intent(in) :: start(:) + integer, intent(in) :: count(:) + real(r4), target, intent(out) :: ival(*) + integer(C_SIZE_T), allocatable :: cstart(:), ccount(:) + integer :: i, ndims + + ierr = pio_inq_varndims(ncid,varid, ndims) + allocate(cstart(ndims),ccount(ndims)) + do i=1,ndims + cstart(i) = start(ndims-i+1)-1 + ccount(i) = count(ndims-i+1) + enddo + + ierr = PIOc_get_vara_float (ncid, varid-1, cstart, ccount, ival) + deallocate(cstart, ccount) + +# 444 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_real_internal +! TYPE int,real,double +# 424 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_double_internal (ncid,varid, start, count, ival) result(ierr) + use pio_nf, only : pio_inq_varndims + integer, intent(in) :: ncid + integer, intent(in) :: varid + integer, intent(in) :: start(:) + integer, intent(in) :: count(:) + real(r8), target, intent(out) :: ival(*) + integer(C_SIZE_T), allocatable :: cstart(:), ccount(:) + integer :: i, ndims + + ierr = pio_inq_varndims(ncid,varid, ndims) + allocate(cstart(ndims),ccount(ndims)) + do i=1,ndims + cstart(i) = start(ndims-i+1)-1 + ccount(i) = count(ndims-i+1) + enddo + + ierr = PIOc_get_vara_double (ncid, varid-1, cstart, ccount, ival) + deallocate(cstart, ccount) + +# 444 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_double_internal + +# 446 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_vara_text_internal (ncid,varid, start, count, nstrs, ival) result(ierr) + use pio_nf, only : pio_inq_varndims + integer, intent(in) :: ncid + integer, intent(in) :: varid + integer, intent(in) :: start(:) + integer, intent(in) :: count(:) + integer, intent(in) :: nstrs + character(len=*), intent(out) :: ival(*) + integer :: j + integer(C_SIZE_T), allocatable :: cstart(:), ccount(:) + integer :: i, ndims + + ierr = pio_inq_varndims(ncid,varid, ndims) + allocate(cstart(ndims),ccount(ndims)) + do i=1,ndims + cstart(i) = start(ndims-i+1)-1 + ccount(i) = count(ndims-i+1) + enddo + + ierr = PIOc_get_vara_text (ncid, varid-1, cstart, ccount, ival) + do j=1,nstrs + call replace_c_null(ival(j),ccount(ndims)) + end do + deallocate(ccount, cstart) +# 470 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_vara_text_internal + +! TYPE int,real,double +! DIMS 1,2,3,4,5 +# 474 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_1d_int (File,varid, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + integer(i4), intent(out) :: ival(:) + + ierr = get_var_int_internal(File%fh, varid, ival) + +# 481 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_1d_int +! TYPE int,real,double +! DIMS 1,2,3,4,5 +# 474 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_2d_int (File,varid, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + integer(i4), intent(out) :: ival(:,:) + + ierr = get_var_int_internal(File%fh, varid, ival) + +# 481 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_2d_int +! TYPE int,real,double +! DIMS 1,2,3,4,5 +# 474 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_3d_int (File,varid, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + integer(i4), intent(out) :: ival(:,:,:) + + ierr = get_var_int_internal(File%fh, varid, ival) + +# 481 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_3d_int +! TYPE int,real,double +! DIMS 1,2,3,4,5 +# 474 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_4d_int (File,varid, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + integer(i4), intent(out) :: ival(:,:,:,:) + + ierr = get_var_int_internal(File%fh, varid, ival) + +# 481 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_4d_int +! TYPE int,real,double +! DIMS 1,2,3,4,5 +# 474 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_5d_int (File,varid, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + integer(i4), intent(out) :: ival(:,:,:,:,:) + + ierr = get_var_int_internal(File%fh, varid, ival) + +# 481 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_5d_int +! TYPE int,real,double +! DIMS 1,2,3,4,5 +# 474 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_1d_real (File,varid, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + real(r4), intent(out) :: ival(:) + + ierr = get_var_real_internal(File%fh, varid, ival) + +# 481 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_1d_real +! TYPE int,real,double +! DIMS 1,2,3,4,5 +# 474 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_2d_real (File,varid, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + real(r4), intent(out) :: ival(:,:) + + ierr = get_var_real_internal(File%fh, varid, ival) + +# 481 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_2d_real +! TYPE int,real,double +! DIMS 1,2,3,4,5 +# 474 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_3d_real (File,varid, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + real(r4), intent(out) :: ival(:,:,:) + + ierr = get_var_real_internal(File%fh, varid, ival) + +# 481 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_3d_real +! TYPE int,real,double +! DIMS 1,2,3,4,5 +# 474 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_4d_real (File,varid, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + real(r4), intent(out) :: ival(:,:,:,:) + + ierr = get_var_real_internal(File%fh, varid, ival) + +# 481 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_4d_real +! TYPE int,real,double +! DIMS 1,2,3,4,5 +# 474 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_5d_real (File,varid, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + real(r4), intent(out) :: ival(:,:,:,:,:) + + ierr = get_var_real_internal(File%fh, varid, ival) + +# 481 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_5d_real +! TYPE int,real,double +! DIMS 1,2,3,4,5 +# 474 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_1d_double (File,varid, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + real(r8), intent(out) :: ival(:) + + ierr = get_var_double_internal(File%fh, varid, ival) + +# 481 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_1d_double +! TYPE int,real,double +! DIMS 1,2,3,4,5 +# 474 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_2d_double (File,varid, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + real(r8), intent(out) :: ival(:,:) + + ierr = get_var_double_internal(File%fh, varid, ival) + +# 481 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_2d_double +! TYPE int,real,double +! DIMS 1,2,3,4,5 +# 474 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_3d_double (File,varid, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + real(r8), intent(out) :: ival(:,:,:) + + ierr = get_var_double_internal(File%fh, varid, ival) + +# 481 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_3d_double +! TYPE int,real,double +! DIMS 1,2,3,4,5 +# 474 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_4d_double (File,varid, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + real(r8), intent(out) :: ival(:,:,:,:) + + ierr = get_var_double_internal(File%fh, varid, ival) + +# 481 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_4d_double +! TYPE int,real,double +! DIMS 1,2,3,4,5 +# 474 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_5d_double (File,varid, ival) result(ierr) + type (File_desc_t), intent(in) :: File + integer, intent(in) :: varid + real(r8), intent(out) :: ival(:,:,:,:,:) + + ierr = get_var_double_internal(File%fh, varid, ival) + +# 481 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_5d_double + + +!> +!! @public +!! @ingroup PIO_get_var +!! @brief Writes an netcdf attribute to a file +!! @details +!! @param File @ref file_desc_t +!! @param vardesc @ref var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @ref error_return +!< +# 494 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_vdesc_0d_text (File,vardesc, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + character(len=*), intent(out) :: ival + + ierr = get_var_0d_text (File, vardesc%varid, ival) + +# 501 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_vdesc_0d_text +# 494 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_vdesc_1d_text (File,vardesc, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + character(len=*), intent(out) :: ival(:) + + ierr = get_var_1d_text (File, vardesc%varid, ival) + +# 501 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_vdesc_1d_text +# 494 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_vdesc_2d_text (File,vardesc, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + character(len=*), intent(out) :: ival(:,:) + + ierr = get_var_2d_text (File, vardesc%varid, ival) + +# 501 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_vdesc_2d_text +# 494 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_vdesc_3d_text (File,vardesc, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + character(len=*), intent(out) :: ival(:,:,:) + + ierr = get_var_3d_text (File, vardesc%varid, ival) + +# 501 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_vdesc_3d_text +# 494 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_vdesc_4d_text (File,vardesc, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + character(len=*), intent(out) :: ival(:,:,:,:) + + ierr = get_var_4d_text (File, vardesc%varid, ival) + +# 501 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_vdesc_4d_text +# 494 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_vdesc_5d_text (File,vardesc, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + character(len=*), intent(out) :: ival(:,:,:,:,:) + + ierr = get_var_5d_text (File, vardesc%varid, ival) + +# 501 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_vdesc_5d_text +# 494 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_vdesc_0d_real (File,vardesc, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + real(r4), intent(out) :: ival + + ierr = get_var_0d_real (File, vardesc%varid, ival) + +# 501 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_vdesc_0d_real +# 494 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_vdesc_1d_real (File,vardesc, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + real(r4), intent(out) :: ival(:) + + ierr = get_var_1d_real (File, vardesc%varid, ival) + +# 501 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_vdesc_1d_real +# 494 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_vdesc_2d_real (File,vardesc, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + real(r4), intent(out) :: ival(:,:) + + ierr = get_var_2d_real (File, vardesc%varid, ival) + +# 501 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_vdesc_2d_real +# 494 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_vdesc_3d_real (File,vardesc, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + real(r4), intent(out) :: ival(:,:,:) + + ierr = get_var_3d_real (File, vardesc%varid, ival) + +# 501 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_vdesc_3d_real +# 494 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_vdesc_4d_real (File,vardesc, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + real(r4), intent(out) :: ival(:,:,:,:) + + ierr = get_var_4d_real (File, vardesc%varid, ival) + +# 501 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_vdesc_4d_real +# 494 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_vdesc_5d_real (File,vardesc, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + real(r4), intent(out) :: ival(:,:,:,:,:) + + ierr = get_var_5d_real (File, vardesc%varid, ival) + +# 501 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_vdesc_5d_real +# 494 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_vdesc_0d_double (File,vardesc, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + real(r8), intent(out) :: ival + + ierr = get_var_0d_double (File, vardesc%varid, ival) + +# 501 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_vdesc_0d_double +# 494 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_vdesc_1d_double (File,vardesc, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + real(r8), intent(out) :: ival(:) + + ierr = get_var_1d_double (File, vardesc%varid, ival) + +# 501 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_vdesc_1d_double +# 494 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_vdesc_2d_double (File,vardesc, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + real(r8), intent(out) :: ival(:,:) + + ierr = get_var_2d_double (File, vardesc%varid, ival) + +# 501 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_vdesc_2d_double +# 494 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_vdesc_3d_double (File,vardesc, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + real(r8), intent(out) :: ival(:,:,:) + + ierr = get_var_3d_double (File, vardesc%varid, ival) + +# 501 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_vdesc_3d_double +# 494 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_vdesc_4d_double (File,vardesc, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + real(r8), intent(out) :: ival(:,:,:,:) + + ierr = get_var_4d_double (File, vardesc%varid, ival) + +# 501 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_vdesc_4d_double +# 494 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_vdesc_5d_double (File,vardesc, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + real(r8), intent(out) :: ival(:,:,:,:,:) + + ierr = get_var_5d_double (File, vardesc%varid, ival) + +# 501 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_vdesc_5d_double +# 494 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_vdesc_0d_int (File,vardesc, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer(i4), intent(out) :: ival + + ierr = get_var_0d_int (File, vardesc%varid, ival) + +# 501 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_vdesc_0d_int +# 494 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_vdesc_1d_int (File,vardesc, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer(i4), intent(out) :: ival(:) + + ierr = get_var_1d_int (File, vardesc%varid, ival) + +# 501 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_vdesc_1d_int +# 494 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_vdesc_2d_int (File,vardesc, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer(i4), intent(out) :: ival(:,:) + + ierr = get_var_2d_int (File, vardesc%varid, ival) + +# 501 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_vdesc_2d_int +# 494 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_vdesc_3d_int (File,vardesc, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer(i4), intent(out) :: ival(:,:,:) + + ierr = get_var_3d_int (File, vardesc%varid, ival) + +# 501 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_vdesc_3d_int +# 494 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_vdesc_4d_int (File,vardesc, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer(i4), intent(out) :: ival(:,:,:,:) + + ierr = get_var_4d_int (File, vardesc%varid, ival) + +# 501 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_vdesc_4d_int +# 494 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + integer function get_var_vdesc_5d_int (File,vardesc, ival) result(ierr) + type (File_desc_t), intent(in) :: File + type(var_desc_t), intent(in) :: vardesc + integer(i4), intent(out) :: ival(:,:,:,:,:) + + ierr = get_var_5d_int (File, vardesc%varid, ival) + +# 501 "/home/ed/tmp/ParallelIO/src/flib/pionfget_mod.F90.in" + end function get_var_vdesc_5d_int +end module pionfget_mod diff --git a/src/flib/pionfput_mod.F90.in2 b/src/flib/pionfput_mod.F90.in2 new file mode 100644 index 00000000000..89cfea94aeb --- /dev/null +++ b/src/flib/pionfput_mod.F90.in2 @@ -0,0 +1,3588 @@ +!=================================================== +! DO NOT EDIT THIS FILE, it was generated using genf90/src/genf90/genf90.pl +! Any changes you make to this file may be lost +!=================================================== +#define __PIO_FILE__ "pionfput_mod.F90" +!> +!! @file +!! @brief Write routines for non-decomposed NetCDF data. +!< +module pionfput_mod +#ifdef TIMING + use perf_mod, only : t_startf, t_stopf ! _EXTERNAL +#endif + use iso_c_binding + use pio_kinds, only: i4,r4,r8 + use pio_types, only : file_desc_t, var_desc_t, pio_noerr + + implicit none + private + +!> +!! @defgroup PIO_put_var PIO_put_var +!! @brief Writes data to a netCDF file. +!! @details The put_var interface is provided as a simplified interface to +!! write variables to a netcdf format file. +!! @warning Although this is a collective call the variable is written from the +!! root IO task, no consistancy check is made with data passed on other tasks. +!! +!< + public :: put_var +# 27 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + interface put_var + ! DIMS 0,1,2,3,4,5 + module procedure put_var_0d_text, put_var_vdesc_0d_text + ! DIMS 0,1,2,3,4,5 + module procedure put_var_1d_text, put_var_vdesc_1d_text + ! DIMS 0,1,2,3,4,5 + module procedure put_var_2d_text, put_var_vdesc_2d_text + ! DIMS 0,1,2,3,4,5 + module procedure put_var_3d_text, put_var_vdesc_3d_text + ! DIMS 0,1,2,3,4,5 + module procedure put_var_4d_text, put_var_vdesc_4d_text + ! DIMS 0,1,2,3,4,5 + module procedure put_var_5d_text, put_var_vdesc_5d_text + ! DIMS 0,1,2,3,4,5 + module procedure put_var_0d_real, put_var_vdesc_0d_real + ! DIMS 0,1,2,3,4,5 + module procedure put_var_1d_real, put_var_vdesc_1d_real + ! DIMS 0,1,2,3,4,5 + module procedure put_var_2d_real, put_var_vdesc_2d_real + ! DIMS 0,1,2,3,4,5 + module procedure put_var_3d_real, put_var_vdesc_3d_real + ! DIMS 0,1,2,3,4,5 + module procedure put_var_4d_real, put_var_vdesc_4d_real + ! DIMS 0,1,2,3,4,5 + module procedure put_var_5d_real, put_var_vdesc_5d_real + ! DIMS 0,1,2,3,4,5 + module procedure put_var_0d_double, put_var_vdesc_0d_double + ! DIMS 0,1,2,3,4,5 + module procedure put_var_1d_double, put_var_vdesc_1d_double + ! DIMS 0,1,2,3,4,5 + module procedure put_var_2d_double, put_var_vdesc_2d_double + ! DIMS 0,1,2,3,4,5 + module procedure put_var_3d_double, put_var_vdesc_3d_double + ! DIMS 0,1,2,3,4,5 + module procedure put_var_4d_double, put_var_vdesc_4d_double + ! DIMS 0,1,2,3,4,5 + module procedure put_var_5d_double, put_var_vdesc_5d_double + ! DIMS 0,1,2,3,4,5 + module procedure put_var_0d_int, put_var_vdesc_0d_int + ! DIMS 0,1,2,3,4,5 + module procedure put_var_1d_int, put_var_vdesc_1d_int + ! DIMS 0,1,2,3,4,5 + module procedure put_var_2d_int, put_var_vdesc_2d_int + ! DIMS 0,1,2,3,4,5 + module procedure put_var_3d_int, put_var_vdesc_3d_int + ! DIMS 0,1,2,3,4,5 + module procedure put_var_4d_int, put_var_vdesc_4d_int + ! DIMS 0,1,2,3,4,5 + module procedure put_var_5d_int, put_var_vdesc_5d_int + ! DIMS 1,2,3,4,5 + module procedure put_vara_1d_text + ! DIMS 1,2,3,4,5 + module procedure put_vara_2d_text + ! DIMS 1,2,3,4,5 + module procedure put_vara_3d_text + ! DIMS 1,2,3,4,5 + module procedure put_vara_4d_text + ! DIMS 1,2,3,4,5 + module procedure put_vara_5d_text + ! DIMS 1,2,3,4,5 + module procedure put_vara_1d_real + ! DIMS 1,2,3,4,5 + module procedure put_vara_2d_real + ! DIMS 1,2,3,4,5 + module procedure put_vara_3d_real + ! DIMS 1,2,3,4,5 + module procedure put_vara_4d_real + ! DIMS 1,2,3,4,5 + module procedure put_vara_5d_real + ! DIMS 1,2,3,4,5 + module procedure put_vara_1d_double + ! DIMS 1,2,3,4,5 + module procedure put_vara_2d_double + ! DIMS 1,2,3,4,5 + module procedure put_vara_3d_double + ! DIMS 1,2,3,4,5 + module procedure put_vara_4d_double + ! DIMS 1,2,3,4,5 + module procedure put_vara_5d_double + ! DIMS 1,2,3,4,5 + module procedure put_vara_1d_int + ! DIMS 1,2,3,4,5 + module procedure put_vara_2d_int + ! DIMS 1,2,3,4,5 + module procedure put_vara_3d_int + ! DIMS 1,2,3,4,5 + module procedure put_vara_4d_int + ! DIMS 1,2,3,4,5 + module procedure put_vara_5d_int + ! DIMS 1,2,3,4,5 + module procedure put_vara_vdesc_1d_text + ! DIMS 1,2,3,4,5 + module procedure put_vara_vdesc_2d_text + ! DIMS 1,2,3,4,5 + module procedure put_vara_vdesc_3d_text + ! DIMS 1,2,3,4,5 + module procedure put_vara_vdesc_4d_text + ! DIMS 1,2,3,4,5 + module procedure put_vara_vdesc_5d_text + ! DIMS 1,2,3,4,5 + module procedure put_vara_vdesc_1d_real + ! DIMS 1,2,3,4,5 + module procedure put_vara_vdesc_2d_real + ! DIMS 1,2,3,4,5 + module procedure put_vara_vdesc_3d_real + ! DIMS 1,2,3,4,5 + module procedure put_vara_vdesc_4d_real + ! DIMS 1,2,3,4,5 + module procedure put_vara_vdesc_5d_real + ! DIMS 1,2,3,4,5 + module procedure put_vara_vdesc_1d_double + ! DIMS 1,2,3,4,5 + module procedure put_vara_vdesc_2d_double + ! DIMS 1,2,3,4,5 + module procedure put_vara_vdesc_3d_double + ! DIMS 1,2,3,4,5 + module procedure put_vara_vdesc_4d_double + ! DIMS 1,2,3,4,5 + module procedure put_vara_vdesc_5d_double + ! DIMS 1,2,3,4,5 + module procedure put_vara_vdesc_1d_int + ! DIMS 1,2,3,4,5 + module procedure put_vara_vdesc_2d_int + ! DIMS 1,2,3,4,5 + module procedure put_vara_vdesc_3d_int + ! DIMS 1,2,3,4,5 + module procedure put_vara_vdesc_4d_int + ! DIMS 1,2,3,4,5 + module procedure put_vara_vdesc_5d_int + module procedure put_var1_text, put_var1_vdesc_text + module procedure put_var1_real, put_var1_vdesc_real + module procedure put_var1_double, put_var1_vdesc_double + module procedure put_var1_int, put_var1_vdesc_int + end interface +# 36 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + interface +# 37 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer(C_INT) function PIOc_put_var_text(ncid, varid, op) & + bind(C,name="PIOc_put_var_text") + use iso_c_binding + integer(C_INT), intent(in), value :: ncid + integer(C_INT), intent(in), value :: varid + character(C_CHAR) :: op(*) +# 43 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function PIOc_put_var_text + end interface +# 45 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + interface +# 46 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer(C_INT) function PIOc_put_vara_text(ncid, varid, start, count, op) & + bind(C,name="PIOc_put_vara_text") + use iso_c_binding + integer(C_INT), intent(in), value :: ncid + integer(C_INT), intent(in), value :: varid + integer(C_SIZE_T), intent(in) :: start(*) + integer(C_SIZE_T), intent(in) :: count(*) + character(C_CHAR), intent(in) :: op(*) +# 54 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function PIOc_put_vara_text + end interface +# 56 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + interface +# 57 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer(C_INT) function PIOc_put_vara_int(ncid, varid, start, count, op) & + bind(C,name="PIOc_put_vara_int") + use iso_c_binding + integer(C_INT), intent(in), value :: ncid + integer(C_INT), intent(in), value :: varid + integer(C_SIZE_T), intent(in) :: start(*) + integer(C_SIZE_T), intent(in) :: count(*) + integer(C_INT) , intent(in) :: op(*) +# 65 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function PIOc_put_vara_int + end interface +# 67 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + interface +# 68 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer(C_INT) function PIOc_put_vara_float(ncid, varid, start, count, op) & + bind(C,name="PIOc_put_vara_float") + use iso_c_binding + integer(C_INT), intent(in), value :: ncid + integer(C_INT), intent(in), value :: varid + integer(C_SIZE_T), intent(in) :: start(*) + integer(C_SIZE_T), intent(in) :: count(*) + real(C_FLOAT) , intent(in) :: op(*) +# 76 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function PIOc_put_vara_float + end interface +# 78 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + interface +# 79 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer(C_INT) function PIOc_put_vara_double(ncid, varid, start, count, op) & + bind(C,name="PIOc_put_vara_double") + use iso_c_binding + integer(C_INT), intent(in), value :: ncid + integer(C_INT), intent(in), value :: varid + integer(C_SIZE_T), intent(in) :: start(*) + integer(C_SIZE_T), intent(in) :: count(*) + real(C_DOUBLE) , intent(in) :: op(*) +# 87 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function PIOc_put_vara_double + end interface + + + + +# 93 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" +contains + +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write one element of data to a netCDF variable. +!! @details +!! @param File @copydoc file_desc_t +!! @param varid : The netcdf variable identifier +!! @param index : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 106 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var1_text (File,varid, index, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid, index(:) + character(len=*), intent(in) :: ival + character, allocatable :: cval(:) + integer :: i + integer, allocatable :: count(:) + integer :: ndims + + ndims = size(index) + allocate(count(ndims)) + count = 1 + count(1) = len(ival) + allocate(cval(count(1)+1)) + cval = C_NULL_CHAR + do i=1,len_trim(ival) + cval(i) = ival(i:i) + end do + +!print *,__FILE__,__LINE__,index,count,ival + ierr = put_vara_1d_text(File,varid, index, count, cval) + deallocate(count) +# 128 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var1_text +! TYPE int,real,double +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write one element of data to a netCDF variable. +!! @details +!! @param File @copydoc file_desc_t +!! @param varid : The netcdf variable identifier +!! @param index : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 141 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var1_int (File,varid, index, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid, index(:) + integer(i4), intent(in) :: ival + integer :: clen, i + integer(C_SIZE_T), allocatable :: cindex(:) +# 147 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + interface +# 148 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer(C_INT) function PIOc_put_var1_int(ncid, varid, index, op) & + bind(C,name="PIOc_put_var1_int") + use iso_c_binding + integer(C_INT), intent(in), value :: ncid + integer(C_INT), intent(in), value :: varid + integer(C_SIZE_T), intent(in) :: index(*) + integer(C_INT) :: op +# 155 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function PIOc_put_var1_int + end interface + +#ifdef TIMING + call t_startf("PIO:put_var1_int") +#endif + clen = size(index) + allocate(cindex(clen)) + do i=1,clen + cindex(i) = index(clen-i+1)-1 + enddo + + ierr = PIOc_put_var1_int (file%fh, varid-1, cindex, ival) + deallocate(cindex) +#ifdef TIMING + call t_stopf("PIO:put_var1_int") +#endif +# 172 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var1_int +! TYPE int,real,double +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write one element of data to a netCDF variable. +!! @details +!! @param File @copydoc file_desc_t +!! @param varid : The netcdf variable identifier +!! @param index : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 141 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var1_real (File,varid, index, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid, index(:) + real(r4), intent(in) :: ival + integer :: clen, i + integer(C_SIZE_T), allocatable :: cindex(:) +# 147 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + interface +# 148 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer(C_INT) function PIOc_put_var1_float(ncid, varid, index, op) & + bind(C,name="PIOc_put_var1_float") + use iso_c_binding + integer(C_INT), intent(in), value :: ncid + integer(C_INT), intent(in), value :: varid + integer(C_SIZE_T), intent(in) :: index(*) + real(C_FLOAT) :: op +# 155 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function PIOc_put_var1_float + end interface + +#ifdef TIMING + call t_startf("PIO:put_var1_real") +#endif + clen = size(index) + allocate(cindex(clen)) + do i=1,clen + cindex(i) = index(clen-i+1)-1 + enddo + + ierr = PIOc_put_var1_float (file%fh, varid-1, cindex, ival) + deallocate(cindex) +#ifdef TIMING + call t_stopf("PIO:put_var1_real") +#endif +# 172 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var1_real +! TYPE int,real,double +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write one element of data to a netCDF variable. +!! @details +!! @param File @copydoc file_desc_t +!! @param varid : The netcdf variable identifier +!! @param index : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 141 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var1_double (File,varid, index, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid, index(:) + real(r8), intent(in) :: ival + integer :: clen, i + integer(C_SIZE_T), allocatable :: cindex(:) +# 147 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + interface +# 148 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer(C_INT) function PIOc_put_var1_double(ncid, varid, index, op) & + bind(C,name="PIOc_put_var1_double") + use iso_c_binding + integer(C_INT), intent(in), value :: ncid + integer(C_INT), intent(in), value :: varid + integer(C_SIZE_T), intent(in) :: index(*) + real(C_DOUBLE) :: op +# 155 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function PIOc_put_var1_double + end interface + +#ifdef TIMING + call t_startf("PIO:put_var1_double") +#endif + clen = size(index) + allocate(cindex(clen)) + do i=1,clen + cindex(i) = index(clen-i+1)-1 + enddo + + ierr = PIOc_put_var1_double (file%fh, varid-1, cindex, ival) + deallocate(cindex) +#ifdef TIMING + call t_stopf("PIO:put_var1_double") +#endif +# 172 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var1_double + +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write one element of data to a netCDF variable. +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param start : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 185 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var1_vdesc_text (File,vardesc, index, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: index(:) + character(len=*), intent(in) :: ival + + ierr = put_var1_text (File, vardesc%varid, index, ival) +# 192 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var1_vdesc_text +# 185 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var1_vdesc_real (File,vardesc, index, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: index(:) + real(r4), intent(in) :: ival + + ierr = put_var1_real (File, vardesc%varid, index, ival) +# 192 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var1_vdesc_real +# 185 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var1_vdesc_double (File,vardesc, index, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: index(:) + real(r8), intent(in) :: ival + + ierr = put_var1_double (File, vardesc%varid, index, ival) +# 192 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var1_vdesc_double +# 185 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var1_vdesc_int (File,vardesc, index, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: index(:) + integer(i4), intent(in) :: ival + + ierr = put_var1_int (File, vardesc%varid, index, ival) +# 192 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var1_vdesc_int + +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Writes a netCDF scalar variable. +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf variable +!! @retval ierr @copydoc error_return +!< +# 205 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_0d_text (File,varid, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid + character(len=*), intent(in) :: ival + + character, allocatable :: cval(:) + integer :: clen, i + + +! This manipulation is required to convert the fortran string to +! a c character array with all trailing space set to null +! + clen = len(ival) + allocate(cval(clen)) + cval = C_NULL_CHAR + do i=1,len_trim(ival) + cval(i) = ival(i:i) + end do + + ierr = PIOc_put_var_text(file%fh, varid-1, cval) + + deallocate(cval) +# 227 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_0d_text +! DIMS 1,2,3,4,5 +! TYPE text +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Writes text data to netcdf variable. +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 241 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_1d_text (File,varid, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid + character(len=*), intent(in) :: ival(:) + character, allocatable :: cval(:) + integer :: clen, sd + +! This manipulation is required to convert the fortran string to +! a c character array with all trailing space set to null +! + ierr = PIO_NOERR + clen = len(ival) + sd = size(ival) + allocate(cval(clen*sd)) + call Fstring2Cstring_1d (ival, cval) + ierr = PIOc_put_var_text(file%fh, varid-1, cval) + deallocate(cval) + + +# 260 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_1d_text +! DIMS 1,2,3,4,5 +! TYPE text +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Writes text data to netcdf variable. +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 241 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_2d_text (File,varid, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid + character(len=*), intent(in) :: ival(:,:) + character, allocatable :: cval(:) + integer :: clen, sd + +! This manipulation is required to convert the fortran string to +! a c character array with all trailing space set to null +! + ierr = PIO_NOERR + clen = len(ival) + sd = size(ival) + allocate(cval(clen*sd)) + call Fstring2Cstring_2d (ival, cval) + ierr = PIOc_put_var_text(file%fh, varid-1, cval) + deallocate(cval) + + +# 260 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_2d_text +! DIMS 1,2,3,4,5 +! TYPE text +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Writes text data to netcdf variable. +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 241 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_3d_text (File,varid, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid + character(len=*), intent(in) :: ival(:,:,:) + character, allocatable :: cval(:) + integer :: clen, sd + +! This manipulation is required to convert the fortran string to +! a c character array with all trailing space set to null +! + ierr = PIO_NOERR + clen = len(ival) + sd = size(ival) + allocate(cval(clen*sd)) + call Fstring2Cstring_3d (ival, cval) + ierr = PIOc_put_var_text(file%fh, varid-1, cval) + deallocate(cval) + + +# 260 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_3d_text +! DIMS 1,2,3,4,5 +! TYPE text +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Writes text data to netcdf variable. +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 241 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_4d_text (File,varid, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid + character(len=*), intent(in) :: ival(:,:,:,:) + character, allocatable :: cval(:) + integer :: clen, sd + +! This manipulation is required to convert the fortran string to +! a c character array with all trailing space set to null +! + ierr = PIO_NOERR + clen = len(ival) + sd = size(ival) + allocate(cval(clen*sd)) + call Fstring2Cstring_4d (ival, cval) + ierr = PIOc_put_var_text(file%fh, varid-1, cval) + deallocate(cval) + + +# 260 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_4d_text +! DIMS 1,2,3,4,5 +! TYPE text +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Writes text data to netcdf variable. +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 241 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_5d_text (File,varid, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid + character(len=*), intent(in) :: ival(:,:,:,:,:) + character, allocatable :: cval(:) + integer :: clen, sd + +! This manipulation is required to convert the fortran string to +! a c character array with all trailing space set to null +! + ierr = PIO_NOERR + clen = len(ival) + sd = size(ival) + allocate(cval(clen*sd)) + call Fstring2Cstring_5d (ival, cval) + ierr = PIOc_put_var_text(file%fh, varid-1, cval) + deallocate(cval) + + +# 260 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_5d_text + +! DIMS 1,2,3,4,5 +! TYPE int,real,double +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Writes int data to a netCDF variable. +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The data to write. +!! @retval ierr @copydoc error_return +!< +# 275 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_internal_int (ncid,varid, ival) result(ierr) + integer, intent(in) :: ncid + integer, intent(in) :: varid + integer(i4), intent(in) :: ival(*) + +# 280 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + interface +# 281 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer(C_INT) function PIOc_put_var_int(ncid, varid, op) & + bind(C,name="PIOc_put_var_int") + use iso_c_binding + integer(C_INT), intent(in), value :: ncid + integer(C_INT), intent(in), value :: varid + integer(C_INT), intent(in) :: op(*) +# 287 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function PIOc_put_var_int + end interface + + ierr=PIOc_put_var_int (ncid, varid-1, ival) + + +# 293 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_internal_int +! DIMS 1,2,3,4,5 +! TYPE int,real,double +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Writes real data to a netCDF variable. +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The data to write. +!! @retval ierr @copydoc error_return +!< +# 275 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_internal_real (ncid,varid, ival) result(ierr) + integer, intent(in) :: ncid + integer, intent(in) :: varid + real(r4), intent(in) :: ival(*) + +# 280 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + interface +# 281 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer(C_INT) function PIOc_put_var_float(ncid, varid, op) & + bind(C,name="PIOc_put_var_float") + use iso_c_binding + integer(C_INT), intent(in), value :: ncid + integer(C_INT), intent(in), value :: varid + real(C_FLOAT), intent(in) :: op(*) +# 287 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function PIOc_put_var_float + end interface + + ierr=PIOc_put_var_float (ncid, varid-1, ival) + + +# 293 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_internal_real +! DIMS 1,2,3,4,5 +! TYPE int,real,double +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Writes double data to a netCDF variable. +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The data to write. +!! @retval ierr @copydoc error_return +!< +# 275 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_internal_double (ncid,varid, ival) result(ierr) + integer, intent(in) :: ncid + integer, intent(in) :: varid + real(r8), intent(in) :: ival(*) + +# 280 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + interface +# 281 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer(C_INT) function PIOc_put_var_double(ncid, varid, op) & + bind(C,name="PIOc_put_var_double") + use iso_c_binding + integer(C_INT), intent(in), value :: ncid + integer(C_INT), intent(in), value :: varid + real(C_DOUBLE), intent(in) :: op(*) +# 287 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function PIOc_put_var_double + end interface + + ierr=PIOc_put_var_double (ncid, varid-1, ival) + + +# 293 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_internal_double + +! DIMS 1,2,3,4,5 +! TYPE int,real,double +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write int data to a netCDF varaible of 1 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 308 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_1d_int (File,varid, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid + integer(i4), intent(in) :: ival(:) + integer(i4), allocatable :: cval(:) + integer :: clen + clen = size(ival) + allocate(cval(clen)) + cval = reshape(ival,(/clen/)) + ierr = put_var_internal_int (File%fh, varid, cval) + deallocate(cval) + +# 320 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_1d_int +! DIMS 1,2,3,4,5 +! TYPE int,real,double +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write int data to a netCDF varaible of 2 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 308 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_2d_int (File,varid, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid + integer(i4), intent(in) :: ival(:,:) + integer(i4), allocatable :: cval(:) + integer :: clen + clen = size(ival) + allocate(cval(clen)) + cval = reshape(ival,(/clen/)) + ierr = put_var_internal_int (File%fh, varid, cval) + deallocate(cval) + +# 320 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_2d_int +! DIMS 1,2,3,4,5 +! TYPE int,real,double +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write int data to a netCDF varaible of 3 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 308 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_3d_int (File,varid, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid + integer(i4), intent(in) :: ival(:,:,:) + integer(i4), allocatable :: cval(:) + integer :: clen + clen = size(ival) + allocate(cval(clen)) + cval = reshape(ival,(/clen/)) + ierr = put_var_internal_int (File%fh, varid, cval) + deallocate(cval) + +# 320 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_3d_int +! DIMS 1,2,3,4,5 +! TYPE int,real,double +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write int data to a netCDF varaible of 4 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 308 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_4d_int (File,varid, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid + integer(i4), intent(in) :: ival(:,:,:,:) + integer(i4), allocatable :: cval(:) + integer :: clen + clen = size(ival) + allocate(cval(clen)) + cval = reshape(ival,(/clen/)) + ierr = put_var_internal_int (File%fh, varid, cval) + deallocate(cval) + +# 320 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_4d_int +! DIMS 1,2,3,4,5 +! TYPE int,real,double +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write int data to a netCDF varaible of 5 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 308 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_5d_int (File,varid, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid + integer(i4), intent(in) :: ival(:,:,:,:,:) + integer(i4), allocatable :: cval(:) + integer :: clen + clen = size(ival) + allocate(cval(clen)) + cval = reshape(ival,(/clen/)) + ierr = put_var_internal_int (File%fh, varid, cval) + deallocate(cval) + +# 320 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_5d_int +! DIMS 1,2,3,4,5 +! TYPE int,real,double +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write real data to a netCDF varaible of 1 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 308 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_1d_real (File,varid, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid + real(r4), intent(in) :: ival(:) + real(r4), allocatable :: cval(:) + integer :: clen + clen = size(ival) + allocate(cval(clen)) + cval = reshape(ival,(/clen/)) + ierr = put_var_internal_real (File%fh, varid, cval) + deallocate(cval) + +# 320 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_1d_real +! DIMS 1,2,3,4,5 +! TYPE int,real,double +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write real data to a netCDF varaible of 2 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 308 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_2d_real (File,varid, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid + real(r4), intent(in) :: ival(:,:) + real(r4), allocatable :: cval(:) + integer :: clen + clen = size(ival) + allocate(cval(clen)) + cval = reshape(ival,(/clen/)) + ierr = put_var_internal_real (File%fh, varid, cval) + deallocate(cval) + +# 320 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_2d_real +! DIMS 1,2,3,4,5 +! TYPE int,real,double +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write real data to a netCDF varaible of 3 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 308 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_3d_real (File,varid, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid + real(r4), intent(in) :: ival(:,:,:) + real(r4), allocatable :: cval(:) + integer :: clen + clen = size(ival) + allocate(cval(clen)) + cval = reshape(ival,(/clen/)) + ierr = put_var_internal_real (File%fh, varid, cval) + deallocate(cval) + +# 320 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_3d_real +! DIMS 1,2,3,4,5 +! TYPE int,real,double +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write real data to a netCDF varaible of 4 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 308 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_4d_real (File,varid, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid + real(r4), intent(in) :: ival(:,:,:,:) + real(r4), allocatable :: cval(:) + integer :: clen + clen = size(ival) + allocate(cval(clen)) + cval = reshape(ival,(/clen/)) + ierr = put_var_internal_real (File%fh, varid, cval) + deallocate(cval) + +# 320 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_4d_real +! DIMS 1,2,3,4,5 +! TYPE int,real,double +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write real data to a netCDF varaible of 5 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 308 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_5d_real (File,varid, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid + real(r4), intent(in) :: ival(:,:,:,:,:) + real(r4), allocatable :: cval(:) + integer :: clen + clen = size(ival) + allocate(cval(clen)) + cval = reshape(ival,(/clen/)) + ierr = put_var_internal_real (File%fh, varid, cval) + deallocate(cval) + +# 320 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_5d_real +! DIMS 1,2,3,4,5 +! TYPE int,real,double +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write double data to a netCDF varaible of 1 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 308 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_1d_double (File,varid, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid + real(r8), intent(in) :: ival(:) + real(r8), allocatable :: cval(:) + integer :: clen + clen = size(ival) + allocate(cval(clen)) + cval = reshape(ival,(/clen/)) + ierr = put_var_internal_double (File%fh, varid, cval) + deallocate(cval) + +# 320 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_1d_double +! DIMS 1,2,3,4,5 +! TYPE int,real,double +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write double data to a netCDF varaible of 2 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 308 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_2d_double (File,varid, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid + real(r8), intent(in) :: ival(:,:) + real(r8), allocatable :: cval(:) + integer :: clen + clen = size(ival) + allocate(cval(clen)) + cval = reshape(ival,(/clen/)) + ierr = put_var_internal_double (File%fh, varid, cval) + deallocate(cval) + +# 320 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_2d_double +! DIMS 1,2,3,4,5 +! TYPE int,real,double +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write double data to a netCDF varaible of 3 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 308 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_3d_double (File,varid, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid + real(r8), intent(in) :: ival(:,:,:) + real(r8), allocatable :: cval(:) + integer :: clen + clen = size(ival) + allocate(cval(clen)) + cval = reshape(ival,(/clen/)) + ierr = put_var_internal_double (File%fh, varid, cval) + deallocate(cval) + +# 320 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_3d_double +! DIMS 1,2,3,4,5 +! TYPE int,real,double +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write double data to a netCDF varaible of 4 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 308 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_4d_double (File,varid, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid + real(r8), intent(in) :: ival(:,:,:,:) + real(r8), allocatable :: cval(:) + integer :: clen + clen = size(ival) + allocate(cval(clen)) + cval = reshape(ival,(/clen/)) + ierr = put_var_internal_double (File%fh, varid, cval) + deallocate(cval) + +# 320 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_4d_double +! DIMS 1,2,3,4,5 +! TYPE int,real,double +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write double data to a netCDF varaible of 5 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 308 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_5d_double (File,varid, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid + real(r8), intent(in) :: ival(:,:,:,:,:) + real(r8), allocatable :: cval(:) + integer :: clen + clen = size(ival) + allocate(cval(clen)) + cval = reshape(ival,(/clen/)) + ierr = put_var_internal_double (File%fh, varid, cval) + deallocate(cval) + +# 320 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_5d_double + +! TYPE int,real,double +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Writes int data to a netCDF scalar variable. +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 334 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_0d_int (File,varid, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid + integer(i4), intent(in) :: ival + ierr=PIO_NOERR +#ifdef TIMING + call t_startf("PIO:put_var_0d_int") +#endif + + ierr = put_var_internal_int (File%fh, varid, (/ival/)) + +#ifdef TIMING + call t_stopf("PIO:put_var_0d_int") +#endif +# 348 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_0d_int +! TYPE int,real,double +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Writes real data to a netCDF scalar variable. +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 334 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_0d_real (File,varid, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid + real(r4), intent(in) :: ival + ierr=PIO_NOERR +#ifdef TIMING + call t_startf("PIO:put_var_0d_real") +#endif + + ierr = put_var_internal_real (File%fh, varid, (/ival/)) + +#ifdef TIMING + call t_stopf("PIO:put_var_0d_real") +#endif +# 348 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_0d_real +! TYPE int,real,double +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Writes double data to a netCDF scalar variable. +!! @details +!! @param File @copydoc file_desc_t +!! @param File : A file handle returne from \ref PIO_openfile or \ref PIO_createfile. +!! @param varid : The netcdf variable identifier +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 334 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_0d_double (File,varid, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid + real(r8), intent(in) :: ival + ierr=PIO_NOERR +#ifdef TIMING + call t_startf("PIO:put_var_0d_double") +#endif + + ierr = put_var_internal_double (File%fh, varid, (/ival/)) + +#ifdef TIMING + call t_stopf("PIO:put_var_0d_double") +#endif +# 348 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_0d_double + + +# 351 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_internal_text (ncid,varid,start,count, ival) result(ierr) + integer, intent(in) :: ncid + integer, intent(in) :: varid + integer, intent(in) :: start(:) + integer, intent(in) :: count(:) + character(len=*), target, intent(in) :: ival(*) + integer(C_SIZE_T), allocatable :: cstart(:), ccount(:) + integer :: i, ndims + + do i=1,size(count) + if(count(i)<=0) then + ndims=i-1 + exit + else + ndims=i + endif + enddo + allocate(ccount(ndims), cstart(ndims)) + + do i=1,ndims + cstart(i) = start(ndims-i+1)-1 + ccount(i) = count(ndims-i+1) + enddo + ierr=PIOc_put_vara_text (ncid, varid-1, cstart, ccount, ival) + deallocate(cstart,ccount) + +# 377 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_internal_text +# 351 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_internal_real (ncid,varid,start,count, ival) result(ierr) + integer, intent(in) :: ncid + integer, intent(in) :: varid + integer, intent(in) :: start(:) + integer, intent(in) :: count(:) + real(r4), target, intent(in) :: ival(*) + integer(C_SIZE_T), allocatable :: cstart(:), ccount(:) + integer :: i, ndims + + do i=1,size(count) + if(count(i)<=0) then + ndims=i-1 + exit + else + ndims=i + endif + enddo + allocate(ccount(ndims), cstart(ndims)) + + do i=1,ndims + cstart(i) = start(ndims-i+1)-1 + ccount(i) = count(ndims-i+1) + enddo + ierr=PIOc_put_vara_float (ncid, varid-1, cstart, ccount, ival) + deallocate(cstart,ccount) + +# 377 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_internal_real +# 351 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_internal_double (ncid,varid,start,count, ival) result(ierr) + integer, intent(in) :: ncid + integer, intent(in) :: varid + integer, intent(in) :: start(:) + integer, intent(in) :: count(:) + real(r8), target, intent(in) :: ival(*) + integer(C_SIZE_T), allocatable :: cstart(:), ccount(:) + integer :: i, ndims + + do i=1,size(count) + if(count(i)<=0) then + ndims=i-1 + exit + else + ndims=i + endif + enddo + allocate(ccount(ndims), cstart(ndims)) + + do i=1,ndims + cstart(i) = start(ndims-i+1)-1 + ccount(i) = count(ndims-i+1) + enddo + ierr=PIOc_put_vara_double (ncid, varid-1, cstart, ccount, ival) + deallocate(cstart,ccount) + +# 377 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_internal_double +# 351 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_internal_int (ncid,varid,start,count, ival) result(ierr) + integer, intent(in) :: ncid + integer, intent(in) :: varid + integer, intent(in) :: start(:) + integer, intent(in) :: count(:) + integer(i4), target, intent(in) :: ival(*) + integer(C_SIZE_T), allocatable :: cstart(:), ccount(:) + integer :: i, ndims + + do i=1,size(count) + if(count(i)<=0) then + ndims=i-1 + exit + else + ndims=i + endif + enddo + allocate(ccount(ndims), cstart(ndims)) + + do i=1,ndims + cstart(i) = start(ndims-i+1)-1 + ccount(i) = count(ndims-i+1) + enddo + ierr=PIOc_put_vara_int (ncid, varid-1, cstart, ccount, ival) + deallocate(cstart,ccount) + +# 377 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_internal_int + +! DIMS 0,1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write text data to a netcdf variable of 0 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_vdesc_0d_text (File, vardesc, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t) , intent(in) :: vardesc + character(len=*), intent(in) :: ival + + ierr = put_var_0d_text (File, vardesc%varid, ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_vdesc_0d_text +! DIMS 0,1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write text data to a netcdf variable of 1 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_vdesc_1d_text (File, vardesc, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t) , intent(in) :: vardesc + character(len=*), intent(in) :: ival(:) + + ierr = put_var_1d_text (File, vardesc%varid, ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_vdesc_1d_text +! DIMS 0,1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write text data to a netcdf variable of 2 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_vdesc_2d_text (File, vardesc, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t) , intent(in) :: vardesc + character(len=*), intent(in) :: ival(:,:) + + ierr = put_var_2d_text (File, vardesc%varid, ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_vdesc_2d_text +! DIMS 0,1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write text data to a netcdf variable of 3 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_vdesc_3d_text (File, vardesc, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t) , intent(in) :: vardesc + character(len=*), intent(in) :: ival(:,:,:) + + ierr = put_var_3d_text (File, vardesc%varid, ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_vdesc_3d_text +! DIMS 0,1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write text data to a netcdf variable of 4 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_vdesc_4d_text (File, vardesc, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t) , intent(in) :: vardesc + character(len=*), intent(in) :: ival(:,:,:,:) + + ierr = put_var_4d_text (File, vardesc%varid, ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_vdesc_4d_text +! DIMS 0,1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write text data to a netcdf variable of 5 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_vdesc_5d_text (File, vardesc, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t) , intent(in) :: vardesc + character(len=*), intent(in) :: ival(:,:,:,:,:) + + ierr = put_var_5d_text (File, vardesc%varid, ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_vdesc_5d_text +! DIMS 0,1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write real data to a netcdf variable of 0 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_vdesc_0d_real (File, vardesc, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t) , intent(in) :: vardesc + real(r4), intent(in) :: ival + + ierr = put_var_0d_real (File, vardesc%varid, ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_vdesc_0d_real +! DIMS 0,1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write real data to a netcdf variable of 1 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_vdesc_1d_real (File, vardesc, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t) , intent(in) :: vardesc + real(r4), intent(in) :: ival(:) + + ierr = put_var_1d_real (File, vardesc%varid, ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_vdesc_1d_real +! DIMS 0,1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write real data to a netcdf variable of 2 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_vdesc_2d_real (File, vardesc, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t) , intent(in) :: vardesc + real(r4), intent(in) :: ival(:,:) + + ierr = put_var_2d_real (File, vardesc%varid, ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_vdesc_2d_real +! DIMS 0,1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write real data to a netcdf variable of 3 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_vdesc_3d_real (File, vardesc, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t) , intent(in) :: vardesc + real(r4), intent(in) :: ival(:,:,:) + + ierr = put_var_3d_real (File, vardesc%varid, ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_vdesc_3d_real +! DIMS 0,1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write real data to a netcdf variable of 4 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_vdesc_4d_real (File, vardesc, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t) , intent(in) :: vardesc + real(r4), intent(in) :: ival(:,:,:,:) + + ierr = put_var_4d_real (File, vardesc%varid, ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_vdesc_4d_real +! DIMS 0,1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write real data to a netcdf variable of 5 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_vdesc_5d_real (File, vardesc, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t) , intent(in) :: vardesc + real(r4), intent(in) :: ival(:,:,:,:,:) + + ierr = put_var_5d_real (File, vardesc%varid, ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_vdesc_5d_real +! DIMS 0,1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write double data to a netcdf variable of 0 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_vdesc_0d_double (File, vardesc, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t) , intent(in) :: vardesc + real(r8), intent(in) :: ival + + ierr = put_var_0d_double (File, vardesc%varid, ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_vdesc_0d_double +! DIMS 0,1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write double data to a netcdf variable of 1 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_vdesc_1d_double (File, vardesc, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t) , intent(in) :: vardesc + real(r8), intent(in) :: ival(:) + + ierr = put_var_1d_double (File, vardesc%varid, ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_vdesc_1d_double +! DIMS 0,1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write double data to a netcdf variable of 2 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_vdesc_2d_double (File, vardesc, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t) , intent(in) :: vardesc + real(r8), intent(in) :: ival(:,:) + + ierr = put_var_2d_double (File, vardesc%varid, ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_vdesc_2d_double +! DIMS 0,1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write double data to a netcdf variable of 3 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_vdesc_3d_double (File, vardesc, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t) , intent(in) :: vardesc + real(r8), intent(in) :: ival(:,:,:) + + ierr = put_var_3d_double (File, vardesc%varid, ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_vdesc_3d_double +! DIMS 0,1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write double data to a netcdf variable of 4 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_vdesc_4d_double (File, vardesc, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t) , intent(in) :: vardesc + real(r8), intent(in) :: ival(:,:,:,:) + + ierr = put_var_4d_double (File, vardesc%varid, ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_vdesc_4d_double +! DIMS 0,1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write double data to a netcdf variable of 5 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_vdesc_5d_double (File, vardesc, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t) , intent(in) :: vardesc + real(r8), intent(in) :: ival(:,:,:,:,:) + + ierr = put_var_5d_double (File, vardesc%varid, ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_vdesc_5d_double +! DIMS 0,1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write int data to a netcdf variable of 0 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_vdesc_0d_int (File, vardesc, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t) , intent(in) :: vardesc + integer(i4), intent(in) :: ival + + ierr = put_var_0d_int (File, vardesc%varid, ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_vdesc_0d_int +! DIMS 0,1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write int data to a netcdf variable of 1 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_vdesc_1d_int (File, vardesc, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t) , intent(in) :: vardesc + integer(i4), intent(in) :: ival(:) + + ierr = put_var_1d_int (File, vardesc%varid, ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_vdesc_1d_int +! DIMS 0,1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write int data to a netcdf variable of 2 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_vdesc_2d_int (File, vardesc, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t) , intent(in) :: vardesc + integer(i4), intent(in) :: ival(:,:) + + ierr = put_var_2d_int (File, vardesc%varid, ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_vdesc_2d_int +! DIMS 0,1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write int data to a netcdf variable of 3 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_vdesc_3d_int (File, vardesc, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t) , intent(in) :: vardesc + integer(i4), intent(in) :: ival(:,:,:) + + ierr = put_var_3d_int (File, vardesc%varid, ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_vdesc_3d_int +! DIMS 0,1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write int data to a netcdf variable of 4 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_vdesc_4d_int (File, vardesc, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t) , intent(in) :: vardesc + integer(i4), intent(in) :: ival(:,:,:,:) + + ierr = put_var_4d_int (File, vardesc%varid, ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_vdesc_4d_int +! DIMS 0,1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write int data to a netcdf variable of 5 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 390 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_var_vdesc_5d_int (File, vardesc, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t) , intent(in) :: vardesc + integer(i4), intent(in) :: ival(:,:,:,:,:) + + ierr = put_var_5d_int (File, vardesc%varid, ival) + +# 397 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_var_vdesc_5d_int + +! DIMS 1,2,3,4,5 +! TYPE text +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write text data to a netcdf variable of 1 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 413 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_1d_text (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid, start(:), count(:) + character(len=*), intent(in) :: ival(:) + character, allocatable :: cval(:) + integer :: clen, sd + integer(C_SIZE_T), allocatable :: cstart(:), ccount(:) + integer :: i + integer :: ndims + + do i=1,size(count) + if(count(i)<=0) then + ndims=i-1 + exit + else + ndims=i + endif + enddo + allocate(cstart(ndims),ccount(ndims)) + + do i=1,ndims + cstart(i) = start(ndims-i+1)-1 + ccount(i) = count(ndims-i+1) + enddo + +! This manipulation is required to convert the fortran string to +! a c character array with all trailing space set to null +! + clen = len(ival) + sd = size(ival) + allocate(cval(clen*sd)) + call Fstring2Cstring_1d (ival, cval) + + ierr = PIOc_put_vara_text(file%fh, varid-1, cstart, ccount, cval) + deallocate(cval, cstart, ccount) + + +# 450 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_1d_text +! DIMS 1,2,3,4,5 +! TYPE text +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write text data to a netcdf variable of 2 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 413 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_2d_text (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid, start(:), count(:) + character(len=*), intent(in) :: ival(:,:) + character, allocatable :: cval(:) + integer :: clen, sd + integer(C_SIZE_T), allocatable :: cstart(:), ccount(:) + integer :: i + integer :: ndims + + do i=1,size(count) + if(count(i)<=0) then + ndims=i-1 + exit + else + ndims=i + endif + enddo + allocate(cstart(ndims),ccount(ndims)) + + do i=1,ndims + cstart(i) = start(ndims-i+1)-1 + ccount(i) = count(ndims-i+1) + enddo + +! This manipulation is required to convert the fortran string to +! a c character array with all trailing space set to null +! + clen = len(ival) + sd = size(ival) + allocate(cval(clen*sd)) + call Fstring2Cstring_2d (ival, cval) + + ierr = PIOc_put_vara_text(file%fh, varid-1, cstart, ccount, cval) + deallocate(cval, cstart, ccount) + + +# 450 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_2d_text +! DIMS 1,2,3,4,5 +! TYPE text +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write text data to a netcdf variable of 3 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 413 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_3d_text (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid, start(:), count(:) + character(len=*), intent(in) :: ival(:,:,:) + character, allocatable :: cval(:) + integer :: clen, sd + integer(C_SIZE_T), allocatable :: cstart(:), ccount(:) + integer :: i + integer :: ndims + + do i=1,size(count) + if(count(i)<=0) then + ndims=i-1 + exit + else + ndims=i + endif + enddo + allocate(cstart(ndims),ccount(ndims)) + + do i=1,ndims + cstart(i) = start(ndims-i+1)-1 + ccount(i) = count(ndims-i+1) + enddo + +! This manipulation is required to convert the fortran string to +! a c character array with all trailing space set to null +! + clen = len(ival) + sd = size(ival) + allocate(cval(clen*sd)) + call Fstring2Cstring_3d (ival, cval) + + ierr = PIOc_put_vara_text(file%fh, varid-1, cstart, ccount, cval) + deallocate(cval, cstart, ccount) + + +# 450 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_3d_text +! DIMS 1,2,3,4,5 +! TYPE text +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write text data to a netcdf variable of 4 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 413 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_4d_text (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid, start(:), count(:) + character(len=*), intent(in) :: ival(:,:,:,:) + character, allocatable :: cval(:) + integer :: clen, sd + integer(C_SIZE_T), allocatable :: cstart(:), ccount(:) + integer :: i + integer :: ndims + + do i=1,size(count) + if(count(i)<=0) then + ndims=i-1 + exit + else + ndims=i + endif + enddo + allocate(cstart(ndims),ccount(ndims)) + + do i=1,ndims + cstart(i) = start(ndims-i+1)-1 + ccount(i) = count(ndims-i+1) + enddo + +! This manipulation is required to convert the fortran string to +! a c character array with all trailing space set to null +! + clen = len(ival) + sd = size(ival) + allocate(cval(clen*sd)) + call Fstring2Cstring_4d (ival, cval) + + ierr = PIOc_put_vara_text(file%fh, varid-1, cstart, ccount, cval) + deallocate(cval, cstart, ccount) + + +# 450 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_4d_text +! DIMS 1,2,3,4,5 +! TYPE text +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write text data to a netcdf variable of 5 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 413 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_5d_text (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid, start(:), count(:) + character(len=*), intent(in) :: ival(:,:,:,:,:) + character, allocatable :: cval(:) + integer :: clen, sd + integer(C_SIZE_T), allocatable :: cstart(:), ccount(:) + integer :: i + integer :: ndims + + do i=1,size(count) + if(count(i)<=0) then + ndims=i-1 + exit + else + ndims=i + endif + enddo + allocate(cstart(ndims),ccount(ndims)) + + do i=1,ndims + cstart(i) = start(ndims-i+1)-1 + ccount(i) = count(ndims-i+1) + enddo + +! This manipulation is required to convert the fortran string to +! a c character array with all trailing space set to null +! + clen = len(ival) + sd = size(ival) + allocate(cval(clen*sd)) + call Fstring2Cstring_5d (ival, cval) + + ierr = PIOc_put_vara_text(file%fh, varid-1, cstart, ccount, cval) + deallocate(cval, cstart, ccount) + + +# 450 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_5d_text + +! DIMS 1,2,3,4,5 +# 453 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + subroutine Fstring2Cstring_1d(fstr, cstr) + character(len=*), intent(in) :: fstr(:) + character(C_CHAR), intent(out) :: cstr(:) + integer :: clen, sd(1) + integer :: cinc + integer :: i, j, k, m, n, q + + cstr = C_NULL_CHAR + do i=1,1 + sd(i) = size(fstr,i) + enddo + cinc = 0 +#if 1 == 1 + clen= len(fstr(1)) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j))) + cstr(i+cinc*clen) = fstr(j)(i:i) + end do + cinc = cinc+1 + enddo +#endif +#if 1 == 2 + clen= len(fstr(1,1)) + do k=1,sd(2) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j,k))) + cstr(i+cinc*clen) = fstr(j,k)(i:i) + end do + cinc = cinc+1 + enddo + enddo +#endif +#if 1 == 3 + clen= len(fstr(1,1,1)) + do m=1,sd(3) + do k=1,sd(2) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j,k,m))) + cstr(i+cinc*clen) = fstr(j,k,m)(i:i) + end do + cinc = cinc+1 + enddo + enddo + enddo +#endif +#if 1 == 4 + clen= len(fstr(1,1,1,1)) + do n=1,sd(4) + do m=1,sd(3) + do k=1,sd(2) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j,k,m,n))) + cstr(i+cinc*clen) = fstr(j,k,m,n)(i:i) + end do + cinc = cinc+1 + enddo + enddo + enddo + enddo +#endif +#if 1 == 5 + clen= len(fstr(1,1,1,1,1)) + do q=1,sd(5) + do n=1,sd(4) + do m=1,sd(3) + do k=1,sd(2) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j,k,m,n,q))) + cstr(i+cinc*clen) = fstr(j,k,m,n,q)(i:i) + end do + cinc = cinc+1 + enddo + enddo + enddo + enddo + enddo +#endif + + +# 532 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end subroutine Fstring2Cstring_1d +! DIMS 1,2,3,4,5 +# 453 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + subroutine Fstring2Cstring_2d(fstr, cstr) + character(len=*), intent(in) :: fstr(:,:) + character(C_CHAR), intent(out) :: cstr(:) + integer :: clen, sd(2) + integer :: cinc + integer :: i, j, k, m, n, q + + cstr = C_NULL_CHAR + do i=1,2 + sd(i) = size(fstr,i) + enddo + cinc = 0 +#if 2 == 1 + clen= len(fstr(1)) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j))) + cstr(i+cinc*clen) = fstr(j)(i:i) + end do + cinc = cinc+1 + enddo +#endif +#if 2 == 2 + clen= len(fstr(1,1)) + do k=1,sd(2) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j,k))) + cstr(i+cinc*clen) = fstr(j,k)(i:i) + end do + cinc = cinc+1 + enddo + enddo +#endif +#if 2 == 3 + clen= len(fstr(1,1,1)) + do m=1,sd(3) + do k=1,sd(2) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j,k,m))) + cstr(i+cinc*clen) = fstr(j,k,m)(i:i) + end do + cinc = cinc+1 + enddo + enddo + enddo +#endif +#if 2 == 4 + clen= len(fstr(1,1,1,1)) + do n=1,sd(4) + do m=1,sd(3) + do k=1,sd(2) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j,k,m,n))) + cstr(i+cinc*clen) = fstr(j,k,m,n)(i:i) + end do + cinc = cinc+1 + enddo + enddo + enddo + enddo +#endif +#if 2 == 5 + clen= len(fstr(1,1,1,1,1)) + do q=1,sd(5) + do n=1,sd(4) + do m=1,sd(3) + do k=1,sd(2) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j,k,m,n,q))) + cstr(i+cinc*clen) = fstr(j,k,m,n,q)(i:i) + end do + cinc = cinc+1 + enddo + enddo + enddo + enddo + enddo +#endif + + +# 532 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end subroutine Fstring2Cstring_2d +! DIMS 1,2,3,4,5 +# 453 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + subroutine Fstring2Cstring_3d(fstr, cstr) + character(len=*), intent(in) :: fstr(:,:,:) + character(C_CHAR), intent(out) :: cstr(:) + integer :: clen, sd(3) + integer :: cinc + integer :: i, j, k, m, n, q + + cstr = C_NULL_CHAR + do i=1,3 + sd(i) = size(fstr,i) + enddo + cinc = 0 +#if 3 == 1 + clen= len(fstr(1)) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j))) + cstr(i+cinc*clen) = fstr(j)(i:i) + end do + cinc = cinc+1 + enddo +#endif +#if 3 == 2 + clen= len(fstr(1,1)) + do k=1,sd(2) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j,k))) + cstr(i+cinc*clen) = fstr(j,k)(i:i) + end do + cinc = cinc+1 + enddo + enddo +#endif +#if 3 == 3 + clen= len(fstr(1,1,1)) + do m=1,sd(3) + do k=1,sd(2) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j,k,m))) + cstr(i+cinc*clen) = fstr(j,k,m)(i:i) + end do + cinc = cinc+1 + enddo + enddo + enddo +#endif +#if 3 == 4 + clen= len(fstr(1,1,1,1)) + do n=1,sd(4) + do m=1,sd(3) + do k=1,sd(2) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j,k,m,n))) + cstr(i+cinc*clen) = fstr(j,k,m,n)(i:i) + end do + cinc = cinc+1 + enddo + enddo + enddo + enddo +#endif +#if 3 == 5 + clen= len(fstr(1,1,1,1,1)) + do q=1,sd(5) + do n=1,sd(4) + do m=1,sd(3) + do k=1,sd(2) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j,k,m,n,q))) + cstr(i+cinc*clen) = fstr(j,k,m,n,q)(i:i) + end do + cinc = cinc+1 + enddo + enddo + enddo + enddo + enddo +#endif + + +# 532 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end subroutine Fstring2Cstring_3d +! DIMS 1,2,3,4,5 +# 453 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + subroutine Fstring2Cstring_4d(fstr, cstr) + character(len=*), intent(in) :: fstr(:,:,:,:) + character(C_CHAR), intent(out) :: cstr(:) + integer :: clen, sd(4) + integer :: cinc + integer :: i, j, k, m, n, q + + cstr = C_NULL_CHAR + do i=1,4 + sd(i) = size(fstr,i) + enddo + cinc = 0 +#if 4 == 1 + clen= len(fstr(1)) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j))) + cstr(i+cinc*clen) = fstr(j)(i:i) + end do + cinc = cinc+1 + enddo +#endif +#if 4 == 2 + clen= len(fstr(1,1)) + do k=1,sd(2) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j,k))) + cstr(i+cinc*clen) = fstr(j,k)(i:i) + end do + cinc = cinc+1 + enddo + enddo +#endif +#if 4 == 3 + clen= len(fstr(1,1,1)) + do m=1,sd(3) + do k=1,sd(2) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j,k,m))) + cstr(i+cinc*clen) = fstr(j,k,m)(i:i) + end do + cinc = cinc+1 + enddo + enddo + enddo +#endif +#if 4 == 4 + clen= len(fstr(1,1,1,1)) + do n=1,sd(4) + do m=1,sd(3) + do k=1,sd(2) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j,k,m,n))) + cstr(i+cinc*clen) = fstr(j,k,m,n)(i:i) + end do + cinc = cinc+1 + enddo + enddo + enddo + enddo +#endif +#if 4 == 5 + clen= len(fstr(1,1,1,1,1)) + do q=1,sd(5) + do n=1,sd(4) + do m=1,sd(3) + do k=1,sd(2) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j,k,m,n,q))) + cstr(i+cinc*clen) = fstr(j,k,m,n,q)(i:i) + end do + cinc = cinc+1 + enddo + enddo + enddo + enddo + enddo +#endif + + +# 532 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end subroutine Fstring2Cstring_4d +! DIMS 1,2,3,4,5 +# 453 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + subroutine Fstring2Cstring_5d(fstr, cstr) + character(len=*), intent(in) :: fstr(:,:,:,:,:) + character(C_CHAR), intent(out) :: cstr(:) + integer :: clen, sd(5) + integer :: cinc + integer :: i, j, k, m, n, q + + cstr = C_NULL_CHAR + do i=1,5 + sd(i) = size(fstr,i) + enddo + cinc = 0 +#if 5 == 1 + clen= len(fstr(1)) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j))) + cstr(i+cinc*clen) = fstr(j)(i:i) + end do + cinc = cinc+1 + enddo +#endif +#if 5 == 2 + clen= len(fstr(1,1)) + do k=1,sd(2) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j,k))) + cstr(i+cinc*clen) = fstr(j,k)(i:i) + end do + cinc = cinc+1 + enddo + enddo +#endif +#if 5 == 3 + clen= len(fstr(1,1,1)) + do m=1,sd(3) + do k=1,sd(2) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j,k,m))) + cstr(i+cinc*clen) = fstr(j,k,m)(i:i) + end do + cinc = cinc+1 + enddo + enddo + enddo +#endif +#if 5 == 4 + clen= len(fstr(1,1,1,1)) + do n=1,sd(4) + do m=1,sd(3) + do k=1,sd(2) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j,k,m,n))) + cstr(i+cinc*clen) = fstr(j,k,m,n)(i:i) + end do + cinc = cinc+1 + enddo + enddo + enddo + enddo +#endif +#if 5 == 5 + clen= len(fstr(1,1,1,1,1)) + do q=1,sd(5) + do n=1,sd(4) + do m=1,sd(3) + do k=1,sd(2) + do j=1,sd(1) + do i=1,max(1,len_trim(fstr(j,k,m,n,q))) + cstr(i+cinc*clen) = fstr(j,k,m,n,q)(i:i) + end do + cinc = cinc+1 + enddo + enddo + enddo + enddo + enddo +#endif + + +# 532 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end subroutine Fstring2Cstring_5d + + + +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write int data to a netcdf variable of 1 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 550 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_1d_int (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid, start(:), count(:) + + integer(i4), intent(in) :: ival(:) +#ifdef TIMING + call t_startf("PIO:put_vara_1d_int") +#endif + + ierr = put_vara_internal_int (File%fh, varid, start, count, ival) + +#ifdef TIMING + call t_stopf("PIO:put_vara_1d_int") +#endif +# 564 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_1d_int +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write int data to a netcdf variable of 2 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 550 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_2d_int (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid, start(:), count(:) + + integer(i4), intent(in) :: ival(:,:) +#ifdef TIMING + call t_startf("PIO:put_vara_2d_int") +#endif + + ierr = put_vara_internal_int (File%fh, varid, start, count, ival) + +#ifdef TIMING + call t_stopf("PIO:put_vara_2d_int") +#endif +# 564 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_2d_int +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write int data to a netcdf variable of 3 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 550 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_3d_int (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid, start(:), count(:) + + integer(i4), intent(in) :: ival(:,:,:) +#ifdef TIMING + call t_startf("PIO:put_vara_3d_int") +#endif + + ierr = put_vara_internal_int (File%fh, varid, start, count, ival) + +#ifdef TIMING + call t_stopf("PIO:put_vara_3d_int") +#endif +# 564 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_3d_int +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write int data to a netcdf variable of 4 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 550 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_4d_int (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid, start(:), count(:) + + integer(i4), intent(in) :: ival(:,:,:,:) +#ifdef TIMING + call t_startf("PIO:put_vara_4d_int") +#endif + + ierr = put_vara_internal_int (File%fh, varid, start, count, ival) + +#ifdef TIMING + call t_stopf("PIO:put_vara_4d_int") +#endif +# 564 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_4d_int +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write int data to a netcdf variable of 5 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 550 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_5d_int (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid, start(:), count(:) + + integer(i4), intent(in) :: ival(:,:,:,:,:) +#ifdef TIMING + call t_startf("PIO:put_vara_5d_int") +#endif + + ierr = put_vara_internal_int (File%fh, varid, start, count, ival) + +#ifdef TIMING + call t_stopf("PIO:put_vara_5d_int") +#endif +# 564 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_5d_int +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write real data to a netcdf variable of 1 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 550 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_1d_real (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid, start(:), count(:) + + real(r4), intent(in) :: ival(:) +#ifdef TIMING + call t_startf("PIO:put_vara_1d_real") +#endif + + ierr = put_vara_internal_real (File%fh, varid, start, count, ival) + +#ifdef TIMING + call t_stopf("PIO:put_vara_1d_real") +#endif +# 564 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_1d_real +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write real data to a netcdf variable of 2 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 550 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_2d_real (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid, start(:), count(:) + + real(r4), intent(in) :: ival(:,:) +#ifdef TIMING + call t_startf("PIO:put_vara_2d_real") +#endif + + ierr = put_vara_internal_real (File%fh, varid, start, count, ival) + +#ifdef TIMING + call t_stopf("PIO:put_vara_2d_real") +#endif +# 564 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_2d_real +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write real data to a netcdf variable of 3 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 550 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_3d_real (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid, start(:), count(:) + + real(r4), intent(in) :: ival(:,:,:) +#ifdef TIMING + call t_startf("PIO:put_vara_3d_real") +#endif + + ierr = put_vara_internal_real (File%fh, varid, start, count, ival) + +#ifdef TIMING + call t_stopf("PIO:put_vara_3d_real") +#endif +# 564 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_3d_real +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write real data to a netcdf variable of 4 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 550 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_4d_real (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid, start(:), count(:) + + real(r4), intent(in) :: ival(:,:,:,:) +#ifdef TIMING + call t_startf("PIO:put_vara_4d_real") +#endif + + ierr = put_vara_internal_real (File%fh, varid, start, count, ival) + +#ifdef TIMING + call t_stopf("PIO:put_vara_4d_real") +#endif +# 564 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_4d_real +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write real data to a netcdf variable of 5 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 550 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_5d_real (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid, start(:), count(:) + + real(r4), intent(in) :: ival(:,:,:,:,:) +#ifdef TIMING + call t_startf("PIO:put_vara_5d_real") +#endif + + ierr = put_vara_internal_real (File%fh, varid, start, count, ival) + +#ifdef TIMING + call t_stopf("PIO:put_vara_5d_real") +#endif +# 564 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_5d_real +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write double data to a netcdf variable of 1 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 550 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_1d_double (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid, start(:), count(:) + + real(r8), intent(in) :: ival(:) +#ifdef TIMING + call t_startf("PIO:put_vara_1d_double") +#endif + + ierr = put_vara_internal_double (File%fh, varid, start, count, ival) + +#ifdef TIMING + call t_stopf("PIO:put_vara_1d_double") +#endif +# 564 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_1d_double +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write double data to a netcdf variable of 2 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 550 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_2d_double (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid, start(:), count(:) + + real(r8), intent(in) :: ival(:,:) +#ifdef TIMING + call t_startf("PIO:put_vara_2d_double") +#endif + + ierr = put_vara_internal_double (File%fh, varid, start, count, ival) + +#ifdef TIMING + call t_stopf("PIO:put_vara_2d_double") +#endif +# 564 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_2d_double +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write double data to a netcdf variable of 3 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 550 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_3d_double (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid, start(:), count(:) + + real(r8), intent(in) :: ival(:,:,:) +#ifdef TIMING + call t_startf("PIO:put_vara_3d_double") +#endif + + ierr = put_vara_internal_double (File%fh, varid, start, count, ival) + +#ifdef TIMING + call t_stopf("PIO:put_vara_3d_double") +#endif +# 564 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_3d_double +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write double data to a netcdf variable of 4 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 550 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_4d_double (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid, start(:), count(:) + + real(r8), intent(in) :: ival(:,:,:,:) +#ifdef TIMING + call t_startf("PIO:put_vara_4d_double") +#endif + + ierr = put_vara_internal_double (File%fh, varid, start, count, ival) + +#ifdef TIMING + call t_stopf("PIO:put_vara_4d_double") +#endif +# 564 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_4d_double +! TYPE int,real,double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write double data to a netcdf variable of 5 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param varid : The netcdf variable identifier +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 550 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_5d_double (File,varid, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + integer, intent(in) :: varid, start(:), count(:) + + real(r8), intent(in) :: ival(:,:,:,:,:) +#ifdef TIMING + call t_startf("PIO:put_vara_5d_double") +#endif + + ierr = put_vara_internal_double (File%fh, varid, start, count, ival) + +#ifdef TIMING + call t_stopf("PIO:put_vara_5d_double") +#endif +# 564 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_5d_double + +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write text data to a netcdf variable of 1 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 579 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_vdesc_1d_text (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + character(len=*), intent(in) :: ival(:) + + ierr = put_vara_1d_text (File, vardesc%varid, start, count, ival) + + +# 588 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_vdesc_1d_text +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write text data to a netcdf variable of 2 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 579 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_vdesc_2d_text (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + character(len=*), intent(in) :: ival(:,:) + + ierr = put_vara_2d_text (File, vardesc%varid, start, count, ival) + + +# 588 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_vdesc_2d_text +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write text data to a netcdf variable of 3 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 579 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_vdesc_3d_text (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + character(len=*), intent(in) :: ival(:,:,:) + + ierr = put_vara_3d_text (File, vardesc%varid, start, count, ival) + + +# 588 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_vdesc_3d_text +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write text data to a netcdf variable of 4 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 579 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_vdesc_4d_text (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + character(len=*), intent(in) :: ival(:,:,:,:) + + ierr = put_vara_4d_text (File, vardesc%varid, start, count, ival) + + +# 588 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_vdesc_4d_text +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write text data to a netcdf variable of 5 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 579 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_vdesc_5d_text (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + character(len=*), intent(in) :: ival(:,:,:,:,:) + + ierr = put_vara_5d_text (File, vardesc%varid, start, count, ival) + + +# 588 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_vdesc_5d_text +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write real data to a netcdf variable of 1 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 579 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_vdesc_1d_real (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + real(r4), intent(in) :: ival(:) + + ierr = put_vara_1d_real (File, vardesc%varid, start, count, ival) + + +# 588 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_vdesc_1d_real +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write real data to a netcdf variable of 2 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 579 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_vdesc_2d_real (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + real(r4), intent(in) :: ival(:,:) + + ierr = put_vara_2d_real (File, vardesc%varid, start, count, ival) + + +# 588 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_vdesc_2d_real +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write real data to a netcdf variable of 3 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 579 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_vdesc_3d_real (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + real(r4), intent(in) :: ival(:,:,:) + + ierr = put_vara_3d_real (File, vardesc%varid, start, count, ival) + + +# 588 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_vdesc_3d_real +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write real data to a netcdf variable of 4 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 579 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_vdesc_4d_real (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + real(r4), intent(in) :: ival(:,:,:,:) + + ierr = put_vara_4d_real (File, vardesc%varid, start, count, ival) + + +# 588 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_vdesc_4d_real +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write real data to a netcdf variable of 5 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 579 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_vdesc_5d_real (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + real(r4), intent(in) :: ival(:,:,:,:,:) + + ierr = put_vara_5d_real (File, vardesc%varid, start, count, ival) + + +# 588 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_vdesc_5d_real +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write double data to a netcdf variable of 1 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 579 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_vdesc_1d_double (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + real(r8), intent(in) :: ival(:) + + ierr = put_vara_1d_double (File, vardesc%varid, start, count, ival) + + +# 588 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_vdesc_1d_double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write double data to a netcdf variable of 2 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 579 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_vdesc_2d_double (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + real(r8), intent(in) :: ival(:,:) + + ierr = put_vara_2d_double (File, vardesc%varid, start, count, ival) + + +# 588 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_vdesc_2d_double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write double data to a netcdf variable of 3 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 579 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_vdesc_3d_double (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + real(r8), intent(in) :: ival(:,:,:) + + ierr = put_vara_3d_double (File, vardesc%varid, start, count, ival) + + +# 588 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_vdesc_3d_double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write double data to a netcdf variable of 4 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 579 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_vdesc_4d_double (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + real(r8), intent(in) :: ival(:,:,:,:) + + ierr = put_vara_4d_double (File, vardesc%varid, start, count, ival) + + +# 588 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_vdesc_4d_double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write double data to a netcdf variable of 5 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 579 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_vdesc_5d_double (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + real(r8), intent(in) :: ival(:,:,:,:,:) + + ierr = put_vara_5d_double (File, vardesc%varid, start, count, ival) + + +# 588 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_vdesc_5d_double +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write int data to a netcdf variable of 1 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 579 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_vdesc_1d_int (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + integer(i4), intent(in) :: ival(:) + + ierr = put_vara_1d_int (File, vardesc%varid, start, count, ival) + + +# 588 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_vdesc_1d_int +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write int data to a netcdf variable of 2 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 579 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_vdesc_2d_int (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + integer(i4), intent(in) :: ival(:,:) + + ierr = put_vara_2d_int (File, vardesc%varid, start, count, ival) + + +# 588 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_vdesc_2d_int +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write int data to a netcdf variable of 3 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 579 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_vdesc_3d_int (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + integer(i4), intent(in) :: ival(:,:,:) + + ierr = put_vara_3d_int (File, vardesc%varid, start, count, ival) + + +# 588 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_vdesc_3d_int +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write int data to a netcdf variable of 4 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 579 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_vdesc_4d_int (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + integer(i4), intent(in) :: ival(:,:,:,:) + + ierr = put_vara_4d_int (File, vardesc%varid, start, count, ival) + + +# 588 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_vdesc_4d_int +! DIMS 1,2,3,4,5 +!> +!! @public +!! @ingroup PIO_put_var +!! @brief Write int data to a netcdf variable of 5 dimension(s). +!! @details +!! @param File @copydoc file_desc_t +!! @param vardesc @copydoc var_desc_t +!! @param start : +!! @param count : +!! @param ival : The value for the netcdf metadata +!! @retval ierr @copydoc error_return +!< +# 579 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + integer function put_vara_vdesc_5d_int (File,vardesc, start, count, ival) result(ierr) + type (File_desc_t), intent(inout) :: File + type(var_desc_t), intent(in) :: vardesc + integer, intent(in) :: start(:), count(:) + integer(i4), intent(in) :: ival(:,:,:,:,:) + + ierr = put_vara_5d_int (File, vardesc%varid, start, count, ival) + + +# 588 "/home/ed/tmp/ParallelIO/src/flib/pionfput_mod.F90.in" + end function put_vara_vdesc_5d_int +end module pionfput_mod diff --git a/tests/Makefile.am b/tests/Makefile.am index 310b861b712..7377b2aa9a5 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -3,4 +3,13 @@ # Ed Hartnett -SUBDIRS = cunit +# Does the user want to build fortran? If so, there are two additional +# test directories. +if BUILD_FORTRAN +UNIT = unit +GENERAL = general +endif + +SUBDIRS = cunit ${UNIT} ${GENERAL} + +EXTRA_DIST = CMakeLists.txt diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am new file mode 100644 index 00000000000..49d6b07a753 --- /dev/null +++ b/tests/general/Makefile.am @@ -0,0 +1,101 @@ +## This is the automake file for building the Fortran general tests +## for the PIO library. + +# Ed Hartnett 3/25/19 + +# Parallel builds don't currently work in this directory. +.NOTPARALLEL: + +# Put together AM_CPPFLAGS and AM_LDFLAGS. +include $(top_srcdir)/set_flags.am + +LDADD = libpio_tutil.la \ +${top_builddir}/src/flib/libpiof.la \ +${top_builddir}/src/clib/libpio.la + +# There is a test utility mod file in this subdir which must be built. +SUBDIRS = util + +# Build these uninstalled convenience libraries. +noinst_LTLIBRARIES = libpio_tutil.la libpio_rearr_opts.la + +# The convenience libraries depends on their source. +libpio_tutil_la_SOURCES = pio_tutil.F90 # configure copies this from util dir. +libpio_rearr_opts_la_SOURCES = pio_rearr_opts.F90 + +# Each mod file depends on the .o file. +pio_tutil.mod: pio_tutil.$(OBJEXT) +pio_rearr_opts_tgv.mod: pio_rearr_opts.$(OBJEXT) + +# Some mods are dependant on other mods in this dir. +pio_rearr_opts.$(OBJEXT): pio_tutil.mod + +BUILT_SOURCES = pio_tutil.mod pio_rearr_opts_tgv.mod + +# Build the test for make check. +check_PROGRAMS = pio_init_finalize pio_file_simple_tests \ +pio_file_fail ncdf_simple_tests ncdf_get_put ncdf_fail ncdf_inq \ +pio_rearr pio_rearr_opts2 pio_decomp_tests \ +pio_decomp_tests_1d pio_decomp_tests_2d pio_decomp_tests_3d \ +pio_decomp_frame_tests pio_decomp_fillval pio_iosystem_tests \ +pio_iosystem_tests2 pio_iosystem_tests3 + +pio_init_finalize_SOURCES = pio_init_finalize.F90 +pio_file_simple_tests_SOURCES = pio_file_simple_tests.F90 +pio_file_fail_SOURCES = pio_file_fail.F90 +ncdf_simple_tests_SOURCES = ncdf_simple_tests.F90 +ncdf_get_put_SOURCES = ncdf_get_put.F90 +ncdf_fail_SOURCES = ncdf_fail.F90 +ncdf_inq_SOURCES = ncdf_inq.F90 +pio_rearr_SOURCES = pio_rearr.F90 +#pio_rearr_opts_SOURCES = pio_rearr_opts.F90 +pio_rearr_opts2_SOURCES = pio_rearr_opts2.F90 +pio_decomp_tests_SOURCES = pio_decomp_tests.F90 +pio_decomp_tests_1d_SOURCES = pio_decomp_tests_1d.F90 +pio_decomp_tests_2d_SOURCES = pio_decomp_tests_2d.F90 +pio_decomp_tests_3d_SOURCES = pio_decomp_tests_3d.F90 +pio_decomp_frame_tests_SOURCES = pio_decomp_frame_tests.F90 +pio_decomp_fillval_SOURCES = pio_decomp_fillval.F90 +pio_iosystem_tests_SOURCES = pio_iosystem_tests.F90 +pio_iosystem_tests2_SOURCES = pio_iosystem_tests2.F90 +pio_iosystem_tests3_SOURCES = pio_iosystem_tests3.F90 + +# Tests will run from a bash script. +TESTS = run_tests.sh + +%.F90: %.F90.in + util/pio_tf_f90gen.pl --annotate-source --out=$@ $< + +ncdf_fail.F90: ncdf_fail.F90.in +ncdf_get_put.F90: ncdf_get_put.F90.in +ncdf_inq.F90: ncdf_inq.F90.in +ncdf_simple_tests.F90:ncdf_simple_tests.F90.in +pio_decomp_fillval.F90:pio_decomp_fillval.F90.in +pio_decomp_frame_tests.F90:pio_decomp_frame_tests.F90.in +pio_decomp_tests_1d.F90:pio_decomp_tests_1d.F90.in +pio_decomp_tests_2d.F90:pio_decomp_tests_2d.F90.in +pio_decomp_tests_3d.F90:pio_decomp_tests_3d.F90.in +pio_decomp_tests.F90:pio_decomp_tests.F90.in +pio_file_fail.F90:pio_file_fail.F90.in +pio_file_simple_tests.F90:pio_file_simple_tests.F90.in +pio_init_finalize.F90:pio_init_finalize.F90.in +pio_iosystem_tests2.F90:pio_iosystem_tests2.F90.in +pio_iosystem_tests3.F90:pio_iosystem_tests3.F90.in +pio_iosystem_tests.F90:pio_iosystem_tests.F90.in +pio_rearr.F90:pio_rearr.F90.in +pio_rearr_opts2.F90:pio_rearr_opts2.F90.in +pio_rearr_opts.F90:pio_rearr_opts.F90.in + +# Distribute the test script. +EXTRA_DIST = CMakeLists.txt run_tests.sh ncdf_fail.F90.in \ +ncdf_get_put.F90.in ncdf_inq.F90.in ncdf_simple_tests.F90.in \ +pio_decomp_fillval.F90.in pio_decomp_frame_tests.F90.in \ +pio_decomp_tests_1d.F90.in pio_decomp_tests_2d.F90.in \ +pio_decomp_tests_3d.F90.in pio_decomp_tests.F90.in pio_fail.F90.in \ +pio_file_fail.F90.in pio_file_simple_tests.F90.in \ +pio_init_finalize.F90.in pio_iosystem_tests2.F90.in \ +pio_iosystem_tests3.F90.in pio_iosystem_tests.F90.in pio_rearr.F90.in \ +pio_rearr_opts2.F90.in pio_rearr_opts.F90.in + +# Clean up files produced during testing. +CLEANFILES = *.nc *.log *.mod diff --git a/tests/general/run_tests.sh b/tests/general/run_tests.sh new file mode 100755 index 00000000000..63d89e56092 --- /dev/null +++ b/tests/general/run_tests.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# This is a test script for PIO for tests/general directory. +# Ed Hartnett 3/25/19 + +# Stop execution of script if error is returned. +set -e + +# Stop loop if ctrl-c is pressed. +trap exit INT TERM + +printf 'running PIO tests...\n' + +PIO_TESTS='pio_init_finalize pio_file_simple_tests pio_file_fail '\ +'ncdf_simple_tests ncdf_get_put ncdf_fail ncdf_inq pio_rearr '\ +'pio_decomp_tests pio_decomp_tests_1d '\ +'pio_decomp_tests_2d pio_decomp_tests_3d pio_decomp_frame_tests '\ +'pio_decomp_fillval pio_iosystem_tests pio_iosystem_tests2 '\ +'pio_iosystem_tests3' +# pio_rearr_opts pio_rearr_opts2 + +success1=true +for TEST in $PIO_TESTS +do + success1=false + echo "running ${TEST}" + mpiexec -n 4 ./${TEST} && success1=true + if test $success1 = false; then + break + fi +done + +# Did we succeed? +if test x$success1 = xtrue; then + exit 0 +fi +exit 1 diff --git a/tests/general/util/Makefile.am b/tests/general/util/Makefile.am new file mode 100644 index 00000000000..208a2829469 --- /dev/null +++ b/tests/general/util/Makefile.am @@ -0,0 +1,6 @@ +## This is the automake file for building the Fortran general tests +## util mod for the PIO library. + +# Ed Hartnett 3/29/19 + +EXTRA_DIST = pio_tf_f90gen.pl pio_tutil.F90 diff --git a/tests/general/util/pio_tutil.F90 b/tests/general/util/pio_tutil.F90 index 43c0b634b4a..43717f848a7 100644 --- a/tests/general/util/pio_tutil.F90 +++ b/tests/general/util/pio_tutil.F90 @@ -286,10 +286,12 @@ SUBROUTINE PIO_TF_Get_nc_iotypes(iotypes, iotype_descs, num_iotypes) #ifdef _NETCDF4 ! netcdf, netcdf4p, netcdf4c num_iotypes = num_iotypes + 3 -#elif _NETCDF +#else +#ifdef _NETCDF ! netcdf num_iotypes = num_iotypes + 1 #endif +#endif #ifdef _PNETCDF ! pnetcdf num_iotypes = num_iotypes + 1 @@ -317,11 +319,13 @@ SUBROUTINE PIO_TF_Get_nc_iotypes(iotypes, iotype_descs, num_iotypes) iotypes(i) = PIO_iotype_netcdf4p iotype_descs(i) = "NETCDF4P" i = i + 1 -#elif _NETCDF +#else +#ifdef _NETCDF ! netcdf iotypes(i) = PIO_iotype_netcdf iotype_descs(i) = "NETCDF" i = i + 1 +#endif #endif END SUBROUTINE @@ -402,10 +406,12 @@ SUBROUTINE PIO_TF_Get_iotypes(iotypes, iotype_descs, num_iotypes) num_iotypes = 0 #ifdef _NETCDF4 ! netcdf, netcdf4p, netcdf4c - num_iotypes = num_iotypes + 3 -#elif _NETCDF + num_iotypes = num_iotypes + 3 +#else +#ifdef _NETCDF ! netcdf - num_iotypes = num_iotypes + 1 + num_iotypes = num_iotypes + 1 +#endif #endif #ifdef _PNETCDF ! pnetcdf @@ -434,11 +440,13 @@ SUBROUTINE PIO_TF_Get_iotypes(iotypes, iotype_descs, num_iotypes) iotypes(i) = PIO_iotype_netcdf4p iotype_descs(i) = "NETCDF4P" i = i + 1 -#elif _NETCDF +#else +#ifdef _NETCDF ! netcdf iotypes(i) = PIO_iotype_netcdf iotype_descs(i) = "NETCDF" i = i + 1 +#endif #endif END SUBROUTINE diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am new file mode 100644 index 00000000000..0ffa2150b93 --- /dev/null +++ b/tests/unit/Makefile.am @@ -0,0 +1,34 @@ +## This is the automake file for building the Fortran tests for the +## PIO library. + +# Ed Hartnett 3/20/19 + +# Parallel builds don't currently work in this directory. +.NOTPARALLEL: + +# Put together AM_CPPFLAGS and AM_LDFLAGS. +include $(top_srcdir)/set_flags.am + +# Build the test for make check. +check_PROGRAMS = pio_unit_test_driver +pio_unit_test_driver_SOURCES = driver.F90 +pio_unit_test_driver_LDADD = libglobal_vars.la libncdf_tests.la \ +libbasic_tests.la ${top_builddir}/src/flib/libpiof.la ${top_builddir}/src/clib/libpio.la + +# Build these uninstalled convenience libraries. +noinst_LTLIBRARIES = libglobal_vars.la libncdf_tests.la \ +libbasic_tests.la + +# The convenience libraries depends on their source. +libglobal_vars_la_SOURCES = global_vars.F90 +libncdf_tests_la_SOURCES = ncdf_tests.F90 +libbasic_tests_la_SOURCES = basic_tests.F90 + +# Tests will run from a bash script. +TESTS = run_tests.sh + +# Distribute the test script. +EXTRA_DIST = CMakeLists.txt run_tests.sh input.nl + +# Clean up files produced during testing. +CLEANFILES = *.nc *.log *.mod diff --git a/tests/unit/run_tests.sh b/tests/unit/run_tests.sh new file mode 100755 index 00000000000..0f7c61ee178 --- /dev/null +++ b/tests/unit/run_tests.sh @@ -0,0 +1,30 @@ +#!/bin/sh +# This is a test script for PIO for tests/unit directory. +# Ed Hartnett 3/25/19 + +# Stop execution of script if error is returned. +set -e + +# Stop loop if ctrl-c is pressed. +trap exit INT TERM + +printf 'running PIO tests...\n' + +PIO_TESTS='pio_unit_test_driver' + +success1=true +for TEST in $PIO_TESTS +do + success1=false + echo "running ${TEST}" + mpiexec -n 4 ./${TEST} && success1=true + if test $success1 = false; then + break + fi +done + +# Did we succeed? +if test x$success1 = xtrue; then + exit 0 +fi +exit 1