You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Update to earth_relief v2.5.5 in main server. #214
Yes you can but may need to be careful and do by hand - I have not written makefiles yet as I have been plugging GMT bugs instead. I think the policy for updates is OK:
When an existing data set is updated (SRTM, Sandwell grav, etc) we can update the server after we have tested that it works.
When a new data set is released (e.g. Pluto) we wait to introduce all of them as a new GMT version gets out (5.6).
IT people at SOEST has not responded so another day goes by, but I want them to rename "test" to "candidate" and then any make or script action from us will only add files or update them in the candidate directory. When we feel a dataset or sets are ready we should do something like
make release moon
and that will
Build a shell script with commands to run on the server.
Copy the shell script to /tmp on the server.
Run that script locally via ssh from our ends.
Add this to a log file
If you want to do some other things then I have not gotten to these yet:
Remaining planets processing (mercury?)
Explore if grdcut could be used to create the image tiles needed etc., e.g., gmt grdcut @earth_day_30s_p -R0/15/15/30 -Gonetile.tif=gd ?
Explore if grdblend can stitch image times together
Remaining planets processing (mercury?)
Explore if grdcut could be used to create the image tiles needed etc., e.g., gmt grdcut @earth_day_30s_p -R0/15/15/30 -Gonetile.tif=gd ?
Explore if grdblend can stitch image times together
BTW, I am thinking of moving the current earth_relief files (v 2.4) to the test directory (as a backup). I will create the directory earth_relief_v2.4. Unless you have a better suggestion.
Maybe, but I put them there and they are shared by the other DEMs (gebco, synth, etc.). Sure, I could create a strum directory but remember people running 6.3 also want their workflows to work and unless we duplicate that huge set of files we will break things. So for now, in earth_relief and the code handles how to get there.
I updated the files in the dir server/earth/earth_relief.
But in the directory /export/gmtserver/gmt/data the files for higher resolutions (15s to 05m) are those of the SRTM15+ v2.1. I think I should replace them for the version without tiling.
Maybe, but I put them there and they are shared by the other DEMs (gebco, synth, etc.). Sure, I could create a strum directory but remember people running 6.3 also want their workflows to work and unless we duplicate that huge set of files we will break things. So for now, in earth_relief and the code handles how to get there.
Can't you move the data, and then make a symlink to have backward compatibility?
The files needed to be updated are (for backward compatibility):
-bash-4.2$ ls -lh *.grd | grep -v ^l
-rw-rw-r-- 1 pwessel gmt 238M ene 26 2022 earth_relief_01m_g.grd
-rw-rw-r-- 1 pwessel gmt 65M ene 26 2022 earth_relief_02m_g.grd
-rw-rw-r-- 1 pwessel gmt 30M ene 26 2022 earth_relief_03m_g.grd
-rw-rw-r-- 1 pwessel gmt 18M ene 26 2022 earth_relief_04m_g.grd
-rw-rw-r-- 1 pwessel gmt 12M ene 26 2022 earth_relief_05m_g.grd
-rw-rw-r-- 1 pwessel gmt 3,2G ene 26 2022 earth_relief_15s_p.grd
-rw-rw-r-- 1 pwessel gmt 864M ene 26 2022 earth_relief_30s_g.grd
My doubt is how could I test it. Should I install GMT 6.1? Is the only way to do it?
Also, I think we could copy those files (without tiling) into within server/earth/earth_relief/ and create some symlinks. So, it would be easier to update. I could try to do it.
I think this was solved earlier. See scripts/srv_setbackwards_links.sh and see if it is still OK.
As for updating from candidate to data, your git pull and try
make server-release
You will be asked if you want to update a specific data set (e.g., earth_synbath) or hit return for all.Try either (nothing will be running anywhere yet!). That command creates a /tmp/release.sh script and it will be copied to /tmp in the server. The command that would run it is commented out for now.
Please examine the /tmp/release.sh for the two cases and see if you can find any errors. Lot of the commands can be cut/pasted and run without corrupting the oceania server.
Sorry, had appointment earlier and now engaged in making dinner! Let me know if you any bugs in the script and what it creates.
I try make server-release make got an issue. It thinks that my name is thor which is not my username for the server (esteban82). I can change it but I wonder if it would be better that the scripts asks for the hostname. Or maybe it is an issue that happened only to me because I don't know very well how to use linux.
make server-release
scripts/server-release.sh
server-release.sh: Enter a specific data set (e.g., mars_relief) or hit return for all data on the candidate: earth-synbath
server-release.sh: Copying earth-synbath from candidate server to oceania
server-release.sh: scp /tmp/release.sh candidate.generic-mapping-tools.org:/tmp
[email protected]'s password:
Right. The script will destroy itself but of course only if it is run. I have removed it so you can at least try - but then remember to delete it so others can try too!
-bash-4.2$ cat release.sh
#!/usr/bin/env bash
# Script made by "make server-release" to be run on the gmtserver
#
# 1. Issue rsync command
rsync -al /export/gmtserver/gmt/candidate/server/all /export/gmtserver/gmt/data/server/all
# 2. Rebuild the gmt_data_server.txt file
# 2a. Make sed script that changes THEDATE to today's dat
date "+%Y-%m-%d" | awk '{printf "s/THEDATE/%s/g\n", 2826791}' > /tmp/sed.txt
# 2b. Find all the dataset server files
find /export/gmtserver/gmt/data/server -name '*_*_server.txt' > /tmp/datasets.lis
# 2c. Count the number of data files or directory entries and start first line of /tmp/gmt_data_server.txt:
cat $(cat /tmp/datasets.lis) | grep -v '^#' | wc -l | awk '{printf "%d\n", }' > /tmp/gmt_data_server.txt
# 2d. Append the header information section after piping via sed to get the date
cat /export/gmtserver/gmt/gmt_data_server_header.txt | sed -f /tmp/sed.txt >> /tmp/gmt_data_server.txt
# 2e. Append all the data set files to the same file
cat $(cat /tmp/datasets.lis) >> /tmp/gmt_data_server.txt
# 2f. Copy the old server file to the backup file
cp -f /export/gmtserver/gmt/data/gmt_data_server.txt /export/gmtserver/gmt/data/gmt_data_server_previous.txt
# 2g. Place the new server file
cp -f /tmp/gmt_data_server.txt /export/gmtserver/gmt/data
# 3. Clean up
rm -f tmp/sed.txt /tmp/gmt_data_server.txt /tmp/release.sh
You could login to the server, edit the release script by commenting out 2g and 3, then run the script and see if it produces a nice gmt_data_server.txt in /tmp (but not copying it anywhere yet)
Activity
Esteban82 commentedon Aug 21, 2023
1. Test the files in test.generic-mapping-tools.org
I made this test to avoid having the same issue that with synbath. It's ok.
Esteban82 commentedon Aug 24, 2023
I am a bit lost. @PaulWessel could I proceed with this?
PaulWessel commentedon Aug 24, 2023
Yes you can but may need to be careful and do by hand - I have not written makefiles yet as I have been plugging GMT bugs instead. I think the policy for updates is OK:
IT people at SOEST has not responded so another day goes by, but I want them to rename "test" to "candidate" and then any make or script action from us will only add files or update them in the candidate directory. When we feel a dataset or sets are ready we should do something like
make release moon
and that will
If you want to do some other things then I have not gotten to these yet:
Esteban82 commentedon Aug 24, 2023
Ok, I will try to take a look at this:
Esteban82 commentedon Aug 24, 2023
BTW, I am thinking of moving the current earth_relief files (v 2.4) to the test directory (as a backup). I will create the directory
earth_relief_v2.4. Unless you have a better suggestion.Esteban82 commentedon Aug 24, 2023
@PaulWessel I notice that within
earth_reliefthere are the grids for 03s and 01s (of SRTM). Wouldn't be better if that data is in another directory?PaulWessel commentedon Aug 24, 2023
Maybe, but I put them there and they are shared by the other DEMs (gebco, synth, etc.). Sure, I could create a strum directory but remember people running 6.3 also want their workflows to work and unless we duplicate that huge set of files we will break things. So for now, in earth_relief and the code handles how to get there.
Esteban82 commentedon Aug 24, 2023
Oh, yes, backward compatibilty. So, I will be extra carefull when I update that folder.
Esteban82 commentedon Aug 24, 2023
I have just updated the files and test them.
Esteban82 commentedon Aug 24, 2023
PaulWessel commentedon Aug 24, 2023
Hm, I thought you did? You show oceania above and oceania -> data. Hopefully tomorrow, candidate -> candidate and static -> static.
Esteban82 commentedon Aug 24, 2023
I updated the files in the dir
server/earth/earth_relief.But in the directory
/export/gmtserver/gmt/datathe files for higher resolutions (15s to 05m) are those of the SRTM15+ v2.1. I think I should replace them for the version without tiling.PaulWessel commentedon Aug 24, 2023
Those are there for backwards compatibility with 6.1 I think. But no harm in updating them.
anbj commentedon Aug 24, 2023
Can't you move the data, and then make a symlink to have backward compatibility?
Esteban82 commentedon Aug 28, 2023
The files needed to be updated are (for backward compatibility):
My doubt is how could I test it. Should I install GMT 6.1? Is the only way to do it?
Also, I think we could copy those files (without tiling) into within
server/earth/earth_relief/and create some symlinks. So, it would be easier to update. I could try to do it.PaulWessel commentedon Aug 28, 2023
I think this was solved earlier. See
scripts/srv_setbackwards_links.shand see if it is still OK.As for updating from candidate to data, your git pull and try
make server-releaseYou will be asked if you want to update a specific data set (e.g., earth_synbath) or hit return for all.Try either (nothing will be running anywhere yet!). That command creates a
/tmp/release.shscript and it will be copied to /tmp in the server. The command that would run it is commented out for now.Please examine the
/tmp/release.shfor the two cases and see if you can find any errors. Lot of the commands can be cut/pasted and run without corrupting the oceania server.Sorry, had appointment earlier and now engaged in making dinner! Let me know if you any bugs in the script and what it creates.
Esteban82 commentedon Aug 28, 2023
Ok, I will take a look. It is for the symlinks only, right? So, I have to manually update those grids in the top dir.
PaulWessel commentedon Aug 28, 2023
Think that is true, so do the links at the end
Esteban82 commentedon Aug 28, 2023
I try
make server-releasemake got an issue. It thinks that my name isthorwhich is not my username for the server (esteban82). I can change it but I wonder if it would be better that the scripts asks for the hostname. Or maybe it is an issue that happened only to me because I don't know very well how to use linux.PaulWessel commentedon Aug 28, 2023
Interesting, OK we will have to abstract the username then (I am pwessel everywhere so did not think of that). I'll come up with a solution.
PaulWessel commentedon Aug 28, 2023
OK, try this:
Run it first before you set the parameter and then it should say esteban@
Esteban82 commentedon Aug 28, 2023
@PaulWessel I think I don't have permission to write
release.sh.After the commit I got this:
And I check in the server and I saw:
PaulWessel commentedon Aug 28, 2023
Right. The script will destroy itself but of course only if it is run. I have removed it so you can at least try - but then remember to delete it so others can try too!
Esteban82 commentedon Aug 28, 2023
I think that now ir running well.
PaulWessel commentedon Aug 28, 2023
You could login to the server, edit the release script by commenting out 2g and 3, then run the script and see if it produces a nice gmt_data_server.txt in /tmp (but not copying it anywhere yet)
Esteban82 commentedon Sep 2, 2023
I just updated the files in the top dir.
Esteban82 commentedon Sep 3, 2023
I am closing this.
Maybe the info about
export GMT_USER=usernameformake server-releaseshould be copy somehwere else.