extract data from wrf-ems for weather forecast

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

Re: extract data from wrf-ems for weather forecast

Post by dominic » Thu Oct 31, 2013 4:15 pm

Meteoadriatc Hello, thank you for answer.

basically I created a script with grads that extracts data for certain points of lat and lon. Only that I have to start grads and launch "run_namescript", to ensure that grads will extract the data and save the contents to a file. Txt

How do I via crontab?

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

Re: extract data from wrf-ems for weather forecast

Post by dominic » Thu Oct 31, 2013 4:21 pm

However, I do not want to keep turned on the PC, as I would only data 00Z, then the PC will have to be turned up twice a day.

Ignition is via bios.

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

Re: extract data from wrf-ems for weather forecast

Post by meteoadriatic » Thu Oct 31, 2013 5:52 pm

dominic wrote:Meteoadriatc Hello, thank you for answer.

basically I created a script with grads that extracts data for certain points of lat and lon. Only that I have to start grads and launch "run_namescript", to ensure that grads will extract the data and save the contents to a file. Txt

How do I via crontab?
Again, proper way to start your script is through POSTSCR field of wrfems/ runs/domainname/conf/ems_post/post_grads.conf

If you really want to not do that proper way, then start with crontab. Set crontab entry and enjoy the problems when script start before WRF finish or something like that... :)

For how to insert crontab entry, please, read this page:
https://help.ubuntu.com/community/CronHowto

then try to run something with crontab as explained there.

Basically, set a line in user's crontab file:

Code: Select all

10 04 * * * /path/to/your/script/script.sh
where 10 is ten minutes and 04 is 04 hours, and * * * means every day, every month, every year. This example would start /path/to/your/script/script.sh script every day at 04:10 of your system time.

In your script.sh script, run grads using something like

Code: Select all

#!/bin/bash
grads -blc "/path/to/your/grads/script/script.gs"

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

Re: extract data from wrf-ems for weather forecast

Post by dominic » Fri Nov 01, 2013 8:13 am

Meteoadriatic Hello, thank you very much response

But I have still confused, I'll explain what I need

the computer will turn on at 7:05 am and you must do the following


1) Hours 7:10 ----> ems_autorun (of a specific domain)
2) Hours 08.10 ---> grads -----> run myscript.gs (generation maps with grads)
3) Hours 08.15 ----> grads -----> run extract_data.gs (script that extracts data from the run)
4) Hours 08.30 ----> ftp upload (upload maps and data on my web server)


Would you tell me step by step what should I do?

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

Re: extract data from wrf-ems for weather forecast

Post by dominic » Fri Nov 01, 2013 8:58 am

One important thing I forgot

how do you automatically change the date of the run? grads in the script has set the date: |

If the run is now 01/11/2013 00Z as you do tomorrow to bring it to 00Z 02/11/2013

I honestly do not know how to do

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

Re: extract data from wrf-ems for weather forecast

Post by meteoadriatic » Mon Nov 04, 2013 7:09 am

dominic wrote:1) Hours 7:10 ----> ems_autorun (of a specific domain)
2) Hours 08.10 ---> grads -----> run myscript.gs (generation maps with grads)
3) Hours 08.15 ----> grads -----> run extract_data.gs (script that extracts data from the run)
4) Hours 08.30 ----> ftp upload (upload maps and data on my web server)
Do you actually have shell scripts that do those jobs?

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

Re: extract data from wrf-ems for weather forecast

Post by dominic » Mon Nov 04, 2013 7:55 am

Hello meteoadriatic, fortunately I managed to create a script (thanks to some posts on this forum)

Currently I can either change the time you run the run via cron

Only it's not part grads, or run_myscript.gs

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

Re: extract data from wrf-ems for weather forecast

Post by dominic » Mon Nov 04, 2013 8:12 am

I develop this script shell, this start with cron

Code: Select all

 #! /bin/tcsh

#reset date   
rm -rf /home/dominic/Desktop/wrf/wrfems/runs/my_domains/wrfprd/*
rm -rf /home/dominic/Desktop/wrf/wrfems/runs/my_domains/grib/*
rm -rf /home/dominic/Desktop/wrf/wrfems/runs/my_domains/emsprd/*


cd /home/dominic/Desktop/wrf/wrfems/runs/my_domains/
    #run current model
    ems_prep -dset gfsptile -length 24 --cycle 00
    ems_run
    ems_post --grads

The problem is to start grads, after I added this line, then if I go out of the terminal and I type:. / Runmodell.sh (shell file that I created for automation)

The process is as well, and grads plots maps. If it is run from cron only runs the run and created the grib files and ctl, but grads will not start

#! /bin/bash

grads -l -c "/home/dominic/Desktop/wrf/wrfems/util/grads/scripts/myscript.gs"
Last edited by dominic on Mon Nov 04, 2013 8:15 am, edited 1 time in total.

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

Re: extract data from wrf-ems for weather forecast

Post by meteoadriatic » Mon Nov 04, 2013 8:15 am

May I first ask, why don't you use ems_autorun procedure to do all this automatically?

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

Re: extract data from wrf-ems for weather forecast

Post by dominic » Mon Nov 04, 2013 8:18 am

meteoadriatic wrote:May I first ask, why don't you use ems_autorun procedure to do all this automatically?

You're right, but ems autorun does not execute the plot of grads. At least for me, even as you, I pointed out in another post, when the process ends ems_autorun emsprd file is not created out of grads.

I'm forced to redo: ems_post-grads to create them. In this way, all I created is

It is just the fact of starting the run of grads to generate maps

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests