GenericMappingTools / gmtserver-admin

Cache data and script for managing the GMT data server
GNU Lesser General Public License v3.0
7 stars 3 forks source link

Add moon and other planets #182

Closed Esteban82 closed 1 year ago

Esteban82 commented 1 year ago

I make a PR for the wrap-moon branch. I think it won't make any dammage. This PR is 9 commits behind. Not very sure how to deal with this? Should I use rebase?

This is the original message: This PR polishes things a bit, adds some comments, and sets unspecified @moon_relief.cpt as the default CPT for the moon grid. I have successfully built the 14s master grid, then 15s,30s, etc all the way to 1 degree of both resolutions. GMT master needed at least on macos and plenty of RAM to hold 8 Gb grids in memory.

seisman commented 1 year ago

This branch has conflicts with the master branch, you need to resolve these conflicts first.

Esteban82 commented 1 year ago

This branch has conflicts with the master branch, you need to resolve these conflicts first.

I see. How should I do it?

seisman commented 1 year ago

Click the "Resolve conflicts" button:

image

then you will see conflicts like:

    for REG in ${DST_NODES}; do # Probably doing both pixel and gridline registered output, except for master */
<<<<<<< wrap-moon
        # Set full name of output grid for this resolution,registration combination:
        DST_FILE=${DST_PLANET}/${DST_PREFIX}/${DST_PREFIX}_${RES}${UNIT}_${REG}.grd
=======
        DST_FILE=${DST_PLANET}/${DST_PREFIX}/${DST_PREFIX}_${IRES}${UNIT}_${REG}.grd
>>>>>>> master
        grdtitle="${TITLE} at ${RES} arc ${UNIT_NAME}"

Edit the file to remove lines which are incorrect.

Esteban82 commented 1 year ago

In this conflict the difference is ${RES} vs ${IRES}. I think I should use the later following #174. The other conflicts are comments.

        DST_FILE=${DST_PLANET}/${DST_PREFIX}/${DST_PREFIX}_${RES}${UNIT}_${REG}.grd
        DST_FILE=${DST_PLANET}/${DST_PREFIX}/${DST_PREFIX}_${IRES}${UNIT}_${REG}.grd
PaulWessel commented 1 year ago

I think so.

Esteban82 commented 1 year ago

Yes, now the only important change of this PR is the moon CPT.

Esteban82 commented 1 year ago

In this PR, I think we should add the moon_relief.cpt in the cache folder, right? See #167 for details.

PaulWessel commented 1 year ago

Yep. Last I recall was disagreement between the gray scale one and some generic color table. Since there is no "sea level" 0 contour we don't think we want one that has a hinge at zero.

Esteban82 commented 1 year ago

Ok, I will add WIP to the title until we define a CPT.

Esteban82 commented 1 year ago

I add the CPT so I will remove "WIP" from the title.

Esteban82 commented 1 year ago

I just added the other planets *_relief_server.txt files in this branch.

Esteban82 commented 1 year ago

I made this map of mars.

mars_relief

This is the CPT I made based on this csv: https://astropedia.astrogeology.usgs.gov/download/Mars/GlobalSurveyor/MOLA/ancillary/molaTeam_contour_31rgb_steps.csv

I only created the color for the 22000 value (161/251/254) which is not defined in the previous csv. It is not very important becuase only there are very few nodes with values in the range of 21000-22000.

mars_relief.cpt:

# Default CPT for @mars_relief
# Original table of colors post it in https://astrogeology.usgs.gov/search/map/Mars/GlobalSurveyor/MOLA/Mars_MGS_MOLA_ClrShade_merge_global_463m
# Colors converted to GMT format by Federico Esteban, March 28 2023.
#
# COLOR_MODEL = RGB
-9000   104/38/103  -8000   129/38/152
-8000   129/38/152  -7000   130/38/199
-7000   130/38/199  -6000   76/38/211
-6000   76/38/211   -5000   38/62/223
-5000   38/62/223   -4000   38/134/235
-4000   38/134/235  -3000   38/230/170
-3000   38/230/170  -2000   66/225/38
-2000   66/225/38   -1000   148/239/38
-1000   148/239/38  0   243/254/38
0   243/254/38  1000    254/188/63
1000    254/188/63  2000    240/147/67
2000    240/147/67  3000    226/111/69
3000    226/111/69  4000    212/81/72
4000    212/81/72   5000    190/107/91
5000    190/107/91  6000    168/119/105
6000    168/119/105 7000    177/130/116
7000    177/130/116 8000    186/141/128
8000    186/141/128 9000    194/153/141
9000    194/153/141 10000   203/166/155
10000   203/166/155 11000   211/179/170
11000   211/179/170 12000   221/193/185
12000   221/193/185 13000   229/208/201
13000   229/208/201 14000   238/223/218
14000   238/223/218 15000   246/238/236
15000   246/238/236 16000   248/241/239
16000   248/241/239 17000   249/244/243
17000   249/244/243 18000   252/249/249
18000   252/249/249 19000   255/255/255
19000   255/255/255 20000   218/253/255
20000   218/253/255 21000   181/251/254
21000   181/251/254 22000   161/251/254
B   104/38/103
F   161/251/254
N   gray
Esteban82 commented 1 year ago

I want to add the latest commits to the wrap-moon branch. How can I do it? I have some doubts and I am not sure.

Should I use: git branch wrap-moon And them:

  1. git merge master
  2. git rebase master
  3. In this case it is the same.
seisman commented 1 year ago

I want to add the latest commits to the wrap-moon branch.

Do you mean you want to merge the recent changes/commits in the master branch into the wrap-moon branch? If yes, you can simply press the "Update branch" button which is a GitHub web GUI feature I just enabled some minutes ago.

image

Should I use: git branch wrap-moon And them:

  1. git merge master
  2. git rebase master
  3. In this case it is the same.

If you want to do it manually/locally, then you can use either git merge master or git rebase master, but I recommend git merge master because git rebase master will change the git history and you have to force push your changes to this remote branch.

Esteban82 commented 1 year ago

Perfect!! Many thanks seisman!

Esteban82 commented 1 year ago

This is the map of Mercury.

mercury_relief_cpt

I made the CPT in order to get a map similar to this image

I used the colors and values from this legend. I adapt it to get a continuos CPT.

Let me know if there is something that would like to change in the CPT.

Here is the CPT I made:

-5400   gray15  -5020   218/125/207 L
-5020   218/125/207 -4765   192/114/161 L
-4765   192/114/161 -4510   171/116/218 L
-4510   171/116/218 -4220   136/84/183  L
-4220   136/84/183  -3930   85/36/148   L
-3930   85/36/148   -3640   38/22/201   L
-3640   38/22/201   -3350   21/70/200   L
-3350   21/70/200   -3060   18/113/221  L
-3060   18/113/221  -2770   36/152/239  L
-2770   36/152/239  -2480   41/190/254  L
-2480   41/190/254  -2190   42/224/255  L
-2190   42/224/255  -1900   95/225/245  L
-1900   95/225/245  -1610   66/189/221  L
-1610   66/189/221  -1320   124/190/221 L
-1320   124/190/221 -1030   173/190/221 L
-1030   173/190/221 -740    211/221/211 L
-740    211/221/211 -450    152/221/153 L
-450    152/221/153 -159.5  94/177/80   L
-159.5  94/177/80   131 94/177/80   L
131 94/177/80   421 123/152/89  L
421 123/152/89  711 104/104/65  L
711 104/104/65  1001    80/52/40    L
1001    80/52/40    1291    134/85/26   L
1291    134/85/26   1581    163/104/31  L
1581    163/104/31  1871    192/133/36  L
1871    192/133/36  2161    230/172/26  L
2161    230/172/26  2451    255/229/16  L
2451    255/229/16  2741    249/143/7   L
2741    249/143/7   3031    229/74/7    L
3031    229/74/7    3321    255/7/7 L
3321    255/7/7 3611    250/99/99   L
3611    250/99/99   3875.5  249/182/157 L
3875.5  249/182/157 4140    gray98  L
4140    gray98  4500    white   B
B   black
F   white
N   128

Links: Map: https://astrogeology.usgs.gov/search/map/Mercury/Topography/MESSENGER/Mercury_Messenger_USGS_ClrShade_Global_2k Legend: https://astropedia.astrogeology.usgs.gov/download/Mercury/Topography/MESSENGER/ancillary/Mercury_Messenger_USGS_ClrShade_Global_legend.png

Esteban82 commented 1 year ago

Thanks Paul! Only the relief cpt of venus and pluto remain to be uploaded (and made).