Ignore:
Timestamp:
Jul 7, 2025, 1:39:13 PM (36 hours 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/proftempNH.py

    r3823 r3833  
    11#! /usr/bin/env python
    2 from ppclass import pp
    32from    netCDF4               import    Dataset
    43from    numpy                 import    *
     
    1110import datetime
    1211from mpl_toolkits.basemap import Basemap, shiftgrid
     12from FV3_utils import *
    1313
    1414############################
    15 zefile="diagfi2015_A.nc"
    16 d1="restart_ref/"
    17 
    18 f1=d1+zefile
    19 
    20 
    2115var="temperature" #variable
    2216
    23 nc1=Dataset(f1)
    24 lat=nc1.variables["lat"][:]
    25 lon=nc1.variables["lon"][:]
    26 alt=nc1.variables["altitude"][:]
    27 tim=nc1.variables["time_counter"][:]
     17nc1=Dataset(name+"_A.nc")
     18lat=getvar(nc1,"latitude")
     19lon=getvar(nc1,"longitude")
     20alt=getvar(nc1,"altitude")
     21tim=getvar(nc1,"Time")
    2822
    2923print(('Time = ',tim))
     
    4337    print(('Point =',p,' Time=',tim[indt1]))
    4438    return indt1
    45  
    46 def getvar(filename,var):
    47     myvar = pp(file=filename,var=var,compute="nothing").getf()
    48     return myvar
    4939
    5040def getindex(lat,lon,mylat,mylon):
     
    5747    indt=findindextime(tini,lt0,ltchoice,p)
    5848    indlat,indlon=getindex(lat,lon,p[1],p[0])
    59     myvar=getvar(f1,var)[indt,:,indlat,indlon]
     49    myvar=getvar(nc1,var)[indt,:,indlat,indlon]
    6050    return myvar
    6151############################
     
    9282font=23
    9383
    94 alt=alt/1000.
    95 
    9684mpl.plot(myvar1,alt,'r',label='Entry')
    9785mpl.plot(myvar2,alt,'g',label='Entry-like on edge')
Note: See TracChangeset for help on using the changeset viewer.