Skip to content
Snippets Groups Projects
Commit 5647790a authored by RODIER Quentin's avatar RODIER Quentin
Browse files

Quentin 13/12/2022: bugfix les_mean_subgrid + adapt compare.py script for...

Quentin 13/12/2022: bugfix les_mean_subgrid + adapt compare.py script for mesonh KTEST (better for testing LES diag)
parent 8705a49b
No related branches found
No related tags found
No related merge requests found
......@@ -66,7 +66,7 @@ REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PA
REAL, DIMENSION(D%NKLES,TLES%NLES_CURRENT_TCOUNT,D%NLESMASK), INTENT(INOUT) :: PA_MEAN
LOGICAL, OPTIONAL, INTENT(IN) :: OSUM
!
CALL LES_MEAN_SUBGRID_unpack3D(D,PA, PA_MEAN, OSUM)
CALL LES_MEAN_SUBGRID_unpack3D(D,TLES, PA, PA_MEAN, OSUM)
!
END SUBROUTINE LES_MEAN_SUBGRID_3D_PHY
!
......@@ -88,7 +88,7 @@ REAL, DIMENSION(D%NIJT), INTENT(IN) :: PA
REAL, DIMENSION(TLES%NLES_CURRENT_TCOUNT), INTENT(INOUT) :: PA_MEAN
LOGICAL, OPTIONAL, INTENT(IN) :: OSUM
!
CALL LES_MEAN_SUBGRID_unpackSURF(D,PA, PA_MEAN, OSUM)
CALL LES_MEAN_SUBGRID_unpackSURF(D, TLES, PA, PA_MEAN, OSUM)
!
END SUBROUTINE LES_MEAN_SUBGRID_SURF_PHY
!
......
......@@ -4,28 +4,17 @@ import xarray as xr
avail_groups=['Stations/sta1',
'LES_budgets/Miscellaneous/Cartesian/Not_time_averaged/Not_normalized/cart/',
'LES_budgets/Miscellaneous/Cartesian/Time_averaged/Not_normalized/cart/',
'LES_budgets/Mean/Cartesian/Not_time_averaged/Not_normalized/cart/',
'LES_budgets/Mean/Cartesian/Time_averaged/Not_normalized/cart/',
'LES_budgets/Resolved/Cartesian/Not_time_averaged/Not_normalized/cart/',
'LES_budgets/Resolved/Cartesian/Time_averaged/Not_normalized/cart/',
'LES_budgets/Subgrid/Cartesian/Not_time_averaged/Not_normalized/cart/',
'LES_budgets/Subgrid/Cartesian/Time_averaged/Not_normalized/cart/',
'LES_budgets/Surface/Cartesian/Not_time_averaged/Not_normalized/cart/',
'LES_budgets/Surface/Cartesian/Time_averaged/Not_normalized/cart/',
'LES_budgets/BU_KE/Cartesian/Not_time_averaged/Not_normalized/cart/',
'LES_budgets/BU_KE/Cartesian/Time_averaged/Not_normalized/cart/',
'LES_budgets/BU_THL2/Cartesian/Not_time_averaged/Not_normalized/cart/',
'LES_budgets/BU_THL2/Cartesian/Time_averaged/Not_normalized/cart/',
'LES_budgets/BU_WTHL/Cartesian/Not_time_averaged/Not_normalized/cart/',
'LES_budgets/BU_WTHL/Cartesian/Time_averaged/Not_normalized/cart/',
'LES_budgets/BU_RT2/Cartesian/Not_time_averaged/Not_normalized/cart/',
'LES_budgets/BU_RT2/Cartesian/Time_averaged/Not_normalized/cart/',
'LES_budgets/BU_WRT/Cartesian/Not_time_averaged/Not_normalized/cart/',
'LES_budgets/BU_WRT/Cartesian/Time_averaged/Not_normalized/cart/',
'LES_budgets/BU_THLR/Cartesian/Not_time_averaged/Not_normalized/cart/',
'LES_budgets/BU_THLR/Cartesian/Time_averaged/Not_normalized/cart/']
]
def compareBACKUPFiles(file_user, file_ref):
......@@ -73,6 +62,10 @@ def compareTSERIESFiles(file_user, file_ref):
da = xr.open_dataset(file_user)
da2 = xr.open_dataset(file_ref)
variables = list(da.keys())
try:
nk=len(da['level_les'])
except:
pass
for var in variables:
try:
ecart_min = float(da2[var].min())-float(da[var].min())
......@@ -86,11 +79,9 @@ def compareTSERIESFiles(file_user, file_ref):
# Groups comparison
for grp in avail_groups:
try:
nk=len(da['level_les'])
da = xr.open_dataset(file_user, group=grp)
da2 = xr.open_dataset(file_ref, group=grp)
variables = list(da.keys())
print(grp)
for var in variables:
try:
ecart_min = float(da2[var][:,:nk-JPVEXT].min())-float(da[var][:,:nk-JPVEXT].min())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment