Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ferret issue with grid. #1996

Open
meenakshisreejith opened this issue Apr 4, 2023 · 2 comments
Open

Ferret issue with grid. #1996

meenakshisreejith opened this issue Apr 4, 2023 · 2 comments

Comments

@meenakshisreejith
Copy link

I have a NetCDF file with temperature variable. In this file the latitude and longitude are separate variable and not associated to the variable temperature as it should be. SO when I open the file in ferret, the latitude and longitude is read as number instead of coordinates. Can you please help me in defining an axis for the temperature variable?

etcdf sstMPI {
dimensions:
time = UNLIMITED ; // (12784 currently)
bnds = 2 ;
i = 802 ;
j = 404 ;
vertices = 4 ;
variables:
double time(time) ;
time:standard_name = "time" ;
time:long_name = "time" ;
time:bounds = "time_bnds" ;
time:units = "days since 1850-1-1 00:00:00" ;
time:calendar = "proleptic_gregorian" ;
time:axis = "T" ;
double time_bnds(time, bnds) ;
double longitude(j, i) ;
longitude:standard_name = "longitude" ;
longitude:long_name = "longitude" ;
longitude:units = "degrees_east" ;
longitude:_CoordinateAxisType = "Lon" ;
longitude:bounds = "longitude_bnds" ;
double longitude_bnds(j, i, vertices) ;
double latitude(j, i) ;
latitude:standard_name = "latitude" ;
latitude:long_name = "latitude" ;
latitude:units = "degrees_north" ;
latitude:_CoordinateAxisType = "Lat" ;
latitude:bounds = "latitude_bnds" ;
double latitude_bnds(j, i, vertices) ;
int i(i) ;
i:standard_name = "projection_x_coordinate" ;
i:long_name = "cell index along first dimension" ;
i:units = "1" ;
i:axis = "X" ;
int j(j) ;
j:standard_name = "projection_y_coordinate" ;
j:long_name = "cell index along second dimension" ;
j:units = "1" ;
j:axis = "Y" ;
float tos(time, j, i) ;
tos:standard_name = "sea_surface_temperature" ;
tos:long_name = "Sea Surface Temperature" ;
tos:units = "degC" ;
tos:coordinates = "latitude longitude" ;
tos:_FillValue = 1.e+20f ;
tos:missing_value = 1.e+20f ;
tos:comment = "Temperature of upper boundary of the liquid ocean, including temperatures below sea-ice and floating ice shelves." ;
tos:original_name = "tos" ;
tos:cell_methods = "area: mean where sea time: mean" ;
tos:cell_measures = "area: areacello" ;
tos:history = "2019-08-25T07:24:50Z altered by CMOR: replaced missing value flag (-9e+33) and corresponding data with standard missing value (1e+20)." ;

// global attributes:
:CDI = "Climate Data Interface version 1.9.9 (https://mpimet.mpg.de/cdi)" ;
:source = "MPI-ESM1.2-HR (2017): \n",
"aerosol: none, prescribed MACv2-SP\n",
"atmos: ECHAM6.3 (spectral T127; 384 x 192 longitude/latitude; 95 levels; top level 0.01 hPa)\n",
"atmosChem: none\n",

@ACManke
Copy link

ACManke commented Apr 4, 2023

This dataset uses Curvilinear Coordinates, documented here:
https://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/working-with-special-data-sets/CURVILINEAR-COORDINATE-DATA

The curvilinear coordinates in this dataset are longitude and latitude. Ferret and PyFerret can work with this type of grid, but only by using some particular forms of the plot commands and some functions that are designed for curvilinear coordinate grids.

Sections 8.8.1 and 8.8.2 contain links to methods for graphics, regridding functions, and functions for sampling data from such grids. Sampling with a single value of x and y would allow you to extract a time series at a single location.

To see the nature of the curvilinear coordinates in your file, try these commands:

   yes? shade longitude

   yes? shade latitude

Also, compare the following two plots. In the first, the axes will be labeled with x and y instead of longitude and latitude.

   yes? shade/L=1 tos

   yes? shade/L=1 tos, longitude, latitude

@meenakshisreejith
Copy link
Author

Thank you Maam. It worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants