Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit bf40efa9 authored by Thomas Dubos's avatar Thomas Dubos
Browse files

read CHIMERE hybrid coefficients from apbp.txt

parent f56a9965
0.00000 1.00000
0.00000 0.99800
0.00032 0.99536
0.00069 0.99229
0.00111 0.98873
0.00161 0.98460
0.00219 0.97980
0.00286 0.97422
0.00364 0.96775
0.00454 0.96023
0.00559 0.95150
0.00681 0.94136
0.00823 0.92959
0.00987 0.91592
0.01178 0.90004
0.01400 0.88161
0.01657 0.86020
0.01956 0.83534
0.02303 0.80647
0.02706 0.77294
0.03149 0.73613
0.03591 0.69933
0.04034 0.66252
0.04476 0.62571
0.04919 0.58891
0.05362 0.55210
0.05804 0.51529
0.06247 0.47849
0.06689 0.44168
0.07132 0.40487
0.07574 0.36807
0.08017 0.33126
0.08459 0.29445
0.08902 0.25765
0.09345 0.22084
0.09787 0.18403
0.10230 0.14723
0.10672 0.11042
0.11115 0.07361
0.11557 0.03681
0.12000 0.00000
This diff is collapsed.
../CHIMERE/apbp.txt
\ No newline at end of file
......@@ -12,12 +12,15 @@ nbp=40
optim_it=500
nsplit_i=2
nsplit_j=3
llm=19
llm=40
# metric_type=icosa_area
# area_center_lon=135
# area_center_lat=45
# area_radius=5000
disvert=std
# disvert=std
disvert=read_apbp
#------------ Numerics --------------
dt=360
nqtot=5
......@@ -42,8 +45,8 @@ nudging_lat_end=70
#-------------- Physics -------------
#---------------- Run ---------------
# run_length=86400
run_length=777600
run_length=86400
# run_length=777600
write_period=3600
etat0=dcmip2016_baroclinic_wave
#------------ Diagnostics -----------
# module load python/3.6-anaconda50
# pressure is computed from surface pressure and hybrid coefficients :
# p = A+B*ps A, B = hyam, hybm
# DYNAMICO produces a NetCDF file apbp.nc where
# where the first column is hyai = A, hybi = B
# and expects a text file apbp.txt where each line is hyai, hybi
import netCDF4 as cdf
def getvars(nc, *names):
return [ nc.variables[name] for name in names ]
with cdf.Dataset('apbp.nc', 'r') as data:
A, B, p0 = getvars(data, 'hyai', 'hybi', 'P0')
A, B = A[:], B[:]
for i in range(len(A)):
print("%09.7f %09.7f"%(p0*A[i], B[i]))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment