Skip to content
Snippets Groups Projects
Commit 407d5615 authored by Gaelle Tanguy's avatar Gaelle Tanguy Committed by WAUTELET Philippe
Browse files

gaelle 2/12/2015 : MAJ 012_dust

parent 49d330d8
No related branches found
No related tags found
No related merge requests found
set -x
rm -f *.dir *.hdr
rm -f *.dir *.hdr file_for_xtransfer
rm -f pgd_dust* OUTPUT_LISTING* OUTPUT_TRANSFER pipe* *.tex
set -x
rm -f S7* pgd* OUTPUT_LISTING* OUTPUT_TRANSFER pipe* *.tex PRE_REAL1.nam
rm -f file_for_xtransfer
......@@ -15,6 +15,7 @@ done
#
#
#
export GRIB_DEFINITION_PATH=$SRC_MESONH/src/LIB/grib_api-1.13.1/definitions
ln -sf ../001_pgd1/pgd_dust_30km.??? .
rm -f S702000092* OUTPUT_LISTING* pipe* *.tex
......
set -x
rm -f S7* DUST* OUTPUT_LISTING* OUTPUT_TRANSFER pipe* *.tex PRESSURE core* pgd*
rm -f file_for_xtransfer
set -x
rm -f S7* DUST* OUTPUT_LISTING* OUTPUT_TRANSFER pipe* *.tex PRESSURE core* pgd*
rm -f file_for_xtransfer
set -x
rm -f *.nc4
rm -f *.ps
;================================================;
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
; ================================================;
;================================================;
begin
;=================================================;
; open file and read in data
;=================================================;
fichier1 = addfile("DUST7.1.SEG02.004.nc4", "r")
;==================================================;
; Open the workstation
;==================================================;
type = "ps"
wks = gsn_open_wks(type,"visu_dust")
;=================================================;
; Get informations on variable sizes
; dims are dims-2 to remove non-physical values
;=================================================;
mdims = getfilevardimsizes(fichier1,"UT") ; get dimension sizes
nd = dimsizes(mdims)
imax=mdims(nd-1)-2
jmax=mdims(nd-2)-2
kmax=mdims(nd-3)-2
;=================================================;
; Set map projection
;=================================================;
lat2d=fichier1->LAT(1:jmax,1:imax)
lon2d=fichier1->LON(1:jmax,1:imax)
; Resources for the map projection
;-----------------------------------------------;
resmap=True
;-----------------------------------------------;
; Get global attributes to set map projection
;-----------------------------------------------;
RPK = fichier1->RPK
LON0 = fichier1->LON0
BETA = fichier1->BETA
if (RPK.gt.0)
; Lambert projection from north pole
; ---------------------------
resmap@mpProjection = "LambertConformal" ; projection
resmap@mpLambertParallel1F = 42 ; to be adjusted !!
resmap@mpLambertParallel2F = resmap@mpLambertParallel1F ; Parallel1 = PArallel2
resmap@mpLambertMeridianF = LON0 ; get value from globla attribute
end if
if (RPK.lt.0)
; Lambert projection from south pole
; ---------------------------
resmap@mpProjection = "LambertConformal" ; projection
resmap@mpLambertParallel1F = -42 ; to be adjusted !!
resmap@mpLambertParallel2F = resmap@mpLambertParallel1F ; ncl adds from grib file
resmap@mpLambertMeridianF = LON0 ; get value from globla attribute
end if
if (RPK.eq.1)
; Stereographic projection
; ---------------------------
resmap@mpProjection = "Stereographic"
resmap@mpCenterLonF = LON0
resmap@mpCenterRotF = BETA
resmap@mpCenterLatF = 90.
end if
if (RPK.eq.-1)
; Stereographic projection
; ---------------------------
resmap@mpProjection = "Stereographic"
resmap@mpCenterLonF = LON0
resmap@mpCenterRotF = BETA
resmap@mpCenterLatF = -90.
end if
if (RPK.eq.0) then
; Mercator projection
; ---------------------------
resmap@mpProjection = "Mercator"
end if
print("Map projection="+resmap@mpProjection)
;====================================
; Defining the corners for projection
;====================================
resmap@mpLimitMode = "Corners"
resmap@mpLeftCornerLatF = lat2d(0,0)
resmap@mpLeftCornerLonF = lon2d(0,0)
resmap@mpRightCornerLatF = lat2d(jmax-1,imax-1)
resmap@mpRightCornerLonF = lon2d(jmax-1,imax-1)
print ("Corner (0,0); Lat="+resmap@mpLeftCornerLatF+ \
", Lon="+resmap@mpLeftCornerLonF)
print ("Oppos corner; Lat="+resmap@mpRightCornerLatF+ \
", Lon= "+resmap@mpRightCornerLonF)
;=================================================;
; lecture des différents champs
;=================================================;
wt= fichier1->WT(1:kmax+1,1:jmax,1:imax) ; WT
vt= fichier1->VT(1:kmax,1:jmax+1,1:imax) ; VT
ut= fichier1->UT(1:kmax,1:jmax,1:imax+1) ; UT
tht= fichier1->THT(1:kmax,1:jmax,1:imax) ; THT
tht@long_name="Potential Temperature"
tht@units="K"
tht@lat2d = lat2d
tht@lon2d = lon2d
dstm03t= fichier1->DSTM03T(1:kmax,1:jmax,1:imax)
dstm03t@long_name="DSTM03T"
dstm03t@units="ppp"
dstm03t@lat2d = lat2d
dstm03t@lon2d = lon2d
dstm33t= fichier1->DSTM33T(1:kmax,1:jmax,1:imax)
dstm33t@long_name="DSTM33T"
dstm33t@units="ppp"
dstm33t@lat2d = lat2d
dstm33t@lon2d = lon2d
dstm02t= fichier1->DSTM02T(1:kmax,1:jmax,1:imax)
dstm02t@long_name="DSTM02T"
dstm02t@units="ppp"
dstm02t@lat2d = lat2d
dstm02t@lon2d = lon2d
dstm32t= fichier1->DSTM32T(1:kmax,1:jmax,1:imax)
dstm32t@long_name="DSTM32T"
dstm32t@units="ppp"
dstm32t@lat2d = lat2d
dstm32t@lon2d = lon2d
dstm01t= fichier1->DSTM01T(1:kmax,1:jmax,1:imax)
dstm01t@long_name="DSTM01T"
dstm01t@units="ppp"
dstm01t@lat2d = lat2d
dstm01t@lon2d = lon2d
dstm31t= fichier1->DSTM31T(1:kmax,1:jmax,1:imax)
dstm31t@long_name="DSTM31T"
dstm31t@units="ppp"
dstm31t@lat2d = lat2d
dstm31t@lon2d = lon2d
flx_dst001= fichier1->FLX_DST001(0,1:jmax,1:imax)
flx_dst001@long_name="FLX_DST001"
flx_dst001@units="kg/m2/s"
flx_dst001@lat2d = lat2d
flx_dst001@lon2d = lon2d
flx_dst002= fichier1->FLX_DST002(0,1:jmax,1:imax)
flx_dst002@long_name="FLX_DST002"
flx_dst002@units="kg/m2/s"
flx_dst002@lat2d = lat2d
flx_dst002@lon2d = lon2d
flx_dst003= fichier1->FLX_DST003(0,1:jmax,1:imax)
flx_dst003@long_name="FLX_DST003"
flx_dst003@units="kg/m2/s"
flx_dst003@lat2d = lat2d
flx_dst003@lon2d = lon2d
;=================================================;
; On mets toutes les variables sur la grille 1
;=================================================;
ut1 = wrf_user_unstagger(ut,"X")
ut1@long_name="Zonal wind"
ut1@units="m/s"
vt1 = wrf_user_unstagger(vt,"Y")
vt1@long_name="Meridian wind"
vt1@units="m/s"
wt1 = wrf_user_unstagger(wt,"Z")
wt1@long_name="Vertical wind"
wt1@units="m/s"
ut1@lat2d = lat2d
ut1@lon2d = lon2d
vt1@lat2d = lat2d
vt1@lon2d = lon2d
wt1@lat2d = lat2d
wt1@lon2d = lon2d
;=================================================;
; Set some other basic resources
;=================================================;
resmap = True
resmap@gsnFrame = False
resmap@gsnDraw = False
resmap@gsnMaximize = True
resmap@gsnPaperOrientation = "portrait"
resmap@gsnSpreadColors = True ; use full range of colormap
resmap@tiYAxisString =" "
resmap@cnFillOn = True ; turn on color fill
resmap@cnLinesOn = False ; turn off contour lines
resmap@mpFillOn = False ; couleur grise des continents
resmap@mpGeophysicalLineThicknessF = 2.0
resmap@mpGeophysicalLineColor = "Black"
resmap@mpNationalLineColor = "Black"
;=================================================;
; module + vecteurs vent au premier niveau
;=================================================;
gsn_define_colormap(wks,"rainbow") ; Choose colormap
; options de tracé
res2=resmap
res2@cnLevelSelectionMode = "AutomaticLevels"
res2@gsnScalarContour=True
res2@vcMinDistanceF = 0.01
res2@vcRefLengthF=0.04
res2@cnLevelSpacingF = 0.00005
res2@cnMinLevelValF = 0
mutvt=(ut1*ut1+vt1*vt1)^(0.5)
mutvt@lat2d=lat2d
mutvt@lon2d=lon2d
plot=gsn_csm_vector_scalar_map(wks,ut1(0,:,:),vt1(0,:,:),mutvt(0,:,:),res2)
draw(plot)
frame(wks)
plot=gsn_csm_contour_map(wks,tht(0,:,:),res2)
draw(plot)
frame(wks)
res2@gsnSpreadColorStart = 0 ; force la première couleur en blanc(= couleur 0 de la palette)
plot=gsn_csm_contour_map(wks,dstm03t(0,:,:),res2)
draw(plot)
frame(wks)
plot=gsn_csm_contour_map(wks,dstm33t(0,:,:),res2)
draw(plot)
frame(wks)
plot=gsn_csm_contour_map(wks,dstm02t(0,:,:),res2)
draw(plot)
frame(wks)
plot=gsn_csm_contour_map(wks,dstm32t(0,:,:),res2)
draw(plot)
frame(wks)
plot=gsn_csm_contour_map(wks,dstm01t(0,:,:),res2)
draw(plot)
frame(wks)
plot=gsn_csm_contour_map(wks,dstm31t(0,:,:),res2)
draw(plot)
frame(wks)
flx_dst001@_FillValue = 999.
plot=gsn_csm_contour_map(wks,flx_dst001(:,:),res2)
draw(plot)
frame(wks)
flx_dst002@_FillValue = 999.
plot=gsn_csm_contour_map(wks,flx_dst002(:,:),res2)
draw(plot)
frame(wks)
flx_dst003@_FillValue = 999.
plot=gsn_csm_contour_map(wks,flx_dst003(:,:),res2)
draw(plot)
frame(wks)
end
set -x
ln -sf ../004_restart/DUST7.1.SEG02.004.nc4 .
ncl plot_dust.ncl
all: E001_pgd1 E002_ecmwf2lfi E003_run E004_restart E005_conv2dia E006_diaprog
all: E001_pgd1 E002_ecmwf2lfi E003_run E004_restart E005_conv2dia E006_diaprog E007_ncl
E001_pgd1 :
cd 001_pgd1 && run_prep_pgd_xyz
......@@ -12,11 +12,13 @@ E005_conv2dia:
cd 005_conv2dia && run_conv2dia
E006_diaprog:
cd 006_diaprog && run_diaprog
E007_ncl:
cd 007_ncl && run_ncl
clean:
cd 001_pgd1 && clean_prep_pgd_xyz
cd 002_ecmwf2lfi && clean_ecmwf2lfi_xyz
cd 003_run && clean_mesonh_xyz
cd 004_restart && clean_mesonh_xyz
cd 005_conv2dia && clean_conv2dia
cd 006_diaprog && clean_diaprog
cd 006_diaprog && clean_diaprog
cd 007_ncl && clean_ncl
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment