Ignore:
Timestamp:
Jul 7, 2025, 1:39:13 PM (2 days ago)
Author:
afalco
Message:

Pluto: updated plots scripts.
Fixed some issues with reading XIOS, etc.
Included display_netcdf.py tool from Mars PCM.
AF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.PLUTO/util/script_figures/map_alb_ini.py

    r3823 r3833  
    11#! /usr/bin/env python
    2 from ppclass import pp
    32from    netCDF4               import    Dataset
    43from    numpy                 import    *
     
    109import matplotlib.colors as mcolors
    1110from mpl_toolkits.basemap import Basemap
     11from FV3_utils import *
    1212
    1313############################
    14 filename="diagfi2015.nc"
     14filename=name+".nc"
    1515nb_dataset=1  #change vect as well
    16 tint=["0,0.001"] #Time must be as written in the input file
     16tint=[0,0.001] #Time must be as written in the input file
    1717#zint=["0"] #alt in km
    1818#xarea="-180,179"
    1919#yarea="-90,90"
    2020#step=5  #step between each bin
    21 var="albedo" #variable
     21var="ALB" #variable
    2222var2="phisinit"
    2323############################
    2424
    2525nc=Dataset(filename)
    26 lat=nc.variables["lat"][:]
    27 lon=nc.variables["lon"][:]
     26lat=getvar(nc,"latitude")
     27lon=getvar(nc,"longitude")
     28tim=getvar(nc,"Time")
    2829
    29 myvar = pp(file=filename,var=var,t=tint,compute="mean").getf()  # get data to be changed according to selected variable
    30 myvar2 = pp(file=filename,var=var2,t=tint,compute="mean").getf()  # get data to be changed according to selected variable
     30myvar = getvar(nc,var,tint,t_mean=True)
     31myvar2 = getvar(nc,var2)
    3132print(('shape var1 =',shape(myvar)))
    3233print(('shape lat = ',shape(lat)))
     
    9091           myvar2bis[i,j]=myvar2[i,j-int(vec[1]/2)]
    9192
    92 lon=lon+180.
     93if lon[0]<0:
     94    lon=lon+180.
    9395
    9496
Note: See TracChangeset for help on using the changeset viewer.