# ====================================================================================================
README for the programs (in ./PROGS)
==> computation of simple indexes <==
_____________________________________________________________
calc_indices_NCEP2_levels.gs: to compute the indexes for pressure levels variables
you just have to change the name of the variable and the level of interest, the program first extract and
concatenate an African window (in case you need to keep the corresponding fields for further diagnostics)
and compute the indexes whose limits are defined in the liste_lat_min, liste_lat_max, liste_lon_min,
liste_lon_maxi. The indexes are computed in grads binary files (.dat) and the program call the small python
script ./bin2ascii_daily.py to convert it into ascii and add a calendar (year month day) ... you must have
to do minor changes to this script if you want to compute the indexes for a different period
(it should be straightforward)
calc_indices_NCEP2_surface.gs: to compute the indexes for surface variables
similar to the calc_indices_NCEP2_levels.gs script but for surface variables ...
The outputs are in :
/home/fauchereau/AMMA/DYNAMIC_INDEXES/
in the following directories (should be easy to guess what's inside ;-)
uwnd925, uwnd600, uwnd200, vwnd925, vwnd600, vwnd200, omega850, omega400, pr_wtr
==> computation of indexes from "derived" quantities <==
_____________________________________________________________
"derived" quantities means variables that are not directly available from the NCEP / DOE II dataset but have to be computed from one of several variables, at the moment, these derived quantities are (names correponds to the output directories):
<> vp200: velocity potential at 200 hPa
<> relvort925: relative vorticity at 925 hPa
<> modulus925: wind modulus at 925 hPa (for computation of the West African Monsoon Index WAMI, see below)
<> modulus600: wind modulus at 600 hPa (for computation of the "modified" West African Monsoon Index WAMI, see below)
<> moisture_conv : moisture convergence, integrated from the surface to 850 hPa
<> mse_conv : Moist Static Energy (MSE) convergence, integrated from the surface to 850 hPa, MSE is the product of geopotential, air temperature and specific humidity
<> wami : WAMI (West African Monsoon Index) is computed as the difference between the wind modulus at 925hPa and the zonal wind at 200 hPa
<> wami600 : same as above but the difference is between the wind modulus at 925hPa and the wind modulus at 600hPa (modified WAMI indexe requested by Samuel Louvet ;-))
the programs needed to compute these variables are in ./PROGS:
some programs (e.g. python scripts for VP and relative vorticity) need GLOBAL fields of uwnd and vwnd, these can be easily extracted and stored locally using the extract_wind_global.sh bash script that uses wget, or remote_extract.sh script that uses ncks (sometimes does not work, don't ask me why ...)
<> for vp200: calc_PV_200_NCEP2_MA.py = computes a NetCDF field containing velocity potential at 200hPa, the bug regarding the 9/11/1993 problem has been fixed by repeating the values of the 9/10/1993 ... the fields are stored in /home/fauchereau/AMMA/DYNAMIC_INDEXES/vp200/vp_200.$YEAR.nc, and the vp_200.1979_2004.nc contains the whole period. After you must use the calc_indices_vp200_NCEP2.gs script, that computes the various indexes from the above files ...
<> for relvort925: calc_relvort_925_NCEP2_MA.py = same as above, but for relative vorticity at 925hPa (can easily be changed for other levels, you can use it to compute PV also if you change vorticity = x.vrt(u[tim,:,:],v[tim,:,:] to sf, vp = x.sfvp(u[tim,:,:],v[tim,:,:]) and save only vp ...). The vorticity field is stored in ${HOME}/AMMA/DYNAMIC_INDEXES/relvort925/vorticity_925.1979_2004.nc
The script calc_indice_relvort925_NCEP2.gs computes the indexes directly from uwnd and vwnd at 925 using the hcurl function in Grads , and the calc_indice_relvort925_NCEP2_v2.gs computes it from the vorticity_925.1979_2004.nc field.
as a test for the computations of derived quantities using the sphere package, see e.g. essai_vort_diff.gs,
essai_vort_diff.nc, essai_vort_diff.ps, it compares the vorticity given by ERA40 and the vorticity computed
by python : similar !!
<> for modulus925 and modulus600: calc_indice_WAMI.gs computes the wind modulus (wind speed) indexes for the desired level, and the calc_indice_WAMI.py computes the WAMI indexes from above, using the formula std(std(wind modulus at 925) - std(wind modulus at 200 / 600)), the outputs are in wami and wami600 as described earlier.
<> for moisture_conv: moisture convergence is computed using a modified version of the /usr/local/fhumcd bash script, due to some memory allocation problems with the grads version installed on tempete, a non-straightforward (!) way was used to calculate the african field of moisture convergence integrated from surface to 85O hPa: this field is stored at /home/fauchereau/AMMA/DYNAMIC_INDEXES/moisture_conv/diver_1979_2004.nc ( 35S-35N / 30W-30E ), and the shell and grads scripts can be found in the same directory, the best is to ask me (Nicolas.Fauchereau@gmail.com or Nicolas.Fauchereau@u-bourgogne.fr) if you want to compute another domain and/or layer.
The /home/fauchereau/AMMA/DYNAMIC_INDEXES/PROGS/calc_indices_moistconv_NCEP2 computes the indexes in .dat binary files and convert them into ascii, the outputs are in ~/AMMA/DYNAMIC_INDEXES/moisture_conv/OUTPUTS.
<> for mse_conv: similarly, the ~/AMMA/DYNAMIC_INDEXES/mse_conv/dmse_1979_2004.nc contains the convergence of Moist Static Energy integrated from surface to 850 hPa, for the same African domain, and the calc_indice_mseconv_NCEP2.gs script computes the indexes in .dat binary files and convert them into ascii, the outputs are in ~/AMMA/DYNAMIC_INDEXES/mse_conv_outputs.
<> for wami and wami600, please see the description given for modulus925 and modulus600.
==> computation of "GRADIENTS" indexes
_____________________________________________________________
"GRADIENTS" indexes are computed as (zonal or meridional) differences between selected indexes, the details are given on the AMMA_D1.1.3 web site. MSE and MSLP indexes were computed, as MSE is a "derived" quantity, some intermediate files were computed and kept for those who could need them (e.g. ./AMMA/DYNAMIC_INDEXES/GRADIENTS/MSE/OUTPUTS/ncep2_sphumfield.1000hpa.1979_2004.nc is the specific humidity field for 1000 hPa and for the "African" domain: 35S-35N / 30W-30E)
<> MSE: programs are in ~/AMMA/DYNAMIC_INDEXES/GRADIENTS/MSE/PROGS, and outputs (NetCDF FIELDS and gradient INDEXES) are in
~/AMMA/DYNAMIC_INDEXES/GRADIENTS/MSE/OUTPUTS
the calc_mse_field_NCEP2.gs script computes the mse field, stored in OUTPUTS
the calc_mse_boxes_meridional_gradients_NCEP2.gs computes the meridional gradients, please use bin2ascii_med_grad.py to convert the .dat files in ascii
the calc_mse_zonal_gradients_NCEP2.1.gs computes the zonal gradients for the 10N - 20N latitude belt, please use
./bin2ascii_zo_grad.py to convert the .dat files in ascii
the calc_mse_zonal_gradients_NCEP2.2.gs computes the zonal gradients for the 20N - 30N latitude belt, please use
./bin2ascii_zo_grad.py to convert the .dat files in ascii
The calc_mse_boxes_meridional_gradients_NCEP2.gs computes the time-series of the meridional gradients individual boxes
calc_mse_boxes_zonal_gradients_NCEP2.1.gs and calc_mse_boxes_zonal_gradients_NCEP2.1.gs do the same for the zonal gradients, respectively for the 10N - 20N and the 20N - 30N latitude belts ...
# ====================================================================================================
in all the above PROGS directories, the R scripts plots the figures of all the time-series provided on the AMMA_D1.1.3 web site, see e.g.:
plot_tseries_indexes.R
plot_tseries_mse_zonal_gradients.R
plot_tseries_mslp_zonal_gradients.R
plot_tseries_mse_meridional_gradients.R
plot_tseries_mslp_meridional_gradients.R
in the ~/AMMA/DYNAMIC_INDEXES/PROGS directory ...
and see the plot_hoevmullers_moymob.sh in ~/AMMA/DYNAMIC_INDEXES/PROGS for the hoevmuller diagrams of dynamic variables (a running mean of 5 days has been applied to all the fields in order to reduce the noise ...)