Re: [netcdfgroup] ncap2 cannot find file

  • Subject: Re: [netcdfgroup] ncap2 cannot find file
  • From: Sourish Basu <Sourish.Basu@xxxxxxxxxxxx>
  • Date: Mon, 25 Mar 2019 15:27:30 -0600
  • Autocrypt: addr=Sourish.Basu@xxxxxxxxxxxx; prefer-encrypt=mutual; keydata= mQINBFZ40gQBEADvGCqRa5XGgaROg6TYUieMAh5GDTy6lclqxdKqu4oYSROUFYkEuT4tOHpV 4k6Ruhg1EYXMl0siTQ4VsTcvaFBR3RLKiOdRxsh4jPVrZI1TWJPJRWlvNg5iPXczTkH3diyA 2Pp4CBNfpw/M5uUHMgfL/A+1AAT0ciMUq9eR5U8bcjvfemg6Js/+tsNOwyHGlZEEXOrod/eb NrqOB1FA0WFHvEkFgJ1Ed/g3ulu0ylel0HoC/rCv0pU/PX+wNqucQbk00xjOw8ts02keX2z+ LQumHPWfSNrQpPh5u4L6XLAcc0RjEig6WkwHJQtjdEIoI+TNXtrDdQ09yrOg1dgQwz/kgnp4 oLBLjs2K3XMymsSorPCcInAoG3kchRadsmv69WX+YxIWPJaKOVrNs5K7Jf0nX9cyGe5Q1XuW 8sbk7IGKux9sy0S9HaYqU/w6HUhGl85522ogCeyZ7xnZoKuPthHGOBULsS8YD7BqYrxgNwnA JsDgefkSqLUiKixie/Tb8V/dSDpFfXEm6/ixNPm6iXZAza8ZVreQqQ3gs44VIHZi1c0qHtC0 kP2dx3IujfkdeUL3g2m84GMHmeG5Q207P50rqWk0kPzHRu5xMDQYICQ4wJwaEo69oM776sQ7 YxRXmFqzo2UX45rTVoq5xaOS0NRFteN4lJDB35911h5El46l+QARAQABtChTb3VyaXNoIEJh c3UgPFNvdXJpc2guQmFzdUBjb2xvcmFkby5lZHU+iQI4BBMBAgAiBQJWeNrBAhsjBgsJCAcD AgYVCAIJCgsEFgIDAQIeAQIXgAAKCRDdna2p+Lv9IC5NEADjZ9A1SZWzlN/trUcRIL9Vt2xZ oesJDGbv24gXUTbe7O0aSB6EfQCCBS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lftXYsnQ5dsJGXOVhnf5IE+xzWnP/W5qTuDswlV8ZJ4OjT +KiZkePhirXiKLObcwpODZ97VCE0O1DHOWNfuvg6aQd97FHo51wRs2CI5SBa2xbpEhbwKu3p Py11Lkn0NQ/3qPrnKOs4bxb5nn+mUGkLMeQLantWmnWF8r7WxELkf+06jYliG6LTdCmVld6r PqW8E6/KQaZJXjRcbJ01b80IilyFCE9l2uA+ZgVieCHWHFuQ28+yNscvJVEAEQEAAYkCHwQY AQIACQUCVnjSBAIbDAAKCRDdna2p+Lv9IPQUEACPYzMYudTbWC9w615+fpW6kZdWXRByGCqJ G8fM2zkADi521ZH3nzWzdOjAxXZ94ujEUuNMeEBDlk4lmmb1i4jstyRWf5FJBqbGM52PiPMn 5mcI8GzIayvYMugDCoyMH1WGEI3lmQbIAr7kkyjLDbhTa74YmMvzgtmHRgDSHqHqAKCrBKde HqkvxEFu8clL50KRsUm45RU4BOupbzHnw2zxzhEmK1PJaJ5WqCMSX4icftGlkWNEJq3KmmSf JPmIO48ACXneslTzF3hRTslEreAHYvQJprYZDj3Cr1ttftCcrhs7L4Fz64BhYBoye+j78z4A 8EFbaWzGuZt1SRBvd8a2qiq9kj8g2FzzxqXsCluILwN9GNPZbYY2aXPemZcbbUYtqEA4yTRs vVvd68NXxIINTfXDlAYHr1DcCHvwqr+oZuG+J70zl1vVxjCl6BvdsG6VdMM0ag6RGhuRms81 EQj1oyFg3EBFJoJ/6vXV0rTTs+Yw6DsaFlNrM/xnGUf1hD5uh7utRyYfGpLssdJQzn/dVsRU iUPL5w35WZ/za2VJIs7Mv6f9DmxaRd6FrtCmc1GoXYspcj95ytrcFHKi+MviOUkhuEnOz/tB odfNf7h8Mkb5mVHONfWrFdIyF2ZqngD+Lx2YgITXdakyBq9WOFwGoyHblqQbO4PKxD38b7av /A==
Ah, ok. I will close the bug report. Any idea why ncap2 cannot write
into an existing netcdf-4 file? Adding variables to an existing file is
a rather nice functionality!

