Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to roll longitude axis

# To adjust coordinate labels or make axis cyclic or periodic,
# you can use the Shift() and/or roll() methods as shown below:

import xarray as xr


array = xr.DataArray([1, 2, 3, 4], dims="x")

# shift the coordinate 'x' (to the right) by 2
array.shift(x=2)

# roll the coordinate 'x' (toward the right) by 2
array.roll(x=2, roll_coords=True)

Comment

PREVIOUS NEXT
Code Example
Python :: make longitude -180 to 180 
Python :: find absolut vale in python 
Python :: python open pickle file 
Python :: numpy set_printoptions 
Python :: join two numpy arrays 
Python :: python clock 
Python :: force utf-8 encoding python 
Python :: how to log ip addresses in python 
Python :: install python3 6 ubuntu 20 
Python :: plt show 2 images 
Python :: python maths max value capped at x 
Python :: list methods python 
Python :: UnavailableInvalidChannel error in conda 
Python :: python is integer 
Python :: raise an APi error on django rest view 
Python :: does break stop all loops 
Python :: polyfit python 
Python :: how to append element python 
Python :: python filename without extension 
Python :: pickle.load python 
Python :: read pickle file python 
Python :: python check if type 
Python :: proper tree in data structure 
Python :: identify the common columns between two dataframes pandas python 
Python :: csv reader python skip header 
Python :: python check string case insensitive 
Python :: pip install vlc 
Python :: Network.py socket 
Python :: extract text regex python 
Python :: breaking big csv into chunks pandas 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =