Create meteorological forcing files for Cycles or PIHM using NLDAS or GLDAS data
LDAS-forcing can download NLDAS-2 or GLDAS-2.1 forcing data from NASA GES DISC archive, and generate PIHM or Cycles weather files for given locations using NLDAS or GLDAS forcing data. NLDAS-2 and GLDAS-2.1 forcing data are a combination of model and observation based forcing data sets. NLDAS forcing is available from 1 January 1979 to now. GLDAS-2.1 forcing is available from 1 January 2000 to now.
-
Set up an Earthdata account.
-
Create a
.netrcfile in your home directory. This is required by NASA Earthdata forwgetaccess.cd ~ touch .netrc echo "machine urs.earthdata.nasa.gov login <uid> password <password>" >> .netrc chmod 0600 .netrc
where
uidis your user name andpasswordis your Earthdata login password. -
Download the code from the release page.
-
Use
location.txtfile to add locations of interest. -
To use the code, run
python3 LDAS-forcing.py --ldas {GLDAS,NLDAS} --model {Cycles,PIHM} --start START --end ENDThe option
ldasis the choice of LDAS, which can be GLDAS or NLDAS. The optionmodelis the choice of model, which can be Cycles or PIHM. The optionsstartandendare the start and end dates, which should be in the format ofYYYY-MM-DD.
NOTE: The script requires Python netCDF4 module. The package can be installed using
pip install netcdf4Penn State ICDS ROAR users will need to create a Conda environment to install Python packages.
The following instruction will create a Conda environment named my_root,
and install the netCDF4 package in the environment.
module purge
module load anaconda3
conda create -y -n my_root --clone="/opt/aci/sw/anaconda3/2020.07_gcc-4.8.5-bzb"
source activate my_root
conda install -y -c anaconda netcdf4You can also run the install_roar.sh script to install the package.
You will need to activate the environment to run the LDAS-forcing script:
module purge
module load anaconda3
source activate my_rootThe enviroment can be deactivated using
conda deactivate my_root