Working with Forecast Models in Ferretferret.pmel.noaa.gov/tutorials/Using_Forecast_Model_Run... ·...
Transcript of Working with Forecast Models in Ferretferret.pmel.noaa.gov/tutorials/Using_Forecast_Model_Run... ·...
![Page 1: Working with Forecast Models in Ferretferret.pmel.noaa.gov/tutorials/Using_Forecast_Model_Run... · 2016. 6. 28. · Ferret syntax: how to regrid using an auxiliary coordinate •](https://reader035.fdocuments.us/reader035/viewer/2022081623/6143fd1d6cc38f259c25e309/html5/thumbnails/1.jpg)
Working withForecast Models
in PyFerret and Ferret
June 2015
![Page 2: Working with Forecast Models in Ferretferret.pmel.noaa.gov/tutorials/Using_Forecast_Model_Run... · 2016. 6. 28. · Ferret syntax: how to regrid using an auxiliary coordinate •](https://reader035.fdocuments.us/reader035/viewer/2022081623/6143fd1d6cc38f259c25e309/html5/thumbnails/2.jpg)
A plot to illustrate the data output by a Forecast Model Run Collection (FMRC). Every colored cell is a model snapshot.
2
Every 2 months, another run
Each run,12 monthlysnapshots
![Page 3: Working with Forecast Models in Ferretferret.pmel.noaa.gov/tutorials/Using_Forecast_Model_Run... · 2016. 6. 28. · Ferret syntax: how to regrid using an auxiliary coordinate •](https://reader035.fdocuments.us/reader035/viewer/2022081623/6143fd1d6cc38f259c25e309/html5/thumbnails/3.jpg)
Each model output (starting at one initialization time) is a “dataset”. How to aggregate these many individual datasets into a single dataset of higher dimensionality?
• use the Ferret commandDEFINE AGGREGATION/F
or• serve the collection via OPeNDAP using
Unidata’s THREDDS Data Server (TDS)
many 4D files ➔ become a single 5D dataset
3
![Page 4: Working with Forecast Models in Ferretferret.pmel.noaa.gov/tutorials/Using_Forecast_Model_Run... · 2016. 6. 28. · Ferret syntax: how to regrid using an auxiliary coordinate •](https://reader035.fdocuments.us/reader035/viewer/2022081623/6143fd1d6cc38f259c25e309/html5/thumbnails/4.jpg)
4
Forecast Initialization Time
Native (“compact”) form of FMRC
as run …
![Page 5: Working with Forecast Models in Ferretferret.pmel.noaa.gov/tutorials/Using_Forecast_Model_Run... · 2016. 6. 28. · Ferret syntax: how to regrid using an auxiliary coordinate •](https://reader035.fdocuments.us/reader035/viewer/2022081623/6143fd1d6cc38f259c25e309/html5/thumbnails/5.jpg)
In the native, compact form the time step values are a 2D variable. Note that the same forecasted
date/time occurs at lags in multiple forecast runs.
5
RUN 1 RUN 2 RUN3 RUN4 RUN5 RUN6 RUN7 1 744. 2184. 3648. 5112. 6576. 8040. 9528.2 1440. 2904. 4368. 5856. 7320. 8784. 10200.3 2184. 3648. 5112. 6576. 8040. 9528. 10944.4 2904. 4368. 5856. 7320. 8784. 10200. 11664.5 3648. 5112. 6576. 8040. 9528. 10944. 12408.6 4368. 5856. 7320. 8784. 10200. 11664. 13128.7 5112. 6576. 8040. 9528. 10944. 12408. 13872.8 5856. 7320. 8784. 10200. 11664. 13128. 14616.9 6576. 8040. 9528. 10944. 12408. 13872. 15336.10 7320. 8784. 10200. 11664. 13128. 14616. 16080.11 8040. 9528. 10944. 12408. 13872. 15336. 16800.12 8784. 10200. 11664. 13128. 14616. 16080. 17544.
Forecast Series Axis
Mod
el R
un T
ime
Axis
![Page 6: Working with Forecast Models in Ferretferret.pmel.noaa.gov/tutorials/Using_Forecast_Model_Run... · 2016. 6. 28. · Ferret syntax: how to regrid using an auxiliary coordinate •](https://reader035.fdocuments.us/reader035/viewer/2022081623/6143fd1d6cc38f259c25e309/html5/thumbnails/6.jpg)
netCDF CDL markup language showing how‘auxiliary coordinates’ are defined in a CF file
6
dimensions:ntime = 10lev = 15; // number of levels
float temp(ntime,lev);temp: long_name = “temperature”;temp: coordinates = “depth”;
float depth(lev);depth: units = “meters”;depth: axis = “Z”;
dimensions:ntime = 10nrun = 15; // number of runs
float temp(nrun,ntime);temp: long_name = “temperature”;temp: coordinates = “times”;
float times(nrun, ntime);times: units = “days since 01-01-1996”;
depth in a layered model
2D times inan an FMRC
![Page 7: Working with Forecast Models in Ferretferret.pmel.noaa.gov/tutorials/Using_Forecast_Model_Run... · 2016. 6. 28. · Ferret syntax: how to regrid using an auxiliary coordinate •](https://reader035.fdocuments.us/reader035/viewer/2022081623/6143fd1d6cc38f259c25e309/html5/thumbnails/7.jpg)
Ferret syntax: how to regrid usingan auxiliary coordinate
• Depth: temp[ GZ(density) = My_density_axis]• Time2d: temp[ GT(tf_times)= TF_CAL_T @FMRC]
7
Regridding in a manner analogous to a depth-to-density transformation, we convert the FMRC compact form into diagonal form
![Page 8: Working with Forecast Models in Ferretferret.pmel.noaa.gov/tutorials/Using_Forecast_Model_Run... · 2016. 6. 28. · Ferret syntax: how to regrid using an auxiliary coordinate •](https://reader035.fdocuments.us/reader035/viewer/2022081623/6143fd1d6cc38f259c25e309/html5/thumbnails/8.jpg)
Forecast Skill Visualization of an FMRC
8
Similarly also replace the Forecast time axiswith a lead (lag) time axis
temp[GT(tf_times)=TF_CAL_T ,GF(tf_times)=TF_LAG_F]
Our Goal!
![Page 9: Working with Forecast Models in Ferretferret.pmel.noaa.gov/tutorials/Using_Forecast_Model_Run... · 2016. 6. 28. · Ferret syntax: how to regrid using an auxiliary coordinate •](https://reader035.fdocuments.us/reader035/viewer/2022081623/6143fd1d6cc38f259c25e309/html5/thumbnails/9.jpg)
That’s the background.
Now, what does it feel like to analyzeforecast model outputs using Ferret?
9
![Page 10: Working with Forecast Models in Ferretferret.pmel.noaa.gov/tutorials/Using_Forecast_Model_Run... · 2016. 6. 28. · Ferret syntax: how to regrid using an auxiliary coordinate •](https://reader035.fdocuments.us/reader035/viewer/2022081623/6143fd1d6cc38f259c25e309/html5/thumbnails/10.jpg)
10
Start up the dataset as you would any other. “N” is the forecast index> pyferret
yes? USE “http://server/path/myfiles/TAUX_fmrc.ncd” ! aggregation via TDSyes? FILL tau_x[L=1,N=1]
I/X = longitudeJ/Y = latitudeK/Z = depthL/T = timeM/E = ensemble memberN/F = forecast run
How is the variability distributed?
![Page 11: Working with Forecast Models in Ferretferret.pmel.noaa.gov/tutorials/Using_Forecast_Model_Run... · 2016. 6. 28. · Ferret syntax: how to regrid using an auxiliary coordinate •](https://reader035.fdocuments.us/reader035/viewer/2022081623/6143fd1d6cc38f259c25e309/html5/thumbnails/11.jpg)
11
yes? FILL/N=1 tau_x[L=@std]
high variability
Another standard Ferret analysis -- take the time-standard deviation to visualize how variability is distributed
![Page 12: Working with Forecast Models in Ferretferret.pmel.noaa.gov/tutorials/Using_Forecast_Model_Run... · 2016. 6. 28. · Ferret syntax: how to regrid using an auxiliary coordinate •](https://reader035.fdocuments.us/reader035/viewer/2022081623/6143fd1d6cc38f259c25e309/html5/thumbnails/12.jpg)
12
SHADE/X=180/Y=0 tau_x[GT(times)=TF_CAL_T]
Every month, another run
Each run,12 months
View the forecast series at 180W, 0N in ‘diagonal’ form
![Page 13: Working with Forecast Models in Ferretferret.pmel.noaa.gov/tutorials/Using_Forecast_Model_Run... · 2016. 6. 28. · Ferret syntax: how to regrid using an auxiliary coordinate •](https://reader035.fdocuments.us/reader035/viewer/2022081623/6143fd1d6cc38f259c25e309/html5/thumbnails/13.jpg)
13
FILL/X=180/Y=0 tau_x[GT(times)=TF_CAL_T,GF(times)=TF_LAG_F]
forecast skill visualization: as we look towards the right, we see how long in advance we were able to forecast the variable
Can we quantify how good our forecasts were?
![Page 14: Working with Forecast Models in Ferretferret.pmel.noaa.gov/tutorials/Using_Forecast_Model_Run... · 2016. 6. 28. · Ferret syntax: how to regrid using an auxiliary coordinate •](https://reader035.fdocuments.us/reader035/viewer/2022081623/6143fd1d6cc38f259c25e309/html5/thumbnails/14.jpg)
14
LET tau_tf = tau_x[gt(times)=TF_CAL_T,gf(times)=TF_LAG_F]LET tau_fe = tau_tf - tau_tf[N=1]FILL/X=180/Y=0 tau_fe
We define and view the forecast error, tau_fe, relative to the N=1 initialization state
Is there a season cycleto the errors?
Lets normalize this by the variability at each XY point
![Page 15: Working with Forecast Models in Ferretferret.pmel.noaa.gov/tutorials/Using_Forecast_Model_Run... · 2016. 6. 28. · Ferret syntax: how to regrid using an auxiliary coordinate •](https://reader035.fdocuments.us/reader035/viewer/2022081623/6143fd1d6cc38f259c25e309/html5/thumbnails/15.jpg)
15
LET tau_stddev = tau_tf[N=1,L=@std]LET/TITLE=… tau_nfe = tau_fe/tau_stddevFILL/Y=180/Y=0/T=… tau_nfe We normalize the
forecast error, dividing by its time-std dev at every location
How long in advance were our forecasts “good”?
![Page 16: Working with Forecast Models in Ferretferret.pmel.noaa.gov/tutorials/Using_Forecast_Model_Run... · 2016. 6. 28. · Ferret syntax: how to regrid using an auxiliary coordinate •](https://reader035.fdocuments.us/reader035/viewer/2022081623/6143fd1d6cc38f259c25e309/html5/thumbnails/16.jpg)
16
LET tau_abs = ABS(tau_nfe)LET tau_fcst_lead = tau_abs[F=@loc:.5] / 730LET/TITLE=“…” tau_skill = MISSING(tau_fcst_lead,8) ! cap at 8 moPLOT/X=180/Y=0 tau_skill
cap
Lead time (months) for achieving “good” forecast error
Lets say “good” == abs. val. of error within 0.5 std dev of final value
What is the average lead timeto get a “good” forecast?
![Page 17: Working with Forecast Models in Ferretferret.pmel.noaa.gov/tutorials/Using_Forecast_Model_Run... · 2016. 6. 28. · Ferret syntax: how to regrid using an auxiliary coordinate •](https://reader035.fdocuments.us/reader035/viewer/2022081623/6143fd1d6cc38f259c25e309/html5/thumbnails/17.jpg)
17
LIST /X=180/Y=0 tau_skill[L=@ave]VARIABLE : # of months lead achieving 0.5 std devFILENAME : TAUX_fmrc.ncdFILEPATH : http://dunkel.pmel.noaa.gov:8940/thredds/dodsC/andrew/taux/LONGITUDE: 178.8ELATITUDE : 1STIME : 17-JAN-1996 12:00 to 16-DEC-1999 00:00 (averaged)
4.165
The average lead time at which the forecastbecomes accurate to 0.5 std dev
at X=180, Y=0
Now lets see how our skill is distributed globally
![Page 18: Working with Forecast Models in Ferretferret.pmel.noaa.gov/tutorials/Using_Forecast_Model_Run... · 2016. 6. 28. · Ferret syntax: how to regrid using an auxiliary coordinate •](https://reader035.fdocuments.us/reader035/viewer/2022081623/6143fd1d6cc38f259c25e309/html5/thumbnails/18.jpg)
18
yes? FILL tau_skill[L=@ave] Global distribution of “good” forecast -- lead time in months