Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#Copmare observations meteo data and model output
This project provides tools for operating and comparing observed meteo conditions and gridded fields of meteo quantities produced by an atmospheric model.
Tools are based on [NCAR Command language](https://www.ncl.ucar.edu) (ncl). The source data are converted into the netCDF format to be operated.
## Data sources
### List of WMO stations {#wmo-list}
The official list of meteo stations provided by WMO is [here](https://www.wmo.int/cpdb/volume_a_observing_stations/list_stations). It is hard to be combined into a single file, so the tool uses the list downloaded here [here](ftp://ftp-cdc.dwd.de/pub/CDC/help/stations_list_CLIMAT_data.txt). It is not ultimately full and may become outdated. If so you may edit it manually.
### Meteo observations
Currently the only supported format of meteo observations is isd-lite. You can download data the from [NCAR database](https://www1.ncdc.noaa.gov/pub/data/noaa/isd-lite). The files have format XXXXX0-99999-YYYY where XXXXX is WMO id of a stations and YYYY is a year of reported observations.
### Atmospheric models
Currently the only model which output is supported is [Arctic System Reanalysis NCAR](https://rda.ucar.edu/datasets/ds631.0/) of both 15km and 30km resolutions. You can download data there. Register If you have no NCAR account. For the script to operate it needs at least full one-year set of model data.
## Dependencies
You need UNIX and ncl-ncarg package (v6.4.0) installed .
## How to use
This section gives step-by-step instructions how to compare observations and model results using tools provided here. There are two ways to operate the scripts: using command line arguments or editing the configuring script *workspace/config.ncl*
1. Update the file *data/wmo_ids.txt* with list of WMO stations if needed. See [wmo list](#wmo-list) section
2. Enter working directory
cd workspace
3. Convert wmo stations list *data/wmo_ids.txt* from text format to a netCDF format file *netcdf/workspace/wmo_ids.nc*.
ncl wmoid_to_netcdf.ncl
To change default input and output files edit values of `wmo_ids_list_txt`, `wmo_ids_list_nc` attributes in configurating script *workspace/config.ncl* or pass command line arguments when running the script:
ncl wmoid_to_netcdf.ncl 'wmo_ids_list_txt="../data/wmo_ids.txt"' 'wmo_ids_list_nc="./netcdf/wmo_ids.nc"'
4. Download *isd-lite* into *data/isd*. Convert them to a netCDF format. List wmo identifiers in the attribute `wmo_ids` of configuring script or pass as cmd option. For setting periods of time list years with 'years'. If you need only one station `wmo_id` cmd argument is recognized, for one year only you may pass `year` argument.
ncl isd_to_obs.ncl 'wmo_ids=(/ "23724", "01025", "71916"/)' year=2004
This converts files *../data/isd/XXXXX0-99999-2004* to *./workspace/netcdf/obs_XXXXX-2004.nc* adding station metadata from *./netcdf/wmo_ids.nc*. You may change defaults using `wmo_ids_list_nc`, `isd_dir`, and `obs_nc_prefix` options.
5. Interpolate ASR gridded data to station observations. Pass `isd_nc_dir` to set directory where isd files are searched, to set stations pass `wmo_id` or `wmo_ids`, to set years pass `year` or `years`, to set directory where asr file are searched pass `asr_dir`, pass `asr_prefix`: source asr files are *{asr_dir}/asr_prefix-YYYYMMDD.nc*, pass `output_prefix` to produce output files {output_prefix}_XXXXX-YYYY
ncl asr_to_obs.ncl 'isd_nc_dir="./netcdf"' 'asr_dir="~/workspace/data/asr30"' 'asr_prefix="asr30km.anl.2D."' 'wmo_ids=(/"23724", "01025", "71916"/)' year=2004 'output_prefix="netcdf/asr30"'
5. To plot observed values and corresponding model values run at one graph run
ncl compare.ncl
## For developers
- To print sea level pressure provided by reanalisys run
ncl plot.ncl
- *station.ncl* seems to be not working
- *check_re.ncl* is not ready yet