Git Product home page Git Product logo

Comments (7)

czender avatar czender commented on June 5, 2024

The intent of your ncap2 command is unclear to me. However, I was able to reproduce an issue with ncap2 not compressing new variables. While doing so, I notice that using -L 1 instead of --cmp='dfl' might help. Please LMK if that workaround solves the immediate problem.

Also, var.set_miss(var2d) might be causing problems. set_miss() expects a scalar argument for the missing value, not a 2D array.

from nco.

ocehugo avatar ocehugo commented on June 5, 2024

Hi @czender ,

Thanks for the quick response. The intent is to transform a 2d array into time record 3d using the same data and applying the mask/missing value. I will revert back to using the L flag for ncap2 now and try to fix the fill_missing argument. Spotted the problem when using new filters. I can't trust my memory but I think the fill_missing call was tthe shortest path to have the array properly broadcasted when I coded ages ago.

from nco.

ocehugo avatar ocehugo commented on June 5, 2024

The snippet I typed above was wrong (see edited version now), so I was set/get missing correctly.

Indeed, using old and tried -LN flag will do the compression. However, some burden/overhead by the lacking of that is quite predictable:

...
opts="--cmp 'myfavcompression'"
...
ncks $opts ... a.nc b.nc 
#force -L1 or handroll a flag argument conversion (we don't want that...)
ncap2 -L1 -s ... b.nc c.nc #if we end here, compression is not what I asked for.
ncks $opts ... c.nc d.nc #if we got more on the plate, we have a small read-overhead from reading a larger c.nc

Not the end of the world, but not optimal either. I assume most users somehow inject/force default arguments to all calls, particularly compression.

from nco.

czender avatar czender commented on June 5, 2024

@hmb1 As this thread shows, ncap2 does not support the --cmp option when simultaneously creating new variables (or something like that). I thought I had hooked up the --cmp support in all appropriate ncap2 subroutines but apparently I missed one. Any idea which one? i.e., where does ncap2 call nc_def_var() without an immediately following call to nco_flt_def_*?

from nco.

czender avatar czender commented on June 5, 2024

Okay, nevermind. I think I found the locations that I had missed before. There are two in prs_cls.cc. I'll add this to the TODO list.

from nco.

czender avatar czender commented on June 5, 2024

@ocehugo the latest NCO snapshot includes a fix for the problem you reported. If you can, please test the snapshot and LMK if it works for you. Otherwise it will be in NCO 5.1.6 to be released in a week or two.

from nco.

czender avatar czender commented on June 5, 2024

Please reopen if this does not work for you with NCO 5.1.9

from nco.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.