Coder Social home page Coder Social logo

Comments (4)

shiningxy avatar shiningxy commented on May 19, 2024

下载ETOPO1_Bed_c_gmt4.grd.gz,将该数据集解压至项目根目录,解压后的文件名为ETOPO1_Bed_c_gmt4.grd,md5校验码为a32d72c6d2d475d9f8047d6064d0bf2c

可以通过以下代码查看数据集的变量

import netCDF4 as nc
data = nc.Dataset("ETOPO1_Bed_c_gmt4.grd", "r+")
print(data.variables)

输出为

{'x': <class 'netCDF4._netCDF4.Variable'>
**float64 x(x)**
    long_name: Longitude
    actual_range: [-180.  180.]
    units: degrees_east
unlimited dimensions: 
current shape = (21600,)
filling on, default _FillValue of 9.969209968386869e+36 used, 'y': <class 'netCDF4._netCDF4.Variable'>
**float64 y(y)**
    long_name: Latitude
    actual_range: [-90.  90.]
    units: degrees_north
unlimited dimensions: 
current shape = (10800,)
filling on, default _FillValue of 9.969209968386869e+36 used, 'z': <class 'netCDF4._netCDF4.Variable'>
**int32 z(y, x)**
    long_name: z
    _FillValue: -2147483648
    actual_range: [-10803.   8333.]
unlimited dimensions: 
current shape = (10800, 21600)
filling on}

可以看到该数据集有三个变量,分别是float64类型的x,float64类型的y,和int32类型的z

请尝试以上方法,如果仍有问题,可以继续在issue中向我沟通,谢谢

from shiprouterl.

751770645 avatar 751770645 commented on May 19, 2024

from shiprouterl.

shiningxy avatar shiningxy commented on May 19, 2024

运行完main.py之后,可以得到一个奖励函数的曲线,一个名为Python Turtle Graphics的海龟绘图窗口和一个测试结果曲线。

目前规划路径结果图就是海龟绘图窗口,我保存了一个示例在本项目根目录的img/fig3.gif。代码中并未实现将海龟绘图窗口自动保存为文件的功能。

第一、该绘图窗口方法继承自gym.cliffwalking,我认为它非常古老,并且不美观,所以认为没有必要保存下来

第二、当经纬度跨度过大时,绘制网格线和陆地实心方块时间过长,不是一个可以接受的绘制时间

第三、如果非常想要录制规划路径结果图,可以使用obs studio或其他录屏软件

该项目还处在丰富理论基础和扩展代码实现的阶段,如果您有兴趣,可以与我一同维护本项目代码。

如果本项目对你有帮助,也请为本项目点一个⭐

from shiprouterl.

nikhil-pillai avatar nikhil-pillai commented on May 19, 2024

How can I change the code to work with custom lat and lons. I have a data set with all the lats and lons for each of the grid boxes inside the grid. Can you kindly explain.

from shiprouterl.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.