Nous utilisons des cookies pour vous garantir la meilleure expérience sur notre site. Si vous continuez à utiliser ce dernier, nous considèrerons que vous acceptez l'utilisation des cookies. J'ai compris ! ou En savoir plus !.
banniere

Le portail francophone de la géomatique


Toujours pas inscrit ? Mot de passe oublié ?
Nom d'utilisateur    Mot de passe              Toujours pas inscrit ?   Mot de passe oublié ?

Annonce

Printemps des cartes 2024

#1 Wed 12 July 2023 09:58

abeugnon
Juste Inscrit !
Date d'inscription: 11 Jul 2023
Messages: 1

Probl avec fichier NetCDF (Donnees climatiques)

Bonjour,

Je travail sur des données climatiques au format NetCDF et rencontre un probleme lors de l'export de la couche précipitation (ACRR) au format TIFF. En effet, elle ne s'affiche pas bien sur QGIS.

Pour l'export, j'ai utilisé cette fonction:

$ gdal_translate -a_srs "+proj=merc +lat_0=0 +lon_0=0 +lat_ts=15.501 +ellps=WGS84 +datum=WGS84 +units=m +x_0=7081535.135380009 +y_0=-2176795.748351136" -a_ullr -61.3458 16.3161 -61.0175 14.5014 -a_nodata -9999 cumul_antilles_1024-1km-5min_201601010000.nc test_georefbis.tif

Voici des infos du fichier (En bas de page, elles sont plus détaillées) :

Driver: netCDF/Network Common Data Format
Files: cumul_antilles_1024-1km-5min_201601010000.nc
Size is 512, 512
Metadata:
  NC_GLOBAL#contact=radarsmf@texte-a-enlever.sedoo.fr
  NC_GLOBAL#Conventions=CF-1.7
  NC_GLOBAL#crs_proj4_string=+proj=merc +lat_0=0 +lon_0=0 +lat_ts=15.501 +ellps=WGS84 +datum=WGS84 +units=m +x_0=7081535.135380009 +y_0=-2176795.748351136
  NC_GLOBAL#institution=Meteo-France
  NC_GLOBAL#name=Antilles Mosaic of accumulated precipitation during 5min in 1km resolution
  NC_GLOBAL#nw_corner_latitude=20
  NC_GLOBAL#nw_corner_longitude=-66
  NC_GLOBAL#version=CF-1.7
  NC_GLOBAL#x_pixels_number=1024
  NC_GLOBAL#x_resolution_in_m=1000
  NC_GLOBAL#y_pixels_number=1024
  NC_GLOBAL#y_resolution_in_m=1000
Subdatasets:
  SUBDATASET_1_NAME=NETCDF:"cumul_antilles_1024-1km-5min_201601010000.nc":radar_image_time
  SUBDATASET_1_DESC=[1x50] time (64-bit integer)
  SUBDATASET_2_NAME=NETCDF:"cumul_antilles_1024-1km-5min_201601010000.nc":data_mf_products
  SUBDATASET_2_DESC=[1x50] data_mf_products (8-bit character)
  SUBDATASET_3_NAME=NETCDF:"cumul_antilles_1024-1km-5min_201601010000.nc":radar_image_latitude
  SUBDATASET_3_DESC=[1x50] latitude (32-bit floating-point)
  SUBDATASET_4_NAME=NETCDF:"cumul_antilles_1024-1km-5min_201601010000.nc":radar_image_longitude
  SUBDATASET_4_DESC=[1x50] longitude (32-bit floating-point)
  SUBDATASET_5_NAME=NETCDF:"cumul_antilles_1024-1km-5min_201601010000.nc":radar_image_wmoid
  SUBDATASET_5_DESC=[1x50] radar_image_wmoid (32-bit integer)
  SUBDATASET_6_NAME=NETCDF:"cumul_antilles_1024-1km-5min_201601010000.nc":radar_image_name
  SUBDATASET_6_DESC=[1x50x50] radar_image_name (8-bit character)
  SUBDATASET_7_NAME=NETCDF:"cumul_antilles_1024-1km-5min_201601010000.nc":ACRR
  SUBDATASET_7_DESC=[1x1024x1024] ACRR (32-bit integer)
  SUBDATASET_8_NAME=NETCDF:"cumul_antilles_1024-1km-5min_201601010000.nc":QUALITY
  SUBDATASET_8_DESC=[1x1024x1024] QUALITY (32-bit integer)
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,  512.0)
Upper Right (  512.0,    0.0)
Lower Right (  512.0,  512.0)
Center      (  256.0,  256.0)



Les variables radar_image_latitude et radar_image_longitude sont des matrice de 1*50 avec seulement les deux premiere observations de remplie le reste c'est des NA's

Il y a un grid_map en coordonnées cartésiènnes aussi.

Le fichier s'affiche bien sur panoply, il n'est donc pas corompue.

Comment puis-je faire ? (Pour info je code en R, python et un peux sur linux avec CDO, GDAL ...)
MERCI !

netcdf cumul_antilles_1024-1km-5min_201601010000 {
dimensions:
        time = 1 ;
        radar_image = 50 ;
        X = 1024 ;
        Y = 1024 ;
        string_length = 50 ;
variables:
        int64 radar_image_time(time, radar_image) ;
                radar_image_time:long_name = "Time of local image included in mosaic" ;
                radar_image_time:missing_value = -999 ;
                radar_image_time:standard_name = "time" ;
                radar_image_time:units = "seconds since 1970-01-01T00:00:00Z" ;
        int64 time(time) ;
                time:calendar = "gregorian" ;
                time:standard_name = "time" ;
                time:units = "seconds since 1970-01-01T00:00:00Z" ;
        int64 time_coverage_end(time) ;
                time_coverage_end:long_name = "Data period end in UTC time" ;
                time_coverage_end:standard_name = "time" ;
                time_coverage_end:units = "seconds since 1970-01-01T00:00:00Z" ;
        int64 time_coverage_start(time) ;
                time_coverage_start:long_name = "Data period start in UTC time" ;
                time_coverage_start:standard_name = "time" ;
                time_coverage_start:units = "seconds since 1970-01-01T00:00:00Z" ;
        int grid_mapping ;
                grid_mapping:grid_mapping_name = "mercator" ;
                grid_mapping:units = "m" ;
                grid_mapping:longitude_of_projection_origin = 0. ;
                grid_mapping:latitude_of_projection_origin = 0. ;
                grid_mapping:standard_parallel = 15.501 ;
                grid_mapping:false_easting = 7081535.13538001 ;
                grid_mapping:false_northing = -2176795.74835114 ;
        int X(X) ;
                X:long_name = "X coordinate of cartesian grid" ;
                X:units = "m" ;
                X:standard_name = "projection_x_coordinate" ;
        int Y(Y) ;
                Y:long_name = "Y coordinate of cartesian grid" ;
                Y:units = "m" ;
                Y:standard_name = "projection_y_coordinate" ;
        char data_mf_products(time, string_length) ;
                data_mf_products:long_name = "Meteo-France products used to get parameters data. Empty or null if product is not already added" ;
        float radar_image_latitude(time, radar_image) ;
                radar_image_latitude:long_name = "Radar latitude of local image included in mosaic" ;
                radar_image_latitude:units = "degrees_north" ;
                radar_image_latitude:standard_name = "latitude" ;
                radar_image_latitude:missing_value = -999.f ;
        float radar_image_longitude(time, radar_image) ;
radar_image_longitude:long_name = "Radar longitude of local image included in mosaic" ;
                radar_image_longitude:units = "degrees_east" ;
                radar_image_longitude:standard_name = "longitude" ;
                radar_image_longitude:missing_value = -999.f ;
        int radar_image_wmoid(time, radar_image) ;
                radar_image_wmoid:long_name = "Radar WMO id of local image included in mosaic" ;
                radar_image_wmoid:missing_value = -999 ;
        char radar_image_name(time, radar_image, string_length) ;
                radar_image_name:long_name = "Radar name of local image included in mosaic" ;
        int ACRR(time, X, Y) ;
                ACRR:units = "1/100 mm" ;
                ACRR:long_name = "Accumulated precipitation" ;
                ACRR:missing_value = 65535 ;
                ACRR:grid_mapping = "grid_mapping" ;
        int QUALITY(time, X, Y) ;
                QUALITY:units = "percents" ;
                QUALITY:long_name = "Data quality of mosaic pixels" ;
                QUALITY:missing_value = 255 ;
                QUALITY:grid_mapping = "grid_mapping" ;

// global attributes:
                :contact = "radarsmf@texte-a-enlever.sedoo.fr" ;
                :institution = "Meteo-France" ;
                :name = "Antilles Mosaic of accumulated precipitation during 5min in 1km resolution" ;
                :Conventions = "CF-1.7" ;
                :version = "CF-1.7" ;
                :crs_proj4_string = "+proj=merc +lat_0=0 +lon_0=0 +lat_ts=15.501 +ellps=WGS84 +datum=WGS84 +units=m +x_0=7081535.135380009 +y_0=-2176795.748351136" ;
                :nw_corner_latitude = 20. ;
                :nw_corner_longitude = -66. ;
                :x_pixels_number = 1024 ;
                :x_resolution_in_m = 1000. ;
                :y_pixels_number = 1024 ;
                :y_resolution_in_m = 1000. ;
}
(END)

Hors ligne

 

Pied de page des forums

Powered by FluxBB