generated from NEFSC/NEFSC-Template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
207 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
; $ID: SOE_ANNUAL_TIMESERIES.PRO, 2024-02-29-12, USER-KJWH $ | ||
PRO SOE_ANNUAL_TIMESERIES, VERSION_STRUCT, PRODS=PRODS, BUFFER=BUFFER | ||
|
||
;+ | ||
; NAME: | ||
; SOE_ANNUAL_TIMESERIES | ||
; | ||
; PURPOSE: | ||
; $PURPOSE$ | ||
; | ||
; PROJECT: | ||
; SOE_PHYTOPLANKTON | ||
; | ||
; CALLING SEQUENCE: | ||
; SOE_ANNUAL_TIMESERIES,$Parameter1$, $Parameter2$, $Keyword=Keyword$, .... | ||
; | ||
; REQUIRED INPUTS: | ||
; Parm1.......... Describe the positional input parameters here. | ||
; | ||
; OPTIONAL INPUTS: | ||
; Parm2.......... Describe optional inputs here. If none, delete this section. | ||
; | ||
; KEYWORD PARAMETERS: | ||
; KEY1........... Document keyword parameters like this. Note that the keyword is shown in ALL CAPS! | ||
; | ||
; OUTPUTS: | ||
; OUTPUT.......... Describe the output of this program or function | ||
; | ||
; OPTIONAL OUTPUTS: | ||
; None | ||
; | ||
; COMMON BLOCKS: | ||
; None | ||
; | ||
; SIDE EFFECTS: | ||
; None | ||
; | ||
; RESTRICTIONS: | ||
; None | ||
; | ||
; EXAMPLE: | ||
; | ||
; | ||
; NOTES: | ||
; $Citations or any other useful notes$ | ||
; | ||
; COPYRIGHT: | ||
; Copyright (C) 2024, Department of Commerce, National Oceanic and Atmospheric Administration, National Marine Fisheries Service, | ||
; Northeast Fisheries Science Center, Narragansett Laboratory. | ||
; This software may be used, copied, or redistributed as long as it is not sold and this copyright notice is reproduced on each copy made. | ||
; This routine is provided AS IS without any express or implied warranties whatsoever. | ||
; | ||
; AUTHOR: | ||
; This program was written on February 29, 2024 by Kimberly J. W. Hyde, Northeast Fisheries Science Center | NOAA Fisheries | U.S. Department of Commerce, 28 Tarzwell Dr, Narragansett, RI 02882 | ||
; | ||
; MODIFICATION HISTORY: | ||
; Feb 29, 2024 - KJWH: Initial code written | ||
;- | ||
; **************************************************************************************************** | ||
ROUTINE_NAME = 'SOE_ANNUAL_TIMESERIES' | ||
COMPILE_OPT IDL3 | ||
SL = PATH_SEP() | ||
|
||
IF ~N_ELEMENTS(VERSION_STRUCT) THEN MESSAGE, 'ERROR: Must provide the SOE VERSION structure' | ||
IF ~N_ELEMENTS(BUFFER) THEN BUFFER=0 | ||
IF ~N_ELEMENTS(PRODS) THEN PRODS = ['CHLOR_A','PPD','PPD_REQUIRED','PSC_MICRO','PSC_NANO','PSC_PICO','PSC_FMICRO','PSC_FNANO','PSC_FPICO','SST'] | ||
IF ~N_ELEMENTS(PAL) THEN PAL = 'PAL_DEFAULT' | ||
IF ~N_ELEMENTS(YEAR_COLOR) THEN YCLR = 'RED' ELSE YCLR = YEAR_COLOR | ||
|
||
TYPES = ['STATS'];,'ANOMS'] | ||
|
||
VERSTR = VERSION_STRUCT | ||
SHAPES = VERSTR.SHAPEFILES | ||
MP = VERSTR.INFO.MAP_OUT | ||
DR = VERSTR.INFO.DATERANGE | ||
YEARS = YEAR_RANGE(DR,/STRING) | ||
NYEARS = N_ELEMENTS(YEARS) | ||
|
||
MINDATE = YEARS[0]+'0101000000' | ||
MAXDATE = YEARS[-1]+'0101000000' | ||
AX = DATE_AXIS([MINDATE,MAXDATE],/YEAR,STEP=4) | ||
X2TICKNAME = REPLICATE(' ',N_ELEMENTS(AX.TICKNAME)) | ||
YTICKNAMES=[' ',' ',' '] | ||
CHARSIZE = 11 | ||
MARGIN = [0.03,0.0,0.11,0.0] | ||
|
||
STRPRODS = TAG_NAMES(VERSTR.PROD_INFO) | ||
OK = WHERE_MATCH(STRPRODS,PRODS,COUNT) | ||
IF COUNT EQ 0 THEN STOP | ||
PRODS = PRODS[OK] | ||
|
||
IF ~N_ELEMENTS(DIR_PLOTS) THEN DIRPLT = VERSTR.DIRS.DIR_PLOTS+'ANNUAL_TIMESERIES'+SL ELSE DIR_MOV = DIR_PLOTS & DIR_TEST, DIRPLT | ||
IF ~N_ELEMENTS(DATFILE) THEN DATFILE = VERSTR.INFO.DATAFILE | ||
FULLSTRUCT = IDL_RESTORE(DATFILE) | ||
FULLSTRUCT[WHERE(FULLSTRUCT.MATH EQ 'STACKED_STATS')].MATH = 'STATS' | ||
FULLSTRUCT[WHERE(FULLSTRUCT.MATH EQ 'STACKED_ANOMS')].MATH = 'ANOM' | ||
STRUCT = FULLSTRUCT[WHERE(FULLSTRUCT.MATH EQ 'STATS',/NULL)] | ||
ASTRUCT = FULLSTRUCT[WHERE(FULLSTRUCT.MATH EQ 'ANOM',/NULL)] | ||
|
||
FOR S=0, N_ELEMENTS(PRODS)-1 DO BEGIN | ||
APROD = PRODS[S] | ||
PSTR = VERSTR.PROD_INFO.(WHERE(TAG_NAMES(VERSTR.PROD_INFO) EQ APROD,/NULL)) | ||
DSET = PSTR.DATASET | ||
TSET = PSTR.TEMP_DATASET | ||
|
||
CASE VALIDS('PRODS',APROD) OF | ||
'SST': BEGIN & YTITLE=UNITS('TEMP') & SRNG=[0,30] & PSTATS='AMEAN' & ARNG=[-5,5] & AMID=0 & ASTATS='AMEAN' & END | ||
'CHLOR_A': BEGIN & YTITLE=UNITS('CHLOR_A') & SRNG=[0.5,2.0] & PSTATS='MED' & ARNG=[0.5,2] & AMID=1 & ASTATS='AMEAN' & END | ||
'PPD': BEGIN & YTITLE=UNITS('PPD') & SRNG=[0.0,1.5] & PSTATS='MED' & ARNG=[0.5,2] & AMID=1 & ASTATS='AMEAN' & END | ||
'PSC_MICRO': BEGIN & YTITLE=UNITS('PSC_MICRO') & SRNG=[0.0,10] & PSTATS='MED' & ARNG=[0.5,2] & AMID=1 & ASTATS='AMEAN' & END | ||
'PSC_NANO': BEGIN & YTITLE=UNITS('PSC_NANO') & SRNG=[0.0,10] & PSTATS='MED' & ARNG=[0.5,2] & AMID=1 & ASTATS='AMEAN' & END | ||
'PSC_PICO': BEGIN & YTITLE=UNITS('PSC_PICO') & SRNG=[0.0,10] & PSTATS='MED' & ARNG=[0.5,2] & AMID=1 & ASTATS='AMEAN' & END | ||
'PSC_FMICRO': BEGIN & YTITLE=UNITS('PSC_FMICRO') & SRNG=[0.0,1.0] & PSTATS='MED' & ARNG=[0.5,2] & AMID=1 & ASTATS='AMEAN' & END | ||
'PSC_FNANO': BEGIN & YTITLE=UNITS('PSC_FNANO') & SRNG=[0.0,1.0] & PSTATS='MED' & ARNG=[0.5,2] & AMID=1 & ASTATS='AMEAN' & END | ||
'PSC_FPICO': BEGIN & YTITLE=UNITS('PSC_FPICO') & SRNG=[0.0,1.0] & PSTATS='MED' & ARNG=[0.5,2] & AMID=1 & ASTATS='AMEAN' & END | ||
ENDCASE | ||
|
||
FOR T=0, N_ELEMENTS(TYPES)-1 DO BEGIN | ||
ATYP = TYPES[T] | ||
|
||
PNGFILE = DIRPLT + 'ANNUAL_' + MIN(YEARS) + '_' + MAX(YEARS) + '-' + APROD + '-' + ATYP + '-TIMESERIES.PNG' | ||
;PNGFILES = DIRPLT + 'ANNUAL_' + YEARS + '-' + ANAME + '-' + APROD + '-' + ATYP + '-TIMESERIES.PNG' | ||
|
||
IF FILE_MAKE(DATFILE, PNGFILE, OVERWRITE=OVERWRITE) EQ 0 THEN CONTINUE | ||
|
||
|
||
|
||
FOR H=0, N_ELEMENTS(SHAPES)-1 DO BEGIN | ||
SHAPE = VERSTR.SHAPEFILES.(H) | ||
NAMES = SHAPE.SUBAREA_NAMES | ||
TITLES = SHAPE.SUBAREA_TITLES | ||
COLORS = ['DEEP_SKY_BLUE','SALMON','MEDIUM_PURPLE','GOLD'] | ||
|
||
FOR N=0, N_ELEMENTS(NAMES)-1 DO BEGIN | ||
ANAME = NAMES[N] | ||
CASE ANAME OF | ||
'MAB': PLT_TITLE = 'Mid-Atlantic Bight' | ||
'GOM': PLT_TITLE = 'Gulf of Maine' | ||
'GB': PLT_TITLE = 'Georges Bank' | ||
'SS': PLT_TITLE = 'Scotian Shelf' | ||
ENDCASE | ||
PSTR = STRUCT[WHERE(STRUCT.PROD EQ APROD AND STRUCT.SUBAREA EQ ANAME AND STRUCT.PERIOD_CODE EQ 'A',/NULL)] | ||
CSTR = STRUCT[WHERE(STRUCT.PROD EQ APROD AND STRUCT.SUBAREA EQ ANAME AND STRUCT.PERIOD_CODE EQ 'ANNUAL',/NULL)] | ||
ASTR = ASTRUCT[WHERE(ASTRUCT.PROD EQ APROD AND ASTRUCT.SUBAREA EQ ANAME AND STRUCT.PERIOD_CODE EQ 'A',/NULL)] | ||
IF PSTR EQ [] THEN STOP | ||
|
||
; FOR R=0, N_ELEMENTS(PERIODS)-1 DO BEGIN | ||
; PER = PERIODS[R] | ||
; CASE PER OF | ||
; 'W': BEGIN & NDATES = 52 & CPER = 'WEEK' & END | ||
; 'M': BEGIN & NDATES = 12 & CPER = 'MONTH' & END | ||
; ENDCASE | ||
; | ||
; CSTR = PSTR[WHERE(PSTR.PERIOD_CODE EQ CPER,/NULL)] | ||
; IF CSTR EQ [] THEN STOP ; CONTINUE | ||
|
||
CDATE = DATE_2JD(DATE_2YEAR(PERIOD_2DATE(PSTR.PERIOD))) | ||
CASE ATYP OF | ||
'STATS': BEGIN & PDATA = GET_TAG(PSTR,PSTATS) & CDATA=GET_TAG(CSTR,PSTATS) & YRNG=SRNG & END | ||
'ANOMS': BEGIN & PDATA = GET_TAG(ASTR,PSTATS) & CDATA=AMID & YRNG=ARNG & END | ||
ENDCASE | ||
|
||
DIMS = [1000,600] | ||
THICK = 3 | ||
FONT_SIZE = 12 | ||
|
||
; PC = PLOT(AX.JD,REPLICATE(CDATA,2),COLOR=COLORS[N],THICK=THICK,FONT_SIZE=FONT_SIZE,TITLE='',/OVERPLOT,$ | ||
; XRANGE=AX.JD,YRANGE=YRNG,XTICKNAME=AX.TICKNAME,XTICKVALUES=AX.TICKV,XMINOR=0,XSTYLE=1,YMAJOR=YMAJOR,YTICKV=YTICKS,YTITLE=YTITLE,DIMENSIONS=DIMS,MARGIN=[0.08,0.08,0.08,0.08]) | ||
|
||
PA = PLOT(CDATE,PDATA,COLOR=COLORS[N],THICK=THICK,FONT_SIZE=FONT_SIZE,/OVERPLOT,NAME=ANAME,$ | ||
XRANGE=AX.JD,YRANGE=YRNG,XTICKNAME=AX.TICKNAME,XTICKVALUES=AX.TICKV,XSTYLE=1,YMAJOR=YMAJOR,YTICKV=YTICKS,YTITLE=YTITLE,DIMENSIONS=DIMS,MARGIN=[0.08,0.08,0.08,0.08]) | ||
LG = LEGEND(TARGET=PA,POSITION=[0.1,0.9-N*0.025],/NORMAL,COLOR='BLACK',LINESTYLE=6,SAMPLE_WIDTH=0.07,HORIZONTAL_ALIGNMENT=0) | ||
|
||
ENDFOR ; NAMES | ||
|
||
stop | ||
PA.SAVE, PNGFILE | ||
PA.CLOSE | ||
ENDFOR ; SHAPES | ||
ENDFOR ; TYPES | ||
ENDFOR ; PRODS | ||
|
||
|
||
END ; ***************** End of SOE_ANNUAL_TIMESERIES ***************** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+0 Bytes
(100%)
V2024/DATA_EXTRACTS/V2024-NES_EPU_NOESTUARIES-COMPILED_DATA_FILE.SAV
Binary file not shown.
Binary file added
BIN
+292 KB
V2024/PLOTS/ANNUAL_TIMESERIES/ANNUAL_1998_2023-CHLOR_A-STATS-TIMESERIES.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+289 KB
V2024/PLOTS/ANNUAL_TIMESERIES/ANNUAL_1998_2023-PPD-STATS-TIMESERIES.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-518 KB
V2024/PLOTS/PSC/W_2023-NES_EPU_NOESTUARIES-PHYTOSIZE-CLIMATOLOGY.png
Binary file not shown.
Binary file modified
BIN
-3.85 KB
(98%)
...PLOTS/TIMESERIES_ANIMATION/CHLOR_A_PNGS/W_1998-MAB-CHLOR_A-ANOMS-TIMESERIES.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.97 KB
(98%)
.../TIMESERIES_ANIMATION/CHLOR_A_PNGS/W_1998_2023-MAB-CHLOR_A-ANOMS-TIMESERIES.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.39 KB
(99%)
...PLOTS/TIMESERIES_ANIMATION/CHLOR_A_PNGS/W_1999-MAB-CHLOR_A-ANOMS-TIMESERIES.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-4.21 KB
(98%)
...PLOTS/TIMESERIES_ANIMATION/CHLOR_A_PNGS/W_2000-MAB-CHLOR_A-ANOMS-TIMESERIES.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.64 KB
(99%)
...PLOTS/TIMESERIES_ANIMATION/CHLOR_A_PNGS/W_2001-MAB-CHLOR_A-ANOMS-TIMESERIES.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
...RGED_SUMS/MERGED_ANNUAL_SUM-NES_BOTTOM_TRAWL_STRATA-PPD-VGPM2_CHLOR_A-CCI-STATS-V2024.SAV
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
..._TRAWL_STRATA/SUMS-PPD-VGPM2/ANNUAL_SUM-NES_BOTTOM_TRAWL_STRATA-01030-PPD-VGPM2-STATS.SAV
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
..._TRAWL_STRATA/SUMS-PPD-VGPM2/ANNUAL_SUM-NES_BOTTOM_TRAWL_STRATA-01040-PPD-VGPM2-STATS.SAV
Binary file not shown.
Binary file modified
BIN
+2 Bytes
(100%)
...BOTTOM_TRAWL_STRATA/SUMS-PPD-VGPM2/ANNUAL_SUM-NES_BOTTOM_TRAWL_STRATA-PPD-VGPM2-STATS.SAV
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...TRAWL_STRATA/SUMS-PPD-VGPM2/MONTHLY_SUM-NES_BOTTOM_TRAWL_STRATA-01030-PPD-VGPM2-STATS.SAV
Binary file not shown.
Binary file modified
BIN
+1 Byte
(100%)
...TRAWL_STRATA/SUMS-PPD-VGPM2/MONTHLY_SUM-NES_BOTTOM_TRAWL_STRATA-01040-PPD-VGPM2-STATS.SAV
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...L_MERGED_SUMS/MERGED_ANNUAL_SUM-NES_EPU_NOESTUARIES-PPD-VGPM2_CHLOR_A-CCI-STATS-V2024.SAV
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...CTS/NES_EPU_NOESTUARIES/SUMS-PPD-VGPM2/ANNUAL_SUM-NES_EPU_NOESTUARIES-PPD-VGPM2-STATS.SAV
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...S/MERGED_ANNUAL_SUM-NES_EPU_STATISTICAL_AREAS_NOEST-PPD-VGPM2_CHLOR_A-CCI-STATS-V2024.SAV
Binary file not shown.
Binary file modified
BIN
+2 Bytes
(100%)
...AREAS_NOEST/SUMS-PPD-VGPM2/ANNUAL_SUM-NES_EPU_STATISTICAL_AREAS_NOEST-PPD-VGPM2-STATS.SAV
Binary file not shown.