NEP 1.5.1
NetCDF Extension Pack: compression extensions for NetCDF
Loading...
Searching...
No Matches
Functions/Subroutines
f_simple_2D.f90 File Reference

Basic example demonstrating 2D array creation and reading in NetCDF (Fortran) More...

Functions/Subroutines

program f_simple_2d
 
subroutine handle_err (status)
 

Detailed Description

Basic example demonstrating 2D array creation and reading in NetCDF (Fortran)

This is the Fortran equivalent of simple_2D.c, demonstrating the fundamental workflow for working with NetCDF files using the Fortran 90 NetCDF API. The program creates a 2D integer array, writes it to a NetCDF file, then reopens the file to verify both metadata and data correctness.

Learning Objectives:

Key Concepts:

Fortran vs C Differences:

Prerequisites:

Related Examples:

Compilation:

gfortran -o f_simple_2d f_simple_2d.f90 -lnetcdff -lnetcdf
program f_simple_2d
Definition f_simple_2D.f90:60

Usage:

Expected Output: Creates f_simple_2D.nc containing:

Author
Edward Hartnett, Intelligent Data Design, Inc.
Date
2026

Function/Subroutine Documentation

◆ f_simple_2d()

program f_simple_2d

◆ handle_err()

subroutine f_simple_2d::handle_err ( integer, intent(in)  status)