script to extract station timeseries You have to download the relevant loading datasets and run the script on your local machine. The script needs the NCO library to read the netCDF files and the CDO library to performe fast bicubic interpolation from the 0.5° gridded values to the station location. If CDO operators are not available, only slow bilinear interpolation is possible. For large numbers of stations using CDO operators works much faster! Do not use CDO version 1.6.4 as it cannot handle unstructured grids (tested with CDO version 1.7.2).
ATTENTION:
USAGE:
to extract multi station time series, saved as single files for each station >bash extractlatlon_bicubintp [-f 'infilename'] [-p] [-m maskfilename] -s stationlistname [-c columnorder] [-v [time] variable1 [variable2 ...]] [-o outfilename]
EXAMPLES: > extractlatlon_bicubintp -f 'ESMGFZ_HYDL_cf_v1.3_24h_*.nc' -3.023 -60.055 This will extract the variables duV, duEW, duNS from all hydrological loading files ESMGFZ_HYDL_cf_v2.0_24h_yyyy.nc at the location Manaus City (3.023°S, 60.055°W) and writes the time series into the default output file extractlatlon.duV, including the time information. > extractlatlon_bicubintp -f ESMGFZ_HYDL_cf_v1.3_24h_2000.nc -3.023 -60.055 -v duV -o manaus This will extract the variable duV for the year 2000 from ESMGFZ_HYDL_cf_v2.0_24h_2000.nc at the location Manaus City (3.1333°S, 60.0167°W) and writes the time series to then file manaus.txt > extractlatlon_bicubintp -f 'ESMGFZ_HYDL_cf_v1.3_24h_*.nc' -s stationlist.txt -v time duV duEW duNS -o lsdmhydl This will extract the variables duV, duEW, duNS including the time information, from all hydrological loading files ESMGFZ_HYDL_cf_v2.0_24h_yyyy.nc at the locations listed in the file stationlist.txt and writes the time series into single files named lsdmhydl.stationID.txt. The file stationlist.txt consist of 2 or 3 columns with station name or ID (optional), latitude, longitude. If latitude and longitude are switched, use option -c lonlat. > extractlatlon_bicubintp -f 'ESMGFZ_NTAL_CF_v1.0_03h_*.nc' -m lwmask_AOD_0.5.nc -s stationlist.txt -c xyz -v time duV duNS duEW -o NTALseries this will extract the variables duV, duEW, duNS including the time information, from all atmospheric loading files ESMGFZ_NTAL_CF_v1.0_03h_yyyy.nc at the locations listed in the file stationlist.txt and writes the time series into single files named NTALseries.stationID.txt. The file stationlist.txt consist of 3 or 4 columns with station name or ID (optional), x-coordinate, y-coordinate, and z-coordinate (-c xyz). The -m option avoids interpolation over the coastline defined in land-water maskfile lwmask_AOD_0.5.nc (mask that was used for IB correction). |
|