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

Update Makefile to include grav data? #163

Closed Esteban82 closed 2 years ago

Esteban82 commented 2 years ago

In my local version of the makefile I added the commands to process the faa data:

        make earth-faa
earth-faa:
        scripts/srv_downsampler_grid.sh earth_faa
        scripts/srv_tiler.sh earth_faa

Then, I run make earth-faa. I get some messages in the terminal

scripts/srv_tiler.sh: línea 168: printf: 11.2: número no válido
make: *** [Makefile:55: earth-faa] Error 1

I think that the error is due to the fact earth_faa_01m_g.grd doesn't exist. Besides this, all the files create looks fine.

So, we should we update the makefile? Are the commnads in makefile ok?

PaulWessel commented 2 years ago

Yes, that is fine. Since we have a relatively small number of data sets we could add those commands for all of them. I am working on Gebco right now (in Hawaii remotely) - takes a bit longer due to the 15s size...

Esteban82 commented 2 years ago

Ok. And what about the error message?? It can produce some confussions the next time someone update the grav data.

PaulWessel commented 2 years ago

Yes, well we need to know what they are. Line 168 in tiler is

        printf "/server/%s/%s/\t%s\t%s\t%s\t%s\t%s\t%4s\t0\t%s\t-\t-\t%s\t%s at %dx%d arc %s reduced by Gaussian %s filtering (%g km fullwidth) [%s]\n" \
            ${DST_PLANET} ${DST_PREFIX} ${DST_FILE} ${TAG} ${REG} ${DST_SCALE} ${DST_OFFSET} ${SIZE} ${creation_date} ${DST_CPT} "${TITLE}" ${RES} ${RES} ${UNAME} ${DST_MODE} ${FILTER_WIDTH} "${CITE}" >> ${DST_PREFIX}_server.txt

so for whatever reason there is a mistake in the order of things so that 11.2 (might that be the km filter width) is not accepted. I wonder if your LOCAL is not C? What do you get when you type locale? I get

LANG="C" LC_COLLATE="C" LC_CTYPE="C" LC_MESSAGES="C" LC_MONETARY="C" LC_NUMERIC="C" LC_TIME="C" LC_ALL=

Given that your message is in Spanish I suspect you will need to run this script using C. Maybe check this link.

Esteban82 commented 2 years ago

LANG=es_AR.UTF-8 LANGUAGE= LC_CTYPE="es_AR.UTF-8" LC_NUMERIC="es_AR.UTF-8" LC_TIME="es_AR.UTF-8" LC_COLLATE="es_AR.UTF-8" LC_MONETARY="es_AR.UTF-8" LC_MESSAGES="es_AR.UTF-8" LC_PAPER="es_AR.UTF-8" LC_NAME="es_AR.UTF-8" LC_ADDRESS="es_AR.UTF-8" LC_TELEPHONE="es_AR.UTF-8" LC_MEASUREMENT="es_AR.UTF-8" LC_IDENTIFICATION="es_AR.UTF-8" LC_ALL=

PaulWessel commented 2 years ago

I think that means you need to temporarily switch to locale C when running these scripts. Should be simple - see the link - but I have not tried since I am already on C.

PaulWessel commented 2 years ago

But this is separate from your make file - that one is fine to update.

PaulWessel commented 2 years ago

Note the srv_tiler.sh script also builds the snippets needed for gmt_server_data.txt which is assembled by the makefile target server-info. I need to get those and update the bits in the information directory for Gebco (they were left in Hawaii...)

Esteban82 commented 2 years ago

So, I have to make a PR to update the makefile and the gmt_data_server.txt and the earth_faa/vgg_server.txt?

PaulWessel commented 2 years ago

Hold off on the gmt_data_server.txt - just update the faa and vgg bits in the information - I will do the same now with gebco.

Esteban82 commented 2 years ago

I set LANG=C and I didin't get any error message.

So, I think this can be closed.