[GRASS-user] grass-user Digest, Vol 205, Issue 33
kyawmoeaung.kyawmoe at gmail.com
kyawmoeaung.kyawmoe at gmail.com
Thu May 25 02:10:56 PDT 2023
Dear Markus, Tom and Valcus,
Thank you very much for your invaluable reply.
I tried to ask ChatGPT as Markus suggested.
However, I can not figure out which web api are available for active
cyclone/hurrican/typhoon so that I can test them with the aid of AI.
Any hints?
Below is the code generated by ChatGPT.
import requests import json import grass.script as gscript # Function to
download data from a URL def download_data(url, output_file): response =
requests.get(url) with open(output_file, 'wb') as file:
file.write(response.content) # Function to import meteorological data into
GRASS GIS def import_data(file_path, map_name): gscript.run_command(
'r.in.gdal', input=file_path, output=map_name) # Function to track cyclones
using GRASS GIS modules def track_cyclones(data_map): # Set computational
region to match the imported data gscript.run_command('g.region',
raster=data_map) # Perform cyclone tracking analysis using GRASS modules #
Replace the following commands with the appropriate GRASS GIS modules and
parameters for cyclone tracking # Example: #
gscript.run_command('r.mapcalc', expression='cyclone_track = ...') # Print
a message indicating the completion of the tracking process
gscript.message('Cyclone
tracking completed.') # Define URLs for downloading data from NOAA, NHC,
and JTWC *noaa_url = **'https://example.com/noaa_data.nc
<https://example.com/noaa_data.nc>' nhc_url =
'https://example.com/nhc_data.nc <https://example.com/nhc_data.nc>'
jtwc_url = 'https://example.com/jtwc_data.nc
<https://example.com/jtwc_data.nc>'* # Define output file paths noaa_file =
'/path/to/noaa_data.nc' nhc_file = '/path/to/nhc_data.nc' jtwc_file =
'/path/to/jtwc_data.nc' # Download meteorological data from NOAA, NHC, and
JTWC download_data(noaa_url, noaa_file) download_data(nhc_url, nhc_file)
download_data(jtwc_url, jtwc_file) # Import meteorological data into GRASS
GIS import_data(noaa_file, 'noaa_data') import_data(nhc_file, 'nhc_data')
import_data(jtwc_file, 'jtwc_data') # Track cyclones using the imported data
track_cyclones('noaa_data') # Replace 'noaa_data' with the appropriate data
map name # Clean up: remove the downloaded data files if desired #
Uncomment the following lines if you want to delete the downloaded files #
import os # os.remove(noaa_file) # os.remove(nhc_file) #
os.remove(jtwc_file)
Best regards,
Kyaw Moe Aung
On Thu, May 25, 2023 at 1:31 AM <grass-user-request at lists.osgeo.org> wrote:
> Send grass-user mailing list submissions to
> grass-user at lists.osgeo.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.osgeo.org/mailman/listinfo/grass-user
> or, via email, send a message with subject or body 'help' to
> grass-user-request at lists.osgeo.org
>
> You can reach the person managing the list at
> grass-user-owner at lists.osgeo.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of grass-user digest..."
>
>
> Today's Topics:
>
> 1. Re: Active Tropical Cyclone Tracking with GRASS GIS and
> Jupyter Notebook (Thomas Adams)
> 2. Re: Active Tropical Cyclone Tracking with GRASS GIS and
> Jupyter Notebook (Markus Neteler)
> 3. Re: Active Tropical Cyclone Tracking with GRASS GIS and
> Jupyter Notebook (Thomas Adams)
> 4. Re: Active Tropical Cyclone Tracking with GRASS GIS and
> Jupyter Notebook (Markus Neteler)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 24 May 2023 11:56:53 -0400
> From: Thomas Adams <tea3rd at gmail.com>
> To: Vaclav Petras <wenzeslaus at gmail.com>
> Cc: kyawmoeaung.kyawmoe at gmail.com, grass-user at lists.osgeo.org
> Subject: Re: [GRASS-user] Active Tropical Cyclone Tracking with GRASS
> GIS and Jupyter Notebook
> Message-ID:
> <
> CAGxgkWjGGWje25g0Wu+R1yHvfXSJCohzVsTriUoyQjJr34tFRQ at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi all,
>
> Yes ? agreed that a lot of scripting would be needed, but importing readily
> available data is very doable.
>
> Tom
>
> On Mon, May 22, 2023 at 2:17?PM Vaclav Petras <wenzeslaus at gmail.com>
> wrote:
>
> > Hi Kyaw,
> >
> > I think it is fairly safe to say that GRASS GIS supports that, but
> someone
> > would need to create that specific workflow or notebook.
> >
> > Best,
> > Vaclav
> >
> >
> > On Tue, 16 May 2023 at 23:59, <kyawmoeaung.kyawmoe at gmail.com> wrote:
> >
> >> Hi all,
> >>
> >> I am just wondering whether GRASS GIS supports tracking active and
> >> archive cyclones/hurricanes/typhoons as was found in ArcGIS using living
> >> atlas and ArcGIS online platform.
> >> I noticed that they are using NOAA and other satellite sensors.
> >>
> >> Thank you very much.
> >>
> >>
> >> Kyaw Moe Aung
> >> Consultant
> >> PyJuliaR Consulting Firm
> >> _______________________________________________
> >> grass-user mailing list
> >> grass-user at lists.osgeo.org
> >> https://lists.osgeo.org/mailman/listinfo/grass-user
> >>
> > _______________________________________________
> > grass-user mailing list
> > grass-user at lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/grass-user
> >
>
>
> --
> Thomas E Adams, III
> 207 Chowning Place
> Blacksburg, VA 24060
> tea3rd at gmail.com (personal)
> tea at terrapredictions.org (work)
>
> 1 (513) 739-9512 (cell)
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.osgeo.org/pipermail/grass-user/attachments/20230524/d321cc9d/attachment-0001.htm
> >
>
> ------------------------------
>
> Message: 2
> Date: Wed, 24 May 2023 18:21:40 +0200
> From: Markus Neteler <neteler at osgeo.org>
> To: Thomas Adams <tea3rd at gmail.com>
> Cc: Vaclav Petras <wenzeslaus at gmail.com>,
> kyawmoeaung.kyawmoe at gmail.com, grass-user at lists.osgeo.org
> Subject: Re: [GRASS-user] Active Tropical Cyclone Tracking with GRASS
> GIS and Jupyter Notebook
> Message-ID:
> <CALFmHhvmjkz1Vmbs1BdQMVpe5d=
> qk0xzgXendWkrYuhCMxWuug at mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> On Wed, May 24, 2023 at 5:57?PM Thomas Adams <tea3rd at gmail.com> wrote:
> >
> > Hi all,
> >
> > Yes ? agreed that a lot of scripting would be needed, but importing
> readily available data is very doable.
>
> Being in modern times, you can generate the majority of the script
> (Jupyter notebook) even with an AI.
>
> Best,
> Markus
>
>
> ------------------------------
>
> Message: 3
> Date: Wed, 24 May 2023 12:23:28 -0400
> From: Thomas Adams <tea3rd at gmail.com>
> To: Markus Neteler <neteler at osgeo.org>
> Cc: Vaclav Petras <wenzeslaus at gmail.com>, grass-user at lists.osgeo.org,
> kyawmoeaung.kyawmoe at gmail.com
> Subject: Re: [GRASS-user] Active Tropical Cyclone Tracking with GRASS
> GIS and Jupyter Notebook
> Message-ID:
> <CAGxgkWhRo2=
> 8O4XpRmZxZFRL3qeWApvUo7uXZO1n5+Z5MG8Oig at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> I guess I?m pathetically old school ??????
>
> On Wed, May 24, 2023 at 12:21 PM Markus Neteler <neteler at osgeo.org> wrote:
>
> > On Wed, May 24, 2023 at 5:57?PM Thomas Adams <tea3rd at gmail.com> wrote:
> > >
> > > Hi all,
> > >
> > > Yes ? agreed that a lot of scripting would be needed, but importing
> > readily available data is very doable.
> >
> > Being in modern times, you can generate the majority of the script
> > (Jupyter notebook) even with an AI.
> >
> > Best,
> > Markus
> >
> --
> Sent from Gmail Mobile
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.osgeo.org/pipermail/grass-user/attachments/20230524/a8b13e0d/attachment-0001.htm
> >
>
> ------------------------------
>
> Message: 4
> Date: Wed, 24 May 2023 18:28:25 +0200
> From: Markus Neteler <neteler at osgeo.org>
> To: Thomas Adams <tea3rd at gmail.com>
> Cc: Vaclav Petras <wenzeslaus at gmail.com>, grass-user at lists.osgeo.org,
> kyawmoeaung.kyawmoe at gmail.com
> Subject: Re: [GRASS-user] Active Tropical Cyclone Tracking with GRASS
> GIS and Jupyter Notebook
> Message-ID:
> <CALFmHhud77OodEq0O1SfOMaPzsQv=
> XZJm4WgAB6bo+ux26ob1Q at mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> On Wed, May 24, 2023 at 6:23?PM Thomas Adams <tea3rd at gmail.com> wrote:
> >
> > I guess I?m pathetically old school ??????
>
> It is "just" for reducing the workload - still we need to be able to
> check what the AI suggests :-)
> Just wanted to point out that some new helper tools are available.
>
> Markus
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
>
>
> ------------------------------
>
> End of grass-user Digest, Vol 205, Issue 33
> *******************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20230525/b464140e/attachment-0001.htm>
More information about the grass-user
mailing list