NetCDF (Network Common Data Form) is an interface for array-oriented data access and a library that provides an implementation of the interface. The netcdf library also defines a machine-independent format for representing scientific data. Together, the interface, library, and format support the creation, access, and sharing of scientific data.
NetCDF is available on Pitzer and Owens Clusters. The versions currently available at OSC are:
Version | Owens | Pitzer | Ascend |
---|---|---|---|
4.3.3.1 | X | ||
4.6.1 | X | X | |
4.6.2 | X | X | |
4.7.4 | X* | X* | |
4.8.1 | X* |
You can use module spider netcdf
to view available modules for a given machine. Feel free to contact OSC Help if you need other versions for your work.
Additionally, the C++ interface version 4.3.0 and the Fortran interface version 4.4.2 is included in the netcdf/4.3.3.1 module.
NetCDF is available to all OSC users. If you have any questions, please contact OSC Help.
University Corporation for Atmospheric Research, Open source
Initalizing the system for use of the NetCDF is dependent on the system you are using and the compiler you are using. To load the default NetCDF, run the following command: module load netcdf
. To use the parallel implementation of NetCDF, run the following command instead: module load pnetcdf
. To load a particular version, use module load netcdf/version
. For example, use module load netcdf/4.3.3.1
to load NetCDF version 4.3.3.1. You can use module spider netcdf
to view available modules.
With the netcdf library loaded, the following environment variables will be available for use:
Variable | Use |
---|---|
$NETCDF_CFLAGS | Use during your compilation step for C or C++ programs. |
$NETCDF_FFLAGS | Use during your compilation step for Fortran programs. |
$NETCDF_LIBS | Use when linking your program to NetCDF. |
Similarly, when the pnetcdf module is loaded, the following environment variables will be available:
VARIABLE | USE |
---|---|
$PNETCDF_CFLAGS | Use during your compilation step for C programs. |
$PNETCDF_FFLAGS | Use during your compilation step for Fortran programs. |
$PNETCDF_LIBS | Use when linking your program to NetCDF. |
For example, to build the code myprog.c with the netcdf library you would use:
icc -c $NETCDF_CFLAGS myprog.c icc -o myprog myprog.o $NETCDF_LIBS
When you log into owens.osc.edu you are actually logged into a linux box referred to as the login node. To gain access to the mutiple processors in the computing environment, you must submit your job to the batch system for execution. Batch jobs can request mutiple nodes/cores and compute time up to the limits of the OSC systems. Refer to Queues and Reservations and Batch Limit Rules for more info.
#!/bin/bash #SBATCH --job-name=job-name #SBATCH --nodes=1 --ntasks-per-node=28 #SBATCH --account <project-account> module load netcdf cp foo.dat $TMPDIR cd $TMPDIR appname < foo.dat > foo.out cp foo.out $SLURM_SUBMIT_DIR
Initalizing the system for use of the NetCDF is dependent on the system you are using and the compiler you are using. To load the default NetCDF, run the following command: module load netcdf
.
With the netcdf library loaded, the following environment variables will be available for use:
VARIABLE | USE |
---|---|
$NETCDF_CFLAGS | Use during your compilation step for C or C++ programs. |
$NETCDF_FFLAGS | Use during your compilation step for Fortran programs. |
$NETCDF_LIBS | Use when linking your program to NetCDF. |
Similarly, when the pnetcdf module is loaded, the following environment variables will be available:
VARIABLE | USE |
---|---|
$PNETCDF_CFLAGS | Use during your compilation step for C programs. |
$PNETCDF_FFLAGS | Use during your compilation step for Fortran programs. |
$PNETCDF_LIBS | Use when linking your program to NetCDF. |
For example, to build the code myprog.c with the netcdf library you would use:
icc -c $NETCDF_CFLAGS myprog.c icc -o myprog myprog.o $NETCDF_LIBS
When you log into owens.osc.edu you are actually logged into a linux box referred to as the login node. To gain access to the mutiple processors in the computing environment, you must submit your job to the batch system for execution. Batch jobs can request mutiple nodes/cores and compute time up to the limits of the OSC systems. Refer to Queues and Reservations and Batch Limit Rules for more info.
#!/bin/bash #SBATCH --job-name=job-name #SBATCH --nodes=1 --ntasks-per-node=48 #SBATCH --account <project-account> module load netcdf cp foo.dat $TMPDIR cd $TMPDIR appname < foo.dat > foo.out cp foo.out $SLURM_SUBMIT_DIR
NetCDF (Network Common Data Form) is an interface for array-oriented data access and a library that provides an implementation of the interface. The netcdf library also defines a machine-independent format for representing scientific data. Together, the interface, library, and format support the creation, access, and sharing of scientific data.
For mpi-dependent codes, use the non-serial NetCDF module.
NetCDF is available for serial code on on Pitzer and Owens Clusters. The versions currently available at OSC are:
Version | Owens | Pitzer |
---|---|---|
4.3.3.1 | X | |
4.6.1 | X | X |
4.6.2 | X | X |
4.7.4 | X* | X* |
You can use module spider netcdf-serial
to view available modules for a given machine. Feel free to contact OSC Help if you need other versions for your work.
Additionally, the C++ and Fortran interfaces for NetCDF are included. After loading a netcdf-serial
module, you can check their versions with ncxx4-config --version
and nf-config --version
, respectively.
NetCDF is available to all OSC users. If you have any questions, please contact OSC Help.
University Corporation for Atmospheric Research, Open source
Initalizing the system for use of the NetCDF is dependent on the system you are using and the compiler you are using. To load the default serial NetCDF module, run the following command: module load netcdf-serial
. To load a particular version, use module load netcdf-serial/version
. For example, use module load netcdf-serial/4.3.3.1
to load NetCDF version 4.3.3.1. You can use module spider netcdf-serial
to view available modules.
With the netcdf library loaded, the following environment variables will be available for use:
Variable | Use |
---|---|
$NETCDF_CFLAGS | Use during your compilation step for C or C++ programs. |
$NETCDF_FFLAGS | Use during your compilation step for Fortran programs. |
$NETCDF_LIBS | Use when linking your program to NetCDF. |
Similarly, when the pnetcdf module is loaded, the following environment variables will be available:
VARIABLE | USE |
---|---|
$PNETCDF_CFLAGS | Use during your compilation step for C programs. |
$PNETCDF_FFLAGS | Use during your compilation step for Fortran programs. |
$PNETCDF_LIBS | Use when linking your program to NetCDF. |
For example, to build the code myprog.c with the netcdf library you would use:
icc -c $NETCDF_CFLAGS myprog.c icc -o myprog myprog.o $NETCDF_LIBS
When you log into owens.osc.edu you are actually logged into a linux box referred to as the login node. To gain access to the mutiple processors in the computing environment, you must submit your job to the batch system for execution. Batch jobs can request mutiple nodes/cores and compute time up to the limits of the OSC systems. Refer to Queues and Reservations and Batch Limit Rules for more info.
#PBS -N AppNameJob #PBS -l nodes=1:ppn=28 module load netcdf cd $PBS_O_WORKDIR cp foo.dat $TMPDIR cd $TMPDIR appname < foo.dat > foo.out cp foo.out $PBS_O_WORKDIR
Initalizing the system for use of the NetCDF is dependent on the system you are using and the compiler you are using. To load the default serial NetCDF module, run the following command: module load netcdf-serial
. To load a particular version, use module load netcdf-serial/version
. For example, use module load netcdf-serial/4.6.2
to load NetCDF version 4.6.2. You can use module spider netcdf-serial
to view available modules.
With the netcdf library loaded, the following environment variables will be available for use:
VARIABLE | USE |
---|---|
$NETCDF_CFLAGS | Use during your compilation step for C or C++ programs. |
$NETCDF_FFLAGS | Use during your compilation step for Fortran programs. |
$NETCDF_LIBS | Use when linking your program to NetCDF. |
Similarly, when the pnetcdf module is loaded, the following environment variables will be available:
VARIABLE | USE |
---|---|
$PNETCDF_CFLAGS | Use during your compilation step for C programs. |
$PNETCDF_FFLAGS | Use during your compilation step for Fortran programs. |
$PNETCDF_LIBS | Use when linking your program to NetCDF. |
For example, to build the code myprog.c with the netcdf library you would use:
icc -c $NETCDF_CFLAGS myprog.c icc -o myprog myprog.o $NETCDF_LIBS