cdr30 / rapidmoc Goto Github PK
View Code? Open in Web Editor NEWCalculates observational-style decomposition of AMOC using output from an ocean general circulation model.
License: Other
Calculates observational-style decomposition of AMOC using output from an ocean general circulation model.
License: Other
Hi, thanks for sharing this nice tool package!
However, I found two issue before I can run this package:
TkAgg
:Traceback (most recent call last):
File "plot_rapid_regions.py", line 17, in <module>
matplotlib.use("TkAgg")
File "/nird/home/yanchun/.local/lib/python3.8/site-packages/matplotlib/__init__.py", line 1171, in use
plt.switch_backend(name)
File "/nird/home/yanchun/.local/lib/python3.8/site-packages/matplotlib/pyplot.py", line 284, in switch_backend
raise ImportError(
ImportError: Cannot load backend 'TkAgg' which requires the 'tk' interactive framework, as 'headless' is currently running
The first can be easily fixed by install the pandas
, and would you suggest how to fix the second issue? many thanks!
Hi Thanks for the package.
I am facing some issue with the time dimension of my model output data.
Traceback (most recent call last):
File "/home/dass/miniconda3/bin/run_rapidmoc.py", line 8, in <module>
sys.exit(main())
File "/home/dass/miniconda3/lib/python3.10/site-packages/rapidmoc/rapidmoc.py", line 106, in main
t = sections.ZonalSections(args.tfile, config, 'temperature')
File "/home/dass/miniconda3/lib/python3.10/site-packages/rapidmoc/sections.py", line 79, in __init__
self._read_tcoord()
File "/home/dass/miniconda3/lib/python3.10/site-packages/rapidmoc/sections.py", line 411, in _read_tcoord
t = nc.variables[self.tcoord]
KeyError: 'Time_in_years'
I am also attaching the config file here. Please tale a look.
Running run_rapidmoc.py on output from various models on their native grids, for some models the program fails and returns:
`
thetao: using mask information from {DATA_LOC}/thetao_RAW.nc.
so: using mask information from {DATA_LOC}/so_RAW.nc.
tauuo: using mask information from {DATA_LOC}/tauuo_RAW.nc.
vo: using mask information from {DATA_LOC}/vo_RAW.nc.
Traceback (most recent call last):
File "{CODE_LOC}/RapidMoc/run_rapidmoc.py", line 16, in <module>
main()
File "{CODE_LOC}/RapidMoc/rapidmoc/rapidmoc.py", line 112, in main
t_on_v = sections.interpolate(t, v)
File "{CODE_LOC}RapidMoc/rapidmoc/sections.py", line 446, in interpolate
sinterp.data = np.ma.MaskedArray(s1.interp_along_section(dist, x0, y0), mask=mask)
File "{PYTHON_LOC}/lib/python3.9/site-packages/numpy/ma/core.py", line 2909, in __new__
raise MaskError(msg % (nd, nm))
numpy.ma.core.MaskError: Mask and data not compatible: data size is 3061620, mask size is 1270200.
`
Has anyone had experience with this error? It works on some models and not others, but it's not clear why.
Thank you for your help in advance!
I'm experiencing an issue by which pcolormesh fails due to the dts
array having type real_datetime
. From looking around it seems this is due to a change in netCDF4
where num2date
previously returned datetime
objects but now returns real_datetime
objects, which matplotlib has issues with.
The following workaround seems to patch things up (in plotdiag.py
):
import cftime; import datetime; matplotlib.units.registry[cftime.real_datetime] = matplotlib.units.registry[datetime.datetime]
but is a bit clunky.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.