Issues running Flexpart with CIF
Since the commit ba143996, the master branch is supposed to run with FLEXPART footprints, from Nilu and Empa. I have started trying to run the example cases that we had for these cases and noticed some issues. I will reference all my findings here one at a time as I keep unravelling them.
-
Here is a missing argument. It should be
obsvect = obsoper.obsoper(controlvect, self.obsvect, 'fwd',
. But you don't seem to use this simulator at all, do you ? - In the Empa case, we don't have a nested run, we simply have one small domain over Europe, and no global run. So the logic of the code was that in case
nested = False
, there is in fact only the "nested" domain, and no global one. I chose that logic. If you prefer, we can switch the logic around and call the "global" domain the largest one, even when it is not global. - Since we don't have a global run, we use a background that is produced using the Rödenbeck scheme by the TM5-4DVAR model. We get a file with background concentrations at the stations every hour that we can add to the contribution of the local emission multiplied by the "nested" footprints. I had implemented that in the init_background file. I would have expected it in the inicond file but don't see it at the moment.
- The file naming convention that is assumed in flexpart/io/inputs/fluxes.py is still of the form
file_name = 'grid_time_{}_001'.format(file_date)
whereas I had made some (albeit convoluted but necessary) adaptation for this here. So in the current situation, when you callread_flexpart_grid
in theflux_contribution
function, you will never enter the following statement:
if "nc" in path_file:
read_grid_nc
since the name convention does not take it into account.
- In flexpart/io/inputs/fluxes.py, you have a
return
statement if you don't find the corresponding file for a given observation. In the flexpart branch, the corresponding code is acontinue
statement in the obsoper.py file (here and here). This is also followed by an important step of removing the observations afterward if no corresponding footprints were found (see here). This is important and perfectly makes sense since there is no guarantee that we have a footprint for each station at each time step. At Empa, we only have 3-hourly footprints while we have hourly observations. We may also have more measurement station in our dataset than the footprints that we produced (for instance for stations that are outside the domain). I believe it leads to some 0 in thesim
variable of the monitor which does not make sense.