Difference between revisions of "How to create a WRF HTML browser"

From openwfm
Jump to navigation Jump to search
(Created page with "To create a [http://math.ucdenver.edu/~farguella/wrf-browsers WRF HTML browser],")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
To create a [http://math.ucdenver.edu/~farguella/wrf-browsers WRF HTML browser],
+
To create a [http://math.ucdenver.edu/~farguella/wrf-browsers WRF HTML browser], one can use a perl script to convert fortran source files into a hyperlinked web site, [https://code.google.com/archive/p/f90tohtml f90tohtml].
 +
 
 +
The three HTML browsers [http://math.ucdenver.edu/~farguella/wrf-browsers/WRF/master WRFV4 master branch], [http://math.ucdenver.edu/~farguella/wrf-browsers/wrf-fire/master wrf-fire master branch], and [http://math.ucdenver.edu/~farguella/wrf-browsers/WRF-Fire-merge/fuel-moisture-model WRF-Fire-merge fuel-moisture-model branch], are created in Kingspeak in /uufs/chpc.utah.edu/common/home/u6015636/web_browser. They are created following the next steps:
 +
 
 +
1) Download the source code using
 +
<pre>
 +
wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/f90tohtml/f90tohtml-1.12.tar.gz
 +
</pre>
 +
 
 +
2) Untar downloaded file, and access to the folder
 +
<pre>
 +
tar -xvf f90tohtml-1.12.tar.gz
 +
cd f90tohtml
 +
</pre>
 +
 
 +
3) Modify $path_f90tohtml variable in <tt>f90tohtml</tt> file with the path to f90tohtml directory. Run
 +
<pre>
 +
pwd
 +
</pre>
 +
command, if necessary.
 +
 
 +
4) Give permission to <tt>f90tohtml</tt> file using
 +
<pre>
 +
chmod u+x f90tohtml
 +
</pre>
 +
 
 +
5) Add this previous path to f90tohtml folder to the general path. For instance, using
 +
<pre>
 +
export PATH=/path/to/f90tohtml:$PATH
 +
</pre>
 +
 
 +
6) Modify perl path in the first line of <tt>f90tohtml</tt> file. Run
 +
<pre>
 +
which perl
 +
</pre>
 +
to see your perl path.
 +
 
 +
7) Get WRF code in a path which we are going to name WRF_PATH.
 +
 
 +
8) Access nwp_codes folder:
 +
<pre>
 +
cd wp_codes
 +
</pre>
 +
 
 +
9) Modify $the_path variable with the previous WRF_PATH in <tt>wrf_prepare.pl</tt> file.
 +
 
 +
10) Run
 +
<pre>
 +
./wrf_prepare.pl
 +
</pre>
 +
to create the proper .ls files in wrf_ls.
 +
 
 +
11) Modify $dir_html variable in <tt>wrf</tt> file with a path where is going to be created the hyperlinked web site. Note that it is necessary to finish the path with '/' character. One can also modify the title of the web browser modifying $contents_title variable in the same file.
 +
 
 +
12) Run
 +
<pre>
 +
f90tohtml wrf.f2h
 +
</pre>
 +
This will generate all the HTML files and subfolders with HTML files necessary to have a WRF browser inside the path specified.

Latest revision as of 23:52, 19 February 2019

To create a WRF HTML browser, one can use a perl script to convert fortran source files into a hyperlinked web site, f90tohtml.

The three HTML browsers WRFV4 master branch, wrf-fire master branch, and WRF-Fire-merge fuel-moisture-model branch, are created in Kingspeak in /uufs/chpc.utah.edu/common/home/u6015636/web_browser. They are created following the next steps:

1) Download the source code using

wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/f90tohtml/f90tohtml-1.12.tar.gz

2) Untar downloaded file, and access to the folder

tar -xvf f90tohtml-1.12.tar.gz
cd f90tohtml

3) Modify $path_f90tohtml variable in f90tohtml file with the path to f90tohtml directory. Run

pwd 

command, if necessary.

4) Give permission to f90tohtml file using

chmod u+x f90tohtml

5) Add this previous path to f90tohtml folder to the general path. For instance, using

export PATH=/path/to/f90tohtml:$PATH

6) Modify perl path in the first line of f90tohtml file. Run

 
which perl

to see your perl path.

7) Get WRF code in a path which we are going to name WRF_PATH.

8) Access nwp_codes folder:

cd wp_codes

9) Modify $the_path variable with the previous WRF_PATH in wrf_prepare.pl file.

10) Run

./wrf_prepare.pl

to create the proper .ls files in wrf_ls.

11) Modify $dir_html variable in wrf file with a path where is going to be created the hyperlinked web site. Note that it is necessary to finish the path with '/' character. One can also modify the title of the web browser modifying $contents_title variable in the same file.

12) Run

f90tohtml wrf.f2h

This will generate all the HTML files and subfolders with HTML files necessary to have a WRF browser inside the path specified.