-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Hi,
I want to subset a dataset of monthly chlorophyll data temporally and save that to a file. Specifically, I'm wanting to save Jan-Mar for each year to a new file. I accomplished this with the following code:
! Load the dataset
use https://oceanwatch.pifsc.noaa.gov/erddap/griddap/esa-cci-chla-monthly-v6-0
! Save Q1 to a new file
REPEAT/i=5:50:12 (let chl = chlor_a[x=180:240:0.5, y=5:45:0.5, l=`i`:`i+2`]; save/append/file=test_chl.nc chl)
This works except that the months that are saved are Jan, Feb, Mar, and Aug of each year, with Aug not having any data. I have tried the same code but using t to index instead (i.e. t=1-jan-`i`:31-mar-`i` ) but with the same result. I made a quick plot showing L=5:8 in the resulting output file so you can see the issue visually.
I'm not sure what I am doing wrong here. Is this a bug or should I be defining a new time axis? Is there a different way to pull out only data from a specific quarter of the year?
Thanks so much for your help,
Johanna
PS. (I'm using PyFerret v7.63, Darwin 19.6.0 - 12/10/21 on my MacOS Ventura 13.7.5)
