Skip to content

Conversation

@L12D2
Copy link
Contributor

@L12D2 L12D2 commented Jul 14, 2025

Official pull request for all added meteorological capabilities.

Liam Thompson and others added 30 commits May 29, 2025 13:29
…ed wdir handling for all datasets, added instructions for extended download times.
…d spfh. Added additional stuff for uploading sonde examples to read the docs
@L12D2
Copy link
Contributor Author

L12D2 commented Jul 22, 2025

Just talked to Liam about moving the Boundary Layer Height and Tropopause calculations out of the code right now as they are not quite ready for version 1.1 that I want to release later this summer. But instead these will remain on a branch on his fork and when I find someone to work on these capabilities more we can pull them in, which will include talking to some of the code developers of the algorithms we are using and making sure we give them appropriate recognition. Will aim to add this for version 2.0. I'll create an issue for this.

tropocalc and the blh calc have been taken out of the next push

@L12D2 L12D2 closed this Jul 22, 2025
@L12D2 L12D2 reopened this Jul 22, 2025
@L12D2
Copy link
Contributor Author

L12D2 commented Jul 22, 2025

Did not mean to close that!

@L12D2
Copy link
Contributor Author

L12D2 commented Jul 24, 2025

Morning, I overrode the remote changes for the mio.model stuff. At least for my branch, and to keep it working for now, those have to stay. There is an odd bug with Maggie's fork and the from monetio import models makes it work.

This sounds to me like an __init__.py error. However. I do not think that we should simply ignore it. Do you need it inside every if statement or adding it in the top would suffice? That would be a weird bug elsewhere, and also diverges from PEP8 in a way that is not that easy to justify in this case. I'm not a PEP8 fanatic, and the driver is full of non compliant code anyway, but I think we should be more or less conscious of when we diverge from it.
We had been talking about ordering the code (running black, isort, etc.), and I would try to make new code as consistent as possible.
EDIT: Fix typo

We would definitely need to probably talk more with Becky and Maggie. I honestly am not that in tune with computers, yet.

Created a copy of this branch (develop_with_mio). So once we are ready to finalize the PR, these can be committed.

@L12D2
Copy link
Contributor Author

L12D2 commented Jul 30, 2025

@rschwant Something that I think will fix the observations exceeding the model top:

paired_data = paired_data.dropna(subset=mod_vars)

I think this can go in line 1407 of the driver.py file

                # Ensure 'pressure_model' is included in ds_model (checked it exists)
                #if 'pressure_model' not in ds_model:
                 #   raise KeyError("'pressure_model' is missing in the model dataset")   #qzr++
                
                paired_data = vert_interp(ds_model,obs.obj,keys+mod_vars)
                print('After pairing: ', paired_data)
                paired_data = paired_data.dropna(subset=mod_vars) 

One of the reviewers happened to be familiar with the MELODIES-MONET code structure, and I think this was the "easy fix" she was suggesting.

@rschwant
Copy link
Collaborator

@rschwant Something that I think will fix the observations exceeding the model top:

paired_data = paired_data.dropna(subset=mod_vars)

I think this can go in line 1407 of the driver.py file

                # Ensure 'pressure_model' is included in ds_model (checked it exists)
                #if 'pressure_model' not in ds_model:
                 #   raise KeyError("'pressure_model' is missing in the model dataset")   #qzr++
                
                paired_data = vert_interp(ds_model,obs.obj,keys+mod_vars)
                print('After pairing: ', paired_data)
                paired_data = paired_data.dropna(subset=mod_vars) 

One of the reviewers happened to be familiar with the MELODIES-MONET code structure, and I think this was the "easy fix" she was suggesting.

Thanks I will take a look. I didn't have time to review this more this week, but will look at this closely over the next 2 weeks and let you know how it goes.

mconst = None
ttest_ind = None
uniform_filter1d = None
Annotator = None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably a stupid question on my part, do you really need to import all of this here? Or are they used mostly inside of the tool you created? I only see Annotator being called here, but I might just be missing it.

windrose = None
WindroseAxes = None


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably a stupid question on my part, do you really need to import all of this here? Or are they used mostly inside of the tool you created? I only see Annotator being called here, but I might just be missing it.

@blychs
Copy link
Collaborator

blychs commented Aug 26, 2025

I am quite happy with the way this is looking, as long as it doesn't break anything when the new optional libraries are not present.

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

Successfully merging this pull request may close these issues.

3 participants