Giter Club home page Giter Club logo

vein's Issues

filter by na in my_age?

if
veh <- veh$PC <- c(0, 0, 0, 1, 2, 3 , NA, NA)
0 means that vehicles produced at first and second age (index). Last two NA indicates that the didnt exist vehicles at age 7 and 8. For instance, these type of vehicles started being produced at age 6 but the data already includes the last two NA.

Maybe, it could be a good idea include a filter for excluding NA in this parameter

veh$PC[!is.na(veh$PC)]

vein should not depend on sp

According to Writting R Extensions, in DESCRIPTION, the field Depends should be nowadays used rarely, only for packages which are intended to be put on the search path to make their facilities available to the end user, for instance, latticeExtra depends on *lattice. In the case of vein, few times sp functions are called therefore it is not justified.

improve time in emis_wrf and change name?

time in wmis_wrf should use attr(x, "tzone") <- "tz". Therefore, the argument "utc" is not necesary anymore. Also, the name 'wrf' it is no t necessary because it could be used with different models. This function l probably will be deprecated once it is ready the package eix, which will export emissions to different, models, including WRF.

Output of emis_wrf according to 6 hours meteorological data

When running WRF-Chem or other atmospheric models it is necessary meteorological data as input. This data has different temporal resolution and must match with UTC hourly emissions, in general.
A common database is NCAR/UCAR Global Forcast System https://rda.ucar.edu/datasets/ds335.0 but time resolution is each 6 hours. There are other datasets of 3 hours time resolution. Therefore, it would be convenient to have an argument in emis_wrf to match the hours of the emissions to the hours UTC of the meteorological data.

dataframe for storing emi_post df outputs?

It would be good to include an argument in emis_post that point to a path with a data-frame to rbind newer results. This can wotk like a data-base with newer dependencies, only base.

Deberia emis_post incluir otra clasificación?

los argumentos de emis_post son:

args(emis_post)
function (arra, veh, size, fuel, pollutant, by = "veh") 

veh, size, fuel y pollutant son strings para generar una base de datos clasificada. Sin embargo, podria ser mejor incluir una classificación desde lo mas general a lo mas particular:

  • fam (family): PC, LCV, HGV, Bus o MC
  • subfam: HGV-A (A de Articulado), HGV-R (R de Rigido), Coach.
  • fuel: fuel
  • size: cilindradas del motor o peso bruto del camión
  • vehcomp: nombre compuesto de la composición vehicular. Por ejemplo: PC_E25_1400.

Generará una base de datos mas pesada pero mejor clasificada.

ef_* accepts vectorized arguments

ed_* emission factors functions are useful but when integrating into a street reality, lacks flexibility. For instance, there are arguments to account for load and gradient but one at the time. It would be good that these functions accept vectorized values, for example:
gradient <- c(0, 0.2, 0.4, 0.6) Representing streets with gradient 0, 0.2, 0.4 and 0.6. The length of this vectorized arguments should be equal to the number of streets. This function should allow having different values at different hours, for example, for evaluating the hourly variation of load in urban buses or trucks.

Improve plots

Plots should be spatial and temporal. These plots will be improved after migrating to sf

Support for sf

sf is an R package of spatial features. VEIN needs to migrate its dependencies from sp to sf

speciate IAG needs to be fixed

the updated speciation of IAG excluded CH3OH and KET incorrectly added. This implies to change the function speciate.

pc_profile

I was wondering why the emissions profile does not add 24 * 7 = 168.
I always thought that the sum of the emissions of all hours of the day of the week should add up to the total emissions for that week with a uniform profile.
Thanks in advance,
Mel

mechanism for emis_wrf need to be updated

emis_Wrf depends on AAS4WRF (Vera, 2015) configuration. This configuration has changed. Now it is for mechanism CBMZ. The pollutants 36 species. The output of emis_wrf should contain one column per pollutant and in the case that there are no emissions, the column should have filled with 0.
Compounds:

  • "E_SO2"
  • "E_NO"
  • "E_ALD"
  • "E_HCHO"
  • "E_ORA2"
  • "E_NH3"
  • "E_HC3"
  • "E_HC5"
  • "E_HC8"
  • "E_ETH"
  • "E_CO"
  • "E_OL2"
  • "E_OLT"
  • "E_OLI"
  • "E_TOL"
  • "E_XYL"
  • "E_KET"
  • "E_CSL"
  • "E_ISO"
  • "E_NO2"
  • "E_CH3OH"
  • "E_C2H5OH"
  • "E_PM25I"
  • "E_PM25J"
  • "E_SO4I"
  • "E_SO4J"
  • "E_NO3I"
  • "E_NO3J"
  • "E_ORGI"
  • "E_ORGJ"
  • "E_ECI"
  • "E_ECJ"
  • "E_SO4C"
  • "E_NO3C"
  • "E_ORGC"
  • "E_ECC"

skeleton function needed

It is needed an 'skeleton' function to create folders fir i/o in a known structure, or skeleton. This functons could be named vein::vein and will use dir.create and other file functions.

This functions must be flexible in order to produce folders and/or files.

EmissionsArray, maybe 3 dimensions??

An EmissionsArray has 4 dimensions, number of streets, the category of vehicles, hours and days. However, as the last two dimensions represent time, maybe it could be better to eliminate the last dimension and the third dimensions could be only the total number of hours.

Function to work with units in data.frames

Sometimes it is necessary to convert to units or unclass several columns of dataframes. In other occasions, it is necessary to add units. It would be convenient to create a function to do that.

data.table?

VEIN functions could include the dependency on data.table functions so that it produces faster estimations. This could imply in modification in all function but these modifications should be only internal, they must preserve the same arguments

NMHC Speciation IAG incorrect

The speciation of NMHC from tunnel studie of IAG/USP is incorrect. There is no emissions of methanol. New table will be fixed in next commit

Add summary in emis_wrf output

The user must convert the emissions from grams to mol before using emis_wrf. It would be convenient to add a summary of the output when using emis_wrf.

emis_merge

Emissions are estimated for each type of vehicle, street different hour. Also, emis_post generates
three type of files. At the end there are a lot of files. Hence, an emis_merge function would be useful. This function will not be related with the base::merge functions, but, it will load all emissions according to an specific format and mergte,rbind,cbind them (see #36).

It is important to preserve any spatial attribute, so this function would work better with sf objects (see #5 )

adt?

Average Daily Traffic (ADT) is a common metric in transportation studies, used also as input for estimating emissions. It should be included

inventory

linha 46 e 47 deveria ter deparse para o tipo de veiculo

add flexibility in age functions

Age functions allow producing age distribution of vehicles in circulation. The functions are base on scrapping functions of the National Emissions Inventory for Brazil, 1996 and 2001. These functions can be restrictive and need to be updated. The goal is to have functions that can represent on average, a specific vehicular market.

ef_nitro error form some categories

ef_nitro presents an error when filtering for some parameters. The problem is that there are still some values "ALL" that need to be changed at internal data.

add emis_topdown

This function would allow estimating top-down vehicular emissions. Possible features:

  • It allows estimations with mileage by age of use.
  • Read spatial polygons with fleet by type of vehicle and/or mileage by age of use.
  • If it is used average hourly mileage, it could be used directly inside emis.
  • Reads emission factors for n pollutants
  • Produces an EmissionsArray which could be processed with emis_post to produce a data-base.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.