Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

New User Guide for WRF-GHG / WRF-VPRM

callewaerts

New member
Hello WRF-GHG Community,

I'm excited to share a new resource that I hope many of you will find useful: “WRF-GHG User Guide.” You can access it via this DOI link:
🔗 WRF-GHG user guide - Repository of BIRA-IASB

What’s Inside?

This guide offers a comprehensive overview focused on the greenhouse gas option of WRF-GHG (chem_opt=17), where CO2, CH4 and CO are handled as passive tracers. It is also relevant for users of the CO2-only option, often referred to as WRF-VPRM (chem_opt=16). The guide consolidates and organizes various pieces of information about this option that I found useful but were not clearly explained in the official documentation.

Why This Guide?

As a fellow WRF user, I noticed a gap in the available documentation, which is evident from the many topics on this forum regarding this option. This guide aims to bridge that gap by providing a practical overview based on my personal experience and various existing resources.

Get Involved

I would love to hear your feedback and suggestions for improvement. If you find the guide helpful or have additional insights to share, please contribute your thoughts here or contact me directly.

Thank you, and I hope this guide enhances your experience with WRF-GHG!

Best regards,
Sieglinde Callewaert

PhD student

Royal Belgian Institute for Space Aeronomy (BIRA-IASB), Uccle, Belgium
University of Liège, Liège, Belgium
 
This is great! I've bookmarked it and it's already proved to be helpful to me.

I am struggling with the PyVPRM system, though. I noticed that the MODIS satellite imagery is in HDF4 files, while the examples to run PyVPRM use NetCDF files, and I have, as of yet, not been able to convert the HDF4 files into a NetCDF format that the PyVPRM can run. How did you get PyVPRM to run successfully?
 
Thank you for your kind words! I'm glad you found the document helpful.
Unfortunately, I haven't had the opportunity yet to learn to use this new pyVPRM system myself. I currently only have experience with the 'VPRM Preprocessor' in R. I do plan to use pyVPRM in the future though.
Maybe post a separate topic on pyVPRM and other users might be able to help sooner?
 
Thank you for your kind words! I'm glad you found the document helpful.
Unfortunately, I haven't had the opportunity yet to learn to use this new pyVPRM system myself. I currently only have experience with the 'VPRM Preprocessor' in R. I do plan to use pyVPRM in the future though.
Maybe post a separate topic on pyVPRM and other users might be able to help sooner?
Hi callewaerts,

Thanks for your user guide which is really helpful!

I have encountered some issues while using the WRF-VPRM model.

Firstly, In my recent simulations, I noticed that the CO2_BIO values are all positive. My understanding is that these values should represent both carbon uptake and release, hence there should be both positive and negative values. I attached my namelist.input, I appreciate that you could give me some advice!

Secondly, I have read your article on using WRF-Chem to simulate the Xianghe region and have downloaded some of your data. I noticed that in your dataset, the biogenic and oceanic emissions are present and relatively stable from the bottom layer all the way to the top. However, in my simulation results, these emissions approach zero by around the tenth layer.Could you please explain why there is such a difference? Is there something specific in the model configuration or input data that I might be missing?
 
Last edited:
Hi callewaerts,

Thanks for your user guide which is really helpful!

I have encountered some issues while using the WRF-VPRM model.

Firstly, In my recent simulations, I noticed that the CO2_BIO values are all positive. My understanding is that these values should represent both carbon uptake and release, hence there should be both positive and negative values. I attached my namelist.input, I appreciate that you could give me some advice!

Secondly, I have read your article on using WRF-Chem to simulate the Xianghe region and have downloaded some of your data. I noticed that in your dataset, the biogenic and oceanic emissions are present and relatively stable from the bottom layer all the way to the top. However, in my simulation results, these emissions approach zero by around the tenth layer.Could you please explain why there is such a difference? Is there something specific in the model configuration or input data that I might be missing?
Hi liwenjia,

Indeed, the CO2_BIO field represents both carbon uptake and release. If your fields are all positive and you expect to see uptake because there is photosynthesis in the area and season you are simulating, there is indeed something wrong. I don't see your namelist attached here, but some possible reasons are:
- You are looking at the simulated fluxes on top of a fixed offset. In my guide I explain that it is common to manually set an offset to those tracer fields that can become negative as they represent some kind of uptake (e.g. CO2_BIO). This is to ensure positive advection of tracers as it is unsure if the model handles negative values correctly. You have to add this yourself in the wrfinput and wrfbdy files and subtract it in post-processing. I assume this is also the reason why my output files of the Xianghe study have relatively stable values from the bottom to the top: I added an offset of 50 ppm to all layers.
- There is something wrong in the VPRM input files, whereby the uptake is not calculated. A good way to verify if this is to add the ebio_gee and ebio_res fields in the output by creating an IO text file (see general WRF guide) or adjusting the registry.chem. Then you can directly see if the values of the fluxes make sense or not. If the fluxes are zero, or at least the ebio_gee, then there will be something wrong in the VPRM module, likely linked to the input files.
- A final option that I see for now is related to your namelist settings, which I can not verify here. Make sure you activate the VPRM module by using the namelist settings described in the guide.

Hope this helps,
Sieglinde
 
Hi, callewaerts,

Thanks for your effort on this new user guide, you even can't believe it bring how much help to me!

But I still met some problems when I am running WRF-VPRM, I doubt I made mistakes in namelist.input ,could you please check my namelist.input and give me advice? What's more, I'll apperaciate it if you can offer your example namelist.input, I firmly believe it will be important to me!

Best regards!
 

Attachments

  • namelist.input
    5.4 KB · Views: 20
Hi Callewaerts,

Thank you for the new user guide, this is exactly what I needed for my research work.
In your guide, you mentioned, "three kinds of external input data are essential to successfully run the WRF-GHG model: surface atmosphere fluxes, specific input that is required by the modules that calculate online biogenic fluxes and chemical initial and lateral boundary conditions." I am currently only interested in generating a tracer for point source anthropogenic CH4 Emission (one that I define myself). I was wondering if creating an online biogenic fluxes is required for WRF-GHG to run.

Thank you again for your great work!!
 
Hi, callewaerts,

Thanks for your effort on this new user guide, you even can't believe it bring how much help to me!

But I still met some problems when I am running WRF-VPRM, I doubt I made mistakes in namelist.input ,could you please check my namelist.input and give me advice? What's more, I'll apperaciate it if you can offer your example namelist.input, I firmly believe it will be important to me!

Best regards!
Dear zhong,

I am glad to hear it has already been useful for other scientists!
Regarding your namelist.input, I see you have set "bio_emiss_opt = 0" whereby the online biogenic modules (VPRM and Kaplan) will not be activated. To include the VPRM module set bio_emiss_opt to 16, and to include both it needs to be 17.
You can find the namelist.input of my latest study with WRF-GHG here: WRF-Chem simulations of CO2, CH4 and CO around Xianghe, China - Repository of BIRA-IASB.

Hope this helps!
 
Hi Callewaerts,

Thank you for the new user guide, this is exactly what I needed for my research work.
In your guide, you mentioned, "three kinds of external input data are essential to successfully run the WRF-GHG model: surface atmosphere fluxes, specific input that is required by the modules that calculate online biogenic fluxes and chemical initial and lateral boundary conditions." I am currently only interested in generating a tracer for point source anthropogenic CH4 Emission (one that I define myself). I was wondering if creating an online biogenic fluxes is required for WRF-GHG to run.

Thank you again for your great work!!
Dear kwyang

I suppose it is possible to run WRF-GHG without the online biogenic modules by setting bio_emiss_opt=0. This will lead to the required additional input files not being read whereby the modules won't be executed. This will likely result in only including 'offline' emissions that you create yourself.
However, if this is the sole purpose of your WRF-Chem runs, WRF-GHG (chem_opt=16 or 17) might not be the right option for you. If I am not mistaken, there is also a tracer option for WRF-Chem that might be worth checking out.

Kind regards
 
This is great! I've bookmarked it and it's already proved to be helpful to me.

I am struggling with the PyVPRM system, though. I noticed that the MODIS satellite imagery is in HDF4 files, while the examples to run PyVPRM use NetCDF files, and I have, as of yet, not been able to convert the HDF4 files into a NetCDF format that the PyVPRM can run. How did you get PyVPRM to run successfully?
I had the same Problem. I simply changed .nc to .hdf in
file_collections = glob.glob(os.path.join(cfg['sat_image_path'], '*h{:02d}v{:02d}*.hdf'.format(i[0], i[1])))

Then I got the error

File "rasterio/_base.pyx", line 312, in rasterio._base.DatasetBase.__init__
rasterio.errors.RasterioIOError: '.../pyVPRM/pyVPRM_examples/wrf_preprocessor/data/modis/hdf/2022/MOD09A1.A2022313.h12v09.061.2022322054746.hdf' not recognized as being in a supported file format.

and took took me quite a lot of trial an error to figure out the correct conda environment:

name: pyvprm
channels:
- conda-forge
- defaults
dependencies:
- python=3.12
- esmpy
- esmf
- netcdf4
- dask
- numpy
- rioxarray
- rasterio
- proj-data


and I have to move the output from the "./out" directory to avoid another error:

line 163, in to_wrf_output lcm = lcm.to_dataset(name='vegetation_fraction_map')
---
AttributeError: 'Dataset' object has no attribute 'to_dataset'


But finally it Works!
 
I had the same Problem. I simply changed .nc to .hdf in
file_collections = glob.glob(os.path.join(cfg['sat_image_path'], '*h{:02d}v{:02d}*.hdf'.format(i[0], i[1])))

Then I got the error

File "rasterio/_base.pyx", line 312, in rasterio._base.DatasetBase.__init__
rasterio.errors.RasterioIOError: '.../pyVPRM/pyVPRM_examples/wrf_preprocessor/data/modis/hdf/2022/MOD09A1.A2022313.h12v09.061.2022322054746.hdf' not recognized as being in a supported file format.

and took took me quite a lot of trial an error to figure out the correct conda environment:

name: pyvprm
channels:
- conda-forge
- defaults
dependencies:
- python=3.12
- esmpy
- esmf
- netcdf4
- dask
- numpy
- rioxarray
- rasterio
- proj-data


and I have to move the output from the "./out" directory to avoid another error:

line 163, in to_wrf_output lcm = lcm.to_dataset(name='vegetation_fraction_map')
---
AttributeError: 'Dataset' object has no attribute 'to_dataset'


But finally it Works!
Hello, I had a problem when running pyvprm, I don't know if you have encountered. Looking forward to your reply, Thank you!!!
 

Attachments

  • 微信图片_20240926144653.png
    微信图片_20240926144653.png
    156.5 KB · Views: 9
Hello WRF-GHG Community,

I'm excited to share a new resource that I hope many of you will find useful: “WRF-GHG User Guide.” You can access it via this DOI link:
🔗 WRF-GHG user guide - Repository of BIRA-IASB


What’s Inside?

This guide offers a comprehensive overview focused on the greenhouse gas option of WRF-GHG (chem_opt=17), where CO2, CH4 and CO are handled as passive tracers. It is also relevant for users of the CO2-only option, often referred to as WRF-VPRM (chem_opt=16). The guide consolidates and organizes various pieces of information about this option that I found useful but were not clearly explained in the official documentation.

Why This Guide?

As a fellow WRF user, I noticed a gap in the available documentation, which is evident from the many topics on this forum regarding this option. This guide aims to bridge that gap by providing a practical overview based on my personal experience and various existing resources.

Get Involved

I would love to hear your feedback and suggestions for improvement. If you find the guide helpful or have additional insights to share, please contribute your thoughts here or contact me directly.

Thank you, and I hope this guide enhances your experience with WRF-GHG!

Best regards,
Sieglinde Callewaert

PhD student

Royal Belgian Institute for Space Aeronomy (BIRA-IASB), Uccle, Belgium
University of Liège, Liège, Belgium
this new for me, i think this one will be really usefull with the condition nowdays, thanks for this share, i will learn it
 
Hello, I had a problem when running pyvprm, I don't know if you have encountered. Looking forward to your reply, Thank you!!!
Hi, I think this is a bug in the code to divide by zero there, although i did not look into the code in detail to fix the bug. I get the same error but it is running successfully.
 
Hi,
is it possible that the vegetation type of VPRM is not used in the Noah surface physics scheme? There are 16 vegetation types in LU_INDEX and IVGTYP I was trying to find out if there is any remapping from the plant functional types (PFT) used by VPRM but I think there is none. This would mean that on some gridpoints the PFTs from Noah and VPRM can be mixed. The temperature signal from e.g. grassland could drive VPRM which has e.g. needleleaf forest at that pixel.

Does anyone know how to use the VPRM vegetation types in the surface scheme?

Best Regards,
Matthias Reif.
 
Hello WRF-GHG Community,

I'm excited to share a new resource that I hope many of you will find useful: “WRF-GHG User Guide.” You can access it via this DOI link:
🔗 WRF-GHG user guide - Repository of BIRA-IASB


What’s Inside?

This guide offers a comprehensive overview focused on the greenhouse gas option of WRF-GHG (chem_opt=17), where CO2, CH4 and CO are handled as passive tracers. It is also relevant for users of the CO2-only option, often referred to as WRF-VPRM (chem_opt=16). The guide consolidates and organizes various pieces of information about this option that I found useful but were not clearly explained in the official documentation.

Why This Guide?

As a fellow WRF user, I noticed a gap in the available documentation, which is evident from the many topics on this forum regarding this option. This guide aims to bridge that gap by providing a practical overview based on my personal experience and various existing resources.

Get Involved

I would love to hear your feedback and suggestions for improvement. If you find the guide helpful or have additional insights to share, please contribute your thoughts here or contact me directly.

Thank you, and I hope this guide enhances your experience with WRF-GHG!

Best regards,
Sieglinde Callewaert

PhD student

Royal Belgian Institute for Space Aeronomy (BIRA-IASB), Uccle, Belgium
University of Liège, Liège, Belgium
Hi @callewaerts,

thank you for writing and sharing this useful guide.

I have a question: how to estimate/where to get the CPOOL variable needed to calculate wetland CH4 emissions? From older manuals and various articles, and also as stated in the module_ghg_fluxes.F code, it seems to be representing one of the outputs from the LPJ-GUESS model, specifically the size of the fast carbon pool. Have you got any suggestion on how to estimate it? Is it necessary to run the LPJ model?

Thank you for your patience.
 
Top