Question

I am having trouble trying to combine three files to be averaged. I am not so...

I am having trouble trying to combine three files to be averaged. I am not so sure how to even start. I have three files

"nday1.06.nc , nday1.07.nc, nday.08.nc"

each with the variables

"filling on), ('SST', <class 'netCDF4._netCDF4.Variable'>
          float32 SST(time, nlat, nlon)
              long_name: Surface Potential Temperature
              units: degC
              coordinates: TLONG TLAT time
              grid_loc: 2110
              cell_methods: time: mean time: mean time: mean
              _FillValue: 9.96921e+36
          missing_value: 9.96921e+36
          unlimited dimensions: time
          current shape = (1, 2400, 3600)

I just need to average the SST variables and then an output file with the averages. I need to do this using linux NCO operators for netCDF4 files.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

# Hey, dear You should try ncra not ncwa

ncra nday1.06.nc nday1.07.nc nday.08.nc out.nc

In python it will work as .nc file , and i suggest you to upgrading to latest NCO.

heres the syntax for-

ncra netCDF Record Averager

ncra [-3] [-4] [-5] [-6] [-7] [-A] [-C] [-c] [--cb]

[--cnk_byt sz_byt] [--cnk_csh sz_byt] [--cnk_dmn nm,sz_lmn]
[--cnk_map map] [--cnk_min sz_byt] [--cnk_plc plc] [--cnk_scl sz_lmn]
[-D dbg] [-d dim,[min][,[max][,[stride][,[subcycle]]]] [-F] [--fl_fmt fl_fmt]
[-G gpe_dsc] [-g grp[,…]] [--glb ...]
[-h] [--hdf] [--hdr_pad nbr] [--hpss] 
[-L dfl_lvl] [-l path] [--mro] [-N] [-n loop] 
[--no_cll_msr] [--no_cll_mth] [--no_frm_trm] [--no_tmp_fl] 
[-O] [-o output-file] [-p path] [--ppc ...] [-R] [-r] [--ram_all] [--rec_apn] [--rth_dbl|flt]
[-t thr_nbr] [--unn] [-v var[,…]] [-w wgt] [-X ...] [-x] [-y op_typ]
[input-files] [output-file]

i hope this will help to solve your problem ..Thank you..!!

Add a comment
Know the answer?
Add Answer to:
I am having trouble trying to combine three files to be averaged. I am not so...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT