Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Contents


WRF-Chem tools

(https://www2.acom.ucar.edu/wrf-chem/wrf-chem-tools-community)

1. Installation

Paste the below recipe to your terminal

module purge
module load cpeIntel/23.03
module load cray-hdf5-parallel
module load cray-netcdf-hdf5parallel

export FC=ifort 
export NETCDF_DIR=${CRAY_NETCDF_HDF5PARALLEL_PREFIX}
export LD_LIBRARY_PATH=${CRAY_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH}

# GNU 
# --> FC=gfortran
# --> Add -fallow-argument-mismatch

tar xzf ./WRFprechem_XXX.tar.gz

# ANTHRO
cd ./WRFchem_pre/anthro/src/
csh make_anthro  
cd ../
ln -s ./src/anthro_emis .
cd ../../

# BIO
cd ./WRFchem_pre/bio/src/
csh make_util megan_bio_emiss 
cd ../
ln -s ./src/megan_bio_emiss .
cd ../../    

# MOZBC
cd ./WRFchem_pre/mozbc/src/
csh make_mozbc  
cd ../
ln -s ./src/mozbc .
cd ../../

# FIRE
cd ./WRFchem_pre/fire/src/
csh make_fire_emis   
cd ../
ln -s ./src/fire_emis .
cd ../../

# OXYGEN
cd ./WRFchem_pre/oxygen/src/
csh make_util wesely
csh make_util exo_coldens
cd ../
ln -s ./src/exo_coldens .
ln -s ./src/wesely .
cd ../../

Official mozbc have NOT yet support the hybrid sigma-pressure vertical coordinate presented in WRF V3.9 and later. Although there seem to be a workaround (https://groups.google.com/a/ucar.edu/g/wrf-chem-mozbc/c/5nw6cqLRdxw), please proceed with caution.

2. Example: Job submission script

#!/bin/bash
#SBATCH -p memory               # Partition
#SBATCH -N 1                    # Number of nodes
#SBATCH --ntasks-per-node=1     # Number of MPI processes per node
#SBATCH -t 5-00:00:00           # Job runtime limit
#SBATCH -J WRFchem              # Job name
#SBATCH -A ltxxxxxx             # Account *** {USER EDIT} ***

module purge
module load cpeIntel/23.03
module load cray-hdf5-parallel
module load cray-netcdf-hdf5parallel

export OMP_NUM_THREADS=1

ulimit -s unlimited

./megan_bio_emiss < megan_bio_emiss.inp > megan_bio_emiss.log
./anthro_emis     < anthro_emis.inp     > anthro_emis.log
./fire_emis       < fire_emis.inp       > fire_emis.log
./wesely          < wesely.inp          > wesely.log
./exo_coldens     < exo_coldens.inp     > exo_coldens.log

#./mozbc_hybridcoord < mozbc_ic.inp > mozbc_ic.log
#./mozbc_hybridcoord < mozbc_bc.inp > mozbc_bc.log

For more information, please explore /project/common/WRF/Example2/ on LANTA.


Prep_Chem_Sources

The standard dataset for the tool (global_emissions_v3_24aug2015.tar.gz) is available on LANTA at /project/common/WPS_Static/Global_emissions_v3.

1. Download

wget ftp://aftp.fsl.noaa.gov/divisions/taq/global_emissions/prep_chem_sources_v1.5_24aug2015.tar.gz
tar -xzf prep_chem_sources_v1.5_24aug2015.tar.gz

2. Load modules

module purge
module load cpeGNU/23.03
module load cray-hdf5-parallel
module load cray-netcdf-hdf5parallel
module load zlib/1.2.13                               

3. Edit source codes

cd PREP-CHEM-SRC-1.5
vi ./bin/build/include.mk.gfortran.wrf
# 1. Edit NETCDF to --> NETCDF=$(CRAY_NETCDF_HDF5PARALLEL_PREFIX)
# 2. Edit HDF5 to --> HDF5=$(CRAY_HDF5_PARALLEL_PREFIX)
# 3. Edit the last three of HDF5_LIB to --> -L$(EBROOTZLIB)/lib -lz -ldl
# 4. Append -fallow-argument-mismatch to F_OPTS

Edit the file, edgar_emissions.f90, to be compatible with the new gfortran standard (see)

vi ./src/edgar_emissions.f90
# *** Edit initialization of "setor" variable ***
# ---> Add spaces so that they all have equal length, that is,
# character(len=20), dimension(NSETOR) :: setor=(/&
#        'AGRICULTURE',&
#        'ENERGY     ',&
#        'INDUSTRY   ',&
#        'RESIDENTIAL',&
#        'TRANSPORT  '/)

4. Compile prep_chem_sources

cd ./bin/build
make OPT=gfortran.wrf CHEM=RADM_WRF_FIM AER=SIMPLE

User could pass other CHEM and/or AER.

Prep_Chem_Sources can be compiled using Intel compiler as well, the differences are

  1. Load ‘cpeIntel’ instead of ‘cpeGNU’

  2. Edit 'include.mk.intel.wrf' instead of ‘include.mk.gfortran.wrf’

    1. Edit NETCDF, HDF5 and HDF5_LIB as above, but don’t edit F_OPTS

  3. Edit ‘./src/convert_edgar_to_RELACS_REAC.f90’ instead of './src/edgar_emissions.f90'

    1. Comment out ‘use chem1_list'
      (We slightly prefer GNU over Intel compilers due to this step)

  4. Use ‘OPT=intel.wrf’ instead of ‘OPT=gfortran.wrf’

For more information, please explore /project/common/WRF/Example2/ on LANTA.


Contact Us
ThaiSC support service : thaisc-support@nstda.or.th

  • No labels