# plotting TIE-GCM netcdf output

**URL:** https://discourse.paraview.org/t/plotting-tie-gcm-netcdf-output/3946
**Category:** ParaView Support
**Created:** [April 2, 2020, 1:37pm UTC](https://discourse.paraview.org/t/plotting-tie-gcm-netcdf-output/3946 "2020-04-02T13:37:52Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![rainbowsend](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/e8c25b/32.png) [@rainbowsend](https://discourse.paraview.org/u/rainbowsend)
#### Post date: [April 2, 2020, 1:37pm UTC](https://discourse.paraview.org/t/plotting-tie-gcm-netcdf-output/3946/1 "2020-04-02T13:37:52Z")

</div>

Hi all,

I am new to Para View, and this forum. I have already done the first quarter of the tutorial and tried to find some answers in the Internet but I was not very successful. I am using Para View 5.8.0 on Manjaro Kyria 19.0.2.

I want to plot the output of the NCAR [TIE-GCM](https://www.hao.ucar.edu/modeling/tgcm/tie.php) (Thermosphere-Ionosphere-Electrodynamics General Circulation Model).

The output is saved in netCDF files following the CF-Conventions (CF-1.0). The fields are given on spherical coordinates: latitude, longitude and pressure scale height as vertical component. When choosing 5 degree resolution the netcdf file has the following entries (extract):

```
dimensions:
    time = UNLIMITED; // (4 currently)
    lon = 72;
    lat = 36;
    ilev = 29;
variables:
    double time(time=4);
        :long_name = "time";
        :units = "minutes since 2004-3-20 0:0:0";
        :initial_year = 2004; // int
        :initial_day = 80; // int
        :initial_mtime = 80, 0, 0; // int
    double lon(lon=72);
        :long_name = "geographic longitude (-west, +east)";
        :units = "degrees_east";
        :standard_name = "longitude";
    double lat(lat=36);
        :long_name = "geographic latitude (-south, +north)";
        :units = "degrees_north";
        :standard_name = "latitude";
    double ilev(ilev=29);
        :long_name = "interface levels";
        :short_name = "ln(p0/p)";
        :units = "";
        :positive = "up";
        :standard_name = "atmosphere_ln_pressure_coordinate";
        :formula_terms = "p0: p0 lev: ilev";
        :formula = "p(k) = p0 * exp(-ilev(k))";
        :computed_standard_name = "air_pressure";
    float NE(time=4, ilev=29, lat=36, lon=72);
        :long_name = "ELECTRON DENSITY";
        :units = "cm-3";
        :missing_value = 1.0E36; // double
    float ZG(time=4, ilev=29, lat=36, lon=72);
        :long_name = "Geometric Height ZG";
        :units = "cm";
        :missing_value = 1.0E36; // double

```

I have successfully opened a corresponding dataset using the ‘NetCDF Reader’, but I have some questions

1. **Representation**  
If I choose ‘outline’ the boundary is a semicircle. I would expect a sphere  

2. **Vertical Coordinate**  
I would like to use the geometric height (field ZG ) as vertical coordinate instead of the pressure scale height. There is the filter ‘Warp by Vector’ which probably can do this. But ZG is a 4D scalar field and not a vector field. Of course I can compute the cartesian coordinates from ZG, latitude and longitude, and include them in the netcdf file, but Para View can not open 5D variables (lat,lon,time,ilev,dim vector). I get the error message:

I have tried ‘Warp by Scalar’ but all points are then shifted a long the the same axis.

So is there a way to use the geometric coordinates using Para View?

1. **Contour**  
After applying the ‘Cell Data to Point Data Filter’ it is possible to use the contour filter.  
But I get the following error message:

Are there other ways to solve these problems, e.g., converting the netcdf file to a different format?

Thanks a lot for your help!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 6, 2020, 8:08am UTC](https://discourse.paraview.org/t/plotting-tie-gcm-netcdf-output/3946/2 "2020-04-06T08:08:26Z")

</div>

please share your file.

---

<div class="post-metadata">

### Author: ![rainbowsend](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/e8c25b/32.png) [@rainbowsend](https://discourse.paraview.org/u/rainbowsend)
#### Post date: [April 6, 2020, 8:12am UTC](https://discourse.paraview.org/t/plotting-tie-gcm-netcdf-output/3946/3 "2020-04-06T08:12:40Z")

</div>

Sorry, I forget to include the file. You can download it here:  
[https://uni-bonn.sciebo.de/s/WBBtavjODIDnKoe](https://uni-bonn.sciebo.de/s/WBBtavjODIDnKoe)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 6, 2020, 8:35am UTC](https://discourse.paraview.org/t/plotting-tie-gcm-netcdf-output/3946/4 "2020-04-06T08:35:40Z")

</div>

> If I choose ‘outline’ the boundary is a semicircle. I would expect a sphere

This is how curvilinear grid outline is represented in ParaView.

> When changing the representation to ‘points’, only a slice of all internal points is shown. Why are not all points plotted?

Only the point on the “surface” are reoresented, it is kinda breaking up for curvilinear grid though.

> But ZG is a 4D scalar field and not a vector field.

Use calculator filter to create a 3D vector.

> After applying the ‘Cell Data to Point Data Filter’ it is possible to use the contour filter. But I get the following error message:

Looks like a bug with curvilinear grid and contour filter. The results still seems correct though.

In any case, you can convert your dataset to unstructured grid by using a AppendDataset filter.

---

<div class="post-metadata">

### Author: ![rainbowsend](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/e8c25b/32.png) [@rainbowsend](https://discourse.paraview.org/u/rainbowsend)
#### Post date: [April 6, 2020, 10:09am UTC](https://discourse.paraview.org/t/plotting-tie-gcm-netcdf-output/3946/5 "2020-04-06T10:09:26Z")

</div>

Thanks for your help!

I explain my pipeline here in more detail for other potential users:

1. Load TIE-GCM history file using the ‘NetCDF Reader’.
2. Apply the `Append Datasets` Filter to use unstructured grid representation
3. Apply the `Cell Data to Point Data` Filter
4. Apply the `Calculator` Filter to compute a height vector  
Result Array Name: height  
`ZG/100000*norm(coords)`  
divide by 100000 to get result in km
5. Apply the `Warp by Vector` Filter  
In Properties select ‘height’ in the Vectors drop-down list

The result looks as follows:

 ![tgcm6](https://discourse.paraview.org/uploads/default/original/2X/a/ad6056bdc0daf4936168cee6e10e2cbfb6aef807.png)
