Added doc in IRPF90 subroutines

This commit is contained in:
Anthony Scemama 2015-06-01 15:11:31 +02:00
parent 6df5989f16
commit 425ed281c2
3 changed files with 69 additions and 0 deletions

View File

@ -24,6 +24,9 @@
subroutine ezfio_error(where,txt)
implicit none
BEGIN_DOC
! Prints an error message
END_DOC
character*(*) :: where
character*(*) :: txt
character*(128) :: fname

View File

@ -23,6 +23,7 @@
! scemama@irsamc.ups-tlse.fr
BEGIN_PROVIDER [ logical, libezfio_read_only ]
implicit none
BEGIN_DOC
! If true, the EZFIO file is read-only
END_DOC
@ -31,18 +32,29 @@ BEGIN_PROVIDER [ logical, libezfio_read_only ]
END_PROVIDER
subroutine ezfio_set_read_only(v)
implicit none
BEGIN_DOC
! If true, sets the EZFIO file in a read-only state
END_DOC
logical :: v
libezfio_read_only = v
TOUCH libezfio_read_only
end subroutine ezfio_set_read_only
subroutine ezfio_is_read_only(v)
implicit none
BEGIN_DOC
! True if the EZFIO file is in a read-only state
END_DOC
logical :: v
v = libezfio_read_only
end subroutine ezfio_is_read_only
integer function char_to_version(v)
implicit none
BEGIN_DOC
! Computes the version number from a string
END_DOC
character*(32), intent(in) :: v
character*(32) :: vnew
integer :: i, j, k
@ -78,6 +90,9 @@ END_PROVIDER
subroutine ezfio_get_filename(fname)
implicit none
BEGIN_DOC
! Returns the name of the EZFIO file
END_DOC
character*(*) :: fname
fname = libezfio_filename
end subroutine
@ -107,6 +122,9 @@ END_PROVIDER
logical function exists(path)
implicit none
BEGIN_DOC
! Returns True if the path exists
END_DOC
character*(*) :: path
character*(32) :: V
inquire(file=trim(path)//'/.version',exist=exists)
@ -124,6 +142,9 @@ end function
subroutine ezfio_set_file(filename_in)
implicit none
BEGIN_DOC
! Sets the file for I/O
END_DOC
character*(*) :: filename_in
@ -153,6 +174,9 @@ end subroutine
subroutine ezfio_finish()
implicit none
BEGIN_DOC
! Close all open buffers
END_DOC
close(libezfio_iunit)
BEGIN_SHELL [ /usr/bin/python ]
import os

View File

@ -35,6 +35,9 @@ END_PROVIDER
logical function ezfio_exists(path)
implicit none
BEGIN_DOC
! Checks if a file path exists
END_DOC
character*(*) :: path
inquire(file=trim(path)//'/.version',exist=ezfio_exists)
if (ezfio_exists) then
@ -47,6 +50,9 @@ end function
subroutine ezfio_mkdir(path)
implicit none
BEGIN_DOC
! Creates a directory
END_DOC
character*(*) :: path
logical :: ezfio_exists
if (libezfio_read_only) then
@ -63,6 +69,9 @@ end subroutine
subroutine libezfio_openz(filename,mode,err)
implicit none
BEGIN_DOC
! Opens a compressed file
END_DOC
character*(*) :: filename, mode
character*(1024) :: fifo
integer :: err
@ -83,6 +92,9 @@ end
subroutine libezfio_closez(filename,mode)
implicit none
BEGIN_DOC
! Closes a compressed file
END_DOC
character*(*) :: filename, mode
character*(1024) :: fifo
fifo = trim(filename)//'.'//PID_str
@ -102,6 +114,9 @@ from f_types import format, t_short
template = """
subroutine ezfio_read_%(type_short)s(dir,fil,dat)
implicit none
BEGIN_DOC
! Reads a %(type_short)s
END_DOC
character*(*), intent(in) :: dir, fil
%(type)s, intent(out) :: dat
character*(1024) :: l_filename
@ -117,6 +132,9 @@ end
subroutine ezfio_write_%(type_short)s(dir,fil,dat)
implicit none
BEGIN_DOC
! Writes a %(type_short)s
END_DOC
character*(*), intent(in) :: dir, fil
%(type)s, intent(in) :: dat
character*(1024) :: l_filename(2)
@ -133,6 +151,9 @@ end
subroutine ezfio_read_array_%(type_short)s(dir,fil,rank,dims,dim_max,dat)
implicit none
BEGIN_DOC
! Reads a %(type_short)s array
END_DOC
character*(*), intent(in) :: dir, fil
integer :: rank
integer :: dims(rank)
@ -182,6 +203,9 @@ end
subroutine ezfio_write_array_%(type_short)s(dir,fil,rank,dims,dim_max,dat)
implicit none
BEGIN_DOC
! Writes a %(type_short)s array
END_DOC
character*(*), intent(in) :: dir, fil
integer, intent(in) :: rank
integer, intent(in) :: dims(rank)
@ -337,6 +361,9 @@ END_PROVIDER
subroutine ezfio_open_write_buffer(dir,fil,rank)
implicit none
BEGIN_DOC
! Opens a buffer for writing
END_DOC
character*(*),intent(in) :: dir
character*(*),intent(in) :: fil
integer,intent(in) :: rank
@ -367,6 +394,9 @@ end
subroutine ezfio_open_read_buffer(dir,fil,rank)
implicit none
BEGIN_DOC
! Opens a buffer for reading
END_DOC
character*(*),intent(in) :: dir
character*(*),intent(in) :: fil
integer,intent(in) :: rank
@ -399,6 +429,9 @@ end
subroutine ezfio_close_read_buffer(dir,fil,rank)
implicit none
BEGIN_DOC
! Closes a buffer
END_DOC
character*(*),intent(in) :: dir
character*(*),intent(in) :: fil
integer,intent(in) :: rank
@ -411,6 +444,9 @@ end
subroutine ezfio_close_write_buffer(dir,fil,rank)
implicit none
BEGIN_DOC
! Closes a buffer
END_DOC
character*(*),intent(in) :: dir
character*(*),intent(in) :: fil
integer,intent(in) :: rank
@ -423,6 +459,9 @@ end
subroutine ezfio_read_buffer(indices,values,isize)
implicit none
BEGIN_DOC
! Reads a buffer
END_DOC
integer, intent(inout) :: isize
integer, intent(out) :: indices(*)
@ -444,6 +483,9 @@ end
subroutine ezfio_write_buffer(indices,values,isize)
implicit none
BEGIN_DOC
! Writes a buffer
END_DOC
integer, intent(in) :: isize
integer, intent(in) :: indices(*)