Remove create_nc_file, write_var_netcdf, the output of OUT.nc is dangereous
because we can create too many dimensions and get
nf90_def_dim - NetCDF library returned: NetCDF: NC_MAX_DIMS exceeded
Moreover the multiple calls to redef render the IO very inefficient
That part should be rationalized!

m_nctk/nctk_add_etsf_header [ Functions ]

ncid=Netcdf file identifier.
* version = the number of version to be created.
* title = (optional) a title for the file (80 characters max).
* history = (optional) the first line of history (1024 characters max).
* with_etsf_header = (optional) if true, will create a header
as defined in the ETSF specifications (default is .true.).
When value is .false., arguments title, history and version
are ignored.

m_nctk/nctk_defwrite_nonana_terms [ Functions ]

Write phonon frequencies and displacements for q-->0 in the presence of non-analytical behaviour.

INPUTS

ncid=netcdf file id.
iphl2=Index of the q-point to be written to file
nph2l=Number of qpoints.
qph2l(3,nph2l)=List of phonon wavevector directions along which the non-analytical correction
to the Gamma-point phonon frequencies will be calculated
The direction is in CARTESIAN COORDINATES
natom=Number of atoms
phfrq(3*natom)=Phonon frequencies in Ha
cart_displ(2,3*natom,3*natom)=displacements in CARTESIAN coordinates.

m_nctk/nctk_fort_or_ncfile [ Functions ]

Return the iomode used to perform IO operations on filename.
If filename does not exist, a similar file with extension `.nc` is tried
and iomode is set to IO_MODE_ETSF if the file exists.
This trick is used to run the Abinit test suite in netcdf mode without changing the input files.
The modification (if any) is logged to std_out.

SIDE EFFECTS

filename=Tentative filename in input. Changed to netcdf file if input filename does not exist
and a file with netcdf extension is found.

m_nctk/nctk_test_mpiio [ Functions ]

Test at run-time whether the netcdf library supports parallel IO and
set the value of the module variable `nctk_has_mpiio`.
This is a COLLECTIVE routine that should be called by all processors
in MPI_COMM_WORLD at the beginning of the calculation

m_nctk/nctk_try_fort_or_ncfile [ Functions ]

If filename does not exist, a similar file with extension `.nc` is tried
This trick is used to run the Abinit test suite in netcdf mode without changing the input files.
The modification (if any) is logged to unit (Default: std_out)

SIDE EFFECTS

filename=Tentative filename in input. Changed to netcdf file if input filename does not exist
and a file with netcdf extension is found.