Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

some problems about SCRIP

zdliu

Member
Hi,I use the SCRIP tool to make the weight file, and it is ok.  But when I use my weight file to convert POP output data to rectilinear lat/lon grids, I find that my rectilinear data does not contain a valid latitude/longitude coordinate array.
It only has some Latitude/Longitude index, which is integer.  It is as following, (my own file:: map_gx3v7_to_1x1d_bilin_da_130318.nc,   gx3v7==>1x1d)
========================BEGIN 1============================================
netcdf b.e10.B1850CN.T31_g37.001.pop.h.gx3v7_to_1x1d.bilin.3050 {
dimensions:
        time = UNLIMITED ; // (1 currently)
        Y = 180 ;
        X = 360 ;
        z_t = 60 ;
        z_w_top = 60 ;
variables:
        double time(time) ;
                time:calendar = "noleap" ;
                time:bounds = "time_bound" ;
                time:units = "days since 0000-01-01 00:00:00" ;
                time:long_name = "time" ;
        float z_t(z_t) ;
                z_t:valid_max = 537500.f ;
                z_t:valid_min = 500.f ;
                z_t:positive = "down" ;
                z_t:units = "centimeters" ;
                z_t:long_name = "depth from surface to midpoint of layer" ;
        int Y(Y) ;
                Y:long_name = "Latitude index" ;
        int X(X) ;
                X:long_name = "Longitude index" ;
        float TEMP(time, z_t, Y, X) ;
                TEMP:spatial_op = "Bilinear remapping: 1st order: destarea: NCL: ./map_gx3v7_to_1x1d_bilin_da_130318.nc" ;
                TEMP:missing_value = 9.96921e+36f ;
                TEMP:cell_methods = "time: mean" ;
                TEMP:grid_loc = "3111" ;
                TEMP:coordinates = "TLONG TLAT z_t time" ;
                TEMP:units = "degC" ;
                TEMP:long_name = "Potential Temperature" ;
                TEMP:_FillValue = 9.96921e+36f ;and so on.......................
==========================END 1=========================================

If  I use the official weight file(i.e,map_gx3v7_to_1x1d_bilin_da_100928.nc), the result looks well.
For example: gx3v7==>1x1d
========================BEGIN 2============================================
netcdf b.e10.B1850CN.T31_g37.001.pop.h.example.regrid {
dimensions:
        time = UNLIMITED ; // (1 currently)
        z_t = 60 ;
        lat = 180 ;
        lon = 360 ;
variables:
        double time(time) ;
                time:long_name = "time" ;
                time:units = "days since 0000-01-01 00:00:00" ;
                time:bounds = "time_bound" ;
                time:calendar = "noleap" ;
        float z_t(z_t) ;
                z_t:long_name = "depth from surface to midpoint of layer" ;
                z_t:units = "centimeters" ;
                z_t:positive = "down" ;
                z_t:valid_min = 500.f ;
                z_t:valid_max = 537500.f ;
        float lat(lat) ;
                lat:long_name = "latitude" ;
                lat:units = "degrees_north" ;
        float lon(lon) ;
                lon:long_name = "longitude" ;
                lon:units = "degrees_east" ;
        float TEMP(time, z_t, lat, lon) ;
                TEMP:_FillValue = 9.96921e+36f ;
                TEMP:long_name = "Potential Temperature" ;
                TEMP:units = "degC" ;
                TEMP:coordinates = "TLONG TLAT z_t time" ;
                TEMP:grid_loc = "3111" ;
                TEMP:cell_methods = "time: mean" ;
                TEMP:missing_value = 9.96921e+36f ;
                TEMP:spatial_op = "Bilinear remapping: 1st order: destarea: NCL: ./map_gx3v7_to_1x1d_bilin_da_100928.nc" ;

and so on.......................
==========================END 2=========================================

So when I use NCL, it has some errors :
========================BEGIN 3============================================
(0)     
(0)    check_for_y_lat_coord: Warning: Data either does not contain a valid latitude coordinate array or doesn't contain one at all.
(0)    A valid latitude coordinate array should have a 'units' attribute equal to one of the following values:
(0)        'degrees_north' 'degrees-north' 'degree_north' 'degrees north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'
(0)    check_for_lon_coord: Warning: Data either does not contain a valid longitude coordinate array or doesn't contain one at all.
(0)    A valid longitude coordinate array should have a 'units' attribute equal to one of the following values:
(0)        'degrees_east' 'degrees-east' 'degree_east' 'degrees east' 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'

==========================END 3=========================================


So why my weight file is not correct?
Below is my "scrip_in" file, and grid1_file and grid2_file are made by "convertPOPT.f" and "create_latlon.f" separately.
========================BEGIN 4============================================
cat >! scrip_in
 
Top