-
Notifications
You must be signed in to change notification settings - Fork 553
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
ww3_prnc 360_day calendar support #1193
ww3_prnc 360_day calendar support #1193
Conversation
@mickaelaccensi I would appreciate your opinion on the changes to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve the changes, I've added a few comments
Awesome, thanks @ukmo-ccbunney and @mickaelaccensi, I'll proceed with testing! |
Good evening @ukmo-ccbunney, I wanted to let you know before it gets later that I'm processing your PR and I should be able to finish by our COB today. I had a few more test diffs than you found, but I suspect that's just due to our machine differences, and they seem to be all of the type you identified
within the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review
Pass
Testing
Pass
Known non-b4b's and new non-b4b's grouped below. The new non-b4b's can all be attributed to text in ww3_prnc*.out
logs as pointed out in the PR header.
**********************************************************************
********************* non-identical cases ****************************
**********************************************************************
## known non-b4b's
## ---------------
mww3_test_03/./work_PR1_MPI_e (1 files differ)
mww3_test_03/./work_PR3_UQ_MPI_e_c (1 files differ)
mww3_test_03/./work_PR3_UNO_MPI_e (1 files differ)
mww3_test_03/./work_PR2_UNO_MPI_e (1 files differ)
mww3_test_03/./work_PR2_UNO_MPI_d2 (16 files differ)
mww3_test_03/./work_PR1_MPI_d2 (6 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2_c (9 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2_c (15 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2 (11 files differ)
mww3_test_03/./work_PR2_UQ_MPI_d2 (15 files differ)
mww3_test_03/./work_PR3_UQ_MPI_e (1 files differ)
mww3_test_03/./work_PR3_UNO_MPI_e_c (1 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2 (14 files differ)
mww3_test_09/./work_MPI_ASCII (0 files differ)
ww3_tp2.6/./work_ST4_ASCII (0 files differ)
ww3_tp2.10/./work_MPI_OMPH (7 files differ)
ww3_tp2.16/./work_MPI_OMPH (4 files differ)
## new non-b4b's -- verfied all due to ww3_prnc*.out
## -------------------------------------------------
ww3_tic1.4/./work_IC1IS2_1000 (3 files differ)
ww3_tic1.4/./work_IC2IS2_IC2d (3 files differ)
ww3_tic1.4/./work_IC2IS2_IC2b (3 files differ)
ww3_tic1.4/./work_IC0IS2_1000 (3 files differ)
ww3_tp2.14/./work_OASACM6 (1 files differ)
ww3_tp2.15/./work_PR3_UQ_RHO (3 files differ)
ww3_tp2.15/./work_5km (1 files differ)
ww3_tp2.15/./work_PR3_UQ_RHO_MPI (3 files differ)
ww3_tp2.15/./work_ST6FLX5 (3 files differ)
ww3_tp2.15/./work_PR3_UQ (1 files differ)
ww3_tp2.15/./work_MPI_5km (1 files differ)
ww3_tp2.15/./work_PR3_UQ_MPI (1 files differ)
ww3_tp2.15/./work_ST4FLX5 (3 files differ)
ww3_tp2.17/./work_ma (3 files differ)
ww3_tp2.17/./work_a (3 files differ)
ww3_tp2.17/./work_mc1 (3 files differ)
ww3_tp2.17/./work_mb (3 files differ)
ww3_tp2.17/./work_mc (3 files differ)
ww3_tp2.17/./work_ma1 (3 files differ)
ww3_tp2.17/./work_c (3 files differ)
ww3_tp2.17/./work_b (3 files differ)
ww3_tp2.8/./work_PR3_UQ (1 files differ)
ww3_ufs1.1/./work_unstr_b (3 files differ)
ww3_ufs1.1/./work_c_npl (3 files differ)
ww3_ufs1.1/./work_unstr_a (3 files differ)
ww3_ufs1.1/./work_unstr_c (3 files differ)
ww3_ufs1.1/./work_d (3 files differ)
ww3_ufs1.1/./work_c_nth (3 files differ)
ww3_ufs1.1/./work_c (3 files differ)
ww3_ufs1.2/./work_a (3 files differ)
ww3_ufs1.2/./work_l (3 files differ)
ww3_ufs1.2/./work_c (3 files differ)
ww3_ufs1.2/./work_b (3 files differ)
ww3_ufs1.3/./work_a (5 files differ)
**********************************************************************
************************ identical cases *****************************
**********************************************************************
Approved.
Thank you @ukmo-ccbunney, for expanding WW3's calendar support to include "360_day". |
Pull Request Summary
Adds support to
ww3_prnc
for reading netCDF files with times using the "360_day" calendar.Description
Currently,
ww3_prnc
only supports reading netCDF files with times relative to "standard" or "gregorian" calendars even though WW3 itself can run in a "360_day" calendar.This update adds 360_day calendar support in the Julian day calculations in
w3timemd
via subroutinesJ2D
andD2J
.The subroutines now return/receive a pseudo-Julian day as an offset from
1800-01-01 00:00:00
ifCALTYPE .eq. '360_day'
I was in two minds whether to modify the
J2D
andD2J
Julian day routines to handle this as technically the returned value is not related to a Julian day if using a 360_day calendar. It seemed like the most sensible place to make the calculation though with minimal changes elsewhere in the code. However, if preferred I can move these calculations to their own separate routine, e.g.D360_TO_DATE
andDATE_TO_D360
.ww3_prnc
will check that the "calendar attribute in the file matches the expected calendar in CALTYPE (set via theww3_grid
MISC namelist entry) and fail if they are not the same.There are no changes expected in the existing regtests due to this update.
Issue(s) addressed
Commit Message
Adds 360_day calendar support to ww3_prnc
Check list
Testing
Regtest results
Ignoring the usual known non-b4b regtests, the following tests had expected changes
The changes are all due to a small rewording of the warning message about unset calendar attribute: