E3SM-Project / polaris

Testing and analysis for OMEGA, MPAS-Ocean, MALI and MPAS-Seaice
BSD 3-Clause "New" or "Revised" License
6 stars 13 forks source link

Add planar horizontal viz #33

Closed cbegeman closed 1 year ago

cbegeman commented 1 year ago

This PR ports the plot_horiz_field function from compass/ocean/tests/isomip_plus/viz/__init__.py into a shared viz folder. There are relatively minor changes related to this being used outside plot_horiz_series and making the figure size match the domain aspect ratio. To demonstrate its functionality, it is added to the initial_state step of the baroclinic_channel test case.

Two functions are also needed:

Checklist

cbegeman commented 1 year ago

Testing

I have run the baroclinic_channel/10km/default test case on compy.

Initial temperature

Final normalVelocity (when test is run for 1 day)

cbegeman commented 1 year ago

@xylar You can review the scripts now if you like. I'm sure there are ways that we could make them better, but I think this is a reasonable level of effort given that these are temporary files for the hackathon. Let me know if you feel differently. I haven't added the documentation yet, but will.

cbegeman commented 1 year ago

@xylar I added some text to the developer's guide. I'm not sure whether/how to update the api though when the function is located in polaris/viz/__init__.py. It doesn't appear to recognize polaris.viz as a module

xylar commented 1 year ago

Great! The API needs to be added in an appropriate spot (maybe alphabetically somehow) here https://github.com/E3SM-Project/polaris/blob/main/docs/developers_guide/api.md

xylar commented 1 year ago

I should go after validate and before yaml here: https://github.com/E3SM-Project/polaris/blob/main/docs/developers_guide/api.md?plain=1#L328-L355 Maybe you can fix the second validate, which should be yaml while you're there?

cbegeman commented 1 year ago

@xylar Thanks! That did the trick

cbegeman commented 1 year ago

@xylar Now that the docs are done it is ready to be merged, unless you have more feedback.

xylar commented 1 year ago

@cbegeman, I missed this in my review but it looks like the 2 images you refer to in the docs didn't actually get added. Could you make a quick PR to add them when you get a chance?

xylar commented 1 year ago

Never mind, I just added them in #38. I used the 2 images above. I hope that's what you had in mind.