[gradsusr] reading ASCII data file

Huddleston, John Huddleston at cira.colostate.edu
Tue Sep 21 18:38:03 EDT 2010


Mike

Are you looking for a control file for your netCDF file? If so, we need to know if it is LCC and needs a PDEF statement and all those related geospatial bits of information, and what the degrees are for the 140 and 115 grids respectively, and what is the missing value.

I'm confused about your ASCII file. Is it the same as the netCDF or are you going to use the GrADS binary format. Are you going to plot the ASCII points over the netCDF data?

More information please,

John Huddleston, PhD
Cooperative Institute for Research in the Atmosphere
________________________________________
From: gradsusr-bounces at gradsusr.org [gradsusr-bounces at gradsusr.org] On Behalf Of Michael Rawlins [rawlins02 at yahoo.com]
Sent: Tuesday, September 21, 2010 11:49 AM
To: gradsusr at gradsusr.org
Subject: [gradsusr] reading ASCII data file

I'm new to GrADS. Struggling a bit to read an ASCII file into GrADS. Objective is to make a few maps.  I understand that a descriptor file (.ctl) needs to be set up.  I'm processing several netCDF files using FORTRAN. The resultant file of grids has 16100 records (140 in X, 115 in Y) with columns lon, lat, VAL.  The header file of the netCDF file is below.  I've been thinking that perhaps I would read in the netCDF file so that all attributes are set, then read the ASCII data that I'd processed. But perhaps I would just read in the ASCII data and define attributes using ctl file.  So, give the parameters in the netCDF file, I'm looking for the correct elements of the descriptor file. TIA, Mike

netcdf tas_CRCM_1971010103 {
dimensions:
        xc = 140 ;
        yc = 115 ;
        time = UNLIMITED ; // (14600 currently)
variables:
        double level ;
                level:units = "m" ;
                level:long_name = "height" ;
                level:axis = "Z" ;
                level:positive = "up" ;
                level:coordinate_defines = "point" ;
                level:actual_range = 2.f, 2.f ;
        double yc(yc) ;
                yc:units = "m" ;
                yc:long_name = "y-coordinate of polar_stereographic projection" ;
                yc:standard_name = "projection_y_coordinate" ;
                yc:axis = "Y" ;
                yc:coordinate_defines = "point" ;
                yc:actual_range = 0.f, 5700000.f ;
        double xc(xc) ;
                xc:units = "m" ;
                xc:long_name = "x-coordinate of polar_stereographic projection" ;
                xc:standard_name = "projection_x_coordinate" ;
                xc:axis = "X" ;
                xc:coordinate_defines = "point" ;
                xc:actual_range = 0.f, 6950000.f ;
        double time(time) ;
                time:long_name = "time" ;
                time:calendar = "365_day" ;
                time:standard_name = "time" ;
                time:axis = "T" ;
                time:units = "days since 1968-01-01 00:00:0.0" ;
                time:delta_t = "0000-00-00 03:00:00" ;
                time:coordinate_defines = "point" ;
                time:actual_range = 1095.125f, 2920.f ;
        double lon(yc, xc) ;
                lon:units = "degrees_east" ;
                lon:long_name = "longitude" ;
                lon:standard_name = "longitude" ;
                lon:axis = "X" ;
                lon:actual_range = 199.8962f, 326.4349f ;
        double lat(yc, xc) ;
                lat:units = "degrees_north" ;
                lat:long_name = "latitude" ;
                lat:standard_name = "latitude" ;
                lat:axis = "Y" ;
                lat:actual_range = 20.60496f, 73.2522f ;
        char polar_stereographic ;
                polar_stereographic:straight_vertical_longitude_from_pole = 263. ;
                polar_stereographic:standard_parallel = 60. ;
                polar_stereographic:false_easting = 3450000. ;
                polar_stereographic:false_northing = 7450000. ;
                polar_stereographic:latitude_of_projection_origin = 90. ;
                polar_stereographic:grid_mapping_name = "polar_stereographic" ;
                polar_stereographic:resolution_at_standard_parallel = 50000. ;
                polar_stereographic:earth_radius = 6371000. ;
        float tas(time, yc, xc) ;
                tas:units = "K" ;
                tas:type = "instantaneaous" ;
                tas:long_name = "Surface Air Temperature" ;
                tas:standard_name = "air_temperature" ;
                tas:missing_value = 1.e+20f ;
                tas:_FillValue = 1.e+20f ;
                tas:actual_range = 204.6491f, 327.2802f ;
                tas:add_offset = 0.f ;
                tas:scale_factor = 1.f ;
                tas:coordinates = "lon lat level" ;
                tas:grid_mapping = "polar_stereographic" ;
                tas:level_desc = "2 m" ;
                tas:grid_desc = "polar_stereographic" ;

// global attributes:
                :Conventions = "CF-1.0" ;
                :institution = "Ouranos (Ouranos, Montreal, PQ, Canada)" ;
                :source = "CRCM(2006):atmosphere:CRCMv4.2.0(50km,29levels):sea ice:AMIPII:land:CLASSv2
.7" ;
                :project_id = "NARCCAP" ;
                :realization = "1" ;
                :experiment_id = "1968-2000 climate simulation using CGCM3 member #4 (mc_abv experimen
t)" ;
                :experiment_id2 = "Ouranos operational simulation afv" ;
                :contact1 = "Sebastien Biner" ;
                :contact2 = "biner.sebastien at ouranos.ca" ;
                :contact3 = "550 Sherbrooke Ouest, 19e etage, Montreal, PQ, H3A 1B9, Canada" ;
                :contact4 = "tel : (514)282.6464 poste 263" ;
                :history = "Tue Feb  3 14:36:39 2009: ncrename -a conventions,Conventions tas_CRCM_197
1010103.nc\n",
                        "created 24/04/2004 by Ton Nom (netCDF3.6.1 udunits1.12.4)" ;
                :table_id = "Table 2" ;
}




_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr



More information about the gradsusr mailing list