Comments (8)
i'm glad you checked-in on this. please do not modify ncks.c. the task is to modify the multi-argument (MTA) code that you already wrote. and that is initialized in the rgr, sld, trr routines. we need that routine to handle flags. ncks already does (because getopt() does). but your MTA does not. the hard-coded flags will mostly be for rgr so that nco_rgr_ini() can do the right thing. any hardcoded flags should go there or in the MTA source code.
from nco.
I'm thinking on this way as well. I just read through the ncks.c to understand the mechanism of ncks and saw that these flags had already been hardcoded in
static struct option opt_lng[];
Unfortunately it is static and in main().
Also, seems NCO has different streams of processing on key-value pairs and flags.
Flags are level-1 arguments, which are processed prior to the kv pair (kv pairs are level-2 arguments, because we need at least one flag to let ncks know what are these kv pairs for). These flags had already been picked up by ncks.c way before the nco_rgr_ini() is called -- at the very beginning of the huge infinite loop. If the flags come with rgr, trr or gaa key-value pairs, then where should we pass them to?
from nco.
Yes, NCO has two levels of input processing. Do not concern yourself with the ncks.c front end. The task for you is to allow MTA to parse flags. Put a hard-coded list of flags either in nco_arg_mlt_prs() or in a calling routine like nco_rgr_ini(), whichever seems more elegant/maintainable/extensible.
from nco.
@czender
I mean I'm curious about how to pass the flags, since the flags had already been parsed before nco_rgr_ini() is called in the main loop.
Or the flags can be passed like a key-value pair but with a NULL value?
from nco.
everything will still be passed through rgr_arg into nco_rgr_ini(). ncks.c does not need to be modified. period. trace the code to see what happens now with --rgr arguments.
from nco.
@czender
It may take some extra time since both Valgrind and gdb are down on my Mac due to the OS version. Rebuilding with other versions also failed; it is catastrophic. I need to squeeze my disk so that I can have enough space to set up a Linux virtual machine as a new environment
from nco.
@czender
Here is the list of the rgr/gaa/trr/ppc flags I concluded from the source code. No gaa/ppc/trr flags so far. I will hard code these flags to nco_mta.c so that in the future we can have a place to add/remove and keep track on these flags.
flag | gaa/trr/ppc/rgr |
---|---|
--no_area | rgr |
--no_area_out | rgr |
--cell_measures | rgr |
--cll_msr | rgr |
--no_cell_measures | rgr |
--no_cll_msr | rgr |
--curvilinear | rgr |
--crv | rgr |
--infer | rgr |
--nfr | rgr |
--no_stagger | rgr |
--no_stg | rgr |
from nco.
This patch is in an working in 4.6.7
from nco.
Related Issues (20)
- 60x compression! HOT 16
- ncap2 make_bounds exceeded memory limit HOT 1
- ncatted not honoring pre-existing history global attribute HOT 4
- x10 error margin for the same spell after HOT 6
- Unable to enable UDUNITS, not UDUNITS2 HOT 8
- No man page for ncz2psx HOT 2
- Error trying to concatenate a number of nc files HOT 5
- ncrcat adds erroneous(?) variable attribute HOT 1
- Parallelize compression over chunks? HOT 2
- ncremap pure pressure vertical interpolation does only the first timestep, everything else is zeros HOT 3
- C++17 deletes `std::binary_function`, breaks ncap2, Antlr2 w/ Clang16 HOT 9
- ncap2 ignores "--cmp" when new dimensions are defined HOT 7
- nco fails to build when compiling with "--no-undefined -Wl" as ld flags HOT 1
- Error building NCO 5.1.6 with icc (Intel classic) in nco_rgr.c HOT 1
- Undefined reference when disbaling OpenMP and using the Intel compiler HOT 1
- Support NC_STRING HOT 6
- using ```ncrename``` generates a corruped file HOT 1
- Feature Request: arbitrary suffix for -n
- Need to update "--monotonic" argument for mbtempest HOT 2
- ncremap documentation clarification HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nco.