On 3/25/19 3:22 PM, Dave Allured - NOAA Affiliate wrote:
> Sourish,
>
> It turns out this is merely a usage problem.  Your original ncap2
> command is missing an output file name, where one is required in this
> scenario.  Ncap2 is not allowed to add a new variable to the input
> file, if the format is netcdf4.  Please see the third paragraph in
> ncap2 documentation on line.
>
> I was misled by inaccurate error messages from your older version of
> ncap2.  Sorry about the extra noise about alternate causes.  It is
> ironic that the latest ncap2 version 4.7.9 on my system gives a
> perfect diagnosis:
>
> > ncap2 -L 6 -4 -h -A -sncap2 -L 6 -4 -h -A -s
> 'co2_flux_natural=3Dbio_flux_opt+fire_flux_imp+ocn_flux_opt'
> guineapig.nc
> <http://secure-web.cisco.com/10RlVLKLa7G956P7rbaD_dY1gBsiFnKg6fENIGjYr5pP2AdhDv4CF1nXLXqvu49OknGXL4CP8noBos5kefl_M3EZ1jg8A8fZzV5I1wa18xe_3aKf_1wx6zmp_6xVr2Wddg8qiEvPy341j7gecmiNgQtXz_CbdqjKIarLXLIRsCfz_mh0qB_VMgYWV7D-sQC1VbXkJybsTwdslLOETmKFiTmYf1QuqEn-143Wx78yzRYbHrmKUZVhxm69W-uAsfnro576aZvJeBEbequ9BudKgBEAvJNkKE6xNGC2bKAFttejq7R8BPRFlNvmGNTHDwL5hD6H3KCHxnBzYH52UMI-QrplAwYHF6914-urhLIndTG-LNxtzw_k-pQFAGEl1i6J9QEKgXinQdHaOC00UVSPZb-LWQZKui2eUKXaABWxwhhNt-9ggnUEAhit18niHb_8q/http%3A%2F%2Fguineapig.nc>
>
>
> ncap2: ERROR No output file specified with netCDF4 input file. When no
> output file is specified, ncap2 tries to write directly to the input
> file but this can only work with netCDF3 not netCDF4 input files.
> Please specify an output file distinct from the input file and re-try.
>
> I think you can close the NCO bug report.
>
> --Dave
>
>
> On Mon, Mar 25, 2019 at 2:48 PM Sourish Basu
> <Sourish.Basu@xxxxxxxxxxxx <mailto:Sourish.Basu@xxxxxxxxxxxx>> wrote:
>
>     Charlie,
>
>     I've narrowed down the exact problem. It seems that ncap2 can
>     append to
>     an uncompressed file, or write a compressed variable to a new
>     file, but
>     cannot append to a file with compressed variables. I've filed a bug
>     report with details at https://sourceforge.net/p/nco/bugs/111/.
>
>     -Sourish
>
>     On 3/25/19 8:31 AM, Charlie Zender wrote:
>     > Souresh,
>     >
>     > See http://nco.sf.net#help for NCO issues.
>     >
>     > FWIW, this command works fine for me with your file:
>     >
>     > ncap2 -L 6 -4 -h -A -s
>     > 'co2_flux_natural=bio_flux_opt+fire_flux_imp+ocn_flux_opt'
>     > guineapig.nc
>     
> <http://secure-web.cisco.com/10RlVLKLa7G956P7rbaD_dY1gBsiFnKg6fENIGjYr5pP2AdhDv4CF1nXLXqvu49OknGXL4CP8noBos5kefl_M3EZ1jg8A8fZzV5I1wa18xe_3aKf_1wx6zmp_6xVr2Wddg8qiEvPy341j7gecmiNgQtXz_CbdqjKIarLXLIRsCfz_mh0qB_VMgYWV7D-sQC1VbXkJybsTwdslLOETmKFiTmYf1QuqEn-143Wx78yzRYbHrmKUZVhxm69W-uAsfnro576aZvJeBEbequ9BudKgBEAvJNkKE6xNGC2bKAFttejq7R8BPRFlNvmGNTHDwL5hD6H3KCHxnBzYH52UMI-QrplAwYHF6914-urhLIndTG-LNxtzw_k-pQFAGEl1i6J9QEKgXinQdHaOC00UVSPZb-LWQZKui2eUKXaABWxwhhNt-9ggnUEAhit18niHb_8q/http%3A%2F%2Fguineapig.nc>
>     foo.nc
>     
> <http://secure-web.cisco.com/1I1txVKr87Y-cESVTbOceougUk_I-uEvchMq-XjuTgkzLVkmNmHRdBXGUcWIBI-l3vueaCg0QfsTmctDAWMyOl7amZZVLVAsrBkxB-tEdQ7GziH7ruBuo0DdBK_eiTkrNlec4xZZP5GuP1k4E6Ow64OcipXTJvxPS_uIOggvo1dZJbFcB89x9X2_5kcFrKQWkNqTcwryaUiFYY4_DCXRhBdBpDFfuCT0QdWYsjBl6a_fCoTh3tpJXpmLrSH0w0vgEHeP1GtbfhdJ6ANQYie5qhbu12YMFHl-0XSBdNYmSu2ugeW8b85X-g4Cs1EUpBmxT1SemO1shx1QlIvIwQpu-wNQnTlIq7tH3fZ6USWlt-cr9ixcMDFTW1QfBJ1z4SOBOgSi4xL--SmDu9aBdZ5H2rgSDGvF7gNkUWpuXDY32q-oSEUWzuHR06c9m72Wuu2lc/http%3A%2F%2Ffoo.nc>
>     >
>     > The -A is superfluous, and perhaps you omitted the output filename.
>     > If not, please move this thread to the site above.
>     >
>     > Charlie
>

Attachment: signature.asc
Description: OpenPGP digital signature

  • 2019 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: