[ncl-talk] Saving Output of smooth daily climatology

Dennis Shea shea at ucar.edu
Fri Jun 25 07:46:56 MDT 2021


I am not familiar with ferret's graphics.
===

I speculate that
   printVarSummary(clice_clim)
   printVarSummary(clice_clim_sm)
would be
   clice_clim(366)
   clice_clim_sm(366)

and ...
    printVarSummary( clice_anom )
would be
   clice_anom(10957)

All one dimensional.


On Fri, Jun 25, 2021 at 5:17 AM Ushnanshu Dutta via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Hi,
>
> I want to save smooth climatology using ncl. Calculation part is okay. But
> unfortunately it is getting saved in X-axis (as revealed by ferret). I want
> it on L-axis.
>  My code is as follows,
>
> *------------------------------------------------------*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> * load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"    load
> "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"     load
> "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"  load
> "$NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl" begina=
> addfile("qici_era5.nc <http://qici_era5.nc>","r")b=
> addfile("/home/SSPMRES/hazra/ushnanshu/paper2/data/olr_noaa_1981_2010.nc
> <http://olr_noaa_1981_2010.nc>","r")clice =
> doubletofloat(a->qici(:,{1},{1}))olr = b->OLR(:,{1},{1})dummy = olr(:)*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *   ymdStrt = 19810101                         ; start yyyymmdd   ymdLast
> = 20101231                         ; last     yrStrt  = ymdStrt/10000
>  yrLast  = ymdLast/10000     nhar    = 4                                ;
> number of fourier comp
>   ;***********************************************************; Read user
> specified time and create required yyyyddd
>  ;***********************************************************
>              time    = b->TIME                          ; all times on
> file   ymd     = cd_calendar(time, -2)            ; yyyymmdd   iStrt   =
> ind(ymd.eq.ymdStrt)              ; index start   iLast   =
> ind(ymd.eq.ymdLast)              ; index last    delete(time)
>  delete(ymd);***********************************************************;
> Read user specified time and create required yyyyddd
>  ;***********************************************************   time    =
> b->TIME(iStrt:iLast)             ; time:units = "hours since"   TIME    =
> cd_calendar(time, 0)             ; type float    year    = floattointeger(
> TIME(:,0) )   month   = floattointeger( TIME(:,1) )   day     =
> floattointeger( TIME(:,2) )    ddd     = day_of_year(year, month, day)
>  yyyyddd = year*1000 + ddd                  ; needed for
> input;***********************************************************; Compute
> daily climatology: cloud ICE raw and then 'smoothed'
>  ;***********************************************************   clice_clim
> = clmDayT(clice, yyyyddd)     ; daily climatology at CI box
>  printVarSummary(clice_clim)
>  ;***********************************************************; Compute
> smoothed daily climatology using 'nhar'
> harmonics;***********************************************************
>  clice_clim_sm = smthClmDayT(clice_clim, nhar)
>  printVarSummary(clice_clim_sm);***********************************************************;
> Compute daily anomalies using smoothed
> climatologies;***********************************************************
>             clice_anom   = calcDayAnomT(clice, yyyyddd, clice_clim_sm)
>     clice_anom at long_name = "cldice Anomalies of CI box
>  "clice_clim_sm!0=timecopy_VarCoords(dummy,clice_anom) printVarSummary(clice_clim_sm);------------------------------------------------------------------------------------;------------------------------------------------------------------------------------setfileoption("nc","Format","NetCDF4Classic");---------Writing
> the output---------------------        diro = "./"        filo =
> "anomalies_iwp_CI_avg_era5.nc"        system("/bin/rm -f "+diro+filo)
>  ; rm any pre-existing file ;filedimdef(filo,"tnew",-1,True)
> f_select = addfile(diro+filo, "c")        f_select->clice_anom =clice_anom
>       f_select->clice_clim =clice_clim_smend*
>
>
>
> Output file is aving like this. I want it in the L dimension (i.e time)
> instead of I dimesnion
>     1> ./anomalies_iwp_CI_avg_era5.nc  (default)
>  name     title                             I         J         K
> L         M         N
>  CLICE_ANOM
>           cldice Anomalies of CI box       ...       ...       ...
> 1:10957   ...       ...
>  CLICE_CLIM
>           Daily Climatology                1:366     ...       ...
> ...       ...       ...
>
>
>
> please help
> --
>
> *Ushnanshu Dutta*
>
> *Research Fellow*
>
> *Indian Institute of Tropical Meteorology*
>
> *Pune,411008*
> *Mob: 9405022799*
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210625/5fb43821/attachment.html>


More information about the ncl-talk mailing list