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

feature 1147 final conf sorting #1152

Merged
merged 41 commits into from
Sep 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
b528471
removed config variable that is no longer used/needed
georgemccabe Sep 8, 2021
d8b41df
cleaned up functions that handle setting CURRENT_[FCST/OBS]_[NAME/LEVEL]
georgemccabe Sep 8, 2021
251193f
clean up
georgemccabe Sep 8, 2021
5a63551
expand path of config argument to run_metplus.py for easier debugging
georgemccabe Sep 8, 2021
a471000
removed redundant logic and added comments
georgemccabe Sep 8, 2021
274a0f3
cleanup
georgemccabe Sep 8, 2021
4d68002
added logic to move config variables that are runtime specific to a […
georgemccabe Sep 8, 2021
e76ea55
changed how config arguments are read so that order that arguments ar…
georgemccabe Sep 8, 2021
bb053c2
minor change to trigger build, ci-run-all-cases
georgemccabe Sep 8, 2021
8afefa5
rearranged logic to save list of config inputs with full paths for ea…
georgemccabe Sep 9, 2021
88456d0
move all config vars that start with LOG or end with BASE to runtime …
georgemccabe Sep 9, 2021
8c40b34
remove vars that start with CURRENT from final conf
georgemccabe Sep 9, 2021
ffb9103
removed confusing logic allowing override of parm base and cleaned up…
georgemccabe Sep 9, 2021
0647857
added METPLUS_PARM_BASE env var logic back
georgemccabe Sep 9, 2021
9df4ed1
added old vs. new default value mismatch info for pb_report_type in P…
georgemccabe Sep 9, 2021
5e76a47
renamed config var name
georgemccabe Sep 9, 2021
4bc42bd
Merge branch 'develop' into feature_1147_sort_final_conf
georgemccabe Sep 10, 2021
b8a39f4
use PARM_BASE instead of METPLUS_BASE/parm since it will still be set
georgemccabe Sep 10, 2021
7fa7e32
use develop version of METviewer docker image (may need to make this …
georgemccabe Sep 14, 2021
971c444
run cyclone plotter use case to test that new conda environment in do…
georgemccabe Sep 15, 2021
a337b80
added dockerfile to copy cartopy shape files into run image if cartop…
georgemccabe Sep 16, 2021
d6c69c4
download script used to download cartopy shape files and run it
georgemccabe Sep 16, 2021
6b11a7b
Merge branch 'feature_1147_sort_final_conf' into feature_1147_sort_fi…
georgemccabe Sep 16, 2021
0644dd2
added copy of conda environment
georgemccabe Sep 16, 2021
9bc4a7f
added logic to download cartopy shape files for metplotpy environment
georgemccabe Sep 16, 2021
202acf1
added cartopy dependency to use cases so the shapefiles are copied in…
georgemccabe Sep 16, 2021
e61971e
trigger 1 use case that uses metplotpy_env to test cartopy shapefiles…
georgemccabe Sep 16, 2021
37209c2
added instructions to create weatherregime environment that was missing
georgemccabe Sep 16, 2021
4a492f7
cleaned up list of packages used
georgemccabe Sep 16, 2021
68a10e6
removed extra use case group used for testing
georgemccabe Sep 16, 2021
d5798b9
Merge branch 'develop' into feature_1147_sort_final_conf
georgemccabe Sep 16, 2021
c0e5691
removed netcdf package from env because it is already installed and v…
georgemccabe Sep 16, 2021
854bbac
added cartopy shapefile copy to use case that needs it
georgemccabe Sep 16, 2021
6f453de
download cartopy shape files for weatherregime python environment bec…
georgemccabe Sep 16, 2021
2eb2e6b
removed debug message that fills up log files with info that is not v…
georgemccabe Sep 21, 2021
23956f8
updated input directories to use _WeatherRegime directory instead of …
georgemccabe Sep 21, 2021
da0a4b9
updated location of input data that was not found in UserScript_fcstG…
georgemccabe Sep 21, 2021
928e9ec
updated readme with info on how to install metplotpy/metcalcpy in con…
georgemccabe Sep 21, 2021
b6072f2
added 3rd group of cartopy shapefiles to download because they are us…
georgemccabe Sep 23, 2021
edfd236
try using cartopy download script from forked repo that has missing s…
georgemccabe Sep 28, 2021
536ce0d
updated input paths to match new data locations
georgemccabe Sep 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/actions/run_tests/Dockerfile.run
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ ARG METPLUS_IMG_TAG=develop
FROM dtcenter/metplus-dev:${METPLUS_IMG_TAG}

COPY --from=env /usr/local/envs /usr/local/envs/

COPY --from=env /usr/local/bin/conda /usr/local/bin/conda
12 changes: 12 additions & 0 deletions .github/actions/run_tests/Dockerfile.run_cartopy
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ARG METPLUS_ENV_TAG=cycloneplotter
ARG METPLUS_IMG_TAG=develop

FROM dtcenter/metplus-envs:${METPLUS_ENV_TAG} as env

ARG METPLUS_IMG_TAG=develop
FROM dtcenter/metplus-dev:${METPLUS_IMG_TAG}

COPY --from=env /usr/local/envs /usr/local/envs/
COPY --from=env /usr/local/bin/conda /usr/local/bin/conda

COPY --from=env /root/.local/share/cartopy /root/.local/share/cartopy/
2 changes: 1 addition & 1 deletion .github/jobs/get_metviewer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
export METVIEWER_DATA=$RUNNER_WORKSPACE
export MYSQL_DIR=$RUNNER_WORKSPACE/mysql
export METVIEWER_DIR=$RUNNER_WORKSPACE/output/metviewer
export METVIEWER_DOCKER_IMAGE=dtcenter/metviewer
export METVIEWER_DOCKER_IMAGE=dtcenter/metviewer:develop

# install docker-compose
apk add docker-compose
Expand Down
2 changes: 2 additions & 0 deletions .github/jobs/setup_and_run_use_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ def main():
dockerfile_name = f'{dockerfile_name}_gempak'
elif 'gfdl' in str(requirements).lower():
dockerfile_name = f'{dockerfile_name}_gfdl'
elif 'cartopy' in str(requirements).lower():
dockerfile_name = f'{dockerfile_name}_cartopy'

docker_build_cmd = (
f"docker build -t {run_tag} "
Expand Down
55 changes: 55 additions & 0 deletions ci/docker/docker_env/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,61 @@ will fail through the script, but it should be installed using pip3 afterwards.
```
./scripts/metplotpy_env.sh metplus_base
/home/met_test/.conda/envs/metplotpy/bin/pip3 install kaleido==0.2.1
/home/met_test/.conda/envs/metplotpy/bin/python3 cartopy_feature_download.py cultural physical
rm cartopy_feature_download.py
```

#### To install METplotpy and METcalcpy packages in environment

```
cd /home/met_test

# git clone not necessary if repo is already available
git clone https://github.com/dtcenter/METplotpy
git clone https://github.com/dtcenter/METcalcpy

cd /home/met_test/METplotpy
git checkout develop
/home/met_test/.conda/envs/metplotpy/bin/pip3 install .

cd /home/met_test/METcalcpy
git checkout develop
/home/met_test/.conda/envs/metplotpy/bin/pip3 install .
```

## weatherregime (from metplotpy_env)

### Docker

```
docker build -t dtcenter/metplus-envs:weatherregime --build-arg BASE_ENV=metplotpy --build-arg ENV_NAME=weatherregime .
docker push dtcenter/metplus-envs:weatherregime
```

### Local

```
./scripts/weatherregime_env.sh metplotpy
/home/met_test/.conda/envs/weatherregime/bin/python3 cartopy_feature_download.py cultural physical
rm cartopy_feature_download.py
```

#### To install METplotpy and METcalcpy packages in environment

```
cd /home/met_test

# git clone not necessary if repo is already available
git clone https://github.com/dtcenter/METplotpy
git clone https://github.com/dtcenter/METcalcpy

cd /home/met_test/METplotpy
git checkout develop
/home/met_test/.conda/envs/weatherregime/bin/pip3 install .

cd /home/met_test/METcalcpy
git checkout develop
/home/met_test/.conda/envs/weatherregime/bin/pip3 install .
```

## cycloneplotter (from metplus_base)
Expand Down
4 changes: 4 additions & 0 deletions ci/docker/docker_env/scripts/cycloneplotter_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ conda create -y --clone ${BASE_ENV} --name ${ENV_NAME}
conda install -y --name ${ENV_NAME} -c conda-forge cartopy==0.17.0
conda install -y --name ${ENV_NAME} -c conda-forge matplotlib==3.3.0
conda install -y --name ${ENV_NAME} -c conda-forge pandas

yum -y install wget
wget https://raw.githubusercontent.com/SciTools/cartopy/master/tools/cartopy_feature_download.py
/usr/local/envs/${ENV_NAME}/bin/python3 cartopy_feature_download.py cultural physical
4 changes: 4 additions & 0 deletions ci/docker/docker_env/scripts/metplotpy_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ conda install -y --name ${ENV_NAME} -c conda-forge xarray==0.17
conda install -y --name ${ENV_NAME} -c conda-forge netcdf4==1.5.6
conda install -y --name ${ENV_NAME} -c conda-forge pyyaml
/usr/local/envs/${ENV_NAME}/bin/pip3 install kaleido==0.2.1

yum -y install wget
wget https://raw.githubusercontent.com/SciTools/cartopy/master/tools/cartopy_feature_download.py
/usr/local/envs/${ENV_NAME}/bin/python3 cartopy_feature_download.py cultural physical
26 changes: 9 additions & 17 deletions ci/docker/docker_env/scripts/weatherregime_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,13 @@

################################################################################
# Environment: weatherregime
# Last Updated: 2021-06-29 ([email protected])
# Last Updated: 2021-09-16 ([email protected])
# Notes: Adds Python packages needed to run weather regime use case
# METplotpy and METcalcpy
# Uses pip to install kaleido because
# could not install via Conda (glibc conflict)
# Python Packages:
# matplotlib==3.3.0
# scipy==1.5.1
# plotly==4.9.0
# pingouin==0.3.8
# cartopy==0.18.0
# eofs==1.3.0
# cmocean==2.0
# xarray==0.17
# netcdf4==1.5.6
# pyyaml==?
# python-kaleido==0.2.1
# All packages from metplotpy_env
# scikit-learn==0.24.2
# eofs==1.4.0
#
# Other Content: None
################################################################################
Expand All @@ -32,7 +22,9 @@ BASE_ENV=$1

conda create -y --clone ${BASE_ENV} --name ${ENV_NAME}
conda install -y --name ${ENV_NAME} -c conda-forge scikit-learn==0.24.2
#conda install -y --name ${ENV_NAME} -c conda-forge scipy==1.5.4
conda install -y --name ${ENV_NAME} -c conda-forge eofs==1.4.0
conda install -y --name ${ENV_NAME} -c conda-forge netcdf4==1.5.7
#conda install -y --name ${ENV_NAME} -c conda-forge numpy==1.19.5

rm cartopy_feature_download.py
yum -y install wget
wget https://raw.githubusercontent.com/georgemccabe/cartopy/master/tools/cartopy_feature_download.py
/usr/local/envs/${ENV_NAME}/bin/python3 cartopy_feature_download.py cultural physical cultural-extra
11 changes: 11 additions & 0 deletions docs/Users_Guide/systemconfiguration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2282,6 +2282,17 @@ time_summary.step and time_summary.width
| | | :term:`PB2NC_TIME_SUMMARY_WIDTH` = 3600 |
+------------------+-------------------------------------------+

pb_report_type
^^^^^^^^^^^^^^

+------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| Old (Incorrect): | pb_report_type = [ 120, 220, 221, 122, 222, 223, 224, 133, 233, 188, 288, 180, 280, 181, 182, 281, 282, 183, 284, 187, 287 ]; |
+------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| New (Correct): | pb_report_type = []; |
+------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| METplus Config: | :term:`PB2NC_PB_REPORT_TYPE` = 120, 220, 221, 122, 222, 223, 224, 133, 233, 188, 288, 180, 280, 181, 182, 281, 282, 183, 284, 187, 287 |
+------------------+----------------------------------------------------------------------------------------------------------------------------------------+

PointStatConfig
---------------

Expand Down
16 changes: 8 additions & 8 deletions internal_tests/use_cases/all_use_cases.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Category: met_tool_wrapper
0::CyclonePlotter::met_tool_wrapper/CyclonePlotter/CyclonePlotter.conf,user_env_vars.MET_PYTHON_EXE=python3:: cycloneplotter_env
0::CyclonePlotter::met_tool_wrapper/CyclonePlotter/CyclonePlotter.conf,user_env_vars.MET_PYTHON_EXE=python3:: cycloneplotter_env,cartopy
1::PCPCombine_python_embedding:: met_tool_wrapper/PCPCombine/PCPCombine_python_embedding.conf:: h5py_env,py_embed
2::ASCII2NC:: met_tool_wrapper/ASCII2NC/ASCII2NC.conf
3::met_tool_wrapper/ASCII2NC/ASCII2NC_python_embedding.conf
Expand Down Expand Up @@ -117,16 +117,16 @@ Category: precipitation

Category: s2s
0::GridStat_SeriesAnalysis_fcstNMME_obsCPC_seasonal_forecast:: model_applications/s2s/GridStat_SeriesAnalysis_fcstNMME_obsCPC_seasonal_forecast.conf:: netcdf4_env
1::UserScript_fcstGFS_obsERA_Blocking:: model_applications/s2s/UserScript_fcstGFS_obsERA_Blocking.conf:: metplotpy_env,metplus
2::UserScript_obsERA_obsOnly_Blocking:: model_applications/s2s/UserScript_obsERA_obsOnly_Blocking.conf:: metplotpy_env,metplus
3::UserScript_obsERA_obsOnly_WeatherRegime:: model_applications/s2s/UserScript_obsERA_obsOnly_WeatherRegime.conf:: weatherregime_env,metplus
4::TCGen_fcstGFSO_obsBDECKS_GDF_TDF:: model_applications/s2s/TCGen_fcstGFSO_obsBDECKS_GDF_TDF.conf:: metplotpy_env,metplus
5::UserScript_obsPrecip_obsOnly_Hovmoeller:: model_applications/s2s/UserScript_obsPrecip_obsOnly_Hovmoeller.conf:: metplotpy_env
1::UserScript_fcstGFS_obsERA_Blocking:: model_applications/s2s/UserScript_fcstGFS_obsERA_Blocking.conf:: metplotpy_env,cartopy,metplus
2::UserScript_obsERA_obsOnly_Blocking:: model_applications/s2s/UserScript_obsERA_obsOnly_Blocking.conf:: metplotpy_env,cartopy,metplus
3::UserScript_obsERA_obsOnly_WeatherRegime:: model_applications/s2s/UserScript_obsERA_obsOnly_WeatherRegime.conf:: weatherregime_env,cartopy,metplus
4::TCGen_fcstGFSO_obsBDECKS_GDF_TDF:: model_applications/s2s/TCGen_fcstGFSO_obsBDECKS_GDF_TDF.conf:: metplotpy_env,cartopy,metplus
5::UserScript_obsPrecip_obsOnly_Hovmoeller:: model_applications/s2s/UserScript_obsPrecip_obsOnly_Hovmoeller.conf:: metplotpy_env,cartopy
6:: UserScript_obsPrecip_obsOnly_CrossSpectraPlot:: model_applications/s2s/UserScript_obsPrecip_obsOnly_CrossSpectraPlot.conf:: spacetime_env
7:: UserScript_fcstGFS_obsERA_PhaseDiagram:: model_applications/s2s/UserScript_fcstGFS_obsERA_PhaseDiagram.conf:: spacetime_env
8:: UserScript_fcstGFS_obsERA_OMI:: model_applications/s2s/UserScript_fcstGFS_obsERA_OMI.conf:: spacetime_env, metdatadb
9:: UserScript_fcstGFS_obsERA_RMM:: model_applications/s2s/UserScript_fcstGFS_obsERA_RMM.conf:: spacetime_env, metdatadb
10::UserScript_fcstGFS_obsERA_WeatherRegime:: model_applications/s2s/UserScript_fcstGFS_obsERA_WeatherRegime.conf:: weatherregime_env,metplus
10::UserScript_fcstGFS_obsERA_WeatherRegime:: model_applications/s2s/UserScript_fcstGFS_obsERA_WeatherRegime.conf:: weatherregime_env,cartopy,metplus

Category: space_weather
0::GridStat_fcstGloTEC_obsGloTEC_vx7:: model_applications/space_weather/GridStat_fcstGloTEC_obsGloTEC_vx7.conf
Expand All @@ -135,6 +135,6 @@ Category: space_weather

Category: tc_and_extra_tc
0::TCRMW_fcstGFS_fcstOnly_gonzalo:: model_applications/tc_and_extra_tc/TCRMW_fcstGFS_fcstOnly_gonzalo.conf
1::CyclonePlotter_fcstGFS_obsGFS_OPC:: model_applications/tc_and_extra_tc/CyclonePlotter_fcstGFS_obsGFS_OPC.conf:: cycloneplotter_env
1::CyclonePlotter_fcstGFS_obsGFS_OPC:: model_applications/tc_and_extra_tc/CyclonePlotter_fcstGFS_obsGFS_OPC.conf:: cycloneplotter_env,cartopy
2::UserScript_ASCII2NC_PointStat_fcstHAFS_obsFRD_NetCDF:: model_applications/tc_and_extra_tc/UserScript_ASCII2NC_PointStat_fcstHAFS_obsFRD_NetCDF.conf,model_applications/tc_and_extra_tc/UserScript_ASCII2NC_PointStat_fcstHAFS_obsFRD_NetCDF/ci_overrides.conf
3::GridStat_fcstHAFS_obsTDR_NetCDF:: model_applications/tc_and_extra_tc/GridStat_fcstHAFS_obsTDR_NetCDF.conf:: py_embed
Loading