[cig-commits] r16324 - seismo/3D/SPECFEM3D_GLOBE/trunk

danielpeter at geodynamics.org danielpeter at geodynamics.org
Tue Feb 23 10:47:05 PST 2010


Author: danielpeter
Date: 2010-02-23 10:47:04 -0800 (Tue, 23 Feb 2010)
New Revision: 16324

Modified:
   seismo/3D/SPECFEM3D_GLOBE/trunk/calendar.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/check_simulation_stability.f90
Log:
updated calendar.f90 to have a correct idaywk() function output, thus the time estimate for the simulation ending should display the correct day name

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/calendar.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/calendar.f90	2010-02-23 13:36:20 UTC (rev 16323)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/calendar.f90	2010-02-23 18:47:04 UTC (rev 16324)
@@ -1,11 +1,6 @@
 
 ! open-source subroutines taken from ftp://ftp.met.fsu.edu/pub/ahlquist/calendar_software/
 
-!! DK DK function "idaywk" below, which I found on the Web, has a bug (it currently returns
-!! DK DK a day that is not correct) therefore in check_simulation_stability.f90
-!! DK DK I commented out what it prints; that is a temporary
-!! DK DK solution, one day we should either fix it or try to find another version on the Web
-
   integer function idaywk(jdayno)
 
 ! IDAYWK = compute the DAY of the WeeK given the Julian Day number,
@@ -75,8 +70,13 @@
   implicit none
 
 ! specify the desired calendar conversion option.
-  integer, parameter :: ioptn = -1
-
+! in order to return the julian day number, compatible with function idaywk from above,
+! we choose option 3
+! (tested with dates: Feb, 23 2010 -> idaywk = Tue
+!                               Dec, 24 2009 -> idaywk = Thu
+!                               Oct, 15 1582  -> idaywk = Fri ...which all look o.k. )
+  integer, parameter :: ioptn = 3 
+  
 ! Input/Output variables
   integer, intent(inout) :: iday,month,iyear,idayct
 

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/check_simulation_stability.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/check_simulation_stability.f90	2010-02-23 13:36:20 UTC (rev 16323)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/check_simulation_stability.f90	2010-02-23 18:47:04 UTC (rev 16324)
@@ -82,11 +82,7 @@
   character(len=3), dimension(12) :: month_name
   character(len=3), dimension(0:6) :: weekday_name
   data month_name /'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'/
-!! DK DK function "idaywk" below, which I found on the Web, has a bug (it currently returns
-!! DK DK a day that is not correct) therefore I comment out what it prints; that is a temporary
-!! DK DK solution, one day we should either fix "idaywk" or try to find another version on the Web
-!! DK DK   data weekday_name /'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'/
-  data weekday_name /'   ', '   ', '   ', '   ', '   ', '   ', '   '/
+  data weekday_name /'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'/
   integer :: year,mon,day,hr,minutes,timestamp,julian_day_number,day_of_week, &
              timestamp_remote,year_remote,mon_remote,day_remote,hr_remote,minutes_remote,day_of_week_remote
   integer :: ier



More information about the CIG-COMMITS mailing list