Dear all, 

I just downloaded CAMS data for the year 2017 for a simulation with WRF-Chem.

I was wondering if you have any advice on how to prepare the data to be ingested by WRF-Chem.

Hope to have some feedback soon

Kind Regards

Joana

30 Comments

  1. Dear Joana,

    I cannot promise you anything at the moment. But I want to let you know that we are looking into this for you and hopefully something will come up in the next couple of weeks/months.

    Kind regards,

    Xiaobo

    1. Dear Xiaobo Yang 

      I see that Bojan Kasic posted an answer for this How to run WRF-Chem using CAMS initial and boundary conditions  , on the confluence documentation : [confluence] User Documentation > How to run WRF-Chem using CAMS initial and boundary conditions

      Although the answer provided is exactly what I need , I can't access the folder/scripts to solve the question, so it's a bit pointless having the answer but being unable to realise it .

      Could you help please ?

      Many thanks

      Kind Regards

      Joana

      1. Dear Joana,

        Well spotted. It is a document in working progress. My colleague doing a lot of tests for the time being. Once we feel it is ready, we will certainly share the information with you. So stay tuned.

        Kind regards,

        Xiaobo

        1. Thanks Xiaobo Yang, I only spotted it because we got an e-mail notification regarding this and when I try to follow the link I couldn't access it.

          Will wait for it to be available then

          Many Thanks

          Regards

          J

        2. Dear Xiaobo Yangthe page is now public (How to run WRF-Chem using CAMS initial and boundary conditions on ECMWF's Cray HPC (CCA[B])), but is a bit pointless if you don't have access to the scripts. I posted this question many months ago, and have been waiting for an answer which Bojan Kasicreplied , but I can't solve it because I don't have access to CAMS_to_WRF_utility/ folder. Is there anyway I can access the scripts ? Hope I can have some sort of help.

          Many Thanks

          Kind Regards

          Joana

          1. Dear Joana Medeiros,

            Thank you for your interest in this topic. As you have already noted, the solution is only available to users with access to our HPC system. We are in the process of providing the solution for general public here and we are waiting for permission to share the peace of code developed externally. Once we have it, we will share it here.

            Thanks for your patience,

            Bojan

            1. That would be great, 

              I will hold for any updates on this...hopefully won't take as many months again (smile)

              Many Thanks

              Kind Regards

              Joana

              1. Hi Joana Medeiros ,

                Here it is:

                How to run the WRF-Chem model using CAMS data as initial and boundary conditions (BC)?

                Sorry you had to wait so much.

                Let us know if you have any problems or questions.

                Bojan

                1. Oh wow, 

                  Thank you so much Bojan Kasic

                  Will try it as soon as possible

                  Kind Regards

                  Joana

                2. Dear Bojan KasicI tried to click the link for the public_box.tar.gz but it comes empty, can't download it : 

                  Step 3: Using mozbc to interpolate CAMS data for WRF

                  With a set of additional utilities, it is possible to use the mozbc package provided by the Atmospheric Chemistry Observations and Modelling Lab (ACOM) of NCAR to pre-process CAMS data with some minor modifications to the original code. The set of additional utilities has been developed as part of the AQMEII project and kindly provided by A. Lupascu (IASS-Posdam) and C. Knote (NCAR): public_box.tar.gz. The package contains:


                  When I click , it sends me back to the top of the page 

                  Is it available publicly ?

                  Thanks

                  J

  2. Dear Xiaobo, 

    Thanks for the reply, 

    Will hold for some feedback 

    Many Thanks

    J

    1. Could you please refresh the article page and try again?

      Let me know if it works.

      Thanks.

      Michela

      1. Hi, yes it does, just downloaded it with no issues

        Many Thanks

        Cheers

        J

  3. Hi all, sorry i'm late to this party, but I have also prepared some scripts to get and process the operational near real time CAMS data and process for use in mozbc. THe species mapping would have to be tailored to your specific wrf-chem set up.  I use mostly python. If there's any interest in these, let me know. 

    Liz

    1. Hi, 

      Oh That would be very helpful yes, all the help is more than welcoming,

      If you don't mind sharing the scripts it would be much appreciated

      Thank you very much Liz Coleman ,

      Joana

  4. get_merge_proc_cams_generic.pyHi , so i'll try talk through the code here, it's not extensively commented. 

    I use python and cdo system command, called through the python script. 


    Function 1: i get the data from cams via wget


    function 2: resample each file to a smaller domain to speed up the processing. this task is farmed out over available processors. the lon lat box of the new datafile  is defined here : domain_red=('-46,46,30,70')


    function 3: we merge all the datafiles to one file per timestep. again, this is performed in parallel. 


    function 4: create a mozart-type file from the merged, reduced domain CAMS dataset. For this, i got the hyam and hybm variable from this site: https://www.ecmwf.int/en/forecasts/documentation-and-support/137-model-levels and wrote them to a text file to be read in by the script. 

    I changed the timestep to the way it is understood by mozbc. 

    o_date=YYMMDD and o_datesec= second of the day. 

    Wrote surpface pressure (PS), taken from lnsp in cams file. 

    finally, wrote the species to the files, looped, converting gas units to mol/mol . 


    This file can then be read in by mozbc. Please let me know if any questions, and if you do use this script, an acknowledgement would be much appreciated! 


    Liz Coleman, C-CAPS, NUI Galway, Ireland




    1. Many thanks for sharing this, Liz!

    2. This is great

      Many thanks for the sharing Liz Coleman

      J

  5. Hello all,

    please, can anybody explain me why we need temperature? I understand surface pressure as we need to calculate model level pressure from P0,PS and hyam hybm. But I am not sure why we need temperature. I went through the codes and I just cant see where it is used. thank you

    1. Hello dasa damaskova ,

      I can confirm that in the example given on page: How to run the WRF-Chem model using CAMS data as initial and boundary conditions (BC)?

      MACC_BC2MOZART.ncl is not processing temperature on model levels from AER_20100101_20100102_eac4_EU.nc file even if the field is present.

      Temperature is needed in meteorological input and boundary conditions.

  6. Hello all,

    In the example: How to run the WRF-Chem model using CAMS data as initial and boundary conditions (BC)?

    I don't know why levels are cut out from level 7 to 60 (from top) in MACC_BC2MOZART.ncl, and it may not consider to convert kg/kg to mol/mol for gases.

    Many thanks for any suggestion. 

    Thank you.

  7. Hello there,

    I am trying to download CAMS data using the GRG python script but I got the following error message

    ecmwfapi.api.APIException: 'ecmwf.API error 1: Resource not found: datasets/cams_reanalysis'

    Did the name of the dataset change to a new one?

    Thanks

  8. Dear all Xiaobo Yang Bojan Kasic Liz Coleman  ,

    I downloaded CAMS data from global atmospheric composition forecast for a simulation with WRF-Chem following the instructions How to run the WRF-Chem model using CAMS data as initial and boundary conditions (BC)?#Step4Runningthemodel

    The process of downloading the grib data with a python request, converting it to netcdf using the script of section 2.2 of the instructions worked well for 2021-08-01 data. So, I could follow next instructions to finally run mozbc and wrf.exe incorporating successfully BC from CAMS to WRF-Chem.

    Get_CAMS_fc_grg_2023.py

    However, when I downloaded same kind of data for 2022 or 2023 (python request attached before) I got problems converting grib data to netcdf. Specifically running the command  cdo -f nc -b 32 -invertlat   GRG_XXXX.grib   GRG_XXXX.netcdf.

    • I got this warning and netcdf output. 

    • There is a problem with parameter pan, which is not defined at timestep 1, although I retrieved and downloaded this parameter inside the same request as the other 7 parameters (see the python request attached)
    • It seems that only 2 of 8 variables were correctly recognized but time dimension were not incorporated for these two variables.
    • Last parameter converted only show param2.20.0. Then I noticed that the grib format of certain chemical parameters changed from mid 2021 between grib edition 1 to grib edition 2https://apps.ecmwf.int/codes/grib/param-db?id=210121

    •  Then I downloaded the last version of cdo but it didn't also recognize the parameter NO2. I also attempted to create my own Parameter table (gribtab) as follows according to the wiki: https://code.zmaw.de/projects/cdo/embedded/index.html#x1-300001.6 but I got probelms with the id for NO and NO2 which are the same in grib2 edition.
    • Finally I tried to convert grib to netcdf using last eccode version with command grib_to_netcdf.  This command worked well recognising the parameters but it didn't incorporate the hybrid coordinates hyai, hybi, hyam, hybm to the netcdf which are essential to follow next steps and run mozbc and wrf.exe.


    I wonder how could I convert grib data to netcdf for NO2, NO, CO, SO2, pan, CH2O CAMS forecast composition chemical species (for 2022 and 2023), obtaining all the parameters with 4 dimensions (time, lev, lat, lon) and the hybrid coordinates hyai, hybi, hyam, hybm in the same output nc file.


    Many thanks,


    Kind regards,


    Maria


    1. Dear Maria Francisca Cardell ,

      Thank you for your detail report. The issue with CDO conversion:

      cdo -f nc -b 32 -invertlat cams.fc.0p40.2023010100.grib cams.fc.0p40.2023010100.nc

      of GRG parameters from latest CAMS is happening because your CDO is built with one of the older versions of ecCodes libraries which isn't compatible with new parameters definition. This can be solved by re-installing CDO against ecCodes 2.28.0.
      I have tested with cdo/2.1.1 build with ecCodes/2.28.0 and the conversion to netcdf worked for both, old and new CAMS GRG data.

      I hope this helps.

      Kind regards,

      Bojan

      1. Thank you very much for your help and you promt response Bojan Kasic !

        I could finally fix the error following your instructions,


        Kind regards,


        Maria

  9. Dear Bojan Kasic Xiaobo Yang Liz Coleman 

    I'm presently using the CAMS global forecast compostion to update the boundary conditions of gaseous species in WRF-Chem using mozbc utility, and found it to be very useful. Now is working using the MOZART option.

    I also want to update the aerosol species from CAMS to use the mozcart option to simulate dust storm episodes. Is there a mapping of mozbc utility to convert the aerosol species from CAMS aerosol module to MOZCART aerosol schemes of WRF-Chem?

    Here is the list of aerosol species available from CAMS.

    Short name      Long name

    aermr01              Sea Salt Aerosol (0.03 - 0.5 um) Mixing Ratio
    aermr02              Sea Salt Aerosol (0.5 - 5 um) Mixing Ratio
    aermr03              Sea Salt Aerosol (5 - 20 um) Mixing Ratio
    aermr04              Dust Aerosol (0.03 - 0.55 um) Mixing Ratio
    aermr05              Dust Aerosol (0.55 - 0.9 um) Mixing Ratio
    aermr06              Dust Aerosol (0.9 - 20 um) Mixing Ratio
    aermr07              Hydrophobic Organic Matter Aerosol Mixing Ratio
    aermr08              Hydrophilic Organic Matter Aerosol Mixing Ratio
    aermr09              Hydrophobic Black Carbon Aerosol Mixing Ratio
    aermr10      Hydrophilic Black Carbon Aerosol Mixing Ratio
    aermr11              Sulphate Aerosol Mixing Ratio


    I've seen that there is a mozbc namelist to convert aerosol data from MOZART global model to use it in WRF-Chem with MOZCART option. Find it attached

    However, I do not know how to compute these mapping factors since CAMS only has 3 dust bins and 3 sea salt bins while MOZCART WRF-Chem has 5 dust bins and 4 sea salt bins.

    MOZCART.inp


    Many thanks,


    Best regards,


    Maria

  10. Sorry for the reply, Maria. I've asked our scientist to have a look.

  11. Hi Xiaobo Yang 
    Aren't there any updates about my last question ?
    The mapping of mozbc utility to convert the aerosol species from CAMS aerosol module to MOZCART aerosol schemes of WRF-Chem ?

    Many thanks,


    Maria

  12. Hi Maria Francisca Cardell,

    Unfortunately I haven't got any rely. I sent another message today. I will keep you updated.

    Sorry about the delay.

    Regards,

    Xiaobo

  13. Dear Maria, 

    Please note, the aerosol and chemistry modelling has been upgraded in June 2023 (48r1). We have now a more detailed representation of aerosols including nitrates, ammonium and secondary aerosols.  Please have a look into the newly written documentation (Part 8) . https://www.ecmwf.int/en/publications/ifs-documentation

    I can not advice you on the mapping on the dust bin from CAMS to MOZCART. But, all the required information about the size distribution for the CAMS dust and sea salt is given in the documentation.  Please note, that sea salt in CAMS is at RH=80%. To calculate dry seal salt you have to convert radius and mass mixing ratio. 

    Johannes