NNJA-AI#
Warning
Under development.
NNJASource accesses the
NNJA-AI cloud-hosted observation
archive (NOAA/NASA Joint Archive) stored on GCS.
Install the extra dependency#
pip install nnja-ai
Usage#
import datetime
from dartobsgen import ObsGenConfig, NNJASource, generate_obs_sequences
config = ObsGenConfig(
start=datetime.datetime(2021, 1, 1),
end=datetime.datetime(2021, 1, 2),
lat_min=-90, lat_max=90,
lon_min=-180, lon_max=180,
obs_types=[
"METAR_TEMPERATURE_2_METER",
"METAR_U_10_METER_WIND",
"METAR_V_10_METER_WIND",
],
assimilation_frequency=datetime.timedelta(hours=6),
output_dir="./obs_output",
)
source = NNJASource(catalog_mirror="gcp_nodd")
if __name__ == "__main__":
written = generate_obs_sequences(config, source)
print(written)
Supported NNJA obs types#
DART obs type |
NNJA dataset |
Variable |
|---|---|---|
|
|
|
|
|
derived from |
|
|
derived from |
|
|
|
|
|
derived from |
|
|
derived from |
Radiosonde pressure suffix n: column TMDB_PRLC5000 → 500 hPa = 50 000 Pa
(pressure_Pa = int(n) × 10).
Custom error variances#
Override the default error variances (1.0 for all obs types) by passing a
custom obs_type_map to NNJASource or to ObsGenConfig:
source = NNJASource(
catalog_mirror="gcp_nodd",
obs_type_map={
"METAR_TEMPERATURE_2_METER": {
"nnja_dataset": "conv-adpsfc-NC000001",
"kind": "scalar",
"nnja_col": "TMPSQ1.TMDB",
"vert_unit": "surface (m)",
"vert_col": "SELV",
"default_err_var": 4.0, # 2 K std dev → 4 K² variance
},
},
)
GCS mirror options#
Mirror |
Description |
|---|---|
|
NOAA Open Data Dissemination (default, open access) |
|
Brightband mirror |