I wish you a wonderful year 2023.
I would like to point out a problem I am encountering with pyferret (7.5 and 7.63).
I am working with some ocean model outputs from CROCO.
I have extracted one time-step and 100 longitude points of sea surface temperature in the attached file (ENSmean_tropatl_surf_avg_Y2021_temp1.nc).
8.902213, 8.984543, 9.066854, 9.149145, 9.231419, 9.313673, 9.395907,
9.478123, 9.560319, 9.642494, 9.72465, 9.806787, 9.888902, 9.970997,
10.05307 ;
I am just loading the file in Pyferret (7.5 or 7.63) and saving it (no transformation whatsoever):
cancel data/all; cancel var/all
set memory/size=5000; cancel mode upcase
use ENSmean_tropatl_surf_avg_Y2021_temp1.nc
let/title="TEMPf" TEMPf=TEMP
save/clobber/file=ENSmean_tropatl_surf_avg_Y2021_temp1_pyf763.nc TEMPf
In the new file, the latitude axis has been reworked by ferret and now the attributes are:
float eta_rho(eta_rho) ;
eta_rho:long_name = "latitudes rho" ;
eta_rho:units = "degrees_north" ;
eta_rho:point_spacing = "uneven" ;
eta_rho:axis = "Y" ;
eta_rho:standard_name = "latitude" ;
eta_rho:bounds = "eta_rho_bnds" ;
float eta_rho_bnds(eta_rho, bnds) ;
NOTE that the values of the variable eta_rho remain exactly the same as in the original file:
eta_rho = -30, -29.92783, -29.85561, -29.78334, -29.71101, -29.63863,
...
8.902213, 8.984543, 9.066854, 9.149145, 9.231419, 9.313673, 9.395907,
9.478123, 9.560319, 9.642494, 9.72465, 9.806787, 9.888902, 9.970997,
10.05307 ;
---> Surprisingly, when I load the new file in pyferret (7.5 or 7.63) and plot the SST map, the latitude still has 500 points, but extends from 30°S to 6°N... ????
use ENSmean_tropatl_surf_avg_Y2021_temp1_pyf763.nc
shade tempf
---> When I load ENSmean_tropatl_surf_avg_Y2021_temp1_pyf763.nc in old ferret v6.71, the map is correct (from 30°S to ~10°N).
---> If I remove the NetCDF attribute eta_rho_bnds in ENSmean_tropatl_surf_avg_Y2021_temp1_pyf763.nc the the map is correct (from 30°S to ~10°N).
---> If I create the file with ferret v6.71 using the same ferret script (ENSmean_tropatl_surf_avg_Y2021_temp1_f671.nc), the map is correct with ferret, and both versions of Pyferret (7.5 or 7.63).
The latitude is now in double precision, but the attributes seem the same as the pyferret outputs:
double eta_rho(eta_rho) ;
eta_rho:long_name = "latitudes rho" ;
eta_rho:units = "degree_north" ;
eta_rho:point_spacing = "uneven" ;
eta_rho:axis = "Y" ;
eta_rho:bounds = "eta_rho_bnds" ;
double eta_rho_bnds(eta_rho, bnds) ;
Does anyone know what is happening? In the meantime, I will remove the eta_rho_bnds attribute with NCO.
Have a nice day,
Serena
.¸. , . .·´¯`·
><(((º> `·.¸.·´¯`·...¸><(((º>¸.¸. , . .·´¯`· ><(((º> .
`·.¸.·´¯`·...¸><(((º> .
.
Serena ILLIG-THEVENIN LEGOS/IRD .
.
Editorial Board Member for Scientific Reports .
.
14 Av. E. Belin .
31400 Toulouse .
FRANCE .
.
Phone : +33 5 61 33 29 26 .
.
<º)))><..·