nces file not found on windows
Installed using conda forge, but any attempt to use nces fails, i.e.
nco = Nco()
local_file1 = "./local_file1.nc" # existing file with "precipitation" variable
local_file2 = "./local_file2.nc" # existing file with "precipitation" variable
local_file3 = "./local_file3.nc" # not an existing file
print(nco.ncks(input=local_file1, options=["-M"]).decode()) # this works fine
nco.nces(input=[local_file1, local_file2], output=local_file3, options=["-y ttl", "-v precipitation"]) # this fails
# [WinError 2] The system cannot find the file specified
Took me a long time to figure out that this is because nces.exe doesn't exist on windows when pynco is installed via conda. However you can create it yourself by making a cope of ncra.exe and renaming it to nces.exe - I can't remember where I found this solution (it was some months ago).
Also, attempting to replace nces with ncra in the python code does not work - the reasons why are beyond me. But clearly the simple solution here is to tweak the conda recipe to include an nces.exe file.
Yes. UNIX uses a symbolic link from nces to the ncra executable. I do not know how to do that in Windows, so your suggestion of just copying ncra.exe to nces.exe is one workaround. You can also invoke nces via ncra.exe by invoking the latter with ncra -Y nces ... (which is not documented because it's confusing). In any case, my Python and Conda skills are sub-par and I would gratefully accept your patches to either/both pynco or the Conda feedstock to accomplish the above.