|
int | ndays = 10 |
|
tuple | log_id = module_io.open_log(__file__) |
|
tuple | time_0 = datetime.datetime.today() |
|
string | help_message |
|
list | scrafts = [] |
|
tuple | error_hmodel = module_io.check_hmodel(module_io.hmodel ) |
|
tuple | error_cmodel = module_io.check_cmodel(module_io.cmodel ) |
|
tuple | error_magtype = module_io.check_magtype(module_io.magtype) |
|
tuple | error_reftime = module_io.check_reftime(module_io.reftime) |
|
dictionary | error_scraft = {} |
|
dictionary | sc_ref = {} |
|
tuple | date_in = module_timespace.Time() |
|
tuple | date_begin = date_in.datetime-datetime.timedelta(days=ndays) |
|
| delta = date_in.datetime-date_begin |
|
list | dates = [ date_begin + i*datetime.timedelta(days=1) for i in range(0,delta.days+1) ] |
|
list | polarities = [None] |
|
dictionary | error_db = {} |
|
dictionary | error_param = {} |
|
dictionary | simu_db = {} |
|
dictionary | path_param = {} |
|
dictionary | insitu = {} |
|
dictionary | positions_ss = {} |
|
dictionary | main_connect_point = {} |
|
tuple | results |
|
| present_folder = True |
|
tuple | stream = open(path_param[date],'r') |
|
tuple | data_param = yaml.load(stream,Loader=yaml.FullLoader) |
|
list | item_names = [] |
|
list | item_errors = [] |
|
int | nerror = 0 |
|
list | item_error = item_errors[i] |
|
string | title = 'Parameter file path:' |
|
list | operation_mode = simu_db[date_in.datetime] |
|
tuple | output_dirname = module_io.output_localdir(module_io.hmodel,module_io.cmodel,module_io.reftime,operation_mode,scraft,module_io.magtype,date_in.datetime) |
|
tuple | output_basename = module_io.output_localname(module_io.hmodel,module_io.cmodel,module_io.reftime,scraft,module_io.magtype,operation_mode,date_in.datetime) |
|
tuple | path_layer_polarity = os.path.join(output_dirname,output_basename + '_layerpolarity.png') |
|
tuple | time_2 = datetime.datetime.today() |
|
Plot polarity for some dates before input date.
Close
Close orbitography and log files.
- Author
- M. Indurain
- Date
- 2019
Input
Usage:
python make_polarity_layer.py -hmodel heliospheric_model -cmodel coronal_model -magtype magnetic_type -reftime reference_time -sc sc_name -y year -m month -d day -H hour
where:
- -h : brief help
- sc_name : SC/Planet name. May have multiple names (-sc Name1 -sc Name2...). PSP,STA,EARTH,ALL. Default PSP
- heliospheric_model : Heliospheric model, one of interface_heliosphere.info. Default PARKER.
- coronal_model : Coronal model, one of interface_corona.info. Default PFSS.
- magnetic_type : Type of magnetic data. WSO,NSO,ADAPT for PFSS coronal model. Default WSO. DUMFRIC or QSLSQUASHER for MFM coronal model. Default DUMFRIC.
- reference_time : Referential time. SCTIME,SUNTIME. Default SCTIME.
- year : year in UTC. Default today UTC year.
- month : month in UTC. Default today UTC month.
- day : day in UTC. Default today UTC day.
- hour : hour in UTC. Default 0.
Read past polarities and make the image.
For date in [date-N,date], find corresponding simulation in Output DB.
Read parameter file and plot polarities.
Add created image in the Output DB.