Re: Changing netCDF dimensions

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon Feb 04 2013 - 15:30:25 MST

offline: I have taken this data file transfer stuff offline.

Yes ... we can try the dropbox.
         750MB is not that big, out ftp site has lots of space.

I got the othet file.

nrow = 299
ncol = 459

LonLat = asciiread("gridFile.csv",-1,"float")
print(LonLat)

---
Variable: LonLat
Type: float
Total Size: 1097928 bytes
             274482 values
Number of Dimensions: 1
Dimensions and sizes:   [274482]
Coordinates:
Number Of Attributes: 1
   _FillValue :  9.96921e+36
(0)     -121.0211
(1)     21.62412
(2)     -121.0503
(3)     21.7244
[SNIP]
---
       ; reshape to 2D
lon2d = onedtond(LonLat( ::2), (/nrow,ncol/))  ; 0,2,4,...
lat2d = onedtond(LonLat(1::2), (/nrow,ncol/))  ; 1,3,5,...
---
On 02/04/2013 02:19 PM, Travis, Katherine wrote:
> Dennis,
> I got the gridFile.csv to work, but not the emisŠ.nc file.
> It keeps saying cannot create file.  It is 750MB, is there enough space
> for it?
> If not, may I put it on dropbox and share it with you?
> ~Katie
>
> On 2/4/13 3:12 PM, "Dennis Shea" <shea@ucar.edu> wrote:
>
>> Our systems people say that the ftp is working on our end.
>>
>> Did you remember to
>>
>>     cd incoming
>>
>> prior to the 'put' command?
>>
>> =========================================
>>
>>
>>
>> On 02/04/2013 12:46 PM, Travis, Katherine wrote:
>>> Dennis,
>>> I have attempted to put both files on the ftp site, with no luck.  I get
>>> the following error:
>>>
>>> ftp> put
>>>
>>> /Users/ktravis/Desktop/NEI06_ModelReady/emis_mole_all_20061231_12US1_cmaq
>>> _c
>>> b05_soa_E21_2007ed_06.nc
>>> local:
>>>
>>> /Users/ktravis/Desktop/NEI06_ModelReady/emis_mole_all_20061231_12US1_cmaq
>>> _c
>>> b05_soa_E21_2007ed_06.nc remote:
>>>
>>> /Users/ktravis/Desktop/NEI06_ModelReady/emis_mole_all_20061231_12US1_cmaq
>>> _c
>>> b05_soa_E21_2007ed_06.nc
>>>
>>> 229 Entering Extended Passive Mode (|||49152|).
>>> 553 Could not create file.
>>>
>>> ftp> put /Users/ktravis/Desktop/NEIData/gridFile.csv
>>> local: /Users/ktravis/Desktop/NEIData/gridFile.csv remote:
>>> /Users/ktravis/Desktop/NEIData/gridFile.csv
>>>
>>> 229 Entering Extended Passive Mode (|||49174|).
>>> 553 Could not create file.
>>>
>>>
>>> I think my last answer was cut off:
>>> [3] I am just starting to learn NCL and NCO, so I am not yet familiar.
>>> I have been working in R until this point.
>>>
>>>
>>> I just downloaded NCO and am working on trying it out.
>>> Thank you!
>>> ~Katie
>>>
>>> On 2/4/13 12:59 PM, "Dennis Shea" <shea@ucar.edu> wrote:
>>>
>>>> Hi Katherine.
>>>>
>>>> Rather unusual looking dump .... This looks like
>>>> fortran array ordering (ie, column major). I say this cuz
>>>> the TSTEP is the rightmost dimension which is the slowest
>>>> varying in fortran *and* it is unlimited. The netCDF
>>>> software requires that the unlimited dimension be the
>>>> slowest varying.
>>>>
>>>> Also, you did not answer ... Are you familiar with the
>>>> netCDF operators and have available: ncks
>>>>
>>>> If you are not and you are going to deal with netCDF on a regular
>>>> basis, I suggest you (or a system person) download and install
>>>> these tools. They are not associated with NCL but in data processing
>>>> you will likely have to use multiple tools.
>>>>
>>>> ---
>>>> You can sent the two files to
>>>>
>>>> ftp ftp.cgd.ucar.edu
>>>> anonymous
>>>> email
>>>> cd incoming
>>>> put emis_mole_all_20061231_12US1_cmaq_cb05_soa_E21_2007ed_06.nc
>>>> put ... the 2nd file with coordinate info ...
>>>> quit
>>>>
>>>> after you have successfuly completed the transfer,
>>>> send me or, better', ncl-talk@ucar.edu [don't cc me]
>>>> that you have completed the transfer.
>>>> ---
>>>>
>>>> We are asking that people respond only to ncl-talk (no personal cc).
>>>> We all see the responses but we want to separate NCL
>>>> related correspondence form other email.  Many of us that
>>>> respond on ncl-talk are not paid by the NCL project, we do it
>>>> cuz we want to help people.
>>>>
>>>> Regards
>>>> D
>>>>
>>>> On 02/04/2013 10:37 AM, Travis, Katherine wrote:
>>>>> Dennis,
>>>>> Thanks! I deleted most of the variables since there are 56, but here
>>>>> is
>>>>> everything else that comes out.
>>>>> [1]
>>>>> 1] "File emis_mole_all_20061231_12US1_cmaq_cb05_soa_E21_2007ed_06.nc
>>>>> (NC_FORMAT_CLASSIC):"
>>>>> [1] ""
>>>>> [1] "     56 variables:"
>>>>> [1] "        int TFLAG[DATE-TIME,VAR,TSTEP]   "
>>>>> [1] "            units: <YYYYDDD,HHMMSS>"
>>>>> [1] "            long_name: TFLAG           "
>>>>> [1] "            var_desc: Timestep-valid flags:  (1) YYYYDDD or (2)
>>>>> HHMMSS                                "
>>>>> [1] "        float ACROLEIN[COL,ROW,LAY,TSTEP]   "
>>>>> [1] "            long_name: ACROLEIN        "
>>>>> [1] "            units: moles/s         "
>>>>> [1] "            var_desc: Model species ACROLEIN
>>>>>                                    "
>>>>> [1] "        float ALD2[COL,ROW,LAY,TSTEP]   "
>>>>> [1] "            long_name: ALD2            "
>>>>> [1] "            units: moles/s         "
>>>>> [1] "            var_desc: Model species ALD2
>>>>>                                    "
>>>>> [1] ""
>>>>> [1] "     6 dimensions:"
>>>>> [1] "        TSTEP  Size:25   *** is unlimited ***"
>>>>> [1] "        DATE-TIME  Size:2"
>>>>> [1] "        LAY  Size:1"
>>>>> [1] "        VAR  Size:55"
>>>>> [1] "        ROW  Size:299"
>>>>> [1] "        COL  Size:459"
>>>>> [1] ""
>>>>> [1] "    33 global attributes:"
>>>>> [1] "        IOAPI_VERSION: $Id: @(#) ioapi library version 3.0 $
>>>>>                                     "
>>>>> [1] "        EXEC_ID: ????????????????
>>>>>                               "
>>>>> [1] "        FTYPE: 1"
>>>>> [1] "        CDATE: 2012314"
>>>>> [1] "        CTIME: 32930"
>>>>> [1] "        WDATE: 2012314"
>>>>> [1] "        WTIME: 32930"
>>>>> [1] "        SDATE: 2006365"
>>>>> [1] "        STIME: 0"
>>>>> [1] "        TSTEP: 10000"
>>>>> [1] "        NTHIK: 1"
>>>>> [1] "        NCOLS: 459"
>>>>> [1] "        NROWS: 299"
>>>>> [1] "        NLAYS: 1"
>>>>> [1] "        NVARS: 55"
>>>>> [1] "        GDTYP: 2"
>>>>> [1] "        P_ALP: 33"
>>>>> [1] "        P_BET: 45"
>>>>> [1] "        P_GAM: -97"
>>>>> [1] "        XCENT: -97"
>>>>> [1] "        YCENT: 40"
>>>>> [1] "        XORIG: -2556000"
>>>>> [1] "        YORIG: -1728000"
>>>>> [1] "        XCELL: 12000"
>>>>> [1] "        YCELL: 12000"
>>>>> [1] "        VGTYP: -1"
>>>>> [1] "        VGTOP: 0"
>>>>> [1] "        VGLVLS: 0" "        VGLVLS: 0"
>>>>> [1] "        GDNAM: 12US1_459X299   "
>>>>> [1] "        UPNAM: MRGGRID         "
>>>>> [1] "        VAR-LIST: ACROLEIN        ALD2            ALD2_PRIMARY
>>>>> ALDX            BENZENE         BUTADIENE13     CH4             CL2
>>>>>         CO              ETH             ETHA            ETOH
>>>>> FORM
>>>>>              FORM_PRIMARY    HCL             HFLUX           HONO
>>>>> IOLE            ISOP            MEOH            NH3
>>>>> NH3_FERT
>>>>>         NO              NO2             NVOL            OLE
>>>>> PAL
>>>>>              PAR             PCA             PCL             PEC
>>>>> PFE             PH2O            PK              PMC             PMFINE
>>>>>         PMG             PMN             PMOTHR          PNA
>>>>> PNCOM
>>>>>              PNH4            PNO3            POC             PSI
>>>>> PSO4            PTI             SO2             SULF            TERP
>>>>>         TOL             UNK             UNR             VOC_INV
>>>>> XYL
>>>>>              "
>>>>> [1] "        FILEDESC: Area source emissions data
>>>>>                                /FROM/ OPENMRGOUT
>>>>>                                     /VERSION/ $
>>>>>
>>>>>                                               /BASE YEAR/     2008
>>>>>                                                    /NUMBER OF FILES/
>>>>> 1
>>>>>                                                         /FILE POSITION/
>>>>> 1
>>>>>                                                              /NUMBER OF
>>>>> VARIABLES/  20
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>                                 "
>>>>> [1] "        HISTORY: "
>>>>>
>>>>>
>>>>> [2] This is just a .csv file with
>>>>> Lat (dimension 459*299), lon (dimension 459*299)
>>>>>
>>>>> [3] I am just starting to learn NCL and NCO, so I am not yet familiar.
>>>>> I have been working in R until this point.
>>>>>
>>>>> ~Katie
>>>>>
>>>>> On 2/4/13 12:29 PM, "Dennis Shea" <shea@ucar.edu> wrote:
>>>>>
>>>>>> A bit more information would be helpful.
>>>>>>
>>>>>> [1] What does
>>>>>>
>>>>>> %> ncl_filedump ....  (or: ncdump -h ...)
>>>>>>
>>>>>> show for the the original file?
>>>>>>
>>>>>> [2] The same for the 2nd file containing the lat/lon coordinates
>>>>>>
>>>>>> [3] Are you familiar and have available the netCDF Operators?
>>>>>>        eg: the 'ncks' operator
>>>>>>
>>>>>> Cheers
>>>>>>
>>>>>>
>>>>>> On 02/04/2013 10:24 AM, Travis, Katherine wrote:
>>>>>>> Hi,
>>>>>>> I have species data (NO, NO2 etc) with dimensions 459x299x25 for
>>>>>>> lat/lon/time.  However the lat and lon dimensions are 1-459 and
>>>>>>> 1-299
>>>>>>> rather than actual lat/lon values.  I have a lat and lon coordinate
>>>>>>> for
>>>>>>> each datapoint, and I want to append the netcdf file with this
>>>>>>> information so that the actual grid points are associated with the
>>>>>>> data.
>>>>>>>      Is there a simple way to do this?
>>>>>>> Thanks,
>>>>>>> --
>>>>>>> Katherine R. Travis
>>>>>>> PhD Student
>>>>>>> Harvard University
>>>>>>> SEAS
>>>>>>> ktravis@fas.harvard.edu
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> ncl-talk mailing list
>>>>>>> List instructions, subscriber options, unsubscribe:
>>>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Feb 4 15:30:32 2013

This archive was generated by hypermail 2.1.8 : Wed Feb 06 2013 - 16:37:01 MST