NCAR / container-dtc-nwp

End-to-end NWP systems in containers.
https://dtcenter.org/community-code/numerical-weather-prediction-nwp-containers
28 stars 13 forks source link

Changed to run_python.ksh to account for shapefiles moving under /data. #60

Closed michelleharrold closed 2 years ago

michelleharrold commented 2 years ago

This PR fixes #56. A weblink that hosts shapefile data is currently non-responsive, so the Python plotting does not work unless the user already has the shapefiles downloaded. The proposed solution is to provide the shapefile data similar to how we provide WPS geog, CRTM, model initialization, and observation data. Modifications have been made to /scripts/common/run_python.ksh to account for the shapefiles being housed under /data (instead of /scripts/common/python/shapefiles).

This is only a minor change to the actual repo, but it will also result in needing to:

1) Change the Python run commands for each case (e.g., for Sandy) to account for mounting in the data: docker run --rm -it -e LOCAL_USER_ID=id -u $USER \ -v ${PROJ_DIR}/container-dtc-nwp/components/scripts/common:/home/scripts/common \ -v ${PROJ_DIR}/container-dtc-nwp/components/scripts/sandy_20121027:/home/scripts/case \ -v ${PROJ_DIR}/container-dtc-nwp/data/shapefiles:/home/data/shapefiles \ -v ${CASE_DIR}/postprd:/home/postprd -v ${CASE_DIR}/pythonprd:/home/pythonprd \ --name run-sandy-python dtcenter/python:3.5 /home/scripts/common/run_python.ksh

2) Update the static/initialization download instructions and provide the tar file with necessary shapefiles.

I tested this with dtcenter/python:3.5 on my local Mac for the sandy case. As a note, depending on the order of operations of when issues are addressed and PRs are made, issue 55 proposes moving the /data directory outside of container-dtc-nwp, which would affect the volume mounting in the example above.

fossell commented 2 years ago

@michelleharrold - I think this is higher priority and should be merged first. The other PR is just a reorg and can wait until other functionality show stoppers are complete.

fossell commented 2 years ago

@michelleharrold - The proposed mods look good to me, simple. I trust your testing, did you want others to test as well or just code review?

michelleharrold commented 2 years ago

@fossell - I think in this case a code review is just fine! Thanks for giving it a look so quickly.

I will merge it tomorrow, and then I will update the necessary info on the tutorial to make sure it works as intended.