Skip to content

Instantly share code, notes, and snippets.

@Kungergely
Last active November 15, 2022 15:25
Show Gist options
  • Save Kungergely/94b9e972f6023f483d51a7d6ce2e24b3 to your computer and use it in GitHub Desktop.
Save Kungergely/94b9e972f6023f483d51a7d6ce2e24b3 to your computer and use it in GitHub Desktop.
RADRRTM format description
The file is read in Fortran as "unstructured" binary. The data is encoded in little endian format, while the size is encoded in big endian format.
# The first four bytes denote a block length (0x00009600 = 38400, 0x00037000 = 225280, 0x00002080 = 8320, 0x00019A00 = 104960, 0x00012480 = 74880 )
# The rest of the block consists of 64-bit floats
# Each block is succeeded by the size value (the same as in the beginning) again and this is the offset the block length at the beginning points to
# The individual blocks (complete with the block length prepended and appended to it) are concatenated together into a single file
# This is consistent with the FORTRAN "unformatted" file saving convention described e.g. in https://www.mathworks.com/matlabcentral/answers/97118-how-do-i-read-a-fortran-unformatted-binary-data-file-into-matlab#answer_106468
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment