-
Notifications
You must be signed in to change notification settings - Fork 31
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
add ozone sonder plot based on 'develop aircraft' branch #252
Conversation
delete BEIMING names
delete Beiming names
delete print function
delete print out functions
@colin-harkins @rschwant @zmoon could you please give a review on this? and I am continuing update some new features on this branch. for example (aggregate plot & density scatter plot) |
add scatter plot
add scatter plot ozone sonder
make more user friendly
make more user friendly
update series and scatter plot
update series and scatter plot
@zmoon and @btang1 is it possible to have this pull request just be a PR to the develop branch with only the changes you made Beiming to add the ozonesonde analysis & plots? When I look at the changed files to do the review, it includes all the files from the entire old develop_aircraft branch, which makes it hard to review? Also can you update the code to resolve the conflicts in the driver.py file. |
@@ -1257,6 +1301,8 @@ def plotting(self): | |||
from .plots import satplots as splots,savefig | |||
else: | |||
from .plots import surfplots as splots, savefig | |||
from .plots import aircraftplots as airplots |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rschwant seems like this line is necessary for aircraft plots to work, though it wasn't in develop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, it got deleted with one of the satellite updates. Thanks for noticing this.
2d202e8
to
ff35d42
Compare
@rschwant should be easier to review this now |
Sorry for the obsolete code with aircraft, this is done at a very early age. Thanks zach for carrying me~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job, this is looking really good! And it's great to have this capability added. I added some comments to make the code cleaner and also to use the functionality already available in the surface plots for providing the ozone min and max values and also for providing the model color types. It would be best to not have these namelist options be different for each plot as this is confusing to users. Let me know if you have questions. The part that Zach noted where the aircraft plots accidentally got deleted needs to be fixed this week because all the aircraft plots are broken now in develop. If you can address these comments this week, then it can go in with this PR. But if not no problem, I can submit a separate PR for this problem too.
thanks @rschwant I will try to address the changes (very helpful) and have a test run. I will let you know the results. if it works, I will update the PR. and then we can merge it. |
c819908
to
a4dab17
Compare
@rschwant we have an example now but only in YAML (runs with |
Great yes that sounds good. Feel free to upload more UFS-AQM data too. I just wanted to limit it so that we would use less space. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job addressing my comments so far!
I just have a question about setting up a jupyter notebook to connect your example to the ReadTheDocs completely.
See these here:
https://github.com/NOAA-CSL/MELODIES-MONET/tree/develop/docs/examples
Is there a missing commit maybe for this?
And then in your yaml file you comment out the code for an aggregate_plot_os, but since this is not available yet in the code can you just delete these lines instead just for clarity. Also the first line of the yaml file is missing a G in General.
Thanks, and we can talk about this in our upcoming meeting too!
I'm trying to use this branch for stratospheric ozone and keep running into problems resulting from the model data being on pressure levels with a 1-D coordinate variable for model pressure. Is this an expected use-case, and am I missing something simple? |
hope that helps. and by the way, what observation data and model data you used? |
Post-processed GFS O3MR 1-degree grib2 files for model data: my specific example is from my own run, but the operational output and the archive data here with inventory here should be close. I ran it through noaa-oar-arl/fv3grib2nc4, tried to follow examples for the configuration file, and ran into errors relating to Obs data is 100m SPO ozonesonde files from the GML archive |
em. I think this could be the problem. I the ozone sonder code we use 3D pressure variable for vertical interpolation. so the pressure variable we define in yaml file is 3D (lat, lon, vertical). our pressure is directly come from UFS-AQM from dyn.f* files. and if in your output file's pressure is 1-D I guess that could be the reason that yaml did not recognize it. you mention using noaa-oar-arl/fv3grib2nc4 I wonder if it extract only 1D pressure or 3D pressure. |
That script seems to be a wrapper around From your description, the solution would seem to be adding a variable |
yes. let is try that. and the pressure variable horizontal dimension need to match model horizontal dimension, try to see if that works. |
Okay, will try adding something like this to fv3grib2nc4 and run again data = xr.open_dataset(out_file)
pressure_model, o3mr = xr.broadcast(data.coords["plevel"], data["O3MR"].isel(time=0))
pressure_model.name = "pressure_model"
pressure_model.to_netcdf(out_file, mode="a") Thanks for the ideas |
Any updates? is adding 3d pressure working for your case? |
3D pressure got the axes in the wrong order, so the vertical interpolation failed. I'm going to check whether renaming the current pressure coordinate EDIT: Renaming EDIT2: Told it to stop trying to interpolate |
- combined files with two times (so that time interp can work) - two model runs
some tweaks to things including adding the second model
Yes, I can approve this. @zmoon do you know why the docs are failing now? I think this is independent of the changes here. |
@rschwant there was a bug, which the CI caught for us, I think I've fixed it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, glad the CI found the bug. Already very useful! This is approved! Glad this is getting into the tool.
I have added paired ozone sonder, and 2 plots (vertical time series & vertical boxplot) for ozone sonder.
this branch is based on 'develop aircraft branch'