[ncl-talk] Defining an arbitrary variable that holds no data

Greg Deemer greg.deemer at nsidc.org
Thu Aug 18 17:31:27 MDT 2016


NCL Talk, 

I’m wanting to define and write a variable that holds attributes about my dataset projection. An example of the CF conventions for defining the latitude and longitude on a spherical Earth following section 5.6 in the CF metadata conventions handbook is as follows:

**********************
	
		
		
	
	
		
			
				
					dimensions:
      lat = 18 ;
      lon = 36 ;

					    variables:
      double lat(lat) ;
      double lon(lon) ;
      float temp(lat, lon) ;

					        temp:long_name = "temperature" ;
        temp:units = "K" ;
        temp:grid_mapping = "crs" ;

					      int crs ;
        crs:grid_mapping_name = "latitude_longitude";
        crs:longitude_of_prime_meridian = 0.0 ;
        crs:semi_major_axis = 6378137.0 ;
        crs:inverse_flattening = 298.257223563;”
***********************

My question is simply: “How do I define crs as int, without assigning values?”

I tried:
Crs = 1, which returns "int crs(ncl3) ;” in the NetCDF header. 
Crs = integer, which returns an error

Thanks,
Greg

				
			
		
	






More information about the ncl-talk mailing list