SWDatabase
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
Variables
test_map2D_time2map Namespace Reference

Test time2map routine for Map2D database. More...

Variables

string help_message
 
string other_message = '\nHere is the list of available tables:\n'
 
string table_name = ''
 
tuple date_min = datetime.datetime(2019,1,1)
 
tuple date_max = datetime.datetime.today()
 
tuple time_in = module_timespace.Time()
 
tuple ndates = int((date_max - date_min).total_seconds()/12/3600)
 
list dates = [ date_min + i*datetime.timedelta(hours=12) for i in range(0,ndates+1) ]
 
tuple map2D = database_map2D.time2map(table_name,time_in)
 

Detailed Description

Test time2map routine for Map2D database.

For a given date interval and a database table, find the corresponding map2D in the SW DB and check if file really exists locally.

1 Usage
2 python test_map2D_time2map table_name

Output on console:
Date: error message (if file not in SW DB)
Date: filename (if file in SW DB and physically exist)
Date: filename absent (if file in SW DB but not physically exist)

Variable Documentation

tuple test_map2D_time2map.date_max = datetime.datetime.today()
tuple test_map2D_time2map.date_min = datetime.datetime(2019,1,1)
list test_map2D_time2map.dates = [ date_min + i*datetime.timedelta(hours=12) for i in range(0,ndates+1) ]
string test_map2D_time2map.help_message
Initial value:
1 = """
2 Usage :\n
3 python test_map2D_read table_name -b d1 -e d2
4 [-h] : brief help
5 table_name : one among all map2D tables
6 d1 : beginning date YYYYmmdd (20180801 by default)
7 d2 : end date YYYYmmdd (today by default)
8 """
tuple test_map2D_time2map.map2D = database_map2D.time2map(table_name,time_in)
tuple test_map2D_time2map.ndates = int((date_max - date_min).total_seconds()/12/3600)
string test_map2D_time2map.other_message = '\nHere is the list of available tables:\n'
list test_map2D_time2map.table_name = ''
tuple test_map2D_time2map.time_in = module_timespace.Time()