extract data from wrf-ems for weather forecast

All issues/questions about EMS v3.4 package, please ask here.
dominic
Posts: 312
Joined: Thu Jun 14, 2012 7:19 am

Re: extract data from wrf-ems for weather forecast

Post by dominic » Tue Oct 29, 2013 10:59 pm

how did you come to the weather symbol?, php how do you calculate what symbol to insert? I guess you have created a function

raposu
Posts: 26
Joined: Mon Jul 22, 2013 7:20 pm

Re: extract data from wrf-ems for weather forecast

Post by raposu » Wed Oct 30, 2013 3:29 pm

You can add as many variables as you like

Code: Select all

$precipitacion="$objDatos->precipitacion";

$nubosidad="$objDatos->nubosidad";

$viento="$objDatos->viento";

$maxima="$objDatos->maxima";


// N U B O S I D A D 

// below 6 cloudiness, wind less than 40, maximum greater than 0.5 and no precipitation => sun

if ($nubosidad < 6 AND $viento < 40 AND $maxima >=  0.5 AND $precipitacion ==  0 ) 
echo "<img src=./imagenes/34sol.png>";

// above 6 cloudiness, wind less than 40, maximum greater than 0.5 and no precipitation => sun and clouds

if ($nubosidad > 6 AND $nubosidad < 32  AND $maxima >= 0.5 AND $viento < 40 AND $precipitacion ==  0 ) 
echo "<img src=./imagenes/30solnubes.png>";

raposu
Posts: 26
Joined: Mon Jul 22, 2013 7:20 pm

Re: extract data from wrf-ems for weather forecast

Post by raposu » Wed Oct 30, 2013 3:39 pm

dominic wrote:Theoretically, it is difficult to generate many latitudes, just that you create so many grads script identical to the first. Example, the first place you call Paris, the second Rome, and the third Oslo.

In grads run the script at the end of the first and do:

run paris.gs
run rome.gs


in this way you are extracted the data for the other locations. my problem is to create code in php that reads and generates a prediction type by entering your symbols suitable for a specific weather condition.

The interesting thing would be to include hundreds of latitudes in the database and then according to demand to create a graphic map one table a meteogram etc ....

I do not know how to include the data in mysql and also rescue

This way you have all the information in the database, when the user goes to the site makes a request for its latitude (predefined) and appears all iformación transformed into icons, text, images etc ....
Last edited by raposu on Wed Oct 30, 2013 5:06 pm, edited 1 time in total.

dominic
Posts: 312
Joined: Thu Jun 14, 2012 7:19 am

Re: extract data from wrf-ems for weather forecast

Post by dominic » Wed Oct 30, 2013 4:40 pm

1) Extract the data and create different grads. Txt file, eg

Paris.txt
Rome.txt
Berlin.txt etc.

2) Read data from txt file and upload Mysql

3) Read the data with php mysql and put them on the screen.

With the trick to retrieve files gfs script to instill an grads solve everything;) in any file you put the coordinates that interest you.

The bad thing is that it has many scritp in the Scripts folder, but I think it's worth it.


The mole that I would like to solve is that automation of grads, that is, turn on the computer automatically and to make the model all operations for a particular domain

raposu
Posts: 26
Joined: Mon Jul 22, 2013 7:20 pm

Re: extract data from wrf-ems for weather forecast

Post by raposu » Wed Oct 30, 2013 5:09 pm

dominic wrote:1)


The mole that I would like to solve is that automation of grads, that is, turn on the computer automatically and to make the model all operations for a particular domain
edit your crontab and solved

dominic
Posts: 312
Joined: Thu Jun 14, 2012 7:19 am

Re: extract data from wrf-ems for weather forecast

Post by dominic » Wed Oct 30, 2013 5:18 pm

raposu wrote:
dominic wrote:1)


The mole that I would like to solve is that automation of grads, that is, turn on the computer automatically and to make the model all operations for a particular domain
edit your crontab and solved

Honestly, this is what I can not do

The smugglers on the server know how to use, to launch web applications automatically at a preset time. What I would do assuming that the pc I turn it on manually:

1) Open terminal
2) perform a particular domain ems_autorun
3) Open grads
4) executing the run that script


I honestly do not know how to set it not knowing the language perl.

raposu
Posts: 26
Joined: Mon Jul 22, 2013 7:20 pm

Re: extract data from wrf-ems for weather forecast

Post by raposu » Wed Oct 30, 2013 5:32 pm

Code: Select all

#! /bin/tcsh
# A script to automate weather forecasting...
cd usr1/wrfems/runs/your_domain/
#run current model
ems_autorun --dset gfsptiles
would "your-file.tcsh"

edit your crontab

Code: Select all

38 04 * * * tcsh /home/dominic/your-carpeta/your-file.tcsh
then automatically begin work at 4:38 a.m.

dominic
Posts: 312
Joined: Thu Jun 14, 2012 7:19 am

Re: extract data from wrf-ems for weather forecast

Post by dominic » Thu Oct 31, 2013 7:29 am

Rapsu Hello, thank you suggestions but I have not figured out exactly what to do.

I can guide you step by step?, I use Ubuntu as the OS on which it runs wrf-ems

I did not understand how should I do to start the run as soon as you turn on the PC, assuming that I want to run the pc to 07.00 in the morning, at 7:05 should start the run ....

I do not know the smuggler's why I do not know how to activate it.


PS: I would also have an ftp program to upload data and maps on my server. What do you use?

Thank you if you can help

dominic
Posts: 312
Joined: Thu Jun 14, 2012 7:19 am

Re: extract data from wrf-ems for weather forecast

Post by dominic » Thu Oct 31, 2013 8:05 am

rapsu a question, but once completed the run, how do you retrieve the data? grads always use it?

I should also enter the command for automatic extraction of grads in crontab

meteoadriatic
Posts: 1512
Joined: Wed Aug 19, 2009 10:05 am

Re: extract data from wrf-ems for weather forecast

Post by meteoadriatic » Thu Oct 31, 2013 3:11 pm

dominic wrote:I did not understand how should I do to start the run as soon as you turn on the PC, assuming that I want to run the pc to 07.00 in the morning, at 7:05 should start the run ....
Here is crontab guide that will help you:
https://help.ubuntu.com/community/CronHowto

It is best that you do not turn off PC, set crontab entry and leave it on all the time...
dominic wrote:I should also enter the command for automatic extraction of grads in crontab
No, don't run postprocessing with crontab because you will most probably have problems. Use runs/domainname/conf/ems_post/post_grads.conf (POSTSCR entry) to start grads script automatically after UPP finish.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests