metno / fimex

File Interpolation, Manipulation and EXtraction
Other
24 stars 16 forks source link

Strange INFO in fortran fimex #17

Closed heikoklein closed 3 years ago

heikoklein commented 4 years ago

Hi, while using the fimex fortran module, I get a strange log-message:

INFO fimex.CF1_xCoordSysBuilder : formula_term surface_air_pressure missing time in cs CF-1.X:hybrid in /build/fimex-1.4-1.4.1/src/coordSys/CF1_xCoordSysBuilder.cc at line 256

The input-data is a meps_det_2_5km_20200318T06Z.ncml (varying date) from https://thredds.met.no/thredds/catalog/mepslatest/catalog.html. The input coordinate systems are:

input CoordinateSystems: 5: CF-1.X=height0:Height,time:Time,x:GeoX,y:GeoY,latitude:Lat,longitude:Lon;lambert_conformal_conic:proj4=+proj=lcc +lat_0=63.3 +lon_0=15 +lat_1=63.3 +lat_2=63.3 +no_defs +R=6.371e+06;latitude_of_projection_origin=63.3;longitude_of_central_meridian=15;standard_parallel=63.3 63.3;grid_mapping_name=lambert_conformal_conic;earth_radius=6371000;;simpleSpatialGrid;height(h=height0) 
 CF-1.X=height7:Height,time:Time,x:GeoX,y:GeoY,latitude:Lat,longitude:Lon;lambert_conformal_conic:proj4=+proj=lcc +lat_0=63.3 +lon_0=15 +lat_1=63.3 +lat_2=63.3 +no_defs +R=6.371e+06;latitude_of_projection_origin=63.3;longitude_of_central_meridian=15;standard_parallel=63.3 63.3;grid_mapping_name=lambert_conformal_conic;earth_radius=6371000;;simpleSpatialGrid;height(h=height7) 
 CF-1.X=height_above_msl:Height,time:Time,x:GeoX,y:GeoY,latitude:Lat,longitude:Lon;lambert_conformal_conic:proj4=+proj=lcc +lat_0=63.3 +lon_0=15 +lat_1=63.3 +lat_2=63.3 +no_defs +R=6.371e+06;latitude_of_projection_origin=63.3;longitude_of_central_meridian=15;standard_parallel=63.3 63.3;grid_mapping_name=lambert_conformal_conic;earth_radius=6371000;;simpleSpatialGrid;height(h=height_above_msl) 
 CF-1.X=hybrid:GeoZ 
 CF-1.X=hybrid:GeoZ,time:Time,x:GeoX,y:GeoY,latitude:Lat,longitude:Lon;lambert_conformal_conic:proj4=+proj=lcc +lat_0=63.3 +lon_0=15 +lat_1=63.3 +lat_2=63.3 +no_defs +R=6.371e+06;latitude_of_projection_origin=63.3;longitude_of_central_meridian=15;standard_parallel=63.3 63.3;grid_mapping_name=lambert_conformal_conic;earth_radius=6371000;;simpleSpatialGrid;atmosphere_hybrid_sigma_pressure_coordinate_1(ap=ap,b=b,ps=surface_air_pressure,p0=p0)

The hybrid-axis is a coordinate-axis and is properly defined as far as I can see:

        double hybrid(hybrid) ;
                hybrid:standard_name = "atmosphere_hybrid_sigma_pressure_coordinate" ;
                hybrid:formula = "p(n,k,j,i) = ap(k) + b(k)*ps(n,j,i)" ;
                hybrid:formula_terms = "ap: ap b: b ps: surface_air_pressure p0: p0" ;
                hybrid:long_name = "atmosphere_hybrid_sigma_pressure_coordinate" ;
                hybrid:positive = "down" ;
        double p0 ;
                p0:units = "Pa" ;
        double ap(hybrid) ;
                ap:units = "Pa" ;
        double b(hybrid) ;
                b:units = "1" ;

The INFO line should not appear, or it should be possible to disable the INFO-log messages from fortran.

heikoklein commented 4 years ago

Forgot to mention: surface_air_pressure is time-dependend

        float surface_air_pressure(time, height0, y, x) ;
                surface_air_pressure:_FillValue = 9.96921e+36f ;
                surface_air_pressure:long_name = "Surface air pressure" ;
                surface_air_pressure:standard_name = "surface_air_pressure" ;
                surface_air_pressure:units = "Pa" ;
                surface_air_pressure:grid_mapping = "projection_lambert" ;
                surface_air_pressure:coordinates = "longitude latitude" ;
alexander-buerger-met-no commented 4 years ago

This is a bit strange, yes. The coordinate system CF-1.X=hybrid:GeoZ is missing the time axis, so it is not valid. I am not sure why this it is identified as a coordinate system. This is probably a problem in CF1_xCoordSysBuilder::listCoordinateSystems but I do not see what is wrong there.

alexander-buerger-met-no commented 3 years ago

With commit 176987124c, the message has DEBUG level in this case (hybrid:GeoZ).