Skip to content

Commit 6a28387

Browse files
committed
Update IBTrACS version
1 parent bb9428c commit 6a28387

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

climada/hazard/tc_tracks.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@
8484
IBTRACS_URL = (
8585
"https://www.ncei.noaa.gov/data/"
8686
"international-best-track-archive-for-climate-stewardship-ibtracs/"
87-
"v04r00/access/netcdf"
87+
"v04r01/access/netcdf"
8888
)
8989
"""Site of IBTrACS netcdf file containing all tracks v4.0,
9090
s. https://www.ncdc.noaa.gov/ibtracs/index.php?name=ib-v4-access"""
9191

92-
IBTRACS_FILE = "IBTrACS.ALL.v04r00.nc"
93-
"""IBTrACS v4.0 file all"""
92+
IBTRACS_FILE = "IBTrACS.ALL.v04r01.nc"
93+
"""IBTrACS v4.1 file all"""
9494

9595
IBTRACS_AGENCIES = [
9696
"usa",
@@ -376,7 +376,7 @@ def from_ibtracs_netcdf(
376376
correct_pres=False,
377377
discard_single_points=True,
378378
additional_variables=None,
379-
file_name="IBTrACS.ALL.v04r00.nc",
379+
file_name=IBTRACS_FILE,
380380
):
381381
"""Create new TCTracks object from IBTrACS databse.
382382
@@ -485,7 +485,7 @@ def from_ibtracs_netcdf(
485485
compatiblity with other functions such as `equal_timesteps`. Default: True.
486486
file_name : str, optional
487487
Name of NetCDF file to be dowloaded or located at climada/data/system.
488-
Default: 'IBTrACS.ALL.v04r00.nc'
488+
Default: 'IBTrACS.ALL.v04r01.nc'
489489
additional_variables : list of str, optional
490490
If specified, additional IBTrACS data variables are extracted, such as "nature" or
491491
"storm_speed". Only variables that are not agency-specific are supported.
@@ -2576,7 +2576,7 @@ def ibtracs_fit_param(explained, explanatory, year_range=(1980, 2019), order=1):
25762576
raise KeyError("Unknown ibtracs variable: %s" % var)
25772577

25782578
# load ibtracs dataset
2579-
fn_nc = SYSTEM_DIR.joinpath("IBTrACS.ALL.v04r00.nc")
2579+
fn_nc = SYSTEM_DIR.joinpath(IBTRACS_FILE)
25802580
with xr.open_dataset(fn_nc) as ibtracs_ds:
25812581
# choose specified year range
25822582
years = ibtracs_ds.sid.str.slice(0, 4).astype(int)

climada/hazard/test/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929

3030
def download_ibtracs():
31-
"""This makes sure a IBTrACS.ALL.v04r00.nc file is present in SYSTEM_DIR
31+
"""This makes sure a IBTrACS.ALL.v04r01.nc file is present in SYSTEM_DIR
3232
First, downloading from the original sources is attempted. If that fails an old version
3333
is downloaded from the CLIMADA Data API
3434
"""
@@ -44,9 +44,9 @@ def download_ibtracs():
4444
): # plan b: download an old version of that file from the climada api
4545
client = Client()
4646
dsinfo = client.get_dataset_info(
47-
name="IBTrACS", version="v04r00", status="external"
47+
name="IBTrACS", version="v04r01", status="external"
4848
)
4949
[fileinfo] = [
50-
fi for fi in dsinfo.files if fi.file_name == "IBTrACS.ALL.v04r00.nc"
50+
fi for fi in dsinfo.files if fi.file_name == "IBTrACS.ALL.v04r01.nc"
5151
]
5252
client._download_file(local_path=SYSTEM_DIR, fileinfo=fileinfo)

doc/tutorial/climada_hazard_TropCyclone.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@
6464
"<a id='Part1.a'></a> \n",
6565
"### a) Load TC tracks from historical records\n",
6666
"\n",
67-
"The best-track historical data from the International Best Track Archive for Climate Stewardship ([IBTrACS](https://www.ncdc.noaa.gov/ibtracs/)) can easily be loaded into CLIMADA to study the historical records of TC events. The constructor `from_ibtracs_netcdf()` generates the `Datasets` for tracks selected by [IBTrACS](https://www.ncdc.noaa.gov/ibtracs/) id, or by basin and year range. To achieve this, it downloads the first time the [IBTrACS data v4 in netcdf format](https://www.ncei.noaa.gov/data/international-best-track-archive-for-climate-stewardship-ibtracs/v04r00/access/netcdf/) and stores it in `~/climada/data/`. The tracks can be accessed later either using the attribute `data` or using `get_track()`, which allows to select tracks by its name or id. Use the method `append()` to extend the `data` list.\n",
67+
"The best-track historical data from the International Best Track Archive for Climate Stewardship ([IBTrACS](https://www.ncdc.noaa.gov/ibtracs/)) can easily be loaded into CLIMADA to study the historical records of TC events. The constructor `from_ibtracs_netcdf()` generates the `Datasets` for tracks selected by [IBTrACS](https://www.ncdc.noaa.gov/ibtracs/) id, or by basin and year range. To achieve this, it downloads the first time the [IBTrACS data v4 in netcdf format](https://www.ncei.noaa.gov/data/international-best-track-archive-for-climate-stewardship-ibtracs/v04r01/access/netcdf/) and stores it in `~/climada/data/`. The tracks can be accessed later either using the attribute `data` or using `get_track()`, which allows to select tracks by its name or id. Use the method `append()` to extend the `data` list.\n",
6868
"\n",
69-
"If you get an error downloading the IBTrACS data, try to manually access [https://www.ncei.noaa.gov/data/international-best-track-archive-for-climate-stewardship-ibtracs/v04r00/access/netcdf/](https://www.ncei.noaa.gov/data/international-best-track-archive-for-climate-stewardship-ibtracs/v04r00/access/netcdf/), click on the file `IBTrACS.ALL.v04r00.nc` and copy it to `~/climada/data/`.\n",
69+
"If you get an error downloading the IBTrACS data, try to manually access [https://www.ncei.noaa.gov/data/international-best-track-archive-for-climate-stewardship-ibtracs/v04r01/access/netcdf/](https://www.ncei.noaa.gov/data/international-best-track-archive-for-climate-stewardship-ibtracs/v04r01/access/netcdf/), click on the file `IBTrACS.ALL.v04r01.nc` and copy it to `~/climada/data/`.\n",
7070
"\n",
7171
"To visualize the tracks use `plot()`.\n"
7272
]

0 commit comments

Comments
 (0)