Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

monthly time steps from the RCP 8.5 and 4.5 scenarios

hannay

Cecile Hannay
AMWG Liaison
Staff member
From user:
I am looking at the data from the RCP 8.5 and 4.5 scenarios from the CMIP5 experiments. When I pulled up the variable files in ncview, I noticed that the monthly time steps were for the middle of each month. I am trying to find out if the data are just from that day or if they represent an average for the entire month, and what time of day they represent (if they are an average value, is that nighttime and daytime temperatures, for example). I was unable to find any detailed documentation for the model runs.


Thank you,
 

hannay

Cecile Hannay
AMWG Liaison
Staff member
Usually the monthly value from CAM is the value averaged over the month. For instance, T for January is the average of T for the all month of January. It will average night and day too.
 
I am interested in future changes that may impact Texas climate. Has anyone calculated values or indices for the following in the CESM1CAM5 or CCSM4 experiments? (specifically RCP 4.5 and 8.5): AMO, AMOC, ENSO/El Nino/La Nina, PDO, PDSI (or another drought index)Even general information on expected changes under these scenarios would help me to compare to the historical record. 
 

strandwg

Moderator
Staff member
Monthly average fields represent the average of all model timesteps for that month (typically 72 timesteps per day). There is no distinction between local day and local night. The actual values of 'time' do not represent a specific actual time, just a convenient way to denote the specific month (Jan, Feb, [...] Dec). 
 
I am trying to calculate the time steps for the data, so I can pick out specific months to map on their own or average together (I want to look at seasonal data averaged over individual decades). I created an Excel sheet to calculate the mid-month point for ever month of every year from 2005-2100, accounting for leap year. However, I am slightly off on my calculations (I'm overshooting). There should be 1152 time bands totalling 35,024.5 days since 2005, but I am calculating 35,048.5 days. Is there a file that specifies the time steps for the run, so I can compare and find my error and make sure that I am pulling out the right data for my maps?I can't upload the file. There is an error in the attachment upload system. Instead of file extensions xls and xlsx, it is looking for extensions xsl and xslx. They must have been typed in incorrectly.Thank you,Brandi
 

strandwg

Moderator
Staff member
CAM doesn't have leap years. All years are exactly 365 days, which accounts for the 24 day difference you're seeing.You can 'ncdump -c' the file and look at the values for 'time' to see what they are.
 
I was able to properly calculate the values for the time_bnds variable now that I know not to use leap year. However, I'm having trouble using a specific month to create a map in NCL. I performed an ncdump -v on time_bnds, and ts, but it seems like the two are not connected. Should I read in both as a variable in NCL? If so, do I use the number corresponding to the particular month and year (the number of days to the midpoint of that month) for time_bnds? In other modelling runs I've worked with, there was a single output file per time step with multiple variables, but this one is the exact oppopsite.
Thank you,Brandi
 

strandwg

Moderator
Staff member
I'm a bit confused as to the nature of your question. 'ts' is the variable 'surface_temperature', defined as a three-dimensional field with coordinates 'lon', 'lat', and 'time'; 'time_bnds' defines the edges of the 'time' coordinate array. 'time' is one-dimensional, 'time_bnds' is dimensioned 'time' * 2, with 'time_bnds(*,1)' defining the time value of the beginning of each month, 'time_bnds(*,2)' definining the time of the end of the month, and 'time' being precisely the average of those two, i.e., the middle of the month. There's no correlation between the values of 'ts' and 'time'. All CMIP5 data (which is what I presume you're using) is required to be all time values for a single variable - the other format is typical model output, which is all fields for a specific model time.Can you be a little more explicit as to what you're trying to do? Thanks. 
 
The only information I have on the variables is what I've been able to see from ncview and using ncdump. After looking at ncview, I thought that time_bnds represented the number of days until the current month in the middle of the month (Jan 2005 would be 15.5). I didn't realize that there were 2 for each month representing the number of days to the beginning and end of the month. Basically, I want to be able to take the surface temperature for a single month of a single year and map it. Then, I want to take several months from several years and average them, then make one map (seasonal average over 2 decades, etc.). I just don't know how to extrapolate a single month or several months from the data file (or if this is even possible for this data set). Brandi
 

strandwg

Moderator
Staff member
Now I understand. The 'time' and 'time_bnds' are days relative to a specific date, not to each other. Take a look at the "units" attribute of 'time'; that will tell you what the origin time is. 'ncview' allows you show a single month or animate over months. 'NCL' and other tools allow you to average groups of months together; depending on what you want. Averaging each set of 12 months starting in January will get you the annual average. Averaging the 3rd, 4th and 5th month (assuming January is the 1st month) will get you the MAM (March-April-May) average for the first year, averaging the 15th, 16th, and 17th months will get you MAM for the 2nd year, and so on. Does that make sense? 
 
That makes sense, but I'm atually trying to do more than just view a global map. I want to look at a particular area for a specific month and year. I know how to set up the map, except for getting the surface temperature for just one month. I've used NCL in the past to map model output, but I just read in a data file for a particular month and passed the specific variable information that I wanted to map. The CMIP5 files have a single variable with all the time steps of the run. I can't just read in the file and pass ts as the variable, because it's not for a specific month. I need to know the NCL script to use to get a specific month from this file. When I dumped the time_bnds, I got 2 numbers per line, I'm assuming that they represent the beginning and end of each month. I need to go back and calculate the number of days to the beginning and end of each month for every year for the 95 years of the run. Once I've done that, I'll know which numbers represent a specific month of a specific year, but I still don't know how to read that into NCL. I hope that clarifies what I'm trying to do.Brandi
 

strandwg

Moderator
Staff member
What you want to do is something like;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl";begin;************************************************; read in netCDF file, get 1st month of data;************************************************  a  = addfile("ts_Amon_CCSM4_rcp85_r1i1p1_200601-210012.nc","r")  ts = a->ts(0,:,:);************************************************; create plot;************************************************  wks = gsn_open_wks("ncgm","TS")               ; open an NCGM file   res                      = True               ; plot mods desired  res@tiMainString         = "Default Color"    ; main title  res@cnFillOn             = True               ; turn on color fill   plot = gsn_csm_contour_map_ce(wks,ts,res)     ; create plotend You can play around with how you read in 'ts' in the "ts = a->ts" line. NCL provides many functions to create various averages and convert the 'time' index to month-year values; see the relevant documentation. 
 
I understand now. The time is just a dimension within ts, (and I'm assuming the other two dimensions are just lat and lon). Now I just to figure out exactly how it's indexed, and I should be good to go. Thank you so much for your help.
Brandi 
 
Top