Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try to merge with master.. #2

Open
wants to merge 104 commits into
base: next_mei
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
ca90534
Merge pull request #1 from SCECcode/next_mei
meihuisu Oct 13, 2023
041f3af
wip
Oct 20, 2023
99ae2e3
wip
Oct 20, 2023
d78e458
wip
Oct 21, 2023
a84b38c
wip
Oct 21, 2023
da40737
wip
Oct 21, 2023
71cf1fc
wip
Oct 21, 2023
357d6da
wip
Oct 21, 2023
70ee7bf
wip
Oct 21, 2023
5b99625
wip
Oct 21, 2023
24eaab6
wip
Oct 21, 2023
659b850
wip
Oct 21, 2023
6af5a3f
wip
Oct 21, 2023
fe074f3
wip
Oct 21, 2023
0c3f327
wip
Oct 21, 2023
f0896d1
wip
Oct 22, 2023
c901633
wip
Oct 22, 2023
ba7e936
wip
Oct 22, 2023
587d019
wip
Oct 22, 2023
6bc4fea
wip
Oct 22, 2023
48c44bf
wip
Oct 23, 2023
52dbec7
wip
Oct 23, 2023
c1863a9
wip
Oct 25, 2023
b1ecf42
wip
Oct 25, 2023
2d054b5
wip
Oct 27, 2023
f72f0f1
wip to CFM6.1
Oct 28, 2023
b7f75ee
wip
Oct 28, 2023
355bd51
wip
Oct 29, 2023
4e19a64
wip
Oct 30, 2023
5138071
wip
Oct 31, 2023
629f4d9
wip
Nov 1, 2023
714891e
wp
Nov 1, 2023
b6aef64
wip
Nov 3, 2023
f505d3f
wip -- loading http
Nov 3, 2023
7cf64fb
import Mike's guide
Nov 3, 2023
248c11f
wip
Nov 5, 2023
03b0aa8
wip
Nov 5, 2023
87e6d13
wip
Nov 6, 2023
facf1f9
wip
Nov 6, 2023
522f9be
wip
Nov 6, 2023
e0b49d9
wip
Nov 6, 2023
e3d2d9e
wip
Nov 7, 2023
3f00087
wip
Nov 7, 2023
88d2091
wip
Nov 7, 2023
34693ed
wip add insar descript to front page.
Nov 17, 2023
cee63be
wip
Nov 20, 2023
caf960b
update station_type
Nov 20, 2023
2205d8c
wip
Nov 20, 2023
52633ad
wip
Nov 21, 2023
bfee190
wip
Nov 21, 2023
20be934
wip
Nov 22, 2023
5617f3b
wip
Nov 22, 2023
fd200a6
wip
Dec 4, 2023
15e4449
wip
Dec 7, 2023
d32752a
wip
Dec 7, 2023
bfc6aa7
bring new gnss csv files
Dec 8, 2023
91924ce
wip
Dec 8, 2023
17f9841
wip
Dec 8, 2023
f71b90b
wip
Dec 8, 2023
4d5d074
wip
Dec 9, 2023
9fa9239
wip
Dec 9, 2023
b754deb
wip
Dec 9, 2023
e9867b6
wip
Dec 10, 2023
30d1c15
new orange
Dec 10, 2023
572bc67
wip
Dec 11, 2023
ed1b7b3
wip
Dec 11, 2023
ba3d21b
wip
Dec 11, 2023
b1bd7b9
wip
Dec 11, 2023
06eb762
wip
Dec 11, 2023
2373c94
wip
Dec 11, 2023
0b02a78
clean up some code.
Dec 14, 2023
5da675c
wip
Dec 14, 2023
6a9fb58
wip
Dec 14, 2023
68a9819
wip
Dec 14, 2023
4ed062b
some updates to user guide
Dec 15, 2023
18c5fb8
wip
Dec 15, 2023
c1d3162
add another set of data
Dec 15, 2023
a20f9db
wip
Dec 16, 2023
0773661
data file location
Dec 16, 2023
e96000d
wip
Dec 16, 2023
8dac15b
Merge branch 'master' of github.com:SCECcode/CGM_web
Dec 16, 2023
3bda72c
wip
Dec 16, 2023
0744c4d
add place holder
Dec 16, 2023
1814976
patched from Edric
Jan 22, 2024
a29eb97
wip
Jan 22, 2024
13e84c9
wip
Jan 22, 2024
16b2bc0
edit doc
Jan 22, 2024
7a01d6f
wip
Jan 23, 2024
71e8edf
wip
Jan 23, 2024
ae6a4f3
wip
Jan 23, 2024
d62ee11
tweak
Aug 27, 2024
a8aa8a8
adjust styling to match statewide branding
levin422 Aug 31, 2024
2234464
switch to CFM7.0
Sep 3, 2024
b5bbdb2
tweak for expand button
Sep 3, 2024
259d0b6
update with CFM7.0
Sep 3, 2024
0fcc4b1
update user guide
Sep 3, 2024
159698c
fix naming
Sep 3, 2024
6d2ecb8
update changeLog
Sep 4, 2024
7142739
1) change db back to CGM_db
Sep 6, 2024
8488bde
update doc
Sep 6, 2024
c84b29c
add change of Result directory's permission
Sep 6, 2024
a633eca
add how to cite tab, update disclaimer and contact text
levin422 Sep 6, 2024
e8c099d
extend to include https://central.scec.org
Sep 7, 2024
f3aaf86
tweak expand
Sep 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/insar
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,6 @@ venv.bak/

/error_log
.idea/
/insar
.DS_Store

3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 2024-09-04 Mei-Hui Su <[email protected]>
* New Statewide styling <[email protected]>

## 2023-01-20 Mei-Hui Su <[email protected]>
* looking to add

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-postgis
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM mdillon/postgis:10-alpine
ENV POSTGRES_USER postgres
ENV POSTGRES_DB CGM1_db
ENV POSTGRES_DB CGM_db
ENV PGDATA=/home/postgres/cgm_db

WORKDIR /app
Expand Down
27 changes: 13 additions & 14 deletions Dockerfile-web
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN yum install -y httpd && \

## python/hdf5

RUN yum install -y tar mkdir sudo which git wget openblas yum-utils gcc make
RUN yum install -y tar mkdir sudo which git wget gtar openblas yum-utils gcc make
RUN yum install -y zlib-devel openssl11-devel libffi-devel

RUN cd /app/misc; tar zxvf cpython-3.8.11.tar.gz;cd cpython-3.8.11; ./configure --prefix=/usr/local/python-3.8.11; make; make install
Expand All @@ -20,21 +20,20 @@ RUN sudo ln -s /usr/local/python-3.8.11/bin/python3.8 /usr/bin/python3
RUN python3 -m pip install setuptools wheel numpy netCDF4

## build hdf5
RUN amazon-linux-extras install -y epel
RUN yum install –y epel-release
RUN yum-config-manager --enable epel
RUN yum install -y hdf5-devel

RUN python3 -m pip install h5py
RUN amazon-linux-extras install -y epel && \
yum install –y epel-release && \
yum-config-manager --enable epel && \
yum install -y hdf5-devel && \
python3 -m pip install h5py

## bring in the insar track data
RUN cd /app/web/cgm_data && \
mkdir -p insar && \
cd insar && \
wget -nv https://g-c662a6.a78b8.36fe.data.globus.org/cxm/models/cgm/insar/D071_COMB_CGM_InSAR_v0_0_1.hdf5 && \
wget -nv https://g-c662a6.a78b8.36fe.data.globus.org/cxm/models/cgm/insar/A166_COMB_CGM_InSAR_v0_0_1.hdf5 && \
wget -nv https://g-c662a6.a78b8.36fe.data.globus.org/cxm/models/cgm/insar/A064_COMB_CGM_InSAR_v0_0_1.hdf5 && \
wget -nv https://g-c662a6.a78b8.36fe.data.globus.org/cxm/models/cgm/insar/D173_COMB_CGM_InSAR_v0_0_1.hdf5
# RUN cd /app/web/cgm_data && \
# mkdir -p insar && \
# cd insar && \
# wget -nv https://files.scec.org/s3fs-public/projects/cgm/2.0.0/data/cgm-v2.0.0-insar.tar.gz && \
# gtar -zxvf cgm-v2.0.0-insar.tar.gz

