Friday, January 19, 2018

Research Note #13 - WRF-ARW, NetCDF 3.6.3 and ARWPost Installation

One thing I would anxiously like to check since beginning WRF-CHEM study is whether the output could be post-processed by ARWPost, one of the original post-processor of WRF-ARW. While ARWPost could only provide limited diagnostics of the model output compared to UPP, it's definitely much more simple and straightforward. Moreover, the failure of UPP to process the chemical fields from WRF-CHEM output really urged me to check it out. 

After the first try on FX-10, I found out that the tool was outdated. The latest version was released in 2011 and I couldn't install it using NetCDF 4.4 library. I somehow managed to install it using the older NetCDF (version 3.6.3), but the tool failed to read WRF-CHEM outputs. Nevertheless, after switching from FX-10 to O-PACS, I would like to try installing it once again.

Before installing the tool, I tried to find out the cause of failure. The following were my hypothesis:
  • ARWPost program uses old NetCDF functions in the source code, hence failing the installation when used the latest NetCDF libraries.
  • ARWPost program could only read WRF-ARW instead of WRF-CHEM because the difference of the output fields between those two.
In order to prove those hypothesis, I re-installed WRF model once again, this time without CHEM add-on (original WRF-ARW), in another directory. After the model was successfully compiled, I tried to install ARWPost. For the first try, I used the original NetCDF (version 4.4), and it failed like last time. Then I installed NetCDF 3.6.3 and used the library for ARWPost installation. This time, it worked, the compilation was successful. So, ARWPost did indeed only worked with older NetCDF. While NetCDF supports backward compatibility, the reason why ARWPost could not be installed with older NetCDF functions still remained a mystery for me.

---------------------------

Update: ARWPost Installation
Since I moved to another supercomputer with much more updated compiler, I couldn't use the old compiler to compile netcdf 3.6.3. Therefore, I uploaded pre-compiled binaries of that version for future ARWPost installation. 

Download link
Password: yj36ubxw

Using the pre-compiled binaries, it's not necessary to build and install netcdf 3.6.3 anymore. Just copy the directories, set the environment variable of netcdf into the directories, and you are ready to install ARWPost.

----------------------------

The next one was to find out whether ARWPost could read either WRF-ARW or WRF-CHEM output, or both of them. I run WRF-ARW first and read the output with ARWPost, and it worked flawlessly. Next, reading WRF-CHEM output.



!!!!!!!!!!!!!!!!
  ARWpost v3.1
!!!!!!!!!!!!!!!!

FOUND the following input files:
 ./testchem.nc

START PROCESSING DATA

   WARNING --- I do not recognize this data.
               OUTPUT FROM *             PROGRAM:WRF/CHEM V3.8.1 MODEL
               Will make an attempt to read it.


 Processing  time --- 2017-11-01_00:00:00
   Found the right date - continue
 WARNING: The following requested fields could not be found
            height
            pressure
            tk
            tc

 Processing  time --- 2017-11-01_01:00:00
   Found the right date - continue

 Processing  time --- 2017-11-01_02:00:00

   Found the right date - continue

...

Processing  time --- 2017-11-02_00:00:00
   Found the right date - continue

DONE Processing Data

CREATING .ctl file

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!  Successful completion of ARWpost  !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Surprisingly, It worked for both model output and the version difference of NetCDF had no effect at all. It sure showed some warning when it read the output, but overall, the post-processing was successful. Anyway, the best news is, it could read all chemical fields in the output file. This is some fields from the output CTL.

PM2_5_DRY     24  0  pm2.5 aerosol dry mass (ug m^-3)
PM10          24  0  pm10 dry mass (ug m^-3)
DMS_0          1  0  dms oceanic concentrations (nM/L)
PHOTR201      24  0  cl2 photolysis rate (min{-1})
PHOTR202      24  0  hocl photolysis rate (min{-1})
PHOTR203      24  0  fmcl photolysis rate (min{-1})
so2           24  0  SO2 mixing ratio (ppmv)
sulf          24  0  SULF mixing ratio (ppmv)
dms           24  0  DMS mixing ratio (ppmv)
msa           24  0  MSA mixing ratio (ppmv)
P25           24  0  other gocart primary pm25 (ug/kg-dryair)
BC1           24  0  Hydrophobic Black Carbon (ug/kg-dryair)
BC2           24  0  Hydrophilic Black Carbon (ug/kg-dryair)
OC1           24  0  Hydrophobic Black Carbon (ug/kg-dryair)
OC2           24  0  Hydrophilic Black Carbon (ug/kg-dryair)
DUST_1        24  0  dust size bin 1: 0.5um effective radius (ug/kg-dryair)
DUST_2        24  0  dust size bin 2: 1.4um effective radius (ug/kg-dryair)
DUST_3        24  0  dust size bin 3: 2.4um effective radius (ug/kg-dryair)
DUST_4        24  0  dust size bin 4: 4.5um effective radius (ug/kg-dryair)
DUST_5        24  0  dust size bin 5: 8.0um effective radius (ug/kg-dryair)
SEAS_1        24  0  sea-salt size bin 1: 0.3um effective radius (ug/kg-dryair)
SEAS_2        24  0  sea-salt size bin 2: 1.0um effective radius (ug/kg-dryair)
SEAS_3        24  0  sea-salt size bin 3: 3.2um effective radius (ug/kg-dryair)
SEAS_4        24  0  sea-salt size bin 4: 7.5um effective radius (ug/kg-dryair)
P10           24  0  other gocart primary pm10 (ug/kg-dryair)

That was really good since ARWPost could also interpolate sigma level from WRF output into pressure level. It will make my job much easier in the future. After opened it on GrADS:


The conclusion is, while it can only work with older NetCDF libraries (unless you modify the source code), ARWPost could read the model output, as long as it uses the same dynamic solver (ARW). Anyway, I still have no idea why it couldn't read WRF-CHEM output on FX-10.

    

No comments:

Post a Comment