Module to simplify reading and writing grid data to files
Read a variable for a timestep from a file
Read a variable step from a file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Read a variable step from a file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Read a variable step from a file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Write a variable for a timestep to a file
Write a variable at a timestep
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Write a variable at a timestep
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Write a variable at a timestep
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Read a grid from a file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
Write a grid to a file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |