map, cross-section and profile plot of one or two fields, and vectors plot over a map — CliMAF 3.1 documentation (original) (raw)

Plot a map, a cross section (pressure-lat or pressure-lon), or a profile (along lat, lon or pressure/z_index ) of one or two fields and draw vectors plot over a map, using NCL, and allowing for tuning a number of graphic attributes

References: http://www.ncl.ucar.edu

Provider / contact: climaf at meteo dot fr

Inputs (in the order of CliMAF call):

Additional fields (optional, and in that order; replace with empty strings if needed):

Warnings:

Mandatory arguments: None

Optional arguments (see also More plot optional arguments )

General:

Main field:

  • color: name of the Ncl colormap to use; see e.g.https://www.ncl.ucar.edu/Document/Graphics/color_table_gallery.shtml#Aid_in_color_blindness ; default (climaf) is ‘BlueDarkRed18’. If you want to define your own color map using named colors (be sure to include the background and foreground colors), color must be a list of named colors separated by comma, e.g.color = “white,black,White,RoyalBlue,LightSkyBlue,PowderBlue,lightseagreen,PaleGreen,Wheat,Brown,Pink”. See also plot_params()
  • either :
    • min, max, delta: min and max values and levels when applying the colormap (or setting the axis for profiles). See also plot_params()
    • or``colors``: list of levels used when applying colormap e.g. colors=”260 270 280 290”

Main field and/or auxiliary field:

First auxiliary field:

Vectors:

Second auxiliary field:

Required files

Optional files

Outputs :

Climaf call example For more examples which are systematically tested, seegplot.py and test_gplot.py

A Map without data re-projection (model is already on a known native Lambert grid):

tas=fds('/cnrm/est/COMMON/climaf/test_data/ALADIN/tas_MED-11_ECMWF-ERAINT_evaluation_r1i1p1_CNRM-ALADIN52_v1_mon_197901-201112.nc', period='197901-201112', variable='tas') moy_tas=time_average(tas) # time average of 'tas'

without bringing to the script the file which includes metadata for the native Lambert grid

=> with default cylindrical equidistant projection

plot_proj=plot(moy_tas,title='ALADIN',min=-12,max=28,delta=2.5,vcb=False) cshow(plot_proj)

How to get required file which includes metadata for the native Lambert grid named 'climaf_plot_grid.nc'

fixed_fields('plot', ('climaf_plot_grid.nc','/cnrm/est/COMMON/climaf/test_data/ALADIN/tas_MED-11_ECMWF-ERAINT_evaluation_r1i1p1_CNRM-ALADIN52_v1_mon_197901-201112.nc'))

with bringing to the script this file => with default native grid (no re-projection)

cdrop(plot_proj) # to re-compute 'proj' cshow(plot_proj)

with a "NH" projection

plot_projNH=plot(moy_tas,title='ALADIN - NH40',min=-12,max=28,delta=2.5,proj="NH40") cshow(plot_projNH)

More optional arguments:

For map:

For cross-sections:

For profiles:

More climaf call example

Side effects: None

Implementation: Basic use of ncl: gsn_csm_pres_hgt, gsn_csm_xy, gsn_csm_contour_map, gsn_csm_contour_map_ce, gsn_csm_contour, gsn_csm_vector_scalar_map, gsn_csm_vector_scalar_map_ce