Skip to content

Conversation

bikegeek
Copy link
Collaborator

@bikegeek bikegeek commented Jan 27, 2022

Pull Request Testing

  • Describe testing already performed for these changes:

    generated all four plots on 'kiowa' and 'seneca'

  • Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:

on 'seneca' and 'kiowa' there is a conda environment: /home/met_test/.conda/envs/feature_170_stratosphere_diag

clone the METcalcpy (develop) and METplotpy (feature_170_stratosphere_diag) repositories

set the PYTHONPATH
$METCALCPY_SOURCE/METcalcpy:$METCALCPY_SOURCE/METcalcpy/metcalcpy:$METPLOTPY_SOURCE/METplotpy:$METPLOTPY_SOURCE/METplotpy/metplotpy

in the $METPLOTPY_SOURCE/METplotpy/metplotpy/contributed/stratosphere_diagnostics/stratosphere_diagnostics.yaml file, replace setting for input_data_path to one of the following:

  on kiowa:
  /d1/projects/METplotpy/METplopty_Data/stratosphere

 on seneca:
 /d1/projects/METplus/METplotpy_Data/stratosphere

and replace the setting for output_data_path to the directory where you want to save the output plots.

Run the plotting code from the $METPLOTPY_SOURCE/METplotpy/metplotpy/contributed/stratosphere_diagnostics directory:

python stratosphere_diagnostics.py stratosphere_diagnostics.yaml

  • You can also copy the stratosphere_diagnostics.yaml file to another directory and run it like the NOAA EMC
    users would have to run it.

You should have four plots created:

zonal_mean_wind_contour.png
zonal_mean_wind_contour

zonal_mean_temperature_contour.png
zonal_mean_temperature_contour

zonal_mean_wind.png
zonal_mean_wind

polar_cap_meridional_mean_temp.png
polar_cap_meridional_mean_temp

  • Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes ] also updated spreadsheet of Python packages

  • Do these changes include sufficient testing updates? Manual testing only. Uses a large netCDF file as sample data

  • Will this PR result in changes to the test suite? [No]

    If yes, describe the new output and/or changes to the existing output:

  • Please complete this pull request review by [Tuesday Feb1].

Pull Request Checklist

See the METplus Workflow for details.

  • Complete the PR definition above.
  • Ensure the PR title matches the feature or bugfix branch name.
  • Define the PR metadata, as permissions allow.
    Select: Reviewer(s)
    Select: Organization level software support Project or Repository level development cycle Project
    Select: Milestone as the version that will include these changes
  • After submitting the PR, select Linked issues with the original issue number.
  • After the PR is approved, merge your changes. If permissions do not allow this, request that the reviewer do the merge.
  • Close the linked issue and delete your feature or bugfix branch from GitHub.

@bikegeek bikegeek added this to the METplotpy-1.1 milestone Jan 27, 2022
@bikegeek bikegeek linked an issue Jan 27, 2022 that may be closed by this pull request
21 tasks
@CPKalb
Copy link
Contributor

CPKalb commented Jan 28, 2022

I'm getting some kind of error, although I'm not using the conda environment, so maybe that's the issue. Does anyone know what this means?

ImportError: Plotting of arrays of cftime.datetime objects or arrays indexed by cftime.datetime objects requires the optional nc-time-axis (v1.2.0 or later) package.

@bikegeek
Copy link
Collaborator Author

bikegeek commented Jan 28, 2022 via email

@bikegeek
Copy link
Collaborator Author

bikegeek commented Jan 28, 2022 via email

@CPKalb
Copy link
Contributor

CPKalb commented Jan 31, 2022 via email

@hankenstein2
Copy link
Contributor

hankenstein2 commented Jan 31, 2022 via email

@bikegeek
Copy link
Collaborator Author

bikegeek commented Feb 1, 2022 via email

@CPKalb
Copy link
Contributor

CPKalb commented Feb 1, 2022

Now it's not finding metcalcpy:

File "stratosphere_diagnostics.py", line 17, in
from metcalcpy.pre_processing.directional_means import meridional_mean
ModuleNotFoundError: No module named 'metcalcpy'

I did a setenv PYTHONPATH $METCALCPY_SOURCE/METcalcpy:$METCALCPY_SOURCE/METcalcpy/metcalcpy:$METPLOTPY_SOURCE/METplotpy:$METPLOTPY_SOURCE/METplotpy/metplotpy

so, I'm not sure why it can't find metcalcpy. It says I'm in a tcsh shell

@bikegeek
Copy link
Collaborator Author

bikegeek commented Feb 1, 2022 via email

@CPKalb
Copy link
Contributor

CPKalb commented Feb 1, 2022

When I try to do the export, I get the following error:

METCALCPY_SOURCE: Undefined variable.

What should METCALCPY_SOURCE be set to?

@bikegeek
Copy link
Collaborator Author

bikegeek commented Feb 1, 2022 via email

@CPKalb
Copy link
Contributor

CPKalb commented Feb 2, 2022

It's not set. I'll point it directly. I actually didn't know exactly what that was specifying

@CPKalb
Copy link
Contributor

CPKalb commented Feb 2, 2022

I'm still getting an import error. I'm not sure why. Does it matter which order I switch to the bash shell and activate the conda environment?

ImportError: Plotting of arrays of cftime.datetime objects or arrays indexed by cftime.datetime objects requires the optional nc-time-axis (v1.2.0 or later) package

@bikegeek
Copy link
Collaborator Author

bikegeek commented Feb 2, 2022 via email

@CPKalb
Copy link
Contributor

CPKalb commented Feb 2, 2022

Finally got it working!

@bikegeek bikegeek merged commit df2de27 into develop Feb 8, 2022
@bikegeek bikegeek deleted the feature_170_stratosphere_diag branch February 8, 2022 18:38
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.

Create Plots for the Stratosphere Diagnostics
3 participants