Skip to content

Commit

Permalink
update doc for dockers
Browse files Browse the repository at this point in the history
  • Loading branch information
kristinemlarson committed Nov 19, 2023
1 parent 4b02848 commit b591974
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 48 deletions.
72 changes: 25 additions & 47 deletions docs/pages/docker_cl_instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,89 +36,67 @@ Now you can start working with the [gnssrefl code.](https://github.com/kristinem

### Kristine's Docker advice

I find Docker confusing! I am sure if I used it more often, it would be easier. But here goes:
I find Docker confusing! I am sure if I used it more often, it would be easier. But here goes my recommendations:

Open a window. You will be using linux commands. Make sure that you hit the return key after typing a command.

ensure that you are using the latest docker
Ensure that you are using the latest docker :

`docker pull ghcr.io/kristinemlarson/gnssrefl:latest`

make a directory where you plan to run the docker. I will call it local, i.e. `mkdir local`
Make a directory where you plan to run the docker. I will call mine local, i.e. `mkdir local`

cd into that directory, i.e. `cd local`
Change into that directory, `cd local`


If you are new to linux, make sure you know the full name of this directory. type `pwd` and see what
come back. I will pretend that what came back is `/usr/kristine/local` for this example
come back. I will pretend that what came back is `/usr/kristine/local` for my example

If you want to use GNSS data that are stored in archives, you can go ahead and run the relevant commands provided above.
If you want to use your own GNSS data, you have some options. For convenience, here I will only cover RINEX 2.11 users. You have two choices:
If you want to use GNSS data that are stored in archives, you can stop reading and just run the relevant commands provided above.
If you want to use your own GNSS data, you have some options. For convenience, here I will only cover RINEX 2.11 users.
You first need to create the *local directory*, `mkdir refl_code` . Then you have two choices:

Your RINEX files can be in the so-called local directory. They will be deleted after you translate them.
You will want to your RINEX files in
1. Your RINEX files can be stored in `/usr/kristine/local/refl_code`. They will be deleted after translation, so don't
put your only copy there.

`/usr/kristine/local/refl_code`.


That means you should first make that directory and only then move or copy your RINEX files there.

`mkdir refl_code`


or

Your RINEX files can be stored in a the standard storage areas. These will not be deleted after you translate them.
For a RINEX file from the year 2023 and with a station name of abcd, these files should be stored in

`/usr/kristine/local/refl_code/2023/rinex/abcd`

This means you have to create the 2023 directory, the rinex directory and the abcd directory before you copy or move files.
2. Your RINEX files can be stored in a the standard gnssrefl storage areas. Your RINEX files will *not* be deleted after you translate them.
For a RINEX file from the year 2023 and with a station name of abcd, these files should be stored in the directory called `/usr/kristine/local/refl_code/2023/rinex/abcd`. This means you have to create those additional directories. You can do that with an additional flag to the mkdir command, `mkdir -p refl_code/2023/rinex/abcd`.

Now start your docker.

```bash
docker run -it -v $(pwd)/refl_code:/etc/gnssrefl/refl_code/ --name gnssrefl ghcr.io/kristinemlarson/gnssrefl:latest /bin/bash
```

Yes, the command started the Docker, but it also told it to associate internally a directory it calls

`/etc/gnssrefl/refl_code`

with a physical directory on your machine called

`/usr/kristine/local/refl_code`

Now you should be able to run the rinex2snr code with your own files. Example:
In addition to starting the Docker, it also associates a directory
it calls `/etc/gnssrefl/refl_code` with a physical directory on your machine called `/usr/kristine/local/refl_code`
Now that that is set up, you should be able to run differnt gnssrefl commands. Example:

`rinex2snr abcd 2023 305 -nolook T`

This should translate a file a RINEX file for you. It will be stored in your Docker bucket as
The SNR output will be stored in your Docker bucket in the directory it calls `/etc/gnssrefl/refl_code/2023/snr/abcd`.
On your local machine it will live in `/usr/kristine/local/refl_code/2023/snr/abcd`

`/etc/gnssrefl/refl_code/2023/snr/abcd`

on your local machine it will live in

`/usr/kristine/local/refl_code/2023/snr/abcd`

When you run `quickLook`
Another example:

`quickLook abcd 2023 305`

It should put the files in

`/usr/kristine/local/refl_code/Files/abcd`
This creates two png files (`quickLook_summary.png` and `quickLook_lsp.png`) that are
stored in `/usr/kristine/local/refl_code/Files/abcd`. The code should always print the location of
output files so you don't have to remember all these details.

The names of the specific png files it created should be printed to the screen.
When you run `gnssir` the output txt or csv files will go in `/etc/gnssrefl/refl_code/2023/results/abcd`

You can change to different directories using two naming conventions.
You can change to different directories using either naming conventions.

`cd /etc/gnssrefl/refl_code/Files/abcd`

or

`cd $REFL_CODE/Files/abcd`

I hope this helps. I have posted an issue on github to make sure this page is up to date with the current
release of the software.

### Update Docker Image to newest version <a name="Update Docker"></a>

Expand Down
4 changes: 3 additions & 1 deletion gnssrefl/sd_libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ def mjd_to_obstimes(mjd):
def write_spline_output(splineout, iyear, th, spline, delta_out, station, txtdir,Hortho):
"""
Writing the output of the spline fit to the final RH time series.
No output other than this text file.
No output other than this text file for year 2023 and station name ssss:
$REFL_CODE/Files/ssss/ssss_2023_spline_out.txt
Parameters
----------
Expand Down

0 comments on commit b591974

Please sign in to comment.