LoginSignup
0
2

More than 5 years have passed since last update.

WRF | WPS > script to obtain NCEP FNL data (2018-03-23) temporary measure for NCAR site problem | GDAS problem

Last updated at Posted at 2018-03-23
動作環境
Xeon E5-2620 v4 (8コア) x 2
32GB RAM
GeForce GT 730 1GB GDDR5
CentOS 6.9 (64bit)
NCAR Command Language Version 6.3.0
for WRF3.7.1, WPS3.7.1
  openmpi-1.8.x86_64 とその-devel
  mpich.x86_64 3.1-5.el6とその-devel
  gcc version 4.4.7 (とgfortran)
for WRF3.9, WPS3.9
  Open MPI v2.1.1
  gcc version 4.9.2 (とgfortran; devtoolset-3使用)
 NetCDF v4.4.1.1, NetCDF (Fortran API) v4.4.4
Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) 
Python 3.6.0 on virtualenv
GNU bash, version 4.1.2(2)-release (x86_64-redhat-linux-gnu)
date (GNU coreutils) 8.4 
tmux 1.6-3.el6

WRF(Weather Research and Forecasting Model)とその前処理であるWPS、およびWRFの後続処理のF***T関連。

状況

WRFの前処理であるWPSで使用するNCEP FNLデータの提供サイトがシステム障害によりダウンしている。
blog: http://ncarrda.blogspot.jp/

2018年3月23日現在、サイトの電源状況は改善したようであるが、ディスク障害の復旧のめどが立っていない。Globusによるデータ配信では、一部のデータ取得に失敗する(例: 5/120ファイル)。

FNLデータはGDASという機関?で処理されたデータのようである。
関連: Link > Alternate access to NCEP data products through NCEP Data Portals | FNLファイルに対応するGDASデータ

fnl_20180121_18_00.grib2gdas.t18z.pgrb2.1p00.f000に関してMD5チェックサム値が同一であることを確認した。

NCARのサイトが復旧するまでのつなぎとして、GDASデータを取得し、WPSにてデータ処理できるようにする。

About

  • obtain GDAS file
    • for 1 month
  • rename to FNL file

get_gdas_180322_exec v0.1

get_gdas_180322_exec
#!/usr/bin/env bash

#
# v0.1 Mar. 22, 2018
#   - delete temporary gdas.* file before downloading
#   - rename to FNL file 
#   - get file from GDAS

set -eu  # just in case


#----
# source directory format (for Jan. 21, 2018 data)
SRCDIRFMT="https://nomads.ncdc.noaa.gov/data/gdas/201801/20180121"
# GDAS filename format (1 degree resolution)
GDAS_FILE="gdas.tTMz.pgrb2.1p00.f000"  # e.g. gdas.t18z.pgrb2.1p00.f000
# FNL filename format (for Jan. 21, 2018 data)
FNL_FILE="fnl_20180121_TM_00.grib2"  # e.g. fnl_20180121_18_00.grib2
#
OUTDIR="DATA/"

#----
# Configuration
YYYYMM="201802"   # year and month to obtain
#----

mkdir -p $OUTDIR
cd $OUTDIR
rm -f gdas.*

for day in $(seq 1 31)
do
    dd=$(printf "%02d" $day)  # e.g. 02
    for tm in "00" "06" "12" "18"  # 6-hourly
    do
        infilename=$(echo $GDAS_FILE | sed 's/TM/'$tm'/g')
        infiledir=$(echo $SRCDIRFMT | sed 's/20180121/'$YYYYMM$dd'/g' | \
            sed 's/201801/'$YYYYMM'/g')
        infilepath="$infiledir/$infilename"

        wget $infilepath

        out_fnl=$(echo $FNL_FILE | sed 's/21/'$dd'/g' | \
            sed 's/201801/'$YYYYMM'/g' | sed 's/TM/'$tm'/g')

        echo $infilepath
        echo $out_fnl

        mv $infilename $out_fnl     
    done
    # exit  # uncomment for debug
done

Execute

Change the year and month to obtain:

#----
# Configuration
YYYYMM="201802"   # year and month to obtain
#----
$ bash get_gdas_180322_exec

DATA/ will be created then files like fnl_20180201_00_00.grib2 will be created.

Disclaimer

I have checked MD5 checksum value between fnl_XXX file and gdas.XXX file and consider that they are identical.
However, this may not hold for the system change.

No responsible for any mistake caused by the above script for the Author.

I strongly recommend to use the NCEP NCAR site when repaired.

Problem at GDAS

0 byte in size

Following file is 0 byte at GDAS. We need to obtain in anoother way.

https://nomads.ncdc.noaa.gov/data/gdas/201802/20180203/
gdas.t00z.pgrb2.1p00.f000

No directory

https://nomads.ncdc.noaa.gov/data/gdas/201801/
No directory for 20180102.

https://nomads.ncdc.noaa.gov/data/gdas/201712/
No directory for 20171231。

Missing file

https://nomads.ncdc.noaa.gov/data/gdas/201803/20180307/
No file: gdas.t06z.pgrb2.1p00.f000
No file: gdas.t18z.pgrb2.1p00.f000

https://nomads.ncdc.noaa.gov/data/gdas/201803/20180312/
No file: gdas.t00z.pgrb2.1p00.f000
No file: gdas.t06z.pgrb2.1p00.f000
No file: gdas.t12z.pgrb2.1p00.f000
No file: gdas.t18z.pgrb2.1p00.f000

for missing GDAS data

If these data are missing from the spinning disk directory, you may request them from the tape archive at

https://www.ncdc.noaa.gov/has/has.dsselect

See model section and pick GDAS (daily or hourly), as desired.

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2