Changeset 3664


Ignore:
Timestamp:
Feb 28, 2025, 11:16:41 AM (4 months ago)
Author:
afalco
Message:

z2sig: pa and preff are input parameters.
AF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTIL/z2sig/build_sig.py

    r3651 r3664  
    99import datetime
    1010from matplotlib import pyplot
     11
     12
     13######################################################################
     14# Input Parameters
     15######################################################################
     16input_file = 'z2sig.def_47'
     17ps=1.1 # in Pa
     18pa=0.5
     19preff=2
     20
     21# New levels
     22mynbl=201
     23n=float(mynbl)
     24
     25plot = True
     26# plot = False
     27
    1128
    1229######################################################################
     
    2239    data=np.zeros(nbline-1,dtype='f')
    2340    i=0
     41    nbl = 0
    2442    for line in mylines:
    2543        s=str.split(line)
     
    2846        else:
    2947          data[i-1]=float(s[0])
     48          nbl = nbl+1
    3049        i=i+1
    31     return data,hh
     50    return data,hh,nbl
    3251
    33 ######################################################################
    34 # Input Parameters
    35 ######################################################################
    36 nbl=47
    37 data,hh=readfile('z2sig.def_47')
    38 # nb of levels
    39 clev=np.linspace(1,nbl,nbl)
    40 ps=1.1
    41 # New levels
    42 mynbl=201
    43 n=float(mynbl)
    44 plot = True
    45 plot = False
     52data,hh,nbl = readfile(input_file)
    4653
    4754#####################
     
    107114# hybrid pressure:
    108115nsig=np.zeros(nbl,dtype='f')
    109 pa=0.5 #ps
    110 preff=2 #ps
    111116for i in range(nbl):
    112117  nsig[i]=sig_hybrid(sig[i],pa,preff)
     
    161166
    162167if plot:
     168    clev=np.linspace(1,nbl,nbl)
    163169    ### Plot pressure levels
    164170    mpl.figure(figsize=(50/2.54, 30/2.54),facecolor='w')
Note: See TracChangeset for help on using the changeset viewer.