powellb / seapy

State Estimation and Analysis in Python
MIT License
28 stars 21 forks source link

Load HYCOM data issues #69

Closed jc-suen closed 2 years ago

jc-suen commented 2 years ago

Hello, everyone I am currently using SEAPy to make ROMS initial field and boundary field files. But when I run seapy.model.hycom.load_history("hycom_file.nc", start_time=datetime.datetime(2019,8,1), end_time=datetime.datetime(2019,8,31), grid=mygrid, url='http://tds.hycom.org/thredds/dodsC/GLBu0.08/expt_91.1', load_data=True). Exception: Cannot find valid times.How da I solve this problem? In addition I also have other problem is that run mygrid = seapy.model.asgrid('roms_sea.nc') warn (" could not compute grid depths. "). Will this error not affect my subsequent interpolation?

powellb commented 2 years ago

First, if your grid tells you it cannot compute the grid depths, it is likely because you don't have Vtransform, Vstretching, hc, and Tcline saved in the grid netcdf file. Those aren't required fields for the ROMS grid file, but they are needed for seapy to figure out what the depths are. Regardless, they aren't needed for extracting data from HYCOM.

As the documentation notes, hycom.load_history, is not intended to load the data for you. I haven't tried to have it load HYCOM data in years because it is a terribly inefficient way to do it. You can have it try; however, you need to maintain the URL to the latest HYCOM experiment and data that is appropriate for your application. It is simply a helper function.

You are better off having it output the information needed to extract the data from the HYCOM server and running a separate process to pull those data.

On Sep 25, 2022, at 3:20 AM, jcsunn @.***> wrote:

Hello, everyone I am currently using SEAPy to make ROMS initial field and boundary field files. But I'm running seapy.model.hycom.load_history("hycom_file.nc", start_time=datetime.datetime(2019,8,1), end_time=datetime.datetime(2019,8,31), grid=mygrid, url='http://tds.hycom.org/thredds/dodsC/GLBu0.08/expt_91.1', load_data=True). Exception: Cannot find valid times.How da I solve this problem? In addition I also have a one problem is that I made the grid tip warn (" could not compute grid depths. "). Will this error not affect my subsequent interpolation?

— Reply to this email directly, view it on GitHub https://github.com/powellb/seapy/issues/69, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAANGPYRUF5G6UBKP3B3EMLWABGTJANCNFSM6AAAAAAQVC2WPA. You are receiving this because you are subscribed to this thread.