Changeset 3833 for trunk/LMDZ.PLUTO/util/script_figures/map_alb_ini.py
- Timestamp:
- Jul 7, 2025, 1:39:13 PM (2 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.PLUTO/util/script_figures/map_alb_ini.py
r3823 r3833 1 1 #! /usr/bin/env python 2 from ppclass import pp3 2 from netCDF4 import Dataset 4 3 from numpy import * … … 10 9 import matplotlib.colors as mcolors 11 10 from mpl_toolkits.basemap import Basemap 11 from FV3_utils import * 12 12 13 13 ############################ 14 filename= "diagfi2015.nc"14 filename=name+".nc" 15 15 nb_dataset=1 #change vect as well 16 tint=[ "0,0.001"] #Time must be as written in the input file16 tint=[0,0.001] #Time must be as written in the input file 17 17 #zint=["0"] #alt in km 18 18 #xarea="-180,179" 19 19 #yarea="-90,90" 20 20 #step=5 #step between each bin 21 var=" albedo" #variable21 var="ALB" #variable 22 22 var2="phisinit" 23 23 ############################ 24 24 25 25 nc=Dataset(filename) 26 lat=nc.variables["lat"][:] 27 lon=nc.variables["lon"][:] 26 lat=getvar(nc,"latitude") 27 lon=getvar(nc,"longitude") 28 tim=getvar(nc,"Time") 28 29 29 myvar = pp(file=filename,var=var,t=tint,compute="mean").getf() # get data to be changed according to selected variable30 myvar2 = pp(file=filename,var=var2,t=tint,compute="mean").getf() # get data to be changed according to selected variable30 myvar = getvar(nc,var,tint,t_mean=True) 31 myvar2 = getvar(nc,var2) 31 32 print(('shape var1 =',shape(myvar))) 32 33 print(('shape lat = ',shape(lat))) … … 90 91 myvar2bis[i,j]=myvar2[i,j-int(vec[1]/2)] 91 92 92 lon=lon+180. 93 if lon[0]<0: 94 lon=lon+180. 93 95 94 96
Note: See TracChangeset
for help on using the changeset viewer.