diff --git a/A-INSTALL b/A-INSTALL index a6b9de3392ee69ec978d1806c2c5d33f5d6861eb..3491c67be289fe14f6b6a472a7735c66ff071288 100644 --- a/A-INSTALL +++ b/A-INSTALL @@ -642,7 +642,7 @@ id -ng echo $CCCHOME --> /ccc/.../home/genXXXX/{your_login} -# If all is OK , you could install the code in interactive as usally +# If all is OK, you can install the code interactively as usual # # - install the PACKAGE in your ${CCCHOME} ( default 20Go of quota ) # for example on Intel frontal @@ -1027,14 +1027,18 @@ git clone -b 2014.01 https://github.com/forefireAPI/firefront.git # # Run the 'configure' script preceded with the setting of the MNH_RTTOV variable: # -cd MNH.../src/ +cd $SRC_MESONH/src/ export MNH_RTTOV=1 export VER_RTTOV=13.2 # +# Compile the HDF5 library +# +make cdf +# # Download the RTTOV package rttov132.tar.xz by following the instructions given on https://nwpsaf.eu/site/software/rttov/ # # Install the RTTOV package rttov132.tar.xz -cd MNH.../src/LIB +cd $SRC_MESONH/src/LIB mkdir RTTOV-13.2 cd RTTOV-13.2 tar xJf rttov132.tar.xz @@ -1045,13 +1049,13 @@ HDF5_PREFIX = $(SRC_MESONH)/src/dir_obj${XYZ}/MASTER/NETCDF-${VERSION_CDFF} FFLAGS_HDF5 = -D_RTTOV_HDF $(FFLAG_MOD)$(HDF5_PREFIX)/include LDFLAGS_HDF5 = -L$(HDF5_PREFIX)/lib64 -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -lsz -laec -lz -ldl " -cd src +cd ../src ../build/Makefile.PL RTTOV_HDF=1 make ARCH=ifort # Use Intel "ifort" compiler; other options: gfortran, NAG, pgf90, IBM # # And then for the Meso-NH compilation, do # -cd MNH.../src/ +cd $SRC_MESONH/src/ make # c) MNH_ECRAD for optional compilation of new ECRAD radiative library from ECMWF diff --git a/MY_RUN/INTEGRATION_CASES/HPC/STERAO/DIAPROG/dir_sterao b/MY_RUN/INTEGRATION_CASES/HPC/STERAO/DIAPROG/dir_sterao deleted file mode 100644 index 6989933c02b538b90af8a40f3f506c2ec07b6bb2..0000000000000000000000000000000000000000 --- a/MY_RUN/INTEGRATION_CASES/HPC/STERAO/DIAPROG/dir_sterao +++ /dev/null @@ -1,47 +0,0 @@ -_file_'STERAO_dia' -LINDAX=T -lminmax=t -lcolarea=t -liso=f -niskip =4 -xvrl=0.1 -NIMNMX=1 -XDIAINT=1 -XISOMIN=0 -XISOMAX=25 -MUTVT_k_2 -NIMNMX=-1 -UTVT_k_2 -WT_k_10 -lcolzero=t -ncolzero=1 -INPRT -ACPRT -ldefcv2ind=T -NIDEBCV=34 -NJDEBCV=150 -NIFINCV=150 -NJFINCV=10 -ltracecv=t -WT_CV_ -ACPRT -ltracecv=f -RCT_CV_ -RIT_CV_ -RGT_CV_ -EFIELDU_CV_ -EFIELDV_CV_ -EFIELDW_CV_ -EMODULE_CV_ -NI_IAGGS_CV_ -NI_IDRYG_CV_ -NI_SDRYG_CV_ -INDUC_CG_CV_ -QNIONP_CV_ -QCELEC_CV_ -QRELEC_CV_ -QIELEC_CV_ -QSELEC_CV_ -QGELEC_CV_ -QNIONN_CV_ -quit diff --git a/MY_RUN/INTEGRATION_CASES/HPC/STERAO/DIAPROG/trace_sterao b/MY_RUN/INTEGRATION_CASES/HPC/STERAO/DIAPROG/trace_sterao deleted file mode 100755 index 822ee50ccb75e69e28c8a4177158dc13ede396ab..0000000000000000000000000000000000000000 --- a/MY_RUN/INTEGRATION_CASES/HPC/STERAO/DIAPROG/trace_sterao +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh -#SBATCH -J tools -#SBATCH -N 1 # nodes number -#SBATCH -n 1 # CPUs number (on all nodes) -#SBATCH -o tools.eo%j # -#SBATCH -e tools.eo%j # -#SBATCH -t 01:00:00 # time limit -# Echo des commandes -ulimit -c 0 -ulimit -s unlimited -# Arrete du job des la premiere erreur -set -e - - - -FILE1=STERA.1.CEN4T.007 -FILE2=STERA.1.CEN4T.013 -FILE3=STERA.1.CEN4T.019 -FILE1LFI=${FILE1}.lfi -FILE2LFI=${FILE2}.lfi -FILE3LFI=${FILE3}.lfi -FILEDIA=STERAO_dia -ln -sf ../RUN/LFI/$FILE1LFI . -ln -sf ../RUN/LFI/$FILE2LFI . -ln -sf ../RUN/LFI/$FILE3LFI . - - -cat >> dirconv2dia << EOF -3 -$FILE1 -$FILE2 -$FILE3 -$FILEDIA -n -n -0 -EOF -conv2dia < dirconv2dia -rm -f $FILE1LFI $FILE2LFI $FILE3LFI -rm -f dirconv2dia - -diaprog < dir_sterao -rm -f *.lfi *.des -rm -f dir.* dirconv FICJD LISTING_DIA OUT_DIA diff --git a/MY_RUN/INTEGRATION_CASES/HPC/STERAO/PYTHON/plot_STERAO.py b/MY_RUN/INTEGRATION_CASES/HPC/STERAO/PYTHON/plot_STERAO.py new file mode 100644 index 0000000000000000000000000000000000000000..322710c6d8f6c03739398a1fbe726e4e7c87b7f4 --- /dev/null +++ b/MY_RUN/INTEGRATION_CASES/HPC/STERAO/PYTHON/plot_STERAO.py @@ -0,0 +1,767 @@ +#!/usr/bin/env python3 +""" +@author: Quentin Rodier +Creation : 07/01/2021 + +Last modifications +""" +from read_MNHfile import read_netcdf +from Panel_Plot import PanelPlot +from misc_functions import oblique_proj +import numpy as np +import os + +os.system('rm -f tempgraph*') +# +# User's parameter / Namelist +# +# +path="../RUN/" + +LnameFiles = ['STERA.1.CEN4T.007.nc', 'STERA.1.CEN4T.013.nc', 'STERA.1.CEN4T.019.nc'] + +Dvar_input = {'f'+str(i):['UT', 'VT', 'WT', 'INPRT', 'ACPRT', 'RCT', 'RIT', 'RGT', + 'EFIELDU', 'EFIELDV', 'EFIELDW', 'EMODULE', 'NI_IAGGS', + 'NI_IDRYG', 'NI_SDRYG', 'INDUC_CG', 'QNIONP', 'QCELEC', + 'QRELEC', 'QIELEC', 'QSELEC', 'QGELEC','QNIONN', + 'ni', 'nj', 'ni_u', 'nj_u', 'level', 'level_w', 'time'] + for i in range(1,4)} + +# Read the variables in the files +Dvar = {} +Dvar = read_netcdf(LnameFiles, Dvar_input, path=path, removeHALO=True) + +################################################################ +######### PANEL 1 +############################################################### +Panel1 = PanelPlot(1,3, [75,20],'Magnitude of U and V components of Wind at K=2', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=25, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=50, bigtitlepad=0.97) + +for i in range(1,4): + Dvar['f'+str(i)]['UTVT'] = np.sqrt(Dvar['f'+str(i)]['UT']**2 + Dvar['f'+str(i)]['VT']**2) + +Lplot = [Dvar['f'+str(i)]['UTVT'] for i in range(1,4)] +LaxeX = [Dvar['f'+str(i)]['ni'] for i in range(1,4)] +LaxeY = [Dvar['f'+str(i)]['nj'] for i in range(1,4)] + +Ltitle = ['']*len(Lplot) +Lcbarlabel = ['m/s']*len(Lplot) +Lxlab = ['x (m)']*len(Lplot) +Lylab = ['y (m)']*len(Lplot) +Lminval = [0]*len(Lplot) +Lmaxval = [30]*len(Lplot) +Lstep = [1]*len(Lplot) +Lstepticks = [1]*len(Lplot) +Llvl = [0]*len(Lplot) +Ltime = [Dvar['f'+str(i)]['time'] for i in range(1,4)] +Lcolormap = ['gist_ncar']*len(Lplot) +fig1 = Panel1.psectionH(lon=LaxeX, lat=LaxeY, Llevel=Llvl, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lcolormap=Lcolormap) + +Panel1.save_graph(1,fig1) + +################################################################ +######### PANEL 2 +############################################################### +Panel2 = PanelPlot(1,3, [75,20],'U and V components of Wind at K=2', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=25, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=50, bigtitlepad=0.97) + +Lplot1 = [Dvar['f'+str(i)]['UT'] for i in range(1,4)] +Lplot2 = [Dvar['f'+str(i)]['VT'] for i in range(1,4)] +Ltitle = ['']*len(Lplot1) +Lxlab = ['x (m)']*len(Lplot) +Lylab = ['y (m)']*len(Lplot) +Llegendval = [10]*len(Lplot1) +Llegendlabel = ['km/h']*len(Lplot1) +Larrowstep = [6]*len(Lplot1) +Lwidth = [0.002]*len(Lplot1) +Lcolor = ['black']*len(Lplot1) +Llvl = [0]*len(Lplot1) +lon = [Dvar['f'+str(i)]['ni'] for i in range(1,4)] +lat = [Dvar['f'+str(i)]['nj'] for i in range(1,4)] +Lscale = [200]*len(Lplot1) +Lfacconv = [3.6]*len(Lplot1) +fig2 = Panel2.pvector(Lxx=lon, Lyy=lat, Lvar1=Lplot1, Lvar2=Lplot2, Llevel=Llvl, Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, + Lwidth=Lwidth, Larrowstep=Larrowstep, Lcolor=Lcolor, Llegendval=Llegendval, + Llegendlabel=Llegendlabel, Lscale=Lscale, Lfacconv=Lfacconv) + +Panel2.save_graph(2,fig2) + +################################################################ +######### PANEL 3 +############################################################### +Panel3 = PanelPlot(1,3, [75,20],'W component of Wind at K=10', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=25, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=50, bigtitlepad=0.97) + +Lplot = [Dvar['f'+str(i)]['WT'] for i in range(1,4)] +LaxeX = [Dvar['f'+str(i)]['ni'] for i in range(1,4)] +LaxeY = [Dvar['f'+str(i)]['nj'] for i in range(1,4)] + +Ltitle = ['']*len(Lplot) +Lcbarlabel = ['m/s']*len(Lplot) +Lxlab = ['x (m)']*len(Lplot) +Lylab = ['y (m)']*len(Lplot) +Lminval = [-7]*len(Lplot) +Lmaxval = [6]*len(Lplot) +Lstep = [0.5]*len(Lplot) +Lstepticks = [1]*len(Lplot) +Llvl = [8]*len(Lplot) +Ltime = [Dvar['f'+str(i)]['time'] for i in range(1,4)] +Lcolormap = ['gist_ncar']*len(Lplot) +fig3 = Panel3.psectionH(lon=LaxeX, lat=LaxeY, Llevel=Llvl, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lcolormap=Lcolormap) + +Panel3.save_graph(3,fig3) + +################################################################ +######### PANEL 4 +############################################################### +Panel4 = PanelPlot(1,3, [75,20],'INPRT', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=25, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=50, bigtitlepad=0.97) + +Lplot = [Dvar['f'+str(i)]['INPRT'] for i in range(1,4)] +LaxeX = [Dvar['f'+str(i)]['ni'] for i in range(1,4)] +LaxeY = [Dvar['f'+str(i)]['nj'] for i in range(1,4)] + +Ltitle = ['']*len(Lplot) +Lcbarlabel = ['mm/hour']*len(Lplot) +Lxlab = ['x (m)']*len(Lplot) +Lylab = ['y (m)']*len(Lplot) +Lminval = [0]*len(Lplot) +Lmaxval = [12.5]*len(Lplot) +Lstep = [0.15]*len(Lplot) +Lstepticks = [1]*len(Lplot) +Ltime = [Dvar['f'+str(i)]['time'] for i in range(1,4)] +Lcolormap = ['gist_ncar']*len(Lplot) +LaddWhite_cm = [True]*len(Lplot) +fig4 = Panel4.psectionH(lon=LaxeX, lat=LaxeY, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lcolormap=Lcolormap, LaddWhite_cm=LaddWhite_cm) + +Panel4.save_graph(4,fig4) + +################################################################ +######### PANEL 5 +############################################################### +Panel5 = PanelPlot(1,3, [75,20],'ACPRT', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=25, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=50, bigtitlepad=0.97) + +i_beg, j_beg = (32,148) +i_end, j_end = (148,8) + +Lplot = [Dvar['f'+str(i)]['ACPRT'] for i in range(1,4)] +LaxeX = [Dvar['f'+str(i)]['ni'] for i in range(1,4)] +LaxeY = [Dvar['f'+str(i)]['nj'] for i in range(1,4)] + +Ltitle = ['']*len(Lplot) +Lcbarlabel = ['mm']*len(Lplot) +Lxlab = ['x (m)']*len(Lplot) +Lylab = ['y (m)']*len(Lplot) +Lminval = [0]*len(Lplot) +Lmaxval = [4]*len(Lplot) +Lstep = [0.05]*len(Lplot) +Lstepticks = [0.5]*len(Lplot) +Ltime = [Dvar['f'+str(i)]['time'] for i in range(1,4)] +Lcolormap = ['gist_ncar']*len(Lplot) +LaddWhite_cm = [True]*len(Lplot) +fig5 = Panel5.psectionH(lon=LaxeX, lat=LaxeY, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lcolormap=Lcolormap, LaddWhite_cm=LaddWhite_cm) + +for i in range(1,4): + Panel5.addLine(fig5.axes[(i-1)*2], [Dvar['f'+str(i)]['ni'][i_beg], Dvar['f'+str(i)]['nj'][j_beg]], [Dvar['f'+str(i)]['ni'][i_end], Dvar['f'+str(i)]['nj'][j_end]], 'black', 10) + +Panel5.save_graph(5,fig5) + +################################################################ +######### PANEL 6 +############################################################### +Panel6 = PanelPlot(1,3, [75,20],'WT', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=25, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=50, bigtitlepad=0.97) + +i_beg, j_beg = (32,148) +i_end, j_end = (148,8) + +angle_sec, var_sec1, axe_m = oblique_proj(Dvar['f1']['WT'], Dvar['f1']['ni'], Dvar['f1']['nj'], Dvar['f1']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec2, axe_m = oblique_proj(Dvar['f2']['WT'], Dvar['f2']['ni'], Dvar['f2']['nj'], Dvar['f2']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec3, axe_m = oblique_proj(Dvar['f3']['WT'], Dvar['f3']['ni'], Dvar['f3']['nj'], Dvar['f3']['level_w'], i_beg, j_beg, i_end, j_end) + +Lplot = [var_sec1, var_sec2, var_sec3] +LaxeX = [axe_m]*len(Lplot) +LaxeZ = [Dvar['f'+str(i)]['level_w'] for i in range(1,4)] + +Ltitle = ['']*len(Lplot) +Lcbarlabel = ['m/s']*len(Lplot) +Lxlab = ['x (m)']*len(Lplot) +Lylab = ['Altitude (m)']*len(Lplot) +Lminval = [-8,-4,-2.5] +Lmaxval = [35,4,6] +Lstep = [1,0.5,0.5] +Lstepticks = [1]*len(Lplot) +Ltime = [Dvar['f'+str(i)]['time'] for i in range(1,4)] +Lcolormap = ['gist_ncar']*len(Lplot) +fig6 = Panel6.psectionV(Lxx=LaxeX, Lzz=LaxeZ, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lcolormap=Lcolormap) + +Panel6.save_graph(6,fig6) + +################################################################ +######### PANEL 7 +############################################################### +Panel7 = PanelPlot(1,3, [75,20],'RCT', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=25, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=50, bigtitlepad=0.97) + +i_beg, j_beg = (32,148) +i_end, j_end = (148,8) + +angle_sec, var_sec1, axe_m = oblique_proj(Dvar['f1']['RCT'], Dvar['f1']['ni'], Dvar['f1']['nj'], Dvar['f1']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec2, axe_m = oblique_proj(Dvar['f2']['RCT'], Dvar['f2']['ni'], Dvar['f2']['nj'], Dvar['f2']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec3, axe_m = oblique_proj(Dvar['f3']['RCT'], Dvar['f3']['ni'], Dvar['f3']['nj'], Dvar['f3']['level_w'], i_beg, j_beg, i_end, j_end) + +Lplot = [var_sec1, var_sec2, var_sec3] +LaxeX = [axe_m]*len(Lplot) +LaxeZ = [Dvar['f'+str(i)]['level'] for i in range(1,4)] + +Ltitle = ['']*len(Lplot) +Lcbarlabel = ['kg/kg']*len(Lplot) +Lxlab = ['x (m)']*len(Lplot) +Lylab = ['Altitude (m)']*len(Lplot) +Lminval = [0]*len(Lplot) +Lmaxval = [0.0026, 0.00085, 0.0014] +Lstep = [0.0001, 0.00002, 0.0001] +Lstepticks = [0.0002, 0.00005, 0.0002] +Ltime = [Dvar['f'+str(i)]['time'] for i in range(1,4)] +Lcolormap = ['gist_ncar']*len(Lplot) +LaddWhite_cm = [True]*len(Lplot) +fig7 = Panel7.psectionV(Lxx=LaxeX, Lzz=LaxeZ, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lcolormap=Lcolormap, LaddWhite_cm=LaddWhite_cm) + +Panel7.save_graph(7,fig7) + +################################################################ +######### PANEL 8 +############################################################### +Panel8 = PanelPlot(1,3, [75,20],'RIT', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=25, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=50, bigtitlepad=0.97) + +i_beg, j_beg = (32,148) +i_end, j_end = (148,8) + +angle_sec, var_sec1, axe_m = oblique_proj(Dvar['f1']['RIT'], Dvar['f1']['ni'], Dvar['f1']['nj'], Dvar['f1']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec2, axe_m = oblique_proj(Dvar['f2']['RIT'], Dvar['f2']['ni'], Dvar['f2']['nj'], Dvar['f2']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec3, axe_m = oblique_proj(Dvar['f3']['RIT'], Dvar['f3']['ni'], Dvar['f3']['nj'], Dvar['f3']['level_w'], i_beg, j_beg, i_end, j_end) + +Lplot = [var_sec1, var_sec2, var_sec3] +LaxeX = [axe_m]*len(Lplot) +LaxeZ = [Dvar['f'+str(i)]['level'] for i in range(1,4)] + +Ltitle = ['']*len(Lplot) +Lcbarlabel = ['kg/kg']*len(Lplot) +Lxlab = ['x (m)']*len(Lplot) +Lylab = ['Altitude (m)']*len(Lplot) +Lminval = [0]*len(Lplot) +Lmaxval = [0.002, 0.0006, 0.00014] +Lstep = [0.0001, 0.00001, 0.000005] +Lstepticks = [0.0002, 0.00006, 0.00001] +Ltime = [Dvar['f'+str(i)]['time'] for i in range(1,4)] +Lcolormap = ['gist_ncar']*len(Lplot) +LaddWhite_cm = [True]*len(Lplot) +fig8 = Panel8.psectionV(Lxx=LaxeX, Lzz=LaxeZ, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lcolormap=Lcolormap, LaddWhite_cm=LaddWhite_cm) + +Panel8.save_graph(8,fig8) + +################################################################ +######### PANEL 9 +############################################################### +Panel9 = PanelPlot(1,3, [75,20],'RGT', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=25, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=50, bigtitlepad=0.97) + +i_beg, j_beg = (32,148) +i_end, j_end = (148,8) + +angle_sec, var_sec1, axe_m = oblique_proj(Dvar['f1']['RGT'], Dvar['f1']['ni'], Dvar['f1']['nj'], Dvar['f1']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec2, axe_m = oblique_proj(Dvar['f2']['RGT'], Dvar['f2']['ni'], Dvar['f2']['nj'], Dvar['f2']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec3, axe_m = oblique_proj(Dvar['f3']['RGT'], Dvar['f3']['ni'], Dvar['f3']['nj'], Dvar['f3']['level_w'], i_beg, j_beg, i_end, j_end) + +Lplot = [var_sec1, var_sec2, var_sec3] +LaxeX = [axe_m]*len(Lplot) +LaxeZ = [Dvar['f'+str(i)]['level'] for i in range(1,4)] + +Ltitle = ['']*len(Lplot) +Lcbarlabel = ['kg/kg']*len(Lplot) +Lxlab = ['x (m)']*len(Lplot) +Lylab = ['Altitude (m)']*len(Lplot) +Lminval = [0]*len(Lplot) +Lmaxval = [0.006, 0.002, 0.00006] +Lstep = [0.0001, 0.0001, 0.000001] +Lstepticks = [0.0006, 0.0002, 0.000006] +Ltime = [Dvar['f'+str(i)]['time'] for i in range(1,4)] +Lcolormap = ['gist_ncar']*len(Lplot) +LaddWhite_cm = [True]*len(Lplot) +fig9 = Panel9.psectionV(Lxx=LaxeX, Lzz=LaxeZ, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lcolormap=Lcolormap, LaddWhite_cm=LaddWhite_cm) + +Panel9.save_graph(9,fig9) + +################################################################ +######### PANEL 10 +############################################################### +Panel10 = PanelPlot(1,3, [75,20],'EFIELDU', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=25, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=50, bigtitlepad=0.97) + +i_beg, j_beg = (32,148) +i_end, j_end = (148,8) + +angle_sec, var_sec1, axe_m = oblique_proj(Dvar['f1']['EFIELDU'], Dvar['f1']['ni'], Dvar['f1']['nj'], Dvar['f1']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec2, axe_m = oblique_proj(Dvar['f2']['EFIELDU'], Dvar['f2']['ni'], Dvar['f2']['nj'], Dvar['f2']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec3, axe_m = oblique_proj(Dvar['f3']['EFIELDU'], Dvar['f3']['ni'], Dvar['f3']['nj'], Dvar['f3']['level_w'], i_beg, j_beg, i_end, j_end) + +Lplot = [var_sec1, var_sec2, var_sec3] +LaxeX = [axe_m]*len(Lplot) +LaxeZ = [Dvar['f'+str(i)]['level'] for i in range(1,4)] + +Ltitle = ['']*len(Lplot) +Lcbarlabel = ['V/m']*len(Lplot) +Lxlab = ['x (m)']*len(Lplot) +Lylab = ['Altitude (m)']*len(Lplot) +Lminval = [-8000,-2400,-900] +Lmaxval = [6000, 800, 300] +Lstep = [50, 20, 10] +Lstepticks = [500, 200, 100] +Ltime = [Dvar['f'+str(i)]['time'] for i in range(1,4)] +Lcolormap = ['gist_ncar']*len(Lplot) +fig10 = Panel10.psectionV(Lxx=LaxeX, Lzz=LaxeZ, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lcolormap=Lcolormap) + +Panel10.save_graph(10,fig10) + +################################################################ +######### PANEL 10 +############################################################### +Panel11 = PanelPlot(1,3, [75,20],'EFIELDV', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=25, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=50, bigtitlepad=0.97) + +i_beg, j_beg = (32,148) +i_end, j_end = (148,8) + +angle_sec, var_sec1, axe_m = oblique_proj(Dvar['f1']['EFIELDV'], Dvar['f1']['ni'], Dvar['f1']['nj'], Dvar['f1']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec2, axe_m = oblique_proj(Dvar['f2']['EFIELDV'], Dvar['f2']['ni'], Dvar['f2']['nj'], Dvar['f2']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec3, axe_m = oblique_proj(Dvar['f3']['EFIELDV'], Dvar['f3']['ni'], Dvar['f3']['nj'], Dvar['f3']['level_w'], i_beg, j_beg, i_end, j_end) + +Lplot = [var_sec1, var_sec2, var_sec3] +LaxeX = [axe_m]*len(Lplot) +LaxeZ = [Dvar['f'+str(i)]['level'] for i in range(1,4)] + +Ltitle = ['']*len(Lplot) +Lcbarlabel = ['V/m']*len(Lplot) +Lxlab = ['x (m)']*len(Lplot) +Lylab = ['Altitude (m)']*len(Lplot) +Lminval = [-9500,-2000,-900] +Lmaxval = [11000, 900, 180] +Lstep = [100, 20, 5] +Lstepticks = [1000, 200, 50] +Ltime = [Dvar['f'+str(i)]['time'] for i in range(1,4)] +Lcolormap = ['gist_ncar']*len(Lplot) +fig11 = Panel11.psectionV(Lxx=LaxeX, Lzz=LaxeZ, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lcolormap=Lcolormap) + +Panel11.save_graph(11,fig11) + +################################################################ +######### PANEL 10 +############################################################### +Panel12 = PanelPlot(1,3, [75,20],'EFIELDW', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=25, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=50, bigtitlepad=0.97) + +i_beg, j_beg = (32,148) +i_end, j_end = (148,8) + +angle_sec, var_sec1, axe_m = oblique_proj(Dvar['f1']['EFIELDW'], Dvar['f1']['ni'], Dvar['f1']['nj'], Dvar['f1']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec2, axe_m = oblique_proj(Dvar['f2']['EFIELDW'], Dvar['f2']['ni'], Dvar['f2']['nj'], Dvar['f2']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec3, axe_m = oblique_proj(Dvar['f3']['EFIELDW'], Dvar['f3']['ni'], Dvar['f3']['nj'], Dvar['f3']['level_w'], i_beg, j_beg, i_end, j_end) + +Lplot = [var_sec1, var_sec2, var_sec3] +LaxeX = [axe_m]*len(Lplot) +LaxeZ = [Dvar['f'+str(i)]['level'] for i in range(1,4)] + +Ltitle = ['']*len(Lplot) +Lcbarlabel = ['V/m']*len(Lplot) +Lxlab = ['x (m)']*len(Lplot) +Lylab = ['Altitude (m)']*len(Lplot) +Lminval = [-11000,-1000,-400] +Lmaxval = [16500, 2800, 800] +Lstep = [150, 20, 10] +Lstepticks = [1500, 200, 100] +Ltime = [Dvar['f'+str(i)]['time'] for i in range(1,4)] +Lcolormap = ['gist_ncar']*len(Lplot) +fig12 = Panel12.psectionV(Lxx=LaxeX, Lzz=LaxeZ, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lcolormap=Lcolormap) + +Panel12.save_graph(12,fig12) + +################################################################ +######### PANEL 13 +############################################################### +Panel13 = PanelPlot(1,3, [75,20],'EMODULE', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=25, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=50, bigtitlepad=0.97) + +i_beg, j_beg = (32,148) +i_end, j_end = (148,8) + +angle_sec, var_sec1, axe_m = oblique_proj(Dvar['f1']['EMODULE'], Dvar['f1']['ni'], Dvar['f1']['nj'], Dvar['f1']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec2, axe_m = oblique_proj(Dvar['f2']['EMODULE'], Dvar['f2']['ni'], Dvar['f2']['nj'], Dvar['f2']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec3, axe_m = oblique_proj(Dvar['f3']['EMODULE'], Dvar['f3']['ni'], Dvar['f3']['nj'], Dvar['f3']['level_w'], i_beg, j_beg, i_end, j_end) + +Lplot = [var_sec1, var_sec2, var_sec3] +LaxeX = [axe_m]*len(Lplot) +LaxeZ = [Dvar['f'+str(i)]['level'] for i in range(1,4)] + +Ltitle = ['']*len(Lplot) +Lcbarlabel = ['V/m']*len(Lplot) +Lxlab = ['x (m)']*len(Lplot) +Lylab = ['Altitude (m)']*len(Lplot) +Lminval = [0]*len(Lplot) +Lmaxval = [16500, 3000, 1200] +Lstep = [500, 100, 50] +Lstepticks = [1000, 200, 100] +Ltime = [Dvar['f'+str(i)]['time'] for i in range(1,4)] +Lcolormap = ['gist_ncar']*len(Lplot) +LaddWhite_cm = [True]*len(Lplot) +fig13 = Panel13.psectionV(Lxx=LaxeX, Lzz=LaxeZ, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lcolormap=Lcolormap, LaddWhite_cm=LaddWhite_cm) + +Panel13.save_graph(13,fig13) + +################################################################ +######### PANEL 14 +############################################################### +Panel14 = PanelPlot(1,3, [75,20],'NI IAGGS', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=25, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=50, bigtitlepad=0.97) + +i_beg, j_beg = (32,148) +i_end, j_end = (148,8) + +angle_sec, var_sec1, axe_m = oblique_proj(Dvar['f1']['NI_IAGGS'], Dvar['f1']['ni'], Dvar['f1']['nj'], Dvar['f1']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec2, axe_m = oblique_proj(Dvar['f2']['NI_IAGGS'], Dvar['f2']['ni'], Dvar['f2']['nj'], Dvar['f2']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec3, axe_m = oblique_proj(Dvar['f3']['NI_IAGGS'], Dvar['f3']['ni'], Dvar['f3']['nj'], Dvar['f3']['level_w'], i_beg, j_beg, i_end, j_end) + +Lplot = [var_sec1, var_sec2, var_sec3] +LaxeX = [axe_m]*len(Lplot) +LaxeZ = [Dvar['f'+str(i)]['level'] for i in range(1,4)] + +Ltitle = ['']*len(Lplot) +Lcbarlabel = ['pC m-3 s-1']*len(Lplot) +Lxlab = ['x (m)']*len(Lplot) +Lylab = ['Altitude (m)']*len(Lplot) +Lminval = [0]*len(Lplot) +Lmaxval = [1.8, 0.012, 1] +Lstep = [0.1, 0.0005, 0.5] +Lstepticks = [0.2, 0.001, 0.5] +Ltime = [Dvar['f'+str(i)]['time'] for i in range(1,4)] +Lcolormap = ['gist_ncar']*len(Lplot) +LaddWhite_cm = [True]*len(Lplot) +fig14 = Panel14.psectionV(Lxx=LaxeX, Lzz=LaxeZ, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lcolormap=Lcolormap, LaddWhite_cm=LaddWhite_cm) + +Panel14.save_graph(14,fig14) + +################################################################ +######### PANEL 15 +############################################################### +Panel15 = PanelPlot(1,3, [75,20],'NI IDRYG', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=25, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=50, bigtitlepad=0.97) + +i_beg, j_beg = (32,148) +i_end, j_end = (148,8) + +angle_sec, var_sec1, axe_m = oblique_proj(Dvar['f1']['NI_IDRYG'], Dvar['f1']['ni'], Dvar['f1']['nj'], Dvar['f1']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec2, axe_m = oblique_proj(Dvar['f2']['NI_IDRYG'], Dvar['f2']['ni'], Dvar['f2']['nj'], Dvar['f2']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec3, axe_m = oblique_proj(Dvar['f3']['NI_IDRYG'], Dvar['f3']['ni'], Dvar['f3']['nj'], Dvar['f3']['level_w'], i_beg, j_beg, i_end, j_end) + +Lplot = [var_sec1, var_sec2, var_sec3] +LaxeX = [axe_m]*len(Lplot) +LaxeZ = [Dvar['f'+str(i)]['level'] for i in range(1,4)] + +Ltitle = ['']*len(Lplot) +Lcbarlabel = ['pC m-3 s-1']*len(Lplot) +Lxlab = ['x (m)']*len(Lplot) +Lylab = ['Altitude (m)']*len(Lplot) +Lminval = [0]*len(Lplot) +Lmaxval = [9, 0.08, 1] +Lstep = [0.2, 0.005, 0.5] +Lstepticks = [1, 0.01, 0.5] +Ltime = [Dvar['f'+str(i)]['time'] for i in range(1,4)] +Lcolormap = ['gist_ncar']*len(Lplot) +LaddWhite_cm = [True]*len(Lplot) +fig15 = Panel15.psectionV(Lxx=LaxeX, Lzz=LaxeZ, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lcolormap=Lcolormap, LaddWhite_cm=LaddWhite_cm) + +Panel15.save_graph(15,fig15) + +################################################################ +######### PANEL 16 +############################################################### +Panel16 = PanelPlot(1,3, [75,20],'NI SDRYG', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=25, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=50, bigtitlepad=0.97) + +i_beg, j_beg = (32,148) +i_end, j_end = (148,8) + +angle_sec, var_sec1, axe_m = oblique_proj(Dvar['f1']['NI_SDRYG'], Dvar['f1']['ni'], Dvar['f1']['nj'], Dvar['f1']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec2, axe_m = oblique_proj(Dvar['f2']['NI_SDRYG'], Dvar['f2']['ni'], Dvar['f2']['nj'], Dvar['f2']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec3, axe_m = oblique_proj(Dvar['f3']['NI_SDRYG'], Dvar['f3']['ni'], Dvar['f3']['nj'], Dvar['f3']['level_w'], i_beg, j_beg, i_end, j_end) + +Lplot = [var_sec1, var_sec2, var_sec3] +LaxeX = [axe_m]*len(Lplot) +LaxeZ = [Dvar['f'+str(i)]['level'] for i in range(1,4)] + +Ltitle = ['']*len(Lplot) +Lcbarlabel = ['pC m-3 s-1']*len(Lplot) +Lxlab = ['x (m)']*len(Lplot) +Lylab = ['Altitude (m)']*len(Lplot) +Lminval = [0]*len(Lplot) +Lmaxval = [90, 4, 1] +Lstep = [2.5, 0.1, 0.5] +Lstepticks = [5, 0.5, 0.5] +Ltime = [Dvar['f'+str(i)]['time'] for i in range(1,4)] +Lcolormap = ['gist_ncar']*len(Lplot) +LaddWhite_cm = [True]*len(Lplot) +fig16 = Panel16.psectionV(Lxx=LaxeX, Lzz=LaxeZ, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lcolormap=Lcolormap, LaddWhite_cm=LaddWhite_cm) + +Panel16.save_graph(16,fig16) + +################################################################ +######### PANEL 17 +############################################################### +Panel17 = PanelPlot(1,3, [75,20],'INDUC CG', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=25, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=50, bigtitlepad=0.97) + +i_beg, j_beg = (32,148) +i_end, j_end = (148,8) + +angle_sec, var_sec1, axe_m = oblique_proj(Dvar['f1']['INDUC_CG'], Dvar['f1']['ni'], Dvar['f1']['nj'], Dvar['f1']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec2, axe_m = oblique_proj(Dvar['f2']['INDUC_CG'], Dvar['f2']['ni'], Dvar['f2']['nj'], Dvar['f2']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec3, axe_m = oblique_proj(Dvar['f3']['INDUC_CG'], Dvar['f3']['ni'], Dvar['f3']['nj'], Dvar['f3']['level_w'], i_beg, j_beg, i_end, j_end) + +Lplot = [var_sec1, var_sec2, var_sec3] +LaxeX = [axe_m]*len(Lplot) +LaxeZ = [Dvar['f'+str(i)]['level'] for i in range(1,4)] + +Ltitle = ['']*len(Lplot) +Lcbarlabel = ['pC m-3 s-1']*len(Lplot) +Lxlab = ['x (m)']*len(Lplot) +Lylab = ['Altitude (m)']*len(Lplot) +Lminval = [0]*len(Lplot) +Lmaxval = [1, 1, 1] +Lstep = [0.5, 0.5, 0.5] +Lstepticks = [0.5, 0.5, 0.5] +Ltime = [Dvar['f'+str(i)]['time'] for i in range(1,4)] +Lcolormap = ['gist_ncar']*len(Lplot) +LaddWhite_cm = [True]*len(Lplot) +fig17 = Panel17.psectionV(Lxx=LaxeX, Lzz=LaxeZ, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lcolormap=Lcolormap, LaddWhite_cm=LaddWhite_cm) + +Panel17.save_graph(17,fig17) + +################################################################ +######### PANEL 18 +############################################################### +Panel18 = PanelPlot(1,3, [75,20],'QNIONP', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=25, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=50, bigtitlepad=0.97) + +i_beg, j_beg = (32,148) +i_end, j_end = (148,8) + +angle_sec, var_sec1, axe_m = oblique_proj(Dvar['f1']['QNIONP'], Dvar['f1']['ni'], Dvar['f1']['nj'], Dvar['f1']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec2, axe_m = oblique_proj(Dvar['f2']['QNIONP'], Dvar['f2']['ni'], Dvar['f2']['nj'], Dvar['f2']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec3, axe_m = oblique_proj(Dvar['f3']['QNIONP'], Dvar['f3']['ni'], Dvar['f3']['nj'], Dvar['f3']['level_w'], i_beg, j_beg, i_end, j_end) + +Lplot = [var_sec1, var_sec2, var_sec3] +LaxeX = [axe_m]*len(Lplot) +LaxeZ = [Dvar['f'+str(i)]['level'] for i in range(1,4)] + +Ltitle = ['']*len(Lplot) +Lcbarlabel = ['kg-1']*len(Lplot) +Lxlab = ['x (m)']*len(Lplot) +Lylab = ['Altitude (m)']*len(Lplot) +Lminval = [1e9]*len(Lplot) +Lmaxval = [3e10]*len(Lplot) +Lstep = [1e8]*len(Lplot) +Lstepticks = [1e9]*len(Lplot) +Ltime = [Dvar['f'+str(i)]['time'] for i in range(1,4)] +Lcolormap = ['gist_ncar']*len(Lplot) +LaddWhite_cm = [True]*len(Lplot) +fig18 = Panel18.psectionV(Lxx=LaxeX, Lzz=LaxeZ, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lcolormap=Lcolormap, LaddWhite_cm=LaddWhite_cm) + +Panel18.save_graph(18,fig18) + +################################################################ +######### PANEL 19 +############################################################### +Panel19 = PanelPlot(1,3, [75,20],'QCELEC', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=25, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=50, bigtitlepad=0.97) + +i_beg, j_beg = (32,148) +i_end, j_end = (148,8) + +angle_sec, var_sec1, axe_m = oblique_proj(Dvar['f1']['QCELEC'], Dvar['f1']['ni'], Dvar['f1']['nj'], Dvar['f1']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec2, axe_m = oblique_proj(Dvar['f2']['QCELEC'], Dvar['f2']['ni'], Dvar['f2']['nj'], Dvar['f2']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec3, axe_m = oblique_proj(Dvar['f3']['QCELEC'], Dvar['f3']['ni'], Dvar['f3']['nj'], Dvar['f3']['level_w'], i_beg, j_beg, i_end, j_end) + +Lplot = [var_sec1, var_sec2, var_sec3] +LaxeX = [axe_m]*len(Lplot) +LaxeZ = [Dvar['f'+str(i)]['level'] for i in range(1,4)] + +Ltitle = ['']*len(Lplot) +Lcbarlabel = ['C/kg']*len(Lplot) +Lxlab = ['x (m)']*len(Lplot) +Lylab = ['Altitude (m)']*len(Lplot) +Lminval = [-1.2e-10,-2.5e-11,-1.1e-11] +Lmaxval = [1.4e-10,1.4e-11,5e-13] +Lstep = [1e-11, 1e-12, 5e-14] +Lstepticks = [1e-10, 1e-11, 5e-13] +Ltime = [Dvar['f'+str(i)]['time'] for i in range(1,4)] +Lcolormap = ['gist_ncar']*len(Lplot) +fig19 = Panel19.psectionV(Lxx=LaxeX, Lzz=LaxeZ, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lcolormap=Lcolormap) + +Panel19.save_graph(19,fig19) + +################################################################ +######### PANEL 20 +############################################################### +Panel20 = PanelPlot(1,3, [75,20],'QRELEC', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=25, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=50, bigtitlepad=0.97) + +i_beg, j_beg = (32,148) +i_end, j_end = (148,8) + +angle_sec, var_sec1, axe_m = oblique_proj(Dvar['f1']['QRELEC'], Dvar['f1']['ni'], Dvar['f1']['nj'], Dvar['f1']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec2, axe_m = oblique_proj(Dvar['f2']['QRELEC'], Dvar['f2']['ni'], Dvar['f2']['nj'], Dvar['f2']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec3, axe_m = oblique_proj(Dvar['f3']['QRELEC'], Dvar['f3']['ni'], Dvar['f3']['nj'], Dvar['f3']['level_w'], i_beg, j_beg, i_end, j_end) + +Lplot = [var_sec1, var_sec2, var_sec3] +LaxeX = [axe_m]*len(Lplot) +LaxeZ = [Dvar['f'+str(i)]['level'] for i in range(1,4)] + +Ltitle = ['']*len(Lplot) +Lcbarlabel = ['C/kg']*len(Lplot) +Lxlab = ['x (m)']*len(Lplot) +Lylab = ['Altitude (m)']*len(Lplot) +Lminval = [-7.3e-11,-1.7e-13,-1.4e-13] +Lmaxval = [7.3e-11,7.6e-13,7.9e-13] +Lstep = [1e-12, 1e-14, 1e-14] +Lstepticks = [1e-11, 1e-13, 1e-13] +Ltime = [Dvar['f'+str(i)]['time'] for i in range(1,4)] +Lcolormap = ['gist_ncar']*len(Lplot) +fig20 = Panel20.psectionV(Lxx=LaxeX, Lzz=LaxeZ, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lcolormap=Lcolormap) + +Panel20.save_graph(20,fig20) + +################################################################ +######### PANEL 21 +############################################################### +Panel21 = PanelPlot(1,3, [75,20],'QIELEC', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=25, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=50, bigtitlepad=0.97) + +i_beg, j_beg = (32,148) +i_end, j_end = (148,8) + +angle_sec, var_sec1, axe_m = oblique_proj(Dvar['f1']['QIELEC'], Dvar['f1']['ni'], Dvar['f1']['nj'], Dvar['f1']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec2, axe_m = oblique_proj(Dvar['f2']['QIELEC'], Dvar['f2']['ni'], Dvar['f2']['nj'], Dvar['f2']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec3, axe_m = oblique_proj(Dvar['f3']['QIELEC'], Dvar['f3']['ni'], Dvar['f3']['nj'], Dvar['f3']['level_w'], i_beg, j_beg, i_end, j_end) + +Lplot = [var_sec1, var_sec2, var_sec3] +LaxeX = [axe_m]*len(Lplot) +LaxeZ = [Dvar['f'+str(i)]['level'] for i in range(1,4)] + +Ltitle = ['']*len(Lplot) +Lcbarlabel = ['C/kg']*len(Lplot) +Lxlab = ['x (m)']*len(Lplot) +Lylab = ['Altitude (m)']*len(Lplot) +Lminval = [-1.5e-9,-1.9e-10,-6.4e-13] +Lmaxval = [2.2e-11,6.1e-13,9.9e-13] +Lstep = [1e-11, 1e-12, 1e-14] +Lstepticks = [1e-10, 1e-11, 1e-13] +Ltime = [Dvar['f'+str(i)]['time'] for i in range(1,4)] +Lcolormap = ['gist_ncar']*len(Lplot) +fig21 = Panel21.psectionV(Lxx=LaxeX, Lzz=LaxeZ, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lcolormap=Lcolormap) + +Panel21.save_graph(21,fig21) + +################################################################ +######### PANEL 22 +############################################################### +Panel22 = PanelPlot(1,3, [75,20],'QSELEC', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=25, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=50, bigtitlepad=0.97) + +i_beg, j_beg = (32,148) +i_end, j_end = (148,8) + +angle_sec, var_sec1, axe_m = oblique_proj(Dvar['f1']['QSELEC'], Dvar['f1']['ni'], Dvar['f1']['nj'], Dvar['f1']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec2, axe_m = oblique_proj(Dvar['f2']['QSELEC'], Dvar['f2']['ni'], Dvar['f2']['nj'], Dvar['f2']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec3, axe_m = oblique_proj(Dvar['f3']['QSELEC'], Dvar['f3']['ni'], Dvar['f3']['nj'], Dvar['f3']['level_w'], i_beg, j_beg, i_end, j_end) + +Lplot = [var_sec1, var_sec2, var_sec3] +LaxeX = [axe_m]*len(Lplot) +LaxeZ = [Dvar['f'+str(i)]['level'] for i in range(1,4)] + +Ltitle = ['']*len(Lplot) +Lcbarlabel = ['C/kg']*len(Lplot) +Lxlab = ['x (m)']*len(Lplot) +Lylab = ['Altitude (m)']*len(Lplot) +Lminval = [-3e-9,-8.1e-10,-4.6e-11] +Lmaxval = [2.7e-10,2e-11,4.8e-12] +Lstep = [1e-11, 5e-12, 5e-13] +Lstepticks = [1e-10, 5e-11, 5e-12] +Ltime = [Dvar['f'+str(i)]['time'] for i in range(1,4)] +Lcolormap = ['gist_ncar']*len(Lplot) +fig22 = Panel22.psectionV(Lxx=LaxeX, Lzz=LaxeZ, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lcolormap=Lcolormap) + +Panel22.save_graph(22,fig22) + +################################################################ +######### PANEL 23 +############################################################### +Panel23 = PanelPlot(1,3, [75,20],'QGELEC', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=25, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=50, bigtitlepad=0.97) + +i_beg, j_beg = (32,148) +i_end, j_end = (148,8) + +angle_sec, var_sec1, axe_m = oblique_proj(Dvar['f1']['QGELEC'], Dvar['f1']['ni'], Dvar['f1']['nj'], Dvar['f1']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec2, axe_m = oblique_proj(Dvar['f2']['QGELEC'], Dvar['f2']['ni'], Dvar['f2']['nj'], Dvar['f2']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec3, axe_m = oblique_proj(Dvar['f3']['QGELEC'], Dvar['f3']['ni'], Dvar['f3']['nj'], Dvar['f3']['level_w'], i_beg, j_beg, i_end, j_end) + +Lplot = [var_sec1, var_sec2, var_sec3] +LaxeX = [axe_m]*len(Lplot) +LaxeZ = [Dvar['f'+str(i)]['level'] for i in range(1,4)] + +Ltitle = ['']*len(Lplot) +Lcbarlabel = ['C/kg']*len(Lplot) +Lxlab = ['x (m)']*len(Lplot) +Lylab = ['Altitude (m)']*len(Lplot) +Lminval = [-1.8e-11,-1.3e-14,0] +Lmaxval = [3.3e-9,8.2e-10,4.3e-11] +Lstep = [1e-10, 1e-11, 1e-12] +Lstepticks = [5e-10, 5e-11, 5e-12] +Ltime = [Dvar['f'+str(i)]['time'] for i in range(1,4)] +Lcolormap = ['gist_ncar']*len(Lplot) +LaddWhite_cm = [True]*len(Lplot) +fig23 = Panel23.psectionV(Lxx=LaxeX, Lzz=LaxeZ, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lcolormap=Lcolormap, LaddWhite_cm=LaddWhite_cm) + +Panel23.save_graph(23,fig23) + +################################################################ +######### PANEL 24 +############################################################### +Panel24 = PanelPlot(1,3, [75,20],'QNIONN', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=25, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=50, bigtitlepad=0.97) + +i_beg, j_beg = (32,148) +i_end, j_end = (148,8) + +angle_sec, var_sec1, axe_m = oblique_proj(Dvar['f1']['QNIONN'], Dvar['f1']['ni'], Dvar['f1']['nj'], Dvar['f1']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec2, axe_m = oblique_proj(Dvar['f2']['QNIONN'], Dvar['f2']['ni'], Dvar['f2']['nj'], Dvar['f2']['level_w'], i_beg, j_beg, i_end, j_end) +angle_sec, var_sec3, axe_m = oblique_proj(Dvar['f3']['QNIONN'], Dvar['f3']['ni'], Dvar['f3']['nj'], Dvar['f3']['level_w'], i_beg, j_beg, i_end, j_end) + +Lplot = [var_sec1, var_sec2, var_sec3] +LaxeX = [axe_m]*len(Lplot) +LaxeZ = [Dvar['f'+str(i)]['level'] for i in range(1,4)] + +Ltitle = ['']*len(Lplot) +Lcbarlabel = ['kg-1']*len(Lplot) +Lxlab = ['x (m)']*len(Lplot) +Lylab = ['Altitude (m)']*len(Lplot) +Lminval = [1e9]*len(Lplot) +Lmaxval = [3e10]*len(Lplot) +Lstep = [1e8]*len(Lplot) +Lstepticks = [1e9]*len(Lplot) +Ltime = [Dvar['f'+str(i)]['time'] for i in range(1,4)] +Lcolormap = ['gist_ncar']*len(Lplot) +LaddWhite_cm = [True]*len(Lplot) +fig24 = Panel24.psectionV(Lxx=LaxeX, Lzz=LaxeZ, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lcolormap=Lcolormap, LaddWhite_cm=LaddWhite_cm) + +Panel24.save_graph(24,fig24) diff --git a/MY_RUN/INTEGRATION_CASES/HPC/STERAO/PYTHON/run_python b/MY_RUN/INTEGRATION_CASES/HPC/STERAO/PYTHON/run_python new file mode 100644 index 0000000000000000000000000000000000000000..25efa0eb52e65b4ac76812c54e9a636f5c9f8e30 --- /dev/null +++ b/MY_RUN/INTEGRATION_CASES/HPC/STERAO/PYTHON/run_python @@ -0,0 +1,23 @@ +#!/bin/sh +#SBATCH -J tools +#SBATCH -N 1 # nodes number +#SBATCH -n 1 # CPUs number (on all nodes) +#SBATCH -o tools.eo%j # +#SBATCH -e tools.eo%j # +#SBATCH -t 01:00:00 # time limit +# Echo des commandes +ulimit -c 0 +ulimit -s unlimited +# Arrete du job des la premiere erreur +set -e + +. ~rodierq/DEV_57/MNH-PHYEX070-b95d84d7/conf/profile_mesonh-LXifort-R8I4-MNH-V5-6-2-ECRAD140-MPIAUTO-O2 + +ln -sf ${SRC_MESONH}/src/LIB/Python/* . + +module purge +module load python/3.7.6 + +python3 plot_STERAO.py +convert *.png STERAO.pdf +rm -f *.png diff --git a/MY_RUN/INTEGRATION_CASES/HPC/XYNTHIA_2.5km/PYTHON/plot_XYNTHIA.py b/MY_RUN/INTEGRATION_CASES/HPC/XYNTHIA_2.5km/PYTHON/plot_XYNTHIA.py index 7ce8cd71ea68f99da60bd085e9b83f78b78fb89b..569e3f2f42a63223e937f94d7417b3a700fc6656 100644 --- a/MY_RUN/INTEGRATION_CASES/HPC/XYNTHIA_2.5km/PYTHON/plot_XYNTHIA.py +++ b/MY_RUN/INTEGRATION_CASES/HPC/XYNTHIA_2.5km/PYTHON/plot_XYNTHIA.py @@ -26,7 +26,7 @@ path="../RUN/" LnameFiles = ['XYNTH.1.CEN4T.010.nc'] -Dvar_input = {'f1':['ZS', 'ZTOP', 'TKET', 'THT', 'LSUM', 'LSVM', 'LSWM', 'UT', 'VT', 'WT', 'ni', 'nj', 'ni_u', 'nj_u', 'level', 'level_w', 'latitude', 'longitude', 'time']} +Dvar_input = {'f1':['ZS', 'ZTOP', 'TKET', 'THT', 'LSUM', 'LSVM', 'LSWM', 'UT', 'VT', 'WT', 'ni', 'nj', 'ni_u', 'nj_u', 'level', 'level_w', 'latitude', 'longitude', 'time', 'FLALWD']} # Read the variables in the files Dvar = {} @@ -208,3 +208,27 @@ fig6 = Panel3.psectionV(Lxx=LaxeX, Lzz=LaxeZ, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lyl Lcbarlabel=Lcbarlabel, Lfacconv=Lfacconv, Ltime=Ltime, Lpltype=Lpltype, LaddWhite_cm=LaddWhite, orog=orog, ax=fig5.axes) Panel3.save_graph(3,fig6) + +################################################################ +######### PANEL 2 +############################################################### +Panel4 = PanelPlot(1,1, [25,25],'Horizontal section FLALWD, with NRAD_AGG=1', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=20, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=30) + +Lplot = [Dvar['f1']['FLALWD']] +lon = [Dvar['f1']['ni']] +lat = [Dvar['f1']['nj']] +Ltitle = [''] +Lcbarlabel = ['W/m2'] +Lxlab = ['x'] +Lylab = ['y'] +Lminval = [0] +Lmaxval = [400] +Lstep = [5] +Lstepticks = [50] +Lcolormap = ['gist_rainbow_r'] +Ltime = [Dvar['f1']['time']] +LaddWhite_cm = [True] +fig7 = Panel4.psectionH(lon=lon, lat=lat, Lvar=Lplot, Lcarte=[], Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcolormap=Lcolormap, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lproj=[], LaddWhite_cm = LaddWhite_cm) + +Panel4.save_graph(4,fig7) diff --git a/MY_RUN/INTEGRATION_CASES/HPC/XYNTHIA_2.5km/PYTHON/plot_XYNTHIA_AGG4.py b/MY_RUN/INTEGRATION_CASES/HPC/XYNTHIA_2.5km/PYTHON/plot_XYNTHIA_AGG4.py index 8af85f9f582c9bee8a8bbf26a185b9f3d29d401e..bc1adc033a9cf8661ef6a17da258e268fcb5a451 100644 --- a/MY_RUN/INTEGRATION_CASES/HPC/XYNTHIA_2.5km/PYTHON/plot_XYNTHIA_AGG4.py +++ b/MY_RUN/INTEGRATION_CASES/HPC/XYNTHIA_2.5km/PYTHON/plot_XYNTHIA_AGG4.py @@ -26,7 +26,7 @@ path="../RUN_AGG4/" LnameFiles = ['XYNTH.1.CEN4T.010.nc'] -Dvar_input = {'f1':['ZS', 'ZTOP', 'TKET', 'THT', 'LSUM', 'LSVM', 'LSWM', 'UT', 'VT', 'WT', 'ni', 'nj', 'ni_u', 'nj_u', 'level', 'level_w', 'latitude', 'longitude', 'time']} +Dvar_input = {'f1':['ZS', 'ZTOP', 'TKET', 'THT', 'LSUM', 'LSVM', 'LSWM', 'UT', 'VT', 'WT', 'ni', 'nj', 'ni_u', 'nj_u', 'level', 'level_w', 'latitude', 'longitude', 'time', 'FLALWD']} # Read the variables in the files Dvar = {} @@ -208,3 +208,26 @@ fig6 = Panel3.psectionV(Lxx=LaxeX, Lzz=LaxeZ, Lvar=Lplot, Lxlab=Lxlab, Lylab=Lyl Lcbarlabel=Lcbarlabel, Lfacconv=Lfacconv, Ltime=Ltime, Lpltype=Lpltype, LaddWhite_cm=LaddWhite, orog=orog, ax=fig5.axes) Panel3.save_graph(3,fig6) +################################################################ +######### PANEL 2 +############################################################### +Panel4 = PanelPlot(1,1, [25,25],'Horizontal section FLALWD, with NRAD_AGG=1', minmaxpad=1.05, titlepad=80, xlabelSize=25, ylabelSize=25, legendSize=25, timeSize=25, cbTicksLabelSize=25, cbTitleSize=20, xyTicksLabelSize=25, minmaxTextSize=25, titleSize=30, bigtitleSize=30) + +Lplot = [Dvar['f1']['FLALWD']] +lon = [Dvar['f1']['ni']] +lat = [Dvar['f1']['nj']] +Ltitle = [''] +Lcbarlabel = ['W/m2'] +Lxlab = ['x'] +Lylab = ['y'] +Lminval = [0] +Lmaxval = [400] +Lstep = [5] +Lstepticks = [50] +Lcolormap = ['gist_rainbow_r'] +Ltime = [Dvar['f1']['time']] +LaddWhite_cm = [True] +fig7 = Panel4.psectionH(lon=lon, lat=lat, Lvar=Lplot, Lcarte=[], Lxlab=Lxlab, Lylab=Lylab, Ltitle=Ltitle, Lminval=Lminval, Lmaxval=Lmaxval, + Lstep=Lstep, Lstepticks=Lstepticks, Lcolormap=Lcolormap, Lcbarlabel=Lcbarlabel, Ltime=Ltime, Lproj=[], LaddWhite_cm = LaddWhite_cm) + +Panel4.save_graph(4,fig7) diff --git a/MY_RUN/INTEGRATION_CASES/HPC/XYNTHIA_2.5km/PYTHON/run_python b/MY_RUN/INTEGRATION_CASES/HPC/XYNTHIA_2.5km/PYTHON/run_python old mode 100755 new mode 100644 index db3e405c50121b4235a1a56c01ec4b53bb16913b..3dc9a2385322f23230e84861ff89465df85909dc --- a/MY_RUN/INTEGRATION_CASES/HPC/XYNTHIA_2.5km/PYTHON/run_python +++ b/MY_RUN/INTEGRATION_CASES/HPC/XYNTHIA_2.5km/PYTHON/run_python @@ -22,5 +22,5 @@ ln -sf ~rodierq/SAVE/OUTILS/PYTHON/departements-20180101.* . python3 plot_XYNTHIA.py convert *.png XYNTHIA.pdf -#python3 plot_XYNTHIA_AGG4.py -#convert *.png XYNTHIA_AGG4.pdf +python3 plot_XYNTHIA_AGG4.py +convert *.png XYNTHIA_AGG4.pdf diff --git a/MY_RUN/INTEGRATION_CASES/LOCAL/BLOWSNOW_c1b1D/Makefile b/MY_RUN/INTEGRATION_CASES/LOCAL/BLOWSNOW_c1b1D/Makefile index 36ee75a1f48bb2b28de937f04bd34e9aa866896e..1e8bb44686374ba830262181a3d10d286e9ff651 100644 --- a/MY_RUN/INTEGRATION_CASES/LOCAL/BLOWSNOW_c1b1D/Makefile +++ b/MY_RUN/INTEGRATION_CASES/LOCAL/BLOWSNOW_c1b1D/Makefile @@ -2,13 +2,8 @@ all: cd 001_prep_ideal && run_prep_ideal_case_xyz cd 002_mesonh && run_mesonh_xyz cd 003_diag && run_diag_xyz - cd 004_convdia && run_conv2dia - cd 005_diaprog && run_diaprog - cd 006_plotresults && run_plotresults clean: cd 001_prep_ideal && clean_prep_ideal_case_xyz cd 002_mesonh && clean_mesonh_xyz cd 003_diag && clean_diag_xyz - cd 004_convdia && clean_conv2dia - cd 006_plotresults && clean_plotresults diff --git a/MY_RUN/INTEGRATION_CASES/LOCAL/DOUBLE_GRIDNESTING/Makefile b/MY_RUN/INTEGRATION_CASES/LOCAL/DOUBLE_GRIDNESTING/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..57ef4ed30b79ffa5d32d7ed8abeba9fb1bffa7b3 --- /dev/null +++ b/MY_RUN/INTEGRATION_CASES/LOCAL/DOUBLE_GRIDNESTING/Makefile @@ -0,0 +1,3 @@ +all: + cd SIMU1 && make + cd SIMU2 && make diff --git a/MY_RUN/INTEGRATION_CASES/LOCAL/DOUBLE_GRIDNESTING/SIMU1/004_prep_real_d1/run_prep_real_case b/MY_RUN/INTEGRATION_CASES/LOCAL/DOUBLE_GRIDNESTING/SIMU1/004_prep_real_d1/run_prep_real_case index 3d252fae35b2a61017e54c475ea29e7df052e9b9..bfd8197753ad58bd1b8b35f91adeeb7f85562bbb 100755 --- a/MY_RUN/INTEGRATION_CASES/LOCAL/DOUBLE_GRIDNESTING/SIMU1/004_prep_real_d1/run_prep_real_case +++ b/MY_RUN/INTEGRATION_CASES/LOCAL/DOUBLE_GRIDNESTING/SIMU1/004_prep_real_d1/run_prep_real_case @@ -1,7 +1,9 @@ #!/bin/sh ln -sf ../003_prep_nest_pgd/PGD1*neste* . - -cp -f PRE_REAL1.nam_INIFILE PRE_REAL1.nam +ln -sf /cnrm/phynh/data1/rodierq/GRIB_KTEST/ecmwf.OD.20030810.00 . +if [ ! -f ecmwf.OD.20030810.00 ]; then + wget -c -nd http://mesonh.aero.obs-mip.fr/mesonh/dir_doc/dir_namelist_examples/GRIB_KTEST/ecmwf.OD.20030810.00 +fi time ${MONORUN} PREP_REAL_CASE${XYZ} diff --git a/MY_RUN/INTEGRATION_CASES/LOCAL/EOLIENNE_FAST/Makefile b/MY_RUN/INTEGRATION_CASES/LOCAL/EOLIENNE_FAST/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..f8eee497f7a9fce63ecc46f1b00238506f9d0961 --- /dev/null +++ b/MY_RUN/INTEGRATION_CASES/LOCAL/EOLIENNE_FAST/Makefile @@ -0,0 +1,3 @@ +all: + cd ALM && make + cd ADNR && make diff --git a/MY_RUN/INTEGRATION_CASES/TOOLS/check_commit_mesonh.sh b/MY_RUN/INTEGRATION_CASES/TOOLS/check_commit_mesonh.sh new file mode 100755 index 0000000000000000000000000000000000000000..b24a311e703c15fed7de865ec658aa477476edf5 --- /dev/null +++ b/MY_RUN/INTEGRATION_CASES/TOOLS/check_commit_mesonh.sh @@ -0,0 +1,202 @@ +#!/bin/bash + +#set -x +set -e +set -o pipefail #abort if left command on a pipe fails + +#The folowing environment variables can be defined: +# REFDIR: directory in which the reference compilation directory can be found +# TARGZDIR: directory where tar.gz files are searched for +# MNHPACK: directory where tests are build + +availTests="001_2Drelief, 002_3Drelief, 003_KW78, 004_Reunion, 005_ARM, 007_16janvier, 009_ICARTT, 011_KW78CHEM, 012_dust, 014_LIMA, 2Drelief, 3Drelief, ARMCU_1D_CONDSAMP, BLOWSNOW_c1b1D, BOMEX, COLD_BUBBLE, DOUBLE_GRIDNESTING, EOLIENNE_FAST, FIRE_1D/KHKO, FIRE_1D/KHKO_MALA, FIRE_1D/LIMA_MALA, FIRE_1D/LIMA_ECRAD, FOG_1D/ICE3, FOG_1D/LIMA, HYDRO, IHOP_1D, LIMA_2D, Reunion, STATIONS_PROF_BALLON_AIRCR_4doms " +defaultTest="007_16janvier" +separator='_' #- be carrefull, gmkpack (at least on belenos) has multiple allergies (':', '.', '@') + #- seprator must be in sync with prep_code.sh separator + +PHYEXTOOLSDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +function usage { + echo "Usage: $0 [-h] [-c] [-r] [-C] [-s] [--expand] [-t test] [--remove] commit [reference]" + echo "commit commit hash (or a directory)" + echo "reference commit hash or a directory or nothing for ref" + echo "-s suppress compilation pack" + echo "-c performs compilation" + echo "-r runs the tests" + echo "-C checks the result against the reference" + echo "-t comma separated list of tests to execute" + echo " or ALL to execute all tests" + echo "--expand use mnh_expand (code will use do loops)" + echo "--repo-user user hosting the PHYEX repository on github," + echo " defaults to the env variable PHYEXREOuser (=$PHYEXREOuser)" + echo "--repo-protocol protocol (https or ssh) to reach the PHYEX repository on github," + echo " defaults to the env variable PHYEXREOprotocol (=$PHYEXREOprotocol)" + echo "--remove removes the pack" + echo "" + echo "If nothing is asked (compilation, running, check, removing) everything" + echo "except the removing is done" + echo + echo "If no test is aked for, the default one ($defaultTest) is executed" + echo + echo "With the special reference REF commit, a suitable reference is guessed" + echo + echo "The directory (for commit only, not ref) can take the form server:directory" + echo + echo "If using a directory (for commit or reference) it must contain at least one '/'" + echo "The commit can be a tag, written with syntagx tags/<TAG>" +} + +compilation=0 +run=0 +check=0 +commit="" +reference="" +tests="" +suppress=0 +useexpand=0 +remove=0 + +while [ -n "$1" ]; do + case "$1" in + '-h') usage;; + '-s') suppress=1;; + '-c') compilation=1;; + '-r') run=$(($run+1));; + '-C') check=1;; + '-t') tests="$2"; shift;; + '--expand') useexpand=1;; + '--repo-user') export PHYEXREPOuser=$2; shift;; + '--repo-protocol') export PHYEXREPOprotocol=$2; shift;; + '--remove') remove=1;; + #--) shift; break ;; + *) if [ -z "${commit-}" ]; then + commit=$1 + else + if [ -z "${reference-}" ]; then + reference=$1 + else + echo "Only two commit hash allowed on command line" + exit 1 + fi + fi;; + esac + shift +done + +[ "$reference" == 'REF' ] && reference="" #Compatibility with check_commit_arome.sh + +MNHPACK=$HOME/MNHTESTING/MesoNH +REFDIR=$HOME/REF +TARGZDIR=$HOME +if [ -z "${tests-}" ]; then + tests=$defaultTest +elif [ $tests == 'ALL' ]; then + tests=$availTests +fi + +if [ $compilation -eq 0 -a \ + $run -eq 0 -a \ + $check -eq 0 -a \ + $remove -eq 0 ]; then + compilation=1 + run=1 + check=1 +fi + +if [ -z "${commit-}" ]; then + echo "At least one commit hash must be provided on command line" + exit 2 +fi + +refversion=MNH-V5-7-0 + +tag=$(echo $commit | sed 's/\//'${separator}'/g' | sed 's/:/'${separator}'/g' | sed 's/\./'${separator}'/g') +name=${refversion}-$tag +[ $suppress -eq 1 -a -d $MNHPACK/$name ] && rm -rf $MNHPACK/$name + +path_user_beg=$MNHPACK/$name #pack directory containing the simulation +path_user_end= #to be appended to the 'run' simulation directory + +#Name and directory for the reference +reffromdir='' +if echo $reference | grep '/' > /dev/null; then + reffromdir=$reference + reftag=$(echo $reference | sed 's/\//'${separator}'/g' | sed 's/:/'${separator}'/g' | sed 's/\./'${separator}'/g') +else + reftag=$reference +fi +refname=${refversion}-$reftag +path_ref_end= +if [ "$reference" == "" ]; then + path_ref_beg=$REFDIR/${refversion} +else + path_ref_beg=$MNHPACK/${refversion}-$reftag +fi + +if [ $compilation -eq 1 ]; then + echo "### Compilation of commit $commit" + + if [ -d $MNHPACK/$name ]; then + echo "Pack already exists ($MNHPACK/$name), suppress it to be able to compile it again (or use the -s option to automatically suppress it)" + exit 5 + fi + + # Prepare the pack + cd $MNHPACK + cp -R ~/GIT/MNH-git_open_source-lfs . + mv MNH-git_open_source-lfs $name + cd $name + git checkout $commit + cd src + # Routine that changed names + + #Configure and compilation + command -v module && modulelist=$(module -t list 2>&1 | tail -n +2) #save loaded modules + ./configure + set +e #file ends with a test that can return false + . ../conf/profile_mesonh-* #This lines modifies the list of loaded modules + set -e + rm -f ../exe/* #Suppress old executables, if any + make -j 8 2>&1 | tee ../Output_compilation + make installmaster 2>&1 | tee -a ../Output_compilation + command -v module && module load $modulelist #restore loaded modules +fi + +if [ $run -ge 1 ]; then + echo "### Running of commit $commit" + + if [ ! -f $MNHPACK/$name/exe/MESONH* ]; then + echo "Pack does not exist ($MNHPACK/$name) or compilation has failed, please check" + exit 6 + fi + export POSTRUN=echo + for t in $(echo $tests | sed 's/,/ /g'); do + case=$(echo $t | cut -d / -f 1) + exedir=$(echo $t | cut -d / -f 2) + rep=$MNHPACK/$name/MY_RUN/KTEST/$case + repLOCAL=$MNHPACK/$name/MY_RUN/INTEGRATION_CASES/LOCAL/$case + repHPC=$MNHPACK/$name/MY_RUN/INTEGRATION_CASES/HPC/$case + if [ -d $rep ]; then + cd $rep + elif [ -d $repLOCAL ]; then + cd $repLOCAL + elif [ -d $repHPC ]; then + cd $repHPC + else + echo "The KTEST $case has not been found" + exit 7 + fi + set +e #file ends with a test that can return false + [ $compilation -eq 0 ] && . $MNHPACK/$name/conf/profile_mesonh-* + set -e + set +o pipefail #We want to go through all tests + yes | make | tee Output_run + set -o pipefail + done +fi + +if [ $remove -eq 1 ]; then + echo "### Remove model directory for commit $commit" + [ -d $MNHPACK/$name ] && rm -rf $MNHPACK/$name +fi + +exit $cmpstatus diff --git a/MY_RUN/INTEGRATION_CASES/TOOLS/local_version.json b/MY_RUN/INTEGRATION_CASES/TOOLS/local_version.json new file mode 100644 index 0000000000000000000000000000000000000000..6ac02c8b11a51c67c0e64377372600bbc7afbf5b --- /dev/null +++ b/MY_RUN/INTEGRATION_CASES/TOOLS/local_version.json @@ -0,0 +1,34 @@ +{ +"refversion":"MNH-V5-7-0", +"testing": { + "001_2Drelief":"cc1eb13", + "002_3Drelief":"cc1eb13", + "003_KW78":"cc1eb13", + "004_Reunion":"cc1eb13", + "005_ARM":"cc1eb13", + "007_16janvier":"cc1eb13", + "009_ICARTT":"cc1eb13", + "011_KW78CHEM":"cc1eb13", + "012_dust":"cc1eb13", + "014_LIMA":"cc1eb13", + "2Drelief":"cc1eb13", + "3Drelief":"cc1eb13", + "ARMCU_1D_CONDSAMP":"cc1eb13", + "BLOWSNOW_c1b1D":"cc1eb13", + "BOMEX":"cc1eb13", + "COLD_BUBBLE":"cc1eb13", + "DOUBLE_GRIDNESTING":"cc1eb13", + "EOLIENNE_FAST":"cc1eb13", + "FOG_1D/LIMA":"cc1eb13", + "FOG_1D/ICE3":"cc1eb13", + "FIRE_1D/KHKO":"cc1eb13", + "FIRE_1D/KHKO_MALA":"cc1eb13", + "FIRE_1D/LIMA_MALA":"cc1eb13", + "FIRE_1D/LIMA_ECRAD":"cc1eb13", + "HYDRO":"cc1eb13", + "LIMA_2D":"cc1eb13", + "IHOP_1D":"cc1eb13", + "Reunion":"cc1eb13", + "STATIONS_PROF_BALLON_AIRCR_4doms":"cc1eb13" + } +} diff --git a/MY_RUN/INTEGRATION_CASES/TOOLS/testing.sh b/MY_RUN/INTEGRATION_CASES/TOOLS/testing.sh new file mode 100755 index 0000000000000000000000000000000000000000..d4cbc99ec12c4d978f2a6886eb57a63f6b68767c --- /dev/null +++ b/MY_RUN/INTEGRATION_CASES/TOOLS/testing.sh @@ -0,0 +1,391 @@ +#!/bin/bash + +set -x +set -e +set -o pipefail #abort if left command on a pipe fails + +function usage { + echo "Usage: $0 [-h] [--repo-user] [--repo-protocol] [--repo-repo] [--no-update] [--no-compil]" + echo " [--no-exec] [--no-comp] [--no-remove] [--commit SHA] [--ref REF] [--force] [MAIL]" + echo "--repo-user user hosting the PHYEX repository on github," + echo " defaults to the env variable MESONHREPOuser (=$MESONHREPOuser)" + echo "--repo-protocol protocol (https or ssh) to reach the PHYEX repository on github," + echo " defaults to the env variable PHYEXREPOprotocol (=$PHYEXREPOprotocol)" + echo "--repo-repo repository name" + echo " defaults to the env variable MESONHREPOrepo (=$MESONHREPOrepo)" + echo "--no-update do not update the tools" + echo "--no-compil do not compil (only usefull after a first execution with --no-update)" + echo "--no-exec do not execute (only usefull after a first execution with --no-update)" + echo "--no-comp do not compare (only usefull after a first execution with --no-update)" + echo "--no-remove do not remove compilation directory" + echo "--force perform the test even if github commit status already exists" + echo "--commit SHA use the commit with sha SHA instead of the last one" + echo "--ref REF ref to use (defaults to refs/heads/master)" + echo "--only-model MODEL" + echo " performs the test only using model MODEL (option can be provided several times)" + echo "--no-enable-gh-pages" + echo " dont't try to enable the project pages on github" + echo "MAIL comma-separated list of e-mail addresses (no spaces); if not provided, mail is not sent" + echo "" + echo "This script provides functionality for automated tests." + echo "It can be run with cron to periodically test the last commit on the PHYEX repository" + echo "(eg '00 22 * * * bash -l -c \"SHELL=/bin/bash PHYEXWORKDIR=~/PHYEXTESTING ~/PHYEXTESTING/PHYEX/tools/testing.sh \\" + echo " --repo-user UMR-CNRM --repo-protocol ssh --repo-repo PHYEX user@domain\"')" + echo "The repository must be hosted on github as it relies on github project pages and github statuses." + echo "A github token must be set in the .netrc file." + echo "" + echo "All the work is done within the \${PHYEXWORKDIR} directory (it defaults to ~/PHYEXTESTING)." + echo "It may be necessary to fill the \${PHYEXWORKDIR}/PHYEX/tools/pack with base source code" + echo "(for arome and/or mesonh) or with data (testprogs)." + echo "" + echo "The script compare the results against reference simulations. These reference simulations must" + echo "be available in the different subdirectories in \${WORKDIR}." +} + +MAIL="" +MESONHREPOuser=${MESONHREPOuser:=QuentinRodier} +MESONHREPOrepo=${MESONHREPOrepo:=Meso-NH} +PHYEXREPOprotocol=${PHYEXREPOprotocol:=ssh} +REF="refs/heads/MNH-57-branch" +WORKDIR=${PHYEXWORKDIR:=${HOME}/MNHTESTING} +update=0 +compil=1 +execute=1 +comp=0 +remove=0 +commit="" +SHA=0 +force=0 +models="mesonh" +enableghpages=1 + +while [ -n "$1" ]; do + case "$1" in + '-h') usage; exit;; + '--repo-user') export MESONHREPOuser=$2; shift;; + '--repo-protocol') export PHYEXREPOprotocol=$2; shift;; + '--repo-repo') export MESONHREPOrepo=$2; shift;; + '--no-update') update=0;; + '--no-compil') compil=0;; + '--no-exec') execute=0;; + '--no-comp') comp=0;; + '--no-remove') remove=0;; + '--force') force=1;; + '--commit') SHA=$2; shift;; + '--ref') REF=$2; shift;; + '--only-model') models="${models} $2"; shift;; + '--no-enable-gh-pages') enableghpages=0;; + #--) shift; break ;; + *) if [ -z "${MAIL-}" ]; then + MAIL="$1" + else + echo "Only one email address allowed" + exit 1 + fi;; + esac + shift +done +[ "${models}" == "" ] && models="ial mesonh testprogs lmdz" + +[ ! -d ${WORKDIR} ] && mkdir -p ${WORKDIR} + +#stdout and stderr redirection +logfile="${WORKDIR}/logfile" +exec > "${logfile}" 2>&1 + +#context for statuses +context="continuous-integration/${HOSTNAME}" + +#Interactions with github +if [ "${PHYEXREPOprotocol}" == 'ssh' ]; then + PHYEXREPOgiturl="git@github.com:${MESONHREPOuser}/${MESONHREPOrepo}.git" +else + PHYEXREPOgiturl="https://github.com/${MESONHREPOuser}/${MESONHREPOrepo}.git" +fi +TOKEN=$(python3 -c "import netrc, socket; print(netrc.netrc().authenticators('github.com')[2])") + +function get_last_commit { + git ls-remote "${PHYEXREPOgiturl}" "${REF}" | cut -f1 +} + +function enable_gh_pages { + result=$(curl -L --netrc \ + -H "Authorization: Bearer $TOKEN" \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/${MESONHREPOuser}/${MESONHREPOrepo}/pages") + if [ $(echo $result | grep 'Not Found' | wc -l) -eq 1 ]; then + log 1 "Github project pages not yet enabled" + #Pages are not yet activated + curl -L --netrc \ + -X POST \ + -H "Authorization: Bearer $TOKEN" \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/${MESONHREPOuser}/${MESONHREPOrepo}/pages" \ + -d '{"source":{"branch":"master","path":"/docs"}}' + fi +} + +function get_statuses { + curl -L --netrc \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/${MESONHREPOuser}/${MESONHREPOrepo}/commits/${SHA}/statuses" +} + +function add_status { + error=$1 + ret=$2 + SHA="$3" + comment="$4" + if [ $ret -eq 0 ]; then + state="success" + else + if [ $error -eq 1 ]; then + state="error" + else + state="failure" + fi + fi + url="https://${MESONHREPOuser}.github.io/${MESONHREPOrepo}/displayparam.html?" + url=${url}$(content=$(echo -e "$comment") python3 -c "import urllib.parse, os; print(urllib.parse.quote('<pre>' + os.environ['content'] + '</pre>', safe=':/='))") + curl -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $TOKEN" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/${MESONHREPOuser}/${MESONHREPOrepo}/statuses/${SHA}" \ + -d '{"state":"'${state}'","target_url":"'${url}'","context":"'${context}'"}' +} + +function get_cases { + SHA="$1" + file="$2" + + url="https://raw.githubusercontent.com/${MESONHREPOuser}/${MESONHREPOrepo}/${SHA}/${file}" + content=$(wget --no-check-certificate "${url}" -O - 2>/dev/null) + if [ "${content}" != "" ]; then + content="${content}" python3 -c "import json, os; print(' '.join([k+':'+v for k, v in json.loads(os.environ['content']).get('testing', {}).items()]))" + fi +} + +#reporting +function send_mail { + message="$1" + if [ "$MAIL" != "" ]; then + mail -s "$context" "$MAIL" <<EOF +$(echo -e ${message}) +EOF + fi +} + +header="${context}\n\n$(date)" +message="" +function report { + error=$1 + ret=$2 + if [ ${ret} -eq 0 ]; then + error_msg="" + else + error_msg="XXXXXXXXXXXXXXXXXXXX ERROR ${ret} XXXXXXXXXXXXXXXXXXXX" + error_msg="${error_msg}\n\n" + fi + message="${header}\n${message}\n\n${error_msg}$(date)" + if [ ${ret} -ne 0 ]; then + send_mail "${message}" + fi + if [ "${SHA}" != 0 ]; then + add_status $error $ret "${SHA}" "${message}" + fi +} + +log_message="" +function exit_error { + ret=$1 + if [ ${ret} -ne 0 ]; then + message="__ ABNORMAL EXIT ${ret} __\n${log_message}\n${message}" + message="${message}\n\nMore information can be found in ${HOSTNAME}:${logfile}" + report 1 ${ret} + fi +} +trap 'exit_error $?' EXIT + +function log { + level=$1; shift + echo "$@" + if [ ${level} -eq 0 ]; then + message="${message}\n$@" + fi + log_message="${log_message}\n$@" +} + +#Test +if [ "${SHA}" -eq 0 ]; then + log 1 "Getting last commit hash" + SHA=$(get_last_commit) + log 1 "Commit hash is ${SHA}" +fi +if [ ${force} -eq 1 -o $(get_statuses "${SHA}" | grep "${context}" | wc -l) -eq 0 ]; then + log 1 "This commit has not been tested (or --force id provided)" + ret=0 + + #Checkout tools, set PATH and use the last version of the testing script + currentdir="${PWD}" + if [ ${update} -eq 1 ]; then + currentMD5=$(md5sum "${BASH_SOURCE[0]}" | cut -d\ -f1) + if [ ! -d "${WORKDIR}/PHYEX" ]; then + log 1 "Clonig PHYEX in ${WORKDIR}/PHYEX" + git clone "${PHYEXREPOgiturl}" "${WORKDIR}/PHYEX" + + log 1 "Installing filepp" + cd tools/mnh_expand + wget https://www-users.york.ac.uk/~dm26/filepp/filepp-1.8.0.tar.gz + tar xvf filepp-1.8.0.tar.gz + cd filepp-1.8.0 + ./configure --prefix="${PWD}" + make install + cd .. + ln -s filepp-1.8.0 filepp + + log 1 "Installing MNH_Expand_Array" + git clone https://github.com/JuanEscobarMunoz/MNH_Expand_Array.git + fi + log 1 "Checkout commit ${SHA}" + cd "${WORKDIR}/PHYEX" + git fetch "${PHYEXREPOgiturl}" + git checkout "${SHA}" + cd "${currentdir}" + . "${WORKDIR}/PHYEX/tools/env.sh" + if [ -f "${WORKDIR}/PHYEX/tools/testing.sh" ]; then + if [ "${currentMD5}" != $(md5sum "${WORKDIR}/PHYEX/tools/testing.sh" | cut -d\ -f1) ]; then + log 1 "Script has changed, running the new version" #This log and the preivous ones are lost + exec "${WORKDIR}/PHYEX/tools/testing.sh" $@ + fi + fi + fi + + #Enable the gihub project pages + if [ $enableghpages -eq 1 ]; then + log 1 "Test if github project pages are enabled" + enable_gh_pages + fi + + export MNHPACK="${WORKDIR}/MesoNH" + for d in "${MNHPACK}" ; do + if [ ! -d "${MNHPACK}" ]; then + log 1 "Creating directory ${MNHPACK}" + mkdir -p "${d}" + #if [ ! -d "${d}" ]; then + # log 1 "Creating directory ${d}" + # mkdir -p "${d}" + fi + done + + retmodel=0 +# log 0 "Tests for model ${models}" + log 0 "Tests for Méso-NH branch-57" + #Model specific configuration + compilation='-c' + execution='-r' + jsonfile="MY_RUN/INTEGRATION_CASES/TOOLS/local_version.json" + docmp=1 + + #Commande + cmd="/home/rodierq/GIT/MNH-CI/MNH-ladev/MY_RUN/INTEGRATION_CASES/TOOLS/check_commit_${models}.sh --repo-user ${MESONHREPOuser} --repo-protocol ${PHYEXREPOprotocol} ${SHA}" + + #Compilation + result=0 + if [ ${compil} -eq 1 ]; then + compilecmd="$cmd ${compilation}" + log 1 "Compilation with ${compilecmd}" + set +e + ${compilecmd} + result=$? + set -e + if [ ${result} -ne 0 ]; then + retmodel=1 + log 0 " ${models} compilation: error" + else + log 0 " ${models} compilation: OK" + fi + fi + + #Execution and comparison + if [ ${result} -eq 0 ]; then + #Get the list of cases with associated references + cases=$(get_cases "${SHA}" "${jsonfile}") + [ "${cases}" == "" ] && cases="DEF:DEF" + for case_ref in ${cases}; do + case=$(echo "${case_ref}" | cut -d: -f1) + ref=$(echo "${case_ref}" | cut -d: -f2) + if [ "${case}" == "DEF" -a "${ref}" == "DEF" ]; then + casearg="" + refarg="REF" + casedescr="default case(s)" + log 1 "No cases found in ${jsonfile}, we only test the default cases" + else + casearg="-t ${case}" + refarg="${ref}" + casedescr="${case} (ref=${ref})" + log 1 "Testing case ${case} against reference ${ref}" + fi + + result=0 + if [ ${execute} -eq 1 ]; then + execcmd="$cmd ${execution} ${casearg}" + #execcmd="$cmd ${execution} -t "ALL"" + log 1 "Excution with ${execcmd}" + set +e + ${execcmd} + result=$? + set -e + if [ ${result} -ne 0 ]; then + retmodel=1 + log 0 " ${models} ${casedescr}: execution error" + else + log 0 " ${models} ${casedescr}: execution OK (but status not reliable)" + fi + fi + if [ ${result} -eq 0 -a ${docmp} -eq 1 -a ${comp} -eq 1 ]; then + compcmd="$cmd -C ${casearg} ${refarg}" + log 1 "Comparison with ${compcmd}" + set +e + ${compcmd} + result=$? + set -e + if [ ${result} -ne 0 ]; then + retmodel=1 + log 0 " ${models} ${casedescr}: comparison error" + else + log 0 " ${models} ${casedescr}: comparison OK" + fi + fi + done + + #Cleaning + if [ ${remove} -eq 1 ]; then + cleancmd="${cmd} --remove" + log 1 "Cleaning with ${cleancmd}" + set +e + ${cleancmd} + result=$? + set -e + if [ ${result} -ne 0 ]; then + retmodel=1 + log 0 " ${models}: cleaning error" + else + log 0 " ${models}: cleaning OK" + fi + fi + fi + if [ $retmodel -eq 0 ]; then + log 0 "..... global result for model $model: OK" + else + ret=1 + log 0 "XXXXX global result for model $model: ERROR" + fi + + #Report result + report 0 ${ret} +fi diff --git a/docs/.gitkeep b/docs/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/docs/displayparam.html b/docs/displayparam.html new file mode 100644 index 0000000000000000000000000000000000000000..ee9cc3dfaa46c38c252891b41e8833064ea704c3 --- /dev/null +++ b/docs/displayparam.html @@ -0,0 +1 @@ +<html><body onload="document.getElementsByTagName('body')[0].innerHTML=decodeURI(window.location.search.substring(1));"/></html> diff --git a/src/MNH/compute_r00.f90 b/src/MNH/compute_r00.f90 index 2c335cd041c862596905647afe07a15c66582969..5aff724d5cec58ccf7752d673c1ecc6c70db0687 100644 --- a/src/MNH/compute_r00.f90 +++ b/src/MNH/compute_r00.f90 @@ -115,7 +115,7 @@ SUBROUTINE COMPUTE_R00(TPFILE) ! P. Wautelet 07/02/2019: force TYPE to a known value for IO_File_add2list ! P. Wautelet 11/04/2019: bugfix: nullify TZTRACFILE when appropriate ! P. Wautelet 15/02/2024: add time dimension for Lagrangian trajectories -! J.-P. Chaboureau 26/02/2024: add thetae, wind and cloud variables, and replace negative values by XDEFFILLVALUE +! J.-P. Chaboureau 26/02/2024: replace LG?T by LG?, add thetae, wind and cloud variables, and replace negative values by XDEFFILLVALUE !------------------------------------------------------------------------------- ! !* 0. DECLARATIONS diff --git a/src/MNH/modd_cloudparn.f90 b/src/MNH/modd_cloudparn.f90 deleted file mode 100644 index 2704b917d882371bac400c339f99e5a82bc5bdc1..0000000000000000000000000000000000000000 --- a/src/MNH/modd_cloudparn.f90 +++ /dev/null @@ -1,77 +0,0 @@ -!MNH_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier -!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence -!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt -!MNH_LIC for details. version 1. -!----------------------------------------------------------------- -!--------------- special set of characters for RCS information -!----------------------------------------------------------------- -! $Source$ $Revision$ -! MASDEV4_7 modd 2006/05/18 13:07:25 -!----------------------------------------------------------------- -! ###################### - MODULE MODD_CLOUDPAR_n -! ###################### -! -!!**** *MODD_CLOUDPAR$n* - declaration of the model-n dependant Microphysics -!! constants -!! -!! PURPOSE -!! ------- -! The purpose of this declarative module is to declare the -! model-n dependant Microhysics constants. -! -!! -!!** IMPLICIT ARGUMENTS -!! ------------------ -!! None -!! -!! REFERENCE -!! --------- -!! Book2 of documentation of Meso-NH (MODD_CLOUDPARn) -!! -!! AUTHOR -!! ------ -!! E. Richard *Laboratoire d'Aerologie* -!! -!! MODIFICATIONS -!! ------------- -!! Original 20/12/95 -!! J.-P. Pinty 29/11/02 add C3R5, ICE2, ICE4, ELEC -!! -!------------------------------------------------------------------------------- -! -!* 0. DECLARATIONS -! ------------ -! -USE MODD_PARAMETERS, ONLY: JPMODELMAX -IMPLICIT NONE - -TYPE CLOUDPAR_t -! - INTEGER :: NSPLITR ! Number of required small time step integration - ! for rain sedimentation computation - INTEGER :: NSPLITG ! Number of required small time step integration - ! for ice hydrometeor sedimentation computation -! -! -END TYPE CLOUDPAR_t - -TYPE(CLOUDPAR_t), DIMENSION(JPMODELMAX), TARGET, SAVE :: CLOUDPAR_MODEL - -INTEGER, POINTER :: NSPLITR=>NULL() -INTEGER, POINTER :: NSPLITG=>NULL() - -CONTAINS - -SUBROUTINE CLOUDPAR_GOTO_MODEL(KFROM, KTO) -INTEGER, INTENT(IN) :: KFROM, KTO -! -! Save current state for allocated arrays -! -! Current model is set to model KTO -NSPLITR=>CLOUDPAR_MODEL(KTO)%NSPLITR -NSPLITG=>CLOUDPAR_MODEL(KTO)%NSPLITG - -END SUBROUTINE CLOUDPAR_GOTO_MODEL - -END MODULE MODD_CLOUDPAR_n diff --git a/src/MNH/modeln.f90 b/src/MNH/modeln.f90 index 923d877e31350a9e58f3927c8362075b5444ca9f..4286492f088d90c64495e3d1b2c6705fd926201e 100644 --- a/src/MNH/modeln.f90 +++ b/src/MNH/modeln.f90 @@ -385,6 +385,7 @@ USE MODE_AIRCRAFT_BALLOON use mode_budget, only: Budget_store_init, Budget_store_end USE MODE_DATETIME USE MODE_ELEC_ll +USE MODE_FILL_DIMPHYEX, ONLY: FILL_DIMPHYEX USE MODE_GRIDCART USE MODE_GRIDPROJ USE MODE_IO_FIELD_WRITE, only: IO_Field_user_write, IO_Fieldlist_write, IO_Header_write @@ -2008,6 +2009,7 @@ IF (CCLOUD /= 'NONE') THEN ! Lessivage des CCN et IFN nucléables par Slinn ! IF (LSCAV .AND. (CCLOUD == 'LIMA')) THEN + CALL FILL_DIMPHYEX( YLDIMPHYEX, SIZE(XTHT,1), SIZE(XTHT,2), SIZE(XTHT,3) ) CALL LIMA_PRECIP_SCAVENGING( YLDIMPHYEX,CST,TBUCONF,TBUDGETS,SIZE(TBUDGETS), & CCLOUD, CCONF, ILUOUT, KTCOUNT,XTSTEP,XRT(:,:,:,3), & XRHODREF, XRHODJ, XZZ, XPABST, XTHT, & diff --git a/src/PHYEX/micro/lima.f90 b/src/PHYEX/micro/lima.f90 index 43e886f16530eeb67bd532ef5794ba707e5d39b0..3d0b361705c622998abfc2b7339330dc451abe2a 100644 --- a/src/PHYEX/micro/lima.f90 +++ b/src/PHYEX/micro/lima.f90 @@ -1491,21 +1491,39 @@ DO WHILE(ANY(ZTIME(D%NIB:D%NIE,D%NJB:D%NJE,D%NKTB:D%NKTE)<PTSTEP)) WHERE(ZA_RC(:)<-1.E-20 .AND. ZRCT1D(:)>XRTMIN(2)) ZMAXTIME(:)=MIN(ZMAXTIME(:), -(ZB_RC(:)+ZRCT1D(:))/ZA_RC(:)) END WHERE + WHERE(ZA_CC(:)<-1.E-20 .AND. ZCCT1D(:)>XCTMIN(2)) + ZMAXTIME(:)=MIN(ZMAXTIME(:), -(ZB_CC(:)+ZCCT1D(:))/ZA_CC(:)) + END WHERE WHERE(ZA_RR(:)<-1.E-20 .AND. ZRRT1D(:)>XRTMIN(3)) ZMAXTIME(:)=MIN(ZMAXTIME(:), -(ZB_RR(:)+ZRRT1D(:))/ZA_RR(:)) END WHERE + WHERE(ZA_CR(:)<-1.E-20 .AND. ZCRT1D(:)>XCTMIN(3)) + ZMAXTIME(:)=MIN(ZMAXTIME(:), -(ZB_CR(:)+ZCRT1D(:))/ZA_CR(:)) + END WHERE WHERE(ZA_RI(:)<-1.E-20 .AND. ZRIT1D(:)>XRTMIN(4)) ZMAXTIME(:)=MIN(ZMAXTIME(:), -(ZB_RI(:)+ZRIT1D(:))/ZA_RI(:)) END WHERE + WHERE(ZA_CI(:)<-1.E-20 .AND. ZCIT1D(:)>XCTMIN(4)) + ZMAXTIME(:)=MIN(ZMAXTIME(:), -(ZB_CI(:)+ZCIT1D(:))/ZA_CI(:)) + END WHERE WHERE(ZA_RS(:)<-1.E-20 .AND. ZRST1D(:)>XRTMIN(5)) ZMAXTIME(:)=MIN(ZMAXTIME(:), -(ZB_RS(:)+ZRST1D(:))/ZA_RS(:)) END WHERE + WHERE(ZA_CS(:)<-1.E-20 .AND. ZCST1D(:)>XCTMIN(5)) + ZMAXTIME(:)=MIN(ZMAXTIME(:), -(ZB_CS(:)+ZCST1D(:))/ZA_CS(:)) + END WHERE WHERE(ZA_RG(:)<-1.E-20 .AND. ZRGT1D(:)>XRTMIN(6)) ZMAXTIME(:)=MIN(ZMAXTIME(:), -(ZB_RG(:)+ZRGT1D(:))/ZA_RG(:)) END WHERE + WHERE(ZA_CG(:)<-1.E-20 .AND. ZCGT1D(:)>XCTMIN(6)) + ZMAXTIME(:)=MIN(ZMAXTIME(:), -(ZB_CG(:)+ZCGT1D(:))/ZA_CG(:)) + END WHERE WHERE(ZA_RH(:)<-1.E-20 .AND. ZRHT1D(:)>XRTMIN(7)) ZMAXTIME(:)=MIN(ZMAXTIME(:), -(ZB_RH(:)+ZRHT1D(:))/ZA_RH(:)) END WHERE + WHERE(ZA_CH(:)<-1.E-20 .AND. ZCHT1D(:)>XCTMIN(7)) + ZMAXTIME(:)=MIN(ZMAXTIME(:), -(ZB_CH(:)+ZCHT1D(:))/ZA_CH(:)) + END WHERE ! We stop when the end of the timestep is reached WHERE(PTSTEP-ZTIME1D(:)-ZMAXTIME(:)<=0.) @@ -2296,8 +2314,7 @@ if ( BUCONF%lbu_enable ) then call BUDGET_STORE_ADD_PHY(D, TBUDGETS(NBUDGET_RR), 'ACCR', -ztot_rc_accr(:, :, :) * zrhodjontstep(:, :, :) ) call BUDGET_STORE_ADD_PHY(D, TBUDGETS(NBUDGET_RR), 'REVA', ztot_rr_evap(:, :, :) * zrhodjontstep(:, :, :) ) call BUDGET_STORE_ADD_PHY(D, TBUDGETS(NBUDGET_RR), 'HONR', ztot_rr_honr(:, :, :) * zrhodjontstep(:, :, :) ) -! call BUDGET_STORE_ADD_PHY(D, TBUDGETS(NBUDGET_RR), 'ACC', ztot_rr_acc (:, :, :) * zrhodjontstep(:, :, :) ) - call BUDGET_STORE_ADD_PHY(D, TBUDGETS(NBUDGET_RR), 'ACC', (ztot_rc_rimss(:, :, :) + ztot_rc_rimsg(:, :, :)) & + call BUDGET_STORE_ADD_PHY(D, TBUDGETS(NBUDGET_RR), 'ACC', (-ztot_rr_accss(:, :, :) - ztot_rr_accsg(:, :, :)) & * zrhodjontstep(:, :, :) ) call BUDGET_STORE_ADD_PHY(D, TBUDGETS(NBUDGET_RR), 'CFRZ', ztot_rr_cfrz(:, :, :) * zrhodjontstep(:, :, :) ) call BUDGET_STORE_ADD_PHY(D, TBUDGETS(NBUDGET_RR), 'WETG', ztot_rr_wetg(:, :, :) * zrhodjontstep(:, :, :) ) diff --git a/src/PHYEX/micro/mode_lima_ccn_activation.f90 b/src/PHYEX/micro/mode_lima_ccn_activation.f90 index b7886c3bb8d572d3a1ce708194ae1fe719926b4f..9153fd9f000ce3e5ad9f9bd117fd16f7776cab01 100644 --- a/src/PHYEX/micro/mode_lima_ccn_activation.f90 +++ b/src/PHYEX/micro/mode_lima_ccn_activation.f90 @@ -424,10 +424,10 @@ IF( INUCT >= 1 ) THEN ZZW1(:) = MIN(XCSTDCRIT*ZZW6(:)/(((ZZT(:)*ZSMAX(:))**3)*ZRHODREF(:)),1.E-5) END WHERE ! - PTOT_RV_HENU(:,:,:) = 0. + IF(PRESENT(PTOT_RV_HENU)) PTOT_RV_HENU(:,:,:) = 0. IF (.NOT.LSUBG_COND) THEN ZW(:,:,:) = MIN( UNPACK( ZZW1(:),MASK=GNUCT(:,:,:),FIELD=0.0 ),PRVT(:,:,:) ) - PTOT_RV_HENU(:,:,:) = ZW(:,:,:) + IF(PRESENT(PTOT_RV_HENU)) PTOT_RV_HENU(:,:,:) = ZW(:,:,:) PTHT(:,:,:) = PTHT(:,:,:) + ZW(:,:,:) * (CST%XLVTT+(CST%XCPV-CST%XCL)*(PT(:,:,:)-CST%XTT))/ & (PEXNREF(:,:,:)*(CST%XCPD+CST%XCPV*PRVT(:,:,:)+CST%XCL*(PRCT(:,:,:)+PRRT(:,:,:)))) PRVT(:,:,:) = PRVT(:,:,:) - ZW(:,:,:) diff --git a/src/PHYEX/micro/mode_lima_tendencies.f90 b/src/PHYEX/micro/mode_lima_tendencies.f90 index 5fc16d817744e60c66e2ad622a5266ed55befd97..1917e23e8fa7ad6f259b5ae0fc26b8c2ab20c831 100644 --- a/src/PHYEX/micro/mode_lima_tendencies.f90 +++ b/src/PHYEX/micro/mode_lima_tendencies.f90 @@ -576,8 +576,6 @@ IF ((.NOT. LKHKO) .AND. NMOM_R.GE.2) THEN P_CR_SCBU ) ! P_CR_SCBU(:) = P_CR_SCBU(:) * ZPF1D(:) - ! process limited until checks on concentrations are added to the time-splitting loop - P_CR_SCBU(:) = MAX(P_CR_SCBU(:),-0.5*PCRT(:)/PTSTEP) ! PA_CR(:) = PA_CR(:) + P_CR_SCBU(:) END IF @@ -735,7 +733,7 @@ IF (NMOM_C.GE.1 .AND. NMOM_S.GE.1) THEN PA_RI(:) = PA_RI(:) + P_RI_HMS(:) IF (NMOM_I.GE.2) PA_CI(:) = PA_CI(:) + P_CI_HMS(:) ! PA_RS(:) = PA_RS(:) + P_RS_RIM(:) + P_RS_HMS(:) - PA_RS(:) = PA_RS(:) - P_RC_RIMSS(:) - P_RS_RIMCG(:) ! RCRIMSS < 0 (gain for rs), RSRIMCG > 0 (loss for rs) + PA_RS(:) = PA_RS(:) - P_RC_RIMSS(:) - P_RS_RIMCG(:) + P_RS_HMS(:) ! RCRIMSS < 0 (gain for rs), RSRIMCG > 0 (loss for rs) IF (NMOM_S.GE.2) PA_CS(:) = PA_CS(:) + P_CS_RIM(:) ! PA_RG(:) = PA_RG(:) + P_RG_RIM(:) PA_RG(:) = PA_RG(:) - P_RC_RIMSG(:) + P_RS_RIMCG(:) ! RCRIMSG < 0 (gain for rg), RSRIMCG > 0 (gain for rg) diff --git a/src/configure b/src/configure index 2f95729cb7ebef3a7c584b8d9280bc2fe09ca5af..724b4aa1447d3385ad818ddf97918e2616c29fb8 100755 --- a/src/configure +++ b/src/configure @@ -484,17 +484,16 @@ export SPLL=spll_new export VER_MPI=${VER_MPI:-MPIAUTO} export OPTLEVEL=${OPTLEVEL:-DEBUG} export MVWORK=${MVWORK:-NO} + export VER_CDF=${VER_CDF:-CDFAUTO} export NEED_TOOLS=NO # Ubuntu version case "$(lsb_release -sr)" in 20.04) - export VER_CDF=${VER_CDF:-CDFCTI} export MNHENV=${MNHENV:-" export SPLL=spll_new "} ;; 22.04) - export VER_CDF=${VER_CDF:-CDFAUTO} export MNHENV=${MNHENV:-" export PATH=/opt/gcc-9.4.0/bin:\$PATH export SPLL=spll_new