[gradsusr] ENSO Forecast Plumes Script

James Spinks jspin881 at hotmail.com
Wed Jun 27 16:44:28 EDT 2018


Yes! I got it! Thanks for all your patience and help.

Everything is working now.
________________________________
From: gradsusr <gradsusr-bounces at gradsusr.org> on behalf of Jennifer M Adams <jadams21 at gmu.edu>
Sent: Wednesday, June 27, 2018 4:06 PM
To: GrADS Users Forum
Subject: Re: [gradsusr] ENSO Forecast Plumes Script

That code block is the body of the script I use to transform the ascii data (sstoi.indices) to binary data (sstoi.dat). It is a separate script, not related to drawing plumes. I read the ascii and write out the binary data and then create a descriptor to go with it (the time axis is all that changes from one month to the next). The latest looks like this:
dset ^sstoi.dat
title nino3.4 index
undef -9.99e8
xdef 1 linear 1 1
ydef 1 linear 1 1
zdef 1 linear 1 1
tdef 437 linear 01jan1982 1mo
vars 1
nino34 0 99 nino3.4 anomaly index
endvars

This is the data set I open for the ‘obs’ in the plume script.
—Jennifer

On Jun 27, 2018, at 1:33 PM, James Spinks <jspin881 at hotmail.com<mailto:jspin881 at hotmail.com>> wrote:

Hey Jennifer,

Thanks a ton for you time. I'm almost there. I have the models plotted, now I just need to get the observations live plotted.

You sent a piece of code to write the ascii data as a binary time series.  Does this does need to replace anything in the plume script? I am unsure what to do with it.

'set gxout fwrite'
t=0
while (1)
  res=read(ascfile)
  line1=sublin(res,1)
  line2=sublin(res,2)
  rc1 = subwrd(line1,1)
  if (rc1); break; endif
  ck=subwrd(line2,1)
  if (ck!='YR')
    t=t+1
    year=ck
    m=subwrd(line2,2)
    val=subwrd(line2,10)
    'd 'val
    if (t=1)
      iyear=year
      imon=subwrd(mons,m)
    endif
  endif
endwhile
'disable fwrite'



From: gradsusr <gradsusr-bounces at gradsusr.org<mailto:gradsusr-bounces at gradsusr.org>> on behalf of Jennifer M Adams <jadams21 at gmu.edu>
Sent: Wednesday, June 27, 2018 12:17 PM
To: GrADS Users Forum
Subject: Re: [gradsusr] ENSO Forecast Plumes Script

Use this :

*   define a grid of Nino3.4 index values in the T,E dimensions
    'set dfile 'fn
    'set t 1 'tmax
    'set x 1'
    'set y 1'
    'set e 1 'numens.m
    'grid'mused'=eloop(tloop(aave(tmpsfc,lon=-170,lon=-120,lat=-5,lat=5)))’

instead of this:

*   get the range of times
    'set dfile 'fn
    'set t 1 'tmax
    'q time'
    time1=subwrd(result,3)
    time2=subwrd(result,5)

*   build a server-side analysis URL
    dset='nmme/'year%mm'/tmpsfc_'model.m
    expr='eloop(tloop(aave(tmpsfc,lon=-170,lon=-120,lat=-5,lat=5)))' ;* NINO3.4 definition
    dims='0:0,-90:-90,0:0,'time1':'time2',01:'numens.m
    URL=server'_expr_{'dset'}{'expr'}{'dims'}'
    'close 'fn
*   This may take some time if the calculation result is not cached
    'sdfopen 'URL

*   define a grid of Nino3.4 index values in the T,E dimensions
    'set dfile 'fn
    'set t 1 'tmax
    'set x 1'
    'set y 1'
    'set e 1 'numens.m
    'grid'mused'=result'

—Jennifer

On Jun 27, 2018, at 10:28 AM, James Spinks <jspin881 at hotmail.com> wrote:

Hey Jennifer,

I have successfully created a shell script to download the data with no problem and I have set up my directory to mimic some of the defined paths in the plume script. However, I am having an issue on getting past the "build a server-side analysis URL" section.

This is what my section looks like:

