Changes between Version 1 and Version 2 of WRF4GTutorial


Ignore:
Timestamp:
Sep 7, 2011 2:39:51 PM (11 years ago)
Author:
valva
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WRF4GTutorial

    v1 v2  
    1 == Run a simple experiment on the local machine ==
    2 '''Before starting this tutorial make sure you have correctly installed and configured WRF4G on your machine'''.
     1== Run a simple experiment on the machine where WRF4G is installed ==
    32
     3[[NoteBox(warn, Before starting this tutorial make sure you have correctly installed WRF4G on your machine following the [wiki:WRF4GInstall Installation instructions])]]
    44
    5 
    6 === List the resources ===
    7 
    8 
    9 === Prepare a experiment ===
    10 
    11 
    12 === Submit a experiment to the Local Computer ====
    13 
    14  * wrf4g_ps returns the following information:
    15     * Realization: Realization name. It is taken from the field experiment_name in experiment.wrf4g.
    16     * Status: It can be take the following values: Prepared, Submitted, Running, Failed and Done).
    17     * Chunks [Chunk running/Total Chunks]: A realization is split into chunks. Each chunk is sent as a job.
    18     * Computer resource: Resource (cluster) where the job is running.
    19     * WN: Computing node where the job is running.
    20     * Run.Sta: Job status in the WN (Downloading data, running ungrib, real, wrf, ...)
    21     * ext: Exit Code. If exit code is different from 0, there has been an error. Error codes are explained in $WRF4G_LOCATION/lib/bash/wrf4g_exit_codes.sh
    22     * % : percentage of simulation finished.
    23 
    24 
    25  * Check the simulation output and log files in $WRF4G_LOCATION/repository/output
    26 
    27 '''To run a different experiment, you only need to modify the following files according to your needs:'''
    28 
    29  * experiment.wrf4g: Experiment configuration: type of experment, simulation dates, restarts, physics,...
    30  * resources.wrf4g: With this file the resources used by a WRF experiment are configured: data repository, number of processes for MPI, version of WRF to run,.. By default there is a file that stores a configuration that affects to every experiment ($WRF4G_LOCATION/etc/resources.wrf4g). If a file with this name (resources.wrf4g) is found in the folder where experiment.wrf4g is stored, this file will be used instead of the application one ($WRF4G_LOCATION/etc/resources.wrf4g)
    31  * $WRF4G_LOCATION/etc/framework4g.conf: Database and computing resources configuration. After modifying this file, '''wrf4g_framework restart''' must be run.
    32 
    33 For example, to add a new PBS cluster to run jobs:
    34 
    35  * First modify the file $WRF4G_LOCATION/etc/framework4g.conf to add more resources ([https://meteo.macc.unican.es/trac/WRF4G/wiki/DRM4G More information about how to add resources]):
     5=== Start wrf4g_framework and list computing resources ===
     6Simply start the [wiki:WRF4GFrameworkConfiguration WRF4G Framework] by running:
    367{{{
    37 mycomputer         local://localhost?LRMS_TYPE=fork;NODECOUNT=1
    38 ui01              local://localhost?LRMS_TYPE=pbs;QUEUE_NAME=estadistica
     8wrf4g_framework start
    399}}}
    4010
    41  * Change the following fields in $WRF4G_LOCATION/etc/resources.wrf4g or copy $WRF4G_LOCATION/etc/resources.wrf4g where experiment.wrf4g is located:
    42    * The repository data if the cluster do not access them directly.
    43    * NP to the number of MPI processess you want to use
    44    * REQUIREMENTS if you want to choose the resource that will run the experiment. REQUIREMENTS ='HOSTNAME = "*ui01*";'
     11Doing this, we will start the services that manage the computing resources and keep track of the experiments. Note that if we don't start wrf4g_framework we won't be able to work with WRF4G.
    4512
    46  * Restart the wrf4g_framework: '''wrf4g_framework restart'''
    47  * Submit the experiment with a different name (change the name in experiment.wrf4g)
     13WRF4G framework is configured by default to use a single computing resource (the computer where WRF4G has been installed). To list the computing resources where you can submit experiment (in this case only localhost) run the following:
     14
    4815{{{
    49 cd $WRF4G_LOCATION/experiments/single/snd50c
    50 wrf4g_submitter.sh
     16valva@sipc18:~$ wrf4g_resources
     17HID PRIO OS              ARCH  MHZ  %CPU    MEM(F/T)     DISK(F/T)      N(U/F/T) LRMS               HOSTNAME                     
     180   1    GNU/Linux2.6.32 unkno 2000    0    439/3270     1143/8662         0/1/1 FORK               mycomputer   
    5119}}}
     20
     21=== Prepare and submit the test experiment ===
     22Go to the folder where the experiment configuration files are located:
     23{{{
     24cd $WRF4G_LOCATION/experiments/single/testc
     25}}}
     26
     27Edit [wiki:WRF4Gexperiment_wrf4g experiment.wrf4g] and check its configuration.
     28
     29Run [wiki:WRF4GCommandLineTools#wrf4g_prepare wrf4g_prepare] to prepare the experiment:
     30{{{
     31valva@sipc18:/tmp/WRF4G/experiments/single/testc$ wrf4g_prepare
     32Preparing namelist...
     33WRF Check Warning: radt is larger than dx (1.666667)
     34
     35---> Single params run
     36---> Continuous run
     37        ---> cycle_chunks: testc 1983-08-25_12:00:00 1983-08-27_00:00:00
     38                ---> chunks 1: testc 1983-08-25_12:00:00 1983-08-26_00:00:00
     39                ---> chunks 2: testc 1983-08-26_00:00:00 1983-08-26_12:00:00
     40                ---> chunks 3: testc 1983-08-26_12:00:00 1983-08-27_00:00:00
     41}}}
     42
     43Check the experiment status with [wiki:WRF4GCommandLineTools#wrf4g_status]. You will see the experiment is in P (Prepared status).
     44{{{
     45valva@sipc18:/tmp/WRF4G/experiments/single/testc$ wrf4g_status
     46Realization        GW  Stat Chunks Comp.Res   WN         Run.Sta       ext   %
     47testc              -     P  0/3    -          -          Prepared       - 0.00
     48
     49}}}
     50
     51Submit the experiment with [wiki:WRF4GCommandLineTools#wrf4g_submit]. Check the status during one minute. You will see how, first, the job is submitted, then downloading input data,running ungrib, metgrid, real, wrf and finally will has finished.
     52
     53{{{
     54valva@sipc18:/tmp/WRF4G/experiments/single/testc$ wrf4g_submit
     55Submitting realization: "testc"
     56        Submitting Chunk 1:     1983-08-25_12:00:00     1983-08-26_00:00:00
     57        Submitting Chunk 2:     1983-08-26_00:00:00     1983-08-26_12:00:00
     58        Submitting Chunk 3:     1983-08-26_12:00:00     1983-08-27_00:00:00
     59valva@sipc18:/tmp/WRF4G/experiments/single/testc$ wrf4g_status
     60Realization        GW  Stat Chunks Comp.Res   WN         Run.Sta       ext   %
     61testc              0     W  1/3    -          -          Submitted      - 0.00
     62
     63valva@sipc18:/tmp/WRF4G/experiments/single/testc$ wrf4g_status
     64Realization        GW  Stat Chunks Comp.Res   WN         Run.Sta       ext   %
     65testc              0     R  1/3    mycomputer sipc18     real            - 0.00
     66
     67valva@sipc18:/tmp/WRF4G/experiments/single/testc$ wrf4g_status
     68Realization        GW  Stat Chunks Comp.Res   WN         Run.Sta       ext   %
     69testc              0     R  1/3    mycomputer sipc18     real            - 0.00
     70}}}
     71
     72=== Check the experiment output and log ===
     73The location where output and log files are stored is defined with the WRF4G_BASEPATH variable in [wiki:WRF4Gresources_wrf4g resources.wrf4g]. Check WRF4G_LOCATION/etc/resources.wrf4g to discover where WRF4G_BASEPATH is pointing. You'll see it is pointing to $WRF4G_LOCATION/repository/output. Go to $WRF4G_LOCATION/repository/output/testc/testc and see the folders structure and the output files.
     74
     75{{{
     76
     77valva@sipc18:/tmp/WRF4G/repository/output/testc/testc$ tree
     78.
     79├── log
     80│   ├── log_1_1.tar.gz
     81│   ├── log_2_2.tar.gz
     82│   └── log_3_3.tar.gz
     83├── namelist.input
     84├── output
     85│   ├── wrfout_d01_19830825T120000Z_19830825T233000Z.nc
     86│   ├── wrfout_d01_19830826T000000Z_19830826T000000Z.nc
     87│   ├── wrfout_d01_19830826T000000Z_19830826T113000Z.nc
     88│   ├── wrfout_d01_19830826T120000Z_19830826T120000Z.nc
     89│   ├── wrfout_d01_19830826T120000Z_19830826T233000Z.nc
     90│   ├── wrfout_d01_19830827T000000Z_19830827T000000Z.nc
     91│   ├── wrfrain_d01_19830826T000000Z_19830826T000000Z.nc
     92│   ├── wrfrain_d01_19830826T120000Z_19830826T120000Z.nc
     93│   ├── wrfrain_d01_19830827T000000Z_19830827T000000Z.nc
     94│   ├── wrfxtrm_d01_19830825T120000Z_19830825T233000Z.nc
     95│   ├── wrfxtrm_d01_19830826T000000Z_19830826T000000Z.nc
     96│   ├── wrfxtrm_d01_19830826T000000Z_19830826T113000Z.nc
     97│   ├── wrfxtrm_d01_19830826T120000Z_19830826T120000Z.nc
     98│   ├── wrfxtrm_d01_19830826T120000Z_19830826T233000Z.nc
     99│   └── wrfxtrm_d01_19830827T000000Z_19830827T000000Z.nc
     100├── realout
     101└── restart
     102    ├── wrfrst_d01_19830826T000000Z.nc
     103    ├── wrfrst_d01_19830826T120000Z.nc
     104    └── wrfrst_d01_19830827T000000Z.nc
     105
     106}}}