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

Setup file #104

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 5 additions & 8 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ usage()
echo ""
echo " --help Display this help text"
echo " --prefix=PREFIX Install binary in 'PREFIX/bin'"
echo " Default prefix='\$HOME/.local/bin'"
echo " Default prefix='../../.local/bin'"
echo ""
}

PREFIX="$HOME/.local"
PREFIX="../../.local"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@federicavil what's the reason for this change?


while [ "$1" != "" ]; do
PARAM=$(echo "$1" | awk -F= '{print $1}')
Expand All @@ -26,11 +26,8 @@ while [ "$1" != "" ]; do
exit
;;
-p | --prefix)
PREFIX=$VALUE
;;
*)
echo "ERROR: unknown parameter \"$PARAM\""
usage
PREFIX=$VAChangeMe
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@federicavil this appears to be temporary code? I don't see where VAChangeMe is set.


exit 1
;;
esac
Expand Down Expand Up @@ -79,7 +76,7 @@ if [ $CI = true ]; then
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH"
echo "---------------"
else
PKG_CONFIG_PATH=`realpath "$PREFIX"/lib/pkgconfig`
PKG_CONFIG_PATH="../../.local/bin/pkgconfig"
fi

if [ ! -d $PKG_CONFIG_PATH ]; then
Expand Down
4 changes: 1 addition & 3 deletions src/inference_engine/NetCDF_file_s.f90
Original file line number Diff line number Diff line change
Expand Up @@ -133,22 +133,20 @@ function get_shape(ncid, varname) result(array_shape)
call assert(nf_status == nf90_noerr, "nf90_open(self%file_name_, NF90_NOWRITE, ncid)", &
trim(nf90_strerror(nf_status)) // self%file_name_)
end associate

associate( nf_status => nf90_inq_varid(ncid, varname, varid)) ! get variable's ID
write(varid_string, *) varid
call assert(nf_status == nf90_noerr, "Net_CDF_file_m(input_4D_real): nf90_inq_varid " // trim(nf90_strerror(nf_status)), &
diagnostic_data = "varname '" // varname // "', varid " // trim(adjustl(varid_string)))
end associate

associate(array_shape => get_shape(ncid, varname))

call assert(size(array_shape)==rank(values), "netCDF_file_s(input_4D_real): size(array_shape)==rank(values)", &
intrinsic_array_t([size(array_shape),rank(values)]))
allocate(values(array_shape(1), array_shape(2), array_shape(3), array_shape(4)))
associate( nf_status => nf90_get_var(ncid, varid, values)) ! read data
call assert(nf_status == nf90_noerr, "nf90_get_var(ncid, varid, array)", trim(nf90_strerror(nf_status)))
end associate
end associate

end procedure

module procedure input_3D_real
Expand Down
Loading