Extended capabilities of time-dependent ELM transport model and neoclassical transport model; Added several fields to b2time.nc; Added and/or expanded several plotting scripts #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains all the modifications that I coded for
SOLPS-ITERin the last months. Whereas they were aimed to my own current research, I coded everything in such a way to make it as general as possible and "ready" to be painlessly merged to the codebase. I have done the equivalent code modifications also for therelease/3.1.1branch. As soon as this PR will have gone through, I will create one also for that branch, already containing any new further modifications which will be suggested during the review of this PR. The manual has been updated accordingly.The new code is fully working and functional (as I have been using it for several months already). As such, this PR is, from my side, ready to be reviewed.
The changes consist in:
Pointer of
B2.5to its version containing extended capabilities of time-dependent ELM transport model and neoclassical transport model and increased output tob2time.nc(see related PR)Expanded capabilities of the
nc2text_simpleprogram, in order to make it read also 3-dimensional fields from NetCDF files (so far only 1- and 2-dimensional fields were supported).The
2d,2da,2dt,2dt_avprinting/plotting scripts has been expanded to support also the new multi-species fields now contained inb2time.nc.A new
2ddsscript has been added, to plot profiles fromb2time.nc, against the (automatically selected) proper radial coordinate.The
2d_plotsand2d_plots_avscripts have been expanded to include now also species-resolved time traces (plotted together according to the isonuclear sequence of belonging). For consistency and clarity, the generated PostScript file has been renamed fromb2time2d(_av).pstob2time2d_time_traces(_av).ps.The
2d_profilesscript has been expanded so that it prints.last10(pro)files also for multi-species fields (namely one file for each fluid species). Since, for simulations with large number of species, the number of outputted files could become very large, potentially "polluting" a lot the run directory, these files are now created in a/2d_profilessubfolder of the run directory. Additionally now, when the script is invoked, all profiles are also plotted to a new PostScript file, namedb2time2d_profiles.ps, in the same fashion as already done forb2time2d_time_traces.ps.A new
2dt_tracingscript has been added, which plots time traces of quantities contained in the.trctracing files (for now only those contained intracing/blnn_SPb.trcandtracing/blne.trc). Additionally, all time traces are automatically plotted to the PostScript filesparticle_balance.psandenergy_balance.psvia the auxiliary new scriptsparticle_balance_tracingandenergy_balance_tracing. Note that I created these scripts basically simultaneously as when Andrei wrote some very similar scripts (if not even before), so I did not know about his efforts back then. It is possible that some things are quite redundant.For consistency, new scripts for automatically plotting the norm of the residuals of the ion and electron energy equations (
resheandreshi, respectively) have been added, in the same fashion of the already existing scriptsrescoandresmo. Additionally, all of the 4 scripts are automatically called through an auxiliary new scriptplot_residuals, which plots now the norm of all residuals to a new PostScript fileresiduals.ps.A new auxiliary
groups_speciesscript has been added, which prints the ordeded number of species contained in each isonuclear sequence (as something like that was needed for some of the new above mentioned plotting scripts). E.g. executing the script in a run directory of a D+N+He+Ne case outputs2 8 3 11.The
summarize_runscript has been updated by simplifying its content. Now it just automatically calls the2d_profiles,2d_plots,plot_residualsandlast10scripts.Also, some of the plotting scripts mentioned above, so far left several undesired traces in the run directory (e.g. some temporary
gnuplot.dataand/orgnuplot.cmdfiles which were not properly deleted after the call to Gnuplot). This was fixed when present, so that no residual Gnuplot-related files are present in the run directory after calling these scripts.A new auxiliary
replace_linkshas been added, which recursively replaces all symbolic links in a specified directory (and subdirectories) with the real file or folder to which they are linked, keeping the same name of the original link. Especially useful when one wants to transfer a run and/or baserun directory to a new cluster/computer/environment. I think some similar script was already present, but the advantage of this is that it performs the operation fully automatically on all found links.