Skip to content

Missing values on y altitutude axis at 2 km and 8 km #65

@IskraAI

Description

@IskraAI

Dear @bczernecki,

I would like to report a possible issue with the sounding_save function, following up on a related discussion in issue https://github.com/bczernecki/thundeR/issues/64](url)

Background
Initially, I was working on Windows and encountered problems saving PNG files with thunderR function sounding_save, which seem related to the closed issue #54. Attempting to save to SVG resulted in the error "svg: Cairo-based devices are not available for this platform".

As a workaround, I used svglite package to wrap the sounding_plot function as follows:

svglite(file_path, width = 12, height = 7.5)
sounding_plot(
title = "Sounding",
pressure = pressure,
altitude = altitude,
temp = temp,
dpt = dpt,
wd = wd,
ws = ws
)
dev.off()

This approach worked in general; however, upon closer inspection, I noticed that some altitude labels were missing on the resulting plots. Initially, I suspected the use of svglite might cause this issue.

Further Investigation on Linux

I switched to Linux and ran sounding_save without wrapping it in svglite. While the function worked without error, the missing altitude labels persisted. Specifically:

  • When plotting geopotential height (directly from radiosounding data), all altitude labels appeared correctly.
  • When plotting geometric height (calculated via an approximate function), labels at 2 km and 8 km altitudes were missing.
Image

Summary

  • The missing altitude label problem is not caused by svglite and could be a good alternative if other Windows users will have problems with sounding_save function.
  • The issue occurs specifically when plotting geometric height, but not with geopotential height.
  • This discrepancy suggests the sounding_save function may not properly handle axis labeling for the calculated geometric altitude data.

Attachments
I have included the code used for generating both the geopotential and geometric altitude plots, along with the .cor file containing the original sounding data.

Environment Details
I am working within a Conda environment integrating Python 3.10 and R 4.1. My session info is:

R version 4.1.3 (2022-03-10)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Ubuntu 22.04.3 LTS

Matrix products: default
BLAS/LAPACK: /home/iskraa14/anaconda3/envs/thunder_test/lib/libopenblasp-r0.3.30.so

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=sl_SI.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=sl_SI.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=sl_SI.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=sl_SI.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] thunder_1.1.5 dplyr_1.1.4 readr_2.1.5

loaded via a namespace (and not attached):
[1] Rcpp_1.1.0 withr_3.0.2 crayon_1.5.3 tzdb_0.5.0
[5] R6_2.6.1 lifecycle_1.0.4 magrittr_2.0.3 httr_1.4.7
[9] pillar_1.11.0 vroom_1.6.5 rlang_1.1.6 cli_3.6.5
[13] curl_6.4.0 vctrs_0.6.5 generics_0.1.4 tools_4.1.3
[17] aiRthermo_1.2.2 bit64_4.6.0-1 glue_1.8.0 bit_4.6.0
[21] hms_1.1.3 parallel_4.1.3 compiler_4.1.3 pkgconfig_2.0.3
[25] tidyselect_1.2.1 tibble_3.3.0

I would appreciate any guidance on this issue or if a fix could be considered in future releases.
Thank you for your time.

Best regards,
Andrej Iskra

issue.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions