Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IASI_SND_02_V11 pad in flexible variables to match locations. #15

Open
lupemba opened this issue Mar 10, 2025 · 0 comments
Open

IASI_SND_02_V11 pad in flexible variables to match locations. #15

lupemba opened this issue Mar 10, 2025 · 0 comments

Comments

@lupemba
Copy link
Member

lupemba commented Mar 10, 2025

The current padding of retrieved profiles in IASI_SND_02_V11 does not match with the variable storing the geolocation.

E.g. the variable "co_cp_air" second dimension is just padded in the end to a common size for the product. The length of the dimension does not always match the number of observations in a scanline (also the second dimension of the location variable "earth_location".

Potential fix could be to change the padding. Here is a small demonstration.

ds_iasi_l2 = MetopDataset("IASI_SND_02_M03_20250120105357Z_20250120123253Z_N_O_20250120123416Z.nat");

n_profiles_retrieved = Int(ds_iasi_l2["co_nbr"][1])
qflags = ds_iasi_l2["co_qflag"][:,1]
co_cp_air_obs1 = ds_iasi_l2["co_cp_air"][:,:,1]

@assert sum(qflags .!= 0) == n_profiles_retrieved

improved_co_cp_air_obs1 = typeof(co_cp_air_obs1)(undef,size(co_cp_air_obs1)[1], length(qflags))  
improved_co_cp_air_obs1 .= missing 

improved_co_cp_air_obs1[:, qflags .!= 0] .= co_cp_air_obs1[:,1:n_profiles_retrieved ]

improved_co_cp_air_obs1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant