The tools below allow you to perform useful operations on the ITM datastructures including entire CPOs in your Fortran90 workflows. They are not meant as a replacement of the Universal Access Layer (UAL) but rather as a complement especially in situations where the UAL is not available or not practical, e.g. in U.S. - EFDA collaborations.
use deallocate_structuresThe Fortran syntax for deallocating a cpo is then:
call deallocate_cpo(cpo)where cpo is a single time slice or a pointer array of a CPO (or other ITM data structure).
call set_deallocate_verbosity(verbosity)you can set a verbosity level for the deallocate routines. verbosity = 0 produces no output, whereas verbosity > 0 produces verbose output.
svn checkout https://gforge6.eufus.eu/svn/itmshared/branches/tools target_dirTwo static libraries libdeallocate_pgi.a and libdeallocate_g95.a have been prebuilt on the ITM Gateway .
use copy_structuresThe Fortran syntax for copying a cpo is then:
call copy_cpo(cpo_source, cpo_target)where cpo_source and cpo_target are single time slices or arrays of a CPO (or other ITM data structure) of the same derived type, real scalars, or real arrays (1D - 7D).
call set_copy_verbosity(verbosity)you can set a verbosity level for the copy routines. verbosity = 0 produces no output, whereas verbosity > 0 produces verbose output.
svn checkout https://gforge6.eufus.eu/svn/itmshared/branches/tools target_dirTwo static libraries libcopy_pgi.a and libcopy_g95.a have been prebuilt on the ITM Gateway .
use euitm_copyThe Fortran syntax for copying a cpo via assignment is then:
cpo_target = cpo_sourcewhere cpo_source and cpo_target are single time slices or arrays of a CPO (or other ITM data structure) of the same derived type.
svn checkout https://gforge6.eufus.eu/svn/itmshared/branches/perlcopy target_dirTo build the Fortran90 module, run
creacopy.plIt takes euitm_schemas.f90 from the directory $UAL/fortraninterface/ .
creacopy.pl $MYDIR/euitm_schemas.f90
use is_set_structuresThe Fortran syntax for checking a cpo is then:
call is_set_cpo(cpo, "name of cpo")where cpo is a single time slice or an array of a CPO (or other ITM data structure) and "name of cpo" is a string containing the name of the CPO.
svn checkout https://gforge6.eufus.eu/svn/itmshared/branches/tools target_dirTwo static libraries libis_set_pgi.a and libis_set_g95.a have been prebuilt on the ITM Gateway .
use size_of_structuresThe Fortran syntax for calculating the size of a cpo is then:
call size_of_cpo(cpo, total_size, human_readable, "name of cpo")where cpo is a single time slice or an array of a CPO (or other ITM data structure) and "name of cpo" is a string containing the name of the CPO. total_size is an integer and should be set to zero before the call. human_readable is a flag (true => human friendly format).
call set_size_of_verbosity(verbosity)verbosity = 0 => no output of empty fields
call set_size_of_maxlevel(level)with level being an integer.
svn checkout https://gforge6.eufus.eu/svn/itmshared/branches/tools target_dirTwo static libraries libsize_of_pgi.a and libsize_of_g95.a have been prebuilt on the ITM Gateway .
call open_write_file(unit_no, file_name)where unit_no is the file handle (integer) and file_name a string with the file name (possibly including the path).
call close_write_fileAdd the following use statement to your code:
use write_structuresThe Fortran syntax for writing a cpo to disk is then:
call write_cpo(cpo, "name of cpo")where cpo is a single time slice or an array of a CPO (or other ITM data structure) and "name of cpo" is a string containing the name of the CPO.
call set_write_verbosity(verbosity)you can set a verbosity level for the write routines. verbosity = 0 produces no output, whereas verbosity > 0 produces verbose output.
svn checkout https://gforge6.eufus.eu/svn/itmshared/branches/tools target_dirTwo static libraries libwrite_pgi.a and libwrite_g95.a have been prebuilt on the ITM Gateway .
call open_read_file(unit_no, file_name)where unit_no is the file handle (integer) and file_name a string with the file name (possibly including the path).
call close_read_fileAdd the following use statement to your code:
use read_structuresThe Fortran syntax for reading a cpo from disk is then:
call read_cpo(cpo, "name of cpo")where cpo is a single time slice or an array of a CPO (or other ITM data structure) and "name of cpo" is a string containing the name of the CPO. The module automatically deallocates any fields already allocated in cpo and allocates all required fields automatically. It is absolutely essential that "name of cpo" is identical with the one chosen when the cpo was written.
call set_read_verbosity(verbosity)you can set a verbosity level for the read routines. verbosity = 0 produces no output, whereas verbosity > 0 produces verbose output.
svn checkout https://gforge6.eufus.eu/svn/itmshared/branches/tools target_dirTwo static libraries libread_pgi.a and libread_g95.a have been prebuilt on the ITM Gateway .
use diff_structures use error_analysisThe Fortran syntax for calculating the differences between two cpos is then:
call diff_cpo(reference_cpo, test_cpo, name_root, func)where reference_cpo is the reference CPO or other ITM data structure and test_cpo is the test CPO or other ITM data structure.
diff_counter : to count the number of difference error_level : to allow for sums or averages over entire CPOs (see examples)These two variables are private to the error_analysis module.
get_diff_counter()and
get_error_level()The function
set_error_level(err_level)may be used to specify an initial value for the variable error_level .
call set_diff_verbosity(verbosity)you can set a verbosity level for the diff routines. verbosity = 0 produces no output, whereas verbosity > 0 produces verbose output.
svn checkout https://gforge6.eufus.eu/svn/itmshared/branches/tools target_dirTwo static libraries libdiff_pgi.a and libdiff_g95.a have been prebuilt on the ITM Gateway .