Skip to content
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 does not handle 360 day calendars #1175

Closed
ukmo-ccbunney opened this issue Jan 17, 2024 · 0 comments · Fixed by #1193
Closed

WW3_PRNC does not handle 360 day calendars #1175

ukmo-ccbunney opened this issue Jan 17, 2024 · 0 comments · Fixed by #1193
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@ukmo-ccbunney
Copy link
Collaborator

Describe the bug
WW3 can be run using a 360 day (climate) calendar where each month has an equal number of days (30).
However, the WW3_PRNC program does not have this functionaliry meaning it is not possible to pre-process input files from netCDF files, even if calendar type is set to 360day in the mod_def file.

To Reproduce
Generate mod_def with 360day calendar. Try running ww3_prnc on a input file with 30 day months for February.
The last day that will be processed for February is the 28th (or 29th on a leap year).

Expected behavior
Missing forcing data.

Additional context
We need to handle other calendar types when decoding dates in ww3_prnc, here:

WW3/model/src/ww3_prnc.F90

Lines 798 to 808 in 3952826

IRET=NF90_GET_ATT(NCID,VARIDTMP,"calendar",CALENDAR)
IF ( IRET/=NF90_NOERR ) THEN
WRITE(NDSE,1028)
ELSE IF ((INDEX(CALENDAR, "standard").EQ.0) .AND. &
(INDEX(CALENDAR, "gregorian").EQ.0)) THEN
WRITE(NDSE,1029)
END IF
IRET=NF90_GET_ATT(NCID,VARIDTMP,"units",TIMEUNITS)
CALL CHECK_ERR(IRET)
CALL U2D(TIMEUNITS,REFDATE,IERR)
CALL D2J(REFDATE,REFJULDAY,IERR)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant