[Thread Prev][Thread Next][Index]

[ferret_users] Saving variables on existing NetCDF file - keeping axis



Hi again, this is the good script, as I was deseperate I tried different things,
but this is the script I was using. Sorry:


I got a question which have been already discussed in the past, but in a quite
different way. To force a model I need to produce files with different
atmospheric fields. But before that I need to correct 3 of these fields using a
climatology which I have built (I open the NetCDF file, I do the correction and
I save the correction under another filename). I don't have any problem if I
only save uncorrected fields, but if I save the 3 corrected variables, Ferret
create a new variable "TIME" which becomes the record dimension of those
fields. Here my script:

cancel data/all
cancel var/all
cancel region/all
cancel axis/all
CANCEL MODE upcase_output

SET DATA P2T_anom_clim.cdf
SET DATA SWd_anom_clim.cdf
SET DATA LWd_anom_clim.cdf


   ! File opening
   DEFINE SYMBOL fic=metfor.2002.01.nc
   SET DATA ($fic)

   !!! Interpolation of climatologies !!!
   let TT=P2T_CLIM[gx=P2T[d=4], gy=P2T[d=4], gl=P2T[d=4],  d=1]
   let SW=SWD_CLIM[gx=SSRD[d=4], gy=SSRD[d=4], gl=SSRD[d=4], d=2]
   let LW=LWD_CLIM[gx=STRD[d=4], gy=STRD[d=4], gl=STRD[d=4], d=3]

   !!! fields to correct !!!
   let metP2T=P2T[d=4]
   let metSSRD=SSRD[d=4]
   let metSTRD=STRD[d=4]

   ! First saving (not modified variables)
   DEFINE SYMBOL ficc=metforc.2002.01.cdf
   SAVE/CLOBBER/FILE=($ficc) LON, LAT, MSL, TCC, P10U, P10V, P2D, TP, QH !(here
there's no problem!!)

   !!! correction !!!
   let p2tc=TT+metP2T
   let ssrdc=SW+metSSRD
   let strdc=LW+metSTRD

  ! Second saving (modified variables)
   SAVE/APPEND/FILE=($ficc) P2TC, SSRDC, STRDC !Here's the problem, a
new variable "TIME" is created

Thanks for any answer!!
Fred


[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement