Skip to main content

dealloc

Deallocates all allocatable arrays within an FPL data structure.

Signature

call dealloc(idata)
ParameterIntentTypeDescription
idatainoutFPL typeStructure to deallocate

Behavior

Deallocates the following arrays if allocated:

ArrayPresent In
ncdataAll types
longitudesAll types
latitudesAll types
times3D and 4D types
levels4D types
dimname, dimunitsAll types
dimid, dimsize, varidsAll types

Supported Types

Works with all 100 FPL data types via the dealloc generic interface.

Example

type(nc3d_float_llf_ti) :: data

call readgrid("input.nc", data)
! ... process data ...
call dealloc(data) ! Free all memory
tip

Always call dealloc when you're done with an FPL variable, especially inside loops where structures are repeatedly allocated.