Commit 190946ca authored by kbk's avatar kbk
Browse files

TimeDiff --> time_diff

parent 6579ac8b
!$Id: time.F90,v 1.3 2003-12-15 16:03:59 kbk Exp $
!$Id: time.F90,v 1.4 2004-04-06 16:32:28 kbk Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -27,6 +27,9 @@
! !USES:
IMPLICIT NONE
!
! !PUBLIC MEMBER FUNCTIONS:
public :: time_diff
! !PUBLIC DATA MEMBERS:
integer :: julianday,secondsofday,yearday,month,day
integer :: jul0=-1,secs0=-1
......@@ -44,7 +47,10 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: time.F90,v $
! Revision 1.3 2003-12-15 16:03:59 kbk
! Revision 1.4 2004-04-06 16:32:28 kbk
! TimeDiff --> time_diff
!
! Revision 1.3 2003/12/15 16:03:59 kbk
! new correct algorithm in in_interval()
!
! Revision 1.2 2003/04/23 12:02:43 kbk
......@@ -152,7 +158,7 @@
call String2JulSecs(start,jul1,secs1)
call String2JulSecs(stop,jul2,secs2)
nsecs = TimeDiff(jul2,secs2,jul1,secs1)
nsecs = time_diff(jul2,secs2,jul1,secs1)
MaxN = nint(nsecs/timestep)
ndays = jul2-jul1
......@@ -498,10 +504,10 @@
!-----------------------------------------------------------------------
!BOP
!
! !IROUTINE: TimeDiff() - the time difference in seconds
! !IROUTINE: time_diff() - the time difference in seconds
!
! !INTERFACE:
integer FUNCTION TimeDiff(jul1,secs1,jul2,secs2)
integer FUNCTION time_diff(jul1,secs1,jul2,secs2)
!
! !DESCRIPTION:
!
......@@ -521,9 +527,9 @@
!EOP
!-----------------------------------------------------------------------
!BOC
TimeDiff = 86400*(jul1-jul2) + (secs1-secs2)
time_diff = 86400*(jul1-jul2) + (secs1-secs2)
return
end function TimeDiff
end function time_diff
!EOC
!-----------------------------------------------------------------------
......
!$Id: ncdf_2d_bdy.F90,v 1.3 2003-04-23 11:54:03 kbk Exp $
!$Id: ncdf_2d_bdy.F90,v 1.4 2004-04-06 16:32:29 kbk Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -12,7 +12,7 @@
!
! !USES:
use m2d, only: dtm,bdy_times,bdy_old,bdy_new,bdy_data
use time, only: string_to_julsecs,TimeDiff,julianday,secondsofday
use time, only: string_to_julsecs,time_diff,julianday,secondsofday
IMPLICIT NONE
!
private
......@@ -29,7 +29,10 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: ncdf_2d_bdy.F90,v $
! Revision 1.3 2003-04-23 11:54:03 kbk
! Revision 1.4 2004-04-06 16:32:29 kbk
! TimeDiff --> time_diff
!
! Revision 1.3 2003/04/23 11:54:03 kbk
! cleaned code + TABS to spaces
!
! Revision 1.2 2003/04/07 12:49:47 kbk
......@@ -150,7 +153,7 @@
if (err .NE. NF_NOERR) go to 10
call string_to_julsecs(units,j1,s1)
offset = TimeDiff(julianday,secondsofday,j1,s1)
offset = time_diff(julianday,secondsofday,j1,s1)
if( offset .lt. _ZERO_ ) then
FATAL 'Model simulation starts before available boundary data'
stop 'init_2d_bdy_ncdf'
......@@ -196,7 +199,10 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: ncdf_2d_bdy.F90,v $
! Revision 1.3 2003-04-23 11:54:03 kbk
! Revision 1.4 2004-04-06 16:32:29 kbk
! TimeDiff --> time_diff
!
! Revision 1.3 2003/04/23 11:54:03 kbk
! cleaned code + TABS to spaces
!
! Revision 1.2 2003/04/07 12:49:47 kbk
......
!$Id: ncdf_3d_bdy.F90,v 1.8 2003-12-16 16:50:41 kbk Exp $
!$Id: ncdf_3d_bdy.F90,v 1.9 2004-04-06 16:32:29 kbk Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -18,7 +18,7 @@
use m2d, only: dtm
use variables_3d, only: hn
use bdy_3d, only: T_bdy,S_bdy
use time, only: string_to_julsecs,TimeDiff,julianday,secondsofday
use time, only: string_to_julsecs,time_diff,julianday,secondsofday
IMPLICIT NONE
!
private
......@@ -43,7 +43,10 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: ncdf_3d_bdy.F90,v $
! Revision 1.8 2003-12-16 16:50:41 kbk
! Revision 1.9 2004-04-06 16:32:29 kbk
! TimeDiff --> time_diff
!
! Revision 1.8 2003/12/16 16:50:41 kbk
! added support for Intel/IFORT compiler - expanded TABS, same types in subroutine calls
!
! Revision 1.7 2003/10/07 15:10:42 kbk
......@@ -324,7 +327,7 @@
if (err .NE. NF_NOERR) go to 10
call string_to_julsecs(units,j1,s1)
offset = TimeDiff(julianday,secondsofday,j1,s1)
offset = time_diff(julianday,secondsofday,j1,s1)
if( offset .lt. _ZERO_ ) then
FATAL 'Model simulation starts before available boundary data'
stop 'init_3d_bdy_ncdf'
......@@ -382,7 +385,10 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: ncdf_3d_bdy.F90,v $
! Revision 1.8 2003-12-16 16:50:41 kbk
! Revision 1.9 2004-04-06 16:32:29 kbk
! TimeDiff --> time_diff
!
! Revision 1.8 2003/12/16 16:50:41 kbk
! added support for Intel/IFORT compiler - expanded TABS, same types in subroutine calls
!
! Revision 1.7 2003/10/07 15:10:42 kbk
......
!$Id: ncdf_meteo.F90,v 1.10 2004-01-15 11:45:01 kbk Exp $
!$Id: ncdf_meteo.F90,v 1.11 2004-04-06 16:32:29 kbk Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -11,7 +11,7 @@
! !DESCRIPTION:
!
! !USES:
use time, only: string_to_julsecs,TimeDiff,add_secs,in_interval
use time, only: string_to_julsecs,time_diff,add_secs,in_interval
use time, only: jul0,secs0,julianday,secondsofday,timestep
use domain, only: imin,imax,jmin,jmax,az,lonc,latc,conv
use grid_interpol, only: init_grid_interpol,do_grid_interpol
......@@ -76,7 +76,10 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: ncdf_meteo.F90,v $
! Revision 1.10 2004-01-15 11:45:01 kbk
! Revision 1.11 2004-04-06 16:32:29 kbk
! TimeDiff --> time_diff
!
! Revision 1.10 2004/01/15 11:45:01 kbk
! meteo point source forcing - taus, swr and shf - implemented
!
! Revision 1.9 2003/12/16 16:50:41 kbk
......@@ -603,7 +606,7 @@
end if
if (found) then
offset = TimeDiff(jul0,secs0,j1,s1)
offset = time_diff(jul0,secs0,j1,s1)
LEVEL3 'Using meteo from:'
LEVEL4 trim(fn)
LEVEL3 'Meteorological offset time ',offset
......
!$Id: ncdf_rivers.F90,v 1.3 2003-10-14 10:05:54 kbk Exp $
!$Id: ncdf_rivers.F90,v 1.4 2004-04-06 16:32:29 kbk Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -11,7 +11,7 @@
! !DESCRIPTION:
!
! !USES:
use time, only: string_to_julsecs,TimeDiff,add_secs,in_interval
use time, only: string_to_julsecs,time_diff,add_secs,in_interval
use time, only: jul0,secs0,julianday,secondsofday,timestep
use rivers, only: nriver,river_data,river_name,river_flow,river_factor,ok
IMPLICIT NONE
......@@ -33,7 +33,10 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: ncdf_rivers.F90,v $
! Revision 1.3 2003-10-14 10:05:54 kbk
! Revision 1.4 2004-04-06 16:32:29 kbk
! TimeDiff --> time_diff
!
! Revision 1.3 2003/10/14 10:05:54 kbk
! checks if indices are in subdomain + cleaning
!
! Revision 1.2 2003/04/23 11:54:03 kbk
......@@ -120,15 +123,14 @@
err = nf_get_var_real(ncid,time_id,river_times)
if (err .ne. NF_NOERR) go to 10
offset = TimeDiff(jul0,secs0,j1,s1)
offset = time_diff(jul0,secs0,j1,s1)
if( offset .lt. _ZERO_ ) then !HB Karsten check, I changed gt to lt
FATAL 'Model simulation starts before available river data'
stop 'init_river_input_ncdf'
endif
call add_secs(j1,s1,nint(river_times(textr)),j2,s2)
!kbkSTDERR TimeDiff(j1,s1,j2,s2)
! if( TimeDiff(j1,s1,j2,s2) .lt. _ZERO_ ) then
! if( time_diff(j1,s1,j2,s2) .lt. _ZERO_ ) then
! FATAL 'Not sufficient river data available'
! stop 'init_river_input_ncdf'
! endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment