How to plot a M2 amplitude map using TPXO9 atlas #348
Replies: 11 comments
-
Hey @Jiangchao3, |
Beta Was this translation helpful? Give feedback.
-
Hi @tsutterley, thanks so much for the information, I will go to try pyTMD.io.ATLAS.extract_constants, and waiting for your notebook example release. |
Beta Was this translation helpful? Give feedback.
-
Dear @tsutterley , I can use pyTMD.io.ATLAS.extract_constants to extract M2 amp at a location i also have the fes2014 and fes2022 tide solution data, it says: Traceback (most recent call last): Cell In[20], line 2 File ~/miniconda3/envs/pytmd/lib/python3.12/site-packages/pyTMD/io/FES.py:242 in extract_constants UnboundLocalError: cannot access local variable 'lon' where it is not associated with a value I also try to check the netcdf file, it says Traceback (most recent call last): Cell In[21], line 1 File ~/miniconda3/envs/pytmd/lib/python3.12/site-packages/pyTMD/io/FES.py:721 in read_netcdf_file UnboundLocalError: cannot access local variable 'amp_key' where it is not associated with a value Any suggestions to help solve the problem, I just want to compare the amp using the two products. Thanks, |
Beta Was this translation helpful? Give feedback.
-
Hey @Jiangchao3,
p.s. also note that the amplitude units are different between models! I have a |
Beta Was this translation helpful? Give feedback.
-
@tsutterley thanks so much for your help! Let you know that I can successfully extract TPXO9, FES2014/2022 amp, phase information using pyTMD. But when I try to use the notebook you create yesterday to plot the M2 map, when I run
it says: Traceback (most recent call last): Cell In[47], line 1 AttributeError: 'widgets' object has no attribute 'constituents' Looking forwart to your advice to let example run to the end. Best, |
Beta Was this translation helpful? Give feedback.
-
Right. That widget I added in #345, so it isn't in a released version of
from the
-ts |
Beta Was this translation helpful? Give feedback.
-
@tsutterley, thanks for sharing this, even after installing pyTMD via git, i am still encountering some issues, I think i might just wait for the next version release. Feel soory for disturbing you so much! |
Beta Was this translation helpful? Give feedback.
-
Right. Do the full install to get
|
Beta Was this translation helpful? Give feedback.
-
@tsutterley thanks for sharing! I didn't know ipywidgets is a package. ps: the following two lines did not work, it says CRSError: Invalid projection: EPSG:3031: (Internal Proj Error: proj_create: no database context specified)
I thought there are some conflict between pyproj and other package, since some use pip some use conda to install.
then it works. |
Beta Was this translation helpful? Give feedback.
-
also the BoB region, thank your so much @tsutterley, I can not make it without your help. |
Beta Was this translation helpful? Give feedback.
-
Great! Glad you got what you needed! I'm going to convert this issue to a Discussion to keep it open in case you need anything. |
Beta Was this translation helpful? Give feedback.
-
Dear @tsutterley ,
This is Jiangchao, a freshman just learn how to use pyTMD. I have gone through the document of pyTMD, but still get a bit confused abou how to use it. Could you please guide me a bit how to accmpolish my goal in using pyTMD?
Task1:
I want to use the h_m2_tpxo9-atlas_30_v5.nc to get the M2 amplitude at a location (lon, lat) = (91.05,22.2188).
I try to use the method provided here [https://github.com//issues/103], but it sames that the pyTMD.read_netcdf_model is no available.
Taks2:
How to plot a M2 map using h_m2_tpxo9-atlas_30_v5.nc for a local region lon (80, 99), lat (10, 22), the Bay of Bangal.
Looking forward to your help and suggestion.
Best regards,
Jiangchao
Beta Was this translation helpful? Give feedback.
All reactions