Skip to content

Commit

Permalink
moved defgroups to top of file
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed May 30, 2019
1 parent 9f327b3 commit 9bccea5
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 96 deletions.
30 changes: 15 additions & 15 deletions src/clib/pio_nc.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,50 +19,50 @@
#include <pio_internal.h>

/**
* @defgroup PIO_inq_c Learn About File
* @defgroup PIO_inq_c Learn About File in C
* Learn the number of variables, dimensions, and global atts, and the
* unlimited dimension.
*
* @defgroup PIO_typelen_c Learn Aboue a Data Type
* @defgroup PIO_typelen_c Learn Aboue a Data Type in C
* Learn the length of a data type.
*
* @defgroup PIO_inq_format_c Learn About Binary Format
* @defgroup PIO_inq_format_c Learn About Binary Format in C
* Learn about the binary format.
*
* @defgroup PIO_inq_dim_c Learn About a Dimension
* @defgroup PIO_inq_dim_c Learn About a Dimension in C
* Learn dimension name and length.
*
* @defgroup PIO_inq_var_c Learn About a Variable
* @defgroup PIO_inq_var_c Learn About a Variable in C
* Learn variable name, dimensions, and type.
*
* @defgroup PIO_inq_att_c Learn About an Attribute
* @defgroup PIO_inq_att_c Learn About an Attribute in C
* Learn length, type, and name of an attribute.
*
* @defgroup PIO_rename_dim_c Rename a Dimension
* @defgroup PIO_rename_dim_c Rename a Dimension in C
* Rename a dimension.
*
* @defgroup PIO_rename_var_c Rename a Variable
* @defgroup PIO_rename_var_c Rename a Variable in C
* Rename a variable.
*
* @defgroup PIO_rename_att_c Rename an Attribute
* @defgroup PIO_rename_att_c Rename an Attribute in C
* Rename an attribute.
*
* @defgroup PIO_del_att_c Delete an Attribute
* @defgroup PIO_del_att_c Delete an Attribute in C
* Delete an attribute.
*
* @defgroup PIO_set_fill_c Set Fill Value
* @defgroup PIO_set_fill_c Set Fill Value in C
* Set the fill value for a variable.
*
* @defgroup PIO_enddef_c End Define Mode
* @defgroup PIO_enddef_c End Define Mode in C
* End define mode.
*
* @defgroup PIO_redef_c Re-enter Define Mode
* @defgroup PIO_redef_c Re-enter Define Mode in C
* Re-enter Define Mode.
*
* @defgroup PIO_def_dim_c Define a Dimension
* @defgroup PIO_def_dim_c Define a Dimension in C
* Define a new dimension in the file.
*
* @defgroup PIO_def_var_c Define a Variable
* @defgroup PIO_def_var_c Define a Variable in C
* Define a new variable in the file.
*/

Expand Down
138 changes: 57 additions & 81 deletions src/flib/pio_nf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,60 @@
!! Code to implement the classic netCDF Fortran API in PIO.
!! @author Jim Edwards
!<
!>
!! @defgroup PIO_inq_dimid PIO_inq_dimid
!!
!! @defgroup PIO_inquire_dimension PIO_inquire_dimension
!!
!! @defgroup PIO_inq_dimlen PIO_inq_dimlen
!!
!! @defgroup PIO_inq_dimname PIO_inq_dimname
!!
!! @defgroup PIO_inq_ndims PIO_inq_ndims
!!
!! @defgroup PIO_inq_nvars PIO_inq_nvars
!!
!! @defgroup PIO_inq_natts PIO_inq_natts
!!
!! @defgroup PIO_inq_unlimdim PIO_inq_unlimdim
!!
!! @defgroup PIO_inquire PIO_inquire
!!
!! @defgroup PIO_enddef PIO_enddef
!!
!! @defgroup PIO_redef PIO_redef
!!
!! @defgroup PIO_set_log_level PIO_set_log_level
!!
!! @defgroup PIO_strerror PIO_strerror
!!
!! @defgroup PIO_def_dim PIO_def_dim
!!
!! @defgroup PIO_inquire_variable PIO_inquire_variable
!!
!! @defgroup PIO_inq_vardimid PIO_inq_vardimid
!!
!! @defgroup PIO_inq_varndims PIO_inq_varndims
!!
!! @defgroup PIO_inq_vartype PIO_inq_vartype
!!
!! @defgroup PIO_inq_varnatts PIO_inq_varnatts
!!
!! @defgroup PIO_inq_var_deflate PIO_inq_var_deflate
!!
!! @defgroup PIO_inq_varname PIO_inq_varname
!!
!! @defgroup PIO_inq_varid PIO_inq_varid
!!
!! @defgroup PIO_inq_attlen PIO_inq_attlen
!!
!! @defgroup PIO_inq_att PIO_inq_att
!!
!! @defgroup PIO_inq_attname PIO_inq_attname
!!
!! @defgroup PIO_def_var PIO_def_var
!!

