|
NEP 1.7.0
NetCDF Extension Pack: compression extensions for NetCDF
|
Minimal introduction to NetCDF from Fortran - the simplest starting point. More...
Functions/Subroutines | |
| program | f_quickstart |
| subroutine | check (status, context) |
| Error handling subroutine. | |
Minimal introduction to NetCDF from Fortran - the simplest starting point.
This is the Fortran equivalent of quickstart.c, demonstrating the essential NetCDF operations using the Fortran 90 NetCDF API (nf90_* functions). The program creates a tiny 2D array (2x3) with 6 integer values, adds descriptive attributes, writes it to a file, then reopens the file to verify everything was stored correctly.
Learning Objectives:
Key Concepts:
Fortran vs C Differences:
Prerequisites: Basic Fortran 90 programming knowledge
Related Examples:
Compilation:
Usage:
Expected Output: Creates f_quickstart.nc containing:
| subroutine f_quickstart::check | ( | integer, intent(in) | status, |
| character(len=*), intent(in) | context | ||
| ) |
Error handling subroutine.
| status | NetCDF return status code |
| context | Descriptive message about the operation |
| program f_quickstart |