Skip to content

Commit

Permalink
Add comment and clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
mathomp4 committed Aug 8, 2023
1 parent dccf5e4 commit f58ccf2
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions scripts/fv3_setup
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,16 @@ set GEOSDIR = $GEOSDEF
# Singularity Sandbox
#######################################################################

# This section is to determine if we are running in a Singularity
# sandbox by looking for the .singularity.d directory. If we are,
# then we set the SINGULARITY_SANDBOX environment variable to the
# path to the sandbox. If we are not, then we set it to an empty
# string.
#
# We also set the REAL_BIND_PATH environment variable. This is used
# to set the bind paths for Singularity runs. REAL_BIND_PATH is the
# physical path to the NOBACKUP directory

setenv KEYFILE ".singularity.d"
setenv singstat 0
setenv ORIGPATH `pwd -P`
Expand All @@ -625,32 +635,25 @@ while ($singstat == 0)
endif
endif
end

if ($singstat == 1) then
setenv SINGULARITY_SANDBOX $SINGPATH
else
setenv SINGULARITY_SANDBOX ""
endif
setenv REAL_BIND_PATH `realpath $NOBACKUP`

cd $ORIGPATH

setenv REAL_BIND_PATH `realpath $NOBACKUP`

if ($singstat == 1) then
set USING_SINGULARITY = TRUE
set SINGULARITY_BUILD = ""
set NATIVE_BUILD = "#DELETE"
else
set USING_SINGULARITY = FALSE
endif
setenv SINGULARITY_SANDBOX ""
setenv REAL_BIND_PATH ""

if ( $USING_SINGULARITY == FALSE ) then
# Set a couple variables for sed'ing out bits of the run script
set USING_SINGULARITY = FALSE
set SINGULARITY_BUILD = "#DELETE"
set NATIVE_BUILD = ""
else
# Set a couple variables for sed'ing out bits of the run script
set SINGULARITY_BUILD = ""
set NATIVE_BUILD = "#DELETE"
endif

cd $ORIGPATH

#
# GEOSBIN does point to the bin/ directory in each
#
Expand Down

0 comments on commit f58ccf2

Please sign in to comment.