module pio_nf
#ifdef TIMING
use perf_mod , only : t_startf, t_stopf ! _EXTERNAL
Expand Down Expand Up @@ -235,9 +289,6 @@ module pio_nf

contains

!>
!! @defgroup PIO_inq_dimid PIO_inq_dimid
!<
!>
!! @ingroup PIO_inq_dimid
!! Returns the netcdf dimension id for the name.
Expand Down Expand Up @@ -279,9 +330,6 @@ end function PIOc_inq_dimid
dimid=dimid+1
end function inq_dimid_id

!>
!! @defgroup PIO_inquire_dimension PIO_inquire_dimension
!<
!>
!! @ingroup PIO_inquire_dimension
!! Get information about a particular dimension in netcdf file.
Expand Down Expand Up @@ -321,9 +369,6 @@ integer function inquire_dimension_id(ncid , dimid, name, len) re

end function inquire_dimension_id

!>
!! @defgroup PIO_inq_dimlen PIO_inq_dimlen
!<
!>
!! @ingroup PIO_inq_dimlen
!! Get information about the length of a particular dimension in
Expand Down Expand Up @@ -392,9 +437,6 @@ end function PIOc_inq_dimlen
ierr = PIOc_inq_dimlen(ncid ,dimid-1,len)
end function inq_dimlen_id_long

!>
!! @defgroup PIO_inq_dimname PIO_inq_dimname
!<
!>
!! @ingroup PIO_inq_dimname
!! Get information about the name of of a dimension.
Expand Down Expand Up @@ -437,9 +479,6 @@ end function PIOc_inq_dimname

end function inq_dimname_id

!>
!! @defgroup PIO_inq_ndims PIO_inq_ndims
!<
!>
!! @ingroup PIO_inq_ndims
!! Get information about the number of dimensions of a file or
Expand Down Expand Up @@ -476,9 +515,6 @@ end function PIOc_inq_ndims
ierr = PIOc_inq_ndims(ncid ,ndims)
end function inq_ndims_id

!>
!! @defgroup PIO_inq_nvars PIO_inq_nvars
!<
!>
!! @ingroup PIO_inq_nvars
!! Get information about the number of variables in a file or group.
Expand Down Expand Up @@ -513,9 +549,6 @@ end function PIOc_inq_nvars
ierr = PIOc_inq_nvars(ncid ,nvars)
end function inq_nvars_id

!>
!! @defgroup PIO_inq_natts PIO_inq_natts
!<
!>
!! @ingroup PIO_inq_natts
!! Get information about the number of global attributes in a file
Expand Down Expand Up @@ -552,9 +585,6 @@ end function PIOc_inq_natts
ierr = PIOc_inq_natts(ncid ,natts)
end function inq_natts_id

!>
!! @defgroup PIO_inq_unlimdim PIO_inq_unlimdim
!<
!>
!! @ingroup PIO_inq_unlimdm
!! Get information about the unlimited dimension in a file.
Expand Down Expand Up @@ -591,9 +621,6 @@ end function PIOc_inq_unlimdim
if(unlimdim>=0) unlimdim=unlimdim+1
end function inq_unlimdim_id

