-
Notifications
You must be signed in to change notification settings - Fork 66
Move landice
conda package scripts
#596
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
Move landice
conda package scripts
#596
Conversation
@matthewhoffman, @trhille and @hollyhan, I'd like to discuss this with you when there's time (but not tonight -- I'm busy unfortunately). We would have to make corresponding changes in Compass before this gets released, but I don't think that will be hard. I've tried to be careful about the formatting and linting changes I made but it's a lot of code so mistakes are hard to rule out completely. |
f0b8c5a
to
58681c9
Compare
0cbc62d
to
af4e9cf
Compare
@trhille and @matthewhoffman, I'm getting to a point where it would be quite helpful to make progress on this. There are several updates and fixes needed for the next MPAS-Tools release, and this change is a necessary first step. |
@xylar , sorry for letting this sit so long. We'll address this early next week when Trevor is in town. |
TestingUsing #596 rebased onto
|
af4e9cf
to
701c8d9
Compare
@matthewhoffman (and @trhille), I have made the suggested changes -- removing most of the stub scripts and moving |
@trhille, @matthewhoffman, just checking in on this. Anything I can do to help? |
@xylar, so sorry for the delay on this. I'm going to work on the remaining tests today. |
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.
Approved based on testing. Most of the mesh creation testing was done prior to the force push from f4e9cf to 701c8d9, but I re-ran the Thwaites mesh generation to make sure that didn't break anything. For the ismip6_forcing and ismip6_run tests I used the Thwaites_2to10km mesh in the $CFS/fanssie/MALI_projects/thwaites_convergence
directory. I confirmed that relevant fields in forcing files were identical to those created previously for the Thwaites mesh convergence runs, and hist, ctrlAE, and expAE03 experiments were all set up and run successfully (only ran for a 30-minute debug job).
This testing also applies to MPAS-Dev/compass#881.
Thanks so much @trhille! @matthewhoffman and @hollyhan, let me know if you'd like to review or if you're happy to leave this to @trhille. I'll assume we're good if I don't hear anything by the end of the week. |
mesh_tools/create_SCRIP_files/create_SCRIP_file_from_planar_rectangular_grid.py
Outdated
Show resolved
Hide resolved
701c8d9
to
f141c04
Compare
9a94f28
to
40897f6
Compare
Clean up a little bit for PEP8. Leave a stub in the location of the original script that calls the entry point in the conda package.
The contents of the script have been moved into the `mpas_tools` package and cleaned up for PEP8 formatting. The original script is now a stub that calls the entry point, similar to `create_SCRIP_file_from_MPAS_mesh.py`.
The contents of the script have been moved into the `mpas_tools` package and cleaned up for PEP8 formatting. The original script is now a stub that calls the entry point.
The contents of the script have been moved into the `mpas_tools` package and cleaned up for PEP8 formatting. The sphere_radius is also now taken from CIME constants The original script is now a stub that calls the entry point.
The contents of the script have been moved into the `mpas_tools` package and cleaned up for PEP8 formatting. The original script `define_cullMask.py` is now a stub that calls the entry point.
The contents of the script have been moved into the `mpas_tools` package and cleaned up for PEP8 formatting. The original script `interpolate_to_mpasli_grid.py` is now a stub that calls the entry point.
The contents of the script have been moved into the `mpas_tools` package and cleaned up for PEP8 formatting. The original script `mark_domain_boundaries_dirichlet.py` is now a stub that calls the entry point.
Folks can use the conda package.
40897f6
to
10fdec8
Compare
Okay, thanks @matthewhoffman and @trhille! Merging this. |
This merge aims to move 8 scrips used primarily or exclusively by MALI into the
mpas_tools
package as entry points.The motivation for this is that we are engaging in Python package modernization on all MPAS-Dev and E3SM-Project repos, and in that process we discovered that modern packaging approaches do not support standalone scripts as the old approach did.
I have moved most of the code from the 8 scripts into modules within
mpas_tools
. They are inside of functions, as required for entry points into a Python package, in all cases. The original scripts are preserved as stubs that call the entry points.The entry points cannot have the same names as the original scripts: the
.py
extention is not allowed. I have also dropped capitalization, since changes are being made in any case.While I have been fine with standalone scripts using loose Python code styles, code in the
mpas_tools
should conform to PEP8 to the extent feasible. Therefore, most of the changes I have made here are related to updating the 8 scripts to be close to PEP8 compliant.