-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vcs 3D rotating globe animation not working properly #409
Comments
@danlipsa this is actually a super high priority, please focus on this first. |
@doutriaux1 Sounds good. I'll take a look at it tomorrow. |
@doutriaux1 It is the projection that causes the problem. boxfill works correctly. |
@danlipsa you mean the same proj on boxfill works? So it's proj+isofill? |
Yes, that is correct.
…On Mon, Jun 3, 2019 at 5:59 PM Charles Doutriaux ***@***.***> wrote:
@danlipsa <https://github.com/danlipsa> you mean the same proj on boxfill
works? So it's proj+isofill?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#409?email_source=notifications&email_token=ABPE65Z2NGR3BW2B4LIELPLPYWH4RA5CNFSM4HRJPLDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW22BEY#issuecomment-498442387>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABPE65ZVJDFOTJLGK4EVZU3PYWH4RANCNFSM4HRJPLDA>
.
|
Thx. Sounds like a vtk issue then. @scottwittenburg I don't think you did anything special for isofill right? |
It is strange that isofill works for other projections that show the globe
rounds (such as -3 which is tested) but does not work for "orthographic".
But it hard to say where the problem comes from. I'll know more later today.
…On Tue, Jun 4, 2019 at 10:01 AM Charles Doutriaux ***@***.***> wrote:
Thx. Sounds like a vtk issue then. @scottwittenburg
<https://github.com/scottwittenburg> I don't think you did anything
special for isofill right?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#409?email_source=notifications&email_token=AEW527AIYOAYAI6HF4GUQFLPYZYTDA5CNFSM4HRJPLDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW4VETY#issuecomment-498684495>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEW527DHNBEKVNKYXKB5J73PYZYTDANCNFSM4HRJPLDA>
.
|
getProjectedBoundsForWorldCoords in vcs returns infinity for one of the coordinates for this projection. I should have a fix today. |
@doutriaux1 I don't think I did anything special there. However, there were always some special cases I didn't quite understand for various pieces of work (getting plotting bounds, wrapping the grid, etc...) which I just had to leave the way they were, because trying to change them broke everything. |
Fix in |
Fix has been merged in master. |
While running the example code on the VCS 3D Animation Tutorial (https://cdat.llnl.gov/Jupyter-notebooks/vcs/Animations/Animations.html), Example 3: Rotating Globe, the animation that is created is not right. A red square in the attached screenshot highlights what seems to be a portion of the globe in the lower left corner of the window. Previously, the globe was centered in the middle of the view.

The code I used to create the animation is the following (updated to Python 3 from the Python 2 code in the example on the Tutorial page listed above - Python 2 code commented out):
import requests
r = requests.get("https://uvcdat.llnl.gov/cdat/sample_data/clt.nc",stream=True)
with open("clt.nc","wb") as f:
for chunk in r.iter_content(chunk_size=1024):
if chunk: # filter local_filename keep-alive new chunks
f.write(chunk)
import cdms2
f=cdms2.open("clt.nc")
clt=f("clt",time=slice(0,1),longitude=(0,361),squeeze=1) # Read the time slice and squeeze it out
make directory for pngs if not present
import os
if not os.path.exists("pngs"):
os.makedirs("pngs")
import vcs
create new canvas
x = vcs.init(bg=True)
Create projection
polar = vcs.createprojection("rotate")
polar.type = "orthographic"
polar.centerlongitude=0.
polar.centerlatitude=45.
Create isofill method
iso = vcs.createisofill()
#iso.levels = range(0,110,10)
iso.levels = list(range(0,110,10))
#iso.fillareacolors = vcs.getcolors(range(0,110,10))
iso.fillareacolors = vcs.getcolors(list(range(0,110,10)))
iso.projection = polar
for centerLongitude in range(0,366,5):
polar.centerlongitude = centerLongitude
x.clear()
x.plot(clt,iso)
x.png("pngs/rotate_%s.png" % str(centerLongitude).zfill(6))
import glob
name = "rot_animation.mp4"
Create animation into file
#print "files used",glob.glob("pngs/rotate_*png")
print ("files used",glob.glob("pngs/rotate_*png"))
x.ffmpeg(name,sorted(glob.glob("pngs/rotate_*png")), rate=15)
The text was updated successfully, but these errors were encountered: