-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mppnccombine needs update to use the input format by default #319
Comments
@HansVahlenkamp, as the original and most recent mppnccombine maintainer, could you fix this? Thank you! |
Hi @HansVahlenkamp, any update on this issue? 😁 |
Distracted with some other issues that needed attention. Will work on this next next week. |
@HansVahlenkamp, got it. I'll pester you next week then :) |
@HansVahlenkamp , when you update mppnccombine, please come up with 3 clear test cases to show that the fix is good. @underwoo volunteered to convert your documented test cases to unit tests, but he needs the 3 clear input files to do this. Thank you! (and PS, I'll be pestering you too! we really need this update next week) Test case 1: Netcdf-3 (not 64-bit) input: output should be Netcdf-3 64-bit Test case 2: Netcdf-3 (64-bit) input: output should be Netcdf-3 64-bit Test case 3: Netcdf-4 input: Netcdf-4 output |
@HansVahlenkamp, just checking, any updates? |
@mlee03 I'm working on it this week and hope to have an updated version by next week... Starting with version 2.2, there were significant structural changes done to the code by another author. The first step is reviewing those changes compared to the last version that I wrote. Also, my NetCDF test input files are quite old at this point and I could use some new ones (which are not too large) that represent all three of the test cases described by @ceblanton. Do you have any available? |
@HansVahlenkamp I'm sure your old test files are OK but I'll dig up some new ones. |
@HansVahlenkamp here are some distributed files on gaea, in the 3 formats:
|
Hi @HansVahlenkamp, any chance the PR can be made in the next couple of days? |
@mlee03 Hopefully done in the next couple of days. |
@HansVahlenkamp, I'm back! Any updates? Is it OK if you open up a draft PR as a placeholder? |
@mlee03 It turns out to be a bit more complicated than originally thought. The code creates the output file with a particular format before any of the input files are read. So, some code restructuring is needed to make this flexible based upon the format of the first input file. I'm currently testing some ideas for this restructuring. I was also investigating some other cleanup of the code, but that probably should wait until another time to minimize any further delays in resolving the main issue. |
That sounds like a lot of work. @ceblanton, is this PR still urgent? |
@mlee03 It's not too bad really; I can see what needs to be done. I'll make a separate PR at another time for non-essential cleanup of the code. |
Ok, sounds good then. Thank you Hans! |
Discovered that the new mppnccombine causes one failure when running "make check": ... It looks like Test21 needs to be updated to compensate for the new mppnccombine behavior. |
The updated mppnccombine succeeds with all of those test input files. Do you have any more complex multi-dimensional input files for testing, particularly netCDF-4 using the classic model? The "Test case 3" input files are standard netCDF-4, not using the classic model. mppnccombine only outputs netCDF-4 using the classic model. |
I have a test for this already. I pushed it to my PR (#322). Look in
tests/mppnccombine/input-output-kinds. Once #326 is merged, I will remove
the `skip_` line from the test.
…--
Seth Underwood
S/W Development Process Lead
Modeling Systems Group
GFDL/NOAA/DOC
201 Forrestal Road
Princeton, NJ 08540-6649
(609) 452-5847 Office
(609) 676-5240 Cell
(609) 987-5063 Fax
***@***.***
On Fri, Dec 6, 2024 at 1:47 PM HansVahlenkamp ***@***.***> wrote:
@HansVahlenkamp <https://github.com/HansVahlenkamp> , when you update
mppnccombine, please come up with 3 clear test cases to show that the fix
is good.
@underwoo <https://github.com/underwoo> volunteered to convert your
documented test cases to unit tests, but he needs the 3 clear input files
to do this.
Thank you! (and PS, I'll be pestering you too! we really need this update
next week)
Test case 1: Netcdf-3 (not 64-bit) input: output should be Netcdf-3 64-bit
Test case 2: Netcdf-3 (64-bit) input: output should be Netcdf-3 64-bit
Test case 3: Netcdf-4 input: Netcdf-4 output
The updated mppnccombine succeeds with all of those test input files. Do
you have any more complex multi-dimensional input files for testing,
particularly netCDF-4 using the classic model? The "Test case 3" input
files are standard netCDF-4, not using the classic model. mppnccombine only
outputs netCDF-4 using the classic model.
—
Reply to this email directly, view it on GitHub
<#319 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADJUS2VXDUDWV2FFHKWRLD2EHWMXAVCNFSM6AAAAABQNMZ7VGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRTHE2DIOBQGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Describe the bug
mppnccombine supports Netcdf-3 classic, Netcdf-3 64-bit offset, and Netcdf-4 input file and output file formats.
The FRE team believed that if you specify the output format (i.e. -64 or -n4), then the tool will use the format. Otherwise, it should use the input format.
Unfortunately, this is not how the tool works. How it works is: If you specify the output format (-64 or -n4), then the tool will use that format (Netcdf-3 64-bit offset and Netcdf-4 classic). But if the output format is not specified, then the default is Netcdf-3 classic.
To Reproduce
Find some test input files and convert them so both Netcdf-4 and Netcdf-3 64-bit offset are available.
Run mppncombine without specifying the output format, and observe the behavior.
In both cases, the tool chooses the never-desired Netcdf-3 classic format.
(use
ncdump -k
to see the file type)Expected behavior
When the input files are either Netcdf-3 64-bit offset or regular Netcdf-3, and no output format is specified, then the output format should be Netcdf-3 64-bit offset.
When the input files are Netcdf-4 and no output format is specified, then the output format should be Netcdf-4.
System Environment
any
Additional context
Add any other context about the problem. If applicable, include where any files
that help describe, or reproduce the problem exist.
The text was updated successfully, but these errors were encountered: