<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Exact solution used in MES runs
We would like to MES the implementation of cauchy boundary conditions on the opposite side of the sheath enterance
For a field $f$, we have
$$
f(0) = a\
\partial_z f\big|_0 = b
$$
Step1:  Initialize
Step2:  Define the variables
Step3:  Plot
Step4:  Print the variables in BOUT++ format
<ASSISTANT_TASK:>
Python Code:
%matplotlib notebook
from sympy import init_printing
from sympy import S
from sympy import sin, cos, tanh, exp, pi, sqrt, log
from boutdata.mms import x, y, z, t
from boutdata.mms import DDX
import os, sys
# If we add to sys.path, then it must be an absolute path
common_dir = os.path.abspath('./../../../../common')
# Sys path is a list of system paths
sys.path.append(common_dir)
from CELMAPy.MES import make_plot, BOUT_print
init_printing()
Explanation: Exact solution used in MES runs
We would like to MES the implementation of cauchy boundary conditions on the opposite side of the sheath enterance
For a field $f$, we have
$$
f(0) = a\
\partial_z f\big|_0 = b
$$
End of explanation
folder = '../gaussianWSinAndParabola/'
Explanation: Initialize
End of explanation
# Initialization
the_vars = {}
# We need Lx
from boututils.options import BOUTOptions
myOpts = BOUTOptions(folder)
Lx = eval(myOpts.geom['Lx'])
Ly = eval(myOpts.geom['Ly'])
# Gaussian with sinus and parabola
# The skew sinus
# In cartesian coordinates we would like a sinus with with a wave-vector in the direction
# 45 degrees with respect to the first quadrant. This can be achieved with a wave vector
# k = [1/sqrt(2), 1/sqrt(2)]
# sin((1/sqrt(2))*(x + y))
# We would like 2 nodes, so we may write
# sin((1/sqrt(2))*(x + y)*(2*pi/(2*Lx)))
# The gaussian
# In cartesian coordinates we would like
# f = exp(-(1/(2*w^2))*((x-x0)^2 + (y-y0)^2))
# A parabola
# In cartesian coordinates, we have
# ((x-x0)/Lx)^2
wx = 0.5*Lx
wy = 0.5*Ly
x0 = 0.3*Lx
y0 = 0.5*Ly
the_vars['f'] = sin((1/sqrt(2))*(x + y)*(2*pi/(2*Lx)))*\
                exp(-(((x-x0)**2/(2*wx**2)) + ((y-y0)**2/(2*wy**2))))*\
                ((x-x0)/Lx)**2
        
the_vars['a'] = the_vars['f'].subs(y, 0)
the_vars['b'] = the_vars['f'].diff(y).subs(y, 0)
Explanation: Define the variables
End of explanation
make_plot(folder=folder, the_vars=the_vars, plot2d=True, include_aux=False, direction='y')
Explanation: Plot
End of explanation
BOUT_print(the_vars, rational=False)
Explanation: Print the variables in BOUT++ format
End of explanation
<END_TASK>