---
name: "pssolar"
section: "1gmt"
platform: "linux"
package: "gmt-common"
version: "5.4.5+dfsg-2"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/pssolar"
---

# pssolar(1gmt)

Plot day-light terminators and other sunlight parameters

## NAME

pssolar - Plot day-light terminators and other sunlight parameters

## SYNOPSIS

**pssolar** \[  **-B**\[**p**\|**s**\]*parameters* \] \[  **-C** \] \[  **-G***fill*\|**c** \] \[  **-I**\[*lon/lat*\]\[**+d***date*\]\[**+z***TZ*\] \] \[  **-J***parameters* \] \[  **-K** \] \[  **-M** \] \[  **-N** \] \[  **-O** \] \[ **-P** \] \[  **-Q** \] \[  **-R***region* \] \[  **-Tdcna**\[**+d***date*\]\[**+z***TZ*\]\] \[  **-U**\[*stamp*\] \] \[  **-V**\[*level*\] \] \[  **-W***pen* \] \[  **-X***x\_offset* \] \[  **-Y***y\_offset* \] \[ **-bo**binary \] \[ **-h**headers \] \[ **-o**flags \] \[ **-p**flags \] \[ **-t**transp \]

**Note:** No space is allowed between the option flag and the associated arguments.

## DESCRIPTION

**pssolar** Calculate and plot the day-night terminator and the civil, nautical and astronomical twilights.

## REQUIRED ARGUMENTS

There are no required arguments but either **-I** or **-T** must be selected.

## OPTIONAL ARGUMENTS

- **-B**\[**p**\|**s**\]*parameters* (more ...)

  Set map boundary frame and axes attributes.

- **-C**

  Formats the report selected by **-I** using tab-separated fields on a single line. The output is Sun *Lon Lat Azimuth Elevation* in degrees, *Sunrise Sunset Noon* in decimal days, *day length* in minutes, *SolarElevationCorrected* corrected for the effect of refraction index and *Equation of time* in minutes. Note that if no position is provided in **-I***lon/lat* the data after *Elevation* refers to the point (0,0).

- **-G***fill*\|**c**

  Select color or pattern for filling of terminators; or use **-Gc** for clipping \[Default is no fill\]. Deactivate clipping by appending the output of gmt psclip **-C**.

- **-I**\[*lon/lat*\]\[**+d***date*\]\[**+z***TZ*\]

  Print current sun position as well as Azimuth and Elevation. Append lon/lat to print also the times of Sunrise, Sunset, Noon and length of the day. Add **+d***date* in ISO format, e.g, **+d***2000-04-25*, to compute sun parameters for this date. If necessary, append time zone via **+z***TZ*.

- **-J***parameters* (more ...)

  Select map projection.

- **-K** (more ...)

  Do not finalize the PostScript plot.

- **-M**

  Write terminator(s) as a multisegment ASCII (or binary, see **-b***o*) file to standard output. No plotting occurs.

- **-N**

  Invert the sense of what is inside and outside the terminator.  Only used with clipping (**-Gc**) and cannot be used together with **-B**.

- **-O** (more ...)

  Append to existing PostScript plot.

- **-P** (more ...)

  Select "Portrait" plot orientation.

- **-R***xmin*/*xmax*/*ymin*/*ymax*\[**+r**\]\[**+u***unit*\] (more ...)

  Specify the region of interest.

- **-Tdcna**\[**+d***date*\]\[**+z***TZ*\]

  Plot (or dump; see **-M**) one or more terminators defined via the **dcna** flags. Where: **d** means day/night terminator; **c** means civil twilight; **n** means nautical twilight; **a** means astronomical twilight.  Add **+d***date* in ISO format, e.g, **+d***2000-04-25T12:15:00* to know where the day-night was at that date. If necessary, append time zone via **+z***TZ*.

- **-U**\[\[*just*\]/*dx*/*dy*/\]\[**c**\|*label*\] (more ...)

  Draw GMT time stamp logo on plot.

- **-V**\[*level*\] (more ...)

  Select verbosity level \[c\].

- **-W**\[**-**\|**+**\]\[*pen*\] (more ...)

  Set pen attributes for lines or the outline of symbols \[Defaults: width = default, color = black, style = solid\].

**-X**\[**a**\|**c**\|**f**\|**r**\]\[*x-shift*\[**u**\]\]

- **-Y**\[**a**\|**c**\|**f**\|**r**\]\[*y-shift*\[**u**\]\] (more ...)

  Shift plot origin.

- **-bo**\[*ncols*\]\[*type*\] (more ...)

  Select native binary output.

- **-h**\[**i**\|**o**\]\[*n*\]\[**+c**\]\[**+d**\]\[**+r***remark*\]\[**+r***title*\] (more ...)

  Skip or produce header record(s).

- **-o***cols*\[,...\] (more ...)

  Select output columns (0 is first column).

- **-p**\[**x**\|**y**\|**z**\]*azim*\[/*elev*\[/*zlevel*\]\]\[**+w***lon0*/*lat0*\[/*z0*\]\]\[**+v***x0*/*y0*\] (more ...)

  Select perspective view.

- **-t**\[*transp*\] (more ...)

  Set PDF transparency level in percent.

## EXAMPLES

Print current Sun position and Sunrise, Sunset times at:

```
gmt pssolar -I-7.93/37.079+d2016-02-04T10:01:00
```

Plot the day-night and civil twilight

```
gmt pscoast -Rd -W0.1p -JQ0/14c -Ba -BWSen -Dl -A1000 -P -K > terminator.ps
gmt pssolar -R -J -W1p -Tdc -O >> terminator.ps
```

Set up a clip path overlay based on the day/night terminator:

```
gmt pssolar -R -J -Gc -Tc -O -K >> someplot.ps
```

## SEE ALSO

gmt, psclip, pscoast, psxy

## COPYRIGHT

2019, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe
