EUREC4A-UK / lagtraj

Python trajectory code for Lagrangian simulations
MIT License
11 stars 9 forks source link

Fix shown example with bundled examples cli cmd #187

Closed leifdenby closed 1 year ago

leifdenby commented 1 year ago

Fix example shown when running python -m lagtraj.input_definitions.examples CLI command. Previously the returned command wasn't valid.

Currently on master:

$> python -m lagtraj.input_definitions.examples
The following domain/forcing/trajectory definitions are currently included with lagtraj:

lagtraj://
 ├── domains
 │   ├── eurec4a_north_atlantic
 │   ├── eurec4a_circle
 │   └── drydown_cardington_local
 ├── trajectories
 │   ├── eurec4a_20200103_lag_testcase
 │   ├── eurec4a_20200202_first_short_press
 │   ├── eurec4a_20200202_first
 │   ├── eurec4a_20200209_first
 │   ├── drydown_cardington_20200420_00_eul
 │   ├── eurec4a_20200205_second
 │   ├── eurec4a_20200207_first
 │   ├── eurec4a_campaign_eulerian
 │   ├── eurec4a_20200128_first
 │   ├── eurec4a_20200202_first_short_eul
 │   └── eurec4a_20200202_first_short
 ├── forcings_conversion
 │   ├── dephy_prescribed_rad
 │   ├── kpt__120_levels
 │   ├── kpt
 │   └── dephy
 └── forcings
     ├── eurec4a_20200103_lag_testcase
     ├── eurec4a_20200202_first_short_press
     ├── eurec4a_20200202_first
     ├── eurec4a_20200209_first
     ├── drydown_cardington_20200420_00_eul
     ├── eurec4a_20200205_second
     ├── eurec4a_20200207_first
     ├── eurec4a_campaign_eulerian
     ├── eurec4a_20200128_first
     ├── eurec4a_20200202_first_short_eul
     └── eurec4a_20200202_first_short

To use for example the `eurec4a_north_atlantic` domain definition
for downloading domain data run lagtraj.domain.download as follows:

    $> python -m lagtraj.domain.download lagtraj://eurec4a_20200202_first

The suggested command at the bottom is missing the start_date and end_date arguments, and eurec4a_20200202_first isn't a valid domain example.

leifdenby commented 1 year ago

With the fix the first domain is always used, and I've added the missing arguments:

$> python -m lagtraj.input_definitions.examples
The following domain/forcing/trajectory definitions are currently included with lagtraj:

lagtraj://
 ├── domains
 │   ├── eurec4a_north_atlantic
 │   ├── eurec4a_circle
 │   └── drydown_cardington_local
 ├── trajectories
 │   ├── eurec4a_20200103_lag_testcase
 │   ├── eurec4a_20200202_first_short_press
 │   ├── eurec4a_20200202_first
 │   ├── eurec4a_20200209_first
 │   ├── drydown_cardington_20200420_00_eul
 │   ├── eurec4a_20200205_second
 │   ├── eurec4a_20200207_first
 │   ├── eurec4a_campaign_eulerian
 │   ├── eurec4a_20200128_first
 │   ├── eurec4a_20200202_first_short_eul
 │   └── eurec4a_20200202_first_short
 ├── forcings_conversion
 │   ├── dephy_prescribed_rad
 │   ├── kpt__120_levels
 │   ├── kpt
 │   └── dephy
 └── forcings
     ├── eurec4a_20200103_lag_testcase
     ├── eurec4a_20200202_first_short_press
     ├── eurec4a_20200202_first
     ├── eurec4a_20200209_first
     ├── drydown_cardington_20200420_00_eul
     ├── eurec4a_20200205_second
     ├── eurec4a_20200207_first
     ├── eurec4a_campaign_eulerian
     ├── eurec4a_20200128_first
     ├── eurec4a_20200202_first_short_eul
     └── eurec4a_20200202_first_short

To use for example the `eurec4a_north_atlantic` domain definition
for downloading domain data for Feb 1st to 3rd 2020 run lagtraj.domain.download as follows:

    $> python -m lagtraj.domain.download lagtraj://eurec4a_north_atlantic 2020/02/01 2020/02/03