diff --git a/templates/real-from-dwd-ana/prepare_date_local.sh b/templates/real-from-dwd-ana/prepare_date_local.sh
index bd06efb427a795ff430a33eeb953698204b04bae..847394668b3259d8028715b440c6ba4b7fec07eb 100644
--- a/templates/real-from-dwd-ana/prepare_date_local.sh
+++ b/templates/real-from-dwd-ana/prepare_date_local.sh
@@ -6,6 +6,9 @@ if [ "${IS_LOCAL}" == "True" ]; then
   # Get some variables provided by autosubmit.
   WORKDIR=%HPCROOTDIR%
   STARTDATE=%SDATE%
+  HPCUSER=%HPCUSER%
+  HPCHOST=%HPCHOST%
+
   # Define date directory, create it and go there
   COMMON_DATE_FOLDER=${WORKDIR}/${STARTDATE}/inidata
 
diff --git a/templates/real-from-dwd-ana/prepare_date_remote.sh b/templates/real-from-dwd-ana/prepare_date_remote.sh
index 2d6809bbbaac6a5e42c2b421a59ccaa56231d652..3e9e8e10c49265b1fb2e74025ad682f6563e95ec 100644
--- a/templates/real-from-dwd-ana/prepare_date_remote.sh
+++ b/templates/real-from-dwd-ana/prepare_date_remote.sh
@@ -6,6 +6,8 @@ if [ "${IS_LOCAL}" == "0" ]; then
   # Get some variables provided by autosubmit.
   WORKDIR=%HPCROOTDIR%
   STARTDATE=%SDATE%
+  HPCUSER=%HPCUSER%
+  HPCHOST=%HPCHOST%
   # Define date directory, create it and go there
   COMMON_DATE_FOLDER=${WORKDIR}/${STARTDATE}/inidata