epygram.geometries.domain_making.output — Output

Contains functions for outing a LAM domain to namelists, plot, summary.

epygram.geometries.domain_making.output.lam_geom2namelists(geometry, truncation=u'linear', orography_subtruncation=u'quadratic')[source]

From the geometry, build the namelist blocks for the necessary namelists.

  • truncation – the kind of truncation of spectral geometry to generate, among (‘linear’, ‘quadratic’, ‘cubic’).
  • orography_subtruncation – additional subtruncation for orography to be generated.

From the regular LonLat geometry, build the namelist blocks for the necessary namelists.

epygram.geometries.domain_making.output.write_namelists(namelists, out=None, prefix=u'', suffix=u'geoblocks')[source]

Write out namelists blocks.

  • namelists – dict of NamelistSet (from bronx.datagrip.namelist)
  • out

    if given as a str: write all in one file, else in separate files:

    either as filename if out==dict(namelist:filename, ...) or if None following syntax: “prefix.namelist.suffix”.
  • prefix – prefix for output names
  • suffix – prefix for output names
epygram.geometries.domain_making.output.write_geometry_as_namelists(geometry, allinone=False)[source]

Write out namelists blocks from a geometry.

Parameters:allinone – if True, write all in one file, else in separate files.

Returns a summary of geometry as a character string.

Parameters:geometry – a H2DGeometry instance
epygram.geometries.domain_making.output.plot_geometry(geometry, lonlat_included=None, out=None, gisquality=u'i', bluemarble=0.0, background=True, departments=False)[source]

Plot the built geometry, along with lonlat included domain if given.

  • lonlat_included – parameters of the lonlat domain to plot
  • out – filename (.png) if not None (else interactive pyplot.show())
  • gisquality – quality of coastlines and countries boundaries.
  • bluemarble – if >0., displays NASA’s “blue marble” as background with given transparency.
  • background – if True, set a background color to continents and oceans.
  • departments – if True, adds the french departments on map (instead of countries).