*   build a server-side analysis URL
    dset='NMME/data/'year%mm'/'model.m'.tmpsfc.'year''mm'.anom.ctl'
    expr='eloop(tloop(aave(tmpsfc,lon=-170,lon=-120,lat=-5,lat=5)))' ;* NINO3.4 definition
    dims='0:0,-90:-90,0:0,'time1':'time2',01:'numens.m
    URL=server'_expr_{'dset'}{'expr'}{'dims'}'
    'close 'fn
*   This may take some time if the calculation result is not cached
    'open 'URL

I modified the dset variable, but I "can't open the description" on the open URL part. I am assuming since this was server-side analysis, this particular section needs to be modified since I now download the data? What would be the best way to go about modifying this section? Does the expr and dims variable remain the same? What would I do about the URL variable?

Thanks,
James


From: gradsusr <gradsusr-bounces at gradsusr.org> on behalf of Jennifer M Adams <jadams21 at gmu.edu>
Sent: Tuesday, June 26, 2018 6:25 PM
To: GrADS Users Forum
Subject: Re: [gradsusr] ENSO Forecast Plumes Script

I use the ‘dtype netcdf’ descriptor to make sure the dimensions are mapping properly, set the ensemble names with leading zeros, and alias the variable name so the plume script will work with new and old data.

dset ^NASA_GEOS5v2.tmpsfc.201806.anom.nc
dtype netcdf
options yrev
undef 9.999E+20
title NASA_GEOS5v2 anomalies for tmpsfc initialized Jun 2018
ydef 181 linear -90 1
xdef 360 linear 0 1
zdef 1 linear 1 1
tdef 9 linear 01Jun2018 1mo
edef 10 names 01 02 03 04 05 06 07 08 09 10
vars 1
fcst=>tmpsfc 0  e,t,y,x    surface temperature [K]
endvars

—Jennifer


On Jun 26, 2018, at 3:59 PM, James Spinks <jspin881 at hotmail.com> wrote:

Hey Jennifer,

Thanks. You're right. After downloading the data in netcdf format, the files opened with no problem. What would I use the descriptor file if the nc files open without it? Just curious.

I'll give your suggestions a try. Thanks for the help.
From: gradsusr <gradsusr-bounces at gradsusr.org> on behalf of Jennifer M Adams <jadams21 at gmu.edu>
Sent: Tuesday, June 26, 2018 3:00 PM
To: GrADS Users Forum
Subject: Re: [gradsusr] ENSO Forecast Plumes Script

Hi, James —
The data I use to draw the plumes is freely available from NOAA:

ftp://ftp.cpc.ncep.noaa.gov/wd52dg/data/indices/sstoi.indices  (for the obs)
ftp://ftp.cpc.ncep.noaa.gov/NMME/realtime_anom (for the model forecasts)

You will need to download the data and create your own descriptor files, but that is a very straightforward task — no special tricks. Recently the format of the model data changed -- now it is NetCDF instead of GRIB — which makes it even easier. Below is the bit of script code for writing the ascii data as a binary time series:

'set gxout fwrite'
t=0
while (1)
  res=read(ascfile)
  line1=sublin(res,1)
  line2=sublin(res,2)
  rc1 = subwrd(line1,1)
  if (rc1); break; endif
  ck=subwrd(line2,1)
  if (ck!='YR')
    t=t+1
    year=ck
    m=subwrd(line2,2)
    val=subwrd(line2,10)
    'd 'val
    if (t=1)
      iyear=year
      imon=subwrd(mons,m)
    endif
  endif
endwhile
'disable fwrite'


—Jennifer

On Jun 26, 2018, at 10:40 AM, James Spinks <jspin881 at hotmail.com> wrote:

Hi all,

I was wondering if there was an updated link for the ENSO Forecast Plumes script since the URL http://monsoondata.org:9090/dods/ has been decommissioned.

The script is hosted here http://cola.gmu.edu/enso_forecast_plumes.html and looks to still be running just fine, but the script does not contain an updated link. If there is a replacement link, can some please provide the new link.

Thank you,
James
_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://secure-web.cisco.com/10cV7uvP1gMb6aGhsXoFmP9FcAbE16taY_R_CEn2DeLZcOVmzB2z8hEltkCJAzIqJc222mfbwJD1BXPCTrrkdCW-92A_3qXj4-zk3pcAGXRXDsfDVGyoNujgAffAPmVw613uXORG6J4-KHEuak38h5fRR3-mpQvMbpqwaSo_paZU-ZzrCz_sA6HXlZ89camd3E1ugdUdARvcxwvWRbX8rH9ZZSlsIGM92_lQYuTp69dFfq4B4T7GhQ2WibEwTgESteR32Zlwkwd9pQsrMU03xMITiJuRmVXIhsvqg3q1eaSud5BN6-nYbJf_z6FattWnWt2f6TGx0vl_nGZBb226xlQb0_sb5y_UnBh_mJFCN-KWM1VE66DaDGW1VIHUe48-EOTQxnnp7IvtlxkSenu6GSQOcOu9k87zqLTajNFICvw6HGFTbrE9OGDNxb-fyIKk2/http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr

--
Jennifer Miletta Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
George Mason University



_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://secure-web.cisco.com/1j6CyJMJVEv8urj2N4H7sGUrV2dRpugRfTlhcHDzRNMticAKWRHmaBmIKjMfaYXw_RSaJEyzOaYOdgU5QvfUuUZptVu_wCu14zwse0TMWu0S4yWZ0gzglRu0F_tkiti4HwylPGmUISs-lIYnhLCsshVTep0mJw9VE0TERJR9CFMAJ-1G2VsIDikZMcWPNXIrAbmBsKydCKQQpK9x7g4YRsnvjWp7yk1lmqXglJ-2b6LBMHdxUkQ9JCgoavyfykgMfTIblwe7xVmaK3oFAaZwnVisWGEI_OlJtAz-c6vjI9MX_RgzCBRgE1IlPeWTKuzbxoS1UjfDMu0_YDiD6ZaR_pdbTEJ_C3rD4UsZUvNQhwcy5nw52Kvpnrm7UJ3ZZ4i0ONpBtZ5FDQ4GiEU2JJBqxFXIzHQJhFUmu4zUaw2sGoDeawoG63un6BdkxPNnhtvI7/http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr

--
Jennifer Miletta Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
George Mason University



_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://secure-web.cisco.com/1RRyoo5uzU0u6Cqodtm93v7Z_GBwgPJOQu83b-zumZdQC5VOws-H5L740i07_Hy8WYFWEzu1F6oH6Kyxrh_mA-mmnb3EE-lWBcCy16poXhELNxFlIX4RFAhs3IWps7ka3807b_bSTuRxwwB8HEQVRR1DEG6PBYHJ7hR5FdGBNqorJmkj9NUjRzKVbrwjqeKZGiwVOewxzy8gXRuGylmSdm6YxY3B_ZaxDGGIf6HnyaekLzxKaV3NuvWDlPq4c5L6TYFmk2_996AzRbm-YfeU5ZP28aZ6o8jkPJnTvYr9KuRrtCzZknrkCca9AJzLZjf0vmI-ig0R39PfSvufdrjiYD_PFHu4P7cRtNHrWAtOyNepLTD-OvMdCAIPyAKoKRZwtTburkfmfAJncuuC0enNmOzzQgKilI52q94xFndpP_M8chyeVXO4Cxkqup6f7Zc93/http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr

--
Jennifer Miletta Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
George Mason University



_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://secure-web.cisco.com/1I1KLldrjAKYcQr6DbEzm6sOFARavCiRX0AWjO1tbjEazVX3zEzbeX2bb13qRYanRYxdAMMGL4PLAegOq1ygWG1g3qyWNz2QkdPKX2JXVhCSvlTr-2Wh_knDcgTsSLnyBvNbhz7xoeuISU2HeAGV35Pbc99uP55yVHIAdiuD2nqHxk8wPLRj0kBdtLmkqboagoPATBW3yBhD-Vx3FMbsEcJEIe-IEEadABEuX8sjiokUYFZacYBL_wQvjY9a6h018L-Yq5l7wGRDfGiH5xNt6d0eqI9p77SzHNTsUuLT6OTnsq8JG7Ffs0kfud0V1Ci6wRXklHcpOLj6-tcKxuAOS7X-49wkoiEsYzYbto-VJYu1n8eSUK3jModxbFEc9pb_JbINvsamZF8KhrdwU35faKXiT1TuTmHFnraDHxF_rum_FMQ4tN3tUhMJpLVfUpeR9/http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr

--
Jennifer Miletta Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
George Mason University



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20180627/25666016/attachment-0001.html>


More information about the gradsusr mailing list