[ncl-talk] Joining files together with varying dimension sizes

Guido Cioni guidocioni at gmail.com
Tue Apr 26 11:27:56 MDT 2016


Hi Andrew,
I would suggest you to merge data together BEFORE reading them into NCL. You can easily do that either with NCO and the command ncrcat (see here http://research.jisao.washington.edu/data_sets/nco/#example8 <http://research.jisao.washington.edu/data_sets/nco/#example8>) or using CDO with the merge option (see here for the complete guide https://www.rsmas.miami.edu/users/rajib/cdo.pdf <https://www.rsmas.miami.edu/users/rajib/cdo.pdf>). These methods will work without problems as long as you have a well-defined time coordinate in your files and the vertical levels are always the same. 
Cheers

Guido Cioni
http://guidocioni.altervista.org <http://guidocioni.altervista.org/> 




> Il giorno 26 apr 2016, alle ore 19:22, Andrew Kren - NOAA Affiliate <andrew.kren at noaa.gov> ha scritto:
> 
> Dear NCL Talk,
> 
> I have data that is netcdf format of various aircraft microwave retrievals. These retrievals of temperature, moisture, etc, are in units of (lev,time) in each file. I want to join all of the files together so that I can compare the data to dropsondes. However, when I do the addfiles feature, and grab the data using temp_hamsr = factor*(short2flt(q[:]->ham_airT))-273.15, it gives me this error:
> 
> warning:File /scratch4/BMC/shout/Andrew.Kren/hamsr_data/2011/HS3/L2/HAMSR_L2_20110908T185915_20110909T185423_v01.nc dimension sizes do not conform to others in list; skipping file
> warning:A valid instance of variable ham_airT was not found in one or more elements of the file list
> 
> I know what this error means after looking it up online and on the NCL help page. It is because my leftmost dimension is not time (level instead), which is required to merge them together. Is there any workaround to do this, like reorder when reading in, with what format my data is in? Basically I want to make my code portable so I can join any number of files for a particular storm case, since not all cases have the same amount of time retrievals.
> 
> I also attached an ncl_filedump output of the format of the data I am reading. The along track metadata refers to time dimension in this case. 
> 
> Thanks,
> 
> -- 
> Andrew Kren, PhD
> Research Scientist I, Global Observing Systems Analysis (GOSA) Group
> NOAA ESRL Global Systems Division (Rm 3C515)
> 325 Broadway, Boulder, CO 80305
> (303) 497-5418 <tel:%28303%29%20497-5418>
> <format_file.txt><compare_AVAPS_HAMSR_HS3_2011.ncl>_______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160426/be1b70e1/attachment.html 


More information about the ncl-talk mailing list