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
Great. Just a heads up: I am actually trying to do some of the legwork for you and will do a PR soon to add the moon recipe. I thought I at least run in through a few resolutions before adding it.
PR safely updated and seems to work well.Unless you are on a mac with lots of RAM it would be good to see how well the process runs for you. Expect many hours.
Currently running the script and it's converting the TIFF to a netCDF. You weren't joking about the RAM requirements; currently using 24 out of 32 GB. I'm on an Ubuntu 20.04 gaming desktop with an 8th gen i7, so I'm hoping it won't take too long. I did run into an issue the first time I ran the script; it stopped downloading after 4.6 GB and I received curl: (18) transfer closed with 3917136203 bytes remaining to read, so I'm not sure if that was a connection issue or something else. I deleted the downloaded portion and it seems to have completed the download the second time around!
Interesting with curl doing that. Probably a glitch in the matrix somewhere as we say. If the downsampler step works well you will find the folder moon/moon_relief inside the staging folder and it will have all the grids at various resolutions. If you then run the tiler script then all the 5 min and higher resolutions will be split into tiles so there will then be directories with JP2 tiles inside that folder while the original global grids will be moved up to stain/tiled as safekeeping (we do not use those again or store them on the server).
I just received this error and the process quit. Here is what I'm seeing on my terminal:
srv_downsampler_grid.sh: Must download original source https://planetarymaps.usgs.gov/mosaic/Lunar_LRO_LOLA_Global_LDEM_118m_Mar2014.tif
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 8100M 100 8100M 0 0 28.7M 0 0:04:41 0:04:41 --:--:-- 28.1M
srv_downsampler_grid.sh: Must convert original tif source to Lunar_LRO_LOLA_Global_LDEM_118m_Mar2014.nc
scripts/srv_downsampler_grid.sh: line 117: [: NaN: integer expression expected
Convert Lunar_LRO_LOLA_Global_LDEM_118m_Mar2014.nc to moon/moon_relief/moon_relief_14s_p.grd=ns+s0.5+o0
Down-filter Lunar_LRO_LOLA_Global_LDEM_118m_Mar2014.nc to moon/moon_relief/moon_relief_15s_g.grd=ns+s0.5+o0
scripts/srv_downsampler_grid.sh: line 167: 21766 Killed gmt grdfilter -R-180/180/-90/0 ${SRC_FILE} -Fg${FILTER_WIDTH} -D${FMODE} -I${RES}${UNIT} -r${REG} -G${TMP}/s.grd --PROJ_ELLIPSOID=${DST_SPHERE}
It looks like the download went fine but it ran into an issue when trying to run grdfilter. It looks like my home environment still has GMT 6.0.0, so I'm trying it with my PyGMT development environment that has GMT 6.4.0.
OK, I think you will actually need to run from GMT master - I do not know how to do that within conda since I am from the olden days. But I have made GMT source changes the last 24 hours in responses to issues with the moon processing. So master is a requirement for now.
The problem with big files is that it's not enough to have enough RAM. There needs to exist a contiguous chunk of memory to hold the entire array. Maybe if you reboot and start from a cleanest as possible state it may make a difference ... or not.
True, @joa-quim but also a must to use master since I fixed some issues. They may be macOS-specific though - hard to tell. The crash is in the section where I had to run grdfilter separately on the N and S hemispheres otherwise I got strange horizontal lines that @Esteban82 reported. Doing it this way (until I can find some subtle trouble) works - at least for me - and is only done on the 30s or finer resolutions. This and other issues are most likely some subtle 64-bit counting issue but hard to debug.
Installed gmt from master (showing 6.5.0_e43114b_2023.01.04) and rebooted; still got the same result. It also used all of my RAM (32 GB) for about a minute prior to crashing.
Down-filter Lunar_LRO_LOLA_Global_LDEM_118m_Mar2014.nc to moon/moon_relief/moon_relief_15s_g.grd=ns+s0.5+o0
scripts/srv_downsampler_grid.sh: line 167: 6018 Killed gmt grdfilter -R-180/180/-90/0 ${SRC_FILE} -Fg${FILTER_WIDTH} -D${FMODE} -I${RES}${UNIT} -r${REG} -G${TMP}/s.grd --PROJ_ELLIPSOID=${DST_SPHERE}
Unfortunately, I don't have any Apple hardware to try this out with. I'm not sure what troubleshooting to try next.
Thanks for trying. What I guess you can try is to run the script with full verbose (bash -xv .....) so that you can see that command with all the actual arguments. Then copy paste and verify it still crashes (it should) but add -Vd so we might learn when it crashes. Then, just mess with -I and go from 15s to 30s to 01m and see if it stops crashing. I would think so as this seems to be related to trouble with 64-bit counting and not so much lack of memory since you have 32 Gb.
THe 14 arc second grid as 4-byte float internally is about 16 Gb, and then it is the output grid at 15s which is almost 14 Gb. So just those two allocations push 30 Gb of memory. For "fun" I am trying this comment (which does not produce the right answer hence the S and N workaround:
and activity monitor says this process is using 45.68 Gb! I am not sure what the extra 15 Gb but maybe a weight grid for something. I will have to debug to understand that 3rd blob.
How can I test the moon_relief.cpt from the test chache server (/export/gmtserver/gmt/test/cache)?
I upload the cpt file to the directory but it didin't work.
I supossed that I have to update the gmt_data_hash.txt. I try something but it didn't work.
The error that I got:
grdimage [ERROR]: Libcurl Error: HTTP response code said error
grdimage [ERROR]: Probably means @moon_relief does not exist on the remote server
grdimage [ERROR]: Unable to obtain remote file @moon_relief
Just add it to the regular cache area since we are going to do that anyway.
Just to know.
In order to add data in the cache, is it only necessary to add to the server?
Or is there something else that need to be done (like updating the cache file)?
Just add it to your working copy of the repo, just like you do when you add a file to the gmt repo, then make a PR to add the file, someone approves, and within 1 hour (I hink) the gmtserver will check and detect there have been changes, it will do a git pull and the new file will be in the cloud. So give it 1 hour or so after approval/merge for it to show.
Activity
PaulWessel commentedon Jan 3, 2023
Great. Just a heads up: I am actually trying to do some of the legwork for you and will do a PR soon to add the moon recipe. I thought I at least run in through a few resolutions before adding it.
willschlitzer commentedon Jan 3, 2023
Thanks @PaulWessel! I'll hold off any work until your PR.
Add recipe for moon DEM
Add recipe for moon DEM (#168)
PaulWessel commentedon Jan 4, 2023
PR safely updated and seems to work well.Unless you are on a mac with lots of RAM it would be good to see how well the process runs for you. Expect many hours.
willschlitzer commentedon Jan 4, 2023
Currently running the script and it's converting the TIFF to a netCDF. You weren't joking about the RAM requirements; currently using 24 out of 32 GB. I'm on an Ubuntu 20.04 gaming desktop with an 8th gen i7, so I'm hoping it won't take too long. I did run into an issue the first time I ran the script; it stopped downloading after 4.6 GB and I received
curl: (18) transfer closed with 3917136203 bytes remaining to read, so I'm not sure if that was a connection issue or something else. I deleted the downloaded portion and it seems to have completed the download the second time around!PaulWessel commentedon Jan 4, 2023
Interesting with curl doing that. Probably a glitch in the matrix somewhere as we say. If the downsampler step works well you will find the folder moon/moon_relief inside the staging folder and it will have all the grids at various resolutions. If you then run the tiler script then all the 5 min and higher resolutions will be split into tiles so there will then be directories with JP2 tiles inside that folder while the original global grids will be moved up to stain/tiled as safekeeping (we do not use those again or store them on the server).
willschlitzer commentedon Jan 4, 2023
I just received this error and the process quit. Here is what I'm seeing on my terminal:
It looks like the download went fine but it ran into an issue when trying to run
grdfilter. It looks like my home environment still has GMT 6.0.0, so I'm trying it with my PyGMT development environment that has GMT 6.4.0.willschlitzer commentedon Jan 4, 2023
Same issue with GMT 6.4:
Any idea what the culprit may be? Here is my environment info:
PaulWessel commentedon Jan 4, 2023
OK, I think you will actually need to run from GMT master - I do not know how to do that within conda since I am from the olden days. But I have made GMT source changes the last 24 hours in responses to issues with the moon processing. So master is a requirement for now.
joa-quim commentedon Jan 4, 2023
The problem with big files is that it's not enough to have enough RAM. There needs to exist a contiguous chunk of memory to hold the entire array. Maybe if you reboot and start from a cleanest as possible state it may make a difference ... or not.
PaulWessel commentedon Jan 4, 2023
True, @joa-quim but also a must to use master since I fixed some issues. They may be macOS-specific though - hard to tell. The crash is in the section where I had to run grdfilter separately on the N and S hemispheres otherwise I got strange horizontal lines that @Esteban82 reported. Doing it this way (until I can find some subtle trouble) works - at least for me - and is only done on the 30s or finer resolutions. This and other issues are most likely some subtle 64-bit counting issue but hard to debug.
willschlitzer commentedon Jan 4, 2023
Installed gmt from master (showing
6.5.0_e43114b_2023.01.04) and rebooted; still got the same result. It also used all of my RAM (32 GB) for about a minute prior to crashing.Unfortunately, I don't have any Apple hardware to try this out with. I'm not sure what troubleshooting to try next.
PaulWessel commentedon Jan 4, 2023
Thanks for trying. What I guess you can try is to run the script with full verbose (bash -xv .....) so that you can see that command with all the actual arguments. Then copy paste and verify it still crashes (it should) but add -Vd so we might learn when it crashes. Then, just mess with -I and go from 15s to 30s to 01m and see if it stops crashing. I would think so as this seems to be related to trouble with 64-bit counting and not so much lack of memory since you have 32 Gb.
PaulWessel commentedon Jan 5, 2023
THe 14 arc second grid as 4-byte float internally is about 16 Gb, and then it is the output grid at 15s which is almost 14 Gb. So just those two allocations push 30 Gb of memory. For "fun" I am trying this comment (which does not produce the right answer hence the S and N workaround:
gmt grdfilter moon_relief_14s_p.grd -Fg0.18 -I15s -rp -D1 -Gshit.nc=ns -Vand activity monitor says this process is using 45.68 Gb! I am not sure what the extra 15 Gb but maybe a weight grid for something. I will have to debug to understand that 3rd blob.
63 remaining items
Esteban82 commentedon Mar 11, 2023
Here I made another maps from differentes CPTS
Without cyan:
With cyan at -1000

With cyan at -500

PaulWessel commentedon Mar 11, 2023
I have no strong opinions on this so suggest you and @willschlitzer can decide what you prefer, then go with that.
Esteban82 commentedon Mar 13, 2023
I wonder if @joa-quim has something to say.
Esteban82 commentedon Mar 15, 2023
I will use the second CPT. Below a copy it.
Is the header ok? Line 2 is too long but is where the "cpt" was posted. I think to use this link instead (https://pubs.usgs.gov/sim/3316/) but it has no information of the colors.
joa-quim commentedon Mar 15, 2023
Sorry, had no time to look to this. My preferred would be the first (no cyan) but no strong opinion either.
No problem with that second long line. It's a comment line.
Add moon_relief.cpt to cache
Esteban82 commentedon Mar 19, 2023
How can I test the moon_relief.cpt from the test chache server (
/export/gmtserver/gmt/test/cache)?I upload the cpt file to the directory but it didin't work.
I supossed that I have to update the
gmt_data_hash.txt. I try something but it didn't work.The error that I got:
PaulWessel commentedon Mar 21, 2023
Not sure if cache testing works that way. Just add it to the regular cache area since we are going to do that anyway.
Esteban82 commentedon Mar 21, 2023
Now it is working.
Esteban82 commentedon Mar 22, 2023
Just to know.
In order to add data in the cache, is it only necessary to add to the server?
Or is there something else that need to be done (like updating the cache file)?
PaulWessel commentedon Mar 22, 2023
Just add it to your working copy of the repo, just like you do when you add a file to the gmt repo, then make a PR to add the file, someone approves, and within 1 hour (I hink) the gmtserver will check and detect there have been changes, it will do a git pull and the new file will be in the cloud. So give it 1 hour or so after approval/merge for it to show.
Add moon and other planets (#182)
PaulWessel commentedon Jul 25, 2023
Hi @willschlitzer, could you please ssh into the gmtserver and run
chmod -R g+won the moon directory under the test server, i.e.chmod -R g+w /export/gmtserver/gmt/test/server/moonWithout write-permission for the group the rest of us cannot do much there. We are inching closer to the releases.
Esteban82 commentedon Jan 9, 2024
It was already implemented.