UNGRIB
Create GFS data under /WRF_Resources
that you just created.
cd /shared/scratch/WRF_Resources
mkdir GFS_Data
cd GFS_Data
Before you start using the Python script, check the Research Data Archive website to see if the data sets for your interested dates are available. To proceed, you need to authenticate yourself for access to the GFS Data. Follow these steps to prepare for downloading the data:
- Visit the website and click on the
Sign in
button. - Select
Sign in with Orcid.org
. If you haven't registered on the Orcid website, you'll need to create an account. - After registering, go to your email account to confirm your email address.
- Once confirmed, navigate back to the Research Data Archive website, and go to the User Dashboard.
- Click on View/Edit Profile. Here, you will find your Orcid ID and API token. Make a note of these details, as they are essential for the next steps.
- With your authentication details at hand, you're set to create a Python script. This script will automate the downloading of the GFS data sets you need. Remember, the script requires your Orcid ID and API token for authentication during the download process.
gfs_downloader.py | |
---|---|
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 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
|
After executing the Python code, enter your ORCID ID
and API Token
. Then, input the start date, end date, and hourly time interval; the code will then generate a list of files to download.
pip3 install requests
python3 gfs_downloader.py
Obtain the path to your GFS_Data
, where, in this case, it is /shared/scratch/WPS
. Go back to the directory where your WPS is compiled and create the symbolic links to the GFS data that you just downloaded. You should expect four GRIBFILE with the same prefix but different labels behind, AAA
, AAB
, AAC
and AAD
.
cd /shared/scratch/WPS
./link_grib.csh /shared/scratch/WRF_Resources/GFS_Data/folder_name/gfs.*
Create the symbolic link to the Vtable.
ln -sf ungrib/Variable_Tables/Vtable.GFS Vtable
ls -alh
Now, it is time to edit the namelist.wps
. Below are a few things that should be amended according to the GFS data:
- start date
- end date
- the interval seconds that describe the interval of your GFS data
Increase your stack limit as the superuser.
sudo -s
ulimit -s unlimited
Export the library path.
export LD_LIBRARY_PATH=/shared/spack/opt/spack/linux-amzn2-zen2/intel-2021.5.0/jasper-2.0.31-skcu73p6hnlgov6teechaq6muly2xrez/lib64/:\$LD_LIBRARY_PATH
Run the ungrib
.
./ungrib.exe
You will see the successful output printed out after ungrib.exe
and four outputs with the prefix FILE
are created.
Remember to exit the superuser by typing exit.
exit