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

New adf updates #286

Merged
merged 4 commits into from
Mar 5, 2024
Merged

Conversation

justin-richling
Copy link
Collaborator

Generalize load dataset

Make load_dataset function in plotting_functions.py that replaces _load_dataset function in various plotting scripts.
Now all plotting scripts will call this function from plotting_functions.py to get datasets.

Website

In adf_web.py, add a list of defualt plot types and loop over any additional plot types. The point of this is to show all plot types on the landing page (index.html) and grey out any unavailable types. This will keep the main page consistent as well as always showing potential ADF plot types.

Also in adf_web.py, the check for mean_diag html file existence is removed. The reasoning is if a certain plot type (ie LatLon) is created from separate plotting scripts, it will only produce the plots from the last instance on the webpage.

In template_index.html there is code now that will grey out any unavailable plot types.

Tape Recorder

Currently there is a bug that is not producing the correct html plot page for the tape recorder. The plot name and web object has been updated to reflect the variable Q specifically in the case a different variable is desired for this plot in the future, like temperature, etc.

Make `load_dataset` function in `plotting_functions.py` that replaces `_load_dataset` function in various plotting scripts.

show all plot types on the landing page (`index.html`) and grey out any unavailable types.

Currently there is a bug that is not producing the correct html plot page for the tape recorder.
@nusbaume nusbaume added code clean-up Made code simpler and/or easier to read. website Having to do with the generated website labels Feb 24, 2024
Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

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

Very nice cleanup! Just had a few questions/requests.

@justin-richling
Copy link
Collaborator Author

@nusbaume I think I got these taken care of. Let me know if you see or think of anything else. Thanks!

# Available ADF Default Plot Types
#+++++++++++++

default_ptypes: ["Tables","LatLon","LatLon_Vector","Zonal","Meridonal",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Typo here:

Suggested change
default_ptypes: ["Tables","LatLon","LatLon_Vector","Zonal","Meridonal",
default_ptypes: ["Tables","LatLon","LatLon_Vector","Zonal","Meridional",

lib/adf_web.py Outdated
@@ -653,8 +656,7 @@ def jinja_list(seas_list):
#Check if the mean plot type page exists for this case:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I might change this comment too given that we aren't actually checking if the plot type page exists anymore.

Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

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

Looks good! Just had a couple of final suggestions (but I don't need to re-review).

@justin-richling justin-richling merged commit eccd282 into NCAR:main Mar 5, 2024
7 checks passed
@justin-richling justin-richling deleted the new-adf-updates branch March 5, 2024 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code clean-up Made code simpler and/or easier to read. website Having to do with the generated website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants