Commit 8d0a5abc authored by Florian Ziemen's avatar Florian Ziemen
Browse files

2021 overhaul of the PalMod example

parent 55196df1
Pipeline #10607 passed with stages
in 12 seconds
......@@ -3,6 +3,18 @@
Hack the color map:
==============================
.. note::
This document is part of a series teaching how to :ref:`create-palmod-combined`.
:ref:`save-colormap-preset`
Export the color map
.. image:: export-veget.png
:download:`Download the raw color map here<vrm-green-for-edit.json>`
Open the color map in the text editor. In the head edit as indicated, **but don't leave the comments indicated with #**::
[
......@@ -20,13 +32,29 @@ Open the color map in the text editor. In the head edit as indicated, **but don'
0.5,
0.0
],
"RGBPoints" :
[
0.0, # Minimum value, leave as is.
1.0, # Red value for lowest point ; set this to 1.0
1.0, # Green value for lowest point ; set this to 1.0
0.67, # Blue value for lowest point ; set this to 0.67
0.050000000000000044, # data value for next point, leave as is
In the lower part, you will find quads with (data value, R, G, B). To change the maximum of the color map in accordance with the change in the header, edit at the bottom::
In the lower part, you will find quads with (data value, R, G, B). To change the maximum of the color map in accordance with the change in the header, edit at the bottom (basically matching the previous value)::
0.67, # NEW MAXIMUM VALUE
0.054901999999999999, # RED (if you want to change)
0.109804, # GREEN (if you want to change)
0.121569 # BLUE (if you want to change)
0.118, # RED (if you want to change)
0.5, # GREEN (if you want to change)
0.25 # BLUE (if you want to change)
]
}
:download:`Download the edited color map here<vrm-edited.json>`
Save the file, and import the color map again (same menu as exporting, just one above).
(back to :ref:`vegetation-data`)
......@@ -3,6 +3,13 @@
Invert the Colormap
========================================
.. note::
This document is part of a series teaching how to :ref:`create-palmod-combined`
Go to the Colormap editor (``View -> Color Map Editor Window``), and choose the Black and White icon right of the display.
.. image:: invert.png
(Return to :ref:`vegetation-data`)
[
{
"ColorSpace" : "RGB",
"Name" : "rignot-ish-with-white",
"NanColor" :
[
0.50000800000000001,
0.0,
0.0
],
"RGBPoints" :
[
1.5,
0.97999499999999995,
0.97999499999999995,
0.97999499999999995,
3.0,
0.93725499999999995,
0.72548999999999997,
0.73725499999999999,
10.0,
0.90000800000000003,
0.90000800000000003,
0.66999299999999995,
100.0,
0.0,
0.85999800000000004,
0.940002,
200.0,
0.14999599999999999,
0.42999900000000002,
0.689998,
1000.0,
0.82999900000000004,
0.40000000000000002,
0.66999299999999995,
3000.0,
1.0,
0.0,
0.0
]
}
]
[
{
"ColorSpace" : "Lab",
"Name" : "vegetation",
"Points" :
[
0.0,
0.0,
0.5,
0.0,
0.67,
1.0,
0.5,
0.0
],
"RGBPoints" :
[
0.0,
1.0,
1.0,
0.67,
0.050000000000000044,
0.96078399999999997,
0.94901999999999997,
0.67058799999999996,
0.099999999999999978,
0.88627500000000003,
0.92156899999999997,
0.53333299999999995,
0.15000000000000002,
0.78431399999999996,
0.87843099999999996,
0.39607799999999999,
0.19999999999999996,
0.66666700000000001,
0.83921599999999996,
0.29411799999999999,
0.25,
0.556863,
0.80000000000000004,
0.23921600000000001,
0.30000000000000004,
0.43137300000000001,
0.76078400000000002,
0.16078400000000001,
0.34999999999999998,
0.31764700000000001,
0.72156900000000002,
0.11372500000000001,
0.40000000000000002,
0.21176500000000001,
0.67843100000000001,
0.082352999999999996,
0.44999999999999996,
0.109804,
0.63137299999999996,
0.050979999999999998,
0.5,
0.082352999999999996,
0.58823499999999995,
0.082352999999999996,
0.55000000000000004,
0.109804,
0.54901999999999995,
0.15294099999999999,
0.59999999999999998,
0.11372500000000001,
0.52156899999999995,
0.20392199999999999,
0.65000000000000002,
0.117647,
0.49019600000000002,
0.24313699999999999,
0.67,
0.118,
0.5,
0.25
]
}
]
[
{
"ColorSpace" : "Lab",
"Name" : "Preset 3",
"Points" :
[
0.0,
0.0,
0.5,
0.0,
1.0,
1.0,
0.5,
0.0
],
"RGBPoints" :
[
0.0,
1.0,
0.98431400000000002,
0.90196100000000001,
0.050000000000000044,
0.96078399999999997,
0.94901999999999997,
0.67058799999999996,
0.099999999999999978,
0.88627500000000003,
0.92156899999999997,
0.53333299999999995,
0.15000000000000002,
0.78431399999999996,
0.87843099999999996,
0.39607799999999999,
0.19999999999999996,
0.66666700000000001,
0.83921599999999996,
0.29411799999999999,
0.25,
0.556863,
0.80000000000000004,
0.23921600000000001,
0.30000000000000004,
0.43137300000000001,
0.76078400000000002,
0.16078400000000001,
0.34999999999999998,
0.31764700000000001,
0.72156900000000002,
0.11372500000000001,
0.40000000000000002,
0.21176500000000001,
0.67843100000000001,
0.082352999999999996,
0.44999999999999996,
0.109804,
0.63137299999999996,
0.050979999999999998,
0.5,
0.082352999999999996,
0.58823499999999995,
0.082352999999999996,
0.55000000000000004,
0.109804,
0.54901999999999995,
0.15294099999999999,
0.59999999999999998,
0.11372500000000001,
0.52156899999999995,
0.20392199999999999,
0.65000000000000002,
0.117647,
0.49019600000000002,
0.24313699999999999,
1.0,
0.054901999999999999,
0.109804,
0.121569
]
}
]
......@@ -18,6 +18,12 @@ to
.. note::
You can find a video recording covering this material at https://youtu.be/TCmnBme0OWA?t=2144, and the material at https://github.com/ESiWACE/hpda-vis-training (run the make file of the Training2021/Session2 folder).
You can download all files by::
git clone git@github.com:ESiWACE/hpda-vis-training.git
cd hpda-vis-training/Training2021/Session2/
make
.. note::
Whatever you do with paraview, keep saving state files (``File -> Save State``) (see :ref:`save-state`) at regular intervals. You can additionally :ref:`make-paraview-save-on-quit-or-crash`.
......
......@@ -10,26 +10,26 @@ This example will show how to create an animation based on ocean, vegetation, so
You can download all files by::
git clone git@github.com:ESiWACE/hpda-vis-training.git
cd hpda-vis-training
cd Session4
cd hpda-vis-training/Training2021/Session2/
make
.. image:: combined-image.png
In this example we assume a very basic level of familiarity with Paraview. If you feel lost in between, consider looking at :ref:`create-image-sea-surface-speeds`. This multi-variable visualization requires a substantial amount of :ref:`paraview-palmod-pre-processing`.
In this example we assume a very basic level of familiarity with Paraview. If you feel lost in between, consider looking at :ref:`create-image-sea-surface-speeds`. This multi-variable visualization requires a substantial amount of :ref:`Pre-processing<paraview-palmod-pre-processing>`. We will skip these steps for now, as they are different for any two data sets.
.. toctree::
:maxdepth: 2
:caption: Steps:
:glob:
pre-processing
vegetation-data
load-icebergs
load-rivers
load-ice-sheets
* Repeat the same exercise including :ref:`convert-cell-to-point` for ``vilma_ss_777.nc`` (variable ``topg`` for the topography and ``delta_topg`` for the isolines - copy and paste as appropriate). That should get you isolines on land.
* Also apply the contour to the pure Cell Data to Point Data filter, to get isolines on the ocean.
:download:`Download a complete pvsm state file here.<ice_sheet_complete.pvsm>`
......@@ -2,9 +2,18 @@
Load the ice sheets
==============================
.. note::
This document is part of a series teaching how to :ref:`create-palmod-combined`
* Load the ice sheet data from `pism_NH_777.nc <https://swiftbrowser.dkrz.de/public/dkrz_8656c91ce0734327b6dc867fc5b6b068/ESiWACE2-Public/Paraview%20Sample%20Data/PalMod_example/>`_
* For random reasons, this file already is in point data. Attach a calculator and in the pipeline view select the calculator of the vegetation, copy it, and paste it to the newly created calculator (i.e. copy the settings to the calculator of the ice sheet). Change ``topg`` to ``ice_surf`` in the equation of the calculator.
This file already is in point data (there are no bounds associated with the coordinates), so we don't need a CellData2PointData filter.
* Attach a calculator
* select the calculator of the vegetation in the pipeline view, copy it, and paste it to the newly created calculator (i.e. copy the settings to the calculator of the ice sheet).
* Change ``topg`` to ``ice_surf`` in the equation of the calculator.
.. image:: copy-calculator.png
......@@ -14,3 +23,6 @@ Load the ice sheets
Feel free to repeat the exercise for Antarctica. You might need to :ref:`convert-cell-to-point` before adding the calculator (for whatever reason). Now the isolines are added on the ice, but end at the coast.
(return to :ref:`create-palmod-combined`)
......@@ -8,7 +8,7 @@ Load the iceberg data
surf_fw_out*86400*360
* use a logarithmic color scale with the color map ``Blues``, and set min and max to 0.01 and 1. This should get you to
* use a logarithmic color scale with the color map ``Blues``, invert the color map, and set min and max to 0.01 and 1. This should get you to
.. image::
icebergs-added.png
......
.. _load-rivers:
Load the rivers
===============
.. note::
This document is part of a series teaching how to :ref:`create-palmod-combined`
* Load the river runoff data from `friv_777.nc <https://swiftbrowser.dkrz.de/public/dkrz_8656c91ce0734327b6dc867fc5b6b068/ESiWACE2-Public/Paraview%20Sample%20Data/PalMod_example/>`_
* :ref:`convert-cell-to-point` and :ref:`extrude-land-surface` with the slightly modified equation::
(6371500+.5*(topg+abs(topg))*100)/6371000*(coordsX*iHat+coordsY*jHat+coordsZ*kHat)
putting rivers in ocean areas above sea level, and the rivers clearly above ground.
* Create a monochromatic blue color map with transparency (see :ref:`colormap-transparent-clouds`)
(return to :ref:`create-palmod-combined`)
......@@ -3,6 +3,10 @@
Load the vegetation data
========================================
.. note::
This document is part of a series teaching how to :ref:`create-palmod-combined`.
* Open `veg_ratio_max_nn_777.nc <https://swiftbrowser.dkrz.de/public/dkrz_8656c91ce0734327b6dc867fc5b6b068/ESiWACE2-Public/Paraview%20Sample%20Data/PalMod_example/>`_ ( see :ref:`open-with-cf-reader` for instructions).
* Use the variable ``veg_ratio_max``
* Load the colormap ``Linear Green (GR4l)`` (see :ref:`chose-BuGn`).
......@@ -10,9 +14,9 @@ Load the vegetation data
* For the exact colormap of this example:
* Remove the last points from the colormap (see :ref:`colormap-transparent-clouds` for hints on manipulating a color map).
* Remove all points above 0.65 from the colormap (see :ref:`colormap-transparent-clouds` for hints on manipulating a color map).
* Save the colormap, open it in the text editor, :ref:`hack-colormap` to reset the maximum to .67, save it, and import it again.
* Then set the color values for the minimum and maximum value to 1/1/.67 and .118/.5/.25 respectively (see cloud example). (yes, that's tedious, but it can be done, and this is `a way`).
Your data should look roughly like this:
......@@ -23,3 +27,5 @@ Your data should look roughly like this:
your file should look like this:
.. image:: vegetation-topo.png
(return to :ref:`create-palmod-combined`)
......@@ -19,7 +19,7 @@ Remap your data to the resolution of the topography. Something along the lines o
Make sure the ``Attribute Type`` Setting in your calculator is on ``Point Data``, select ``Coordinate Results``, give your resulting coordinates a reasonable name, and use the equation (assuming your topography variable is called topg and in m, this yields a vertical exaggeration of 100) ::
((1+topg*100/6731000)*(coordsX*iHat+coordsY*jHat+coordsZ*kHat)
(1+topg*100/6731000)*(coordsX*iHat+coordsY*jHat+coordsZ*kHat)
Where the first paren scales the topography to a strong extrusion around a unit sphere, and the second part is the vector from the origin to the current grid point's position. Your topography variable should appear in the ``Scalars`` dropdown menu. If not, go back to :ref:`cell-or-point`.
......@@ -34,3 +34,6 @@ Where the first paren scales the topography to a strong extrusion around a unit
For plane projections (Mercator, Mollweide / ...) use something along the lines of::
(1+topo/20000) * coordsZ*kHat + (coordsX*iHat+coordsY*jHat)
(return to :ref:`vegetation-data`)
......@@ -35,3 +35,6 @@ If you have many arrays in your input data, you might only want to process the d
.. image::
pass-cell.png
(Continue with :ref:`extrude-land-surface`)
......@@ -3,6 +3,8 @@
The NetCDF CF reader
========================================
.. note::
This document is part of a series teaching how to :ref:`create-palmod-combined`
You can use the NetCDF CF reader to load data on regular (and distorted) grids.
......@@ -21,7 +23,7 @@ Issues:
Open a file with the standard NetCDF Reader
============================================
Use ``File->Open`` or the top-left icon (see :ref:`main-screen`), chose the desired file and select ``NetCDF reader`` when prompted.
Use ``File->Open`` or the top-left icon (see :ref:`main-screen`), chose the desired file and select ``NetCDF Reader`` when prompted.
.. image:: chose-reader.png
......@@ -29,3 +31,6 @@ Use ``File->Open`` or the top-left icon (see :ref:`main-screen`), chose the desi
For a spherical projection use ``Spherical Coordinates`` and (for most cases) use ``Replace Fill Value With Nan``
.. image:: spherical-nans.png
(Return to :ref:`vegetation-data`)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment