[Thread Prev][Thread Next][Index]

[ferret_users] spatial regridding with a twist



Hello,


I have two spatial data sets NDVI and Precipitation (P)


P is on a Mercator projection and NDVI on a lat, lon grid.

I would like to have them both on a simple lat, lon grid.


I guess, I need to regrid P on a lat, lon grid and then regrid NDVI on the same grid.


Problem is that I do not know how to get P off the Mercator projection.... 

any suggestions?


Below is how P comes up in ferret and the netcdf information from opening the file in R. Weirdly ncdump did not read the precipitation file. FInally at the bottom the header of the netcdf file for NDVI


I can do a 

shade DAILY_RAINFALL[l=1],lon,lat 


and I get P mapped on a lat, lon map, but as the dimensions for P are actually "projection_y_coordinate" and "        projection_x_coordinate" given meters I don't quite know how to get the variable onto a lat lon grid.


THank you for all your thoughts,

best,

Joerg




yes? use ukcp09_gridded-land-obs-daily_5km_rainfall_19820101-19821231.nc
yes? show data
     currently SET data sets:
    1> ./ukcp09_gridded-land-obs-daily_5km_rainfall_19820101-19821231.nc  (default)
 name     title                             I         J         K         L
 DAILY_RAINFALL
          Daily precipitation amount       1:180     1:290     ...       1:365
 TRANSVERSE_MERCATOR
                                           ...       ...       ...       ...
 LAT                                       1:180     1:290     ...       ...
 LON                                       1:180     1:290     ...       ...
 


(R) ukcp09_gridded-land-obs-daily_5km_rainfall_19820101-19821231.nc (NC_FORMAT_NETCDF4):

7 variables (excluding dimension variables):
        double daily_rainfall[projection_x_coordinate,projection_y_coordinate,time]   (Contiguous storage)  
            _FillValue: 1e+20
            standard_name: lwe_thickness_of_precipitation_amount
            long_name: Daily precipitation amount
            units: mm
            cell_methods: time: sum
            grid_mapping: transverse_mercator
            coordinates: lat lon
        int transverse_mercator[]   (Contiguous storage)  
            grid_mapping_name: transverse_mercator
            longitude_of_prime_meridian: 0
            semi_major_axis: 6377563.396
            semi_minor_axis: 6356256.909
            longitude_of_central_meridian: -2
            latitude_of_projection_origin: 49
            false_easting: 4e+05
            false_northing: -1e+05
            scale_factor_at_central_meridian: 0.9996012717
        double time_bnds[bnds,time]   (Contiguous storage)  
        double projection_y_coordinate_bnds[bnds,projection_y_coordinate]   (Contiguous storage)  
        double projection_x_coordinate_bnds[bnds,projection_x_coordinate]   (Contiguous storage)  
        double lat[projection_x_coordinate,projection_y_coordinate]   (Contiguous storage)  
            units: degrees_north
            standard_name: latitude
        double lon[projection_x_coordinate,projection_y_coordinate]   (Contiguous storage)  
            units: degrees_east
            standard_name: longitude

     4 dimensions:
        time  Size:365
            axis: T
            bounds: time_bnds
            units: hours since 1800-01-01 00:00:00
            standard_name: time
            calendar: standard
        projection_y_coordinate  Size:290
            axis: Y
            bounds: projection_y_coordinate_bnds
            units: m
            standard_name: projection_y_coordinate
        projection_x_coordinate  Size:180
            axis: X
            bounds: projection_x_coordinate_bnds
            units: m
            standard_name: projection_x_coordinate
        bnds  Size:2





netcdf ndvitest {
dimensions:
LON2017_2196 = 180 ;
LAT1657_1836 = 180 ;
TIME1 = 12 ;

variables:
double LON2017_2196(LON2017_2196) ;
LON2017_2196:point_spacing = "even" ;
LON2017_2196:axis = "X" ;
LON2017_2196:standard_name = "longitude" ;
double LAT1657_1836(LAT1657_1836) ;
LAT1657_1836:point_spacing = "even" ;
LAT1657_1836:axis = "Y" ;
LAT1657_1836:standard_name = "latitude" ;
double TIME1(TIME1) ;
TIME1:point_spacing = "even" ;
TIME1:axis = "Z" ;
TIME1:standard_name = "altitude" ;
short NDVI(TIME1, LAT1657_1836, LON2017_2196) ;
NDVI:missing_value = -5000s ;
NDVI:_FillValue = -5000s ;
NDVI:units = "1" ;
NDVI:long_name = "NDVI" ;
NDVI:history = "From ndvi3g_geo_v1_1982_0106.nc4" ;

// global attributes:
:history = "PyFerret V7.1 (optimized) 20-Nov-18" ;
:Conventions = "CF-1.6" ;


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement