Skip to content
Snippets Groups Projects
Commit d3280950 authored by Guillaume Samson's avatar Guillaume Samson :snowman2:
Browse files

Merge branch 'cherry-pick-359075b3' into 'branch_4.2'

Merge branch 'issue_#305' into 'branch_4.2'

See merge request nemo/nemo!360
parents 9ae0cdfa 168adddf
No related branches found
No related tags found
No related merge requests found
...@@ -793,6 +793,7 @@ CONTAINS ...@@ -793,6 +793,7 @@ CONTAINS
! previous file parameters ! previous file parameters
IF( llprev ) THEN IF( llprev ) THEN
IF( sdjf%clftyp(1:4) == 'week' ) THEN ! find the day of the beginning of previous week IF( sdjf%clftyp(1:4) == 'week' ) THEN ! find the day of the beginning of previous week
isecwk = ksec_week( sdjf%clftyp(6:8) ) ! seconds between the beginning of the week and half of current time step
isecwk = isecwk + 7 * idaysec ! seconds between the beginning of previous week and half of the time step isecwk = isecwk + 7 * idaysec ! seconds between the beginning of previous week and half of the time step
llprevmt = isecwk > nsec_month ! longer time since beginning of the previous week than the current month llprevmt = isecwk > nsec_month ! longer time since beginning of the previous week than the current month
llprevyr = llprevmt .AND. nmonth == 1 llprevyr = llprevmt .AND. nmonth == 1
...@@ -813,8 +814,9 @@ CONTAINS ...@@ -813,8 +814,9 @@ CONTAINS
! next file parameters ! next file parameters
IF( llnext ) THEN IF( llnext ) THEN
IF( sdjf%clftyp(1:4) == 'week' ) THEN ! find the day of the beginning of next week IF( sdjf%clftyp(1:4) == 'week' ) THEN ! find the day of the beginning of next week
isecwk = ksec_week( sdjf%clftyp(6:8) ) ! seconds between the beginning of the week and half of current time step
isecwk = 7 * idaysec - isecwk ! seconds between half of the time step and the beginning of next week isecwk = 7 * idaysec - isecwk ! seconds between half of the time step and the beginning of next week
llnextmt = isecwk > ( nmonth_len(nmonth)*idaysec - nsec_month ) ! larger than the seconds to the end of the month llnextmt = isecwk >= ( nmonth_len(nmonth)*idaysec - nsec_month ) ! larger than the seconds to the end of the month
llnextyr = llnextmt .AND. nmonth == 12 llnextyr = llnextmt .AND. nmonth == 12
iyr = nyear + COUNT((/llnextyr/)) iyr = nyear + COUNT((/llnextyr/))
imt = nmonth + COUNT((/llnextmt/)) - 12 * COUNT((/llnextyr/)) imt = nmonth + COUNT((/llnextmt/)) - 12 * COUNT((/llnextyr/))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment