Skip to content

Commit

Permalink
Develop branch: Update module files to source READMEs in ufs-srweath…
Browse files Browse the repository at this point in the history
…er-app and change HALO_BLEND default value back to 10. (#357)

* Changes to source README files from ufs-srweather-app and load the local module files separately

* Fix path to README files

* Fix paths for README files

* Add module header to all .local module files and modify the load module script.

* Source README file from ufs-srweather-app instead of fv3 module file from ufs-weather-model

* Change HALO_BLEND default to 10 in config_defaults.sh

* Fix post module file (source from ufs-srweather-app)

* Source README files without copying them to regional_workflow.  Add compiler user-defined variable.

* Modify get_extrn* modules files to be local like others.  Modify load_modules_run_task.sh script to remove previous syntax, only load local files after sourcing the README files.

* Only allow lower-case compiler options

* Modify default compiler variable to be lower-case.  Change valid_param_vals.sh settings for compiler variable.

* Remove check on user-defined compiler value.

* Add compiler variable to setup.sh

* Make the COMPILER variable capital letters in the load script, remove it from the setup.sh since it's unnecessary.

* Remove indentations and add comments.
  • Loading branch information
JeffBeck-NOAA authored Nov 6, 2020
1 parent 7842489 commit 08c8805
Show file tree
Hide file tree
Showing 46 changed files with 173 additions and 137 deletions.
16 changes: 0 additions & 16 deletions modulefiles/cheyenne.default

This file was deleted.

2 changes: 1 addition & 1 deletion modulefiles/tasks/cheyenne/make_grid.local
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#%Module
if [module-info mode load] {
system "ncar_pylib /glade/p/ral/jntp/UFS_CAM/ncar_pylib_20200427"
}
Expand Down
2 changes: 1 addition & 1 deletion modulefiles/tasks/cheyenne/make_ics.local
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#%Module
if [module-info mode load] {
system "ncar_pylib /glade/p/ral/jntp/UFS_CAM/ncar_pylib_20200427"
}
Expand Down
2 changes: 1 addition & 1 deletion modulefiles/tasks/cheyenne/make_lbcs.local
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#%Module
if [module-info mode load] {
system "ncar_pylib /glade/p/ral/jntp/UFS_CAM/ncar_pylib_20200427"
}
Expand Down
2 changes: 1 addition & 1 deletion modulefiles/tasks/cheyenne/run_fcst.local
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#%Module
if [module-info mode load] {
system "ncar_pylib /glade/p/ral/jntp/UFS_CAM/ncar_pylib_20200427"
}
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion modulefiles/tasks/hera/make_grid.local
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#%Module
module use -a /contrib/miniconda3/modulefiles
module load miniconda3
if [module-info mode load] {
Expand Down
2 changes: 1 addition & 1 deletion modulefiles/tasks/hera/make_ics.local
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#%Module
module use -a /contrib/miniconda3/modulefiles
module load miniconda3
if [module-info mode load] {
Expand Down
2 changes: 1 addition & 1 deletion modulefiles/tasks/hera/make_lbcs.local
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#%Module
module use -a /contrib/miniconda3/modulefiles
module load miniconda3
if [module-info mode load] {
Expand Down
1 change: 1 addition & 0 deletions modulefiles/tasks/hera/run_fcst.local
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#%Module
module use -a /contrib/miniconda3/modulefiles
module load miniconda3
if [module-info mode load] {
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion modulefiles/tasks/jet/make_grid.local
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#%Module
module use -a /contrib/miniconda3/modulefiles
module load miniconda3
if [module-info mode load] {
Expand Down
1 change: 1 addition & 0 deletions modulefiles/tasks/jet/make_ics.local
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#%Module
module load wgrib2/2.0.8

module use -a /contrib/miniconda3/modulefiles
Expand Down
1 change: 1 addition & 0 deletions modulefiles/tasks/jet/make_lbcs.local
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#%Module
module load wgrib2/2.0.8

module use -a /contrib/miniconda3/modulefiles
Expand Down
1 change: 1 addition & 0 deletions modulefiles/tasks/jet/run_fcst.local
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#%Module
module use -a /contrib/miniconda3/modulefiles
module load miniconda3
if [module-info mode load] {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions modulefiles/tasks/orion/make_grid.local
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#%Module
module use -a /apps/contrib/miniconda3-noaa-gsl/modulefiles
module load miniconda3
if [module-info mode load] {
Expand Down
1 change: 1 addition & 0 deletions modulefiles/tasks/orion/make_ics.local
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#%Module
module use -a /apps/contrib/miniconda3-noaa-gsl/modulefiles
module load miniconda3
if [module-info mode load] {
Expand Down
1 change: 1 addition & 0 deletions modulefiles/tasks/orion/make_lbcs.local
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#%Module
module use -a /apps/contrib/miniconda3-noaa-gsl/modulefiles
module load miniconda3
if [module-info mode load] {
Expand Down
1 change: 1 addition & 0 deletions modulefiles/tasks/orion/run_fcst.local
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#%Module
module use -a /apps/contrib/miniconda3-noaa-gsl/modulefiles
module load miniconda3
if [module-info mode load] {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions modulefiles/tasks/wcoss_cray/make_grid.local
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#%Module
module load modules

module load xt-lsfhpc
Expand Down
1 change: 1 addition & 0 deletions modulefiles/tasks/wcoss_cray/make_ics.local
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#%Module
module load modules

module load xt-lsfhpc
Expand Down
1 change: 1 addition & 0 deletions modulefiles/tasks/wcoss_cray/make_lbcs.local
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#%Module
module load modules

module load xt-lsfhpc
Expand Down
1 change: 1 addition & 0 deletions modulefiles/tasks/wcoss_cray/run_fcst.local
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#%Module
module unload python/2.7.14
module load python/3.6.3
1 change: 1 addition & 0 deletions modulefiles/tasks/wcoss_cray/run_post.local
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#%Module
module load modules

module load xt-lsfhpc
Expand Down
1 change: 1 addition & 0 deletions modulefiles/tasks/wcoss_dell_p3/make_grid.local
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#%Module
module load lsf/10.1
module load python/3.6.3
1 change: 1 addition & 0 deletions modulefiles/tasks/wcoss_dell_p3/make_ics.local
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#%Module
module load lsf/10.1
module load python/3.6.3
1 change: 1 addition & 0 deletions modulefiles/tasks/wcoss_dell_p3/make_lbcs.local
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#%Module
module load lsf/10.1
module load python/3.6.3
1 change: 1 addition & 0 deletions modulefiles/tasks/wcoss_dell_p3/run_fcst.local
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#%Module
module unload python/2.7.14
module load python/3.6.3
1 change: 1 addition & 0 deletions modulefiles/tasks/wcoss_dell_p3/run_post.local
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#%Module
module load lsf/10.1
12 changes: 11 additions & 1 deletion ush/config_defaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@ USE_ZMTNBLCK="false"
#
#-----------------------------------------------------------------------
#
HALO_BLEND=0
HALO_BLEND=10
#
#-----------------------------------------------------------------------
#
Expand All @@ -1262,8 +1262,18 @@ HALO_BLEND=0
# Name of file located in FVCOM_DIR that has FVCOM data interpolated to
# FV3-LAM grid. This file will be copied later to a new location and name
# changed to fvcom.nc
#
#------------------------------------------------------------------------
#
USE_FVCOM="FALSE"
FVCOM_DIR="/user/defined/dir/to/fvcom/data"
FVCOM_FILE="fvcom.nc"
#
#-----------------------------------------------------------------------
#
# COMPILER:
# Type of compiler invoked during the build step.
#
#------------------------------------------------------------------------
#
COMPILER="intel"
75 changes: 38 additions & 37 deletions ush/generate_FV3LAM_wflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -330,54 +330,55 @@ done
#
#-----------------------------------------------------------------------
#
# For select workflow tasks, copy module files from the various cloned
# external repositories to the appropriate subdirectory under the workflow
# directory tree. In principle, this is better than having hard-coded
# module files for tasks because the copied module files will always be
# up-to-date. However, it does require that these module files in the
# external repositories be coded correctly, e.g. that they really be lua
# module files and not contain any shell commands (like "export SOME_VARIABLE").
# For select workflow tasks, copy the system-specific environment and
# module settings README file from the ufs-srweather-app repository to
# the appropriate subdirectory under the workflow directory tree. In
# principle, sourcing this file is better than having hard-coded module
# files for tasks because the copied module files will always be
# up-to-date.
#
#-----------------------------------------------------------------------
#
machine=${MACHINE,,}
#machine=${MACHINE,,}

cd_vrfy "${MODULES_DIR}/tasks/$machine"
#cd_vrfy "${MODULES_DIR}/tasks/$machine"

cp_vrfy -f "${UFS_UTILS_DIR}/modulefiles/build.$machine" "${MAKE_GRID_TN}"
cp_vrfy -f "${UFS_UTILS_DIR}/modulefiles/build.$machine" "${MAKE_OROG_TN}"
cp_vrfy -f "${UFS_UTILS_DIR}/modulefiles/build.$machine" "${MAKE_SFC_CLIMO_TN}"
cp_vrfy -f "${UFS_UTILS_DIR}/modulefiles/build.$machine" "${MAKE_ICS_TN}"
cp_vrfy -f "${UFS_UTILS_DIR}/modulefiles/build.$machine" "${MAKE_LBCS_TN}"
if [ $MACHINE = "WCOSS_CRAY" -o $MACHINE = "WCOSS_DELL_P3" ] ; then
cp_vrfy -f "${UFS_WTHR_MDL_DIR}/modulefiles/$machine/fv3" "${RUN_FCST_TN}"
else
cp_vrfy -f "${UFS_WTHR_MDL_DIR}/modulefiles/$machine.intel/fv3" "${RUN_FCST_TN}"
fi
#cp_vrfy -f "${SR_WX_APP_TOP_DIR}/docs/README_${machine}_intel.txt" "${MAKE_GRID_TN}"
#cp_vrfy -f "${SR_WX_APP_TOP_DIR}/docs/README_${machine}_intel.txt" "${MAKE_OROG_TN}"
#cp_vrfy -f "${SR_WX_APP_TOP_DIR}/docs/README_${machine}_intel.txt" "${MAKE_SFC_CLIMO_TN}"
#cp_vrfy -f "${SR_WX_APP_TOP_DIR}/docs/README_${machine}_intel.txt" "${MAKE_ICS_TN}"
#cp_vrfy -f "${SR_WX_APP_TOP_DIR}/docs/README_${machine}_intel.txt" "${MAKE_LBCS_TN}"
#if [ $MACHINE = "WCOSS_CRAY" -o $MACHINE = "WCOSS_DELL_P3" ] ; then
# cp_vrfy -f "${UFS_WTHR_MDL_DIR}/modulefiles/${machine}/fv3" "${RUN_FCST_TN}"
#else
# cp_vrfy -f "${UFS_WTHR_MDL_DIR}/modulefiles/${machine}.intel/fv3" "${RUN_FCST_TN}"
#fi
#cp_vrfy -f "${SR_WX_APP_TOP_DIR}/docs/README_${machine}_intel.txt" "${RUN_FCST_TN}"

task_names=( "${MAKE_GRID_TN}" "${MAKE_OROG_TN}" "${MAKE_SFC_CLIMO_TN}" "${MAKE_ICS_TN}" "${MAKE_LBCS_TN}" "${RUN_FCST_TN}" )
#
# Only some platforms build EMC_post using modules, and some machines
# require a different EMC_post modulefile name.
#
if [ "${MACHINE}" = "CHEYENNE" ]; then
print_info_msg "No post modulefile needed for ${MACHINE}"
elif [ "${MACHINE}" = "WCOSS_CRAY" ]; then
cp_vrfy -f "${EMC_POST_DIR}/modulefiles/post/v8.0.0-cray-intel" "${RUN_POST_TN}"
task_names+=("${RUN_POST_TN}")
else
cp_vrfy -f "${EMC_POST_DIR}/modulefiles/post/v8.0.0-$machine" "${RUN_POST_TN}"
task_names+=("${RUN_POST_TN}")
fi

for task in "${task_names[@]}"; do
modulefile_local="${task}.local"
if [ -f ${modulefile_local} ]; then
cat "${modulefile_local}" >> "${task}"
fi
done

cd_vrfy -
#if [ "${MACHINE}" = "CHEYENNE" ]; then
# print_info_msg "No post modulefile needed for ${MACHINE}"
#elif [ "${MACHINE}" = "WCOSS_CRAY" ]; then
# cp_vrfy -f "${EMC_POST_DIR}/modulefiles/post/v8.0.0-cray-intel" "${RUN_POST_TN}"
# cp_vrfy -f "${SR_WX_APP_TOP_DIR}/docs/README_${machine}_intel.txt" "${RUN_POST_TN}"
# task_names+=("${RUN_POST_TN}")
#else
# cp_vrfy -f "${SR_WX_APP_TOP_DIR}/docs/README_${machine}_intel.txt" "${RUN_POST_TN}"
# task_names+=("${RUN_POST_TN}")
#fi

#for task in "${task_names[@]}"; do
# modulefile_local="${task}.local"
# if [ -f ${modulefile_local} ]; then
# cat "${modulefile_local}" >> "${task}"
# fi
#done

#cd_vrfy -
#
#-----------------------------------------------------------------------
#
Expand Down
Loading

0 comments on commit 08c8805

Please sign in to comment.