[Thread Prev][Thread Next][Index]

Re: Putting two vars into one 2-level var



> At a guess: if you add "/K=1:2" on your SAVE command that might fix it.

Once again, Steve is correct.

Thanks!

Here's the corrected script:
-------------------------------------------------------------------------------
!
use so2_hist_emissions.nc
!
! area in m^2 of each 1x1 degree grid box
!
use d1x1_area.nc
set mem/siz=256
!
! Scale factors
!
let secs_per_year = 24*3600*365
let kg_per_tg     = 1.e9
let so2_per_s     = 2
!
let scale = (secs_per_year*so2_per_s)/kg_per_tg
!
repeat/l=1:604 (set reg/l=`l` ; let sox = if k eq 1 then (so2_lo[d=1]/area[d=2])*scale else (so2_hi[d=1]/area[d=2])*scale ; save/k=1:2/append/file=so2_hist_fluxes.nc sox)
!
quit
-------------------------------------------------------------------------------

Works like a charm.
--
/\        Gary Strand (303) 497-1336                               NCAR CG2260
  \_][    www.cgd.ucar.edu/ccr/strandwg                   3080 Center Green Dr
      \___strandwg@ucar.edu                      Boulder, Colorado, USA  80301


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement