Source
xxxxxxxxxx
def ztec_value(my_long,my_lat,points_long,points_lat,ref_long,ref_lat,incr_long,incr_lat,incr_time,ref_start,ref_end,num_maps,tec_array,PLOT=False,PLOTNAME=''):
#!/usr/bin/env python
## =============================================================================
## =============================================================================
##
## tec_maps.py
##
## Created by J. E. Kooi 2014/04/25 v2.0
## Modified by gmoellen 2014/07/21 v2.1 (minor mods, mostly semantics)
## Modified by J. E. Kooi 2014/09/17 v2.2 (minor mods, formating and
## ~ Test for network connection
## ~ Heirarchy of IGS-related
## data products added
## ~ Added IGS RMS TEC maps
## ~ Made IGS default data product)
## Modified by gmoellen 2014/09/30 v2.3 (added simplified create method
## that hides all of the MAPGPS-related
## options, and thereby streamlines
## approved general usage for
## CASA 4.3)
## Modified by J. E. Kooi 2015/01/29 v2.4 (Changed get_IGS_TEC to accept
## IONEX format data with ANY grid
## spacing in deg. and time res in min)
## Modified by J. E. Kooi 2015/03/2 v2.5 (Changed ztec_value for doplot =
## True to plot a red bar over the VTEC
## to show the observing session)
## Modified by gmoellen 2017/05/30 v2.6 Generate plot disk file
## Modified by bkent 2017/10-31 v2.7 Fixed VisibleDeprecationWarning:
## using a non-integer
## number instead of an integer will
## result in an error in the future
## Modified by gmoellen 2020/08/28 v2.8 Updated TEC retrieval to use more-secure
## CDDIS server (ftp-ssl), as old
## service going offline 2020Oct31;
## other python cleanup
## 2020/10/13 python3-ification, for CASA 6.
##
## Tested in CASA 4.3.0 and 4.2.1 on RHEL release 6.4 (Santiago)
## Tested in CASA 4.3.0, 4.2.2, and 4.2.1 on Mac OS 10.8.5
##
##
##
## The purpose of this python module is to retrieve vertical TEC/DTEC maps from
## either IGS (housed on the CDDIS servers) or MAPGPS (housed on the Madrigal
## servers).
##
## **** Currently, the MAPGPS is "turned off" and modification of line 306 ****
## **** is required to turn this functionality back "on." ****
##
## The IGS Final Product maps represent a combined TEC map:
## The different IGS Ionosphere Associate Analysis Centers IAAC TEC maps have
## been computed with different approaches but with a common formal resolution
## of 2 hours, 5 degrees, and 2.5 degrees in UT, longitude, and latitude
## (details can be found in e.g. Schaer, 1999; Feltens, 1998;
## Mannucci et al., 1998; Gao et al.; Hernandez-Pajares et al.,1999). The four
## IAACs TEC maps have been combined in an IGS combination product using weights
## obtained by two IGS Ionosphere Associate Validation Centers (IAVCs) from the
## corresponding performances in reproducing STEC and differences of STEC (IAVCs
## NRCAN and UPC respectively, see details in Feltens, 2002).
## ------ Krankowski & Sieradzki, 2013 (references can be found in this paper)
##
## The code has a hierarchy for IGS data products. It will initially search for
## the IGS Final product data (available ~ 10-14 days after an observation) and,
## if unavailable, then the IGS Rapid Product (available in ~ 1-2 days) and,
## if unavailable, then the JPL Rapid Product.
##
## The MAPGPS maps are computed with no pre-applied ionosphere model and, in
## this sense, represent 'raw TEC data.' The benefit is that they have a formal
## resolution of 5 minutes, 1.0 degree, and 1.0 degree in UT, longitude, and
## latitude (details can be found in Rideout & Coster, 2006). The drawback is
## that the data is sparsely gridded in many locations (e.g., there are no GPS
## ground stations in the middle of the ocean) and there are sporadic gaps in
## the data at some locations (e.g., even over the United States).
##
## For now, users are encouraged to use the IGS Final Product maps instead of
## MAPGPS products because there is data at all grid points and times,
## making it easier to deal with in the code. The code for MAPGPS is also set
## to make a 'patch' over North America and therefore is not a global map.
## However, the code is included and need only be uncommented. Feel free to
## experiment and compare the IGS and MAPGPS maps!
##
## This module calls several methods depending on the TEC/DTEC server and
##
## (1) Produces a CASA image of the TEC data for
## a) The whole world (IGS) (additional DTEC data image is output)
## b) A 15 deg. patch centered on the VLA (MAPGPS)
## (2) Optionally produces a vertical TEC/DTEC time series for the VLA
##
## !!!!! Important Note: In order to access the MAPGPS data, you must:
## (1) Have "madrigalWeb.py" and "globalDownload.py" and
## "madrigal.head" in the working directory