public class AddeSoundingAdapter extends SoundingAdapterImpl implements SoundingAdapter
Modifier and Type | Field and Description |
---|---|
private AddeChooser |
addeChooser
Used to grab accounting information for a currently selected server.
|
private String |
dayVar
name of day variable
|
private String |
defaultMandDataset
default mandatory data set
|
private String |
defaultServer
default server
|
private String |
defaultSigDataset
default significant dataset
|
private String |
dirMandPVar
name of mandP wind dir variable
|
private String |
eleVar
name of station elevation variable
|
protected boolean |
firstTime |
private String |
htMandPVar
name of mandP height variable
|
private String |
idVar
name of station id variable
|
private String |
latVar
name of station latitude variable
|
private String |
lonVar
name of station longitude variable
|
private boolean |
mainHours
use main hours only
|
private NonVetoableProperty |
mandatoryDatasetProperty
mandatory data set property
|
private String |
mandDataset
mandatory dataset name
|
private String |
manDescriptor
mandatory data descriptor
|
private String |
manGroup
mandatory data group name
|
private static String |
P_ALL
all obs identifier
|
private static String |
P_DESCR
descriptor identifier
|
private static String |
P_GROUP
group identifier
|
private static String |
P_NUM
number of obs identifier
|
private static String |
P_PARAM
parameter identifier
|
private static String |
P_POS
number of obs identifier
|
private static String |
P_SELECT
select identifier
|
private String |
prMandPVar
name of mandP pressure variable
|
private static String |
proj |
protected boolean |
retry |
private String |
satellitePixel |
private boolean |
satelliteSounding
observed or satellite sounding?
|
private String |
satelliteTime
these are only really used for satellite soundings
|
private String |
server
server name
|
private NonVetoableProperty |
serverProperty
server propert
|
private String |
sigDataset
significant dataset name
|
private String |
sigDescriptor
sig data descriptor
|
private String |
sigGroup
sig data group name
|
private NonVetoableProperty |
significantDatasetProperty
significant data set property
|
private NonVetoableProperty |
soundingTimesProperty
sounding times property
|
private String |
spdMandPVar
name of mandP wind speed variable
|
private NonVetoableProperty |
stationsProperty
stations property
|
private String |
tdMandPVar
name of mandP dewpoint variable
|
private String |
timeVar
name of time variable
|
private String |
tpMandPVar
name of mandP temp variable
|
private static String |
URL_PROTOCOL
URL protocol identifier
|
private static String |
URL_ROOT
URL type identifier
|
private static String |
user
Accounting information
|
debug, defaults, haveInitialized, soundings, stations, times
Constructor and Description |
---|
AddeSoundingAdapter()
Construct an empty AddeSoundingAdapter
|
AddeSoundingAdapter(String server)
Retreive upper air data from a remote ADDE server using only
mandatory data.
|
AddeSoundingAdapter(String server,
String dataset)
Retreive upper air data from a remote ADDE server using only
mandatory data.
|
AddeSoundingAdapter(String server,
String mandDataset,
String sigDataset)
Retreive upper air data from a remote ADDE server using only
mandatory data.
|
AddeSoundingAdapter(String server,
String mandDataset,
String sigDataset,
boolean mainHours)
Retreive upper air data from a remote ADDE server using only
mandatory data.
|
AddeSoundingAdapter(String server,
String mandDataset,
String sigDataset,
boolean mainHours,
AddeChooser chooser) |
AddeSoundingAdapter(String server,
String mandDataset,
String sigDataset,
String satelliteTime,
String satellitePixel,
AddeChooser chooser) |
Modifier and Type | Method and Description |
---|---|
private String |
getDflt(String name,
String dflt)
Get a default value using this Adapter's prefix
|
String |
getMandatoryURL(SoundingOb sound)
Make the mandatory levels URL for the given sounding
|
String |
getMandDataset()
Set the mandatory data set name
|
private String |
getManUserProj()
Get mandatory data ADDE user/project id for the data
|
boolean |
getSatelliteSounding()
Are we looking at satellite soundings?
|
private String |
getServer() |
String |
getSigDataset()
Get the significant data set name
|
String |
getSigURL(SoundingOb sound)
Make the url for the significant levels for the sounding
|
private String |
getSigUserProj()
Get significant data ADDE user/project id for the data
|
String |
getSource()
Get the source of the data (server)
|
private String |
getStationsSelectString()
Get the select string for use in loadStations
|
private Unit |
getUnit(String unitName)
Gets the units of the variable.
|
private String |
getUserProj(String key)
Get the user/project string for the given key
|
private void |
getVariables()
Determines the names of the variables in the netCDF file that
should be used.
|
protected void |
init()
Initialize the class.
|
private void |
initGroupAndDescriptors()
Initialize the group and descriptor strings
|
SoundingOb |
initSoundingOb(SoundingOb sound)
Check to see if the RAOB has any data
|
private boolean |
intEqual(int v,
String s)
Utility method that calls McIDASUtil.intBitsToString
to get a string to compare to the given parameter s
|
private void |
loadStations()
Initialize the times, stations and soundings lists.
|
private void |
loadStationsInner()
Actually do the work of loading the stations
|
static void |
main(String[] args)
test by running java ucar.unidata.data.sounding.AddeSoundingAdapter
|
private String |
makeSelectString(SoundingOb sound)
Make the select string that will get this observation
|
private String |
makeSelectString(String wmoId,
DateTime date)
Make a select string for the given station id and date
|
private String |
makeUrl(String[] args)
Assemble the URL from the given URL argument array.
|
private String |
makeUrl(String urlRoot,
String[] args)
Assemble the url from the given
urlRoot and URL argument array. |
private double |
scaleValue(int value,
int scale)
scale the values returned from the server
|
void |
setMandDataset(String value)
Set the mandatory data set name
|
private void |
setRAOBData(SoundingOb sound)
Fills in the data for the RAOB
|
void |
setSatelliteSounding(boolean flag)
Change behavior if we are looking at satellite soundings
|
void |
setSigDataset(String value)
Set the significant data set name
|
void |
setSource(String server)
Set the ADDE server name
|
private String |
sQuote(String s)
Return the given String in single quotes
|
String |
toString()
The string representation
|
void |
update()
Update this adapter for new data
|
checkInit, dbPrint, getDflt, getSoundingOb, getSoundingObs, getSoundingTimes, getSoundingTimes, getStations, getStations
addProperty, addPropertyChangeListener, addPropertyChangeListener, disablePropertyChangeEvents, enablePropertyChangeEvents, getTitle, removePropertyChangeListener, removePropertyChangeListener, setTitle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getSoundingObs, getSoundingTimes, getSoundingTimes, getStations, getStations
private boolean satelliteSounding
private String satelliteTime
private String satellitePixel
private static final String P_PARAM
private static final String P_NUM
private static final String P_ALL
private static final String P_POS
private static final String P_GROUP
private static final String P_DESCR
private static final String P_SELECT
private static final String URL_ROOT
private static final String URL_PROTOCOL
private NonVetoableProperty serverProperty
private NonVetoableProperty mandatoryDatasetProperty
private NonVetoableProperty significantDatasetProperty
private NonVetoableProperty stationsProperty
private NonVetoableProperty soundingTimesProperty
private String manDescriptor
private String sigDescriptor
private boolean mainHours
private String prMandPVar
private String htMandPVar
private String tpMandPVar
private String tdMandPVar
private String spdMandPVar
private String dirMandPVar
private String mandDataset
private String sigDataset
private String defaultServer
private String defaultMandDataset
private String defaultSigDataset
protected boolean firstTime
protected boolean retry
private AddeChooser addeChooser
public AddeSoundingAdapter()
public AddeSoundingAdapter(String server) throws Exception
server
- name or IP address of remote serverException
- (AddeException) if there is no data available or there
is trouble connecting to the remote serverpublic AddeSoundingAdapter(String server, String dataset) throws Exception
server
- name or IP address of remote serverdataset
- name of ADDE dataset (group/descriptor)Exception
- (AddeException) if there is no data available or there
is trouble connecting to the remote serverpublic AddeSoundingAdapter(String server, String mandDataset, String sigDataset) throws Exception
server
- name or IP address of remote servermandDataset
- name of mandatory level upper air ADDE
dataset (group/descriptor)sigDataset
- name of significant level upper air ADDE
dataset (group/descriptor)Exception
- (AddeException) if there is no data available
or there is trouble connecting to the remote serverpublic AddeSoundingAdapter(String server, String mandDataset, String sigDataset, boolean mainHours) throws Exception
server
- name or IP address of remote servermandDataset
- name of mandatory level upper air ADDE
dataset (group/descriptor)sigDataset
- name of significant level upper air ADDE
dataset (group/descriptor)mainHours
- only get data for main (00 & 12Z) hoursException
- (AddeException) if there is no data available
or there is trouble connecting to the remote serverpublic AddeSoundingAdapter(String server, String mandDataset, String sigDataset, boolean mainHours, AddeChooser chooser) throws Exception
Exception
public AddeSoundingAdapter(String server, String mandDataset, String sigDataset, String satelliteTime, String satellitePixel, AddeChooser chooser) throws Exception
Exception
protected void init() throws Exception
init
in class SoundingAdapterImpl
Exception
- problem occurredprivate boolean intEqual(int v, String s)
v
- integer string values
- string to compareprivate String sQuote(String s)
s
- Add single quotes to the string for select clauses.private String makeUrl(String[] args)
makeUrl(String, String[])
, passing in the
URL_ROOT
("/point") and the URL_ROOT
to use.args
- URL arguments, key value pairs
(ex: arg[0]=arg[1]&arg[2]=arg[3]...
)private String makeUrl(String urlRoot, String[] args)
urlRoot
and URL argument array.
This returns:
"URL_PROTOCOL://server urlRoot ?arg[0]=arg[1]&arg[2]=arg[3]...
urlRoot
- Root for the URLargs
- Key/value pair arguments.public void update()
update
in interface SoundingAdapter
private void loadStations()
private void initGroupAndDescriptors()
private void loadStationsInner() throws AddeException
AddeException
- problem accessing datapublic void setSource(String server)
setSource
in interface SoundingAdapter
server
- server name or IP addresspublic String getSource()
getSource
in interface SoundingAdapter
public void setMandDataset(String value)
value
- mandatory data set namepublic String getMandDataset()
public void setSigDataset(String value)
value
- the significant data set namepublic String getSigDataset()
public void setSatelliteSounding(boolean flag)
public boolean getSatelliteSounding()
public SoundingOb initSoundingOb(SoundingOb sound)
initSoundingOb
in interface SoundingAdapter
initSoundingOb
in class SoundingAdapterImpl
sound
- sounding to checkprivate String makeSelectString(SoundingOb sound)
sound
- sounding to useprivate String makeSelectString(String wmoId, DateTime date)
wmoId
- station iddate
- time of dataprivate void setRAOBData(SoundingOb sound)
sound
- sounding ob to setprivate double scaleValue(int value, int scale)
value
- value to scalescale
- scale factorprivate Unit getUnit(String unitName)
unitName
- unit nameUtil.parseUnit(String)
private String getDflt(String name, String dflt)
name
- name of property keydflt
- default valueprivate void getVariables()
private String getSigUserProj()
public String getMandatoryURL(SoundingOb sound)
sound
- soundingpublic String getSigURL(SoundingOb sound)
sound
- the soundingprivate String getManUserProj()
private String getUserProj(String key)
key
- group/descriptorprivate String getStationsSelectString()
public static void main(String[] args)
args
- array of arguments. Takes up to 3 arguments as
"server mandatory dataset significant dataset"
Use "x" for any of these arguments to use the default.