diff --git a/src/Utility/Post-Processing-Fortran/read_output10_xyz.f90 b/src/Utility/Post-Processing-Fortran/read_output10_xyz.f90 index dba89b94..5041896a 100644 --- a/src/Utility/Post-Processing-Fortran/read_output10_xyz.f90 +++ b/src/Utility/Post-Processing-Fortran/read_output10_xyz.f90 @@ -20,7 +20,8 @@ ! const. extrapolation is used, except if z=1.e10, in which case ! depth averaged value will be calculated (for 3D vars). ! Output time series for 3D variables (surface values for 2D variables), DEFINED AT NODES OR -! ELEMENTS. Can handle (overlapping) forecast +! ELEMENTS. Can handle (overlapping) forecast (in this case, time origins of stacks are offset +! by a constant time) ! Inputs: ! (1) screen; @@ -87,13 +88,11 @@ program read_out print*, 'Is this a hindcast (0) or forecast(1):' read(*,*)iforecast if(iforecast/=0) then - print*, 'Input start and end record # within each forecast:' + print*, 'Input start and end record # to extract frm each stack:' read(*,*)ifct_rec1,ifct_rec2 if(ifct_rec1>ifct_rec2) stop 'ifct_rec1>ifct_rec2' - print*, 'Input # of offset stacks between starts of consecutive forecasts:' - read(*,*)istagger - print*, 'Input time origin offset (days) to be added to output start time:' - read(*,*)t_offset + print*, 'Input offset in days between origins of consecutive stacks:' + read(*,*)offset_origin endif if(ibp==1) then !.bp format @@ -208,9 +207,9 @@ program read_out !... Time iteration !... !Start time at the start of stack for forecast mode - start_time0=dtout*istagger*nrec*(iday1-1) do iday=iday1,iday2 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + start_time0=offset_origin*86400*(iday-1) !start time of this stack (sec) write(it_char,'(i12)')iday it_char=adjustl(it_char) leng=len_trim(it_char) @@ -312,11 +311,11 @@ program read_out endif else if(irec>=ifct_rec1.and.irec<=ifct_rec2) then !forecast tout=start_time0+dtout*irec - write(18,'(e16.8,20000(1x,e14.6))')tout/86400+t_offset,(out2(i,1,1),i=1,nxy) + write(18,'(e16.8,20000(1x,e14.6))')tout/86400,(out2(i,1,1),i=1,nxy) if(ivs==2) then - write(19,'(e16.8,20000(1x,e14.6))')tout/86400+t_offset,(out2(i,1,2),i=1,nxy) - write(21,'(e16.8,20000(1x,f14.6))')tout/86400+t_offset,(sqrt(out2(i,1,1)**2+out2(i,1,2)**2),i=1,nxy) - write(22,'(e16.8,20000(1x,f14.6))')tout/86400+t_offset,(atan2(out2(i,1,2),out2(i,1,1))/pi*180,i=1,nxy) + write(19,'(e16.8,20000(1x,e14.6))')tout/86400,(out2(i,1,2),i=1,nxy) + write(21,'(e16.8,20000(1x,f14.6))')tout/86400,(sqrt(out2(i,1,1)**2+out2(i,1,2)**2),i=1,nxy) + write(22,'(e16.8,20000(1x,f14.6))')tout/86400,(atan2(out2(i,1,2),out2(i,1,1))/pi*180,i=1,nxy) endif endif else !3D @@ -432,11 +431,11 @@ program read_out endif else if(irec>=ifct_rec1.and.irec<=ifct_rec2) then !forecast tout=start_time0+dtout*irec - write(18,'(e16.8,20000(1x,f14.6))')tout/86400+t_offset,(out3(i,1),i=1,nxy) + write(18,'(e16.8,20000(1x,f14.6))')tout/86400,(out3(i,1),i=1,nxy) if(ivs==2) then - write(19,'(e16.8,20000(1x,f14.6))')tout/86400+t_offset,(out3(i,2),i=1,nxy) - write(21,'(e16.8,20000(1x,f14.6))')tout/86400+t_offset,(sqrt(out3(i,1)**2+out3(i,2)**2),i=1,nxy) - write(22,'(e16.8,20000(1x,f14.6))')tout/86400+t_offset,(atan2(out3(i,2),out3(i,1))/pi*180,i=1,nxy) + write(19,'(e16.8,20000(1x,f14.6))')tout/86400,(out3(i,2),i=1,nxy) + write(21,'(e16.8,20000(1x,f14.6))')tout/86400,(sqrt(out3(i,1)**2+out3(i,2)**2),i=1,nxy) + write(22,'(e16.8,20000(1x,f14.6))')tout/86400,(atan2(out3(i,2),out3(i,1))/pi*180,i=1,nxy) endif endif @@ -445,8 +444,6 @@ program read_out iret=nf90_close(ncid) iret=nf90_close(ncid4) if(ivs==2) iret=nf90_close(ncid2) - - start_time0=start_time0+dtout*nrec !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ enddo !iday diff --git a/src/Utility/Post-Processing-Fortran/read_output9_xyz.f90 b/src/Utility/Post-Processing-Fortran/read_output9_xyz.f90 index 47acba17..432ad12e 100644 --- a/src/Utility/Post-Processing-Fortran/read_output9_xyz.f90 +++ b/src/Utility/Post-Processing-Fortran/read_output9_xyz.f90 @@ -21,7 +21,8 @@ ! depth averaged value will be calculated (for 3D vars). ! Output time series for 3D variables (surface values for 2D variables), DEFINED AT NODES OR ! ELEMENTS. -! Works with combined or uncombined nc outputs. Can handle (overlapping) forecast +! Works with combined or uncombined nc outputs. Can handle (overlapping) forecast (in this case +! time origins of stacks are offset by a constant time) ! Inputs: ! (1) screen; @@ -98,11 +99,11 @@ program read_out print*, 'Is this a hindcast (0) or forecast(1):' read(*,*)iforecast if(iforecast/=0) then - print*, 'Input start and end record # from each forecast:' + print*, 'Input start and end record # to extract in each stack:' read(*,*)ifct_rec1,ifct_rec2 if(ifct_rec1>ifct_rec2) stop 'ifct_rec1>ifct_rec2' - print*, 'Input time offset (days) for output start time:' - read(*,*)t_offset + print*, 'Input offset in days between origins of consecutive stacks:' + read(*,*)offset_origin endif if(ibp==1) then !.bp format @@ -237,9 +238,9 @@ program read_out !... Time iteration !... !Start time at the start of stack for forecast mode - start_time0=dtout*nrec*(iday1-1) do iday=iday1,iday2 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + start_time0=offset_origin*86400*(iday-1) !start time of this stack (sec) ! write(it_char,'(i12)')iday ! it_char=adjustl(it_char) ! leng=len_trim(it_char) @@ -352,8 +353,8 @@ program read_out if(ivs==2) write(19,'(e16.8,20000(1x,e14.6))')timeout(irec_real)/86400,(out2(i,1,2),i=1,nxy) else if(irec_real>=ifct_rec1.and.irec_real<=ifct_rec2) then !forecast tout=start_time0+dtout*irec_real - write(18,'(e16.8,20000(1x,e14.6))')tout/86400+t_offset,(out2(i,1,1),i=1,nxy) - if(ivs==2) write(19,'(e16.8,20000(1x,e14.6))')tout/86400+t_offset,(out2(i,1,2),i=1,nxy) + write(18,'(e16.8,20000(1x,e14.6))')tout/86400,(out2(i,1,1),i=1,nxy) + if(ivs==2) write(19,'(e16.8,20000(1x,e14.6))')tout/86400,(out2(i,1,2),i=1,nxy) endif else !3D if(i23d<=3) then !node @@ -491,8 +492,8 @@ program read_out if(ivs==2) write(19,'(e16.8,20000(1x,f14.6))')timeout(irec_real)/86400,(out3(i,2),i=1,nxy) else if(irec_real>=ifct_rec1.and.irec_real<=ifct_rec2) then !forecast tout=start_time0+dtout*irec_real - write(18,'(e16.8,20000(1x,f14.6))')tout/86400+t_offset,(out3(i,1),i=1,nxy) - if(ivs==2) write(19,'(e16.8,20000(1x,f14.6))')tout/86400+t_offset,(out3(i,2),i=1,nxy) + write(18,'(e16.8,20000(1x,f14.6))')tout/86400,(out3(i,1),i=1,nxy) + if(ivs==2) write(19,'(e16.8,20000(1x,f14.6))')tout/86400,(out3(i,2),i=1,nxy) endif endif !i23d @@ -504,8 +505,6 @@ program read_out end do loop1 !enddo !irec=1,nrec !iret=nf90_close(ncid) - - start_time0=start_time0+dtout*nrec !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ enddo !iday