sst anomalies and standardized anomalies

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
sarques
Posts: 3
Joined: Sat Aug 11, 2018 12:58 pm America/New_York
Answers: 0

sst anomalies and standardized anomalies

by sarques » Sat Aug 11, 2018 7:58 pm America/New_York

Good afternoon,
I would like to calculate monthly sst anomalies and monthly standardized anomalies over a 15 years time series (MODIS AQUA L2 SSTs). I followed the great sst anomalies tutorial (seadas) available on you tube and I read couple posts here but I still have some questions.
The logical expression for anomalies is sst_anomalies = sst_D - sst_R which works pretty well one month at a time but what would be the expression for multiple sst_D (multiple months) and only one sst_R. Would you use AND between the different months? Parentheses somewhere? What would be the expression to divide all sst_Ds - sst_R by the standard deviation to calculate the standardized anomalies? I tried different math expressions but no success...My files are all collocated and reprojected and ready.
Thank you for your time and help.
Sylvie

Filters:

OB SeaDAS - knowles
Subject Matter Expert
Subject Matter Expert
Posts: 306
Joined: Mon Apr 07, 2008 4:40 pm America/New_York
Answers: 0
Been thanked: 3 times

sst anomalies and standardized anomalies

by OB SeaDAS - knowles » Mon Aug 13, 2018 9:37 am America/New_York

Sylvie,

The Collocation tool is used to combine precisely 2 files into single file which contains all the bands of the source files.  So I don't really understand what you mean by "My files are all collocated"?  You can of course iterate on the collocation tool to keep collocating one more file at a time to create a collocated file which contains many files of data.  But I'm not so sure that you did this as that would be a file of about 200+ bands for your case?

In the Case Study video https://www.youtube.com/watch?v=5dIwCK7IDXE you can see that a group of 3 months (level3 monthlies) were compared to a group of 3 months (climatology data).  For each of these 2 groups, the 3 months were reduced into a single file using OCSSW l3bin followed by l3mapgen.   The 2 resultant files where then combined into a single file using the Collocation tool.  The comparison was then done between two bands.

So if you want to combine many months and compare that result with a single month, use l3bin/l3mapgen to combine the many months and then Collocation to merge and then do the comparison.

Note: there is a command line version of Collocation.  See Help > Cookbooks > GPT Cookbook

If this doesn't answer your question then please post your math band equation so we can see what you are trying to do and where your syntax might be wrong.

Danny

sarques
Posts: 3
Joined: Sat Aug 11, 2018 12:58 pm America/New_York
Answers: 0

sst anomalies and standardized anomalies

by sarques » Mon Aug 13, 2018 1:59 pm America/New_York

Good morning Danny,
thank you for your answer. Yes, I did collocate all my months together...so I have a file with 180 months. I may have complicated things a little bit...In the same file, I also have my climatology file (sst_2003_2017). My goal was to subtract each month by the climatology to calculate the anomalies. My expression would be: (Jan_2003 - sst_2003_2017) AND (Feb_2003 - sst_2003_2017).../standard deviation
I am probably asking something that does not exist...
Maybe I should use my sst_2003_2007 and subtract it by the climatology mean and divide it by the standard deviation...
Sylvie

OB SeaDAS - knowles
Subject Matter Expert
Subject Matter Expert
Posts: 306
Joined: Mon Apr 07, 2008 4:40 pm America/New_York
Answers: 0
Been thanked: 3 times

sst anomalies and standardized anomalies

by OB SeaDAS - knowles » Tue Aug 14, 2018 10:47 am America/New_York

Others will need to chime in regarding specific statistical algorithm recommendations.

What jumps out at me is that you are mixing a logical expression with a mathematical expression.  The operator "AND" is not the same as the operator "+".

So what you likely are striving for is:
( (Jan_2003 - sst_2003_2017) + (Feb_2003 - sst_2003_2017) + ... )/standard deviation

It is a large equation ... 

Alternatively, a scripted GPT command line way of doing this would be:
1. Collocate 1 month with the climatology
2. Create math band (using collocated file) with expression = month - climatology (name it "sst_anomaly")
3. Repeat steps 1 and 2 for all months (note all bands must be identically named: "sst_anomaly")
4. Mosaic together all files created step 2
5. Create math band "sst_anomaly_sum" (using step 4 resultant file) with expression = sst_anomaly * sst_anomaly_count (this converts the Mosaic step aggregation  to a summation instead of a mean)
6. Collocate your standard_deviation with step 5 resultant file
7. Create Math band (using step 6 file) with expression = sst_anomaly_sum / standard_deviation
  
Danny

sarques
Posts: 3
Joined: Sat Aug 11, 2018 12:58 pm America/New_York
Answers: 0

sst anomalies and standardized anomalies

by sarques » Tue Aug 14, 2018 1:36 pm America/New_York

Good morning Danny,
thank you for helping me and spending time on this...Yes, I was confused with the expressions because you cannot add (+) them. I think that I figured it out in a different way and I would appreciate your insights if you have time.
I created a text file with all my monthly means over the period 2003 - 2017. I did bin and mapgen them in one file (L3bin/L3Mapgen), re-projected it and cropped it to my AOI. I then calculated statistics on it. The stats tool gave me the 2003-2017 long-term mean (9.7122) as well as the standard deviation (5.0017).
The standardized anomalies formula is Standardized departure from long-term mean (mean of the base period) = (mean temperature of the month - long-term mean)/standard deviation of the long-term mean
I then used this logical expression to calculate the standardized anomalies: (Monthly_means_2003_2017 - 9.7122)/5.0017
I did run statistics on the monthly files too to verify the results in Excel and I have a match. 
Thank you so much!
Sylvie

Post Reply