#ADD https://files.scec.org/s3fs-public/projects/cgm/2.0.0/data/cgm-v2.0.0-insar.tar.gz /app/web/cgm_data

RUN cd /app && \
git clone https://github.com/kmaterna/InSAR_CGM_readers_writers.git && \
Expand Down
34 changes: 21 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
# ~~Community Geodetic Model~~
_TODO: Write new documentation,

### https://www.scec.org/research/cgm
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://github.com/SCECcode/CGM_web/blob/master/LICENSE.md)

##CGM viewer
# CGM Explorer

_TODO: Write new documentation
## Community Geodetic Model (CGM)

### Screen Capture
A 2D Explorer based on Leaflet, an open-source JavaScript library for interactive maps,
https://leafletjs.com, map data services from OpenStreetMap, https://www.openstreetmap.org,
OpenTopoMap, https://www.opentopomap.org and leaflet esri plugin,
https://esri.github.io/esri-leaflet, for Ersi basemap from ArcGIS and 2D time series plots
based on Plotly.js, a high-level delarative charting library.

## Community Geodetic Model

Website URL: TBD
The Community Geodetic Model (CGM) provides displacement time series and velocities of the Earth’s surface over southern California using data from Global Navigation Satellite Systems (GNSS), which includes the Global Positioning System (GPS), and interferometric synthetic aperture radar (InSAR), both space-based geodetic observation techniques.

![](doc/cgm_demo.jpg)
### https://www.scec.org/research/cgm

### Screen Capture

![](web/img/cgm-explorer.jpg)

## CGM data service

Expand Down Expand Up @@ -43,13 +49,15 @@ Deployment is accomplished using [Docker](https://docs.docker.com/) with [docker

#### Development Deployment
1. Run: `docker-compose -f docker-compose.yml -f development.yml up -d`
2. After the build is complete, browse to http://localhost:8084
3. The development.yml maps the code directory to the container for easy code development and exposes port 5432 for directly accessing the Postgres database.
2. Run: `./load_insar.sh`
3. After the build is complete, browse to http://localhost:8084
4. The development.yml maps the code directory to the container for easy code development and exposes port 5432 for directly accessing the Postgres database.

#### Production Deployment
1. Run: `docker-compose -f docker-compose.yml up -d`
2. After build is complete, browse to http://server-name:8084
3. Optionally, set up a reverse proxy from a URL on an existing web server to localhost:8084.
2. Run: `./load_insar.sh`
3. After build is complete, browse to http://server-name:8084
4. Optionally, set up a reverse proxy from a URL on an existing web server to localhost:8084.

### Layout

Expand Down
1 change: 1 addition & 0 deletions doc/cgm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Listen 8081
RewriteRule ^guide$ guide.php [L]
RewriteRule ^contact$ contact.php [L]
RewriteRule ^disclaimer$ disclaimer.php [L]
RewriteRule ^cite$ how-to-cite.php [L]
</Directory>

<VirtualHost *:8081>
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ services:
dockerfile: Dockerfile-web
context: ./
restart: always
volumes:
- ./insar:/app/web/cgm_data/insar
ports:
- 8081:8081
- 8080:80
Expand Down
9 changes: 9 additions & 0 deletions load_insar.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#/bin/bash

mkdir -p insar
cd insar
wget https://files.scec.org/s3fs-public/projects/cgm/2.0.0/data/cgm-v2.0.0-insar.tar.gz
tar xvf cgm-v2.0.0-insar.tar.gz
cd ..
mv insar web/cgm_data
chmod og+rw web/result
6 changes: 6 additions & 0 deletions run_build
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
docker rmi $(docker images -f dangling=true -q ) -f
docker-compose -f docker-compose-localhost.yml -f development.yml down
docker system prune -a -f --volumes
docker-compose -f docker-compose-localhost.yml -f development.yml up --build --force -d
./load_insar.sh

6 changes: 5 additions & 1 deletion run_connect
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
docker container exec -it cgm_web_web_1 /bin/bash

pid=`docker ps | grep cgm_web_web | cut -f 1 -d ' '`

docker container exec -it $pid /bin/bash

## psql -U postgres -d CGM_db


Loading