netCDF_mod Module

module~~netcdf_mod~~UsesGraph module~netcdf_mod netCDF_mod module~kinds_mod kinds_mod module~kinds_mod->module~netcdf_mod netcdf netcdf netcdf->module~netcdf_mod
Help

Module to simplify reading and writing grid data to files

Used By

module~~netcdf_mod~~UsedByGraph module~netcdf_mod netCDF_mod program~testnetcdf_prg testNetCDF_prg module~netcdf_mod->program~testnetcdf_prg
Help


Interfaces

public interface readStep

Read a variable for a timestep from a file

  • private subroutine readStep_1d(fn, vn, v, ts)

    Read a variable step from a file

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: fn

    Filename

    character(len=*), intent(in) :: vn

    Variable name

    real(kind=dp), intent(out), dimension(:):: v

    Variable to fill with data from file

    integer, intent(in), optional :: ts

    Timestep

  • private subroutine readStep_2d(fn, vn, v, ts)

    Read a variable step from a file

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: fn

    Filename

    character(len=*), intent(in) :: vn

    Variable name

    real(kind=dp), intent(out), dimension(:,:):: v

    Variable to fill with data from file

    integer, intent(in), optional :: ts

    Timestep

  • private subroutine readStep_3d(fn, vn, v, ts)

    Read a variable step from a file

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: fn

    Filename

    character(len=*), intent(in) :: vn

    Variable name

    real(kind=dp), intent(out), dimension(:,:,:):: v

    Variable to fill with data from file

    integer, intent(in), optional :: ts

    Timestep

public interface writeStep

Write a variable for a timestep to a file

  • private subroutine writeStep_1d(fn, t, ts, vn, v)

    Write a variable at a timestep

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: fn

    Filename

    real(kind=dp), intent(in) :: t

    Time

    integer, intent(in) :: ts

    Timestep

    character(len=*), intent(in) :: vn

    Variable name

    real(kind=dp), intent(in), dimension(:):: v

    Variable

  • private subroutine writeStep_2d(fn, t, ts, vn, v)

    Write a variable at a timestep

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: fn

    Filename

    real(kind=dp), intent(in) :: t

    Time

    integer, intent(in) :: ts

    Timestep

    character(len=*), intent(in) :: vn

    Variable name

    real(kind=dp), intent(in), dimension(:,:):: v

    Variable

  • private subroutine writeStep_3d(fn, t, ts, vn, v)

    Write a variable at a timestep

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: fn

    Filename

    real(kind=dp), intent(in) :: t

    Time

    integer, intent(in) :: ts

    Timestep

    character(len=*), intent(in) :: vn

    Variable name

    real(kind=dp), intent(in), dimension(:,:,:):: v

    Variable


Subroutines

public subroutine readGrid(fn, vars, x, y, z, t)

Read a grid from a file

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: fn

Filename

character(len=*), intent(inout), dimension(:), allocatable:: vars

List of variable names

real(kind=dp), intent(inout), dimension(:), allocatable:: x

Grid data from file; allocated if present

real(kind=dp), intent(inout), dimension(:), allocatable:: y

Grid data from file; allocated if present

real(kind=dp), intent(inout), dimension(:), allocatable:: z

Grid data from file; allocated if present

real(kind=dp), intent(inout), dimension(:), allocatable:: t

Grid data from file; allocated if present

public subroutine writeGrid(fn, vars, x, y, z)

Write a grid to a file

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: fn

Filename

character(len=*), intent(in), dimension(:):: vars

Variable names

real(kind=dp), intent(in), optional dimension(:):: x

Grid data

real(kind=dp), intent(in), optional dimension(:):: y

Grid data

real(kind=dp), intent(in), optional dimension(:):: z

Grid data