diff --git a/MY_RUN/KTEST/012_dust/001_pgd1/clean_prep_pgd_xyz b/MY_RUN/KTEST/012_dust/001_pgd1/clean_prep_pgd_xyz index 7c43cbe3713fb2e8fe8d08f9af361081f963fa17..b3a82c753bc7e1c019dab1d49e3521bb74583cd0 100755 --- a/MY_RUN/KTEST/012_dust/001_pgd1/clean_prep_pgd_xyz +++ b/MY_RUN/KTEST/012_dust/001_pgd1/clean_prep_pgd_xyz @@ -1,5 +1,5 @@ set -x -rm -f *.dir *.hdr +rm -f *.dir *.hdr file_for_xtransfer rm -f pgd_dust* OUTPUT_LISTING* OUTPUT_TRANSFER pipe* *.tex diff --git a/MY_RUN/KTEST/012_dust/002_ecmwf2lfi/clean_ecmwf2lfi_xyz b/MY_RUN/KTEST/012_dust/002_ecmwf2lfi/clean_ecmwf2lfi_xyz index a4505ebe0d9c0087de74f601759a26f84c212904..510d6103185c6b3630ca6f15635ebc6e2de6c327 100755 --- a/MY_RUN/KTEST/012_dust/002_ecmwf2lfi/clean_ecmwf2lfi_xyz +++ b/MY_RUN/KTEST/012_dust/002_ecmwf2lfi/clean_ecmwf2lfi_xyz @@ -1,4 +1,4 @@ set -x rm -f S7* pgd* OUTPUT_LISTING* OUTPUT_TRANSFER pipe* *.tex PRE_REAL1.nam - +rm -f file_for_xtransfer diff --git a/MY_RUN/KTEST/012_dust/002_ecmwf2lfi/run_ecmwf2lfi_xyz b/MY_RUN/KTEST/012_dust/002_ecmwf2lfi/run_ecmwf2lfi_xyz index d3251c34a1b0ad9f45ae364262d8f2c849dba39e..fe28535642dc10da6b1849accc4f9fe273d3a8ad 100755 --- a/MY_RUN/KTEST/012_dust/002_ecmwf2lfi/run_ecmwf2lfi_xyz +++ b/MY_RUN/KTEST/012_dust/002_ecmwf2lfi/run_ecmwf2lfi_xyz @@ -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 diff --git a/MY_RUN/KTEST/012_dust/003_run/clean_mesonh_xyz b/MY_RUN/KTEST/012_dust/003_run/clean_mesonh_xyz index 186af2adc9d4e8d2c403f1f5c6aec3788248cd03..e8ff5b3a67bf6a72c8d998808fd656ad237a6388 100755 --- a/MY_RUN/KTEST/012_dust/003_run/clean_mesonh_xyz +++ b/MY_RUN/KTEST/012_dust/003_run/clean_mesonh_xyz @@ -1,3 +1,3 @@ set -x rm -f S7* DUST* OUTPUT_LISTING* OUTPUT_TRANSFER pipe* *.tex PRESSURE core* pgd* - +rm -f file_for_xtransfer diff --git a/MY_RUN/KTEST/012_dust/004_restart/clean_mesonh_xyz b/MY_RUN/KTEST/012_dust/004_restart/clean_mesonh_xyz index 186af2adc9d4e8d2c403f1f5c6aec3788248cd03..e8ff5b3a67bf6a72c8d998808fd656ad237a6388 100755 --- a/MY_RUN/KTEST/012_dust/004_restart/clean_mesonh_xyz +++ b/MY_RUN/KTEST/012_dust/004_restart/clean_mesonh_xyz @@ -1,3 +1,3 @@ set -x rm -f S7* DUST* OUTPUT_LISTING* OUTPUT_TRANSFER pipe* *.tex PRESSURE core* pgd* - +rm -f file_for_xtransfer diff --git a/MY_RUN/KTEST/012_dust/007_ncl/clean_ncl b/MY_RUN/KTEST/012_dust/007_ncl/clean_ncl new file mode 100755 index 0000000000000000000000000000000000000000..5f397dd38688bfd9fdadba3c4088ce8c3ac11c56 --- /dev/null +++ b/MY_RUN/KTEST/012_dust/007_ncl/clean_ncl @@ -0,0 +1,3 @@ +set -x +rm -f *.nc4 +rm -f *.ps diff --git a/MY_RUN/KTEST/012_dust/007_ncl/plot_dust.ncl b/MY_RUN/KTEST/012_dust/007_ncl/plot_dust.ncl new file mode 100644 index 0000000000000000000000000000000000000000..36bbac6da30e47593816b2fe1bc1aa5f66bd82d3 --- /dev/null +++ b/MY_RUN/KTEST/012_dust/007_ncl/plot_dust.ncl @@ -0,0 +1,280 @@ +;================================================; +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 diff --git a/MY_RUN/KTEST/012_dust/007_ncl/run_ncl b/MY_RUN/KTEST/012_dust/007_ncl/run_ncl new file mode 100755 index 0000000000000000000000000000000000000000..942dc30eb729619f91033bd407f119d8d24bd852 --- /dev/null +++ b/MY_RUN/KTEST/012_dust/007_ncl/run_ncl @@ -0,0 +1,3 @@ +set -x +ln -sf ../004_restart/DUST7.1.SEG02.004.nc4 . +ncl plot_dust.ncl diff --git a/MY_RUN/KTEST/012_dust/Makefile b/MY_RUN/KTEST/012_dust/Makefile index f249241e05bd1335b39f050cbf4b0a0531be84fd..ee078671aee07513f52f91018bf64d747f250039 100644 --- a/MY_RUN/KTEST/012_dust/Makefile +++ b/MY_RUN/KTEST/012_dust/Makefile @@ -1,4 +1,4 @@ -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