diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 9b3916e..4104e82 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-15T09:24:25","documenter_version":"1.8.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-15T10:12:04","documenter_version":"1.8.0"}} \ No newline at end of file diff --git a/dev/index.html b/dev/index.html index 4b9361e..4a36b8f 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Introduction · MetopDatasets.jl
+Introduction · MetopDatasets.jl
diff --git a/dev/internal_api/index.html b/dev/internal_api/index.html index c4a001b..ba6bd00 100644 --- a/dev/internal_api/index.html +++ b/dev/internal_api/index.html @@ -2,27 +2,27 @@ Internal API · MetopDatasets.jl

Internal functions and types

MetopDatasets.data_record_typeMethod
data_record_type(header::MainProductHeader)::Type

Get the type of data record based on the main product header

Example

julia> file_pointer = open("ASCA_SZO_1B_M03_20230329063300Z_20230329063556Z_N_C_20230329081417Z")
 julia> main_header = MetopDatasets.native_read(file_pointer, MainProductHeader)
 julia> data_record_type(main_header)
-ASCA_SZO_1B_V13
source
MetopDatasets.get_data_record_chunksMethod
get_data_record_chunks(internal_pointer_records::Vector{InternalPointerRecord},
-    total_file_size::Integer, record_type::Type{<:DataRecord})::Vector{RecordChunk}

Compute the record_chunks

source
MetopDatasets.get_descriptionMethod
get_description(T::Type{<:BinaryRecord}, field::Symbol)::AbstractString

Get the description for a given field in the BinaryRecord

Example

julia> get_description(ASCA_SZR_1B_V13, :sigma0_trip)
-"Sigma0 triplet, re-sampled to swath grid, for 3 beams (fore, mid, aft) "
source
MetopDatasets.get_dimensionsMethod
get_dimensions(T::Type{<:BinaryRecord})::Dict{String, <:Integer}

Get the the named dimensions in a BinaryRecord and their length.

Example

julia> get_dimensions(ASCA_SZR_1B_V13)
+ASCA_SZO_1B_V13
source
MetopDatasets.get_data_record_chunksMethod
get_data_record_chunks(internal_pointer_records::Vector{InternalPointerRecord},
+    total_file_size::Integer, record_type::Type{<:DataRecord})::Vector{RecordChunk}

Compute the record_chunks

source
MetopDatasets.get_descriptionMethod
get_description(T::Type{<:BinaryRecord}, field::Symbol)::AbstractString

Get the description for a given field in the BinaryRecord

Example

julia> get_description(ASCA_SZR_1B_V13, :sigma0_trip)
+"Sigma0 triplet, re-sampled to swath grid, for 3 beams (fore, mid, aft) "
source
MetopDatasets.get_dimensionsMethod
get_dimensions(T::Type{<:BinaryRecord})::Dict{String, <:Integer}

Get the the named dimensions in a BinaryRecord and their length.

Example

julia> get_dimensions(ASCA_SZR_1B_V13)
 Dict{String, Int64} with 2 entries:
   "num_band" => 3
-  "xtrack"   => 82
source
MetopDatasets.get_field_dimensionsMethod
get_field_dimensions(T::Type{<:BinaryRecord}, field::Symbol)::Vector{<:AbstractString}

Get the named dimensions of a field in a BinaryRecord

Example

julia> get_field_dimensions(ASCA_SZR_1B_V13, :sigma0_trip)
-["num_band", "xtrack"]
source
MetopDatasets.get_raw_format_dimMethod
get_raw_format_dim(T::Type{<:BinaryRecord}, field::Symbol)::NTuple{4, Int64}

Get the dimensions of the field as defined in the record format specification.

Example

julia> get_raw_format_dim(ASCA_SZR_1B_V13, :sigma0_trip)
-(3, 82, 1, 1)
source
MetopDatasets.get_scale_factorMethod
get_scale_factor(T::Type{<:BinaryRecord}, field::Symbol)::Union{Number,Nothing}

get the scale_factor for a given field in the BinaryRecord. The variable can late be scaled from integer to float by dividing with 10^scale_factor. Returns nothing if no scale factor is set.

Example

julia> get_scale_factor(ASCA_SZR_1B_V13, :sigma0_trip) 
-6
source
MetopDatasets.native_readMethod
native_read(io::IO, T)::T

Read a single object of type T from io to a file in the native Metop format. Endianness is automatically converted.

Example

julia> file_pointer = open("ASCA_SZO_1B_M03_20230329063300Z_20230329063556Z_N_C_20230329081417Z")
+  "xtrack"   => 82
source
MetopDatasets.get_field_dimensionsMethod
get_field_dimensions(T::Type{<:BinaryRecord}, field::Symbol)::Vector{<:AbstractString}

Get the named dimensions of a field in a BinaryRecord

Example

julia> get_field_dimensions(ASCA_SZR_1B_V13, :sigma0_trip)
+["num_band", "xtrack"]
source
MetopDatasets.get_raw_format_dimMethod
get_raw_format_dim(T::Type{<:BinaryRecord}, field::Symbol)::NTuple{4, Int64}

Get the dimensions of the field as defined in the record format specification.

Example

julia> get_raw_format_dim(ASCA_SZR_1B_V13, :sigma0_trip)
+(3, 82, 1, 1)
source
MetopDatasets.get_scale_factorMethod
get_scale_factor(T::Type{<:BinaryRecord}, field::Symbol)::Union{Number,Nothing}

get the scale_factor for a given field in the BinaryRecord. The variable can late be scaled from integer to float by dividing with 10^scale_factor. Returns nothing if no scale factor is set.

Example

julia> get_scale_factor(ASCA_SZR_1B_V13, :sigma0_trip) 
+6
source
MetopDatasets.native_readMethod
native_read(io::IO, T)::T

Read a single object of type T from io to a file in the native Metop format. Endianness is automatically converted.

Example

julia> file_pointer = open("ASCA_SZO_1B_M03_20230329063300Z_20230329063556Z_N_C_20230329081417Z")
 julia> main_header = MetopDatasets.native_read(file_pointer, MainProductHeader)
 julia> main_header.sensing_start
-2023-03-29T06:33:00
source
MetopDatasets.native_sizeofMethod
native_sizeof(x)::Integer

The byte size of the type x in a METOP native product.

Example

julia> native_sizeof(RecordHeader)
-20
source
MetopDatasets.read_first_recordMethod
read_first_record(ds::MetopDataset, record_type::Type{<:Record})

Read the first record of type record_type from the dataset. This can be used to access records that are not directly exposed through the MetopDataset interface.

source
MetopDatasets.record_struct_expressionMethod
record_struct_expression(file_name, record_type)

Function to autogenerate Struct code based on a CSV file. Also autogenerates get_description and get_scale_factor method for Struct. Use it together with eval.

Example

julia> eval(record_struct_expression(joinpath(@__DIR__, "TEST_FORmaT.csv"), DataRecord))
+2023-03-29T06:33:00
source
MetopDatasets.native_sizeofMethod
native_sizeof(x)::Integer

The byte size of the type x in a METOP native product.

Example

julia> native_sizeof(RecordHeader)
+20
source
MetopDatasets.read_first_recordMethod
read_first_record(ds::MetopDataset, record_type::Type{<:Record})

Read the first record of type record_type from the dataset. This can be used to access records that are not directly exposed through the MetopDataset interface.

source
MetopDatasets.record_struct_expressionMethod
record_struct_expression(file_name, record_type)

Function to autogenerate Struct code based on a CSV file. Also autogenerates get_description and get_scale_factor method for Struct. Use it together with eval.

Example

julia> eval(record_struct_expression(joinpath(@__DIR__, "TEST_FORmaT.csv"), DataRecord))
 julia> TEST_FORMAT <: DataRecord
-true
source
MetopDatasets.scale_iasi_spectrumMethod
scale_iasi_spectrum(spec_raw, giadr::GIADR_IASI_XXX_1C; high_precision = false)
 scale_iasi_spectrum(spec_raw, giadr::GIADR_IASI_XXX_1C, channel_range::OrdinalRange; high_precision = false)

Scaling the IASI L1C spectrum using the giadr record information. The channel_range is needed if only a subset of the raw spectrum is passed to the function. Setting high_precision=true will convert to Float64 instead of Float32. Note that the end part of the ds["gs1cspect"] does not have any scale factors. Here the spectrum is just filled with 0.0.

Example

julia> file_path = "test/testData/IASI_xxx_1C_M01_20240819103856Z_20240819104152Z_N_C_20240819112911Z"
 julia> ds = MetopDataset(file_path, auto_convert = false);
 julia> giadr = MetopDatasets.read_first_record(ds, MetopDatasets.GIADR_IASI_XXX_1C_V11)
 julia> # Scale full spectrum.
 julia> scaled_spectrum = MetopDatasets.scale_iasi_spectrum(ds["gs1cspect"], giadr)
 julia> # Scale subset of spectrum.
-julia> scaled_spectrum_subset = MetopDatasets.scale_iasi_spectrum(ds["gs1cspect"][10:20,:,:,:], giadr, 10:20)
source
MetopDatasets.AbstractMetopDiskArrayType
AbstractMetopDiskArray{T, N} <: DiskArrays.AbstractDiskArray{T, N}

In most cases MetopDiskArray is used but AbstractMetopDiskArray allows defining additional DiskArray types to handle special corner cases.

source
MetopDatasets.DummyRecordType
DummyRecord <:Record

The Dummy Measurement Data Record is a special case of the MDR. It is a generic record that is used to indicate the location of lost data within any product. One DMDR can replace a contiguous block of lost MDRs

source
MetopDatasets.IasiSpectrumDiskArrayType
IasiSpectrumDiskArray{T} <: AbstractMetopDiskArray{T, 4}

The IasiSpectrumDiskArray is a wrapper around a MetopDiskArray that enables the automatic scaling of the the IASI L1C spectrum using the GIADR_IASI_XXX_1C record information.

source
MetopDatasets.IasiWaveNumberDiskArrayType
IasiWaveNumberDiskArray <: AbstractMetopDiskArray{Float64, 2}

The IasiWaveNumberDiskArray is a disk array that computes the wave number of the IASI spectrum. The wave number is computed using :idefnsfirst1b and :idefspectdwn1b from each data record.

source
MetopDatasets.InternalPointerRecordType
InternalPointerRecord <: Record

The Internal Pointer Records (IPR) specifies the start of each block of records in the file sharing the same record type. This can be used to find the locations of data records or dummy records.

source
MetopDatasets.MetopDiskArrayType
MetopDiskArray{T, N} <: AbstractMetopDiskArray{T, N}

Struct to handle lazy loading of a variable in a Metop product. The raw types in the product is mapped without any scaling. Auto conversion can be enabled for RecordSubType e.g. converting VInteger to Float64.

source
MetopDatasets.MetopDiskArrayMethod
MetopDiskArray(file_pointer::IOStream,
+julia> scaled_spectrum_subset = MetopDatasets.scale_iasi_spectrum(ds["gs1cspect"][10:20,:,:,:], giadr, 10:20)
source
MetopDatasets.AbstractMetopDiskArrayType
AbstractMetopDiskArray{T, N} <: DiskArrays.AbstractDiskArray{T, N}

In most cases MetopDiskArray is used but AbstractMetopDiskArray allows defining additional DiskArray types to handle special corner cases.

source
MetopDatasets.DummyRecordType
DummyRecord <:Record

The Dummy Measurement Data Record is a special case of the MDR. It is a generic record that is used to indicate the location of lost data within any product. One DMDR can replace a contiguous block of lost MDRs

source
MetopDatasets.IasiSpectrumDiskArrayType
IasiSpectrumDiskArray{T} <: AbstractMetopDiskArray{T, 4}

The IasiSpectrumDiskArray is a wrapper around a MetopDiskArray that enables the automatic scaling of the the IASI L1C spectrum using the GIADR_IASI_XXX_1C record information.

source
MetopDatasets.IasiWaveNumberDiskArrayType
IasiWaveNumberDiskArray <: AbstractMetopDiskArray{Float64, 2}

The IasiWaveNumberDiskArray is a disk array that computes the wave number of the IASI spectrum. The wave number is computed using :idefnsfirst1b and :idefspectdwn1b from each data record.

source
MetopDatasets.InternalPointerRecordType
InternalPointerRecord <: Record

The Internal Pointer Records (IPR) specifies the start of each block of records in the file sharing the same record type. This can be used to find the locations of data records or dummy records.

source
MetopDatasets.MetopDiskArrayType
MetopDiskArray{T, N} <: AbstractMetopDiskArray{T, N}

Struct to handle lazy loading of a variable in a Metop product. The raw types in the product is mapped without any scaling. Auto conversion can be enabled for RecordSubType e.g. converting VInteger to Float64.

source
MetopDatasets.MetopDiskArrayMethod
MetopDiskArray(file_pointer::IOStream,
     record_chunks::Vector{RecordChunk},
-    field_name::Symbol; auto_convert = true) -> MetopDiskArray

Constructor for MetopDiskArray that compute additional fields. auto_convert = true will automatically convert custom RecordSubType to commonly used data types e.g. converting VInteger to Float64.

source
MetopDatasets.MetopVariableType
MetopVariable{T, N, R <: DataRecord, F} <: CommonDataModel.AbstractVariable{T, N}

MetopVariable wraps AbstractMetopDiskArray so it can be used with MetopDataset.

source
+ field_name::Symbol; auto_convert = true) -> MetopDiskArray

Constructor for MetopDiskArray that compute additional fields. auto_convert = true will automatically convert custom RecordSubType to commonly used data types e.g. converting VInteger to Float64.

source
MetopDatasets.MetopVariableType
MetopVariable{T, N, R <: DataRecord, F} <: CommonDataModel.AbstractVariable{T, N}

MetopVariable wraps AbstractMetopDiskArray so it can be used with MetopDataset.

source
MetopDatasets.RecordChunkType
RecordChunk

Used to store the locations of different chunks of records in Native metop files.

source
MetopDatasets.RecordHeaderType
RecordHeader

Also known as GRH.

source
diff --git a/dev/objects.inv b/dev/objects.inv index 7b20cbf..ed33797 100644 --- a/dev/objects.inv +++ b/dev/objects.inv @@ -1,6 +1,6 @@ # Sphinx inventory version 2 # Project: MetopDatasets.jl -# Version: 0.0.5 +# Version: 0.0.6 # The remainder of this file is compressed using zlib. xWQO0~WX$J[1*:1"7Ďl}gm)  8wgy*q-EZ& ~P%1-Xy{D&q l^dە5-1T&A3 HՄ#Q,%[4 Z5 8T{Re;UV!eI: Z\ diff --git a/dev/public_api/index.html b/dev/public_api/index.html index cb976ee..28853f8 100644 --- a/dev/public_api/index.html +++ b/dev/public_api/index.html @@ -22,8 +22,8 @@ julia> lat = ds["latitude"][:,:] julia> julia> # close data set -julia> close(ds);source

MetopProduct

This interface might get removed in future versions.

MetopDatasets.MetopProductType
MetopProduct{T <: DataRecord} 
+julia> close(ds);
source

MetopProduct

This interface might get removed in future versions.

MetopDatasets.MetopProductType
MetopProduct{T <: DataRecord} 
     main_product_header::MainProductHeader
     internal_pointer_records::Vector{InternalPointerRecord}
     data_records::Vector{T}
-    dummy_records::Vector{DummyRecord}

Generic Metop Product

source
+ dummy_records::Vector{DummyRecord}

Generic Metop Product

source