Skip to content
This repository has been archived by the owner on Oct 23, 2020. It is now read-only.

Commit

Permalink
In order to force an update of the WRF physics tables to the correcte…
Browse files Browse the repository at this point in the history
…d version of

the RRTMG_LW_DATA.DBL file, modify the checkout_data_files.sh script to look for
tables compatible with MPAS-Atmosphere version 2.1.
  • Loading branch information
mgduda committed Jun 4, 2014
1 parent 12d13eb commit a8b6191
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions src/core_atmosphere/physics/checkout_data_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,39 @@
# If none of the methods used in this script are successful in acquiring the
# tables, please attempt to manually download the files from the MPAS-Data
# repository at https://github.com/MPAS-Dev/MPAS-Data/. All *.TBL and *DATA*
# files, as well as the VERSION file, should be copied into a subdirectory
# named src/core_atmosphere/physics/physics_wrf/files before continuing
# the build process.
# files, as well as the COMPATIBILITY file, should be copied into
# a subdirectory named src/core_atmosphere/physics/physics_wrf/files before
# continuing the build process.
#
# If all else fails, please contact the MPAS-A developers
# via "[email protected]".
#
################################################################################

if [ -s physics_wrf/files/VERSION ]; then
vers=`cat physics_wrf/files/VERSION`
if [ "$vers" = "2.0" ]; then
echo "*** WRF physics tables appear to already exist; no need to obtain them again ***"
mpas_vers="2.1"

if [ -s physics_wrf/files/COMPATIBILITY ]; then

compatible=0

compat=`cat physics_wrf/files/COMPATIBILITY | grep -v "#"`
for ver in $compat; do
if [ "$ver" = "$mpas_vers" ]; then
compatible=1
fi
done

if [ $compatible -eq 1 ]; then
echo "*** Compatible versions of WRF physics tables appear to already exist; no need to obtain them again ***"
exit 0
else
echo "*** WRF physics tables appear to be out of date; downloading the latest version ***"
echo "*** Existing WRF physics tables appear to be incompatible with MPAS v$mpas_vers; downloading the latest tables ***"
fi

else

echo "*** No compatible version of WRF physics tables found; downloading the latest tables ***"

fi


Expand Down

0 comments on commit a8b6191

Please sign in to comment.