!>
!! @defgroup PIO_inquire PIO_inquire
!<
!>
!! @ingroup PIO_inquire
!! Gets metadata information for netcdf file.
Expand Down Expand Up @@ -639,9 +666,6 @@ integer function inquire_id(ncid ,nDimensions,nVariable
if(present(unlimitedDimID)) ierr = inq_unlimdim_id(ncid ,unlimitedDimID)
end function inquire_id

!>
!! @defgroup PIO_enddef PIO_enddef
!<
!>
!! @ingroup PIO_enddef
!! Exits netcdf define mode.
Expand Down Expand Up @@ -672,9 +696,6 @@ end function PIOc_enddef
ierr = PIOc_enddef(ncid)
end function enddef_id

!>
!! @defgroup PIO_redef PIO_redef
!<
!>
!! @ingroup PIO_redef
!! Exits netcdf define mode.
Expand All @@ -688,9 +709,6 @@ integer function redef_desc(File) result(ierr)
ierr = redef_id(file%fh)
end function redef_desc

!>
!! @defgroup PIO_set_log_level
!<
!>
!! @ingroup PIO_set_log_level
!! Sets the logging level. Only takes effect if PIO was built with
Expand All @@ -712,15 +730,13 @@ end function PIOc_set_log_level
ierr = PIOc_set_log_level(log_level)
end function set_log_level

!>
!! @defgroup PIO_strerror
!<
!>
!! @ingroup PIO_strerror
!! Returns a descriptive string for an error code.
!!
!! @param errcode the error code
!! @retval a description of the error
!! @param errcode the error code.
!! @param errmsg the error message.
!! @retval 0 for success, error code otherwise.
!! @author Jim Edwards
!<
integer function strerror(errcode, errmsg) result(ierr)
Expand Down Expand Up @@ -757,9 +773,6 @@ end function PIOc_redef
ierr = PIOc_redef(ncid)
end function redef_id

!>
!! @defgroup PIO_def_dim PIO_def_dim
!! A set of functions to define dimensions and their attributes in
!! NetCDF files.
!<
!>
Expand Down Expand Up @@ -836,12 +849,8 @@ end function PIOc_def_dim
dimid=dimid+1
end function def_dim_id

!>
!! @defgroup PIO_inquire_variable PIO_inquire_variable
!<
!>
!! @ingroup PIO_inquire_variable

!! Inquires if a NetCDF variable is present and returns its
!! attributes.
!!
Expand Down Expand Up @@ -906,9 +915,6 @@ integer function inquire_variable_id(ncid , varid, name, xtype,
if(present(xtype)) ierr = pio_inq_vartype(ncid , varid, xtype)
end function inquire_variable_id

!>
!! @defgroup PIO_inq_vardimid PIO_inq_vardimid
!<
!>
!! @ingroup PIO_inq_vardimid
!! Returns the dimids of the variable as an interger array.
Expand Down Expand Up @@ -977,9 +983,6 @@ end function PIOc_inq_vardimid

end function inq_vardimid_id

!>
!! @defgroup PIO_inq_varndims PIO_inq_varndims
!<
!>
!! @ingroup PIO_inq_varndims
!! Gets the number of dimension associated with a netcdf variable.
Expand Down Expand Up @@ -1034,9 +1037,6 @@ end function PIOc_inq_varndims
ierr = PIOc_inq_varndims(ncid ,varid-1,ndims)
end function inq_varndims_id

!>
!! @defgroup PIO_inq_vartype PIO_inq_vartype
!<
!>
!! @ingroup PIO_inq_vartype
!! Gets metadata information for netcdf file.
Expand Down Expand Up @@ -1093,9 +1093,6 @@ end function PIOc_inq_vartype
ierr = PIOc_inq_vartype(ncid ,varid-1,type)
end function inq_vartype_id

!>
!! @defgroup PIO_inq_varnatts PIO_inq_varnatts
!<
!>
!! @ingroup PIO_inq_varnatts
!! Gets metadata information for netcdf file.
Expand Down Expand Up @@ -1152,9 +1149,6 @@ end function PIOc_inq_varnatts
ierr = PIOc_inq_varnatts(ncid ,varid-1,natts)
end function inq_varnatts_id

!>
!! @defgroup PIO_inq_var_deflate PIO_inq_var_deflate
!<
!>
!! @ingroup PIO_inq_var_deflate
!! Gets metadata information for netcdf file.
Expand Down Expand Up @@ -1223,9 +1217,6 @@ end function PIOc_inq_var_deflate
ierr = PIOc_inq_var_deflate(ncid, varid-1, shuffle, deflate, deflate_level)
end function inq_var_deflate_id

!>
!! @defgroup PIO_inq_varname
!<
!>
!! @ingroup PIO_inq_varname
!! Get the name associated with a variable.
Expand Down Expand Up @@ -1285,9 +1276,6 @@ end function PIOc_inq_varname

end function inq_varname_id

!>
!! @defgroup PIO_inq_varid
!<
!>
!! @ingroup PIO_inq_varid
!! Returns the ID of a netcdf variable given its name.
Expand Down Expand Up @@ -1347,9 +1335,6 @@ end function PIOc_inq_varid
varid = varid+1
end function inq_varid_id

!>
!! @defgroup PIO_inq_attlen
!<
!>
!! @ingroup PIO_inq_attlen
!! Gets the attribute length.
Expand Down Expand Up @@ -1411,9 +1396,6 @@ end function PIOc_inq_attlen
ierr = PIOc_inq_attlen(ncid,varid-1,trim(name)//C_NULL_CHAR,len)
end function inq_attlen_id

!>
!! @defgroup PIO_inq_att PIO_inq_att
!<
!>
!! @ingroup PIO_inq_att
!! Gets information about attributes.
Expand Down Expand Up @@ -1489,9 +1471,6 @@ end function PIOc_inq_att

end function inq_att_id

!>
!! @defgroup PIO_inq_attname
!<
!>
!! @ingroup PIO_inq_attname
!! Gets the name of an attribute.
Expand Down Expand Up @@ -1549,9 +1528,6 @@ end function PIOc_inq_attname

end function inq_attname_id

!>
!! @defgroup PIO_def_var PIO_def_var
!<
!>
!! @ingroup PIO_def_var
!! Defines a netcdf variable.
Expand Down

0 comments on commit 9bccea5

Please sign in to comment.