My goal is to use NDSolve to solve the complex pde $F(z,t)$ with complex derivative $\partial_{z}=\frac{1}{2}(\partial_{x}-i \partial_{y}).$ The equation can be solved by DSolve:
pde = I*D[F[z, t], t] -z*D[F[z, t], z] == 0
sol = DSolve[pde, F[z, t], {z, t}]
pde = I*D[F[z, t], t] -z*D[F[z, t], z] == 0
sol = DSolve[{pde, F[z, 0] == Exp[z]}, F[z, t], {z, t}]
One can see the solution is $F(z,t)=e^{-e^{it}z}$.
In the future, however, I will have more complicated cases on which DSolve may fail, so I want to solve it using NDSolve as well. I change $z=x+iy$ and implement the complex derivative, but it fails and the function looks incorrect:

I think this is because I didn't specify the boundary conditions for the grid, but how can I know it? I expected that the condition $F(x,y,0)=F(z,0)=e^{z}$ would have been enough, as it was for DSolve.
How can solve this issue?

zbyx + I y? If you do need to make this substitution, writeFasF[x + I y, t]`. – bbgodfrey Jun 15 '22 at 01:48F[x,y,0}, try solvingNDSolve[{pde, F[z, 0] == Exp[z]}, F[z, t], {z, -4, 4}, {t, 0, 2}]. You need to specify boundary conditions inxand perhaps also add artificial viscosity. By the way, is the equation you ultimately wish to solve also first order? – bbgodfrey Jun 15 '22 at 15:46NDSolve[…]to the question. If you're having difficulty in formating it, see this post: https://mathematica.meta.stackexchange.com/a/1585/1871 2. "I expected that the condition $F(x,y,0)=F(z,0)=e^z$ would have been enough, as it was forDSolve." That's because inDSolvethe i.c. is defined in the whole domain, but that's not the case forNDSolve. Observe the output of e.g.DSolve[{pde, F[z, 0] == Piecewise[{{Exp[z], -1 < Re@z < 1 && -1 < Im@z < 1}}, unknown]}, F, {z, t}]and think about why. 3. Can you add some background info of the problem?