NEP 2.7.0
NetCDF Extension Pack
Loading...
Searching...
No Matches
Functions/Subroutines
f_opendap_simple.f90 File Reference

Simple OPeNDAP example in Fortran. More...

Functions/Subroutines

program f_opendap_simple
 

Detailed Description

Simple OPeNDAP example in Fortran.

This is the Fortran equivalent of opendap_simple.c, demonstrating that OPeNDAP remote access works identically in Fortran through the NetCDF-Fortran library.

What this example does:

  1. Opens a remote sea surface temperature dataset from test.opendap.org
  2. Queries dataset metadata using nf90_inquire
  3. Reads information about the 'sst' variable dimensions
  4. Reads a small 5x5 spatial subset from the first time step
  5. Closes the remote connection

CRITICAL: Indexing differences to understand:

The example uses the same public test dataset as the C version: sst.mnmean.nc.gz - NOAA Extended Reconstructed Sea Surface Temperature

Learning Objectives:

Key Concepts:

Prerequisites:

Related Examples:

Compilation:

gfortran -o f_opendap_simple f_opendap_simple.f90 -lnetcdff -lnetcdf
program f_opendap_simple
Definition f_opendap_simple.f90:77

Usage:

Expected Output:

Note
Companion code for "The NetCDF Developer's Handbook: The Authoritative Guide to Writing High-Performance Programs for Scientific Data Management, Second Edition" (https://www.amazon.com/dp/B0H7Q1Z75L)
Author
Edward Hartnett
Date
6/15/26

Function/Subroutine Documentation

◆ f_opendap_simple()

program f_opendap_simple