From 31a7bb0b32a4186017842b442d3ca49953ba730b Mon Sep 17 00:00:00 2001 From: Lee de Mora Date: Wed, 26 Apr 2023 10:30:03 +0100 Subject: [PATCH] Updated to woa 18. --- bgcval2/bgcval2_make_report.py | 12 +++++++++--- bgcval2/p2p/matchDataAndModel.py | 4 ++++ key_files/ma_mld.yml | 4 ++++ key_files/ma_nitrate.yml | 3 ++- key_files/ma_o2.yml | 2 +- key_files/ma_phosphate.yml | 3 ++- key_files/ma_silicate.yml | 3 ++- key_files/ma_sss.yml | 3 ++- key_files/ma_sst.yml | 3 ++- key_lists/missionatlantic_p2p.yml | 2 +- 10 files changed, 29 insertions(+), 10 deletions(-) diff --git a/bgcval2/bgcval2_make_report.py b/bgcval2/bgcval2_make_report.py index dbb84d71..bf97dff1 100755 --- a/bgcval2/bgcval2_make_report.py +++ b/bgcval2/bgcval2_make_report.py @@ -960,7 +960,7 @@ def newImageLocation(fn): if level2Physics or level2_auto: - if level2Physics: + if level2Physics: l2Fields = [ 'Temperature', 'Salinity', @@ -978,9 +978,9 @@ def newImageLocation(fn): region = 'Global' if level2_auto: - l2Fields = glob(imagedir + '/' + jobID + '/P2Pplots') + l2Fields = glob(imagedir + '/' + jobID + '/P2Pplots/*/*') l2Fields = [os.path.basename(fn) for fn in sorted(l2Fields)] - levels = ['Surface', '50m', '100m', '200m', '500m', '750m', '1000m', '1500m', '2000m', '4000m','Transect'] + levels = ['Surface', '4000m', '2000m', '1000m', '750m','500m','200m', '100m', '50m', 'Transect'] outdict = {} outlevels = {} for i, fn in enumerate(l2Fields): @@ -1001,6 +1001,7 @@ def newImageLocation(fn): Descriptions = {} FileLists = {} FileOrder = {} + #print(l2Fields, slices) for key in sorted(l2Fields): #if key not in ['Alkalinity','Nitrate']: continue @@ -1039,6 +1040,11 @@ def newImageLocation(fn): glob(imagedir + '/' + jobID + '/P2Pplots/*/*' + key + '*/*/*' + s + '*' + region + '*' + key + '*' + year + '*robinquad-cartopy.png')) + vfiles.extend( + glob(imagedir + '/' + jobID + '/P2Pplots/*/*' + key + + '*/*/*' + s + '*' + region + '*' + key + '*' + + year + '*.png')) + if s in [ 'Transect', ]: diff --git a/bgcval2/p2p/matchDataAndModel.py b/bgcval2/p2p/matchDataAndModel.py index 3b11aee3..471932b2 100755 --- a/bgcval2/p2p/matchDataAndModel.py +++ b/bgcval2/p2p/matchDataAndModel.py @@ -268,6 +268,7 @@ def _convertDataTo1D_(self, ): '100m', '200m', '500m', + '750m', '1000m', '2000m', '4000m', @@ -280,6 +281,7 @@ def _convertDataTo1D_(self, ): if self.depthLevel == '100m': z = 100. if self.depthLevel == '200m': z = 200. if self.depthLevel == '500m': z = 500. + if self.depthLevel == '750m': z = 750. if self.depthLevel == '1000m': z = 1000. if self.depthLevel == '2000m': z = 2000. if self.depthLevel == '4000m': z = 4000. @@ -1124,6 +1126,8 @@ def var_to_datetime(ncvar): if units in ['months since 0000-01-01 00:00:00', ]: units = 'months since 2000-01-01 00:00:00' return num2date(ncvar[:], 'months since 2000-01-01 00:00:00', calendar='360_day') + elif units.find('months since')>-1: + return num2date(ncvar[:], units, calendar='360_day') return num2date(ncvar[:], ncvar.units, calendar=calendar) diff --git a/key_files/ma_mld.yml b/key_files/ma_mld.yml index 28f9c681..c63b8222 100644 --- a/key_files/ma_mld.yml +++ b/key_files/ma_mld.yml @@ -8,6 +8,10 @@ modelFiles : $BASEDIR_MODEL/$JOBID/SENEMO*_1m_*grid_T*.nc gridFile : /data/proteus2/scratch/ledm/MissionAtlantic/SENEMO/eORCA025_mesh_mask_mes_v2.nc model_convert : choose_best_var model_vars : somxzint1 mldr10_1 +dataFile : $BASEDIR_OBS/WOA/annual/woa18_A5B7_M0200_01.nc +data_vars : M_an +data_convert : NoChange +data_source : WOA13 layers : layerless regions : Global NorthAtlanticOcean SouthAtlanticOcean EquatorialAtlanticOcean ITCZ metrics : mean, max #, median, 10pc, 20pc, 30pc, 40pc, 50pc, 60pc, 70pc, 80pc, 90pc, min, max diff --git a/key_files/ma_nitrate.yml b/key_files/ma_nitrate.yml index 28592115..5b56cf82 100644 --- a/key_files/ma_nitrate.yml +++ b/key_files/ma_nitrate.yml @@ -8,7 +8,8 @@ modelFiles : $BASEDIR_MODEL/$JOBID/SENEMO*_1m_*ptrc_T*.nc gridFile : /data/proteus2/scratch/ledm/MissionAtlantic/SENEMO/eORCA025_mesh_mask_mes_v2.nc model_vars : N3_n model_convert : NoChange -dataFile : $BASEDIR_OBS/WOA/annual/woa13_all_n00_01.nc + #dataFile : $BASEDIR_OBS/WOA/annual/woa13_all_n00_01.nc +dataFile : $BASEDIR_OBS/WOA/annual/woa18_all_n00_01.nc data_vars : n_an data_convert : NoChange data_source : WOA13 diff --git a/key_files/ma_o2.yml b/key_files/ma_o2.yml index fb6ef8d7..52735742 100644 --- a/key_files/ma_o2.yml +++ b/key_files/ma_o2.yml @@ -13,6 +13,6 @@ dataFile : $BASEDIR_OBS/WOA/annual/woa18_all_o00_01.nc data_vars : o_an data_convert : NoChange data_source : WOA18 -layers : 500m #Surface #50m 100m +layers : 500m 750m 1000m #Surface #50m 100m regions : Global NorthAtlanticOcean SouthAtlanticOcean EquatorialAtlanticOcean metrics : mean #, median, 10pc, 20pc, 30pc, 40pc, 50pc, 60pc, 70pc, 80pc, 90pc, min, max diff --git a/key_files/ma_phosphate.yml b/key_files/ma_phosphate.yml index dedfbd3b..f24ecf14 100644 --- a/key_files/ma_phosphate.yml +++ b/key_files/ma_phosphate.yml @@ -8,7 +8,8 @@ modelFiles : $BASEDIR_MODEL/$JOBID/SENEMO*_1m_*ptrc_T*.nc gridFile : /data/proteus2/scratch/ledm/MissionAtlantic/SENEMO/eORCA025_mesh_mask_mes_v2.nc model_vars : N1_p model_convert : NoChange -dataFile : $BASEDIR_OBS/WOA/annual/woa13_all_p00_01.nc + #dataFile : $BASEDIR_OBS/WOA/annual/woa13_all_p00_01.nc +dataFile : $BASEDIR_OBS/WOA/annual/woa18_all_p00_01.nc data_vars : p_an data_convert : NoChange data_source : WOA13 diff --git a/key_files/ma_silicate.yml b/key_files/ma_silicate.yml index 647f76c8..b9db9b62 100644 --- a/key_files/ma_silicate.yml +++ b/key_files/ma_silicate.yml @@ -8,7 +8,8 @@ modelFiles : $BASEDIR_MODEL/$JOBID/SENEMO*_1m_*ptrc_T*.nc gridFile : /data/proteus2/scratch/ledm/MissionAtlantic/SENEMO/eORCA025_mesh_mask_mes_v2.nc model_vars : N5_s model_convert : NoChange -dataFile : $BASEDIR_OBS/WOA/annual/woa13_all_i00_01.nc + #ataFile : $BASEDIR_OBS/WOA/annual/woa13_all_i00_01.nc +dataFile : $BASEDIR_OBS/WOA/annual/woa18_all_i00_01.nc data_vars : i_an data_convert : NoChange data_source : WOA13 diff --git a/key_files/ma_sss.yml b/key_files/ma_sss.yml index e6668d7f..8b1f1120 100644 --- a/key_files/ma_sss.yml +++ b/key_files/ma_sss.yml @@ -7,7 +7,8 @@ modelgrid : eORCA025 modelFiles : $BASEDIR_MODEL/$JOBID/SENEMO*_1m_*grid_T*.nc gridFile : /data/proteus2/scratch/ledm/MissionAtlantic/SENEMO/eORCA025_mesh_mask_mes_v2.nc model_vars : so_abs so -dataFile : /data/sthenno1/scratch/ledm/Observations/WOA/annual/woa13_decav_s00_01v2_AMM.nc + # dataFile : /data/sthenno1/scratch/ledm/Observations/WOA/annual/woa13_decav_s00_01v2_AMM.nc +dataFile : /data/sthenno1/scratch/ledm/Observations/WOA/annual/woa18_decav_s00_01.nc data_vars : s_an data_convert : NoChange data_source : WOA13 diff --git a/key_files/ma_sst.yml b/key_files/ma_sst.yml index ccb51937..20558e9e 100644 --- a/key_files/ma_sst.yml +++ b/key_files/ma_sst.yml @@ -8,7 +8,8 @@ modelFiles : $BASEDIR_MODEL/$JOBID/SENEMO*_1m_*grid_T*.nc gridFile : /data/proteus2/scratch/ledm/MissionAtlantic/SENEMO/eORCA025_mesh_mask_mes_v2.nc model_vars : thetao thetao_con votemper model_convert : choose_best_var -dataFile : /data/sthenno1/scratch/ledm/Observations/WOA/annual/woa13_decav_t00_01v2_AMM.nc + #dataFile : /data/sthenno1/scratch/ledm/Observations/WOA/annual/woa13_decav_t00_01v2_AMM.nc +dataFile : /data/sthenno1/scratch/ledm/Observations/WOA/annual/woa18_decav_t00_01.nc data_vars : t_an data_convert : NoChange data_source : WOA13 diff --git a/key_lists/missionatlantic_p2p.yml b/key_lists/missionatlantic_p2p.yml index b534d770..8b60dcfd 100644 --- a/key_lists/missionatlantic_p2p.yml +++ b/key_lists/missionatlantic_p2p.yml @@ -9,7 +9,7 @@ keys: #MA_Drake: True #MA_AMOC_26N: True #MA_ZOS: True - # MA_MLD: True + #MA_MLD: True #MA_MLD_Sigma: True # Ice