GGPLOT2     HEALTH     R     EMISSIONS     STATISTICS     GIS   WRF Open Air Air Pollution  

sábado, 21 de abril de 2018

WRF open_aux_u : error opening auxinput5_d02_2013-12-31_00:00:00 for reading. 100

So, i got this error:
open_aux_u

Timing for Writing /scr4/sibarra/masp/health/wrfo for domain        2:    4.14512 elapsed seconds
open_aux_u : error opening auxinput5_d02_2013-12-31_00:00:00 for reading. 100


pretty weird because it a met run. According to http://forum.wrfforum.com/viewtopic.php?f=47&t=10003, they recommend diminishing the number of processors.

I ran with 32 and got stuck
I ran with 16 and appear this error open_aux_u : error opening auxinput5_d02_2013-12-31_00:00:00 for reading. 100
I'm running with  8 and still running. 

viernes, 20 de abril de 2018

ERROR: Grib2 file or date problem, stopping in edition_num. Can't ungrib.exe SOLVED

Well, it seems that this problem can be very common.

Usually, you have a directory for downloading the meteorology from NCEP/UCAR. Probably, you will have the script for downloading the data in the same directory.

If you link the grib files based on the name there won't be any problems

./link_grib.csh /path/GFS*
However, it could be possible to link the whole directory. You might do this when you have a whole year of meteorological data.
./link_grib.csh /path/
If you have scripts for downloading the met data in the same directory, THEN you will have the message:
ERROR: Grib2 file or date problem, stopping in edition_num


To avoid this error, just move the script for downloading the met data elsewhere and link the directory again. Finally, do ungrib.exe

miércoles, 18 de abril de 2018

Como compilar CALWRF con diferentes compiladores y versiones de WRF

mi compañero de la Universidad Mario Gavidia, publico en su blog como compilar CALWRF con ifort y correr el programa con datos de salida de WRF o WRF-Chem:

Basicamente tienes que cambiar el compilador en compile.sh y cambiar algunas lineas de calwrf.f

El link es aqui: https://randroll.wordpress.com/2018/04/18/installing-calwrf-on-linux-with-ifort/


martes, 27 de febrero de 2018

Como adicionar o code coverage (codecov) no teu pacote R?


A seguir os pasos para adicionar codecov, do blog Eryk Walczak,  How to add code coverage (codecov) to your R package?

library(devtools)
library(testthat)

use_testthat()

Logo, adiciona a função test. Eu usei a função 'cpt' do meu pacote  cptcity, do arquivo web das cores  cptcity http://soliton.vm.bytemark.co.uk/pub/cpt-city/

use_test("cpt")

Isot cria o arquivo test-cpt.R onde foram feitos os tests.

Aqui, eu mudei a opção por default para ficar:

test_that("cpt works", {
  expect_equal(cpt("mpl_inferno", 10),
               c("#000004", "#1B0C41", "#4B0C6B", "#781C6D",
                 "#A52C60", "#CE4346", "#ED6925", "#FB9906",
                 "#F7D03C", "#FCFFA4")
               )
})



Logo rodei

use_coverage(pkg = ".", type = c("codecov"))

O que cria o arquivo codecov.yml, e logo tem que editar ele e adicionar:

comment: false
language: R
sudo: false
cache: packages
after_success:
- Rscript -e 'covr::codecov()'

Logo, entra no codecov.io e ativa teu repositorio, e no tue proximo  push para github, tu ja deveria estar enxergando o porcentagem de codecov .