[ncl-talk] Changing 360 day calendar to 365 day standard calendar

Kwesi A. Quagraine starskykwesi at gmail.com
Mon Sep 23 15:40:28 MDT 2019


Dear NCLers,

Apologies for revisiting this again.

I am using the calendar_convert_360_to_365_date.ncl script provided earlier
by Denis, to convert a 360 day calendar to 365 day standard calendar.
However I get this error below;

fatal:Subscript out of range, error in subscript #0
fatal:An error occurred reading it360
fatal:["Execute.c":8637]:Execute: Error occurred at or near line 161 in
file ./calendar_convert_360_to_365_date.ncl

fatal:["Execute.c":8637]:Execute: Error occurred at or near line 27 in file
hadgem_360_365.ncl

fatal:Variable (zg365) is undefined
fatal:["Execute.c":8637]:Execute: Error occurred at or near line 29 in file
hadgem_360_365.ncl

fatal:Variable (zg365) is undefined
fatal:["Execute.c":8637]:Execute: Error occurred at or near line 30 in file
hadgem_360_365.ncl

fatal:["Execute.c":8637]:Execute: Error occurred at or near line 31 in file
hadgem_360_365.ncl

(0) ==================
fatal:Variable (zg365) is undefined
fatal:["Execute.c":8637]:Execute: Error occurred at or near line 65 in file
hadgem_360_365.ncl

I am not sure what is happening there since the loop that is being iterated
through uses the correct loop structure in NCL;

======
do nt=0,nitime-1
         x365(it360(nt),:,:,:) = x360(it365(nt),:,:,:)
      end do
  end if
======

I will be grateful for any help on this. I have attached my file and the
calendar convert file I am using.

Warm regards
Kwesi

(ncl_notebook) kwesi at maggie:~/terra/cordex$ ncl -V
6.6.2

(ncl_notebook) kwesi at maggie:~/terra/cordex$ conda --version
conda 4.3.30

(ncl_notebook) kwesi at maggie:~/terra/cordex$ env | grep NCARG
OLD_NCARG_ROOT=/share/apps/ncl-6.2.1
NCARG_ROOT=/home/kwesi/miniconda3/envs/ncl_notebook

ncdump file gives;

netcdf
zg700_day_HadGEM2-ES_historical_rcp85_r1i1p1_SMHI-RCA4_19800101-20131231_norm
{
dimensions:
        lon = 91 ;
        lat = 103 ;
        plev = 1 ;
        time = UNLIMITED ; // (12240 currently)
        bnds = 2 ;
variables:
        double lon(lon) ;
                lon:standard_name = "longitude" ;
                lon:long_name = "longitude" ;
                lon:units = "degrees_east" ;
                lon:axis = "X" ;
        double lat(lat) ;
                lat:standard_name = "latitude" ;
                lat:long_name = "latitude" ;
                lat:units = "degrees_north" ;
                lat:axis = "Y" ;
        double plev(plev) ;
                plev:standard_name = "air_pressure" ;
                plev:long_name = "pressure" ;
                plev:units = "Pa" ;
                plev:positive = "down" ;
                plev:axis = "Z" ;
        double time(time) ;
                time:standard_name = "time" ;
                time:long_name = "time" ;
                time:bounds = "time_bnds" ;
                time:units = "days since 1949-12-1 00:00:00
<http://airmail.calendar/1949-12-01%2000:00:00%20GMT+2>" ;
                time:calendar = "360_day" ;
                time:axis = "T" ;
        double time_bnds(time, bnds) ;
        float zg(time, plev, lat, lon) ;
                zg:standard_name = "geopotential_height" ;
                zg:long_name = "Geopotential Height" ;
                zg:units = "m" ;
                zg:_FillValue = 1.e+20f ;
                zg:missing_value = 1.e+20f ;
                zg:cell_methods = "time: mean" ;

-----------
Try not to become a man of success but rather a man of value- Albert
Einstein

Kwesi A. Quagraine
Climate System Analysis Group (CSAG)
Environmental and Geographical ScIence (EGS)
University of Cape Town
Private Bag, Rondebosch, 7701
South Africa

Alt. Email: starskykwesi at gmail.com
Web: http://www.csag.uct.ac.za
Office: +27 21 650 3164 <//+27 21 650 3164>
Skype: quagraine_cwasi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190923/e3c7677c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hadgem_360_365.ncl
Type: application/octet-stream
Size: 2587 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190923/e3c7677c/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: calendar_convert_360_to_365_date.ncl
Type: application/octet-stream
Size: 6402 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190923/e3c7677c/attachment-0001.obj>


More information about the ncl-talk mailing list