Skip to Page Content

Mesoscale Dynamics and Modeling Laboratory

From WolfWikis

Jump to: navigation, search

Contents

Purpose

This page DOES NOT replace the Mesoscale Dynamics and Modeling Laboratory homepage. It is meant to serve as a dynamic reference manual for the Mesolab for current, past, and future students. Members of the Mesolab are encouraged to add and update information in this space as they see fit. Anything you would write as a note to yourself about how to do something (location of a file, a useful UNIX command, weather related websites, etc.) can be stored in this wiki for the entire lab to benefit from. Please follow the formatting style of previous posts.

General Lab Information

Connecting to the Lab Remotely

To connect to the mesolab network from anywhere in the world, ssh to mesolab.meas.ncsu.edu. If you are connecting from a Windows or Mac, you will need to forward the X11 display by using either '-Y' or '-X' as your ssh option AND be running an X11 server. Below are links to programs you could use in Windows for this purpose.

Logging In

All Linux machines in the lab use a networked authentication system. This means that no matter which machine you sit down at, you can log into it using the same name and password. In addition, all of your files are located in the same place (see next section).

User Account Files

Even though you log into various machines throghout the lab, all files in your user account (i.e. /home/userid/) are actually stored on samus.meas.ncsu.edu. This will be transparent to you since all machines have their /home/ directories mounted to the same place on the network. What this boils down to is that files in your user account are available on all machines in the lab.

Configuring Your Shell Environment

Customizing your .cshrc or .bashrc isn't as necessary as it was in the old system. Most applications that you will need (GEMPAK, Garp, NCAR Graphics, etc.) are already configured in the system configuration files.

If you have things added to your .cshrc or .bashrc files that you want to keep, you should make sure that you read the system configuration files before your customizations. This can be done in .cshrc by putting the following line at the top of your file.

 source /etc/csh.cshrc

If you use a bash-type shell, add the following to your .bashrc.

 . /etc/bashrc

If you use a .login or .profile file, you should do the same thing with these files. The system-wide login file is located at /etc/csh.login and the system-wide profile file is at /etc/profile.

Adding Applications to Your Environment

Some applications have multiple versions or are not common enough to add to the system-wide setup. These applications can be viewed by typing:

 add

The above command will print something like:

 gempak          Gemenviron file for GEMPAK 5.6
 mpich           Portable Implementation of MPI 1.2.5
 mpich-1.2.5     Portable Implementation of MPI 1.2.5
 ncarg           NCAR graphics version 4.3.1
 pgi             Portland Group Workstation Compilers 3.2
 pgi-3.2         Portland Group Workstation Compilers 3.2

The add command will list all of the installed applications that are available in the system-wide configuration. The add command will also add the program environment to your current shell environment if you specify the name of the application seen in the left column of the add output. For example, if you want to add the Portland Group Compiler v3.2 to your environment, you would type:

 add pgi-3.2

These add commands can be added to your .cshrc or .bashrc files, if you have them.

Many applications that you use on a daily basis are added automatically every time you log in. These include GEMPAK, NCAR Graphics, and the Portland Group compiler.

NOTE: The current implementation of the add command does not indicate which applications you have in your environment. This should change in the near future.

Using SSH within the Network

You can use SSH to log into the Linux machines in the lab. You will be asked to enter a password every time.

You can also use SSH from Windows and Macintosh machines. See the MS Windows Integration and Macintosh Integration sections for more details.

Helpful Graduate School Information

Modeling References

MASS Model

Running the MASS Model in the Mesolab

Note: This assumes that all directories are in proper places, that everything that needs to be compiled has been compiled, and that you have all the proper .opt files and executables.

First, ssh into one of the servers in the Mesolab, such as Phendrana or Mesovortex. The navigate to your forecast directory which should be something like fcst/runs/<run directory>.

Preprocessing steps

  1. Edit paths.opt
    • outpath “./” refers to prepro/ directory
    • “../raw/ has first guess gridded data
  2. Edit prepgrd.opt
    • For continental U.S. always choose “1” for stereographic under projection type. Closer to the equator, mercator is reasonable choice
  3. Edit prepdat.opt
    • date and time of gridded data file to access=00Z > 00Z
      date and time of model initialization >>> 06Z > 12Z
    • date and time of gridded data file to access=06Z > 06Z
      date and time of model initialization >>> 12Z > 18Z
    • Under gridded first data sources checking Mass Model implies 1-way nesting. Don't check 2 way nesting.
    • Under GRIB formats, check whatever first guess data you have in your raw directory.
  4. Edit prepro.opt
    • Under data sources check type(s) of data you have in your raw directory
    • Must specify vertical structure. Make sure bottom surface is at 5m or higher. That corresponds to a bottom sigma level of .9985 or less.
    • Set pressure at top of model domain
    • Check formatted/unformatted output file format. Be consistent with prepro.opt/mass.opt
  5. Edit prepbc.opt
    • Set first BC time
    • Last BC time should be set to the time you wish to stop the model, although the model end time can be before the last BC time. [i.e. Must always have boundary conditions...]
    • Set frequency (make sure that you have data for the hours you specify. If frequency of data in your raw directory is every 3 hrs, set frequency in prepbc.opt as 3hrs)
  6. Run preprocessor
    • type ./runprep.pl -gdpbm A where A is pretag
  7. Edit mass.opt
    1. Set length of run, ensure that it is not longer than the last BC time in prepbc.opt
    2. Under Diagnostic point and (toward bottom of file) location of Diagnostic Point, enter (1,1) unless model failed before and you wish to begin it again from a specific grid point.
    3. Don't change any Diffusion Parameters except last one [simgma level at which diffusion coefficient...]. Set the sigma level close to top of layer.
    4. For Cumulus scheme: Kain-Fritsch is good for convective case, while Grell is better for less convective scenarios. **depends on case**
    5. PBL Scheme : TKE good for PBL
  8. cd /home/mass/fcst/src/massmodel-6.1
    • type “make clean”
  9. edit param.inc
    • change nx,ny,nz
    • nz should be # of sigma levels – 1
  10. compile grid: type “make install SIZE=nxxnyxnz
    • type “top” to see which users are running jobs. Ensure that no one else is running a large job. Type q to go back to prompt

Run model!

  1. Go to /home/fcst/runs/<your-run-directory>
  2. Type “./runmass.pl -s nxxnyxnz A 1” where A is pretag and 1 is runtag

Note: Make sure you are on a server and not your workstation!

In case of model not running through normally:

under ./<run directory>/mass

  • Check ERRORS file for error messages after model run
  • Check tstep file to see how far model ran before abort
  • Check mass.pretagruntag [ex. mass.A1] to review options you checked in mass.opt before model run and to ensure that legitimate data is being output.
Adding Variables to plot2gem

In the mass directory, under fcstn (or whatever fcst directory you are using), go to /massTARfiles/mass2gem/src/fortran/plot2gem.

In there you'll find main.f - there are two things to change, (1) Under the heading DATA VARNAME, add the full name of the variable (make sure it matches whatever is coming out of diag2plot) at the end of the list of other variables. (2) Under the next block labeled DATA VARCODE, add the 4 digit code you want for the variable to the end of the list of codes.

After that, just do a 'make plot2gem' and that should work. Just make sure the location of the bin directory where you want the plot2gem (and plot2gem.pl) to go is correct in the Makefile.

Plotting References

GEMPAK

About Our Local Install of GEMPAK

The default version of GEMPAK that is used when a GEMPAK program is run from the prompt is version 5.6m. This is a fairly old version, but it has worked reliably on our system for year. Newer versions are installed and can be found in the /usr/local/ directory. Other versions include 5.6j, 5.6L, 5.8.1, and 5.9.1. Newer versions generally have greater functionality and include newer programs such as GPNIDS for plotting Level-III radar data. To use one of these other GEMPAK versions, source the environment.csh in any of the GEMPAK directories. For example, to use GEMPAK version 5.8.1, at the prompt type

 source /usr/local/GEMPAK5.8.1/environment.csh

Each version of GEMPAK is compiled with different limits on the MAXGRD and other variables, so if you have problems with one version, try another.

  • Note: Some things, such as phelp and ncolor do not work in all versions.
Plotting NEXRAD Level-II in GEMPAK

Download NEXRAD Level-II data here: NCDC

After downloading and unzipping files, they will not be in the correct format for the GEMPAK program gpnexr2 to read. To plot the radar imagery, the files must be renamed to the format

STIDyyyymmdd_hhmmss

A perl script that will rename all the Level-II files in a directory can be found at level2rename.pl

GEMPAK Resources on the web

GEMPAK Homepage
GEMPAK Help (online version of phelp - note: v5.10.1)
SUNY Albany GEMPAK Help

Linux References

Useful Commands

find

find where-to-look criteria what-to-do
Example:  find . -name foo\*bar

Will search current directory for any file starting with 'foo' and ending with 'bar'

grep - Another search utility in Linux. A particularly useful way to use grep is to find hung gplt processes with the command

ps -x | grep gplt

Using the pipe send the ps -x command through grep to be searched for gplt

Scripts

makeawebpage.pl - Perl script that will make a webpage with mouse-over looping such as the one here
level2rename.pl - Perl script for renaming Level-II files to be read by GEMPAK

Personal tools

Wiki Stats

Users:  4,180
Pages:  2,484
Uploads:  2,901
Views:  2,773,016
Edits:  51,936