From 07d10ee53f642b9d2602ede58343f30b11118f69 Mon Sep 17 00:00:00 2001 From: keston Date: Thu, 30 Jul 2026 08:17:58 -0400 Subject: [PATCH 01/39] Added routines for retrieving forcing on WCOSS2 (recent forecast periods), interpolating fields to RWPS mesh, interpolating to common time frame, and blending forcing in bayesian manner --- scripts/RWPSPreProcess/AddErrVarToFile.py | 125 +++ scripts/RWPSPreProcess/AddMeshGeomToFile.py | 73 ++ scripts/RWPSPreProcess/BayesForecastUpdate.py | 111 +++ .../ComputeGriddedToRWPSInterpWeights.py | 224 +++++ .../ComputeUnstrToRWPSInterpWeights.py | 144 ++++ .../ComputeUnstrToRWPSInterpWeights.sh | 41 + .../ComputeWindToRWPSInterpWeights.py | 168 ++++ .../RWPSPreProcess/ConvertWeights2Netcdf.py | 136 +++ scripts/RWPSPreProcess/GetAllFocing.jobcard | 62 ++ ...GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh | 93 +++ .../RWPSPreProcess/GetAllFocing.jobcard.sh | 80 ++ scripts/RWPSPreProcess/GetAllFocing.sh | 62 ++ scripts/RWPSPreProcess/GetCurrents.sh | 10 + scripts/RWPSPreProcess/GetIce.sh | 10 + scripts/RWPSPreProcess/GetWaterLevel.sh | 7 + scripts/RWPSPreProcess/GetWinds.sh | 46 ++ scripts/RWPSPreProcess/InterpTime.py | 159 ++++ scripts/RWPSPreProcess/InterpUtilities.py | 780 ++++++++++++++++++ .../RWPSPreProcess/InterpolateWithWeights.py | 262 ++++++ .../InterpolateWithWeightsAndErrorVariance.py | 336 ++++++++ scripts/RWPSPreProcess/ProcessCurrents.sh | 104 +++ scripts/RWPSPreProcess/ProcessIce.sh | 113 +++ scripts/RWPSPreProcess/ProcessWaterLevel.sh | 61 ++ scripts/RWPSPreProcess/ProcessWinds.sh | 149 ++++ scripts/RWPSPreProcess/README.md | 1 + scripts/RWPSPreProcess/SpdDir2UVnbm.py | 86 ++ .../nbm/ConvertNBMIcetif2NetCDF.py | 56 ++ scripts/RWPSPreProcess/nbm/GetNBMIce.sh | 36 + scripts/RWPSPreProcess/nbm/MakeNBMWind.sh | 27 + scripts/RWPSPreProcess/nbm/MakeNBMWindUV.sh | 55 ++ .../RWPSPreProcess/rrfs/MakeEnsRRFSWind.sh | 77 ++ scripts/RWPSPreProcess/rrfs/MakeRRFSWind.sh | 40 + scripts/RWPSPreProcess/rtofs/GetRTOFS.sh | 34 + scripts/RWPSPreProcess/rtofs/GetRTOFSIce.sh | 42 + .../RWPSPreProcess/rtofs/GetRTOFSIcefcst.py | 107 +++ scripts/RWPSPreProcess/rtofs/GetRTOFSfcst.py | 96 +++ scripts/RWPSPreProcess/stofs/GetSTOFS.sh | 27 + 37 files changed, 4040 insertions(+) create mode 100644 scripts/RWPSPreProcess/AddErrVarToFile.py create mode 100644 scripts/RWPSPreProcess/AddMeshGeomToFile.py create mode 100644 scripts/RWPSPreProcess/BayesForecastUpdate.py create mode 100644 scripts/RWPSPreProcess/ComputeGriddedToRWPSInterpWeights.py create mode 100644 scripts/RWPSPreProcess/ComputeUnstrToRWPSInterpWeights.py create mode 100644 scripts/RWPSPreProcess/ComputeUnstrToRWPSInterpWeights.sh create mode 100644 scripts/RWPSPreProcess/ComputeWindToRWPSInterpWeights.py create mode 100644 scripts/RWPSPreProcess/ConvertWeights2Netcdf.py create mode 100644 scripts/RWPSPreProcess/GetAllFocing.jobcard create mode 100644 scripts/RWPSPreProcess/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh create mode 100644 scripts/RWPSPreProcess/GetAllFocing.jobcard.sh create mode 100644 scripts/RWPSPreProcess/GetAllFocing.sh create mode 100644 scripts/RWPSPreProcess/GetCurrents.sh create mode 100644 scripts/RWPSPreProcess/GetIce.sh create mode 100644 scripts/RWPSPreProcess/GetWaterLevel.sh create mode 100644 scripts/RWPSPreProcess/GetWinds.sh create mode 100644 scripts/RWPSPreProcess/InterpTime.py create mode 100644 scripts/RWPSPreProcess/InterpUtilities.py create mode 100644 scripts/RWPSPreProcess/InterpolateWithWeights.py create mode 100644 scripts/RWPSPreProcess/InterpolateWithWeightsAndErrorVariance.py create mode 100644 scripts/RWPSPreProcess/ProcessCurrents.sh create mode 100644 scripts/RWPSPreProcess/ProcessIce.sh create mode 100644 scripts/RWPSPreProcess/ProcessWaterLevel.sh create mode 100644 scripts/RWPSPreProcess/ProcessWinds.sh create mode 100644 scripts/RWPSPreProcess/README.md create mode 100644 scripts/RWPSPreProcess/SpdDir2UVnbm.py create mode 100644 scripts/RWPSPreProcess/nbm/ConvertNBMIcetif2NetCDF.py create mode 100755 scripts/RWPSPreProcess/nbm/GetNBMIce.sh create mode 100755 scripts/RWPSPreProcess/nbm/MakeNBMWind.sh create mode 100644 scripts/RWPSPreProcess/nbm/MakeNBMWindUV.sh create mode 100644 scripts/RWPSPreProcess/rrfs/MakeEnsRRFSWind.sh create mode 100755 scripts/RWPSPreProcess/rrfs/MakeRRFSWind.sh create mode 100755 scripts/RWPSPreProcess/rtofs/GetRTOFS.sh create mode 100755 scripts/RWPSPreProcess/rtofs/GetRTOFSIce.sh create mode 100644 scripts/RWPSPreProcess/rtofs/GetRTOFSIcefcst.py create mode 100644 scripts/RWPSPreProcess/rtofs/GetRTOFSfcst.py create mode 100755 scripts/RWPSPreProcess/stofs/GetSTOFS.sh diff --git a/scripts/RWPSPreProcess/AddErrVarToFile.py b/scripts/RWPSPreProcess/AddErrVarToFile.py new file mode 100644 index 0000000..8a9f483 --- /dev/null +++ b/scripts/RWPSPreProcess/AddErrVarToFile.py @@ -0,0 +1,125 @@ +import numpy as np +import netCDF4 as nc +import sys +import InterpUtilities as iutil +import os +#Add compute and add error variance field to existing file + +UseUnixTime=True +nargin = len(sys.argv) - 1 + +flin=sys.argv[1] +dist2bnd_file=sys.argv[2] + +VarParam0=sys.argv[3] +VarParam=VarParam0.split(":") + +data=nc.Dataset(dist2bnd_file,"r") +dist2bnd=np.array(data["dist2bnd"][:]) +zi=np.array(data["depth"][:]) +nn=len(dist2bnd) +data.close() + + +VariableType="WaterLevel" +if "wind" in flin: + VariableType="Wind" +elif "uv" in flin: + VariableType="Current" +elif "vel" in flin: + VariableType="Current" +elif "ice" in flin: + VariableType="Ice" + + +if VariableType=="Current": + VarShallow=float(VarParam[0]) # variance (m/s)**2 for shallow regions + VarDeep=float(VarParam[1]) # variance (m/s)**2 for deep regions + BatShallow=float(VarParam[2]) # isobath (m) for shallow regions + BatDeep=float(VarParam[3]) # isobath (m) for deep regions + if "stofs" in flin: +# Variance = iutil.VarianceLinearDepth(zi,1.,100.,50.,250.) + Variance = iutil.VarianceLinearDepth (zi, VarShallow, VarDeep, BatShallow, BatDeep) + if "rtofs" in flin: #variance high in shallows and near boundary of coverage +# VarianceDepth = iutil.VarianceLinearDepth(zi,100.,1.,50.,250.) + VarianceDepth = iutil.VarianceLinearDepth(zi,VarShallow,VarDeep,BatShallow,BatDeep) + VarLambda= float(VarParam[4]) # lengthscale (km) for linear transition from bounadry variance(==VarShallow) to interior variance(==VarDeep) + VarianceBnd = iutil.VarianceLinearDistanceToBndy( dist2bnd, VarDeep,VarShallow, VarLambda) + Variance = np.maximum(VarianceDepth, VarianceBnd) + +if VariableType=="WaterLevel": + if "stofs" in flin: +# Variance = 1.+0*zi + VarInterior=float(VarParam[0]) # variance (m)**2 for stofs water level + Variance = VarInterior+0.*zi + +if VariableType=="Wind": + ##LocalFS = [ rwps_pr, rwps_hi, rwps_ak, rwps_conus, rwps_na] # file names + ##VarFS = [ 4. , 4. , 9. , 16. , 25. ] # (m m /s /s) + ##LambdaFS = [ 150. , 200. , 500. , 1000. , 1500. ] # (km) + VarInterior=float(VarParam[0]) # variance (m/s)**2 for interior of forecast + if "nbm" in flin: + Variance = VarInterior + np.zeros(nn) + if "rrfs" in flin: + VarBoundary = float(VarParam[1]) # variance (m/s)**2 for boundary of forecast + VarLambda = float(VarParam[2]) # lengthscale (km) for linear transition from bounadry variance to interior variance + Variance = iutil.VarianceLinearDistanceToBndy( dist2bnd, VarInterior, VarBoundary,VarLambda ) + + +if VariableType=="Ice": + ##LocalFS = [ rwps_pr, rwps_hi, rwps_ak, rwps_conus, rwps_na] # file names + ##VarFS = [ 4. , 4. , 9. , 16. , 25. ] # (m m /s /s) + ##LambdaFS = [ 150. , 200. , 500. , 1000. , 1500. ] # (km) + VarInterior=float(VarParam[0]) # variance (m/s)**2 for interior of forecast + if "rtofs" in flin: + Variance = VarInterior + np.zeros(nn) + if "nbm" in flin: + VarBoundary = float(VarParam[1]) # variance (m/s)**2 for boundary of forecast + VarLambda = float(VarParam[2]) # lengthscale (km) for linear transition from bounadry variance to interior variance + Variance = iutil.VarianceLinearDistanceToBndy( dist2bnd, VarInterior, VarBoundary,VarLambda ) + + + + + + +fltmp=flin+".tmp.nc" +try: + os.remove(fltmp) +except: + print("creating "+fltmp+" temporarily") + +data0 = nc.Dataset(flin,"r") + +with nc.Dataset(fltmp, "w", format="NETCDF4") as ncout: + # 1. Copy Global Attributes + ncout.setncatts({attr: data0.getncattr(attr) for attr in data0.ncattrs()}) + # 2. Copy Dimensions + for name, dimension in data0.dimensions.items(): + # If the dimension is unlimited, pass None to createDimension + dim_len = len(dimension) if not dimension.isunlimited() else None + ncout.createDimension(name, dim_len) + for name, src_var in data0.variables.items(): + dst_var = ncout.createVariable(name, src_var.datatype, src_var.dimensions) + dst_var.setncatts({attr: src_var.getncattr(attr) for attr in src_var.ncattrs()}) + dst_var[:] = src_var[:] + + time=np.asarray(data0["time"][:]) + nt=len(time) + ErrorVariance=np.zeros((nt,nn)) + for k in range(nt): + ErrorVariance[k,:]=Variance[:] + + if not 'node' in ncout.dimensions: + ncadd.createDimension('node' , nn) + if not 'time' in ncout.dimensions: + ncadd.createDimension('time' , nt) + if not 'ErrorVariance' in ncout.variables: + ErrorVariance_var=ncout.createVariable('ErrorVariance', 'f8', ('time','node')) + ErrorVariance_var.long_name = 'forecast error variance' + ErrorVariance_var.units = "(field units)**2" + ErrorVariance_var.standard_name = 'errror variance' + ErrorVariance_var[:]=ErrorVariance + + ncout.close +os.rename(fltmp, flin) diff --git a/scripts/RWPSPreProcess/AddMeshGeomToFile.py b/scripts/RWPSPreProcess/AddMeshGeomToFile.py new file mode 100644 index 0000000..e7e7d2a --- /dev/null +++ b/scripts/RWPSPreProcess/AddMeshGeomToFile.py @@ -0,0 +1,73 @@ +import numpy as np +import netCDF4 as nc +import sys +import InterpUtilities as iutil +import os + +UseUnixTime=True +nargin = len(sys.argv) - 1 + +flin=sys.argv[1] +mshfl=sys.argv[2] + +meshslash=mshfl.rfind('/')+1 +meshname=mshfl[meshslash:len(mshfl)-3] + +xi, yi, ei, zi = iutil.loadWW3Mesh(mshfl) +nn=len(xi) +ne=ei.shape[0] + +fltmp=flin+".tmp.nc" +try: + os.remove(fltmp) +except: + print("creating "+fltmp+" temporarily") + +data0 = nc.Dataset(flin,"r") + +with nc.Dataset(fltmp, "w", format="NETCDF4") as ncout: + # 1. Copy Global Attributes + ncout.setncatts({attr: data0.getncattr(attr) for attr in data0.ncattrs()}) + # 2. Copy Dimensions + for name, dimension in data0.dimensions.items(): + # If the dimension is unlimited, pass None to createDimension + dim_len = len(dimension) if not dimension.isunlimited() else None + ncout.createDimension(name, dim_len) + for name, src_var in data0.variables.items(): + dst_var = ncout.createVariable(name, src_var.datatype, src_var.dimensions) + dst_var.setncatts({attr: src_var.getncattr(attr) for attr in src_var.ncattrs()}) + dst_var[:] = src_var[:] + + if not 'node' in data0.dimensions: + ncout.createDimension('node' , nn) + if not 'element' in data0.dimensions: + ncout.createDimension('element' , ne) + if not 'noel' in data0.dimensions: + ncout.createDimension('noel', 3) + ncout.meshname=meshname + ncout.mesh=mshfl + + if not 'longitude' in ncout.variables: + lon_var=ncout.createVariable('longitude', 'f8', ('node',)) + lon_var.units = 'degree_east' + lon_var.long_name = 'longitude' + lon_var.standard_name = 'longitude' + lon_var.axis = 'X' + lon_var[:]=xi[:] + + if not 'latitude' in ncout.variables: + lat_var=ncout.createVariable('latitude', 'f8', ('node',)) + lat_var.units = 'degree_north' + lat_var.long_name = 'latitude' + lat_var.standard_name = 'latitude' + lat_var.axis = 'Y' + lat_var[:]=yi[:] + + if not 'tri' in ncout.variables: + tri_var=ncout.createVariable('tri', 'i4', ('noel','element')) + tri_var.long_name = 'element list' + tri_var.standard_name = 'element list' + tri_var[:]=np.transpose(ei) + + ncout.close +os.rename(fltmp, flin) diff --git a/scripts/RWPSPreProcess/BayesForecastUpdate.py b/scripts/RWPSPreProcess/BayesForecastUpdate.py new file mode 100644 index 0000000..361c283 --- /dev/null +++ b/scripts/RWPSPreProcess/BayesForecastUpdate.py @@ -0,0 +1,111 @@ + + +import datetime +import numpy as np +import netCDF4 as nc +import sys +import re +import InterpUtilities as iutil +flin0=sys.argv[1] +flin1=sys.argv[2] +flout=sys.argv[3] + +varname0=sys.argv[4] +varname=varname0.split(":") +nvar=len(varname) + +data0 = nc.Dataset(flin0,"r") +t=np.asarray(data0["time"][:]) +var=np.asarray(data0["ErrorVariance"][:,:]) + +x=np.asarray(data0["longitude"][:]) +y=np.asarray(data0["latitude"][:]) +e=np.asarray(data0["tri"][:,:]) + +nt=len(t) +nn=len(x) +ne=e.shape[1] +noel=e.shape[0] + +nvar=len(varname) +field=np.zeros((nvar,nt,nn)) + +nan=float("nan") +for jv in range(nvar): + tmp=np.asarray(data0[varname[jv]][:,:]) + if "_FillValue" in data0[varname[jv]].ncattrs(): + fill_value0=data0[varname[jv]]._FillValue + tmp[np.where(tmp==fill_value0)]=nan + field[jv,:,:]=tmp + +data1 = nc.Dataset(flin1,"r") +t1=np.asarray(data1["time"][:]) +var1=np.asarray(data1["ErrorVariance"][:,:]) +nt1,nn1=var1.shape +field1=np.zeros((nvar,nt1,nn1)) +for jv in range(nvar): + tmp=np.asarray(data1[varname[jv]][:,:]) + if "_FillValue" in data1[varname[jv]].ncattrs(): + fill_value1=data1[varname[jv]]._FillValue + tmp[np.where(tmp==fill_value1)]=nan + field1[jv,:,:]=tmp + +Inf=float('inf') +um1=field1[0,0,:] +ng1=np.where( um1**2>=0 ) # find points that are valid floats for field1 + +for k in range(nt): + #j=np.where(t[k]==t1) # find common merge point in data + j=np.where(np.abs(t[k]-t1)<120.) # find common merge point in data + j=j[0].tolist() + if len(j)==1: + print("j="+str(j)+" : k="+str(k)) + for jv in range(nvar): + field[jv,k,ng1] = ( field[jv,k,ng1] + + ( var[k,ng1] / ( var[k,ng1] + var1[j,ng1] ) ) + * (field1[jv,j,ng1]-field[jv,k,ng1]) + ) + #update error variance to posterior + var[k,ng1]=var[k,ng1] * ( var1[j,ng1] / ( var[k,ng1]+var1[j,ng1] ) ) + +with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: + ncout.createDimension('level' , 1) + ncout.createDimension('node' , nn) + ncout.createDimension('element' , ne) + ncout.createDimension('time', nt) + ncout.createDimension('noel', 3) + + lon_var=ncout.createVariable('longitude', 'f8', ('node',)) + lon_var.units = 'degree_east' + lon_var.long_name = 'longitude' + lon_var.standard_name = 'longitude' + lon_var.axis = 'X' + lon_var[:]=x[:] + + lat_var=ncout.createVariable('latitude', 'f8', ('node',)) + lat_var.units = 'degree_north' + lat_var.long_name = 'latitude' + lat_var.standard_name = 'latitude' + lat_var.axis = 'Y' + lat_var[:]=y[:] + + time_var=ncout.createVariable('time', 'f4', ('time',)) + iutil.CopyAttributes(data0["time"], time_var) + time_var[:]=t[:] + + tri_var=ncout.createVariable('tri', 'i4', ('noel','element')) + tri_var.long_name = 'element list' + tri_var.standard_name = 'element list' + tri_var[:,:]=e + + #Copy attributes from old file to new + for jv in range(nvar): + f_var=ncout.createVariable(varname[jv], 'f4', ('time','node')) + iutil.CopyAttributes(data0[varname[jv]], f_var) + f_var[:,:]=field[jv,:,:] + + ErrVar0=data0["ErrorVariance"] + ErrVar_var=ncout.createVariable("ErrorVariance", 'f4', ('time','node')) + iutil.CopyAttributes(ErrVar0, ErrVar_var) + ErrVar_var[:,:]=var[:,:] + ncout.close diff --git a/scripts/RWPSPreProcess/ComputeGriddedToRWPSInterpWeights.py b/scripts/RWPSPreProcess/ComputeGriddedToRWPSInterpWeights.py new file mode 100644 index 0000000..3b65aa2 --- /dev/null +++ b/scripts/RWPSPreProcess/ComputeGriddedToRWPSInterpWeights.py @@ -0,0 +1,224 @@ +# This is a a set of routines that interpolate wind forecasts to an unstructured +# mesh from regular or curvilinear grids (using ESMPY). In addition to interpolation +# field the out file contains a spatially variable error variance estimate based on the +# distance to the forecast boundary. This error variance is used later to update +# dispirate forecasts in a bayesian manner to yield a spatially smooth estimate +# incorporating all forecasts. The understanding is that the more local forecast +# products are of higher accuracy than the coarser broader scale forecasts + +import numpy as np +import os + +import datetime +import netCDF4 as nc +import sys +import re +import InterpUtilities as iutil + +import xarray as xr +import esmpy +import scipy.sparse as sp + +import InterpUtilities as iutil + + +#mshfl="../meshes/RWPS.V0a.small.msh" +#flin="../RWPSWrkFlw/WindBlend/wind.20260507.00X/rrfs.20260507.00.wind10m.ak.nc" + + +# Main program +#AddExtrapolationSupport=False +AddExtrapolationSupport=True + +nargin = len(sys.argv) - 1 + +flin=sys.argv[1] +mshfl=sys.argv[2] + +# Don't use nearest neighbor interpolation unless 6th positive integer argument present. +# This may be needed on boundary of RWPS mesh if node alignment is outside NBM OC domain +Extrapolate=False +if nargin > 2: + if int(sys.argv[3])>0: + print("using nearest neighbor to extrapolate wind field beyond geometric coverage") + Extrapolate=True + +xi, yi, ei, zi = iutil.loadWW3Mesh(mshfl) +nn=len(xi) +#shift coords to[129,370] +#if np.mean(xi)<0.: + #xi=xi+360. +data = nc.Dataset(flin,"r") +#read spaital dimensions and determine if input mesh is curvilinear or regular +x1=np.asarray(data["longitude"][:]) +y1=np.asarray(data["latitude"][:]) + +# shift to common longitude +#if np.mean(np.mean(x1))<0: +# x1=x1+360. +# rwps :[-231, 11] +# nbm :[129, 370] +# rrfs,pr :[ -75.5000 -62.5087] +# rrfs,hi :[ -161.5250 -153.8690] +# rrfs,ak :[150.2012 266.2886] +# rrfs,na :[67.5721 427.0000] +# rrfs,conus :[ 225.9045 299.0828] +# rtofs,glo :[74.1552,434.0146] +# stofs, glo :[-180,180] +# + +#Shift longitude coordinates to RWPS specs for various files +if "hi" in flin: + x1=x1+360. +if "pr" in flin: + x1=x1+360. + +if "rtofs" in flin: #remove bad geometry edges + x1=x1[1:-1,1:-1] + y1=y1[1:-1,1:-1] + x1=x1-360. + +if (len(x1.shape)==2 and len(y1.shape)==2): + IsCrvLn=True +elif (len(x1.shape)==1 and len(y1.shape)==1): + #represent regular grid as curvilinear grid + IsCrvLn=False + nx=len(x1) + ny=len(y1) + x1 = np.tile(x1,(ny,1)) + y1 = np.tile(y1,(nx,1)).T + IsCrvLn=True +else: + print("input file spatial dimension is not recognized. ending program") + sys.exit() + +####################################### +# === Create weights ===# +####################################### +meshslash=mshfl.rfind('/')+1 +dom=flin.split(".") +dom=dom[len(dom)-2] +weights_file = "InterpolationWeights."+mshfl[meshslash:len(mshfl)-3]+dom+".nc" +print("interpolation weights will be written to file = "+ weights_file) + +nx=x1.shape[0] +ny=x1.shape[1] +n1=nx*ny + +print("Computing weights and saving to file: "+ weights_file) + +#Use esmpy to construct bilinear interpolation weights +iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + +####################################### +# === read weights and ===# +####################################### +with xr.open_dataset(weights_file) as ds_s: + # Standard sparse storage uses 'row', 'col', and 'S'==weights variables + row = ds_s['row'].values + col = ds_s['col'].values + weights = ds_s['S'].values + Nrows=ds_s.attrs.get('Nrows') + Ncols=ds_s.attrs.get('Ncols') +print("nn = "+str(nn)+": Nrows = "+str(Nrows)) +print("n1 = "+str(n1)+": Ncols = "+str(Ncols)) +if not ((nn==Nrows) and (n1==Ncols)): + print("Wrong matrix weights: number of rows from "+ mshfl +" = "+str(nn)+ + " but number of rows in "+ weights_file +" = "+str(Nrows)+ + ", number of spatial points in "+ flin +" = "+str(n1)+ + " but number of columns in "+ weights_file +" = "+str(Ncols) ) + print(" You probably need to remove file "+ weights_file +" and rerun to generate appropriate weights") +matrix = sp.coo_matrix((weights, (row-1, col-1)), shape=(nn,n1)).tocsr() +print("sparse interpolation matrix") +print(matrix) + +################################################################################## +# START: Extrapolate for nodes not covered by interpolator +################################################################################## +x1v=np.transpose(x1).reshape(n1) # vectorize src nodes, consistant with data to interpolate +y1v=np.transpose(y1).reshape(n1) + +if Extrapolate: + from scipy.interpolate import NearestNDInterpolator + srcp = np.array((x1v,y1v)).T + srcv = 1.+x1v**2 + y1v**2 #dummy input field + #dstv = matrix @ srcv.T + row_sum = matrix.sum(axis=1) + j0=np.where( row_sum==0 ) # destination nodes with no coverage from interpolation matrix + j0=np.array(j0[0]).tolist() + dstp = np.array((xi[j0],yi[j0])).T + interpolator = NearestNDInterpolator(srcp, srcv) + distances, j0src = interpolator.tree.query(dstp) + weightsExtrp=weights.tolist().append([1.0] * len(j0) ) + rowExtrp=np.concatenate( (row, np.array(j0)) ) + colExtrp=np.concatenate( (col, np.array(j0src)) ) + weightsExtrp=np.concatenate( (weights, np.array([1.0] * len(j0))) ) + os.replace(weights_file, "NoExtrap."+weights_file) + iutil.WriteInterpolationWeightsToNetCDF(weights_file,rowExtrp,colExtrp,weightsExtrp,len(xi),len(x1v)) +################################################################################## +# FINISHED: Extrapolate for nodes not covered by interpolator +################################################################################## + +################################################################################## +# START: Extrapolation support for NaN occurances in source field +################################################################################## +if AddExtrapolationSupport: + with nc.Dataset(weights_file, 'r+', format='NETCDF4') as ncadd: + ncadd.createDimension('nn_src' , len(x1v)) + ncadd.createDimension('nn_dst' , len(xi)) + + xsrc_var=ncadd.createVariable('x_src', 'f8', ('nn_src',)) + xsrc_var.long_name = 'interpolation source node longitude' + xsrc_var[:]=x1v[:] + + ysrc_var=ncadd.createVariable('y_src', 'f8', ('nn_src',)) + ysrc_var.long_name = 'interpolation source node latitude' + ysrc_var[:]=y1v[:] + + xdst_var=ncadd.createVariable('x_dst', 'f8', ('nn_dst',)) + xdst_var.long_name = 'interpolation destination node longitude' + xdst_var[:]=xi[:] + + ydst_var=ncadd.createVariable('y_dst', 'f8', ('nn_dst',)) + ydst_var.long_name = 'interpolation destination node latitude' + ydst_var[:]=yi[:] + +################################################################################## +# FINISHED: Extrapolation support for NaN occurances in source field +################################################################################## +with nc.Dataset(weights_file, 'r+', format='NETCDF4') as ncadd: + ncadd.setncattr("SrcFieldType", "gridded") + ncadd.setncattr("InputFile", flin) + ncadd.setncattr("MeshFile", mshfl) + +################################################################################## +# START: Compute distance to boundary for each node in mesh: +################################################################################## +#dist2bnd_file = "DistToBndy."+mshfl[meshslash:len(mshfl)-3]+dom+".txt" +dist2bnd_file = "DistToBndy."+mshfl[meshslash:len(mshfl)-3]+dom+".nc" + +if Extrapolate: + dist2bnd=np.full(len(xi), np.inf) #all points are inside boundary- No boundary with this type of extrapolation +else: + row_sum = matrix.sum(axis=1) + j0=np.where( row_sum==0 ) # destination nodes with no coverage from interpolation matrix + j0=np.array(j0[0]).tolist() + u0=np.ones(xi.shape) + nan=float("nan") + u0[j0]=nan + dist2bnd=iutil.CalculateDistanceToInterpEnvelope(xi,yi,u0, 1.) + +with nc.Dataset(dist2bnd_file, 'w', format='NETCDF4') as ncout: + ncout.createDimension('node' , nn) + d_var=ncout.createVariable('dist2bnd', 'f4', ('node',)) + d_var.long_name = 'distance to boundary' + d_var.units = 'km' + d_var.standard_name = 'distance to boundary' + d_var[:]=dist2bnd[:] + + z_var=ncout.createVariable('depth', 'f4', ('node',)) + z_var.long_name = 'mesh depth' + z_var.units = 'm' + z_var.standard_name = 'depth' + z_var[:]=zi[:] + diff --git a/scripts/RWPSPreProcess/ComputeUnstrToRWPSInterpWeights.py b/scripts/RWPSPreProcess/ComputeUnstrToRWPSInterpWeights.py new file mode 100644 index 0000000..676b935 --- /dev/null +++ b/scripts/RWPSPreProcess/ComputeUnstrToRWPSInterpWeights.py @@ -0,0 +1,144 @@ +import numpy as np +import netCDF4 as nc +import sys +from scipy.interpolate import RegularGridInterpolator +#import CalculateSTOFStoRWPSInterpWeightsUtility as mshint +import InterpUtilities as iutil + +import os +nargin = len(sys.argv) - 1 + +flin=sys.argv[1] +mshfl=sys.argv[2] + +meshslash=mshfl.rfind('/')+1 +TmpOutDir="STOFSInterpWeights."+mshfl[meshslash:len(mshfl)-4] + +#if nargin==3 then write the parallel jobcard that carries out the interpolation weight calculation +if nargin ==3 : + Njobs=int(sys.argv[3]) + os.makedirs(TmpOutDir, exist_ok=True) + try: + os.remove(TmpOutDir+"/*.txt") + except: + print("directory "+TmpOutDir+" is alread empty") + iutil.WriteInterpJobscriptPBS("jobcardComputeUnstrToRWPSInterpWeightsPBS",flin,mshfl,Njobs, 1) + iutil.WriteInterpJobscriptSLURM("jobcardComputeUnstrToRWPSInterpWeightsSLURM",flin,mshfl,Njobs, 1) + print("Made parallel jobcards to create interpolation weights with "+str(Njobs)+" processes. Next step:") + print("sbatch jobcardComputeUnstrToRWPSInterpWeightsSLURM") + sys.exit() + +#if nargin==4 then do the part of the mesh for jobID of Njobs +if nargin == 4: + jobID=int(sys.argv[3]) + Njobs=int(sys.argv[4]) + +#if nargin==6 then do the interpolation weight calculation for a specified window +else: + lonW=int(sys.argv[3]) + lonE=int(sys.argv[4]) + latS=int(sys.argv[5]) + latN=int(sys.argv[6]) + +#latS=-40 +#latN=81 + +meshslash=mshfl.rfind('/')+1 +if nargin < 5: + weights_file = TmpOutDir+"/Part.IntrpWghts."+str(jobID)+".txt" +else: + weights_file = TmpOutDir+"/Part.IntrpWghts.W"+str(lonW)+".E"+str(lonE)+".S"+str(latS)+".N"+str(latN)+"."+mshfl[meshslash:len(mshfl)-3]+"txt" + + +print("saving output to:"+weights_file) + +xi, yi, ei, zi = iutil.loadWW3Mesh(mshfl) +nni=len(xi) +j=np.where(xi>90.) # should be empty +xi[j]=xi[j]-360. +#if np.mean(xi)<0.: +# xi=xi+360. + +# divide domain from east west based on job id=0 ... Njobs +# and make North-South window contain the full target domain +# NOTE: for efficiency the sections of the domain should have approximately +# the same number of destination nodes and/or the same number of source elements +# will implement as function shortly + +if nargin < 5: +# balance node load for + xis=np.sort(xi) + mm=round(nni/Njobs) + xil=xis[range(0,nni,mm)] + lonW=xil[jobID] + if jobID==Njobs-1: + lonE=xis[-1]+1. + else: + lonE=xil[jobID+1] + if jobID==0: + lonW=xis[0]-1. + + latS=np.min(yi)-1. + latN=np.max(yi)+1. + +data = nc.Dataset(flin,"r") +#read spaital dimensions and determine if input mesh is curvilinear or regular +x=np.asarray(data["x"][:]) +j=np.where(xi>90.) #elements broken here should not effect RWPS interpolation +xi[j]=xi[j]-360. + +y=np.asarray(data["y"][:]) +e=np.asarray(data["element"][:,:]) + +e0=e-1 +xc = np.mean(x[e0], axis=1) +yc = np.mean(y[e0], axis=1) + +nn=len(x) + +SearchWidth=.5 # search rectangle extended beyond window to this number (degrees lat lon) + +print(e.shape) +ne=e.shape[0] +print(ne) + +xwin=[lonW,lonE] +ywin=[latS,latN] +print("calculating interpolation weights for [W"+str(lonW)+": E "+str(lonE)+": S "+str(latS)+": N "+str(latN)+"]") +#Find target mesh nodes in window +jxUi=np.where( xi <= np.max(xwin))[0].tolist() +jxDi=np.where( xi >= np.min(xwin))[0].tolist() +jyUi=np.where( yi <= np.max(ywin))[0].tolist() +jyDi=np.where( yi >= np.min(ywin))[0].tolist() +ji=list( set(jxUi) & set(jxDi) & set(jyUi) & set(jyDi) ) + +#Find source elements in and near window +SearchWidth=.5 +jxU=np.where( xc < np.max(xwin)+SearchWidth )[0].tolist() +jxD=np.where( xc > np.min(xwin)-SearchWidth )[0].tolist() +jyU=np.where( yc < np.max(ywin)+SearchWidth )[0].tolist() +jyD=np.where( yc > np.min(ywin)-SearchWidth )[0].tolist() +je=list( set(jxU) & set(jxD) & set(jyU) & set(jyD) ) + +print("number of target nodes for this region = "+str(len(ji))) +print("number of source elements in this region = "+str(len(je))) + +weights, nodes, elenum, Dist2EleCenter=iutil.compute_mesh_to_mesh_interp_weights(x, y, e[je,:], xi[ji], yi[ji]) + +#Move back to global index's +for k in range(len(elenum)): + elenum[k]=je[elenum[k]] + ji[k]=ji[k] + +#return to convention numbering from 1 ... +elenum = list(np.array(elenum) + 1) +ji = list(np.array(ji) + 1) +#nodes = np.array(nodes) + 1 # as writen using the correct 1 .. nn node numbering + +# File format +# ["taget node number" "source element number" "source n1" "source n2 "source n3" "distance from target node to element center" "weight1" "weight2" "weight3"] + +Fout=np.vstack((np.array(ji),elenum,nodes[:,0],nodes[:,1],nodes[:,2],Dist2EleCenter,weights[:,0],weights[:,1],weights[:,2])) +np.savetxt(weights_file,Fout.T, fmt='%d %d %d %d %d %.6f %.6f %.6f %.6f') + + diff --git a/scripts/RWPSPreProcess/ComputeUnstrToRWPSInterpWeights.sh b/scripts/RWPSPreProcess/ComputeUnstrToRWPSInterpWeights.sh new file mode 100644 index 0000000..9af1a81 --- /dev/null +++ b/scripts/RWPSPreProcess/ComputeUnstrToRWPSInterpWeights.sh @@ -0,0 +1,41 @@ +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=00:05:00 +#PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + +pip list -v + +filein=$1 +meshfile=$2 +Nprocs=$3 + +## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python ComputeUnstrToRWPSInterpWeights.py $filein $meshfile $Nprocs + +## Now run parallel job script +## sbatch jobcardComputeUnstrToRWPSInterpWeightsSLURM +qsub jobcardComputeUnstrToRWPSInterpWeightsPBS +wait; + +## Now knit output from parallel job together and write to netcdf format +## The third argument "1" indicates to write (x,y) for destination and source nodes +## to support extrapolation + +python ConvertWeights2Netcdf.py $filein $meshfile 1 + diff --git a/scripts/RWPSPreProcess/ComputeWindToRWPSInterpWeights.py b/scripts/RWPSPreProcess/ComputeWindToRWPSInterpWeights.py new file mode 100644 index 0000000..87c47ac --- /dev/null +++ b/scripts/RWPSPreProcess/ComputeWindToRWPSInterpWeights.py @@ -0,0 +1,168 @@ +# This is a a set of routines that interpolate wind forecasts to an unstructured +# mesh from regular or curvilinear grids (using ESMPY). In addition to interpolation +# field the out file contains a spatially variable error variance estimate based on the +# distance to the forecast boundary. This error variance is used later to update +# dispirate forecasts in a bayesian manner to yield a spatially smooth estimate +# incorporating all forecasts. The understanding is that the more local forecast +# products are of higher accuracy than the coarser broader scale forecasts + +import numpy as np +import os + +import datetime +import netCDF4 as nc +import sys +import re +import InterpUtilities as iutil + +import xarray as xr +import esmpy +import scipy.sparse as sp + +import InterpUtilities as iutil + + +#mshfl="../meshes/RWPS.V0a.small.msh" +#flin="../RWPSWrkFlw/WindBlend/wind.20260507.00X/rrfs.20260507.00.wind10m.ak.nc" + + +# Main program + +nargin = len(sys.argv) - 1 + +flin=sys.argv[1] +mshfl=sys.argv[2] + +# Don't use nearest neighbor interpolation unless 6th positive integer argument present. +# This may be needed on boundary of RWPS mesh if node alignment is outside NBM OC domain +Extrapolate=False +if nargin > 2: + if int(sys.argv[3])>0: + print("using nearest neighbor to extrapolate wind field beyond geometric coverage") + Extrapolate=True + +xi, yi, ei, zi = iutil.loadWW3Mesh(mshfl) +nn=len(xi) + +if np.mean(xi)<0: + xi=xi+360. + +data = nc.Dataset(flin,"r") +#read spaital dimensions and determine if input mesh is curvilinear or regular +x1=np.asarray(data["longitude"][:]) +y1=np.asarray(data["latitude"][:]) +if (len(x1.shape)==2 and len(y1.shape)==2): + IsCrvLn=True +elif (len(x1.shape)==1 and len(y1.shape)==1): + IsCrvLn=False +else: + print("input file spatial dimension is not right. ending program") + sys.exit() +# shift to common longitude +if np.mean(np.mean(x1))<0: + x1=x1+360. + +####################################### +# === Create weights ===# +####################################### + +meshslash=mshfl.rfind('/')+1 +dom=flin.split(".") +dom=dom[len(dom)-2] +weights_file = "InterpolationWeights."+mshfl[meshslash:len(mshfl)-3]+dom+".nc" +print("interpolation weights will be written to file = "+ weights_file) + +if IsCrvLn: + nx=x1.shape[0] + ny=x1.shape[1] +else: + nx=len(x1) + ny=len(y1) +n1=nx*ny + +print("Computing weights and saving to file: "+ weights_file) + +if not IsCrvLn: + x1 = np.tile(x1,(ny,1)) + y1 = np.tile(y1,(nx,1)).T +#Use esmpy to construct bilinear interpolation weights +iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + +####################################### +# === read weights and ===# +####################################### +with xr.open_dataset(weights_file) as ds_s: + # Standard sparse storage uses 'row', 'col', and 'S'==weights variables + row = ds_s['row'].values + col = ds_s['col'].values + weights = ds_s['S'].values + Nrows=ds_s.attrs.get('Nrows') + Ncols=ds_s.attrs.get('Ncols') +print("nn = "+str(nn)+": Nrows = "+str(Nrows)) +print("n1 = "+str(n1)+": Ncols = "+str(Ncols)) +if not ((nn==Nrows) and (n1==Ncols)): + print("Wrong matrix weights: number of rows from "+ mshfl +" = "+str(nn)+ + " but number of rows in "+ weights_file +" = "+str(Nrows)+ + ", number of spatial points in "+ flin +" = "+str(n1)+ + " but number of columns in "+ weights_file +" = "+str(Ncols) ) + print(" You probably need to remove file "+ weights_file +" and rerun to generate appropriate weights") +matrix = sp.coo_matrix((weights, (row-1, col-1)), shape=(nn,n1)).tocsr() +print("sparse interpolation matrix") +print(matrix) + +################################################################################## +# START: Extrapolate for nodes not covered by interpolator +################################################################################## +if Extrapolate: + from scipy.interpolate import NearestNDInterpolator + if not IsCrvLn: + x1 = np.tile(x1,(ny,1)) + y1 = np.tile(y1,(nx,1)).T + x1v=np.transpose(x1).reshape(n1) # vectorize src nodes, consistant with Up, Vp + y1v=np.transpose(y1).reshape(n1) + srcp = np.array((x1v,y1v)).T + srcv = 1.+x1v**2 + y1v**2 #dummy input field + #dstv = matrix @ srcv.T + row_sum = matrix.sum(axis=1) + j0=np.where( row_sum==0 ) # destination nodes with no coverage from interpolation matrix + j0=np.array(j0[0]).tolist() + dstp = np.array((xi[j0],yi[j0])).T + interpolator = NearestNDInterpolator(srcp, srcv) + distances, j0src = interpolator.tree.query(dstp) + weightsExtrp=weights.tolist().append([1.0] * len(j0) ) + rowExtrp=np.concatenate( (row, np.array(j0)) ) + colExtrp=np.concatenate( (col, np.array(j0src)) ) + weightsExtrp=np.concatenate( (weights, np.array([1.0] * len(j0))) ) + + os.replace(weights_file, "NoExtrap."+weights_file) + iutil.WriteInterpolationWeightsToNetCDF(weights_file,rowExtrp,colExtrp,weightsExtrp,len(xi),len(x1v)) + +################################################################################## +# FINISHED: Extrapolate for nodes not covered by interpolator +################################################################################## + +################################################################################## +# START: Compute distance to boundary for each node in mesh: +################################################################################## +#dist2bnd_file = "DistToBndy."+mshfl[meshslash:len(mshfl)-3]+dom+".txt" +dist2bnd_file = "DistToBndy."+mshfl[meshslash:len(mshfl)-3]+dom+".nc" + +if Extrapolate: + dist2bnd=np.full(len(xi), np.inf) #all points are inside boundary- No boundary with this type of extrapolation +else: + row_sum = matrix.sum(axis=1) + j0=np.where( row_sum==0 ) # destination nodes with no coverage from interpolation matrix + j0=np.array(j0[0]).tolist() + u0=np.ones(xi.shape) + nan=float("nan") + u0[j0]=nan + dist2bnd=iutil.CalculateDistanceToInterpEnvelope(xi,yi,u0, 1.) + +with nc.Dataset(dist2bnd_file, 'w', format='NETCDF4') as ncout: + ncout.createDimension('node' , nn) + d_var=ncout.createVariable('dist2bnd', 'f4', ('node',)) + d_var.long_name = 'distance to boundary' + d_var.units = 'km' + d_var.standard_name = 'distance to boundary' + d_var[:]=dist2bnd[:] + diff --git a/scripts/RWPSPreProcess/ConvertWeights2Netcdf.py b/scripts/RWPSPreProcess/ConvertWeights2Netcdf.py new file mode 100644 index 0000000..8ba9c4f --- /dev/null +++ b/scripts/RWPSPreProcess/ConvertWeights2Netcdf.py @@ -0,0 +1,136 @@ +import numpy as np +import netCDF4 as nc +import sys +#import GeoComputeMeshToMeshInterpWeights as mshint +import InterpUtilities as iutil +import scipy.sparse as sp + +nargin = len(sys.argv) - 1 + +flin=sys.argv[1] +mshfl=sys.argv[2] +meshslash=mshfl.rfind('/')+1 + +#AddExtrapolationSupport=False +AddExtrapolationSupport=True + +#TextWeightFl="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".txt" +TextWeightFl="InterpWeights."+mshfl[meshslash:len(mshfl)-4]+".stofs.txt" +flout = "InterpolationWeights."+mshfl[meshslash:len(mshfl)-3]+".stofs.nc" + +xi, yi, ei, zi = iutil.loadWW3Mesh(mshfl) +nn_dst=len(xi) +data = nc.Dataset(flin,"r") +#read spaital dimensions and determine if input mesh is curvilinear or regular +x=np.asarray(data["x"][:]) +#convert to RWPS coordinates +jEast=np.where(x>90) +x[jEast]=x[jEast]=360. + +nn_src=len(x) + +#Read in weights from cat of text output(rows are not in order) +F=np.loadtxt(TextWeightFl) + +node_dst=F[:,0] # row number (destination node) +ele_num_src=F[:,1] # Source element number (not used) +node_src=F[:,2:5] # Source node +DistToCenterKM=F[:,5] # distance of destination node from source element center (not used) +weights=F[:,6:9] # interpolation weights from source nodes to destination node + +node_dst=node_dst.astype(int) +node_src=node_src.astype(int) +ele_num_src=ele_num_src.astype(int) + +nnz=F.shape[0] +n_s=3*nnz +row=np.zeros(n_s,dtype=int) +col=np.zeros(n_s,dtype=int) +val=np.zeros(n_s) + +n=0 +for k in range(nnz): + for j in range(3): + row[n]=node_dst[k] + col[n]=node_src[k,j] + val[n]=weights[k,j] + n=n+1 +print("n="+str(n)) +print("n_s="+str(n_s)) +n_s=n + +with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: + ncout.createDimension('n_s' , n_s) + ncout.setncattr("Nrows", nn_dst) + ncout.setncattr("Ncols", nn_src) + ncout.setncattr("SrcFieldType", "unstructured") + + r_var=ncout.createVariable('row', 'i4', ('n_s',)) + r_var.long_name = 'row index' + r_var[:]=row[:] + + c_var=ncout.createVariable('col', 'i4', ('n_s',)) + c_var.long_name = 'column index' + c_var[:]=col[:] + + s_var=ncout.createVariable('S', 'f8', ('n_s',)) + s_var.long_name = 'matrix value' + s_var[:]=val[:] + +#Consider adding (x,y) destination and (x,y) for source. This is usefull for extrapolation + if AddExtrapolationSupport: + x=np.asarray(data["x"][:]) + y=np.asarray(data["y"][:]) + ncout.createDimension('nn_src' , nn_src) + ncout.createDimension('nn_dst' , nn_dst) + + xsrc_var=ncout.createVariable('x_src', 'f8', ('nn_src',)) + xsrc_var.long_name = 'interpolation source node longitude' + xsrc_var[:]=x[:] + + ysrc_var=ncout.createVariable('y_src', 'f8', ('nn_src',)) + ysrc_var.long_name = 'interpolation source node latitude' + ysrc_var[:]=y[:] + + xdst_var=ncout.createVariable('x_dst', 'f8', ('nn_dst',)) + xdst_var.long_name = 'interpolation destination node longitude' + xdst_var[:]=xi[:] + + ydst_var=ncout.createVariable('y_dst', 'f8', ('nn_dst',)) + ydst_var.long_name = 'interpolation destination node latitude' + ydst_var[:]=yi[:] + + zdst_var=ncout.createVariable('depth_dst', 'f8', ('nn_dst',)) + zdst_var.long_name = 'interpolation destination node latitude' + zdst_var[:]=zi[:] + +#Extrapolate=False +Extrapolate=sys.argv[3] + +if Extrapolate: + dist2bnd=np.full(len(xi), np.inf) #all points are inside boundary- No boundary with this type of extrapolation +else: + matrix = sp.coo_matrix((weights, (row-1, col-1)), shape=(nn_src,nn_dst)).tocsr() + row_sum = matrix.sum(axis=1) + j0=np.where( row_sum==0 ) # destination nodes with no coverage from interpolation matrix + j0=np.array(j0[0]).tolist() + u0=np.ones(xi.shape) + nan=float("nan") + u0[j0]=nan + dist2bnd=iutil.CalculateDistanceToInterpEnvelope(xi,yi,u0, 1.) + +dist2bnd_file = "DistToBndy."+mshfl[meshslash:len(mshfl)-4]+".stofs.nc" +with nc.Dataset(dist2bnd_file, 'w', format='NETCDF4') as ncout: + ncout.createDimension('node' , nn_dst) + d_var=ncout.createVariable('dist2bnd', 'f4', ('node',)) + d_var.long_name = 'distance to boundary' + d_var.units = 'km' + d_var.standard_name = 'distance to boundary' + d_var[:]=dist2bnd[:] + + z_var=ncout.createVariable('depth', 'f4', ('node',)) + z_var.long_name = 'mesh depth' + z_var.units = 'm' + z_var.standard_name = 'depth' + z_var[:]=zi[:] + diff --git a/scripts/RWPSPreProcess/GetAllFocing.jobcard b/scripts/RWPSPreProcess/GetAllFocing.jobcard new file mode 100644 index 0000000..caadd45 --- /dev/null +++ b/scripts/RWPSPreProcess/GetAllFocing.jobcard @@ -0,0 +1,62 @@ +#!/bin/sh +#PBS -q dev +#PBS -l walltime=00:59:00 +#PBS -A GLWU-DEV +#PBS -N ww3_regtest_13 +#PBS -j oe +#PBS -l select=1:ncpus=4:mem=64GB +#PBS -o matrix13.out + +cd /lfs/h2/emc/couple/noscrub/keston.smith/RWPSInterpolationUtilities + +# Setup and load modules +module load PrgEnv-intel/8.1.0 +module load craype/2.7.8 +module load intel/19.1.3.304 +module load cfp/2.0.4 +module load prod_util/2.0.8 +module load prod_envir/2.0.5 + +# 0.a Set necessary variables + +# This script retrieves and processes forcing for a forecast period +#date=$1 +#cycl=$2 +#mesh=$3 + +date=20260709 +cycl=12 +mesh=../meshes/RWPS.V0a.small.msh + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +echo "retrieving and processing RWPS forcing for $date z$cycl for WW3 mesh $mesh" + +rm FetchWinds.out ProcWinds.out FetchCurrents.out ProcCurrents.out FetchWaterLevel.out ProcWaterLevel.out + +( + sh GetWaterLevel.sh $date $cycl > FetchWaterLevel.out + sh ProcessWaterLevel.sh $date $cycl $mesh > ProcWaterLevel.out +)& +( + sh GetWinds.sh $date $cycl > FetchWinds.out + sh ProcessWinds.sh $date $cycl $mesh > ProcWinds.out +)& +( + sh GetCurrents.sh $date $cycl > FetchCurrents.out + sh ProcessCurrents.sh $date $cycl $mesh > ProcCurrents.out +)& + +wait +echo "Finished preprocessing for $date z$cycl for $mesh" + +cp $meshname.$date.$cycl.vel.stofsxrtofs.nc $meshname.$date.$cycl.current.nc +echo "current forcing file: $meshname.$date.$cycl.current.nc" + +cp $meshname.$date.$cycl.cwl.stofs.nc $meshname.$date.$cycl.waterlevel.nc +echo "water level forcing file: $meshname.$date.$cycl.watterlevel.nc" + +cp rwps_winds.$meshname.$date.$cycl/rwps.est.$meshname.$date.$cycl.wind10m.nc $meshname.$date.$cycl.wind.nc +echo "wind forcing file: $meshname.$date.$cycl.wind.nc" + diff --git a/scripts/RWPSPreProcess/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh b/scripts/RWPSPreProcess/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh new file mode 100644 index 0000000..8982c68 --- /dev/null +++ b/scripts/RWPSPreProcess/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh @@ -0,0 +1,93 @@ +#!/bin/sh + +date=$1 +cycl=$2 +mesh=$3 + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +jobcard="PreProcess.RWPS.$1.$2.jobcard" +outputfile="PreProcess.RWPS.$1.$2.out" + +rm $jobcard + +echo "#!/bin/sh" > $jobcard +echo "#PBS -q dev" >> $jobcard +echo "#PBS -l walltime=00:59:00" >> $jobcard +echo "#PBS -A GLWU-DEV" >> $jobcard +echo "#PBS -N RWPS.PreProc" >> $jobcard +echo "#PBS -j oe" >> $jobcard +echo "#PBS -l select=1:ncpus=4:mem=64GB" >> $jobcard +echo "#PBS -o RWPS.PreProc.out" >> $jobcard +echo " " >> $jobcard +echo "cd /lfs/h2/emc/couple/noscrub/keston.smith/RWPSInterpolationUtilities" >> $jobcard +echo " " >> $jobcard + +# Setup and load modules +echo "module load PrgEnv-intel/8.1.0" >> $jobcard +echo "module load craype/2.7.8" >> $jobcard +echo "module load intel/19.1.3.304" >> $jobcard +echo "module load cfp/2.0.4" >> $jobcard +echo "module load prod_util/2.0.8" >> $jobcard +echo "module load prod_envir/2.0.5" >> $jobcard +echo " " >> $jobcard + +echo "date=$1" >> $jobcard +echo "cycl=$2" >> $jobcard +echo "mesh=$3" >> $jobcard +echo " " >> $jobcard + +echo "meshname=$meshname" >> $jobcard +echo " " >> $jobcard + +echo "rm FetchWinds.out ProcWinds.out FetchCurrents.out ProcCurrents.out FetchWaterLevel.out ProcWaterLevel.out" >> $jobcard +echo " " >> $jobcard + + +# At present RTOFS ice files are missing time information (MT==0) so ProcessIce.sh will fail at the time interpolation step +#echo "(" >> $jobcard +#echo " sh GetIce.sh $date $cycl > FetchIce.out" >> $jobcard +#echo " sh ProcessIce.sh $date $cycl $mesh > ProcIce.out" >> $jobcard +#echo ")&" >> $jobcard +#echo " " >> $jobcard + + + + +echo "(" >> $jobcard +echo " sh GetWaterLevel.sh $date $cycl > FetchWaterLevel.out" >> $jobcard +echo " sh ProcessWaterLevel.sh $date $cycl $mesh > ProcWaterLevel.out" >> $jobcard +echo ")&" >> $jobcard +echo " " >> $jobcard + +echo "(" >> $jobcard +echo " sh GetWinds.sh $date $cycl > FetchWinds.out" >> $jobcard +echo " sh ProcessWinds.sh $date $cycl $mesh > ProcWinds.out" >> $jobcard +echo ")&" >> $jobcard +echo " " >> $jobcard + +echo "(" >> $jobcard +echo " sh GetCurrents.sh $date $cycl > FetchCurrents.out" >> $jobcard +echo " sh ProcessCurrents.sh $date $cycl $mesh > ProcCurrents.out" >> $jobcard + +#ProcessIce Needs Time Variables from rtofs currents files +echo " sh GetIce.sh $date $cycl > FetchIce.out" >> $jobcard +echo " sh ProcessIce.sh $date $cycl $mesh > ProcIce.out" >> $jobcard +echo ")&" >> $jobcard +echo " " >> $jobcard +echo " " >> $jobcard + +echo "wait" >> $jobcard +echo " " >> $jobcard +echo "cp $meshname.$date.$cycl.cwl.stofs.nc $meshname.$date.$cycl.waterlevel.nc" >> $jobcard +echo "cp $meshname.$date.$cycl.vel.stofsxrtofs.nc $meshname.$date.$cycl.current.nc" >> $jobcard +echo "cp rwps_winds.$meshname.$date.$cycl/rwps.est.$meshname.$date.$cycl.wind10m.nc $meshname.$date.$cycl.wind.nc" >> $jobcard +echo "cp $meshname.$date.$cycl.ice.rtofsxnbm.nc $meshname.$date.$cycl.ice.nc" >> $jobcard +echo " " >> $jobcard + +##Below is only needed because of missing rtofs ice time +## remove and move this to GetRTOFS.sh and GetRTOFSIce.sh +## echo "rm -rf tmp.rtofs*.$date" >> $jobcard + +qsub $jobcard > $outputfile diff --git a/scripts/RWPSPreProcess/GetAllFocing.jobcard.sh b/scripts/RWPSPreProcess/GetAllFocing.jobcard.sh new file mode 100644 index 0000000..f2786b0 --- /dev/null +++ b/scripts/RWPSPreProcess/GetAllFocing.jobcard.sh @@ -0,0 +1,80 @@ +#!/bin/sh + +date=$1 +cycl=$2 +mesh=$3 + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +jobcard="PreProcess.RWPS.$1.$2.jobcard" +outputfile="PreProcess.RWPS.$1.$2.out" + +rm $jobcard + +echo "#!/bin/sh" > $jobcard +echo "#PBS -q dev" >> $jobcard +echo "#PBS -l walltime=00:59:00" >> $jobcard +echo "#PBS -A GLWU-DEV" >> $jobcard +echo "#PBS -N RWPS.PreProc" >> $jobcard +echo "#PBS -j oe" >> $jobcard +echo "#PBS -l select=1:ncpus=4:mem=64GB" >> $jobcard +echo "#PBS -o RWPS.PreProc.out" >> $jobcard +echo " " >> $jobcard +echo "cd /lfs/h2/emc/couple/noscrub/keston.smith/RWPSInterpolationUtilities" >> $jobcard +echo " " >> $jobcard + +# Setup and load modules +echo "module load PrgEnv-intel/8.1.0" >> $jobcard +echo "module load craype/2.7.8" >> $jobcard +echo "module load intel/19.1.3.304" >> $jobcard +echo "module load cfp/2.0.4" >> $jobcard +echo "module load prod_util/2.0.8" >> $jobcard +echo "module load prod_envir/2.0.5" >> $jobcard +echo " " >> $jobcard + +echo "date=$1" >> $jobcard +echo "cycl=$2" >> $jobcard +echo "mesh=$3" >> $jobcard +echo " " >> $jobcard + +echo "meshname=$meshname" >> $jobcard +echo " " >> $jobcard + +echo "rm FetchWinds.out ProcWinds.out FetchCurrents.out ProcCurrents.out FetchWaterLevel.out ProcWaterLevel.out" >> $jobcard +echo " " >> $jobcard + + +# At present RTOFS ice files are missing time information (MT==0) so ProcessIce.sh will fail at the time interpolation step +echo "(" >> $jobcard +echo " sh GetIce.sh $date $cycl > FetchIce.out" >> $jobcard +echo " sh ProcessIce.sh $date $cycl $mesh > ProcIce.out" >> $jobcard +echo ")&" >> $jobcard +echo " " >> $jobcard + + +echo "(" >> $jobcard +echo " sh GetWaterLevel.sh $date $cycl > FetchWaterLevel.out" >> $jobcard +echo " sh ProcessWaterLevel.sh $date $cycl $mesh > ProcWaterLevel.out" >> $jobcard +echo ")&" >> $jobcard +echo " " >> $jobcard + +echo "(" >> $jobcard +echo " sh GetWinds.sh $date $cycl > FetchWinds.out" >> $jobcard +echo " sh ProcessWinds.sh $date $cycl $mesh > ProcWinds.out" >> $jobcard +echo ")&" >> $jobcard +echo " " >> $jobcard + +echo "(" >> $jobcard +echo " sh GetCurrents.sh $date $cycl > FetchCurrents.out" >> $jobcard +echo " sh ProcessCurrents.sh $date $cycl $mesh > ProcCurrents.out" >> $jobcard +echo ")&" >> $jobcard +echo " " >> $jobcard + +echo "wait" >> $jobcard +echo " " >> $jobcard +echo "cp $meshname.$date.$cycl.cwl.stofs.nc $meshname.$date.$cycl.waterlevel.nc" >> $jobcard +echo "cp $meshname.$date.$cycl.vel.stofsxrtofs.nc $meshname.$date.$cycl.current.nc" >> $jobcard +echo "cp rwps_winds.$meshname.$date.$cycl/rwps.est.$meshname.$date.$cycl.wind10m.nc $meshname.$date.$cycl.wind.nc" >> $jobcard + +qsub $jobcard > $outputfile diff --git a/scripts/RWPSPreProcess/GetAllFocing.sh b/scripts/RWPSPreProcess/GetAllFocing.sh new file mode 100644 index 0000000..0ff36d7 --- /dev/null +++ b/scripts/RWPSPreProcess/GetAllFocing.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +# Setup and load modules +module load PrgEnv-intel/8.1.0 +module load craype/2.7.8 +module load intel/19.1.3.304 +module load cfp/2.0.4 +module load prod_util/2.0.8 +module load prod_envir/2.0.5 + +# 0.a Set necessary variables + +# This script retrieves and processes forcing for a forecast period +date=$1 +cycl=$2 +mesh=$3 + + +##date=20260707 +##cycl=00 +##mesh="../meshes/RWPS.V0a.small.msh" + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +echo "retrieving and processing RWPS forcing for $date z$cycl for WW3 mesh $mesh" + +rm FetchWinds.out ProcWinds.out FetchCurrents.out ProcCurrents.out FetchWaterLevel.out ProcWaterLevel.out + +( + echo "retrieving nbm and rrfs winds for $date z$cycl" + sh GetWinds.sh $date $cycl > FetchWinds.out + echo "processing winds for $date z$cycl for $mesh" + sh ProcessWinds.sh $date $cycl $mesh > ProcWinds.out +)& + +( + echo "retrieving rtofs and stofs currents for $date z$cycl" + sh GetCurrents.sh $date $cycl > FetchCurrents.out + echo "processing currents for $date z$cycl for $mesh" + sh ProcessCurrents.sh $date $cycl $mesh > ProcCurrents.out +)& + +( + echo "retrieving stofs water level for $date z$cycl" + sh GetWaterLevel.sh $date $cycl > FetchWaterLevel.out + echo "processing water level for $date z$cycl for $mesh" + sh ProcessWaterLevel.sh $date $cycl $mesh > ProcWaterLevel.out +)& + +wait +echo "Finished preprocessing for $date z$cycl for $mesh" + +cp $meshname.$date.$cycl.vel.stofsxrtofs.nc $meshname.$date.$cycl.current.nc +echo "current forcing file: $meshname.$date.$cycl.current.nc" + +cp $meshname.$date.$cycl.cwl.stofs.nc $meshname.$date.$cycl.waterlevel.nc +echo "water level forcing file: $meshname.$date.$cycl.watterlevel.nc" + +cp rwps_winds.$meshname.$date.$cycl/rwps.est.$meshname.$date.$cycl.wind10m.nc $meshname.$date.$cycl.wind.nc +echo "wind forcing file: $meshname.$date.$cycl.wind.nc" + diff --git a/scripts/RWPSPreProcess/GetCurrents.sh b/scripts/RWPSPreProcess/GetCurrents.sh new file mode 100644 index 0000000..b93ec1a --- /dev/null +++ b/scripts/RWPSPreProcess/GetCurrents.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# This script retrieves rtofs and stofs as netcdf files + + +date=$1 +cycl=$2 +rtofs/GetRTOFS.sh $date & +stofs/GetSTOFS.sh $date $cycl current& +wait; diff --git a/scripts/RWPSPreProcess/GetIce.sh b/scripts/RWPSPreProcess/GetIce.sh new file mode 100644 index 0000000..91678d6 --- /dev/null +++ b/scripts/RWPSPreProcess/GetIce.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# This script retrieves rtofs and stofs as netcdf files + + +date=$1 +cycl=$2 +rtofs/GetRTOFSIce.sh $date $cycl & +nbm/GetNBMIce.sh $date $cycl & +wait; diff --git a/scripts/RWPSPreProcess/GetWaterLevel.sh b/scripts/RWPSPreProcess/GetWaterLevel.sh new file mode 100644 index 0000000..cfa1ac4 --- /dev/null +++ b/scripts/RWPSPreProcess/GetWaterLevel.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +## This script retrieves stofs water level as netcdf file + +date=$1 +cycl=$2 +stofs/GetSTOFS.sh $date $cycl waterlevel diff --git a/scripts/RWPSPreProcess/GetWinds.sh b/scripts/RWPSPreProcess/GetWinds.sh new file mode 100644 index 0000000..46d00a3 --- /dev/null +++ b/scripts/RWPSPreProcess/GetWinds.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +# This script retrieves rrfs and nbm winbds and exports as +# netcdf files + +echo "retrieving winds from rrfs and nbm for rwps wind" +( + echo "sh nbm/MakeNBMWind.sh $1 $2 oc > nbm.oc.out" + nbm/MakeNBMWind.sh $1 $2 oc > nbm.oc.out + echo "retrieved winds from nbm oc domain" + echo "Not retrieving other nbm domain winds" +)& + +( + echo "sh rrfs/MakeRRFSWind.sh $1 $2 na > rrfs.na.out" + rrfs/MakeRRFSWind.sh $1 $2 na > rrfs.na.out + echo "retrieved winds from rrfs na domain" +)& + +( + echo "sh rrfs/MakeRRFSWind.sh $1 $2 ak > rrfs.ak.out" + rrfs/MakeRRFSWind.sh $1 $2 ak > rrfs.ak.out + echo "retrieved winds from rrfs ak domain" +)& + +( + echo "sh rrfs/MakeRRFSWind.sh $1 $2 pr > rrfs.pr.out" + rrfs/MakeRRFSWind.sh $1 $2 pr > rrfs.pr.out + echo "retrieved winds from rrfs pr domain" +)& + +( + echo "sh rrfs/MakeRRFSWind.sh $1 $2 hi > rrfs.hi.out" + rrfs/MakeRRFSWind.sh $1 $2 hi > rrfs.hi.out + echo "retrieved winds from rrfs hi domain" +)& + +( + echo "sh rrfs/MakeRRFSWind.sh $1 $2 conus > rrfs.conus.out" + rrfs/MakeRRFSWind.sh $1 $2 conus > rrfs.conus.out + echo "retrieved winds from rrfs conus domain" +)& +wait + +echo "finished retrieving winds from rrfs and nbm for rwps wind" + diff --git a/scripts/RWPSPreProcess/InterpTime.py b/scripts/RWPSPreProcess/InterpTime.py new file mode 100644 index 0000000..d438977 --- /dev/null +++ b/scripts/RWPSPreProcess/InterpTime.py @@ -0,0 +1,159 @@ +import os +import argparse +import numpy as np +import netCDF4 as nc +import sys +import math + +from scipy.interpolate import interp1d + +nargin = len(sys.argv) - 1 + +flin=sys.argv[1] +flinNewTimes=sys.argv[2] +flout=sys.argv[3] + +varname0=sys.argv[4] +varname=varname0.split(":") +nvar=len(varname) + +# If InterpSecondFile is True interpolate the values from the second file are interpolated to the common time points +# and extrapolate (via persistance) for all times beyond the range of time from the second file + +InterpSecondFile=False +if nargin>4: + InterpSecondFile=eval(sys.argv[5]) + print("Interpolating fields from second file: "+str(InterpSecondFile)+" and extrapolating via persistance in time") + +#might want to rewrite with an input file to derive full set of times +print("running InterpTime.py: takes a forecast (arg1="+flin+") and interpolates to times ") +print("in another file (arg2="+flinNewTimes+"). The origonal and interpoated values are output to ") +print("a new file(arg3="+flout+") .") +print("interpolating for variables:") +for jv in range(nvar): + print(varname[jv]) + +data0 = nc.Dataset(flin,"r") +t=np.asarray(data0["time"][:]) + +data1 = nc.Dataset(flinNewTimes,"r") +t1=np.asarray(data1["time"][:]) + +#make sorted union of times in both forecasts +tf = np.union1d(t, t1) + +#eliminate times occuring outside the range of arg1 to avoid extrapolation +j=np.where( np.logical_and( tf>=np.min(t) , tf<=np.max(t) ) ) +print(j) +j=j[0].tolist() +tf=tf[j] + +print("Initial times:") +print(t) +print("New times:") +print(tf) + +nt=len(tf) + +x=np.asarray(data0["longitude"][:]) +y=np.asarray(data0["latitude"][:]) +e=np.asarray(data0["tri"][:,:]) +print("e") +print(e) +print(e.shape) +nn=len(x) +ne=e.shape[1] +noel=e.shape[0] + +InterpolatedVariables=np.zeros((nvar,nt,nn)) + +IsExtrap=False +if InterpSecondFile: + t=t1 + data=data1 + IsExtrap=True +else: + data=data0 + +ntt=len(t) +#unique_vals, indices = np.unique(arr, return_index=True) +tu,indx=np.unique(t,return_index=True) +for jv in range(nvar): + u=np.asarray(data[varname[jv]][:,:]) + fill_value0 = data[varname[jv]]._FillValue + nan=float('nan') + jb=np.where(u==fill_value0) + u[jb]=nan + +#set up interpolator for u +# fi = interp1d(t, u, axis=0, kind='linear') +# fi = interp1d(t, u, axis=0, kind='linear',fill_value=np.nan) +# fi = interp1d(tu, u[indx,:], axis=0, kind='linear',fill_value=np.nan) + if IsExtrap: + fi = interp1d(tu, u[indx,:], axis=0, kind='linear',fill_value="extrapolate") #extrapolated values will be overwritten + else: + fi = interp1d(tu, u[indx,:], axis=0, kind='linear') + uf=fi(tf) + + #re-insert initial values at times that match initial time points + print("Interpolation compleate: now re-insert initial values at times that match initial time points") + print("to remove small interpolation artifacts") + for k in range(nt): + j=np.where(tf[k]==t) + j=j[0].tolist() + print("new time index: "+str(k)+" is same as old time index:"+str(j)) + if len(j)>0: + print("mapping exactly back to origonal values at time: "+str(tf[k])) + j=j[0] + uf[k,:]=u[j,:] + + if IsExtrap: + jExtrapEarly=np.where(tft[ntt-1]) + for jxtrp in range(len(jExtrapLate)): + uf[jExtrapLate[jxtrp],:]=u[ntt-1,:] + + InterpolatedVariables[jv,:,:]=uf[:,:] + +import InterpUtilities as iutil +with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: + + ncout.createDimension('level' , 1) + ncout.createDimension('node' , nn) + ncout.createDimension('element' , ne) + ncout.createDimension('time', nt) + ncout.createDimension('noel', 3) + + lon_var=ncout.createVariable('longitude', 'f8', ('node',)) + lon_var.units = 'degree_east' + lon_var.long_name = 'longitude' + lon_var.standard_name = 'longitude' + lon_var.axis = 'X' + lon_var[:]=x[:] + + lat_var=ncout.createVariable('latitude', 'f8', ('node',)) + lat_var.units = 'degree_north' + lat_var.long_name = 'latitude' + lat_var.standard_name = 'latitude' + lat_var.axis = 'Y' + lat_var[:]=y[:] + + time_var0=data0["time"] + time_var=ncout.createVariable('time', 'f8', ('time',)) + iutil.CopyAttributes(time_var0, time_var) + time_var[:]=tf[:] + + tri_var=ncout.createVariable('tri', 'i4', ('noel','element',)) + tri_var.long_name = 'element list' + tri_var.standard_name = 'element list' + tri_var[:,:]=e + + #Copy attributes from old file to new + for jv in range(nvar): + var=data0[varname[jv]] + f_var=ncout.createVariable(varname[jv], 'f4', ('time','node')) + iutil.CopyAttributes(var, f_var) + f_var[:,:]=InterpolatedVariables[jv,:,:] + ncout.close diff --git a/scripts/RWPSPreProcess/InterpUtilities.py b/scripts/RWPSPreProcess/InterpUtilities.py new file mode 100644 index 0000000..a4d5fb6 --- /dev/null +++ b/scripts/RWPSPreProcess/InterpUtilities.py @@ -0,0 +1,780 @@ +from scipy.interpolate import RegularGridInterpolator +from scipy.sparse import csr_matrix +from scipy.sparse.csgraph import connected_components + +from datetime import datetime +import numpy as np +import netCDF4 as nc +import sys +import re + +#Convert Time to "seconds since 1970-01-01 00:00:00.0" +#eg 'seconds since 2024-04-04 12:00:00 ! NCDASE - BASE_DAT' +def ConvertTimeToUnixTime(flin,TimeVarName = None): + if TimeVarName == None: + TimeVarName="time" + data = nc.Dataset(flin,"r") + #print("TimeVarName = "+TimeVarName) + timevar=data[TimeVarName] + time=np.asarray(data[TimeVarName][:]) + epoch_1970 = datetime(1970, 1, 1, 0, 0, 0) + TimeUnitsString=timevar.units + TimeUnitsStrings=TimeUnitsString.split(" ") + tunits=TimeUnitsStrings[0] + dstr=TimeUnitsStrings[2] + dstr=dstr.split("-") + tstr=TimeUnitsStrings[3] + tstr=tstr.split(":") + print(dstr) + print(tstr) + secstr=tstr[2].rsplit(".", 1)[0] + base_date = datetime(int(dstr[0]),int(dstr[1]),int(dstr[2]),int(tstr[0]),int(tstr[1]),int(secstr)) + #base_date = datetime(int(dstr[0]),int(dstr[1]),int(dstr[2]),int(tstr[0]),int(tstr[1]),int(tstr[2])) + base_offset = int((base_date - epoch_1970).total_seconds()) + if tunits=="seconds": + unix_time = time + base_offset + if tunits=="days": + unix_time = time*24*60*60 + base_offset + if tunits=="hours": + unix_time = time*60*60 + base_offset + return unix_time + +def loadWW3Mesh(fl): + print("mesh file="+fl) + f=open(fl, 'r') + header = f.readline() + header = f.readline() + header = f.readline() + header = f.readline() + header = f.readline() # number of nodes + nn=int(header) + print("nn = "+str(nn)) + xi=np.zeros(nn) + yi=np.zeros(nn) + zi=np.zeros(nn) + k=0 + for i in range(nn): + A = f.readline() + B=A.lstrip() + values = B.split(" ") +# print(values) + if len(values)>5: + xi[k]=values[2] + yi[k]=values[4] + zi[k]=values[6] + else: + xi[k]=values[1] + yi[k]=values[2] + zi[k]=values[3] + k=k+1 + print("number of nodes read: "+str(k)) + header = f.readline() + header = f.readline() + header = f.readline() # number of elements + ne=int(header)#includes boundary nodes and actual elements + print("ne="+str(ne)+" -includes boundary nodes") + nbnd=0 + bnd=[] + eix=np.zeros((ne,3), dtype=int) + k=0 + for i in range(ne): + A = f.readline() + #print(A) + values = A.split(" ") + #print(values) + if len(values) == 6: + if int(values[2])==2: + bnd.append(int(values[5])) + nbnd=nbnd+1 + if len(values)>15: + eix[k,0]=int(values[12]) + eix[k,1]=int(values[14]) + eix[k,2]=int(values[16]) + k=k+1 + elif len(values)>7: + eix[k,0]=int(values[6]) + eix[k,1]=int(values[7]) + eix[k,2]=int(values[8]) + k=k+1 + ei=eix[range(k),:] + print("number of open boundary nodes read: "+str(nbnd)) + print("number of elements read: "+str(k)) + return xi, yi, ei, zi + + +import numpy as np +from scipy.interpolate import griddata +#import matplotlib.pyplot as plt + +def interpolate_curvilinear_to_points(lon_in, lat_in, data_in, lon_out, lat_out): + """ + Performs bilinear-equivalent interpolation from a curvilinear grid to new points. + + Args: + lon_in (np.ndarray): 2D array of input longitudes. + lat_in (np.ndarray): 2D array of input latitudes. + data_in (np.ndarray): 2D array of data values corresponding to (lon_in, lat_in). + lon_out (np.ndarray or list): Longitudes of the target points. + lat_out (np.ndarray or list): Latitudes of the target points. + + Returns: + np.ndarray: Interpolated data values at the target points. + """ + # Flatten the input coordinates and data into 1D arrays + # griddata expects points as a list of (x, y) tuples or a 2D array + points_in = np.vstack((lon_in.flatten(), lat_in.flatten())).T + values_in = data_in.flatten() + + # Define the target points + points_out = np.vstack((lon_out, lat_out)).T + + # Perform the interpolation using scipy.interpolate.griddata with 'linear' method + # The 'linear' method in griddata is the appropriate choice for curvilinear data + # as it uses triangulation. + interpolated_data = griddata(points_in, values_in, points_out, method='linear') + + return interpolated_data + + +def interpolate_curvilinear_to_pointsMD(lon_in, lat_in, data_in, lon_out, lat_out): + """ + Performs bilinear-equivalent interpolation from a curvilinear grid to new points. + + Args: + lon_in (np.ndarray): 2D array of input longitudes. + lat_in (np.ndarray): 2D array of input latitudes. + data_in (np.ndarray): 3D array of data values corresponding to (lon_in, lat_in, ntimes). + lon_out (np.ndarray or list): Longitudes of the target points. + lat_out (np.ndarray or list): Latitudes of the target points. + + Returns: + np.ndarray: Interpolated data values at the target points (length(lon_out/lat_out x ntimes)). + """ + # Flatten the input coordinates and data into 1D arrays + # griddata expects points as a list of (x, y) tuples or a 2D array + points_in = np.vstack((lon_in.flatten(), lat_in.flatten())).T + + shp=data_in.shape + print(shp) + nx=shp[0] + ny=shp[1] + nt=shp[2] + + ns=nx*ny + S=np.zeros((ns,nt)) + s0=np.zeros((nx,ny)) + for k in range(nt): + s0[:,:]=np.transpose(data_in[:,:,k]) + S[:,k] = s0.flatten() + + # Define the target points + points_out = np.vstack((lon_out, lat_out)).T + + # Perform the interpolation using scipy.interpolate.griddata with 'linear' method + # The 'linear' method in griddata is the appropriate choice for curvilinear data + # as it uses triangulation. + interpolated_data = griddata(points_in, S, points_out, method='linear') + + return interpolated_data + + +def interpolate_curvilinear_to_pointsRRFS(lon_in, lat_in, data_in, lon_out, lat_out): + """ + Performs bilinear-equivalent interpolation from a curvilinear grid to new points. + + Args: + lon_in (np.ndarray): 2D array of input longitudes. + lat_in (np.ndarray): 2D array of input latitudes. + data_in (np.ndarray): 3D array of data values corresponding to (lon_in, lat_in, ntimes). + lon_out (np.ndarray or list): Longitudes of the target points. + lat_out (np.ndarray or list): Latitudes of the target points. + + Returns: + np.ndarray: Interpolated data values at the target points (length(lon_out/lat_out x ntimes)). + """ + # Flatten the input coordinates and data into 1D arrays + # griddata expects points as a list of (x, y) tuples or a 2D array + + points_in = np.vstack((lon_in.flatten(), lat_in.flatten())).T + # points_in = np.hstack((lon_in.flatten(), lat_in.flatten())) + + shp=data_in.shape + print(shp) + nx=shp[0] + ny=shp[1] + nt=shp[2] + + ns=nx*ny + S=np.zeros((ns,nt)) + #s0=np.zeros((nx,ny)) + s0=np.zeros((ny,nx)) + for k in range(nt): + s0[:,:]=np.transpose(data_in[:,:,k]) + #s0[:,:]=data_in[:,:,k] + S[:,k] = s0.flatten() + + # Define the target points + points_out = np.vstack((lon_out, lat_out)).T + + # Perform the interpolation using scipy.interpolate.griddata with 'linear' method + # The 'linear' method in griddata is the appropriate choice for curvilinear data + # as it uses triangulation. + print(S.shape) + print(points_in) + print(points_out) + + interpolated_data = griddata(points_in, S, points_out, method='linear') + + return interpolated_data + +def CopyAttributes(VarOld, VarNew): + #Copy attributes from old NetCDF file variable to new NetCDF file variable + att_names = VarOld.ncattrs() + for jatt in range(len(att_names)): + att_name=att_names[jatt] + if (not (att_name=="_FillValue")): + att_value = VarOld.getncattr(att_name) + VarNew.setncattr(att_name, att_value) + return + + +############################################################################################ +# BEGIN WIND TO RWPS INTERP ROUTINES +import esmpy +import scipy.sparse as sp + +def CurvilinearGridCreateInterpWeights(xi,yi,x1,y1, weights_file): +# Compute interpolation weights to interpolate from curvilinear grid (x1,y1) to points (xi,yi) +# and store in netcdf file using ESMPY + nx,ny=x1.shape + nn=len(xi) + n1=nx*ny + src_lon = x1 + src_lat = y1 + dst_lon=np.zeros((1,nn)) + dst_lat=np.zeros((1,nn)) + print("nn="+str(nn)) + dst_lon[0,:] = xi[:] + dst_lat[0,:] = yi[:] + + esmpy.Manager() + + src_grid = esmpy.Grid( + max_index=np.array([src_lon.shape[0], src_lon.shape[1]]), + staggerloc=esmpy.StaggerLoc.CENTER, + coord_sys=esmpy.CoordSys.SPH_DEG + ) + + dst_grid = esmpy.Grid( + max_index=np.array([nn, 1]), + staggerloc=esmpy.StaggerLoc.CENTER, + coord_sys=esmpy.CoordSys.SPH_DEG + ) + + # 4. Populate the coordinate data + src_lon_ptr = src_grid.get_coords(0) + src_lat_ptr = src_grid.get_coords(1) + src_lon_ptr[...] = src_lon + src_lat_ptr[...] = src_lat + + dst_lon_ptr = dst_grid.get_coords(0) + dst_lat_ptr = dst_grid.get_coords(1) + dst_lon_ptr[...] = dst_lon.T + dst_lat_ptr[...] = dst_lat.T + + # 5. Create esmpy Fields + src_field = esmpy.Field(src_grid, name="src_field") + dst_field = esmpy.Field(dst_grid, name="dst_field") + src_field.data[...]=np.sqrt(x1/180)/(90+y1) # arbitrary function of x,y + + np.savetxt('F.txt', src_field.data[...]) + np.savetxt('X.txt', x1) + np.savetxt('Y.txt', y1) + print(f"Creating weights: {weights_file}") + regrid = esmpy.Regrid( + src_field, + dst_field, + filename=weights_file, + regrid_method=esmpy.RegridMethod.BILINEAR, + ignore_degenerate=True, # <--- Add this parameter + unmapped_action=esmpy.UnmappedAction.IGNORE # Optional: Ignores missing/masked points + ) +#Add number of rows and columns to weights file for clarity when constructing sparse matrix for interpolation + with nc.Dataset(weights_file, mode="a") as ds: + ds.Nrows = nn + ds.Ncols = n1 + + np.savetxt('Fi.txt', dst_field.data[...]) + np.savetxt('xi.txt', xi) + np.savetxt('yi.txt', yi) + + return + +def CalculateDistanceToBoundary(xi,yi,x1,y1): +# Distance to boundary calculation for use when interpolation envelope corresponds with +# interior of curvilinear grid boundary. +# +# Inputs: +# xi (nn): longitude of unstructured mesh nodes +# yi (nn): latitude of unstructured mesh nodes +# x1 (nx x ny): longitude for interpoltated field +# y1 (nx x ny): latitude for interpoltated field +# +# Outputs: +# dist2bnd (nn) : distance to edge of interpolation envelope. + nx=x1.shape[0] + ny=x1.shape[1] + xb=np.hstack((x1[1,:],x1[:,ny-1].T,x1[nx-1,:],x1[:,1].T)) + yb=np.hstack((y1[1,:],y1[:,ny-1].T,y1[nx-1,:],y1[:,1].T)) + np.savetxt('xbyb.txt', np.vstack((xb,yb))) + dist2bnd=np.zeros(nn) + for k in range(nn): + dist2bnd[k]=QuickDistance(yi[k],xi[k],yb,xb) + if k%10000==0: + print("calculating distance to boundary, "+str(k)+":"+ str(nn)+":"+str(k/nn) ) + return dist2bnd + +def CalculateDistanceToInterpEnvelope(xi,yi,fi,SearchWidth): +# Alternative distance to boundary calculation for use when interpolation envelope is +# distinctly interior to curvilinear grid boundary as happens for RRFS NA grid +# +# Inputs: +# xi (nn): longitude of unstructured mesh nodes +# yi (nn): latitude of unstructured mesh nodes +# fi (nn): interpolated field on mesh nodes with 'nan' values outside of interpolation envelope +# SearchWidth: Computational speed up to remove extra search points in distance to boundary +# +# Outputs: +# dist2bnd (nn) : distance to edge of interpolation envelope. dist2bnd[k]=0 if (xi[k],yi[k]) is outside +# of the interpolation envelope + nn=len(xi) + #dist2bnd=np.zeros(nn) + dist2bnd=np.full(nn,np.nan) + jin = np.where(~np.isnan(fi))[0].tolist()#points inside interpolation envelope + jout = np.where(np.isnan(fi))[0].tolist() #points outside interpolation envelope + xin=xi[jin] + yin=yi[jin] + xout=xi[jout] + yout=yi[jout] + jxU=np.where( xout < np.max(xin)+SearchWidth )[0].tolist() + jxD=np.where( xout > np.min(xin)-SearchWidth )[0].tolist() + jyU=np.where( yout < np.max(yin)+SearchWidth )[0].tolist() + jyD=np.where( yout > np.min(yin)-SearchWidth )[0].tolist() + j=list( set(jxU) & set(jxD) & set(jyU) & set(jyD) ) + xout=xout[j] + yout=yout[j] + din=np.zeros(len(jin)) + print(len(xin)) + print(len(xout)) + for k in range(len(xin)): + din[k]=QuickDistance(yin[k],xin[k],yout,xout) # distance from node to closest point not interpolated to + if k%10000==0: + print("calculating distance to boundary, "+str(k)+":"+ str(nn)+":"+str(k/nn) ) + dist2bnd[jin]=din + return dist2bnd + +#END WIND TO RWPS Utils + +def QuickDistance(lat1, lon1, lats2, lons2): + deg2kmY=111. + deg2kmX=np.cos( np.pi * lat1 / 180.)*deg2kmY + d= np.min( np.sqrt( ( (lat1-lats2)*deg2kmY)**2 + ((lon1-lons2)*deg2kmX)**2 ) ) + return d + +def VarianceLinearDistanceToBndy(DistanceToBoundary, InteriorVariance, VarianceOnBoundary, LengthScale): + InteriorNodeList=np.where(DistanceToBoundary**2 >= 0 ) + Variance=np.zeros(len(DistanceToBoundary))+np.inf + SpatialFunction=DistanceToBoundary/LengthScale + j=np.where(SpatialFunction>1.) + SpatialFunction[j]=1. + Variance[InteriorNodeList] = VarianceOnBoundary + ( InteriorVariance - VarianceOnBoundary ) * SpatialFunction[InteriorNodeList] + return Variance + +def VarianceInverseDistanceToBndy( DistanceToBoundary, InteriorVariance, LengthScale): + InteriorNodeList=np.where(DistanceToBoundary**2 >= 0 ) + Variance=np.zeros(len(DistanceToBoundary))+np.inf + SpatialFunction=LengthScale / DistanceToBoundary + j=np.where(SpatialFunction>1.) + SpatialFunction[j]=1. + Variance[InteriorNodeList] = InteriorVariance * SpatialFunction[InteriorNodeList] + return Variance + +def VarianceLinearDepth(zi,VarianceShallow,VarianceDeep,Zshallow,Zdeep): + Variance = VarianceShallow + (VarianceDeep-VarianceShallow)*(zi-Zshallow)/(Zdeep-Zshallow) + js=np.where(ziZdeep) + Variance[js]=VarianceShallow + Variance[jd]=VarianceDeep + return Variance + +import numpy as np +import netCDF4 as nc +def WriteInterpolationWeightsToNetCDF(weights_file,row,col,weights,Nrows,Ncols): + #create a esmpy style sparse matrix netcdf file + print(Nrows) + print(Ncols) + print(row) + print(col) + print(weights) + n_s=len(weights) + + if isinstance(row , list): + row = np.array( row ) + if isinstance( col, list): + col = np.array( col ) + if isinstance( weights, list): + weights = np.array( weights ) + + with nc.Dataset(weights_file, 'w', format='NETCDF4') as ncout: + + ncout.createDimension('n_s' , n_s) + ncout.setncattr("Nrows", Nrows) + ncout.setncattr("Ncols", Ncols) + + r_var=ncout.createVariable('row', 'i4', ('n_s',)) + r_var.long_name = 'row index' + r_var[:]=row[:] + + c_var=ncout.createVariable('col', 'i4', ('n_s',)) + c_var.long_name = 'column index' + c_var[:]=col[:] + + s_var=ncout.createVariable('S', 'f4', ('n_s',)) + s_var.long_name = 'matrix value' + s_var[:]=weights[:] + + + +def IsInElement(x,y,xp,yp): + IsIn=False + c1 = (x[1] - x[0]) * (yp - y[0]) - (y[1] - y[0]) * (xp - x[0]) + c2 = (x[2] - x[1]) * (yp - y[1]) - (y[2] - y[1]) * (xp - x[1]) + c3 = (x[0] - x[2]) * (yp - y[2]) - (y[0] - y[2]) * (xp - x[2]) + if ( ( c1 > 0 and c2 > 0 and c3 > 0) or ( c1 < 0 and c2 < 0 and c3 < 0) ): + IsIn=True + if (c1*c2*c3 == 0): # include points on triangle + IsIn=True + return IsIn + +def FindElement(x,y,e,xi,yi): + nd=len(e.shape) + e=np.squeeze(e) + j=-9999 + ne=e.shape[0] + #print(nd) + #print(ne) + #print(e) + if nd > 1: + xc = np.squeeze(np.mean(x[e], axis=1)) + yc = np.squeeze(np.mean(y[e], axis=1)) + DistanceToElements = np.abs((xi + 1j*yi) - (xc + 1j*yc)) + n=0 + while (j < 0 and n < ne) : + n=n+1 + j = np.argmin( DistanceToElements ) + xl = np.squeeze(x[e[j,:]]) + yl = np.squeeze(y[e[j,:]]) + IsIn=IsInElement(xl,yl,xi,yi) + if IsIn : + return j + else: + DistanceToElements[j]=float('inf') + j=-9999 + else: + xl = np.squeeze(x[e]) + yl = np.squeeze(y[e]) + IsIn=IsInElement(xl,yl,xi,yi) + if IsIn: + j=0 + return j + else: + j=-9999 + return j + + return j +""" +import matplotlib.tri as mtri +def compute_mesh_to_mesh_interp_weights(x, y, e, xi, yi, flout): + +# Assume x, y are vertex coords (N,), triangles is (M, 3) connectivity array + e0=e-1 + triang = mtri.Triangulation(x, y, e0) + + # z are the known values at each vertex (N,) + linear_interp = mtri.LinearTriInterpolator(triang, z) + + # Evaluate at new points (callable directly) + z_new = linear_interp(x_new, y_new) + +""" + +def universal_len(obj): + try: + return len(obj) + except TypeError: + return 1 + + +def compute_mesh_to_mesh_interp_weights(x, y, e, xi, yi): + """ + Compute mesh-to-mesh interpolation weights using barycentric coordinates. + + Parameters: + ----------- + x : array-like + X coordinates of source mesh nodes + y : array-like + Y coordinates of source mesh nodes + e : array-like + Element connectivity matrix (n_elements x 3 for triangular elements) + (nodes indexed from 1 to nn) + xi : array-like + X coordinates of target points + yi : array-like + Y coordinates of target points + + Returns: + -------- + weights : ndarray + Interpolation weights (n_points x 3) + nodes : ndarray + Node indices for each point (n_points x 3) + elenum : ndarray + Element number for each point (n_points,) + Dist2EleCenter : ndarray + Distance to element center for each element + """ + + # Convert to numpy arrays + + deg2kmY=111. + UseNearestEle = False #if True just use closest element center + N = 12 # search N nearest elements (nearest by element center to target node distance) + + print(xi) + x = np.asarray(x) + y = np.asarray(y) + e = np.asarray(e) + xi = np.asarray(xi) + yi = np.asarray(yi) + print("e.shape") + print(e.shape) + # convert node indexs to 0 .. nn-1 + e0=e-1 + + +# triangle_indices, weights, valid_mask=compute_and_save_weights(x, y, e0, xi, yi) +# np.savetxt("triangle_indices.txt",triangle_indices) +# np.savetxt("weights.txt",weights) +# np.savetxt("mask.txt",valid_mask) + + xc = np.mean(x[e0], axis=1) + yc = np.mean(y[e0], axis=1) + + # Initialize output arrays + n_points = len(xi) + n_elements = len(e) + weights = np.zeros((n_points, 3)) + nodes = np.zeros((n_points, 3), dtype=int) + elenum = np.zeros(n_points, dtype=int) + Dist2EleCenter = np.zeros(n_points) + + t0 = time.time() + + for k in range(n_points): + x0=xi[k] + y0=yi[k] + deg2kmX=np.cos( np.pi * y0 / 180.)*deg2kmY + #distances = np.abs((x0 + 1j*y0) - (xc + 1j*yc)) + distances = np.abs( deg2kmX*(x0 - xc) + 1j*deg2kmY*(y0 - yc)) + if UseNearestEle: + jg=np.argmin(distances) + else: + raw_indices = np.argpartition(distances, N)[:N] + sorted_sub_indices = np.argsort(distances[raw_indices]) + jg = raw_indices[sorted_sub_indices] + if UseNearestEle : + j=jg + else: + j=FindElement(x,y,e0[jg,:],x0,y0) + if j < 0: + print("couldn't find element for point : "+ str(k)) + print(str(x0)+" : "+str(y0)) + j = jg[0] + print("using closest element at distance : "+ str(distances[j])) + else: + j=jg[j] + + elenum[k] = j + Dist2EleCenter[k] = distances[j] + xl = x[e0[j, :]] + yl = y[e0[j, :]] + + # Compute barycentric coordinates using shoelace formula for areas + # Area of triangle formed by vertices 1, 2, and point (a3) + xt = np.array([xl[0], xl[1], x0, xl[0]]) + yt = np.array([yl[0], yl[1], y0, yl[0]]) + a3 = -np.dot(xt[1:4] - xt[0:3], yt[0:3] + yt[1:4]) / 2 + # Area of triangle formed by vertices 3, 1, and point (a2) + xt = np.array([xl[2], xl[0], x0, xl[2]]) + yt = np.array([yl[2], yl[0], y0, yl[2]]) + a2 = -np.dot(xt[1:4] - xt[0:3], yt[0:3] + yt[1:4]) / 2 + # Area of triangle formed by point, vertices 2, 3 (a1) + xt = np.array([x0, xl[1], xl[2], x0]) + yt = np.array([y0, yl[1], yl[2], y0]) + a1 = -np.dot(xt[1:4] - xt[0:3], yt[0:3] + yt[1:4]) / 2 + + # Normalize to get barycentric weights + total_area = a1 + a2 + a3 + weights[k, :] = [a1, a2, a3] / total_area + + nodes[k, :] = e[j, :] #<- indexed 1 .. nn + # Progress reporting every 100 iterations + if (k + 1) % 10 == 0: + t1 = time.time() + time_per_iter = (t1 - t0) / (k + 1) + time_remaining = (n_points - k - 1) * time_per_iter / 60 + print(f"Progress: {k+1}/{n_points}") + print(f"Time remaining: {time_remaining:.2f} minutes") + return weights, nodes, elenum, Dist2EleCenter + + +def InterpolateField2Nodes(nodes,weights, f): + fi=np.zeros(weights.shape[0]) + for k in range(weights.shape[0]): + fl=f[nodes[k,:]] + wl=weights[k,:] + fi[k]=np.dot(wl,fl) + if (not np.abs(fi[k]) > 0.): + fi[k]=0. + if ( fi[k]>np.max(fl) ): + fi[k]=np.max(fl) + if ( fi[k]cd $PBS_O_WORKDIR +#-->echo "Running on node: $(hostname)" +#--> python my_script.py --task $PBS_ARRAY_INDEX + +def WriteInterpJobscriptPBS(fl,flin,mshfl,Njobs, ComputeNodes): + + meshslash=mshfl.rfind('/')+1 + TmpOutDir="STOFSInterpWeights."+mshfl[meshslash:len(mshfl)-4] + WghtFl="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".txt" + WghtFlNetCDF="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".nc" + + Njobs=64 #OVERWRITE FOR NOW + with open(fl, 'w') as f: + + +# From rwps.cron +#PBS -A RWPS-DEV +#PBS -l select=1:ncpus=1:mem=100MB +#PBS -l walltime=02:00:00 +#PBS -q dev +#PBS -N rwps.boss.lsf +#PBS -j oe +#PBS -o rwps.MakeUnstrWghts.out +#PBS -e rwps.MakeUnstrWghts.out + +#PBS -l select=2:ncpus=32:mem=128gb + f.write("#PBS -N ESMPy\n") + f.write("#PBS -j oe\n") + f.write("#PBS -S /bin/bash\n") + f.write("#PBS -q dev\n") + f.write("#PBS -A NWPS-DEV\n") + f.write("#PBS -l walltime=01:00:00\n") + f.write("#PBS -J 1-"+str(Njobs)+"\n") + f.write("#PBS -l select=2:ncpus=32:mem=128gb\n") +# f.write("#PBS -l select=1:ncpus=1:mem=8G\n") + f.write("#PBS -l place=excl\n") + f.write("#PBS -l debug=true\n") + + f.write("module reset\n") + f.write("module load PrgEnv-intel/8.5.0\n") + f.write("module load intel/19.1.3.304\n") + f.write("module load craype/2.7.17\n") + f.write("module load cray-mpich/8.1.19\n") + f.write("module load hdf5-C/1.14.0\n") + f.write("module load netcdf-C/4.9.2\n") + f.write("module load esmf-C/8.6.0\n") + f.write("module load ve/hafs/2.1\n") + + f.write("pip list -v\n") + + f.write("# calculate interpolation weights in parallel geographically \n") + f.write("srun python GeoSubsetInterpolateSTOFS.py "+flin+" "+mshfl+" $PBS_ARRAY_INDEX " + str(Njobs)+" > InterpJob.$PBS_ARRAY_INDEX.out \n") + f.write("wait\n") + f.write("# concatonate different parts of the mesh to common text file \n") + f.write("cat "+TmpOutDir+"/Part.IntrpWghts.*.txt > "+WghtFl+" \n") + f.write("# convert output weights to netcdf file \n") + f.write("python ConvertWeights2Netcdf.py "+flin+" "+mshfl+" \n") + print("to run $qsub -r y "+fl) + + +def WriteInterpJobscriptSLURM(fl,flin,mshfl,Njobs, ComputeNodes): + + meshslash=mshfl.rfind('/')+1 + TmpOutDir="STOFSInterpWeights."+mshfl[meshslash:len(mshfl)-4] + WghtFl="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".txt" + WghtFlNetCDF="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".nc" + with open(fl, 'w') as f: + #yi[k]=float(values[4]) + f.write("#!/bin/bash \n") + f.write("#SBATCH --job-name=STOFS_interp_masterscript \n") +# f.write("#SBATCH --ntasks="+str(N)+" \n") + f.write("#SBATCH --ntasks=1 \n") # ntasks per interpolation + f.write("#SBATCH --time=08:00:00 \n") + f.write("#SBATCH --output=mpi_test_%j.log \n") + f.write("#SBATCH --error=%j.err \n") + f.write("#SBATCH --account=marine-cpu \n") + f.write("#SBATCH --nodes="+str(ComputeNodes)+" \n") + f.write("#SBATCH --ntasks-per-core=1"+" \n") + f.write("#SBATCH --array=0-"+str(Njobs-1)+" \n") + + f.write(" \n") + + f.write("module purge \n") + f.write("module use /scratch4/NCEPDEV/marine/Ali.Salimi/Hera_Data/HR4-OPT/FromJessica/Keston/ICunstructuredRuns15km-implicit-450s/global-workflow/sorc/ufs_model.fd/modulefiles \n") + f.write("module load ufs_ursa.intel \n") + f.write("module load py-scipy/1.14.1 \n") + f.write("module load py-netcdf4/1.7.1.post2 \n") + f.write("pip list \n") + f.write("# calculate interpolation weights in parallel geographically \n") + f.write("srun python GeoSubsetInterpolateSTOFS.py "+flin+" "+mshfl+" $SLURM_ARRAY_TASK_ID " + str(Njobs)+" > InterpJob.$SLURM_ARRAY_TASK_ID.out \n") + f.write("wait\n") + f.write("# concatonate different parts of the mesh to common text file \n") + f.write("cat "+TmpOutDir+"/Part.IntrpWghts.*.txt > "+WghtFl+" \n") + f.write("# convert output weights to netcdf file \n") + f.write("python ConvertWeights2Netcdf.py "+flin+" "+mshfl+" \n") + + + flintrp="STOFS.to."+mshfl[meshslash:len(mshfl)-4]+".sh" + flout=flin[0:-2]+mshfl[meshslash:len(mshfl)-4]+".nc" + flinuv=flin[0:-3]+".vel.nc" + floutuv=flinuv[0:-2]+mshfl[meshslash:len(mshfl)-4]+".nc" + with open(flintrp, 'w') as f: + f.write("#!/bin/bash \n") + f.write("#SBATCH --job-name=STOFS_interp_masterscript \n") + f.write(" \n") + f.write("module purge \n") + f.write("module use /scratch4/NCEPDEV/marine/Ali.Salimi/Hera_Data/HR4-OPT/FromJessica/Keston/ICunstructuredRuns15km-implicit-450s/global-workflow/sorc/ufs_model.fd/modulefiles \n") + f.write("module load ufs_ursa.intel \n") + f.write("module load py-scipy/1.14.1 \n") + f.write("module load py-netcdf4/1.7.1.post2 \n") + f.write("pip list \n") + f.write("# calculate interpolation weights in parallel geographically \n") + f.write("python InterpolateSTOFS.py "+flin+" "+mshfl+" "+flout+" zeta 2\n") + f.write("python InterpolateSTOFS.py "+flinuv+" "+mshfl+" "+floutuv+" u-vel:v-vel 2\n") + diff --git a/scripts/RWPSPreProcess/InterpolateWithWeights.py b/scripts/RWPSPreProcess/InterpolateWithWeights.py new file mode 100644 index 0000000..e696f34 --- /dev/null +++ b/scripts/RWPSPreProcess/InterpolateWithWeights.py @@ -0,0 +1,262 @@ +import numpy as np +import netCDF4 as nc +import sys +import InterpUtilities as iutil +import xarray as xr +import scipy.sparse as sp +from scipy.interpolate import NearestNDInterpolator +import datetime + +# Engine for interpolating to WW3 unstructured mesh using precomputed interpolation weights from netcdf files with forecasts +# +# to call: +# python InterpolateSTOFS.py input_file meshpath outputfile variable1:variable2:variable3 ExtrapMethod +# +# example: +# python InterpolateSTOFS.py stofs.20260608.00/stofs.cwl.vel.nc meshes/RWPS.V0a.small.msh tesdtoZ.vel.nc u-vel:v-vel 2 +# or: +# python InterpolateSTOFS.py stofs.20260608.00/stofs.cwl.nc meshes/RWPS.V0a.small.msh tesdtoZ.vel.nc zeta 1 +# +# ExtrapMethod =-1 no extrapolation, NaN's potentially in output where source field is dry +# ExtrapMethod = 0 NaN values in interpolated field replaced with 0.0 +# ExtrapMethod = 1 Nearest Neighbor extrapolation from valid source values +# ExtrapMethod = 2 Nearest Neighbor extrapolation from valid interpolated values +# ExtrapMethod = 3 Nearest Neighbor extrapolation from interpolated nodes which allways have valid values (faster than 2 for larger source mesh) + +UseUnixTime=True +nargin = len(sys.argv) - 1 + +flin=sys.argv[1] +#mshfl=sys.argv[2] +#meshslash=mshfl.rfind('/')+1 + +#weights_file="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".nc" +weights_file=sys.argv[2] + +flout=sys.argv[3] +varname0=sys.argv[4] +varname=varname0.split(":") + +ExtrapMethod=-1 # no extrapolation +if nargin>4: + ExtrapMethod=int(sys.argv[5]) + +if ExtrapMethod==-1: + print("no extrapolation, nan left in place in output") +if ExtrapMethod==0: + print("Fill missing values in interpolated field with value 0") +if ExtrapMethod==1: + print("extrapolation from nearest valid point in source- can be slow if source mesh is much larger than destination mesh") +if ExtrapMethod==2: + print("extrapolation from nearest valid point in destination (interpolated field)") + +with xr.open_dataset(weights_file) as ds_s: + # Standard sparse storage uses 'row', 'col', and 'data' variables + row = ds_s['row'].values + col = ds_s['col'].values + weights = ds_s['S'].values + Nrows=ds_s.attrs.get('Nrows') + Ncols=ds_s.attrs.get('Ncols') + SrcFieldType=ds_s.attrs.get('SrcFieldType') + if ExtrapMethod>0: #these extrapolation methods need the source and destination nodes + x=ds_s['x_src'].values + y=ds_s['y_src'].values + xi=ds_s['x_dst'].values + yi=ds_s['y_dst'].values + +nni=Nrows +n1=Ncols + +matrix = sp.coo_matrix((weights, (row-1, col-1)), shape=(Nrows,Ncols)).tocsr() +print("sparse interpolation matrix") +print(matrix) +row_sum = matrix.sum(axis=1) +j0=np.where( row_sum==0 ) # destination nodes with no coverage from interpolation matrix + +data = nc.Dataset(flin,"r") +if "time" in data.variables: + time=iutil.ConvertTimeToUnixTime(flin,"time") +elif "MT" in data.variables: + time=iutil.ConvertTimeToUnixTime(flin,"MT") +else: + print("No time variable found in "+flin+" EXITING") + sys.exit(1) + +nt=len(time) + +#nt=4 +#time=time[0:nt] + +print(time) + +nvar=len(varname) +vari=np.zeros((nvar,nt,nni)) + +if ExtrapMethod>=0: + IsExtrap=np.zeros((nvar,nt,nni),dtype=int) + +if ExtrapMethod==3: + AnyExtrap=np.zeros((nvar,nni),dtype=int) + +nan=float("nan") +for jv in range(nvar): + fill_value0=data[varname[jv]]._FillValue + print("fill value="+str(fill_value0)) + for k in range(nt): + print("interpolating for time step = "+str(k)+" of "+str(nt)) + vshp = data.variables[varname[jv]].shape +# if SrcFieldType=="unstructured": + if len(vshp)==1: + var=np.asarray(data[varname[jv]][:]) # No time dimension?, just spatial data to interpolate + elif len(vshp)==2: + var=np.asarray(data[varname[jv]][k,:]) + elif len(vshp)==3: # Wind field with dimensions time, x, y + if "wind" in flin: + var0=np.asarray(data[varname[jv]][k,:,:]) + var=np.transpose(var0).reshape(n1) + elif "ice" in flin: + var0=np.asarray(data[varname[jv]][k,:,:]) + if "rtofs" in flin: #remove bad geometry edges + var0=var0[1:-1,1:-1] + var=np.transpose(var0).reshape(n1) + + elif len(vshp)==4: # RTOFS field with 2nd dimensional "Level" and garbage boundries + var0=np.asarray(data[varname[jv]][k,0,:,:]) + if "rtofs" in flin: #remove bad geometry edges + var0=var0[1:-1,1:-1] + var=np.transpose(var0).reshape(n1) + + else: + print(vshp) + print(len(vshp)) + print("unkown data shape for "+varname[jv]+" terminating") + sys.exit() + + #replace fill with nan to avoid interpolating fill + j=np.where(var==fill_value0) + var[j]=nan + if ExtrapMethod==0: + j=np.where(np.isnan(var)) + var[j]=0. + + vari[jv,k,:] = matrix @ var # actual spatial interpolation step + vari[jv,k,j0]=nan # empty rows + if ExtrapMethod==3: # Fast posthoc nearest neighbor extrapolator + jd=np.where(np.isnan(vari[jv,k,:])) + AnyExtrap[jv,jd]=1. + elif ExtrapMethod>0:# and ExtrapMethod<3: + jd=np.where(np.isnan(vari[jv,k,:])) + dstp=np.array((xi[jd],yi[jd])) + if ExtrapMethod==1: + #extrapolate using nearest neighbor of source with valid value + js=np.where(~np.isnan(var)) + srcp=np.array((x[js],y[js])) + srcv=var[js] + if ExtrapMethod==2: + #extrapolate using nearest neighbor of interpolated field with valid value + js=np.where(~np.isnan(vari[jv,k,:])) + srcp=np.array((xi[js],yi[js])) + tmp=vari[jv,k,js] + srcv=tmp.flatten() + interp = NearestNDInterpolator(srcp.T,srcv) + ExtrapVals = interp( dstp.T ) + vari[jv,k,jd]=ExtrapVals + IsExtrap[jv,k,jd]=1 + +if ExtrapMethod==0: + jd=np.where(np.isnan(vari)) + vari[jd]==0. + IsExtrap[jd]=1 + +if ExtrapMethod==3: #posthoc extrapolation from points which are valid at all times + for jv in range(nvar): + jd=np.where(AnyExtrap[jv,:]==1) # nodes that have some "nan" intrepolated values + js=np.where(AnyExtrap[jv,:]==0) # nodes that have no "nan" intrepolated values + srcp = np.array((xi[js],yi[js])).T + srcv = vari[jv,0,js] #dummy input field + dstp = np.array((xi[jd],yi[jd])).T + srcv=srcv[0,:] + interpolator = NearestNDInterpolator(srcp, srcv) + distances, jsrc = interpolator.tree.query(dstp) + jd=jd[0] + for k in range(nt): + jdk=np.where(np.isnan(vari[jv,k,jd])) + jdk=jdk[0] + vari[jv,k,jd[jdk]]=vari[jv,k,jsrc[jdk]] # value of nearest "always valid" destination point + IsExtrap[jv,k,jd[jdk]]=1 + +print("nn(target mesh) = "+str(nni)+": Nrows = "+str(Nrows)) +print("nn(source mesh) = "+str(n1)+": Ncols = "+str(Ncols)) +if not ((nni==Nrows) and (n1==Ncols)): + print("WARNING: Wrong matrix weights: number of rows from "+ mshfl +" = "+str(nni)+ + " but number of rows in "+ weights_file +" = "+str(Nrows)+ + ", number of spatial points in "+ flin +" = "+str(n1)+ + " but number of columns in "+ weights_file +" = "+str(Ncols) ) + print(" You may need to regnerate file "+ weights_file +" with appropriate weights") + +#ne=ei.shape[0] + +with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: + + ncout.createDimension('level' , 1) + ncout.createDimension('node' , nni) + ncout.createDimension('time', nt) + + time_var=ncout.createVariable('time', 'f8', ('time',)) + varin = data["time"] + iutil.CopyAttributes(varin, time_var) + if UseUnixTime: + time_var.units = 'seconds since 1970-01-01 00:00:00.0 0:00' + time_var.standard_name = 'time' + time_var[:]=time[:] + + for jv in range(nvar): + print("writing output for :"+varname[jv]) + varin = data[varname[jv]] + F_var=ncout.createVariable(varname[jv], 'f4', ('time','node'),fill_value = fill_value0) + iutil.CopyAttributes(varin, F_var) + F_var.location = 'node' + F_var[:,:] = vari[jv,:,:] + + if ExtrapMethod >= 0 : + xtrp_var=ncout.createVariable(varname[jv]+'IsExtrap', 'i1', ('time','node')) + xtrp_var.long_name = '==1 if the interpolated value extrapolated. 0 if interpolated' + xtrp_var.standard_name = 'is extrapolated' + xtrp_var.location = 'node' + if ExtrapMethod == 0: + xtrp_var.method = 'Interpolated nan values replaced with 0' + if ExtrapMethod == 1: + xtrp_var.method = 'nearest valid neighbor in source field' + if ExtrapMethod == 2: + xtrp_var.method = 'nearest valid neighbor in interpolated field' + xtrp_var[:,:] = IsExtrap[jv,:,:] + + ncout.close + + +#mesh geometry should be added later +""" + + ncout.createDimension('element' , ne) + ncout.createDimension('noel', 3) + + lon_var=ncout.createVariable('longitude', 'f8', ('node',)) + lon_var.units = 'degree_east' + lon_var.long_name = 'longitude' + lon_var.standard_name = 'longitude' + lon_var.axis = 'X' + lon_var[:]=xi[:] + + lat_var=ncout.createVariable('latitude', 'f8', ('node',)) + lat_var.units = 'degree_north' + lat_var.long_name = 'latitude' + lat_var.standard_name = 'latitude' + lat_var.axis = 'Y' + lat_var[:]=yi[:] + + tri_var=ncout.createVariable('tri', 'i4', ('noel','element')) + tri_var.long_name = 'element list' + tri_var.standard_name = 'element list' + tri_var[:]=np.transpose(ei) +""" + diff --git a/scripts/RWPSPreProcess/InterpolateWithWeightsAndErrorVariance.py b/scripts/RWPSPreProcess/InterpolateWithWeightsAndErrorVariance.py new file mode 100644 index 0000000..1ddc6a2 --- /dev/null +++ b/scripts/RWPSPreProcess/InterpolateWithWeightsAndErrorVariance.py @@ -0,0 +1,336 @@ +import numpy as np +import netCDF4 as nc +import sys +import InterpUtilities as iutil +import xarray as xr +import scipy.sparse as sp +from scipy.interpolate import NearestNDInterpolator +import datetime + +# Engine for interpolating to WW3 unstructured mesh using precomputed interpolation weights from netcdf files with forecasts +# +# to call: +# python InterpolateSTOFS.py input_file meshpath outputfile variable1:variable2:variable3 ExtrapMethod +# +# example: +# python InterpolateSTOFS.py stofs.20260608.00/stofs.cwl.vel.nc meshes/RWPS.V0a.small.msh tesdtoZ.vel.nc u-vel:v-vel 2 +# or: +# python InterpolateSTOFS.py stofs.20260608.00/stofs.cwl.nc meshes/RWPS.V0a.small.msh tesdtoZ.vel.nc zeta 1 +# +# ExtrapMethod =-1 no extrapolation, NaN's potentially in output where source field is dry +# ExtrapMethod = 0 NaN values in interpolated field replaced with 0.0 +# ExtrapMethod = 1 Nearest Neighbor extrapolation from valid source values +# ExtrapMethod = 2 Nearest Neighbor extrapolation from valid interpolated values +# ExtrapMethod = 3 Nearest Neighbor extrapolation from interpolated nodes which allways have valid values (faster than 2 for larger source mesh) + +UseUnixTime=True +nargin = len(sys.argv) - 1 + +flin=sys.argv[1] +#mshfl=sys.argv[2] +#meshslash=mshfl.rfind('/')+1 + +#weights_file="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".nc" +weights_file=sys.argv[2] + +flout=sys.argv[3] +varname0=sys.argv[4] +varname=varname0.split(":") +if nargin>4: + VarParam0=sys.argv[5] + IncludeErrorVariance=True +else: + print("no variance parameters provided- error variance will not be included in file "+flout) + IncludeErrorVariance=False + +VariableType='Wind' +if "vel" in varname[0]: + VariableType='Current' +if "zeta" in varname[0]: + VariableType='WaterLevel' +if "ice" in varname[0]: + VariableType='Ice' + +ExtrapMethod=-1 # no extrapolation +if nargin>4: + ExtrapMethod=int(sys.argv[5]) + +if ExtrapMethod==-1: + print("no extrapolation, nan left in place in output") +if ExtrapMethod==0: + print("Fill missing values in interpolated field with value 0") +if ExtrapMethod==1: + print("extrapolation from nearest valid point in source- can be slow if source mesh is much larger than destination mesh") +if ExtrapMethod==2: + print("extrapolation from nearest valid point in destination (interpolated field)") + +with xr.open_dataset(weights_file) as ds_s: + # Standard sparse storage uses 'row', 'col', and 'data' variables + row = ds_s['row'].values + col = ds_s['col'].values + weights = ds_s['S'].values + Nrows=ds_s.attrs.get('Nrows') + Ncols=ds_s.attrs.get('Ncols') + SrcFieldType=ds_s.attrs.get('SrcFieldType') + if ExtrapMethod>0: #these extrapolation methods need the source and destination nodes + x=ds_s['x_src'].values + y=ds_s['y_src'].values + xi=ds_s['x_dst'].values + yi=ds_s['y_dst'].values + #shift to RWPS convention + j=np.where(x>90) + x[j]=x[j]-360. + j=np.where(xi>90) + xi[j]=xi[j]-360. + +nni=Nrows +n1=Ncols + +matrix = sp.coo_matrix((weights, (row-1, col-1)), shape=(Nrows,Ncols)).tocsr() +print("sparse interpolation matrix") +print(matrix) + +data = nc.Dataset(flin,"r") +if "time" in data.variables: + time=iutil.ConvertTimeToUnixTime(flin,"time") +elif "MT" in data.variables: + time=iutil.ConvertTimeToUnixTime(flin,"MT") +else: + print("No time variable found in "+flin+" EXITING") + sys.exit(1) + +nt=len(time) + +#nt=4 +#time=time[0:nt] + +print(time) + +nvar=len(varname) +vari=np.zeros((nvar,nt,nni)) + +if ExtrapMethod>=0: + IsExtrap=np.zeros((nvar,nt,nni),dtype=int) + +if ExtrapMethod==3: + AnyExtrap=np.zeros((nvar,nni),dtype=int) + +nan=float("nan") +for jv in range(nvar): + fill_value0=data[varname[jv]]._FillValue + print("fill value="+str(fill_value0)) + for k in range(nt): + print("interpolating for time step = "+str(k)+" of "+str(nt)) + vshp = data.variables[varname[jv]].shape +# if SrcFieldType=="unstructured": + if len(vshp)==1: + var=np.asarray(data[varname[jv]][:]) # No time dimension?, just spatial data to interpolate + if len(vshp)==2: + var=np.asarray(data[varname[jv]][k,:]) + if len(vshp)==3: # Wind field with dimensions time, x, y + var0=np.asarray(data[varname[jv]][k,:,:]) + var=np.transpose(var0).reshape(n1) + if len(vshp)==4: # RTOFS field with 2nd dimensional "Level" and garbage boundries + var0=np.asarray(data[varname[jv]][k,0,:,:]) + if "rtofs" in flin: #remove bad geometry edges + var0=var0[1:-1,1:-1] + var=np.transpose(var0).reshape(n1) + else: + print("unkown data shape for "+varname[jv]+" terminating") + sys.exit() + + #replace fill with nan to avoid interpolating fill + j=np.where(var==fill_value0) + var[j]=nan + + if ExtrapMethod==0: + j=np.where(np.isnan(var)) + var[j]=0. + + vari[jv,k,:] = matrix @ var # actual spatial interpolation step + + if ExtrapMethod==3: # Fast posthoc nearest neighbor extrapolator + jd=np.where(np.isnan(vari[jv,k,:])) + AnyExtrap[jv,jd]=1. + elif ExtrapMethod>0:# and ExtrapMethod<3: + jd=np.where(np.isnan(vari[jv,k,:])) + dstp=np.array((xi[jd],yi[jd])) + if ExtrapMethod==1: + #extrapolate using nearest neighbor of source with valid value + js=np.where(~np.isnan(var)) + srcp=np.array((x[js],y[js])) + srcv=var[js] + if ExtrapMethod==2: + #extrapolate using nearest neighbor of interpolated field with valid value + js=np.where(~np.isnan(vari[jv,k,:])) + srcp=np.array((xi[js],yi[js])) + tmp=vari[jv,k,js] + srcv=tmp.flatten() + interp = NearestNDInterpolator(srcp.T,srcv) + ExtrapVals = interp( dstp.T ) + vari[jv,k,jd]=ExtrapVals + IsExtrap[jv,k,jd]=1 + +if ExtrapMethod==0: + jd=np.where(np.isnan(vari)) + vari[jd]==0. + IsExtrap[jd]=1 + +if ExtrapMethod==3: #posthoc extrapolation from points which are valid at all times + for jv in range(nvar): + jd=np.where(AnyExtrap[jv,:]==1) # nodes that have some "nan" intrepolated values + js=np.where(AnyExtrap[jv,:]==0) # nodes that have no "nan" intrepolated values + srcp = np.array((xi[js],yi[js])).T + srcv = vari[jv,0,js] #dummy input field + dstp = np.array((xi[jd],yi[jd])).T + srcv=srcv[0,:] + interpolator = NearestNDInterpolator(srcp, srcv) + distances, jsrc = interpolator.tree.query(dstp) + jd=jd[0] + for k in range(nt): + jdk=np.where(np.isnan(vari[jv,k,jd])) + jdk=jdk[0] + vari[jv,k,jd[jdk]]=vari[jv,k,jsrc[jdk]] # value of nearest "always valid" destination point + IsExtrap[jv,k,jd[jdk]]=1 + +print("nn(target mesh) = "+str(nni)+": Nrows = "+str(Nrows)) +print("nn(source mesh) = "+str(n1)+": Ncols = "+str(Ncols)) +if not ((nni==Nrows) and (n1==Ncols)): + print("WARNING: Wrong matrix weights: number of rows from "+ mshfl +" = "+str(nni)+ + " but number of rows in "+ weights_file +" = "+str(Nrows)+ + ", number of spatial points in "+ flin +" = "+str(n1)+ + " but number of columns in "+ weights_file +" = "+str(Ncols) ) + print(" You may need to regnerate file "+ weights_file +" with appropriate weights") + +########################################################################################## +# CONSTRUCT PRESCRIBED ERROR COVARIANCE FOR UPDATING ESTIMATE +########################################################################################## +#grab variables for prescribing error variance +if IcludeErrorVariance: + dist2bnd_file=weights_file.replace("InterpolationWeights", "DistToBnd") + with xr.open_dataset(dist2bnd_file) as ds_s: + dist2bnd = ds_s['dist2bnd'].values + zi = ds_s['depth'].values + + if VariableType=="Current": + VarShallow=float(VarParam[0]) # variance (m/s)**2 for shallow regions + VarDeep=float(VarParam[1]) # variance (m/s)**2 for deep regions + BatShallow=float(VarParam[2]) # isobath (m) for shallow regions + BatDeep=float(VarParam[3]) # isobath (m) for deep regions + if "stofs" in flin: +# Variance = iutil.VarianceLinearDepth(zi,1.,100.,50.,250.) + Variance = iutil.VarianceLinearDepth(zi,VarShallow,VarDeep,BatShallow,BatDeep) + if "rtofs" in flin: #variance high in shallows and near boundary of coverage +# VarianceDepth = iutil.VarianceLinearDepth(zi,100.,1.,50.,250.) + VarianceDepth = iutil.VarianceLinearDepth(zi,VarShallow,VarDeep,BatShallow,BatDeep) + VarLambda= float(VarParam[4]) # lengthscale (km) for linear transition from bounadry variance(==VarShallow) to interior variance(==VarDeep) + VarianceBnd = iutil.VarianceLinearDistanceToBndy( dist2bnd, VarDeep,VarShallow, VarLambda) + Variance = np.maximum(VarianceDepth, VarianceBnd) + + if VariableType=="WaterLevel": + if "stofs" in flin: +# Variance = 1.+0*zi + VarInterior=float(VarParam[0]) # variance (m)**2 for stofs water level + Variance = VarInterior+0.*zi + if VariableType=="Wind": + ##LocalFS = [ rwps_pr, rwps_hi, rwps_ak, rwps_conus, rwps_na] # file names + ##VarFS = [ 4. , 4. , 9. , 16. , 25. ] # (m m /s /s) + ##LambdaFS = [ 150. , 200. , 500. , 1000. , 1500. ] # (km) + VarInterior=float(VarParam[0]) # variance (m/s)**2 for interior of forecast + if "nbm" in flin: + Variance = VarInterior + 0.*dist2bnd[:] + if "rrfs" in flin: + VarBoundary = float(VarParam[1]) # variance (m/s)**2 for boundary of forecast + VarLambda = float(VarParam[2]) # lengthscale (km) for linear transition from bounadry variance to interior variance + Variance = iutil.VarianceLinearDistanceToBndy( dist2bnd, VarInterior, VarBoundary,VarLambda ) + + ErrorVariance=np.zeros((nt,nni)) + for k in range(nt): + ErrorVariance[k,:]=Variance[:] +########################################################################################## +# CONSTRUCT PRESCRIBED ERROR COVARIANCE FOR UPDATING ESTIMATE +########################################################################################## + +ne=ei.shape[0] +with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: + + ncout.createDimension('level' , 1) + ncout.createDimension('node' , nni) + ncout.createDimension('element' , ne) + ncout.createDimension('time', nt) + ncout.createDimension('noel', 3) + + lon_var=ncout.createVariable('longitude', 'f8', ('node',)) + lon_var.units = 'degree_east' + lon_var.long_name = 'longitude' + lon_var.standard_name = 'longitude' + lon_var.axis = 'X' + lon_var[:]=xi[:] + + lat_var=ncout.createVariable('latitude', 'f8', ('node',)) + lat_var.units = 'degree_north' + lat_var.long_name = 'latitude' + lat_var.standard_name = 'latitude' + lat_var.axis = 'Y' + lat_var[:]=yi[:] + + if UseUnixTime: + units = 'seconds since 1970-01-01 00:00:00.0 0:00' + long_name = 'verification time generated by wgrib2 function verftime()' + standard_name = 'time' + else: + varin = data["time"] + units = varin.units + standard_name = varin.standard_name + long_name = varin.long_name + + time_var=ncout.createVariable('time', 'f8', ('time',)) + time_var.units = units + time_var.long_name = long_name + time_var.standard_name = standard_name + time_var[:]=time[:] + + tri_var=ncout.createVariable('tri', 'i4', ('noel','element')) + tri_var.long_name = 'element list' + tri_var.standard_name = 'element list' + tri_var[:]=np.transpose(ei) + + for jv in range(nvar): + if varname[jv]=='' + print("writing output for :"+varname[jv]) + varin = data[varname[jv]] + units = varin.units + standard_name = varin.standard_name + long_name = varin.long_name + location = 'node' + + F_var=ncout.createVariable(varname[jv], 'f4', ('time','node'),fill_value = fill_value0) + F_var.long_name = long_name + F_var.units = units + F_var.standard_name = standard_name + F_var.location = location + F_var[:,:] = vari[jv,:,:] + + if ExtrapMethod >= 0 : + xtrp_var=ncout.createVariable(varname[jv]+'IsExtrap', 'i1', ('time','node')) + xtrp_var.long_name = '==1 if the interpolated value extrapolated. 0 if interpolated' + xtrp_var.standard_name = 'is extrapolated' + xtrp_var.location = 'node' + if ExtrapMethod == 0: + xtrp_var.method = 'Interpolated nan values replaced with 0' + if ExtrapMethod == 1: + xtrp_var.method = 'nearest valid neighbor in source field' + if ExtrapMethod == 2: + xtrp_var.method = 'nearest valid neighbor in interpolated field' + xtrp_var[:,:] = IsExtrap[jv,:,:] + + if IcludeErrorVariance: + ErrorVariance_var=ncout.createVariable('ErrorVariance', 'f4', ('time','node'),fill_value = fill_value0) + ErrorVariance_var.long_name = 'forecast error variance' + ErrorVariance_var.units = "("+units+")**2" + ErrorVariance_var.standard_name = 'variance' + ErrorVariance_var[:,:]=ErrorVariance + + ncout.close + + diff --git a/scripts/RWPSPreProcess/ProcessCurrents.sh b/scripts/RWPSPreProcess/ProcessCurrents.sh new file mode 100644 index 0000000..9488b0a --- /dev/null +++ b/scripts/RWPSPreProcess/ProcessCurrents.sh @@ -0,0 +1,104 @@ +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=00:05:00 +#PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + +pip list -v + +#date="20260602" +#cycl="00" +#mesh="meshes/RWPS.V0a.small.msh" + +date=$1 +cycl=$2 +mesh=$3 + + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +stofscur="stofs.$date.$cycl/stofs_2d_glo.t${cycl}z.fields.cwl.vel.nc" +rtofscur="rtofs.$date.nc" + +varnames="u-vel:v-vel" + +combinedcur=$meshname.$date.$cycl.vel.stofsxrtofs.nc + +## STOFS interpolation +stofs_wghts="InterpolationWeights.$meshname.stofs.nc" +stofs_dists="DistToBndy.$meshname.stofs.nc" +stofs_rwps="$meshname.$date.$cycl.vel.cwl.stofs.nc" +stofs_rwps_ti="$meshname.$date.$cycl.vel.cwl.stofs.ti.nc" + +if [ ! -f "$stofs_wghts" ]; then + echo "missing stofs interpolation weights file: $stofs_wghts" + echo "compute with script ComputeUnstrToRWPSInterpWeights.sh" + exit 1 +fi +if [ ! -f "$stofs_dists" ]; then + echo "missing stofs distance to boundary file: $stofs_dists" + echo "compute with script ComputeUnstrToRWPSInterpWeights.sh" + exit 1 +fi + +# extrapolate with zero fill +python InterpolateWithWeights.py $stofscur $stofs_wghts $stofs_rwps $varnames 0 & + + +## RTOFS interpolation +rtofs_rwps="$meshname.$date.vel.rtofs.nc" +rtofs_wghts="InterpolationWeights.$meshname.rtofs.nc" +rtofs_dists="DistToBndy.$meshname.rtofs.nc" +rtofs_rwps_ti="$meshname.$date.$cycl.vel.cwl.rtofs.ti.nc" + +if [ ! -f "$rtofs_wghts" ]; then + echo "missing rtofs interpolation weights file: $stofs_wghts" + echo "compute with script ComputeGridToRWPSInterpWeights.py" + exit 2 +fi +if [ ! -f "$rtofs_dists" ]; then + echo "missing stofs distance to boundary file: $rtofs_dists" + echo "compute with script ComputeUnstrToRWPSInterpWeights.py" + exit 2 +fi +# no extrapolation +python InterpolateWithWeights.py $rtofscur $rtofs_wghts $rtofs_rwps $varnames -1 & + +wait; + +python AddMeshGeomToFile.py $rtofs_rwps $mesh +python AddMeshGeomToFile.py $stofs_rwps $mesh + +#python AddErrVarToFile0.py $rtofs_rwps $rtofs_dists 100.:1.:50.:250.:50. +#python AddErrVarToFile0.py $stofs_rwps $stofs_dists 1.:100.:50.:250. + +#interpolate from stofs to common stofs and rtofs times within range of stofs time +python InterpTime.py $stofs_rwps $rtofs_rwps $stofs_rwps_ti $varnames False & + +#interpolate from rtofs to common stofs and rtofs times within range of stofs time +#values out of range are extrapolated to assuming persistance +python InterpTime.py $stofs_rwps $rtofs_rwps $rtofs_rwps_ti $varnames True & + +wait + +python AddErrVarToFile0.py $rtofs_rwps_ti $rtofs_dists 100.:1.:50.:250.:50. +python AddErrVarToFile0.py $stofs_rwps_ti $stofs_dists 1.:100.:50.:250. + +python BayesForecastUpdate.py $stofs_rwps_ti $rtofs_rwps_ti $combinedcur $varnames + diff --git a/scripts/RWPSPreProcess/ProcessIce.sh b/scripts/RWPSPreProcess/ProcessIce.sh new file mode 100644 index 0000000..d558320 --- /dev/null +++ b/scripts/RWPSPreProcess/ProcessIce.sh @@ -0,0 +1,113 @@ +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=00:05:00 +#PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + +pip list -v + +#date="20260602" +#cycl="00" +#mesh="meshes/RWPS.V0a.small.msh" + +date=$1 +cycl=$2 +mesh=$3 + + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +inpdir=ice.$date.$cycl + +nbmice=$inpdir/nbm.$date.$cycl.ice.ak.nc +rtofsice=$inpdir/rtofs.ice.$date.nc + +varnames="ICEC_surface" + +combinedice=$meshname.$date.$cycl.ice.rtofsxnbm.nc + +## NBM AK domain interpolation +## NOTE WE ARE USING THE RRFS ak WEIGHTS HERE NEED TO RELABEL AND RECOMPUTE FOR NBM AK DOMAIN +## DIFFERENCES ARE SMALL. posional distance ~200m on 3km grid roughly +nbm_ak_wghts="InterpolationWeights.$meshname.ak.nc" +nbm_ak_dists="DistToBndy.$meshname.ak.nc" + +nbm_rwps="$meshname.$date.$cycl.ice.nbm.ak.nc" +nbm_rwps_ti="$meshname.$date.$cycl.ice.nbm.ak.ti.nc" + +if [ ! -f "$nbm_ak_wghts" ]; then + echo "missing nbm ak interpolation weights file: $nbm_ak_wghts" + echo "compute with script ComputeUnstrToRWPSInterpWeights.sh" + exit 1 +fi + +if [ ! -f "$nbm_ak_dists" ]; then + echo "missing nbm ak distance to boundary file: $nbm_ak_dists" + echo "compute with script ComputeUnstrToRWPSInterpWeights.sh" + exit 1 +fi + +# no extrapolation +python InterpolateWithWeights.py $nbmice $nbm_ak_wghts $nbm_rwps $varnames -1 & + +## RTOFS interpolation +rtofs_rwps="$meshname.$date.ice.rtofs.nc" +rtofs_wghts="InterpolationWeights.$meshname.rtofs.nc" +rtofs_dists="DistToBndy.$meshname.rtofs.nc" +rtofs_rwps_ti="$meshname.$date.$cycl.ice.rtofs.ti.nc" + +if [ ! -f "$rtofs_wghts" ]; then + echo "missing rtofs interpolation weights file: $rtofs_wghts" + echo "compute with script ComputeGridToRWPSInterpWeights.py" + exit 2 +fi +if [ ! -f "$rtofs_dists" ]; then + echo "missing stofs distance to boundary file: $rtofs_dists" + echo "compute with script ComputeUnstrToRWPSInterpWeights.py" + exit 2 +fi + +# extrapolate with 0 as fill +echo "$rtofsice" +python InterpolateWithWeights.py $rtofsice $rtofs_wghts $rtofs_rwps $varnames 0 & + +wait; + +python AddMeshGeomToFile.py $rtofs_rwps $mesh +python AddMeshGeomToFile.py $nbm_rwps $mesh + +#python AddErrVarToFile0.py $rtofs_rwps $rtofs_dists 100.:1.:50.:250.:50. +#python AddErrVarToFile0.py $stofs_rwps $stofs_dists 1.:100.:50.:250. + +#interpolate from stofs to common stofs and rtofs times within range of stofs time +python InterpTime.py $rtofs_rwps $nbm_rwps $rtofs_rwps_ti $varnames False & + +#interpolate from rtofs to common stofs and rtofs times within range of stofs time +#values out of range are extrapolated to assuming persistance +python InterpTime.py $rtofs_rwps $nbm_rwps $nbm_rwps_ti $varnames True & + +wait + +#uniform variance of 100. +python AddErrVarToFile0.py $rtofs_rwps_ti $rtofs_dists 100. + +#interior variance of 4., boundary variance fof 400., transition lengthscale 9. km +python AddErrVarToFile0.py $nbm_rwps_ti $nbm_ak_dists 4.:400.:9. + +python BayesForecastUpdate.py $rtofs_rwps_ti $nbm_rwps_ti $combinedice $varnames diff --git a/scripts/RWPSPreProcess/ProcessWaterLevel.sh b/scripts/RWPSPreProcess/ProcessWaterLevel.sh new file mode 100644 index 0000000..42d2b0d --- /dev/null +++ b/scripts/RWPSPreProcess/ProcessWaterLevel.sh @@ -0,0 +1,61 @@ +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=00:05:00 +#PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + +pip list -v + +date=$1 +cycl=$2 +mesh=$3 + +curdir=$(pwd) +echo "directory : $curdir" + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +stofslev="stofs.$date.$cycl/stofs_2d_glo.t${cycl}z.fields.cwl.nc" + +varnames="zeta" + +## STOFS interpolation +stofs_wghts="InterpolationWeights.$meshname.stofs.nc" +stofs_dists="DistToBndy.$meshname.stofs.nc" +stofs_rwps="$meshname.$date.$cycl.cwl.stofs.nc" + +echo "$meshname" +echo "$stofs_wghts" +echo "$stofs_rwps" + +if [ ! -f "$stofs_wghts" ]; then + echo "missing stofs interpolation weights file: $stofs_wghts" + echo "compute with script ComputeUnstrToRWPSInterpWeights.sh" + exit 1 +fi +if [ ! -f "$stofs_dists" ]; then + echo "missing stofs distance to boundary file: $stofs_dists" + echo "compute with script ComputeUnstrToRWPSInterpWeights.sh" + exit 1 +fi + +python InterpolateWithWeights.py $stofslev $stofs_wghts $stofs_rwps $varnames 0 +python AddMeshGeomToFile.py $stofs_rwps $mesh +python AddErrVarToFile0.py $stofs_rwps $stofs_dists 1. + diff --git a/scripts/RWPSPreProcess/ProcessWinds.sh b/scripts/RWPSPreProcess/ProcessWinds.sh new file mode 100644 index 0000000..514616f --- /dev/null +++ b/scripts/RWPSPreProcess/ProcessWinds.sh @@ -0,0 +1,149 @@ +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=00:05:00 +#PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + +pip list -v + +##date="20260527" +#date=20260602 +#cycl="00" +#mesh=meshes/RWPS.V0a.small.msh + +date=$1 +cycl=$2 +mesh=$3 +#winddir="forecasts/wind.$date.$cycl" +winddir="wind.$date.$cycl" +windvars="UGRD_10maboveground:VGRD_10maboveground" + +# extract mesh name from file path +meshname="${mesh##*/}" +# remove .msh suffix from mesh name +meshname="${meshname: 0: -4}" + +# incorporate meshname date and cycle into output directory name to avoid +# applying winds to wrong mesh +outdir="rwps_winds.$meshname.$date.$cycl" + +echo "outputing files to: $outdir" + +nbm_oc="$winddir/nbm.$date.$cycl.wind10m.oc.nc" +nbm_oc_uv="$winddir/nbm.$date.$cycl.wind10m.oc.uv.nc" + +rrfs_pr="$winddir/rrfs.$date.$cycl.wind10m.pr.nc" +rrfs_hi="$winddir/rrfs.$date.$cycl.wind10m.hi.nc" +rrfs_na="$winddir/rrfs.$date.$cycl.wind10m.na.nc" +rrfs_ak="$winddir/rrfs.$date.$cycl.wind10m.ak.nc" +rrfs_conus="$winddir/rrfs.$date.$cycl.wind10m.conus.nc" + +rwps_oc="$outdir/nbm.$meshname.$date.$cycl.wind10m.oc.nc" +rwps_oc_ti="$outdir/nbm.$meshname.$date.$cycl.wind10m.oc.ti.nc" +rwps_pr="$outdir/rrfs.$meshname.$date.$cycl.wind10m.pr.nc" +rwps_hi="$outdir/rrfs.$meshname.$date.$cycl.wind10m.hi.nc" +rwps_na="$outdir/rrfs.$meshname.$date.$cycl.wind10m.na.nc" +rwps_ak="$outdir/rrfs.$meshname.$date.$cycl.wind10m.ak.nc" +rwps_conus="$outdir/rrfs.$meshname.$date.$cycl.wind10m.conus.nc" +rwps_est="$outdir/rwps.est.$meshname.$date.$cycl.wind10m.nc" + +mkdir $outdir + + +##weights_file = "InterpolationWeights."+mshfl[meshslash:len(mshfl)-3]+dom+".nc" + +##LocalFS = [ rwps_pr, rwps_hi, rwps_ak, rwps_conus, rwps_na] # file names +##VarFS = [ 4. , 4. , 9. , 16. , 25. ] # (m m /s /s) +##LambdaFS = [ 150. , 200. , 500. , 1000. , 1500. ] # (km) +nbm_oc_wghts="InterpolationWeights.$meshname.oc.nc" +rrfs_hi_wghts="InterpolationWeights.$meshname.hi.nc" +rrfs_pr_wghts="InterpolationWeights.$meshname.pr.nc" +rrfs_ak_wghts="InterpolationWeights.$meshname.ak.nc" +rrfs_na_wghts="InterpolationWeights.$meshname.na.nc" +rrfs_conus_wghts="InterpolationWeights.$meshname.conus.nc" + +nbm_oc_dist="DistToBndy.$meshname.oc.nc" +rrfs_hi_dist="DistToBndy.$meshname.hi.nc" +rrfs_pr_dist="DistToBndy.$meshname.pr.nc" +rrfs_ak_dist="DistToBndy.$meshname.ak.nc" +rrfs_na_dist="DistToBndy.$meshname.na.nc" +rrfs_conus_dist="DistToBndy.$meshname.conus.nc" + + +( + #Convert NBM speed and direction to u,v + python SpdDir2UVnbm.py $nbm_oc $nbm_oc_uv + # If the interpolation weights do not already exist for the domains create them + # also creates distance to boundary used in prescribed error covariance specification + [ ! -f "$nbm_oc_wghts" ] && python ComputeGriddedToRWPSInterpWeights.py $nbm_oc_uv $mesh 1 + python InterpolateWithWeights.py $nbm_oc_uv $nbm_oc_wghts $rwps_oc $windvars 3 + python AddMeshGeomToFile.py $rwps_oc $mesh +)& + +( + [ ! -f "$rrfs_hi_wghts" ] && python ComputeGriddedToRWPSInterpWeights.py $rrfs_hi $mesh + python InterpolateWithWeights.py $rrfs_hi $rrfs_hi_wghts $rwps_hi $windvars -1 + #add mesh geometry into interpolated file + python AddMeshGeomToFile.py $rrfs_hi $mesh + # Add error covariance field to files with interpolated fields for bayesian update + # Based on distance to boundary of input field and commant line parameters InternalVariance:BoundaryVariance:LengthScale(km) + python AddErrVarToFile0.py $rwps_hi $rrfs_hi_dist 4.:40.:200. +)& + +( + [ ! -f "$rrfs_pr_wghts" ] && python ComputeGriddedToRWPSInterpWeights.py $rrfs_pr $mesh + python InterpolateWithWeights.py $rrfs_pr $rrfs_pr_wghts $rwps_pr $windvars -1 + python AddMeshGeomToFile.py $rrfs_pr $mesh + python AddErrVarToFile0.py $rwps_pr $rrfs_pr_dist 4.:40.:150. +)& + +( + [ ! -f "$rrfs_ak_wghts" ] && python ComputeGriddedToRWPSInterpWeights.py $rrfs_ak $mesh + python InterpolateWithWeights.py $rrfs_ak $rrfs_ak_wghts $rwps_ak $windvars -1 + python AddMeshGeomToFile.py $rrfs_ak $mesh + python AddErrVarToFile0.py $rwps_ak $rrfs_ak_dist 9.:90.:500. +)& + +( + [ ! -f "$rrfs_conus_wghts" ] && python ComputeGriddedToRWPSInterpWeights.py $rrfs_conus $mesh + python InterpolateWithWeights.py $rrfs_conus $rrfs_conus_wghts $rwps_conus $windvars -1 + python AddMeshGeomToFile.py $rrfs_conus $mesh + python AddErrVarToFile0.py $rwps_conus $rrfs_conus_dist 16.:160.:1000. +)& + +( + [ ! -f "$rrfs_na_wghts" ] && python ComputeGriddedToRWPSInterpWeights.py $rrfs_na $mesh + python InterpolateWithWeights.py $rrfs_na $rrfs_na_wghts $rwps_na $windvars -1 + python AddMeshGeomToFile.py $rrfs_na $mesh + python AddErrVarToFile0.py $rwps_na $rrfs_na_dist 50.:500.:1500. +)& + +wait; +#Interpolate NBM in time to times within the NBM forecast covered by the RRFS forecast +python InterpTime.py $rwps_oc $rwps_pr $rwps_oc_ti $windvars +#add mesh geometry into file +python AddMeshGeomToFile.py $rwps_oc_ti $mesh +#add prescribed error covariance for nbm oc domain (assumed constant 100. (m/s)^2 ) +python AddErrVarToFile0.py $rwps_oc_ti $nbm_oc_dist 100. + +cp $rwps_oc_ti $rwps_est +[ ! -f "$rwps_hi" ] && python BayesForecastUpdate.py $rwps_est $rwps_hi $rwps_est $windvars +[ ! -f "$rwps_pr" ] && python BayesForecastUpdate.py $rwps_est $rwps_pr $rwps_est $windvars +[ ! -f "$rwps_ak" ] && python BayesForecastUpdate.py $rwps_est $rwps_ak $rwps_est $windvars +[ ! -f "$rwps_conus" ] && python BayesForecastUpdate.py $rwps_est $rwps_conus $rwps_est $windvars +[ ! -f "$rwps_na" ] && python BayesForecastUpdate.py $rwps_est $rwps_na $rwps_est $windvars diff --git a/scripts/RWPSPreProcess/README.md b/scripts/RWPSPreProcess/README.md new file mode 100644 index 0000000..f8cfff9 --- /dev/null +++ b/scripts/RWPSPreProcess/README.md @@ -0,0 +1 @@ +# RWPSInterpolationUtilities diff --git a/scripts/RWPSPreProcess/SpdDir2UVnbm.py b/scripts/RWPSPreProcess/SpdDir2UVnbm.py new file mode 100644 index 0000000..e25aaa1 --- /dev/null +++ b/scripts/RWPSPreProcess/SpdDir2UVnbm.py @@ -0,0 +1,86 @@ +import os +import argparse +import numpy as np +import netCDF4 as nc +#import jigsawpy +import sys +import math +flin=sys.argv[1] +flout=sys.argv[2] +#fld="wdir10m.nc" +#fls="wspd10m.nc" +#flout="wind.08.31.WW3.nc" +fcst0 = nc.Dataset(flin,"r") + +x=np.asarray(fcst0["longitude"][:]) +y=np.asarray(fcst0["latitude"][:]) +t=np.asarray(fcst0["time"][:]) +spd=np.asarray(fcst0["WIND_10maboveground"][:,:,:]) +theta=np.asarray(fcst0["WDIR_10maboveground"][:,:,:]) + +spdV=fcst0["WIND_10maboveground"] +fill_value0 = spdV._FillValue + +print("fil val") +print(fill_value0) + +print("spd shape") +print(spd.shape) + +u=-1*spd*np.sin(theta*np.pi/180.) +v=-1*spd*np.cos(theta*np.pi/180.) +u[np.where(spd==fill_value0)]=fill_value0 +v[np.where(spd==fill_value0)]=fill_value0 + +nx=len(x) +ny=len(y) +nt=len(t) + +with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: + # Create dimensions + ncout.createDimension('lon' , nx) # Unlimited dimension + ncout.createDimension('lat' , ny) + ncout.createDimension('time', nt) + + lon_var=ncout.createVariable('longitude', 'f8', ('lon',)) + lon_var.units = 'degree_east' + lon_var.long_name = 'longitude' + lon_var.standard_name = 'longitude' + lon_var.axis = 'lon' + lon_var[:]=x[:] + + lat_var=ncout.createVariable('latitude', 'f8', ('lat',)) + lat_var.units = 'degree_north' + lat_var.long_name = 'latitude' + lat_var.standard_name = 'latitude' + lat_var.axis = 'lat' + lat_var[:]=y[:] + + time_var=ncout.createVariable('time', 'f8', ('time',)) + time_var.units = 'seconds since 1970-01-01 00:00:00.0 0:00' + time_var.long_name = 'verification time generated by wgrib2 function verftime()' + time_var.standard_name = 'time' + time_var.axis = 'time' + time_var[:]=t[:] + +# u_var=ncout.createVariable('UGRD_10maboveground', 'f4', ('lon','lat','time'),fill_value = -99999) + u_var=ncout.createVariable('UGRD_10maboveground', 'f4', ('time','lat','lon'),fill_value = fill_value0) + u_var.long_name = 'U-Component of Wind' + u_var.units = 'm/s' + u_var.standard_name = 'UGRD_10maboveground' + u_var.level = '10 m above ground' + u_var[:,:,:]=u[:,:,:] +# u_var[:,:,:]=np.transpose(u[:,:,:],(2,1,0)) + + v_var=ncout.createVariable('VGRD_10maboveground', 'f4', ('time','lat','lon'),fill_value = fill_value0) + v_var.long_name = 'V-Component of Wind' + v_var.units = 'm/s' + v_var.standard_name = 'VGRD_10maboveground' + v_var.level = '10 m above ground' + v_var[:,:,:]=v[:,:,:] +# v_var[:,:,:]=np.transpose(v[:,:,:],(2,1,0)) + + + ncout.close + + diff --git a/scripts/RWPSPreProcess/nbm/ConvertNBMIcetif2NetCDF.py b/scripts/RWPSPreProcess/nbm/ConvertNBMIcetif2NetCDF.py new file mode 100644 index 0000000..5c4701d --- /dev/null +++ b/scripts/RWPSPreProcess/nbm/ConvertNBMIcetif2NetCDF.py @@ -0,0 +1,56 @@ +#aws s3 ls --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/ | g ice +#aws s3 cp --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/iceconcentration/blendv5.0_alaska_iceconcentration_2026-05-07T00:00_2026-05-08T12:00.tif ./ +#aws s3 cp --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/icethickness/blendv5.0_alaska_icethickness_2026-05-07T00:00_2026-05-08T12:00.tif ./ +#pip install rioxarray xarray pyproj numpy NetCDF4 +#python ConvertNBMIcetif2NetCDF.py iceconcentration/blendv5.0_alaska_iceconcentration_2026-05-07T00:00_2026-05-08T12:00.tif +import numpy as np +import pyproj +import rioxarray as rio +import xarray as xr +import sys + +flin = sys.argv[1] +flout=flin[0:-4]+".nc" +# 1. Load the original GeoTIFF file +# Replace 'input.tif' with your actual file path +da = rio.open_rasterio(flin) + +# 2. Extract the 1D projected X and Y coordinates (in meters) +x_coords = da.x.values +y_coords = da.y.values + +# 3. Create a 2D meshgrid of the projected coordinates +X, Y = np.meshgrid(x_coords, y_coords) + +# 4. Set up the coordinate transformer +# From EPSG:5936 (Polar Stereographic) to EPSG:4326 (Lat/Lon) +transformer = pyproj.Transformer.from_crs( + "EPSG:5936", "EPSG:4326", always_xy=True +) + +# 5. Compute the 2D curvilinear latitude and longitude grids +lon_2d, lat_2d = transformer.transform(X, Y) + +# 6. Restructure the DataArray, dropping old 1D spatial coordinates +# We assume band 0 is your primary data array +data_var = da.isel(band=0).drop_vars(["x", "y", "spatial_ref"]) + +# 7. Build the NetCDF dataset with 2D curvilinear coordinates +ds = xr.Dataset( + data_vars={"variable_name": (["y", "x"], data_var.values)}, +# data_vars={"Band1": (["y", "x"], data_var.values)}, + coords={ + "lon": (["y", "x"], lon_2d), + "lat": (["y", "x"], lat_2d), + }, +) + +# Add standard CF-compliant metadata for curvilinear grids +ds["variable_name"].attrs["coordinates"] = "lon lat" +ds["lon"].attrs["units"] = "degrees_east" +ds["lat"].attrs["units"] = "degrees_north" + +# 8. Export to NetCDF with compression enabled +ds.to_netcdf(flout, encoding={"variable_name": {"zlib": True}}) + +print("Conversion complete: "+flout+" saved.") diff --git a/scripts/RWPSPreProcess/nbm/GetNBMIce.sh b/scripts/RWPSPreProcess/nbm/GetNBMIce.sh new file mode 100755 index 0000000..6195ba6 --- /dev/null +++ b/scripts/RWPSPreProcess/nbm/GetNBMIce.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# This is just a place holder with notes for the time being. Notes on aws retrieval and processing are below +# This script takes rrfs grib2 forecast files, extracts 10m u and v wind +# components and outputs to netcdf. Comand line arguments are +# with aws- make a +#aws s3 ls --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/ | g ice +#aws s3 cp --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/iceconcentration/blendv5.0_alaska_iceconcentration_2026-05-07T00:00_2026-05-08T12:00.tif ./ +#aws s3 cp --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/icethickness/blendv5.0_alaska_icethickness_2026-05-07T00:00_2026-05-08T12:00.tif ./ +#pip install rioxarray xarray pyproj numpy NetCDF4 +#python ConvertNBMIcetif2NetCDF.py iceconcentration/blendv5.0_alaska_iceconcentration_2026-05-07T00:00_2026-05-08T12:00.tif + +#for all files +#aws s3 cp --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/icethickness/ . --recursive --exclude "*" --include "*alaska_icethickness_*" +# +module load intel-oneapi/2022.2.0.262 +module load wgrib2/2.0.8 + + + +INPUT_DIR="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.$1/$2/grib2" +# /lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.20260729/00/grib2/blend.t00z.icec.ak.grib2 +ICE_FILE="$INPUT_DIR/blend.t$2z.icec.ak.grib2" + +OUTPUT_DIR="ice.$1.$2" +OUTPUT_FILE="$OUTPUT_DIR/nbm.$1.$2.ice.ak.nc" + +mkdir "$OUTPUT_DIR" +# Remove existing output file to avoid mixing old data +rm -f "$OUTPUT_FILE" + +echo "writing ice from $INPUT_DIR to $OUTPUT_FILE" + +wgrib2 "$ICE_FILE" -match ":ICEC:" -netcdf "$OUTPUT_FILE" + +echo "nbm ice processing complete for forecast date $1, cycle $2, domain ak" +echo "output written to: $OUTPUT_FILE" diff --git a/scripts/RWPSPreProcess/nbm/MakeNBMWind.sh b/scripts/RWPSPreProcess/nbm/MakeNBMWind.sh new file mode 100755 index 0000000..9dfed6e --- /dev/null +++ b/scripts/RWPSPreProcess/nbm/MakeNBMWind.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# This script takes rrfs grib2 forecast files, extracts 10m u and v wind +# components and outputs to netcdf. Comand line arguments are + +module load intel-oneapi/2022.2.0.262 +module load wgrib2/2.0.8 + +#INPUT_DIR="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.1/blend.$1/$2/grib2" +INPUT_DIR="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.$1/$2/grib2" +WSPD_FILE="$INPUT_DIR/blend.t$2z.wspd.$3.grib2" +WDIR_FILE="$INPUT_DIR/blend.t$2z.wdir.$3.grib2" + +OUTPUT_DIR="wind.$1.$2" +OUTPUT_FILE="$OUTPUT_DIR/nbm.$1.$2.wind10m.$3.nc" + +mkdir "$OUTPUT_DIR" +# Remove existing output file to avoid mixing old data +rm -f "$OUTPUT_FILE" + +echo "writing 10m wind from $INPUT_DIR to $OUTPUT_FILE" + +wgrib2 "$WSPD_FILE" -match ":WIND:10 m" -netcdf "$OUTPUT_FILE" +wgrib2 "$WDIR_FILE" -match ":WDIR:10 m" -append -netcdf "$OUTPUT_FILE" + +echo "nbm processing complete for forecast date $1, cycle $2, domain $3" +echo "output written to: $OUTPUT_FILE" diff --git a/scripts/RWPSPreProcess/nbm/MakeNBMWindUV.sh b/scripts/RWPSPreProcess/nbm/MakeNBMWindUV.sh new file mode 100644 index 0000000..97eeda5 --- /dev/null +++ b/scripts/RWPSPreProcess/nbm/MakeNBMWindUV.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +# This script takes rrfs grib2 forecast files, extracts 10m u and v wind +# components and outputs to netcdf. Comand line arguments are +# forecast time: YYYYMMDD +# forecast cycle: CC +# frecast region: hi,pr,na,ak or conus +# +# For example call as: +# sh MakeRRFSWind.sh 20260428 00 pr +# to produce output file: +# rrfs.20260428.00.wind10m.pr.nc +# +# ensemble(of n=5) output is available: +#/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.20260428/00/m001 +#/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.20260428/00/m002 +#/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.20260428/00/m003 +#/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.20260428/00/m004 +#/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.20260428/00/m005 +# wgrib2 input.grib2 -wind_uv output.grib2 + +INPUT_DIR="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.0/blend.$1/$2/grib2" +WSPD_FILE="$INPUT_DIR/blend.t00z.wspd.$3.grib2" +WDIR_FILE="$INPUT_DIR/blend.t00z.wdir.$3.grib2" + +module load intel-oneapi/2022.2.0.262 +module load wgrib2/2.0.8 + +OUTPUT_FILE="nbm.$1.$2.wind10m.$3.nc" + +# Remove existing output file to avoid mixing old data +rm -f "$OUTPUT_FILE" + +echo "writing 10m wind from $INPUT_DIR to $OUTPUT_FILE" + +# wgrib2 "$WSPD_FILE" -match ":WIND:10 m" -netcdf "$OUTPUT_FILE" +# wgrib2 "$WDIR_FILE" -match ":WDIR:10 m" -append -netcdf "$OUTPUT_FILE" + +wgrib2 "$WSPD_FILE" -match ":WIND:10 m" tmp.grib2 +wgrib2 "$WDIR_FILE" -match ":WDIR:10 m" -append tmp.grib2 + +wgrib2 tmp.grib2 -wind_uv -netcdf "$OUTPUT_FILE" + +# Note: Ensure files are in the correct chronological order (e.g., sorted by name) +#for file in $(ls "$INPUT_DIR"/rrfs.t00z.2dfld.*km.f*.$3.grib2 | sort); do +# echo "Processing: $file" + # Convert and append to the NetCDF file + # -netcdf: specifies the output format and filename + # -append: adds data to the existing netcdf file instead of overwriting +# wgrib2 "$file" -match ":UGRD:10 m" -append -netcdf "$OUTPUT_FILE" +# wgrib2 "$file" -match ":VGRD:10 m" -append -netcdf "$OUTPUT_FILE" +#done + +echo "nbm processing complete for forecast date $1, cycle $2, domain $3" +echo "output written to: $OUTPUT_FILE" diff --git a/scripts/RWPSPreProcess/rrfs/MakeEnsRRFSWind.sh b/scripts/RWPSPreProcess/rrfs/MakeEnsRRFSWind.sh new file mode 100644 index 0000000..bac5ef3 --- /dev/null +++ b/scripts/RWPSPreProcess/rrfs/MakeEnsRRFSWind.sh @@ -0,0 +1,77 @@ +#!/bin/bash + +# This script takes ensemble rrfs grib2 forecast files, extracts 10m u and v wind +# components and outputs to netcdf. Comand line arguments are +# forecast time: YYYYMMDD +# forecast cycle: CC +# frecast region: hi,pr,na,ak or conus +# +# For example call as: +# sh MakeEnsRRFSWind.sh 20260428 00 pr +# to produce output file: +# rrfs.20260428.00.wind10m.pr.nc +# + +module load intel-oneapi/2022.2.0.262 +module load wgrib2/2.0.8 + +#INPUT_DIR="/lfs/h1/ops/para/com/rrfs/v1.0/rrfs.$1/$2" +OUTPUT_FILE="rrfs.ensemble.$1.$2.wind10m.$3.nc" +INPUT_DIR1="/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.$1/$2/m001/" + +for i in {1..5}; do + echo "Number: $i" + rm varname$i.txt + echo "# variable renaming for ensemble member $i">varname$i.txt + echo "UGRD:10 m above ground:UGRDn$i" >>varname$i.txt + echo "VGRD:10 m above ground:VGRDn$i" >>varname$i.txt +done + + +# Remove existing output file to avoid mixing old data +rm -f "$OUTPUT_FILE" + +echo "writing ensemble 10m wind from $INPUT_DIR1 to $OUTPUT_FILE" + +# Note: Ensure files are in the correct chronological order (e.g., sorted by name) +for file1 in $(ls "$INPUT_DIR1"/rrfs.t$2z.m001.2dfld.*km.f*.$3.grib2 | sort); do + file2="${file1//m001/m002}" + file3="${file1//m001/m003}" + file4="${file1//m001/m004}" + file5="${file1//m001/m005}" + fileN="${file1//m001/m00N}" + + echo "Processing: ensemble $fileN" + wgrib2 $file1 -match ":UGRD:10 m" -nc_table varname1.txt -append -netcdf "$OUTPUT_FILE" + wgrib2 $file1 -match ":VGRD:10 m" -nc_table varname1.txt -append -netcdf "$OUTPUT_FILE" + + wgrib2 $file2 -match ":UGRD:10 m" -nc_table varname2.txt -append -netcdf "$OUTPUT_FILE" + wgrib2 $file2 -match ":VGRD:10 m" -nc_table varname2.txt -append -netcdf "$OUTPUT_FILE" + + wgrib2 $file3 -match ":UGRD:10 m" -nc_table varname3.txt -append -netcdf "$OUTPUT_FILE" + wgrib2 $file3 -match ":VGRD:10 m" -nc_table varname3.txt -append -netcdf "$OUTPUT_FILE" + + wgrib2 $file4 -match ":UGRD:10 m" -nc_table varname4.txt -append -netcdf "$OUTPUT_FILE" + wgrib2 $file4 -match ":VGRD:10 m" -nc_table varname4.txt -append -netcdf "$OUTPUT_FILE" + + wgrib2 $file5 -match ":UGRD:10 m" -nc_table varname5.txt -append -netcdf "$OUTPUT_FILE" + wgrib2 $file5 -match ":VGRD:10 m" -nc_table varname5.txt -append -netcdf "$OUTPUT_FILE" + +# wgrib2 $file2 -nc_table varname2.txt -append -netcdf "$OUTPUT_FILE" +# wgrib2 $file3 -nc_table varname3.txt -append -netcdf "$OUTPUT_FILE" +# wgrib2 $file4 -nc_table varname4.txt -append -netcdf "$OUTPUT_FILE" +# wgrib2 $file5 -nc_table varname5.txt -append -netcdf "$OUTPUT_FILE" + + +# cat $file1 $file2 $file3 $file4 $file5 | wgrib2 - -match ":(UGRD|VGRD):10 m" -append -netcdf "$OUTPUT_FILE" +# equivalent alternates +# cat $file1 $file2 $file3 $file4 $file5 > ensemble.grib2 +# wgrib2 ensemble.grib2 -match ":UGRD:10 m" -append -netcdf "$OUTPUT_FILE" +# wgrib2 ensemble.grib2 -match ":VGRD:10 m" -append -netcdf "$OUTPUT_FILE" +# or +# cat $file1 $file2 $file3 $file4 $file5 | wgrib2 - -match ":UGRD:10 m" -append -netcdf "$OUTPUT_FILE" +# cat $file1 $file2 $file3 $file4 $file5 | wgrib2 - -match ":VGRD:10 m" -append -netcdf "$OUTPUT_FILE" +done + +echo "rrfs ensemble processing complete for forecast date $1, cycle $2, domain $3" +echo "output written to: $OUTPUT_FILE" diff --git a/scripts/RWPSPreProcess/rrfs/MakeRRFSWind.sh b/scripts/RWPSPreProcess/rrfs/MakeRRFSWind.sh new file mode 100755 index 0000000..8a12f56 --- /dev/null +++ b/scripts/RWPSPreProcess/rrfs/MakeRRFSWind.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +# This script takes rrfs grib2 forecast files, extracts 10m u and v wind +# components and outputs to netcdf. Comand line arguments are +# forecast time: YYYYMMDD +# forecast cycle: CC +# frecast region: hi,pr,na,ak or conus +# +# For example call as: +# sh MakeRRFSWind.sh 20260428 00 pr +# to produce output file: +# rrfs.20260428.00.wind10m.pr.nc +# +echo "MakeRRFSWind.sh fetching rrfs : time = $1, cycle = $2, domain = $3" + +module load intel-oneapi/2022.2.0.262 +module load wgrib2/2.0.8 + +INPUT_DIR="/lfs/h1/ops/para/com/rrfs/v1.0/rrfs.$1/$2" +OUTPUT_DIR="wind.$1.$2" +OUTPUT_FILE="$OUTPUT_DIR/rrfs.$1.$2.wind10m.$3.nc" + +mkdir "$OUTPUT_DIR" +# Remove existing output file to avoid mixing old data +rm -f "$OUTPUT_FILE" + +echo "writing 10m wind from $INPUT_DIR to $OUTPUT_FILE" + +# Note: Ensure files are in the correct chronological order (e.g., sorted by name) +for file in $(ls "$INPUT_DIR"/rrfs.t$2z.2dfld.*km.f*.$3.grib2 | sort); do + echo "Processing: $file" + # Convert and append to the NetCDF file + # -netcdf: specifies the output format and filename + # -append: adds data to the existing netcdf file instead of overwriting + wgrib2 "$file" -match ":UGRD:10 m" -append -netcdf "$OUTPUT_FILE" + wgrib2 "$file" -match ":VGRD:10 m" -append -netcdf "$OUTPUT_FILE" +done + +echo "rrfs processing complete for forecast date $1, cycle $2, domain $3" +echo "output written to: $OUTPUT_FILE" diff --git a/scripts/RWPSPreProcess/rtofs/GetRTOFS.sh b/scripts/RWPSPreProcess/rtofs/GetRTOFS.sh new file mode 100755 index 0000000..9f31806 --- /dev/null +++ b/scripts/RWPSPreProcess/rtofs/GetRTOFS.sh @@ -0,0 +1,34 @@ +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=00:05:00 +#PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + +pip list -v + +date=$1 + +tmpdir="tmp.rtofs.$date" +filesin="/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs.$date/*prog.nc" +flout="rtofs.$date.nc" + +mkdir $tmpdir +cp $filesin $tmpdir/ +python rtofs/GetRTOFSfcst.py $tmpdir $flout + +#rm -rf $tmpdir diff --git a/scripts/RWPSPreProcess/rtofs/GetRTOFSIce.sh b/scripts/RWPSPreProcess/rtofs/GetRTOFSIce.sh new file mode 100755 index 0000000..8e915ce --- /dev/null +++ b/scripts/RWPSPreProcess/rtofs/GetRTOFSIce.sh @@ -0,0 +1,42 @@ +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=00:05:00 +#PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + + + +#"rtofs_glo_3dz_n006_6hrly_hvr_alaska.nc" + +#/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs.20260727/rtofs_glo_2ds_f186_ice.nc + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + +pip list -v + +date=$1 +cycl=$2 + +tmpdir="tmp.rtofsIce.$date" +filesin="/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs.$date/*ice.nc" +dirout=ice.$date.$cycl +flout="$dirout/rtofs.ice.$date.nc" + +mkdir $tmpdir +cp $filesin $tmpdir/ +python rtofs/GetRTOFSIcefcst.py $tmpdir $flout + +## rm -rf $tmpdir diff --git a/scripts/RWPSPreProcess/rtofs/GetRTOFSIcefcst.py b/scripts/RWPSPreProcess/rtofs/GetRTOFSIcefcst.py new file mode 100644 index 0000000..9b7eb8d --- /dev/null +++ b/scripts/RWPSPreProcess/rtofs/GetRTOFSIcefcst.py @@ -0,0 +1,107 @@ +# aws s3 cp --no-sign-request s3://noaa-nws-rtofs-pds/rtofs.20260115/ ./rtofs_jan2026_ice/ --recursive --exclude "*" --include "*ice*" +#Consolidate ice_coverage from RTOFS forecast files +import numpy as np +import os +import netCDF4 as nc +import sys + +# Get the path relative to this file and add to sys.path +#sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'utils'))) +#import helper +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) +import InterpUtilities as iutil + +dirin=sys.argv[1] +flout=sys.argv[2] + +ncfiles = os.listdir(dirin) +print(ncfiles) +nt=len(ncfiles) +k=0 +flin=dirin+"/"+ncfiles[k] +data=nc.Dataset(flin,"r") +X=data["Longitude"][:,:] +Y=data["Latitude"][:,:] +fill_value0=data["ice_coverage"]._FillValue +nx=X.shape[0] +ny=X.shape[1] +F=np.zeros((nt,nx,ny),dtype=np.float32) +MT=np.zeros(nt) +time=np.zeros(nt) +print("nx = "+str(nx)) +print("ny = "+str(ny)) +print(F.shape) +for k in range(nt): + flin=dirin+"/"+ncfiles[k] + + flinT=flin.replace("Ice","") + flinT=flinT.replace("ice","prog") + + print("ICE: org flin="+flin+" Time flin="+flinT) + + dataT=nc.Dataset(flinT,"r") + + data=nc.Dataset(flin,"r") + F0=data["ice_coverage"][:] +# T0=data["MT"][:] + T0=dataT["MT"][:] + + print(F0.shape) + print(F.shape) + print(str(k)+" of "+ str(nt)) + F[k,:,:]=F0[0,:,:] + MT[k]=T0 +# tmp=iutil.ConvertTimeToUnixTime(flin,"MT") + + tmp=iutil.ConvertTimeToUnixTime(flinT,"MT") + + time[k]=tmp[0] + +#-rw-r--r-- 1 keston.smith couple 64M Jul 29 17:59 tmp.rtofsIce.20260728/rtofs_glo_2ds_f007_ice.nc +#-rw-r--r-- 1 keston.smith couple 64M Jul 29 17:59 tmp.rtofsIce.20260728/rtofs_glo_2ds_n007_ice.nc +#keston.smith@dlogin06:/lfs/h2/emc/couple/noscrub/keston.smith/RWPSInterpolationUtilities> l tmp.rtofs.20260728/*007*nc +#-rw-r--r-- 1 keston.smith couple 149M Jul 29 17:49 tmp.rtofs.20260728/rtofs_glo_2ds_f007_prog.nc +#-rw-r--r-- 1 keston.smith couple 149M Jul 29 17:50 tmp.rtofs.20260728/rtofs_glo_2ds_n007_prog.nc + + + + +tindx = np.argsort(time) +time=time[tindx] +MT=MT[tindx] +F=F[tindx,:,:] + +with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: + + ncout.createDimension('X' , nx) + ncout.createDimension('Y' , ny) + ncout.createDimension('time', nt) + + lon_var=ncout.createVariable('longitude', 'f4', ('X','Y')) + var=data["Longitude"] + iutil.CopyAttributes(var, lon_var) + lon_var[:,:]=X[:,:] + + lat_var=ncout.createVariable('latitude', 'f4', ('X','Y')) + var=data["Latitude"] + iutil.CopyAttributes(var, lat_var) + lat_var[:,:]=Y[:,:] + + # Keep redundent time variables (time and MT) for conviniences + time_var=ncout.createVariable('time', 'f8', ('time',)) + time_var.units = 'seconds since 1970-01-01 00:00:00.0 0:00' + time_var.long_name = 'verification time generated by wgrib2 function verftime()' + time_var.standard_name = 'time' + time_var.axis = 'T' + time_var[:] = time[:] + + MT_var=ncout.createVariable("MT", 'f8', ('time',)) + var=data["MT"] + iutil.CopyAttributes(var, MT_var) + MT_var[:] = MT[:] + +# f_var = ncout.createVariable('ice_coverage', 'f4', ('time','X','Y'),fill_value = fill_value0) + f_var = ncout.createVariable('ICEC_surface', 'f4', ('time','X','Y'),fill_value = fill_value0) + var=data["ice_coverage"] + iutil.CopyAttributes(var, f_var) + f_var[:,:,:] = F[:,:,:] diff --git a/scripts/RWPSPreProcess/rtofs/GetRTOFSfcst.py b/scripts/RWPSPreProcess/rtofs/GetRTOFSfcst.py new file mode 100644 index 0000000..290f7e2 --- /dev/null +++ b/scripts/RWPSPreProcess/rtofs/GetRTOFSfcst.py @@ -0,0 +1,96 @@ +# Consolidate u,v surface currents from +import numpy as np +import os +import netCDF4 as nc +import sys + +# Get the path relative to this file and add to sys.path +#sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'utils'))) +#import helper +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) +import InterpUtilities as iutil + +dirin=sys.argv[1] +flout=sys.argv[2] + +ncfiles = os.listdir(dirin) +print(ncfiles) +nt=len(ncfiles) +k=0 +flin=dirin+"/"+ncfiles[k] +data=nc.Dataset(flin,"r") +X=data["Longitude"][:,:] +Y=data["Latitude"][:,:] +fill_value0=data["u_velocity"]._FillValue +nx=X.shape[0] +ny=X.shape[1] +U=np.zeros((nt,1,nx,ny)) +V=np.zeros((nt,1,nx,ny)) +MT=np.zeros(nt) +time=np.zeros(nt) +print(U.shape) +for k in range(nt): + flin=dirin+"/"+ncfiles[k] + data=nc.Dataset(flin,"r") + U0=data["u_velocity"][:] + V0=data["v_velocity"][:] + T0=data["MT"][:] + print(k) + U[k,0,:,:]=U0[0,0,:,:] + V[k,0,:,:]=V0[0,0,:,:] + MT[k]=T0 + tmp=iutil.ConvertTimeToUnixTime(flin,"MT") + time[k]=tmp[0] + +tindx = np.argsort(time) +time=time[tindx] +MT=MT[tindx] +U=U[tindx,:,:,:] +V=V[tindx,:,:,:] + +Layers=data["Layer"][:] + +with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: + + ncout.createDimension('Layer' , 1) + ncout.createDimension('X' , nx) + ncout.createDimension('Y' , ny) + ncout.createDimension('time', nt) + + lon_var=ncout.createVariable('longitude', 'f4', ('X','Y')) + var=data["Longitude"] + iutil.CopyAttributes(var, lon_var) + lon_var[:,:]=X[:,:] + + lat_var=ncout.createVariable('latitude', 'f4', ('X','Y')) + var=data["Latitude"] + iutil.CopyAttributes(var, lat_var) + lat_var[:,:]=Y[:,:] + + # Keep redundent time variables (time and MT) for conviniences + time_var=ncout.createVariable('time', 'f8', ('time',)) + time_var.units = 'seconds since 1970-01-01 00:00:00.0 0:00' + time_var.long_name = 'verification time generated by wgrib2 function verftime()' + time_var.standard_name = 'time' + time_var.axis = 'T' + time_var[:] = time[:] + + MT_var=ncout.createVariable("MT", 'f8', ('time',)) + var=data["MT"] + iutil.CopyAttributes(var, MT_var) + MT_var[:] = MT[:] + + u_var = ncout.createVariable('u-vel', 'f4', ('time','Layer','X','Y'),fill_value = fill_value0) + var=data["u_velocity"] + iutil.CopyAttributes(var, u_var) + u_var[:,:,:,:] = U + + v_var = ncout.createVariable('v-vel', 'f4', ('time','Layer','X','Y'),fill_value = fill_value0) + var=data["v_velocity"] + iutil.CopyAttributes(var, v_var) + v_var[:,:,:,:] = V + + l_var = ncout.createVariable('Layer', 'i4', ('Layer',)) + var=data["Layer"] + iutil.CopyAttributes(var, l_var) + l_var[:] = Layers[0] diff --git a/scripts/RWPSPreProcess/stofs/GetSTOFS.sh b/scripts/RWPSPreProcess/stofs/GetSTOFS.sh new file mode 100755 index 0000000..04ff98b --- /dev/null +++ b/scripts/RWPSPreProcess/stofs/GetSTOFS.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +##script for retrieving stofs current and/or water level + +date=$1 +cycl=$2 + +if [ "$#" -lt 3 ]; then + echo "No arguments field argument." + echo "Retrieving both stofs currents and stofs water level." + fields="currents,waterlevel" +else + fields=$3 +fi + +mkdir stofs.$date.$cycl + +if [[ "$fields" == *"current"* ]]; then + echo retrieving stofs current for $date cycle $cycl + cp /lfs/h1/ops/prod/com/stofs/v2.1/stofs_2d_glo.$date/stofs_2d_glo.t"$cycl"z.fields.cwl.vel.nc stofs.$date.$cycl/ +fi + +if [[ "$fields" == *"level"* ]]; then + echo retrieving stofs water level for $date cycle $cycl + cp /lfs/h1/ops/prod/com/stofs/v2.1/stofs_2d_glo.$date/stofs_2d_glo.t"$cycl"z.fields.cwl.nc stofs.$date.$cycl/ +fi + From 1fbf8e8e329c548c829615a802f70cf9d473ba43 Mon Sep 17 00:00:00 2001 From: keston Date: Thu, 30 Jul 2026 10:06:33 -0400 Subject: [PATCH 02/39] updated switch filename in sorc/build_ww3.sh to reflect name change in WW3. --- sorc/build_ww3.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/build_ww3.sh b/sorc/build_ww3.sh index f9681ce..f6fb571 100755 --- a/sorc/build_ww3.sh +++ b/sorc/build_ww3.sh @@ -46,7 +46,7 @@ module load build_ww3.${MACHINE_ID} module list set -x -ww3switch=model/bin/switch_NCEP_rwps +ww3switch=model/bin/switch_NWS_rwps # Check final exec folder exists finalexecdir=${HOMErwps}/exec From d6b7eaf11b29c79fff65cec9beb028cc8a2dcc00 Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa Date: Fri, 31 Jul 2026 17:13:35 +0000 Subject: [PATCH 03/39] Added scripts for launching interpolation weights calulation. Added weight and distance files to cl inputs of ComputeGriddedToRWPSInterpWeights.py --- .../PreProcess}/AddErrVarToFile.py | 0 .../PreProcess}/AddMeshGeomToFile.py | 0 .../PreProcess}/BayesForecastUpdate.py | 0 .../ComputeGriddedToRWPSInterpWeights.py | 13 ++-- .../ComputeUnstrToRWPSInterpWeights.py | 0 .../ComputeUnstrToRWPSInterpWeights.sh | 0 .../ComputeWindToRWPSInterpWeights.py | 0 .../PreProcess}/ConvertWeights2Netcdf.py | 0 .../GenerateInterpolationWeights.jobcard | 73 +++++++++++++++++++ .../PreProcess}/GetAllFocing.jobcard | 0 ...GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh | 0 .../PreProcess}/GetAllFocing.jobcard.sh | 0 .../PreProcess}/GetAllFocing.sh | 0 .../PreProcess}/GetCurrents.sh | 0 .../PreProcess}/GetIce.sh | 0 .../PreProcess}/GetWaterLevel.sh | 0 .../PreProcess}/GetWinds.sh | 0 .../PreProcess}/InterpTime.py | 0 .../PreProcess}/InterpUtilities.py | 0 .../PreProcess}/InterpolateWithWeights.py | 0 .../InterpolateWithWeightsAndErrorVariance.py | 0 .../PreProcess}/ProcessCurrents.sh | 0 .../PreProcess}/ProcessIce.sh | 0 .../PreProcess}/ProcessWaterLevel.sh | 0 .../PreProcess}/ProcessWinds.sh | 0 .../PreProcess}/README.md | 0 dev/PreProcess/SetMeshName | 1 + .../PreProcess}/SpdDir2UVnbm.py | 0 .../nbm/ConvertNBMIcetif2NetCDF.py | 0 .../PreProcess}/nbm/GetNBMIce.sh | 0 .../PreProcess}/nbm/MakeNBMWind.sh | 0 .../PreProcess}/nbm/MakeNBMWindUV.sh | 0 .../PreProcess}/rrfs/MakeEnsRRFSWind.sh | 0 .../PreProcess}/rrfs/MakeRRFSWind.sh | 0 .../PreProcess}/rtofs/GetRTOFS.sh | 0 .../PreProcess}/rtofs/GetRTOFSIce.sh | 0 .../PreProcess}/rtofs/GetRTOFSIcefcst.py | 0 .../PreProcess}/rtofs/GetRTOFSfcst.py | 0 .../PreProcess}/stofs/GetSTOFS.sh | 0 39 files changed, 80 insertions(+), 7 deletions(-) rename {scripts/RWPSPreProcess => dev/PreProcess}/AddErrVarToFile.py (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/AddMeshGeomToFile.py (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/BayesForecastUpdate.py (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/ComputeGriddedToRWPSInterpWeights.py (96%) rename {scripts/RWPSPreProcess => dev/PreProcess}/ComputeUnstrToRWPSInterpWeights.py (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/ComputeUnstrToRWPSInterpWeights.sh (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/ComputeWindToRWPSInterpWeights.py (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/ConvertWeights2Netcdf.py (100%) create mode 100644 dev/PreProcess/GenerateInterpolationWeights.jobcard rename {scripts/RWPSPreProcess => dev/PreProcess}/GetAllFocing.jobcard (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/GetAllFocing.jobcard.sh (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/GetAllFocing.sh (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/GetCurrents.sh (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/GetIce.sh (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/GetWaterLevel.sh (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/GetWinds.sh (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/InterpTime.py (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/InterpUtilities.py (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/InterpolateWithWeights.py (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/InterpolateWithWeightsAndErrorVariance.py (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/ProcessCurrents.sh (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/ProcessIce.sh (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/ProcessWaterLevel.sh (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/ProcessWinds.sh (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/README.md (100%) create mode 100644 dev/PreProcess/SetMeshName rename {scripts/RWPSPreProcess => dev/PreProcess}/SpdDir2UVnbm.py (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/nbm/ConvertNBMIcetif2NetCDF.py (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/nbm/GetNBMIce.sh (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/nbm/MakeNBMWind.sh (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/nbm/MakeNBMWindUV.sh (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/rrfs/MakeEnsRRFSWind.sh (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/rrfs/MakeRRFSWind.sh (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/rtofs/GetRTOFS.sh (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/rtofs/GetRTOFSIce.sh (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/rtofs/GetRTOFSIcefcst.py (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/rtofs/GetRTOFSfcst.py (100%) rename {scripts/RWPSPreProcess => dev/PreProcess}/stofs/GetSTOFS.sh (100%) diff --git a/scripts/RWPSPreProcess/AddErrVarToFile.py b/dev/PreProcess/AddErrVarToFile.py similarity index 100% rename from scripts/RWPSPreProcess/AddErrVarToFile.py rename to dev/PreProcess/AddErrVarToFile.py diff --git a/scripts/RWPSPreProcess/AddMeshGeomToFile.py b/dev/PreProcess/AddMeshGeomToFile.py similarity index 100% rename from scripts/RWPSPreProcess/AddMeshGeomToFile.py rename to dev/PreProcess/AddMeshGeomToFile.py diff --git a/scripts/RWPSPreProcess/BayesForecastUpdate.py b/dev/PreProcess/BayesForecastUpdate.py similarity index 100% rename from scripts/RWPSPreProcess/BayesForecastUpdate.py rename to dev/PreProcess/BayesForecastUpdate.py diff --git a/scripts/RWPSPreProcess/ComputeGriddedToRWPSInterpWeights.py b/dev/PreProcess/ComputeGriddedToRWPSInterpWeights.py similarity index 96% rename from scripts/RWPSPreProcess/ComputeGriddedToRWPSInterpWeights.py rename to dev/PreProcess/ComputeGriddedToRWPSInterpWeights.py index 3b65aa2..93f2a81 100644 --- a/scripts/RWPSPreProcess/ComputeGriddedToRWPSInterpWeights.py +++ b/dev/PreProcess/ComputeGriddedToRWPSInterpWeights.py @@ -34,12 +34,13 @@ flin=sys.argv[1] mshfl=sys.argv[2] - +weights_file=sys.argv[3] +dist2bnd_file=sys.argv[4] # Don't use nearest neighbor interpolation unless 6th positive integer argument present. # This may be needed on boundary of RWPS mesh if node alignment is outside NBM OC domain Extrapolate=False -if nargin > 2: - if int(sys.argv[3])>0: +if nargin > 4: + if int(sys.argv[5])>0: print("using nearest neighbor to extrapolate wind field beyond geometric coverage") Extrapolate=True @@ -98,7 +99,7 @@ meshslash=mshfl.rfind('/')+1 dom=flin.split(".") dom=dom[len(dom)-2] -weights_file = "InterpolationWeights."+mshfl[meshslash:len(mshfl)-3]+dom+".nc" + print("interpolation weights will be written to file = "+ weights_file) nx=x1.shape[0] @@ -191,12 +192,10 @@ ncadd.setncattr("InputFile", flin) ncadd.setncattr("MeshFile", mshfl) + ################################################################################## # START: Compute distance to boundary for each node in mesh: ################################################################################## -#dist2bnd_file = "DistToBndy."+mshfl[meshslash:len(mshfl)-3]+dom+".txt" -dist2bnd_file = "DistToBndy."+mshfl[meshslash:len(mshfl)-3]+dom+".nc" - if Extrapolate: dist2bnd=np.full(len(xi), np.inf) #all points are inside boundary- No boundary with this type of extrapolation else: diff --git a/scripts/RWPSPreProcess/ComputeUnstrToRWPSInterpWeights.py b/dev/PreProcess/ComputeUnstrToRWPSInterpWeights.py similarity index 100% rename from scripts/RWPSPreProcess/ComputeUnstrToRWPSInterpWeights.py rename to dev/PreProcess/ComputeUnstrToRWPSInterpWeights.py diff --git a/scripts/RWPSPreProcess/ComputeUnstrToRWPSInterpWeights.sh b/dev/PreProcess/ComputeUnstrToRWPSInterpWeights.sh similarity index 100% rename from scripts/RWPSPreProcess/ComputeUnstrToRWPSInterpWeights.sh rename to dev/PreProcess/ComputeUnstrToRWPSInterpWeights.sh diff --git a/scripts/RWPSPreProcess/ComputeWindToRWPSInterpWeights.py b/dev/PreProcess/ComputeWindToRWPSInterpWeights.py similarity index 100% rename from scripts/RWPSPreProcess/ComputeWindToRWPSInterpWeights.py rename to dev/PreProcess/ComputeWindToRWPSInterpWeights.py diff --git a/scripts/RWPSPreProcess/ConvertWeights2Netcdf.py b/dev/PreProcess/ConvertWeights2Netcdf.py similarity index 100% rename from scripts/RWPSPreProcess/ConvertWeights2Netcdf.py rename to dev/PreProcess/ConvertWeights2Netcdf.py diff --git a/dev/PreProcess/GenerateInterpolationWeights.jobcard b/dev/PreProcess/GenerateInterpolationWeights.jobcard new file mode 100644 index 0000000..3c18510 --- /dev/null +++ b/dev/PreProcess/GenerateInterpolationWeights.jobcard @@ -0,0 +1,73 @@ +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=04:00:00 +#PBS -l select=1:ncpus=8:mem=128GB +###PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + +pip list -v + +cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/dev/PreProcess + +source SetMeshName + +SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" +date="20260730" +cycl="00" + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +rrfs_hi=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.hi.nc +rrfs_pr=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.pr.nc +rrfs_ak=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.ak.nc +rrfs_na=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.na.nc +rrfs_conus=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.conus.nc + +out="../../fix" + +rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" +rrfsDst="$out/DistToBndy.$meshname.rrfs" +#no extrapolation with rrfs forecasts +python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out +python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_hi $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 > GenWhts.rrfs.pr.out +python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_hi $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 > GenWhts.rrfs.ak.out +python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_hi $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 > GenWhts.rrfs.na.out +python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_hi $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out + +nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc +nbmIntrp="$out/InterpolationWeights.$meshname.nbm" +nbmDst="$out/DistToBndy.$meshname.nbm" +#extrapolate nbm oc wind to all points +python ./ComputeGriddedToRWPSInterpWeights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out + +nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc +#do not extrapolate for NBM .ak. domain +python ./ComputeGriddedToRWPSInterpWeights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out + + +rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc +rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" +rtofsDst="$out/DistToBndy.$meshname.rtofs" + +#extrapolate rtofs .glo. for full ice coverage +python ./ComputeGriddedToRWPSInterpWeights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out + +rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc +#do not extrapolate rtofs .glo. currents +python ./ComputeGriddedToRWPSInterpWeights.py $rtofs_cur $mesh $rtofsIntrp.corrents.nc $rtofsDst.currents.nc -1 > GenWhts.rtofs.currents.out diff --git a/scripts/RWPSPreProcess/GetAllFocing.jobcard b/dev/PreProcess/GetAllFocing.jobcard similarity index 100% rename from scripts/RWPSPreProcess/GetAllFocing.jobcard rename to dev/PreProcess/GetAllFocing.jobcard diff --git a/scripts/RWPSPreProcess/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh b/dev/PreProcess/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh similarity index 100% rename from scripts/RWPSPreProcess/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh rename to dev/PreProcess/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh diff --git a/scripts/RWPSPreProcess/GetAllFocing.jobcard.sh b/dev/PreProcess/GetAllFocing.jobcard.sh similarity index 100% rename from scripts/RWPSPreProcess/GetAllFocing.jobcard.sh rename to dev/PreProcess/GetAllFocing.jobcard.sh diff --git a/scripts/RWPSPreProcess/GetAllFocing.sh b/dev/PreProcess/GetAllFocing.sh similarity index 100% rename from scripts/RWPSPreProcess/GetAllFocing.sh rename to dev/PreProcess/GetAllFocing.sh diff --git a/scripts/RWPSPreProcess/GetCurrents.sh b/dev/PreProcess/GetCurrents.sh similarity index 100% rename from scripts/RWPSPreProcess/GetCurrents.sh rename to dev/PreProcess/GetCurrents.sh diff --git a/scripts/RWPSPreProcess/GetIce.sh b/dev/PreProcess/GetIce.sh similarity index 100% rename from scripts/RWPSPreProcess/GetIce.sh rename to dev/PreProcess/GetIce.sh diff --git a/scripts/RWPSPreProcess/GetWaterLevel.sh b/dev/PreProcess/GetWaterLevel.sh similarity index 100% rename from scripts/RWPSPreProcess/GetWaterLevel.sh rename to dev/PreProcess/GetWaterLevel.sh diff --git a/scripts/RWPSPreProcess/GetWinds.sh b/dev/PreProcess/GetWinds.sh similarity index 100% rename from scripts/RWPSPreProcess/GetWinds.sh rename to dev/PreProcess/GetWinds.sh diff --git a/scripts/RWPSPreProcess/InterpTime.py b/dev/PreProcess/InterpTime.py similarity index 100% rename from scripts/RWPSPreProcess/InterpTime.py rename to dev/PreProcess/InterpTime.py diff --git a/scripts/RWPSPreProcess/InterpUtilities.py b/dev/PreProcess/InterpUtilities.py similarity index 100% rename from scripts/RWPSPreProcess/InterpUtilities.py rename to dev/PreProcess/InterpUtilities.py diff --git a/scripts/RWPSPreProcess/InterpolateWithWeights.py b/dev/PreProcess/InterpolateWithWeights.py similarity index 100% rename from scripts/RWPSPreProcess/InterpolateWithWeights.py rename to dev/PreProcess/InterpolateWithWeights.py diff --git a/scripts/RWPSPreProcess/InterpolateWithWeightsAndErrorVariance.py b/dev/PreProcess/InterpolateWithWeightsAndErrorVariance.py similarity index 100% rename from scripts/RWPSPreProcess/InterpolateWithWeightsAndErrorVariance.py rename to dev/PreProcess/InterpolateWithWeightsAndErrorVariance.py diff --git a/scripts/RWPSPreProcess/ProcessCurrents.sh b/dev/PreProcess/ProcessCurrents.sh similarity index 100% rename from scripts/RWPSPreProcess/ProcessCurrents.sh rename to dev/PreProcess/ProcessCurrents.sh diff --git a/scripts/RWPSPreProcess/ProcessIce.sh b/dev/PreProcess/ProcessIce.sh similarity index 100% rename from scripts/RWPSPreProcess/ProcessIce.sh rename to dev/PreProcess/ProcessIce.sh diff --git a/scripts/RWPSPreProcess/ProcessWaterLevel.sh b/dev/PreProcess/ProcessWaterLevel.sh similarity index 100% rename from scripts/RWPSPreProcess/ProcessWaterLevel.sh rename to dev/PreProcess/ProcessWaterLevel.sh diff --git a/scripts/RWPSPreProcess/ProcessWinds.sh b/dev/PreProcess/ProcessWinds.sh similarity index 100% rename from scripts/RWPSPreProcess/ProcessWinds.sh rename to dev/PreProcess/ProcessWinds.sh diff --git a/scripts/RWPSPreProcess/README.md b/dev/PreProcess/README.md similarity index 100% rename from scripts/RWPSPreProcess/README.md rename to dev/PreProcess/README.md diff --git a/dev/PreProcess/SetMeshName b/dev/PreProcess/SetMeshName new file mode 100644 index 0000000..6cb2c50 --- /dev/null +++ b/dev/PreProcess/SetMeshName @@ -0,0 +1 @@ +mesh=/lfs/h2/emc/couple/noscrub/keston.smith/RWPS/fix/oc_1500m_30km/20260722/rwps.oc_1500m_30km.msh diff --git a/scripts/RWPSPreProcess/SpdDir2UVnbm.py b/dev/PreProcess/SpdDir2UVnbm.py similarity index 100% rename from scripts/RWPSPreProcess/SpdDir2UVnbm.py rename to dev/PreProcess/SpdDir2UVnbm.py diff --git a/scripts/RWPSPreProcess/nbm/ConvertNBMIcetif2NetCDF.py b/dev/PreProcess/nbm/ConvertNBMIcetif2NetCDF.py similarity index 100% rename from scripts/RWPSPreProcess/nbm/ConvertNBMIcetif2NetCDF.py rename to dev/PreProcess/nbm/ConvertNBMIcetif2NetCDF.py diff --git a/scripts/RWPSPreProcess/nbm/GetNBMIce.sh b/dev/PreProcess/nbm/GetNBMIce.sh similarity index 100% rename from scripts/RWPSPreProcess/nbm/GetNBMIce.sh rename to dev/PreProcess/nbm/GetNBMIce.sh diff --git a/scripts/RWPSPreProcess/nbm/MakeNBMWind.sh b/dev/PreProcess/nbm/MakeNBMWind.sh similarity index 100% rename from scripts/RWPSPreProcess/nbm/MakeNBMWind.sh rename to dev/PreProcess/nbm/MakeNBMWind.sh diff --git a/scripts/RWPSPreProcess/nbm/MakeNBMWindUV.sh b/dev/PreProcess/nbm/MakeNBMWindUV.sh similarity index 100% rename from scripts/RWPSPreProcess/nbm/MakeNBMWindUV.sh rename to dev/PreProcess/nbm/MakeNBMWindUV.sh diff --git a/scripts/RWPSPreProcess/rrfs/MakeEnsRRFSWind.sh b/dev/PreProcess/rrfs/MakeEnsRRFSWind.sh similarity index 100% rename from scripts/RWPSPreProcess/rrfs/MakeEnsRRFSWind.sh rename to dev/PreProcess/rrfs/MakeEnsRRFSWind.sh diff --git a/scripts/RWPSPreProcess/rrfs/MakeRRFSWind.sh b/dev/PreProcess/rrfs/MakeRRFSWind.sh similarity index 100% rename from scripts/RWPSPreProcess/rrfs/MakeRRFSWind.sh rename to dev/PreProcess/rrfs/MakeRRFSWind.sh diff --git a/scripts/RWPSPreProcess/rtofs/GetRTOFS.sh b/dev/PreProcess/rtofs/GetRTOFS.sh similarity index 100% rename from scripts/RWPSPreProcess/rtofs/GetRTOFS.sh rename to dev/PreProcess/rtofs/GetRTOFS.sh diff --git a/scripts/RWPSPreProcess/rtofs/GetRTOFSIce.sh b/dev/PreProcess/rtofs/GetRTOFSIce.sh similarity index 100% rename from scripts/RWPSPreProcess/rtofs/GetRTOFSIce.sh rename to dev/PreProcess/rtofs/GetRTOFSIce.sh diff --git a/scripts/RWPSPreProcess/rtofs/GetRTOFSIcefcst.py b/dev/PreProcess/rtofs/GetRTOFSIcefcst.py similarity index 100% rename from scripts/RWPSPreProcess/rtofs/GetRTOFSIcefcst.py rename to dev/PreProcess/rtofs/GetRTOFSIcefcst.py diff --git a/scripts/RWPSPreProcess/rtofs/GetRTOFSfcst.py b/dev/PreProcess/rtofs/GetRTOFSfcst.py similarity index 100% rename from scripts/RWPSPreProcess/rtofs/GetRTOFSfcst.py rename to dev/PreProcess/rtofs/GetRTOFSfcst.py diff --git a/scripts/RWPSPreProcess/stofs/GetSTOFS.sh b/dev/PreProcess/stofs/GetSTOFS.sh similarity index 100% rename from scripts/RWPSPreProcess/stofs/GetSTOFS.sh rename to dev/PreProcess/stofs/GetSTOFS.sh From d82dc06a7810bb3c507e5dbf7e469a516f71e2fb Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa Date: Mon, 3 Aug 2026 18:13:22 +0000 Subject: [PATCH 04/39] Added scripts to support generating weights for STOFS and other unstructured fields --- .../ComputeUnstrToRWPSInterpWeights.py | 9 ++-- dev/PreProcess/ConvertWeights2Netcdf.py | 12 +++-- .../GenerateInterpolationWeights.jobcard | 29 ++++++++++- dev/PreProcess/InterpUtilities.py | 50 +++++++++++++------ dev/PreProcess/SetMeshName | 2 +- 5 files changed, 74 insertions(+), 28 deletions(-) diff --git a/dev/PreProcess/ComputeUnstrToRWPSInterpWeights.py b/dev/PreProcess/ComputeUnstrToRWPSInterpWeights.py index 676b935..73b90ee 100644 --- a/dev/PreProcess/ComputeUnstrToRWPSInterpWeights.py +++ b/dev/PreProcess/ComputeUnstrToRWPSInterpWeights.py @@ -84,9 +84,9 @@ data = nc.Dataset(flin,"r") #read spaital dimensions and determine if input mesh is curvilinear or regular x=np.asarray(data["x"][:]) -j=np.where(xi>90.) #elements broken here should not effect RWPS interpolation -xi[j]=xi[j]-360. - +j=np.where(x>90.) #elements broken here should not effect RWPS interpolation +x[j]=x[j]-360. + y=np.asarray(data["y"][:]) e=np.asarray(data["element"][:,:]) @@ -120,9 +120,6 @@ jyD=np.where( yc > np.min(ywin)-SearchWidth )[0].tolist() je=list( set(jxU) & set(jxD) & set(jyU) & set(jyD) ) -print("number of target nodes for this region = "+str(len(ji))) -print("number of source elements in this region = "+str(len(je))) - weights, nodes, elenum, Dist2EleCenter=iutil.compute_mesh_to_mesh_interp_weights(x, y, e[je,:], xi[ji], yi[ji]) #Move back to global index's diff --git a/dev/PreProcess/ConvertWeights2Netcdf.py b/dev/PreProcess/ConvertWeights2Netcdf.py index 8ba9c4f..0d90d5b 100644 --- a/dev/PreProcess/ConvertWeights2Netcdf.py +++ b/dev/PreProcess/ConvertWeights2Netcdf.py @@ -14,9 +14,13 @@ #AddExtrapolationSupport=False AddExtrapolationSupport=True -#TextWeightFl="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".txt" -TextWeightFl="InterpWeights."+mshfl[meshslash:len(mshfl)-4]+".stofs.txt" -flout = "InterpolationWeights."+mshfl[meshslash:len(mshfl)-3]+".stofs.nc" +#TextWeightFl="InterpWeights."+mshfl[meshslash:len(mshfl)-4]+".stofs.txt" + +TextWeightFl=sys.argv[3] + +##flout = "InterpolationWeights."+mshfl[meshslash:len(mshfl)-4]+".stofs.nc" + +flout=TextWeightFl[0:len(TextWeightFl)-4]+".nc" xi, yi, ei, zi = iutil.loadWW3Mesh(mshfl) nn_dst=len(xi) @@ -105,7 +109,7 @@ zdst_var[:]=zi[:] #Extrapolate=False -Extrapolate=sys.argv[3] +Extrapolate=sys.argv[4] if Extrapolate: dist2bnd=np.full(len(xi), np.inf) #all points are inside boundary- No boundary with this type of extrapolation diff --git a/dev/PreProcess/GenerateInterpolationWeights.jobcard b/dev/PreProcess/GenerateInterpolationWeights.jobcard index 3c18510..4e1a876 100644 --- a/dev/PreProcess/GenerateInterpolationWeights.jobcard +++ b/dev/PreProcess/GenerateInterpolationWeights.jobcard @@ -5,7 +5,8 @@ #PBS -q dev #PBS -A NWPS-DEV #PBS -l walltime=04:00:00 -#PBS -l select=1:ncpus=8:mem=128GB +##PBS -l select=1:ncpus=8:mem=128GB +#PBS -l select=1:ncpus=16:mem=256GB ###PBS -l select=1:ncpus=1:mem=8G #PBS -l place=excl #PBS -l debug=true @@ -29,6 +30,8 @@ source SetMeshName SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" date="20260730" cycl="00" +Nprocs=16 + meshname="${mesh##*/}" meshname="${meshname: 0: -4}" @@ -70,4 +73,26 @@ python ./ComputeGriddedToRWPSInterpWeights.py $rtofs_ice $mesh $rtofsIntrp.ice.n rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc #do not extrapolate rtofs .glo. currents -python ./ComputeGriddedToRWPSInterpWeights.py $rtofs_cur $mesh $rtofsIntrp.corrents.nc $rtofsDst.currents.nc -1 > GenWhts.rtofs.currents.out +python ./ComputeGriddedToRWPSInterpWeights.py $rtofs_cur $mesh $rtofsIntrp.currents.nc $rtofsDst.currents.nc -1 > GenWhts.rtofs.currents.out + + +cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/dev/PreProcess + +stofs_glo=$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" + +## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python ComputeUnstrToRWPSInterpWeights.py $stofs_glo $mesh $Nprocs + +## Now run parallel job script + +qsub -W block=true jobcardComputeUnstrToRWPSInterpWeightsPBS + +wait + +#combine text file output of parallel jobs +cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt + +# convert output weights to netcdf file +python ConvertWeights2Netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 +cp InterpWeights.$meshname.stofs.txt $out/ +cp DistToBndy.$meshname.stofs.txt $out/ diff --git a/dev/PreProcess/InterpUtilities.py b/dev/PreProcess/InterpUtilities.py index a4d5fb6..30ec0ec 100644 --- a/dev/PreProcess/InterpUtilities.py +++ b/dev/PreProcess/InterpUtilities.py @@ -579,14 +579,20 @@ def compute_mesh_to_mesh_interp_weights(x, y, e, xi, yi): elenum = np.zeros(n_points, dtype=int) Dist2EleCenter = np.zeros(n_points) - t0 = time.time() - +# t0 = time.time() +# UseNearestEle=True for k in range(n_points): x0=xi[k] y0=yi[k] deg2kmX=np.cos( np.pi * y0 / 180.)*deg2kmY #distances = np.abs((x0 + 1j*y0) - (xc + 1j*yc)) distances = np.abs( deg2kmX*(x0 - xc) + 1j*deg2kmY*(y0 - yc)) +# print(x0) +# print(y0) +# print(e0) +# print(xc) +# print(yc) +# print(distances) if UseNearestEle: jg=np.argmin(distances) else: @@ -600,7 +606,10 @@ def compute_mesh_to_mesh_interp_weights(x, y, e, xi, yi): if j < 0: print("couldn't find element for point : "+ str(k)) print(str(x0)+" : "+str(y0)) - j = jg[0] + if len(jg)>0: + j = jg[0] + else: + j=0 print("using closest element at distance : "+ str(distances[j])) else: j=jg[j] @@ -631,11 +640,11 @@ def compute_mesh_to_mesh_interp_weights(x, y, e, xi, yi): nodes[k, :] = e[j, :] #<- indexed 1 .. nn # Progress reporting every 100 iterations if (k + 1) % 10 == 0: - t1 = time.time() - time_per_iter = (t1 - t0) / (k + 1) - time_remaining = (n_points - k - 1) * time_per_iter / 60 +# t1 = time.time() +# time_per_iter = (t1 - t0) / (k + 1) +# time_remaining = (n_points - k - 1) * time_per_iter / 60 print(f"Progress: {k+1}/{n_points}") - print(f"Time remaining: {time_remaining:.2f} minutes") +# print(f"Time remaining: {time_remaining:.2f} minutes") return weights, nodes, elenum, Dist2EleCenter @@ -667,16 +676,21 @@ def InterpolateField2Nodes(nodes,weights, f): #-->echo "Running on node: $(hostname)" #--> python my_script.py --task $PBS_ARRAY_INDEX +import os def WriteInterpJobscriptPBS(fl,flin,mshfl,Njobs, ComputeNodes): meshslash=mshfl.rfind('/')+1 TmpOutDir="STOFSInterpWeights."+mshfl[meshslash:len(mshfl)-4] WghtFl="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".txt" - WghtFlNetCDF="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".nc" + WghtFl="InterpWeights."+mshfl[meshslash:len(mshfl)-4]+".stofs.txt" + WghtFlNetCDF="InterpWeights."+mshfl[meshslash:len(mshfl)-4]+".stofs.nc" +# WghtFlNetCDF="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".nc" Njobs=64 #OVERWRITE FOR NOW with open(fl, 'w') as f: +#cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt + # From rwps.cron #PBS -A RWPS-DEV @@ -700,6 +714,7 @@ def WriteInterpJobscriptPBS(fl,flin,mshfl,Njobs, ComputeNodes): # f.write("#PBS -l select=1:ncpus=1:mem=8G\n") f.write("#PBS -l place=excl\n") f.write("#PBS -l debug=true\n") + f.write("#PBS -r y\n") f.write("module reset\n") f.write("module load PrgEnv-intel/8.5.0\n") @@ -713,14 +728,19 @@ def WriteInterpJobscriptPBS(fl,flin,mshfl,Njobs, ComputeNodes): f.write("pip list -v\n") + current_dir = os.getcwd() + f.write("cd "+current_dir+"\n") + f.write("# calculate interpolation weights in parallel geographically \n") - f.write("srun python GeoSubsetInterpolateSTOFS.py "+flin+" "+mshfl+" $PBS_ARRAY_INDEX " + str(Njobs)+" > InterpJob.$PBS_ARRAY_INDEX.out \n") - f.write("wait\n") - f.write("# concatonate different parts of the mesh to common text file \n") - f.write("cat "+TmpOutDir+"/Part.IntrpWghts.*.txt > "+WghtFl+" \n") - f.write("# convert output weights to netcdf file \n") - f.write("python ConvertWeights2Netcdf.py "+flin+" "+mshfl+" \n") - print("to run $qsub -r y "+fl) +## f.write("srun python GeoSubsetInterpolateSTOFS.py "+flin+" "+mshfl+" $PBS_ARRAY_INDEX " + str(Njobs)+" > InterpJob.$PBS_ARRAY_INDEX.out \n") +## f.write("srun python ComputeUnstrToRWPSInterpWeights.py "+flin+" "+mshfl+" $PBS_ARRAY_INDEX " + str(Njobs)+" > InterpJob.$PBS_ARRAY_INDEX.out \n") + f.write("python ComputeUnstrToRWPSInterpWeights.py "+flin+" "+mshfl+" $PBS_ARRAY_INDEX " + str(Njobs)+" > InterpJob.$PBS_ARRAY_INDEX.out \n") +# f.write("wait\n") +# f.write("# concatonate different parts of the mesh to common text file \n") +# f.write("cat "+TmpOutDir+"/Part.IntrpWghts.*.txt > "+WghtFl+" \n") +# f.write("# convert output weights to netcdf file \n") +# f.write("python ConvertWeights2Netcdf.py "+flin+" "+mshfl+" \n") +# print("to run $qsub -r y "+fl) def WriteInterpJobscriptSLURM(fl,flin,mshfl,Njobs, ComputeNodes): diff --git a/dev/PreProcess/SetMeshName b/dev/PreProcess/SetMeshName index 6cb2c50..1308f01 100644 --- a/dev/PreProcess/SetMeshName +++ b/dev/PreProcess/SetMeshName @@ -1 +1 @@ -mesh=/lfs/h2/emc/couple/noscrub/keston.smith/RWPS/fix/oc_1500m_30km/20260722/rwps.oc_1500m_30km.msh +mesh=/lfs/h2/emc/couple/noscrub/keston.smith/RWPS/fix/oc_5km_100km/20260722/rwps.oc_5km_100km.msh From 38580ec803219164c8020a932c6f3a618968d9a1 Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa Date: Thu, 6 Aug 2026 13:46:05 +0000 Subject: [PATCH 05/39] changed path specification and removed command line args from ProcessXXX.sh and GetXXX.sh. Moved working program to ush/PreProcess --- jobs/GenerateInterpolationWeights.jobcard | 102 +++ ush/PreProcess/AddErrVarToFile.py | 125 +++ ush/PreProcess/AddMeshGeomToFile.py | 73 ++ ush/PreProcess/BayesForecastUpdate.py | 111 +++ .../ComputeGriddedToRWPSInterpWeights.py | 230 +++++ .../ComputeUnstrToRWPSInterpWeights.py | 141 ++++ .../ComputeUnstrToRWPSInterpWeights.sh | 41 + .../ComputeUnstrToRWPSInterpWeights0.sh | 64 ++ .../ComputeWindToRWPSInterpWeights.py | 168 ++++ ush/PreProcess/ConvertWeights2Netcdf.py | 140 +++ ...GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh | 97 +++ ush/PreProcess/GetAllFocing.jobcard.sh | 80 ++ ush/PreProcess/GetAllFocing.sh | 62 ++ ush/PreProcess/GetCurrents.sh | 11 + ush/PreProcess/GetIce.sh | 11 + ush/PreProcess/GetWaterLevel.sh | 11 + ush/PreProcess/GetWinds.sh | 50 ++ ush/PreProcess/InterpTime.py | 159 ++++ ush/PreProcess/InterpUtilities.py | 799 ++++++++++++++++++ ush/PreProcess/InterpolateWithWeights.py | 269 ++++++ .../InterpolateWithWeightsAndErrorVariance.py | 336 ++++++++ ush/PreProcess/ProcessCurrents.sh | 106 +++ ush/PreProcess/ProcessIce.sh | 121 +++ ush/PreProcess/ProcessWaterLevel.sh | 57 ++ ush/PreProcess/ProcessWinds.sh | 156 ++++ ush/PreProcess/SpdDir2UVnbm.py | 86 ++ ush/PreProcess/nbm/ConvertNBMIcetif2NetCDF.py | 56 ++ ush/PreProcess/nbm/GetNBMIce.sh | 36 + ush/PreProcess/nbm/MakeNBMWind.sh | 27 + ush/PreProcess/nbm/MakeNBMWindUV.sh | 55 ++ ush/PreProcess/rrfs/MakeEnsRRFSWind.sh | 77 ++ ush/PreProcess/rrfs/MakeRRFSWind.sh | 40 + ush/PreProcess/rtofs/GetRTOFS.sh | 34 + ush/PreProcess/rtofs/GetRTOFSIce.sh | 42 + ush/PreProcess/rtofs/GetRTOFSIcefcst.py | 107 +++ ush/PreProcess/rtofs/GetRTOFSfcst.py | 96 +++ ush/PreProcess/rwpsenv | 11 + ush/PreProcess/stofs/GetSTOFS.sh | 27 + 38 files changed, 4214 insertions(+) create mode 100644 jobs/GenerateInterpolationWeights.jobcard create mode 100644 ush/PreProcess/AddErrVarToFile.py create mode 100644 ush/PreProcess/AddMeshGeomToFile.py create mode 100644 ush/PreProcess/BayesForecastUpdate.py create mode 100644 ush/PreProcess/ComputeGriddedToRWPSInterpWeights.py create mode 100644 ush/PreProcess/ComputeUnstrToRWPSInterpWeights.py create mode 100644 ush/PreProcess/ComputeUnstrToRWPSInterpWeights.sh create mode 100644 ush/PreProcess/ComputeUnstrToRWPSInterpWeights0.sh create mode 100644 ush/PreProcess/ComputeWindToRWPSInterpWeights.py create mode 100644 ush/PreProcess/ConvertWeights2Netcdf.py create mode 100644 ush/PreProcess/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh create mode 100644 ush/PreProcess/GetAllFocing.jobcard.sh create mode 100644 ush/PreProcess/GetAllFocing.sh create mode 100644 ush/PreProcess/GetCurrents.sh create mode 100644 ush/PreProcess/GetIce.sh create mode 100644 ush/PreProcess/GetWaterLevel.sh create mode 100644 ush/PreProcess/GetWinds.sh create mode 100644 ush/PreProcess/InterpTime.py create mode 100644 ush/PreProcess/InterpUtilities.py create mode 100644 ush/PreProcess/InterpolateWithWeights.py create mode 100644 ush/PreProcess/InterpolateWithWeightsAndErrorVariance.py create mode 100644 ush/PreProcess/ProcessCurrents.sh create mode 100644 ush/PreProcess/ProcessIce.sh create mode 100644 ush/PreProcess/ProcessWaterLevel.sh create mode 100644 ush/PreProcess/ProcessWinds.sh create mode 100644 ush/PreProcess/SpdDir2UVnbm.py create mode 100644 ush/PreProcess/nbm/ConvertNBMIcetif2NetCDF.py create mode 100755 ush/PreProcess/nbm/GetNBMIce.sh create mode 100755 ush/PreProcess/nbm/MakeNBMWind.sh create mode 100644 ush/PreProcess/nbm/MakeNBMWindUV.sh create mode 100644 ush/PreProcess/rrfs/MakeEnsRRFSWind.sh create mode 100755 ush/PreProcess/rrfs/MakeRRFSWind.sh create mode 100755 ush/PreProcess/rtofs/GetRTOFS.sh create mode 100755 ush/PreProcess/rtofs/GetRTOFSIce.sh create mode 100644 ush/PreProcess/rtofs/GetRTOFSIcefcst.py create mode 100644 ush/PreProcess/rtofs/GetRTOFSfcst.py create mode 100644 ush/PreProcess/rwpsenv create mode 100755 ush/PreProcess/stofs/GetSTOFS.sh diff --git a/jobs/GenerateInterpolationWeights.jobcard b/jobs/GenerateInterpolationWeights.jobcard new file mode 100644 index 0000000..e78bf95 --- /dev/null +++ b/jobs/GenerateInterpolationWeights.jobcard @@ -0,0 +1,102 @@ +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=04:00:00 +##PBS -l select=1:ncpus=8:mem=128GB +#PBS -l select=1:ncpus=16:mem=256GB +###PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + +pip list -v + +cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/PreProcess + +source SetMeshName + +SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" +date="20260730" +cycl="00" +Nprocs=16 + + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +rrfs_hi=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.hi.nc +rrfs_pr=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.pr.nc +rrfs_ak=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.ak.nc +rrfs_na=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.na.nc +rrfs_conus=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.conus.nc + +out="../../fix" + + + +rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" +rrfsDst="$out/DistToBndy.$meshname.rrfs" + +#no extrapolation with rrfs forecasts +python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out +python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_pr $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 > GenWhts.rrfs.pr.out +python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_ak $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 > GenWhts.rrfs.ak.out +python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_na $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 > GenWhts.rrfs.na.out +python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_conus $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out + +nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc +nbmIntrp="$out/InterpolationWeights.$meshname.nbm" +nbmDst="$out/DistToBndy.$meshname.nbm" +#extrapolate nbm oc wind to all points +python ./ComputeGriddedToRWPSInterpWeights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out + +nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc +#do not extrapolate for NBM .ak. domain +python ./ComputeGriddedToRWPSInterpWeights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out + +rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc +rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" +rtofsDst="$out/DistToBndy.$meshname.rtofs" + +#extrapolate rtofs .glo. for full ice coverage + +python ./ComputeGriddedToRWPSInterpWeights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out + + +rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc +#do not extrapolate rtofs .glo. currents +python ./ComputeGriddedToRWPSInterpWeights.py $rtofs_cur $mesh $rtofsIntrp.currents.nc $rtofsDst.currents.nc -1 > GenWhts.rtofs.currents.out + + +cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/dev/PreProcess + +stofs_glo="$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" + +## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python ComputeUnstrToRWPSInterpWeights.py $stofs_glo $mesh $Nprocs + +## Now run parallel job script + +qsub -W block=true jobcardComputeUnstrToRWPSInterpWeightsPBS + +wait + +#combine text file output of parallel jobs +cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt + +# convert output weights to netcdf file +python ConvertWeights2Netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 +cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc +cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc diff --git a/ush/PreProcess/AddErrVarToFile.py b/ush/PreProcess/AddErrVarToFile.py new file mode 100644 index 0000000..8a9f483 --- /dev/null +++ b/ush/PreProcess/AddErrVarToFile.py @@ -0,0 +1,125 @@ +import numpy as np +import netCDF4 as nc +import sys +import InterpUtilities as iutil +import os +#Add compute and add error variance field to existing file + +UseUnixTime=True +nargin = len(sys.argv) - 1 + +flin=sys.argv[1] +dist2bnd_file=sys.argv[2] + +VarParam0=sys.argv[3] +VarParam=VarParam0.split(":") + +data=nc.Dataset(dist2bnd_file,"r") +dist2bnd=np.array(data["dist2bnd"][:]) +zi=np.array(data["depth"][:]) +nn=len(dist2bnd) +data.close() + + +VariableType="WaterLevel" +if "wind" in flin: + VariableType="Wind" +elif "uv" in flin: + VariableType="Current" +elif "vel" in flin: + VariableType="Current" +elif "ice" in flin: + VariableType="Ice" + + +if VariableType=="Current": + VarShallow=float(VarParam[0]) # variance (m/s)**2 for shallow regions + VarDeep=float(VarParam[1]) # variance (m/s)**2 for deep regions + BatShallow=float(VarParam[2]) # isobath (m) for shallow regions + BatDeep=float(VarParam[3]) # isobath (m) for deep regions + if "stofs" in flin: +# Variance = iutil.VarianceLinearDepth(zi,1.,100.,50.,250.) + Variance = iutil.VarianceLinearDepth (zi, VarShallow, VarDeep, BatShallow, BatDeep) + if "rtofs" in flin: #variance high in shallows and near boundary of coverage +# VarianceDepth = iutil.VarianceLinearDepth(zi,100.,1.,50.,250.) + VarianceDepth = iutil.VarianceLinearDepth(zi,VarShallow,VarDeep,BatShallow,BatDeep) + VarLambda= float(VarParam[4]) # lengthscale (km) for linear transition from bounadry variance(==VarShallow) to interior variance(==VarDeep) + VarianceBnd = iutil.VarianceLinearDistanceToBndy( dist2bnd, VarDeep,VarShallow, VarLambda) + Variance = np.maximum(VarianceDepth, VarianceBnd) + +if VariableType=="WaterLevel": + if "stofs" in flin: +# Variance = 1.+0*zi + VarInterior=float(VarParam[0]) # variance (m)**2 for stofs water level + Variance = VarInterior+0.*zi + +if VariableType=="Wind": + ##LocalFS = [ rwps_pr, rwps_hi, rwps_ak, rwps_conus, rwps_na] # file names + ##VarFS = [ 4. , 4. , 9. , 16. , 25. ] # (m m /s /s) + ##LambdaFS = [ 150. , 200. , 500. , 1000. , 1500. ] # (km) + VarInterior=float(VarParam[0]) # variance (m/s)**2 for interior of forecast + if "nbm" in flin: + Variance = VarInterior + np.zeros(nn) + if "rrfs" in flin: + VarBoundary = float(VarParam[1]) # variance (m/s)**2 for boundary of forecast + VarLambda = float(VarParam[2]) # lengthscale (km) for linear transition from bounadry variance to interior variance + Variance = iutil.VarianceLinearDistanceToBndy( dist2bnd, VarInterior, VarBoundary,VarLambda ) + + +if VariableType=="Ice": + ##LocalFS = [ rwps_pr, rwps_hi, rwps_ak, rwps_conus, rwps_na] # file names + ##VarFS = [ 4. , 4. , 9. , 16. , 25. ] # (m m /s /s) + ##LambdaFS = [ 150. , 200. , 500. , 1000. , 1500. ] # (km) + VarInterior=float(VarParam[0]) # variance (m/s)**2 for interior of forecast + if "rtofs" in flin: + Variance = VarInterior + np.zeros(nn) + if "nbm" in flin: + VarBoundary = float(VarParam[1]) # variance (m/s)**2 for boundary of forecast + VarLambda = float(VarParam[2]) # lengthscale (km) for linear transition from bounadry variance to interior variance + Variance = iutil.VarianceLinearDistanceToBndy( dist2bnd, VarInterior, VarBoundary,VarLambda ) + + + + + + +fltmp=flin+".tmp.nc" +try: + os.remove(fltmp) +except: + print("creating "+fltmp+" temporarily") + +data0 = nc.Dataset(flin,"r") + +with nc.Dataset(fltmp, "w", format="NETCDF4") as ncout: + # 1. Copy Global Attributes + ncout.setncatts({attr: data0.getncattr(attr) for attr in data0.ncattrs()}) + # 2. Copy Dimensions + for name, dimension in data0.dimensions.items(): + # If the dimension is unlimited, pass None to createDimension + dim_len = len(dimension) if not dimension.isunlimited() else None + ncout.createDimension(name, dim_len) + for name, src_var in data0.variables.items(): + dst_var = ncout.createVariable(name, src_var.datatype, src_var.dimensions) + dst_var.setncatts({attr: src_var.getncattr(attr) for attr in src_var.ncattrs()}) + dst_var[:] = src_var[:] + + time=np.asarray(data0["time"][:]) + nt=len(time) + ErrorVariance=np.zeros((nt,nn)) + for k in range(nt): + ErrorVariance[k,:]=Variance[:] + + if not 'node' in ncout.dimensions: + ncadd.createDimension('node' , nn) + if not 'time' in ncout.dimensions: + ncadd.createDimension('time' , nt) + if not 'ErrorVariance' in ncout.variables: + ErrorVariance_var=ncout.createVariable('ErrorVariance', 'f8', ('time','node')) + ErrorVariance_var.long_name = 'forecast error variance' + ErrorVariance_var.units = "(field units)**2" + ErrorVariance_var.standard_name = 'errror variance' + ErrorVariance_var[:]=ErrorVariance + + ncout.close +os.rename(fltmp, flin) diff --git a/ush/PreProcess/AddMeshGeomToFile.py b/ush/PreProcess/AddMeshGeomToFile.py new file mode 100644 index 0000000..e7e7d2a --- /dev/null +++ b/ush/PreProcess/AddMeshGeomToFile.py @@ -0,0 +1,73 @@ +import numpy as np +import netCDF4 as nc +import sys +import InterpUtilities as iutil +import os + +UseUnixTime=True +nargin = len(sys.argv) - 1 + +flin=sys.argv[1] +mshfl=sys.argv[2] + +meshslash=mshfl.rfind('/')+1 +meshname=mshfl[meshslash:len(mshfl)-3] + +xi, yi, ei, zi = iutil.loadWW3Mesh(mshfl) +nn=len(xi) +ne=ei.shape[0] + +fltmp=flin+".tmp.nc" +try: + os.remove(fltmp) +except: + print("creating "+fltmp+" temporarily") + +data0 = nc.Dataset(flin,"r") + +with nc.Dataset(fltmp, "w", format="NETCDF4") as ncout: + # 1. Copy Global Attributes + ncout.setncatts({attr: data0.getncattr(attr) for attr in data0.ncattrs()}) + # 2. Copy Dimensions + for name, dimension in data0.dimensions.items(): + # If the dimension is unlimited, pass None to createDimension + dim_len = len(dimension) if not dimension.isunlimited() else None + ncout.createDimension(name, dim_len) + for name, src_var in data0.variables.items(): + dst_var = ncout.createVariable(name, src_var.datatype, src_var.dimensions) + dst_var.setncatts({attr: src_var.getncattr(attr) for attr in src_var.ncattrs()}) + dst_var[:] = src_var[:] + + if not 'node' in data0.dimensions: + ncout.createDimension('node' , nn) + if not 'element' in data0.dimensions: + ncout.createDimension('element' , ne) + if not 'noel' in data0.dimensions: + ncout.createDimension('noel', 3) + ncout.meshname=meshname + ncout.mesh=mshfl + + if not 'longitude' in ncout.variables: + lon_var=ncout.createVariable('longitude', 'f8', ('node',)) + lon_var.units = 'degree_east' + lon_var.long_name = 'longitude' + lon_var.standard_name = 'longitude' + lon_var.axis = 'X' + lon_var[:]=xi[:] + + if not 'latitude' in ncout.variables: + lat_var=ncout.createVariable('latitude', 'f8', ('node',)) + lat_var.units = 'degree_north' + lat_var.long_name = 'latitude' + lat_var.standard_name = 'latitude' + lat_var.axis = 'Y' + lat_var[:]=yi[:] + + if not 'tri' in ncout.variables: + tri_var=ncout.createVariable('tri', 'i4', ('noel','element')) + tri_var.long_name = 'element list' + tri_var.standard_name = 'element list' + tri_var[:]=np.transpose(ei) + + ncout.close +os.rename(fltmp, flin) diff --git a/ush/PreProcess/BayesForecastUpdate.py b/ush/PreProcess/BayesForecastUpdate.py new file mode 100644 index 0000000..361c283 --- /dev/null +++ b/ush/PreProcess/BayesForecastUpdate.py @@ -0,0 +1,111 @@ + + +import datetime +import numpy as np +import netCDF4 as nc +import sys +import re +import InterpUtilities as iutil +flin0=sys.argv[1] +flin1=sys.argv[2] +flout=sys.argv[3] + +varname0=sys.argv[4] +varname=varname0.split(":") +nvar=len(varname) + +data0 = nc.Dataset(flin0,"r") +t=np.asarray(data0["time"][:]) +var=np.asarray(data0["ErrorVariance"][:,:]) + +x=np.asarray(data0["longitude"][:]) +y=np.asarray(data0["latitude"][:]) +e=np.asarray(data0["tri"][:,:]) + +nt=len(t) +nn=len(x) +ne=e.shape[1] +noel=e.shape[0] + +nvar=len(varname) +field=np.zeros((nvar,nt,nn)) + +nan=float("nan") +for jv in range(nvar): + tmp=np.asarray(data0[varname[jv]][:,:]) + if "_FillValue" in data0[varname[jv]].ncattrs(): + fill_value0=data0[varname[jv]]._FillValue + tmp[np.where(tmp==fill_value0)]=nan + field[jv,:,:]=tmp + +data1 = nc.Dataset(flin1,"r") +t1=np.asarray(data1["time"][:]) +var1=np.asarray(data1["ErrorVariance"][:,:]) +nt1,nn1=var1.shape +field1=np.zeros((nvar,nt1,nn1)) +for jv in range(nvar): + tmp=np.asarray(data1[varname[jv]][:,:]) + if "_FillValue" in data1[varname[jv]].ncattrs(): + fill_value1=data1[varname[jv]]._FillValue + tmp[np.where(tmp==fill_value1)]=nan + field1[jv,:,:]=tmp + +Inf=float('inf') +um1=field1[0,0,:] +ng1=np.where( um1**2>=0 ) # find points that are valid floats for field1 + +for k in range(nt): + #j=np.where(t[k]==t1) # find common merge point in data + j=np.where(np.abs(t[k]-t1)<120.) # find common merge point in data + j=j[0].tolist() + if len(j)==1: + print("j="+str(j)+" : k="+str(k)) + for jv in range(nvar): + field[jv,k,ng1] = ( field[jv,k,ng1] + + ( var[k,ng1] / ( var[k,ng1] + var1[j,ng1] ) ) + * (field1[jv,j,ng1]-field[jv,k,ng1]) + ) + #update error variance to posterior + var[k,ng1]=var[k,ng1] * ( var1[j,ng1] / ( var[k,ng1]+var1[j,ng1] ) ) + +with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: + ncout.createDimension('level' , 1) + ncout.createDimension('node' , nn) + ncout.createDimension('element' , ne) + ncout.createDimension('time', nt) + ncout.createDimension('noel', 3) + + lon_var=ncout.createVariable('longitude', 'f8', ('node',)) + lon_var.units = 'degree_east' + lon_var.long_name = 'longitude' + lon_var.standard_name = 'longitude' + lon_var.axis = 'X' + lon_var[:]=x[:] + + lat_var=ncout.createVariable('latitude', 'f8', ('node',)) + lat_var.units = 'degree_north' + lat_var.long_name = 'latitude' + lat_var.standard_name = 'latitude' + lat_var.axis = 'Y' + lat_var[:]=y[:] + + time_var=ncout.createVariable('time', 'f4', ('time',)) + iutil.CopyAttributes(data0["time"], time_var) + time_var[:]=t[:] + + tri_var=ncout.createVariable('tri', 'i4', ('noel','element')) + tri_var.long_name = 'element list' + tri_var.standard_name = 'element list' + tri_var[:,:]=e + + #Copy attributes from old file to new + for jv in range(nvar): + f_var=ncout.createVariable(varname[jv], 'f4', ('time','node')) + iutil.CopyAttributes(data0[varname[jv]], f_var) + f_var[:,:]=field[jv,:,:] + + ErrVar0=data0["ErrorVariance"] + ErrVar_var=ncout.createVariable("ErrorVariance", 'f4', ('time','node')) + iutil.CopyAttributes(ErrVar0, ErrVar_var) + ErrVar_var[:,:]=var[:,:] + ncout.close diff --git a/ush/PreProcess/ComputeGriddedToRWPSInterpWeights.py b/ush/PreProcess/ComputeGriddedToRWPSInterpWeights.py new file mode 100644 index 0000000..3a8e877 --- /dev/null +++ b/ush/PreProcess/ComputeGriddedToRWPSInterpWeights.py @@ -0,0 +1,230 @@ +# This is a a set of routines that interpolate wind forecasts to an unstructured +# mesh from regular or curvilinear grids (using ESMPY). In addition to interpolation +# field the out file contains a spatially variable error variance estimate based on the +# distance to the forecast boundary. This error variance is used later to update +# dispirate forecasts in a bayesian manner to yield a spatially smooth estimate +# incorporating all forecasts. The understanding is that the more local forecast +# products are of higher accuracy than the coarser broader scale forecasts + +import numpy as np +import os + +import datetime +import netCDF4 as nc +import sys +import re +import InterpUtilities as iutil + +import xarray as xr +import esmpy +import scipy.sparse as sp + +import InterpUtilities as iutil + + +#mshfl="../meshes/RWPS.V0a.small.msh" +#flin="../RWPSWrkFlw/WindBlend/wind.20260507.00X/rrfs.20260507.00.wind10m.ak.nc" + + +# Main program +#AddExtrapolationSupport=False +AddExtrapolationSupport=True + +nargin = len(sys.argv) - 1 + +flin=sys.argv[1] +mshfl=sys.argv[2] +weights_file=sys.argv[3] +dist2bnd_file=sys.argv[4] +# Don't use nearest neighbor interpolation unless 6th positive integer argument present. +# This may be needed on boundary of RWPS mesh if node alignment is outside NBM OC domain +Extrapolate=False +if nargin > 4: + if int(sys.argv[5])>0: + print("using nearest neighbor to extrapolate wind field beyond geometric coverage") + Extrapolate=True + +xi, yi, ei, zi = iutil.loadWW3Mesh(mshfl) +nn=len(xi) +#shift coords to[129,370] +#if np.mean(xi)<0.: + #xi=xi+360. +data = nc.Dataset(flin,"r") +#read spaital dimensions and determine if input mesh is curvilinear or regular +x1=np.asarray(data["longitude"][:]) +y1=np.asarray(data["latitude"][:]) + +# shift to common longitude +#if np.mean(np.mean(x1))<0: +# x1=x1+360. +# rwps :[-231, 11] +# nbm :[129, 370] +# rrfs,pr :[ -75.5000 -62.5087] +# rrfs,hi :[ -161.5250 -153.8690] +# rrfs,ak :[150.2012 266.2886] +# rrfs,na :[67.5721 427.0000] +# rrfs,conus :[ 225.9045 299.0828] +# rtofs,glo :[74.1552,434.0146] +# stofs, glo :[-180,180] +# + +#Shift longitude coordinates to RWPS specs for various files +if "hi" in flin: + x1=x1+360. +if "pr" in flin: + x1=x1+360. + +if "rtofs" in flin: #remove bad geometry edges + x1=x1[1:-1,1:-1] + y1=y1[1:-1,1:-1] + x1=x1-360. + +if (len(x1.shape)==2 and len(y1.shape)==2): + IsCrvLn=True +elif (len(x1.shape)==1 and len(y1.shape)==1): + #represent regular grid as curvilinear grid + IsCrvLn=False + nx=len(x1) + ny=len(y1) + x1 = np.tile(x1,(ny,1)) + y1 = np.tile(y1,(nx,1)).T + IsCrvLn=True +else: + print("input file spatial dimension is not recognized. ending program") + sys.exit() + +####################################### +# === Create weights ===# +####################################### +meshslash=mshfl.rfind('/')+1 +dom=flin.split(".") +dom=dom[len(dom)-2] + +print("interpolation weights will be written to file = "+ weights_file) + +nx=x1.shape[0] +ny=x1.shape[1] +n1=nx*ny + +print("Computing weights and saving to file: "+ weights_file) + +#Use esmpy to construct bilinear interpolation weights +iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + +####################################### +# === read weights and ===# +####################################### +with xr.open_dataset(weights_file) as ds_s: + # Standard sparse storage uses 'row', 'col', and 'S'==weights variables + row = ds_s['row'].values + col = ds_s['col'].values + weights = ds_s['S'].values + Nrows=ds_s.attrs.get('Nrows') + Ncols=ds_s.attrs.get('Ncols') +print("nn = "+str(nn)+": Nrows = "+str(Nrows)) +print("n1 = "+str(n1)+": Ncols = "+str(Ncols)) +if not ((nn==Nrows) and (n1==Ncols)): + print("Wrong matrix weights: number of rows from "+ mshfl +" = "+str(nn)+ + " but number of rows in "+ weights_file +" = "+str(Nrows)+ + ", number of spatial points in "+ flin +" = "+str(n1)+ + " but number of columns in "+ weights_file +" = "+str(Ncols) ) + print(" You probably need to remove file "+ weights_file +" and rerun to generate appropriate weights") +matrix = sp.coo_matrix((weights, (row-1, col-1)), shape=(nn,n1)).tocsr() +print("sparse interpolation matrix") +print(matrix) + +################################################################################## +# START: Extrapolate for nodes not covered by interpolator +################################################################################## +x1v=np.transpose(x1).reshape(n1) # vectorize src nodes, consistant with data to interpolate +y1v=np.transpose(y1).reshape(n1) + +if Extrapolate: + from scipy.interpolate import NearestNDInterpolator + srcp = np.array((x1v,y1v)).T + srcv = 1.+x1v**2 + y1v**2 #dummy input field + #dstv = matrix @ srcv.T + row_sum = matrix.sum(axis=1) + j0=np.where( row_sum==0 ) # destination nodes with no coverage from interpolation matrix + j0=np.array(j0[0]).tolist() + dstp = np.array((xi[j0],yi[j0])).T + interpolator = NearestNDInterpolator(srcp, srcv) + distances, j0src = interpolator.tree.query(dstp) + weightsExtrp=weights.tolist().append([1.0] * len(j0) ) + rowExtrp=np.concatenate( (row, np.array(j0)) ) + colExtrp=np.concatenate( (col, np.array(j0src+1)) ) +# this colExtrp=np.concatenate( (col, np.array(j0src)) ) + weightsExtrp=np.concatenate( (weights, np.array([1.0] * len(j0))) ) +# os.replace(weights_file, "NoExtrap."+weights_file) + os.replace(weights_file, weights_file[0:-3]+".NoExtrap.nc") + iutil.WriteInterpolationWeightsToNetCDF(weights_file,rowExtrp,colExtrp,weightsExtrp,len(xi),len(x1v)) +################################################################################## +# FINISHED: Extrapolate for nodes not covered by interpolator +################################################################################## + +################################################################################## +# START: Extrapolation support for NaN occurances in source field +################################################################################## +if AddExtrapolationSupport: + with nc.Dataset(weights_file, 'r+', format='NETCDF4') as ncadd: + ncadd.createDimension('nn_src' , len(x1v)) + ncadd.createDimension('nn_dst' , len(xi)) + + xsrc_var=ncadd.createVariable('x_src', 'f8', ('nn_src',)) + xsrc_var.long_name = 'interpolation source node longitude' + xsrc_var[:]=x1v[:] + + ysrc_var=ncadd.createVariable('y_src', 'f8', ('nn_src',)) + ysrc_var.long_name = 'interpolation source node latitude' + ysrc_var[:]=y1v[:] + + xdst_var=ncadd.createVariable('x_dst', 'f8', ('nn_dst',)) + xdst_var.long_name = 'interpolation destination node longitude' + xdst_var[:]=xi[:] + + ydst_var=ncadd.createVariable('y_dst', 'f8', ('nn_dst',)) + ydst_var.long_name = 'interpolation destination node latitude' + ydst_var[:]=yi[:] + +################################################################################## +# FINISHED: Extrapolation support for NaN occurances in source field +################################################################################## +with nc.Dataset(weights_file, 'r+', format='NETCDF4') as ncadd: + ncadd.setncattr("SrcFieldType", "gridded") + ncadd.setncattr("InputFile", flin) + ncadd.setncattr("MeshFile", mshfl) + + +################################################################################## +# START: Compute distance to boundary for each node in mesh: +################################################################################## +#if Extrapolate: +# dist2bnd=np.full(len(xi), np.inf) #all points are inside boundary- No boundary with this type of extrapolation +#else: +row_sum = matrix.sum(axis=1) +j0=np.where( row_sum==0 ) # destination nodes with no coverage from interpolation matrix +j0=np.array(j0[0]).tolist() +u0=np.ones(xi.shape) +nan=float("nan") +u0[j0]=nan +dist2bnd=iutil.CalculateDistanceToInterpEnvelope(xi,yi,u0, 1.) + +if Extrapolate: + dist2bnd=0.*dist2bnd + np.inf #all points are inside boundary- No boundary with this type of extrapolation + print(np.mean(dist2bnd)) + + +with nc.Dataset(dist2bnd_file, 'w', format='NETCDF4') as ncout: + ncout.createDimension('node' , nn) + d_var=ncout.createVariable('dist2bnd', 'f4', ('node',)) + d_var.long_name = 'distance to boundary' + d_var.units = 'km' + d_var.standard_name = 'distance to boundary' + d_var[:]=dist2bnd[:] + + z_var=ncout.createVariable('depth', 'f4', ('node',)) + z_var.long_name = 'mesh depth' + z_var.units = 'm' + z_var.standard_name = 'depth' + z_var[:]=zi[:] + diff --git a/ush/PreProcess/ComputeUnstrToRWPSInterpWeights.py b/ush/PreProcess/ComputeUnstrToRWPSInterpWeights.py new file mode 100644 index 0000000..73b90ee --- /dev/null +++ b/ush/PreProcess/ComputeUnstrToRWPSInterpWeights.py @@ -0,0 +1,141 @@ +import numpy as np +import netCDF4 as nc +import sys +from scipy.interpolate import RegularGridInterpolator +#import CalculateSTOFStoRWPSInterpWeightsUtility as mshint +import InterpUtilities as iutil + +import os +nargin = len(sys.argv) - 1 + +flin=sys.argv[1] +mshfl=sys.argv[2] + +meshslash=mshfl.rfind('/')+1 +TmpOutDir="STOFSInterpWeights."+mshfl[meshslash:len(mshfl)-4] + +#if nargin==3 then write the parallel jobcard that carries out the interpolation weight calculation +if nargin ==3 : + Njobs=int(sys.argv[3]) + os.makedirs(TmpOutDir, exist_ok=True) + try: + os.remove(TmpOutDir+"/*.txt") + except: + print("directory "+TmpOutDir+" is alread empty") + iutil.WriteInterpJobscriptPBS("jobcardComputeUnstrToRWPSInterpWeightsPBS",flin,mshfl,Njobs, 1) + iutil.WriteInterpJobscriptSLURM("jobcardComputeUnstrToRWPSInterpWeightsSLURM",flin,mshfl,Njobs, 1) + print("Made parallel jobcards to create interpolation weights with "+str(Njobs)+" processes. Next step:") + print("sbatch jobcardComputeUnstrToRWPSInterpWeightsSLURM") + sys.exit() + +#if nargin==4 then do the part of the mesh for jobID of Njobs +if nargin == 4: + jobID=int(sys.argv[3]) + Njobs=int(sys.argv[4]) + +#if nargin==6 then do the interpolation weight calculation for a specified window +else: + lonW=int(sys.argv[3]) + lonE=int(sys.argv[4]) + latS=int(sys.argv[5]) + latN=int(sys.argv[6]) + +#latS=-40 +#latN=81 + +meshslash=mshfl.rfind('/')+1 +if nargin < 5: + weights_file = TmpOutDir+"/Part.IntrpWghts."+str(jobID)+".txt" +else: + weights_file = TmpOutDir+"/Part.IntrpWghts.W"+str(lonW)+".E"+str(lonE)+".S"+str(latS)+".N"+str(latN)+"."+mshfl[meshslash:len(mshfl)-3]+"txt" + + +print("saving output to:"+weights_file) + +xi, yi, ei, zi = iutil.loadWW3Mesh(mshfl) +nni=len(xi) +j=np.where(xi>90.) # should be empty +xi[j]=xi[j]-360. +#if np.mean(xi)<0.: +# xi=xi+360. + +# divide domain from east west based on job id=0 ... Njobs +# and make North-South window contain the full target domain +# NOTE: for efficiency the sections of the domain should have approximately +# the same number of destination nodes and/or the same number of source elements +# will implement as function shortly + +if nargin < 5: +# balance node load for + xis=np.sort(xi) + mm=round(nni/Njobs) + xil=xis[range(0,nni,mm)] + lonW=xil[jobID] + if jobID==Njobs-1: + lonE=xis[-1]+1. + else: + lonE=xil[jobID+1] + if jobID==0: + lonW=xis[0]-1. + + latS=np.min(yi)-1. + latN=np.max(yi)+1. + +data = nc.Dataset(flin,"r") +#read spaital dimensions and determine if input mesh is curvilinear or regular +x=np.asarray(data["x"][:]) +j=np.where(x>90.) #elements broken here should not effect RWPS interpolation +x[j]=x[j]-360. + +y=np.asarray(data["y"][:]) +e=np.asarray(data["element"][:,:]) + +e0=e-1 +xc = np.mean(x[e0], axis=1) +yc = np.mean(y[e0], axis=1) + +nn=len(x) + +SearchWidth=.5 # search rectangle extended beyond window to this number (degrees lat lon) + +print(e.shape) +ne=e.shape[0] +print(ne) + +xwin=[lonW,lonE] +ywin=[latS,latN] +print("calculating interpolation weights for [W"+str(lonW)+": E "+str(lonE)+": S "+str(latS)+": N "+str(latN)+"]") +#Find target mesh nodes in window +jxUi=np.where( xi <= np.max(xwin))[0].tolist() +jxDi=np.where( xi >= np.min(xwin))[0].tolist() +jyUi=np.where( yi <= np.max(ywin))[0].tolist() +jyDi=np.where( yi >= np.min(ywin))[0].tolist() +ji=list( set(jxUi) & set(jxDi) & set(jyUi) & set(jyDi) ) + +#Find source elements in and near window +SearchWidth=.5 +jxU=np.where( xc < np.max(xwin)+SearchWidth )[0].tolist() +jxD=np.where( xc > np.min(xwin)-SearchWidth )[0].tolist() +jyU=np.where( yc < np.max(ywin)+SearchWidth )[0].tolist() +jyD=np.where( yc > np.min(ywin)-SearchWidth )[0].tolist() +je=list( set(jxU) & set(jxD) & set(jyU) & set(jyD) ) + +weights, nodes, elenum, Dist2EleCenter=iutil.compute_mesh_to_mesh_interp_weights(x, y, e[je,:], xi[ji], yi[ji]) + +#Move back to global index's +for k in range(len(elenum)): + elenum[k]=je[elenum[k]] + ji[k]=ji[k] + +#return to convention numbering from 1 ... +elenum = list(np.array(elenum) + 1) +ji = list(np.array(ji) + 1) +#nodes = np.array(nodes) + 1 # as writen using the correct 1 .. nn node numbering + +# File format +# ["taget node number" "source element number" "source n1" "source n2 "source n3" "distance from target node to element center" "weight1" "weight2" "weight3"] + +Fout=np.vstack((np.array(ji),elenum,nodes[:,0],nodes[:,1],nodes[:,2],Dist2EleCenter,weights[:,0],weights[:,1],weights[:,2])) +np.savetxt(weights_file,Fout.T, fmt='%d %d %d %d %d %.6f %.6f %.6f %.6f') + + diff --git a/ush/PreProcess/ComputeUnstrToRWPSInterpWeights.sh b/ush/PreProcess/ComputeUnstrToRWPSInterpWeights.sh new file mode 100644 index 0000000..9af1a81 --- /dev/null +++ b/ush/PreProcess/ComputeUnstrToRWPSInterpWeights.sh @@ -0,0 +1,41 @@ +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=00:05:00 +#PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + +pip list -v + +filein=$1 +meshfile=$2 +Nprocs=$3 + +## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python ComputeUnstrToRWPSInterpWeights.py $filein $meshfile $Nprocs + +## Now run parallel job script +## sbatch jobcardComputeUnstrToRWPSInterpWeightsSLURM +qsub jobcardComputeUnstrToRWPSInterpWeightsPBS +wait; + +## Now knit output from parallel job together and write to netcdf format +## The third argument "1" indicates to write (x,y) for destination and source nodes +## to support extrapolation + +python ConvertWeights2Netcdf.py $filein $meshfile 1 + diff --git a/ush/PreProcess/ComputeUnstrToRWPSInterpWeights0.sh b/ush/PreProcess/ComputeUnstrToRWPSInterpWeights0.sh new file mode 100644 index 0000000..18aa2ec --- /dev/null +++ b/ush/PreProcess/ComputeUnstrToRWPSInterpWeights0.sh @@ -0,0 +1,64 @@ +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=00:05:00 +#PBS -l select=1:ncpus=8:mem=128G +#PBS -l place=excl +#PBS -l debug=true + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + +pip list -v + +##filein=$1 +##meshfile=$2 +##Nprocs=$3 + +cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/dev/PreProcess + +filein="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" +#meshfile="/lfs/h2/emc/couple/noscrub/keston.smith/RWPS/fix/oc_1500m_30km/20260722/rwps.oc_1500m_30km.msh" +meshfile="/lfs/h2/emc/couple/noscrub/keston.smith/RWPS/fix/oc_5km_100km/20260722/rwps.oc_5km_100km.msh" +Nprocs=32 + +meshname="${meshfile##*/}" +meshname="${meshname: 0: -4}" + + + +## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python ComputeUnstrToRWPSInterpWeights.py $filein $meshfile $Nprocs + +## Now run parallel job script +## sbatch jobcardComputeUnstrToRWPSInterpWeightsSLURM + +qsub -W block=true jobcardComputeUnstrToRWPSInterpWeightsPBS + + +wait + +##cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > STOFS.wght.$meshname.txt +cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt + +# convert output weights to netcdf file + + +##python ConvertWeights2Netcdf.py /lfs/h2/emc/couple/noscrub/keston.smith/SampleInput/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc /lfs/h2/emc/couple/noscrub/keston.smith/RWPS/fix/oc_1500m_30km/20260722/rwps.oc_1500m_30km.msh + +## Now knit output from parallel job together and write to netcdf format +## The third argument "1" indicates to write (x,y) for destination and source nodes +## to support extrapolation + +python ConvertWeights2Netcdf.py $filein $meshfile 1 + diff --git a/ush/PreProcess/ComputeWindToRWPSInterpWeights.py b/ush/PreProcess/ComputeWindToRWPSInterpWeights.py new file mode 100644 index 0000000..87c47ac --- /dev/null +++ b/ush/PreProcess/ComputeWindToRWPSInterpWeights.py @@ -0,0 +1,168 @@ +# This is a a set of routines that interpolate wind forecasts to an unstructured +# mesh from regular or curvilinear grids (using ESMPY). In addition to interpolation +# field the out file contains a spatially variable error variance estimate based on the +# distance to the forecast boundary. This error variance is used later to update +# dispirate forecasts in a bayesian manner to yield a spatially smooth estimate +# incorporating all forecasts. The understanding is that the more local forecast +# products are of higher accuracy than the coarser broader scale forecasts + +import numpy as np +import os + +import datetime +import netCDF4 as nc +import sys +import re +import InterpUtilities as iutil + +import xarray as xr +import esmpy +import scipy.sparse as sp + +import InterpUtilities as iutil + + +#mshfl="../meshes/RWPS.V0a.small.msh" +#flin="../RWPSWrkFlw/WindBlend/wind.20260507.00X/rrfs.20260507.00.wind10m.ak.nc" + + +# Main program + +nargin = len(sys.argv) - 1 + +flin=sys.argv[1] +mshfl=sys.argv[2] + +# Don't use nearest neighbor interpolation unless 6th positive integer argument present. +# This may be needed on boundary of RWPS mesh if node alignment is outside NBM OC domain +Extrapolate=False +if nargin > 2: + if int(sys.argv[3])>0: + print("using nearest neighbor to extrapolate wind field beyond geometric coverage") + Extrapolate=True + +xi, yi, ei, zi = iutil.loadWW3Mesh(mshfl) +nn=len(xi) + +if np.mean(xi)<0: + xi=xi+360. + +data = nc.Dataset(flin,"r") +#read spaital dimensions and determine if input mesh is curvilinear or regular +x1=np.asarray(data["longitude"][:]) +y1=np.asarray(data["latitude"][:]) +if (len(x1.shape)==2 and len(y1.shape)==2): + IsCrvLn=True +elif (len(x1.shape)==1 and len(y1.shape)==1): + IsCrvLn=False +else: + print("input file spatial dimension is not right. ending program") + sys.exit() +# shift to common longitude +if np.mean(np.mean(x1))<0: + x1=x1+360. + +####################################### +# === Create weights ===# +####################################### + +meshslash=mshfl.rfind('/')+1 +dom=flin.split(".") +dom=dom[len(dom)-2] +weights_file = "InterpolationWeights."+mshfl[meshslash:len(mshfl)-3]+dom+".nc" +print("interpolation weights will be written to file = "+ weights_file) + +if IsCrvLn: + nx=x1.shape[0] + ny=x1.shape[1] +else: + nx=len(x1) + ny=len(y1) +n1=nx*ny + +print("Computing weights and saving to file: "+ weights_file) + +if not IsCrvLn: + x1 = np.tile(x1,(ny,1)) + y1 = np.tile(y1,(nx,1)).T +#Use esmpy to construct bilinear interpolation weights +iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + +####################################### +# === read weights and ===# +####################################### +with xr.open_dataset(weights_file) as ds_s: + # Standard sparse storage uses 'row', 'col', and 'S'==weights variables + row = ds_s['row'].values + col = ds_s['col'].values + weights = ds_s['S'].values + Nrows=ds_s.attrs.get('Nrows') + Ncols=ds_s.attrs.get('Ncols') +print("nn = "+str(nn)+": Nrows = "+str(Nrows)) +print("n1 = "+str(n1)+": Ncols = "+str(Ncols)) +if not ((nn==Nrows) and (n1==Ncols)): + print("Wrong matrix weights: number of rows from "+ mshfl +" = "+str(nn)+ + " but number of rows in "+ weights_file +" = "+str(Nrows)+ + ", number of spatial points in "+ flin +" = "+str(n1)+ + " but number of columns in "+ weights_file +" = "+str(Ncols) ) + print(" You probably need to remove file "+ weights_file +" and rerun to generate appropriate weights") +matrix = sp.coo_matrix((weights, (row-1, col-1)), shape=(nn,n1)).tocsr() +print("sparse interpolation matrix") +print(matrix) + +################################################################################## +# START: Extrapolate for nodes not covered by interpolator +################################################################################## +if Extrapolate: + from scipy.interpolate import NearestNDInterpolator + if not IsCrvLn: + x1 = np.tile(x1,(ny,1)) + y1 = np.tile(y1,(nx,1)).T + x1v=np.transpose(x1).reshape(n1) # vectorize src nodes, consistant with Up, Vp + y1v=np.transpose(y1).reshape(n1) + srcp = np.array((x1v,y1v)).T + srcv = 1.+x1v**2 + y1v**2 #dummy input field + #dstv = matrix @ srcv.T + row_sum = matrix.sum(axis=1) + j0=np.where( row_sum==0 ) # destination nodes with no coverage from interpolation matrix + j0=np.array(j0[0]).tolist() + dstp = np.array((xi[j0],yi[j0])).T + interpolator = NearestNDInterpolator(srcp, srcv) + distances, j0src = interpolator.tree.query(dstp) + weightsExtrp=weights.tolist().append([1.0] * len(j0) ) + rowExtrp=np.concatenate( (row, np.array(j0)) ) + colExtrp=np.concatenate( (col, np.array(j0src)) ) + weightsExtrp=np.concatenate( (weights, np.array([1.0] * len(j0))) ) + + os.replace(weights_file, "NoExtrap."+weights_file) + iutil.WriteInterpolationWeightsToNetCDF(weights_file,rowExtrp,colExtrp,weightsExtrp,len(xi),len(x1v)) + +################################################################################## +# FINISHED: Extrapolate for nodes not covered by interpolator +################################################################################## + +################################################################################## +# START: Compute distance to boundary for each node in mesh: +################################################################################## +#dist2bnd_file = "DistToBndy."+mshfl[meshslash:len(mshfl)-3]+dom+".txt" +dist2bnd_file = "DistToBndy."+mshfl[meshslash:len(mshfl)-3]+dom+".nc" + +if Extrapolate: + dist2bnd=np.full(len(xi), np.inf) #all points are inside boundary- No boundary with this type of extrapolation +else: + row_sum = matrix.sum(axis=1) + j0=np.where( row_sum==0 ) # destination nodes with no coverage from interpolation matrix + j0=np.array(j0[0]).tolist() + u0=np.ones(xi.shape) + nan=float("nan") + u0[j0]=nan + dist2bnd=iutil.CalculateDistanceToInterpEnvelope(xi,yi,u0, 1.) + +with nc.Dataset(dist2bnd_file, 'w', format='NETCDF4') as ncout: + ncout.createDimension('node' , nn) + d_var=ncout.createVariable('dist2bnd', 'f4', ('node',)) + d_var.long_name = 'distance to boundary' + d_var.units = 'km' + d_var.standard_name = 'distance to boundary' + d_var[:]=dist2bnd[:] + diff --git a/ush/PreProcess/ConvertWeights2Netcdf.py b/ush/PreProcess/ConvertWeights2Netcdf.py new file mode 100644 index 0000000..0d90d5b --- /dev/null +++ b/ush/PreProcess/ConvertWeights2Netcdf.py @@ -0,0 +1,140 @@ +import numpy as np +import netCDF4 as nc +import sys +#import GeoComputeMeshToMeshInterpWeights as mshint +import InterpUtilities as iutil +import scipy.sparse as sp + +nargin = len(sys.argv) - 1 + +flin=sys.argv[1] +mshfl=sys.argv[2] +meshslash=mshfl.rfind('/')+1 + +#AddExtrapolationSupport=False +AddExtrapolationSupport=True + +#TextWeightFl="InterpWeights."+mshfl[meshslash:len(mshfl)-4]+".stofs.txt" + +TextWeightFl=sys.argv[3] + +##flout = "InterpolationWeights."+mshfl[meshslash:len(mshfl)-4]+".stofs.nc" + +flout=TextWeightFl[0:len(TextWeightFl)-4]+".nc" + +xi, yi, ei, zi = iutil.loadWW3Mesh(mshfl) +nn_dst=len(xi) +data = nc.Dataset(flin,"r") +#read spaital dimensions and determine if input mesh is curvilinear or regular +x=np.asarray(data["x"][:]) +#convert to RWPS coordinates +jEast=np.where(x>90) +x[jEast]=x[jEast]=360. + +nn_src=len(x) + +#Read in weights from cat of text output(rows are not in order) +F=np.loadtxt(TextWeightFl) + +node_dst=F[:,0] # row number (destination node) +ele_num_src=F[:,1] # Source element number (not used) +node_src=F[:,2:5] # Source node +DistToCenterKM=F[:,5] # distance of destination node from source element center (not used) +weights=F[:,6:9] # interpolation weights from source nodes to destination node + +node_dst=node_dst.astype(int) +node_src=node_src.astype(int) +ele_num_src=ele_num_src.astype(int) + +nnz=F.shape[0] +n_s=3*nnz +row=np.zeros(n_s,dtype=int) +col=np.zeros(n_s,dtype=int) +val=np.zeros(n_s) + +n=0 +for k in range(nnz): + for j in range(3): + row[n]=node_dst[k] + col[n]=node_src[k,j] + val[n]=weights[k,j] + n=n+1 +print("n="+str(n)) +print("n_s="+str(n_s)) +n_s=n + +with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: + ncout.createDimension('n_s' , n_s) + ncout.setncattr("Nrows", nn_dst) + ncout.setncattr("Ncols", nn_src) + ncout.setncattr("SrcFieldType", "unstructured") + + r_var=ncout.createVariable('row', 'i4', ('n_s',)) + r_var.long_name = 'row index' + r_var[:]=row[:] + + c_var=ncout.createVariable('col', 'i4', ('n_s',)) + c_var.long_name = 'column index' + c_var[:]=col[:] + + s_var=ncout.createVariable('S', 'f8', ('n_s',)) + s_var.long_name = 'matrix value' + s_var[:]=val[:] + +#Consider adding (x,y) destination and (x,y) for source. This is usefull for extrapolation + if AddExtrapolationSupport: + x=np.asarray(data["x"][:]) + y=np.asarray(data["y"][:]) + ncout.createDimension('nn_src' , nn_src) + ncout.createDimension('nn_dst' , nn_dst) + + xsrc_var=ncout.createVariable('x_src', 'f8', ('nn_src',)) + xsrc_var.long_name = 'interpolation source node longitude' + xsrc_var[:]=x[:] + + ysrc_var=ncout.createVariable('y_src', 'f8', ('nn_src',)) + ysrc_var.long_name = 'interpolation source node latitude' + ysrc_var[:]=y[:] + + xdst_var=ncout.createVariable('x_dst', 'f8', ('nn_dst',)) + xdst_var.long_name = 'interpolation destination node longitude' + xdst_var[:]=xi[:] + + ydst_var=ncout.createVariable('y_dst', 'f8', ('nn_dst',)) + ydst_var.long_name = 'interpolation destination node latitude' + ydst_var[:]=yi[:] + + zdst_var=ncout.createVariable('depth_dst', 'f8', ('nn_dst',)) + zdst_var.long_name = 'interpolation destination node latitude' + zdst_var[:]=zi[:] + +#Extrapolate=False +Extrapolate=sys.argv[4] + +if Extrapolate: + dist2bnd=np.full(len(xi), np.inf) #all points are inside boundary- No boundary with this type of extrapolation +else: + matrix = sp.coo_matrix((weights, (row-1, col-1)), shape=(nn_src,nn_dst)).tocsr() + row_sum = matrix.sum(axis=1) + j0=np.where( row_sum==0 ) # destination nodes with no coverage from interpolation matrix + j0=np.array(j0[0]).tolist() + u0=np.ones(xi.shape) + nan=float("nan") + u0[j0]=nan + dist2bnd=iutil.CalculateDistanceToInterpEnvelope(xi,yi,u0, 1.) + +dist2bnd_file = "DistToBndy."+mshfl[meshslash:len(mshfl)-4]+".stofs.nc" +with nc.Dataset(dist2bnd_file, 'w', format='NETCDF4') as ncout: + ncout.createDimension('node' , nn_dst) + d_var=ncout.createVariable('dist2bnd', 'f4', ('node',)) + d_var.long_name = 'distance to boundary' + d_var.units = 'km' + d_var.standard_name = 'distance to boundary' + d_var[:]=dist2bnd[:] + + z_var=ncout.createVariable('depth', 'f4', ('node',)) + z_var.long_name = 'mesh depth' + z_var.units = 'm' + z_var.standard_name = 'depth' + z_var[:]=zi[:] + diff --git a/ush/PreProcess/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh b/ush/PreProcess/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh new file mode 100644 index 0000000..8bea1a7 --- /dev/null +++ b/ush/PreProcess/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh @@ -0,0 +1,97 @@ +#!/bin/sh + +date=$1 +cycl=$2 +mesh=$3 + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +jobcard="PreProcess.RWPS.$1.$2.jobcard" +outputfile="PreProcess.RWPS.$1.$2.out" + +rm $jobcard + +echo "#!/bin/sh" > $jobcard +echo "#PBS -q dev" >> $jobcard +echo "#PBS -l walltime=00:59:00" >> $jobcard +echo "#PBS -A GLWU-DEV" >> $jobcard +echo "#PBS -N RWPS.PreProc" >> $jobcard +echo "#PBS -j oe" >> $jobcard +echo "#PBS -l select=1:ncpus=4:mem=64GB" >> $jobcard +echo "#PBS -o RWPS.PreProc.out" >> $jobcard +echo " " >> $jobcard + +curdir=$(pwd) +echo "cd $curdir" >> $jobcard + + +echo " " >> $jobcard + +# Setup and load modules +echo "module load PrgEnv-intel/8.1.0" >> $jobcard +echo "module load craype/2.7.8" >> $jobcard +echo "module load intel/19.1.3.304" >> $jobcard +echo "module load cfp/2.0.4" >> $jobcard +echo "module load prod_util/2.0.8" >> $jobcard +echo "module load prod_envir/2.0.5" >> $jobcard +echo " " >> $jobcard + +echo "date=$1" >> $jobcard +echo "cycl=$2" >> $jobcard +echo "mesh=$3" >> $jobcard +echo " " >> $jobcard + +echo "meshname=$meshname" >> $jobcard +echo " " >> $jobcard + +echo "rm FetchWinds.out ProcWinds.out FetchCurrents.out ProcCurrents.out FetchWaterLevel.out ProcWaterLevel.out" >> $jobcard +echo " " >> $jobcard + + +# At present RTOFS ice files are missing time information (MT==0) so ProcessIce.sh will fail at the time interpolation step +#echo "(" >> $jobcard +#echo " sh GetIce.sh $date $cycl > FetchIce.out" >> $jobcard +#echo " sh ProcessIce.sh $date $cycl $mesh > ProcIce.out" >> $jobcard +#echo ")&" >> $jobcard +#echo " " >> $jobcard + + + + +echo "(" >> $jobcard +echo " sh GetWaterLevel.sh $date $cycl > FetchWaterLevel.out" >> $jobcard +echo " sh ProcessWaterLevel.sh $date $cycl $mesh > ProcWaterLevel.out" >> $jobcard +echo ")&" >> $jobcard +echo " " >> $jobcard + +echo "(" >> $jobcard +echo " sh GetWinds.sh $date $cycl > FetchWinds.out" >> $jobcard +echo " sh ProcessWinds.sh $date $cycl $mesh > ProcWinds.out" >> $jobcard +echo ")&" >> $jobcard +echo " " >> $jobcard + +echo "(" >> $jobcard +echo " sh GetCurrents.sh $date $cycl > FetchCurrents.out" >> $jobcard +echo " sh ProcessCurrents.sh $date $cycl $mesh > ProcCurrents.out" >> $jobcard + +#ProcessIce Needs Time Variables from rtofs currents files +echo " sh GetIce.sh $date $cycl > FetchIce.out" >> $jobcard +echo " sh ProcessIce.sh $date $cycl $mesh > ProcIce.out" >> $jobcard +echo ")&" >> $jobcard +echo " " >> $jobcard +echo " " >> $jobcard + +echo "wait" >> $jobcard +echo " " >> $jobcard +echo "cp $meshname.$date.$cycl.cwl.stofs.nc $meshname.$date.$cycl.waterlevel.nc" >> $jobcard +echo "cp $meshname.$date.$cycl.vel.stofsxrtofs.nc $meshname.$date.$cycl.current.nc" >> $jobcard +echo "cp rwps_winds.$meshname.$date.$cycl/rwps.est.$meshname.$date.$cycl.wind10m.nc $meshname.$date.$cycl.wind.nc" >> $jobcard +echo "cp $meshname.$date.$cycl.ice.rtofsxnbm.nc $meshname.$date.$cycl.ice.nc" >> $jobcard +echo " " >> $jobcard + +##Below is only needed because of missing rtofs ice time +## remove and move this to GetRTOFS.sh and GetRTOFSIce.sh +## echo "rm -rf tmp.rtofs*.$date" >> $jobcard + +qsub $jobcard > $outputfile diff --git a/ush/PreProcess/GetAllFocing.jobcard.sh b/ush/PreProcess/GetAllFocing.jobcard.sh new file mode 100644 index 0000000..f2786b0 --- /dev/null +++ b/ush/PreProcess/GetAllFocing.jobcard.sh @@ -0,0 +1,80 @@ +#!/bin/sh + +date=$1 +cycl=$2 +mesh=$3 + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +jobcard="PreProcess.RWPS.$1.$2.jobcard" +outputfile="PreProcess.RWPS.$1.$2.out" + +rm $jobcard + +echo "#!/bin/sh" > $jobcard +echo "#PBS -q dev" >> $jobcard +echo "#PBS -l walltime=00:59:00" >> $jobcard +echo "#PBS -A GLWU-DEV" >> $jobcard +echo "#PBS -N RWPS.PreProc" >> $jobcard +echo "#PBS -j oe" >> $jobcard +echo "#PBS -l select=1:ncpus=4:mem=64GB" >> $jobcard +echo "#PBS -o RWPS.PreProc.out" >> $jobcard +echo " " >> $jobcard +echo "cd /lfs/h2/emc/couple/noscrub/keston.smith/RWPSInterpolationUtilities" >> $jobcard +echo " " >> $jobcard + +# Setup and load modules +echo "module load PrgEnv-intel/8.1.0" >> $jobcard +echo "module load craype/2.7.8" >> $jobcard +echo "module load intel/19.1.3.304" >> $jobcard +echo "module load cfp/2.0.4" >> $jobcard +echo "module load prod_util/2.0.8" >> $jobcard +echo "module load prod_envir/2.0.5" >> $jobcard +echo " " >> $jobcard + +echo "date=$1" >> $jobcard +echo "cycl=$2" >> $jobcard +echo "mesh=$3" >> $jobcard +echo " " >> $jobcard + +echo "meshname=$meshname" >> $jobcard +echo " " >> $jobcard + +echo "rm FetchWinds.out ProcWinds.out FetchCurrents.out ProcCurrents.out FetchWaterLevel.out ProcWaterLevel.out" >> $jobcard +echo " " >> $jobcard + + +# At present RTOFS ice files are missing time information (MT==0) so ProcessIce.sh will fail at the time interpolation step +echo "(" >> $jobcard +echo " sh GetIce.sh $date $cycl > FetchIce.out" >> $jobcard +echo " sh ProcessIce.sh $date $cycl $mesh > ProcIce.out" >> $jobcard +echo ")&" >> $jobcard +echo " " >> $jobcard + + +echo "(" >> $jobcard +echo " sh GetWaterLevel.sh $date $cycl > FetchWaterLevel.out" >> $jobcard +echo " sh ProcessWaterLevel.sh $date $cycl $mesh > ProcWaterLevel.out" >> $jobcard +echo ")&" >> $jobcard +echo " " >> $jobcard + +echo "(" >> $jobcard +echo " sh GetWinds.sh $date $cycl > FetchWinds.out" >> $jobcard +echo " sh ProcessWinds.sh $date $cycl $mesh > ProcWinds.out" >> $jobcard +echo ")&" >> $jobcard +echo " " >> $jobcard + +echo "(" >> $jobcard +echo " sh GetCurrents.sh $date $cycl > FetchCurrents.out" >> $jobcard +echo " sh ProcessCurrents.sh $date $cycl $mesh > ProcCurrents.out" >> $jobcard +echo ")&" >> $jobcard +echo " " >> $jobcard + +echo "wait" >> $jobcard +echo " " >> $jobcard +echo "cp $meshname.$date.$cycl.cwl.stofs.nc $meshname.$date.$cycl.waterlevel.nc" >> $jobcard +echo "cp $meshname.$date.$cycl.vel.stofsxrtofs.nc $meshname.$date.$cycl.current.nc" >> $jobcard +echo "cp rwps_winds.$meshname.$date.$cycl/rwps.est.$meshname.$date.$cycl.wind10m.nc $meshname.$date.$cycl.wind.nc" >> $jobcard + +qsub $jobcard > $outputfile diff --git a/ush/PreProcess/GetAllFocing.sh b/ush/PreProcess/GetAllFocing.sh new file mode 100644 index 0000000..0ff36d7 --- /dev/null +++ b/ush/PreProcess/GetAllFocing.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +# Setup and load modules +module load PrgEnv-intel/8.1.0 +module load craype/2.7.8 +module load intel/19.1.3.304 +module load cfp/2.0.4 +module load prod_util/2.0.8 +module load prod_envir/2.0.5 + +# 0.a Set necessary variables + +# This script retrieves and processes forcing for a forecast period +date=$1 +cycl=$2 +mesh=$3 + + +##date=20260707 +##cycl=00 +##mesh="../meshes/RWPS.V0a.small.msh" + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +echo "retrieving and processing RWPS forcing for $date z$cycl for WW3 mesh $mesh" + +rm FetchWinds.out ProcWinds.out FetchCurrents.out ProcCurrents.out FetchWaterLevel.out ProcWaterLevel.out + +( + echo "retrieving nbm and rrfs winds for $date z$cycl" + sh GetWinds.sh $date $cycl > FetchWinds.out + echo "processing winds for $date z$cycl for $mesh" + sh ProcessWinds.sh $date $cycl $mesh > ProcWinds.out +)& + +( + echo "retrieving rtofs and stofs currents for $date z$cycl" + sh GetCurrents.sh $date $cycl > FetchCurrents.out + echo "processing currents for $date z$cycl for $mesh" + sh ProcessCurrents.sh $date $cycl $mesh > ProcCurrents.out +)& + +( + echo "retrieving stofs water level for $date z$cycl" + sh GetWaterLevel.sh $date $cycl > FetchWaterLevel.out + echo "processing water level for $date z$cycl for $mesh" + sh ProcessWaterLevel.sh $date $cycl $mesh > ProcWaterLevel.out +)& + +wait +echo "Finished preprocessing for $date z$cycl for $mesh" + +cp $meshname.$date.$cycl.vel.stofsxrtofs.nc $meshname.$date.$cycl.current.nc +echo "current forcing file: $meshname.$date.$cycl.current.nc" + +cp $meshname.$date.$cycl.cwl.stofs.nc $meshname.$date.$cycl.waterlevel.nc +echo "water level forcing file: $meshname.$date.$cycl.watterlevel.nc" + +cp rwps_winds.$meshname.$date.$cycl/rwps.est.$meshname.$date.$cycl.wind10m.nc $meshname.$date.$cycl.wind.nc +echo "wind forcing file: $meshname.$date.$cycl.wind.nc" + diff --git a/ush/PreProcess/GetCurrents.sh b/ush/PreProcess/GetCurrents.sh new file mode 100644 index 0000000..2cf5230 --- /dev/null +++ b/ush/PreProcess/GetCurrents.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# This script retrieves rtofs and stofs as netcdf files + + +date=$1 +cycl=$2 +source ./rwpsenv +rtofs/GetRTOFS.sh $date & +stofs/GetSTOFS.sh $date $cycl current& +wait; diff --git a/ush/PreProcess/GetIce.sh b/ush/PreProcess/GetIce.sh new file mode 100644 index 0000000..18299cc --- /dev/null +++ b/ush/PreProcess/GetIce.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# This script retrieves rtofs and stofs as netcdf files + + +date=$1 +cycl=$2 +source ./rwpsenv +rtofs/GetRTOFSIce.sh $date $cycl & +nbm/GetNBMIce.sh $date $cycl & +wait; diff --git a/ush/PreProcess/GetWaterLevel.sh b/ush/PreProcess/GetWaterLevel.sh new file mode 100644 index 0000000..da54b58 --- /dev/null +++ b/ush/PreProcess/GetWaterLevel.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +## This script retrieves stofs water level as netcdf file + +#date=$1 +#cycl=$2 +curdir=$(pwd) +echo $curdir +source ./rwpsenv + +stofs/GetSTOFS.sh $date $cycl waterlevel diff --git a/ush/PreProcess/GetWinds.sh b/ush/PreProcess/GetWinds.sh new file mode 100644 index 0000000..811dac4 --- /dev/null +++ b/ush/PreProcess/GetWinds.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +# This script retrieves rrfs and nbm winbds and exports as +# netcdf files +#date=$1 +#cycl=$2 + +source ./rwpsenv + +echo "retrieving winds from rrfs and nbm for rwps wind" +( + echo "sh nbm/MakeNBMWind.sh $date $cycl oc > nbm.oc.out" + nbm/MakeNBMWind.sh $date $cycl oc > nbm.oc.out + echo "retrieved winds from nbm oc domain" + echo "Not retrieving other nbm domain winds" +)& + +( + echo "sh rrfs/MakeRRFSWind.sh $date $cycl na > rrfs.na.out" + rrfs/MakeRRFSWind.sh $date $cycl na > rrfs.na.out + echo "retrieved winds from rrfs na domain" +)& + +( + echo "sh rrfs/MakeRRFSWind.sh $date $cycl ak > rrfs.ak.out" + rrfs/MakeRRFSWind.sh $date $cycl ak > rrfs.ak.out + echo "retrieved winds from rrfs ak domain" +)& + +( + echo "sh rrfs/MakeRRFSWind.sh $date $cycl pr > rrfs.pr.out" + rrfs/MakeRRFSWind.sh $date $cycl pr > rrfs.pr.out + echo "retrieved winds from rrfs pr domain" +)& + +( + echo "sh rrfs/MakeRRFSWind.sh $date $cycl hi > rrfs.hi.out" + rrfs/MakeRRFSWind.sh $date $cycl hi > rrfs.hi.out + echo "retrieved winds from rrfs hi domain" +)& + +( + echo "sh rrfs/MakeRRFSWind.sh $date $cycl conus > rrfs.conus.out" + rrfs/MakeRRFSWind.sh $date $cycl conus > rrfs.conus.out + echo "retrieved winds from rrfs conus domain" +)& +wait + +echo "finished retrieving winds from rrfs and nbm for rwps wind" + diff --git a/ush/PreProcess/InterpTime.py b/ush/PreProcess/InterpTime.py new file mode 100644 index 0000000..d438977 --- /dev/null +++ b/ush/PreProcess/InterpTime.py @@ -0,0 +1,159 @@ +import os +import argparse +import numpy as np +import netCDF4 as nc +import sys +import math + +from scipy.interpolate import interp1d + +nargin = len(sys.argv) - 1 + +flin=sys.argv[1] +flinNewTimes=sys.argv[2] +flout=sys.argv[3] + +varname0=sys.argv[4] +varname=varname0.split(":") +nvar=len(varname) + +# If InterpSecondFile is True interpolate the values from the second file are interpolated to the common time points +# and extrapolate (via persistance) for all times beyond the range of time from the second file + +InterpSecondFile=False +if nargin>4: + InterpSecondFile=eval(sys.argv[5]) + print("Interpolating fields from second file: "+str(InterpSecondFile)+" and extrapolating via persistance in time") + +#might want to rewrite with an input file to derive full set of times +print("running InterpTime.py: takes a forecast (arg1="+flin+") and interpolates to times ") +print("in another file (arg2="+flinNewTimes+"). The origonal and interpoated values are output to ") +print("a new file(arg3="+flout+") .") +print("interpolating for variables:") +for jv in range(nvar): + print(varname[jv]) + +data0 = nc.Dataset(flin,"r") +t=np.asarray(data0["time"][:]) + +data1 = nc.Dataset(flinNewTimes,"r") +t1=np.asarray(data1["time"][:]) + +#make sorted union of times in both forecasts +tf = np.union1d(t, t1) + +#eliminate times occuring outside the range of arg1 to avoid extrapolation +j=np.where( np.logical_and( tf>=np.min(t) , tf<=np.max(t) ) ) +print(j) +j=j[0].tolist() +tf=tf[j] + +print("Initial times:") +print(t) +print("New times:") +print(tf) + +nt=len(tf) + +x=np.asarray(data0["longitude"][:]) +y=np.asarray(data0["latitude"][:]) +e=np.asarray(data0["tri"][:,:]) +print("e") +print(e) +print(e.shape) +nn=len(x) +ne=e.shape[1] +noel=e.shape[0] + +InterpolatedVariables=np.zeros((nvar,nt,nn)) + +IsExtrap=False +if InterpSecondFile: + t=t1 + data=data1 + IsExtrap=True +else: + data=data0 + +ntt=len(t) +#unique_vals, indices = np.unique(arr, return_index=True) +tu,indx=np.unique(t,return_index=True) +for jv in range(nvar): + u=np.asarray(data[varname[jv]][:,:]) + fill_value0 = data[varname[jv]]._FillValue + nan=float('nan') + jb=np.where(u==fill_value0) + u[jb]=nan + +#set up interpolator for u +# fi = interp1d(t, u, axis=0, kind='linear') +# fi = interp1d(t, u, axis=0, kind='linear',fill_value=np.nan) +# fi = interp1d(tu, u[indx,:], axis=0, kind='linear',fill_value=np.nan) + if IsExtrap: + fi = interp1d(tu, u[indx,:], axis=0, kind='linear',fill_value="extrapolate") #extrapolated values will be overwritten + else: + fi = interp1d(tu, u[indx,:], axis=0, kind='linear') + uf=fi(tf) + + #re-insert initial values at times that match initial time points + print("Interpolation compleate: now re-insert initial values at times that match initial time points") + print("to remove small interpolation artifacts") + for k in range(nt): + j=np.where(tf[k]==t) + j=j[0].tolist() + print("new time index: "+str(k)+" is same as old time index:"+str(j)) + if len(j)>0: + print("mapping exactly back to origonal values at time: "+str(tf[k])) + j=j[0] + uf[k,:]=u[j,:] + + if IsExtrap: + jExtrapEarly=np.where(tft[ntt-1]) + for jxtrp in range(len(jExtrapLate)): + uf[jExtrapLate[jxtrp],:]=u[ntt-1,:] + + InterpolatedVariables[jv,:,:]=uf[:,:] + +import InterpUtilities as iutil +with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: + + ncout.createDimension('level' , 1) + ncout.createDimension('node' , nn) + ncout.createDimension('element' , ne) + ncout.createDimension('time', nt) + ncout.createDimension('noel', 3) + + lon_var=ncout.createVariable('longitude', 'f8', ('node',)) + lon_var.units = 'degree_east' + lon_var.long_name = 'longitude' + lon_var.standard_name = 'longitude' + lon_var.axis = 'X' + lon_var[:]=x[:] + + lat_var=ncout.createVariable('latitude', 'f8', ('node',)) + lat_var.units = 'degree_north' + lat_var.long_name = 'latitude' + lat_var.standard_name = 'latitude' + lat_var.axis = 'Y' + lat_var[:]=y[:] + + time_var0=data0["time"] + time_var=ncout.createVariable('time', 'f8', ('time',)) + iutil.CopyAttributes(time_var0, time_var) + time_var[:]=tf[:] + + tri_var=ncout.createVariable('tri', 'i4', ('noel','element',)) + tri_var.long_name = 'element list' + tri_var.standard_name = 'element list' + tri_var[:,:]=e + + #Copy attributes from old file to new + for jv in range(nvar): + var=data0[varname[jv]] + f_var=ncout.createVariable(varname[jv], 'f4', ('time','node')) + iutil.CopyAttributes(var, f_var) + f_var[:,:]=InterpolatedVariables[jv,:,:] + ncout.close diff --git a/ush/PreProcess/InterpUtilities.py b/ush/PreProcess/InterpUtilities.py new file mode 100644 index 0000000..7770fb8 --- /dev/null +++ b/ush/PreProcess/InterpUtilities.py @@ -0,0 +1,799 @@ +from scipy.interpolate import RegularGridInterpolator +from scipy.sparse import csr_matrix +from scipy.sparse.csgraph import connected_components + +from datetime import datetime +import numpy as np +import netCDF4 as nc +import sys +import re + +#Convert Time to "seconds since 1970-01-01 00:00:00.0" +#eg 'seconds since 2024-04-04 12:00:00 ! NCDASE - BASE_DAT' +def ConvertTimeToUnixTime(flin,TimeVarName = None): + if TimeVarName == None: + TimeVarName="time" + data = nc.Dataset(flin,"r") + #print("TimeVarName = "+TimeVarName) + timevar=data[TimeVarName] + time=np.asarray(data[TimeVarName][:]) + epoch_1970 = datetime(1970, 1, 1, 0, 0, 0) + TimeUnitsString=timevar.units + TimeUnitsStrings=TimeUnitsString.split(" ") + tunits=TimeUnitsStrings[0] + dstr=TimeUnitsStrings[2] + dstr=dstr.split("-") + tstr=TimeUnitsStrings[3] + tstr=tstr.split(":") + print(dstr) + print(tstr) + secstr=tstr[2].rsplit(".", 1)[0] + base_date = datetime(int(dstr[0]),int(dstr[1]),int(dstr[2]),int(tstr[0]),int(tstr[1]),int(secstr)) + #base_date = datetime(int(dstr[0]),int(dstr[1]),int(dstr[2]),int(tstr[0]),int(tstr[1]),int(tstr[2])) + base_offset = int((base_date - epoch_1970).total_seconds()) + if tunits=="seconds": + unix_time = time + base_offset + if tunits=="days": + unix_time = time*24*60*60 + base_offset + if tunits=="hours": + unix_time = time*60*60 + base_offset + return unix_time + +def loadWW3Mesh(fl): + print("mesh file="+fl) + f=open(fl, 'r') + header = f.readline() + header = f.readline() + header = f.readline() + header = f.readline() + header = f.readline() # number of nodes + nn=int(header) + print("nn = "+str(nn)) + xi=np.zeros(nn) + yi=np.zeros(nn) + zi=np.zeros(nn) + k=0 + for i in range(nn): + A = f.readline() + B=A.lstrip() + values = B.split(" ") +# print(values) + if len(values)>5: + xi[k]=values[2] + yi[k]=values[4] + zi[k]=values[6] + else: + xi[k]=values[1] + yi[k]=values[2] + zi[k]=values[3] + k=k+1 + print("number of nodes read: "+str(k)) + header = f.readline() + header = f.readline() + header = f.readline() # number of elements + ne=int(header)#includes boundary nodes and actual elements + print("ne="+str(ne)+" -includes boundary nodes") + nbnd=0 + bnd=[] + eix=np.zeros((ne,3), dtype=int) + k=0 + for i in range(ne): + A = f.readline() + #print(A) + values = A.split(" ") + #print(values) + if len(values) == 6: + if int(values[2])==2: + bnd.append(int(values[5])) + nbnd=nbnd+1 + if len(values)>15: + eix[k,0]=int(values[12]) + eix[k,1]=int(values[14]) + eix[k,2]=int(values[16]) + k=k+1 + elif len(values)>7: + eix[k,0]=int(values[6]) + eix[k,1]=int(values[7]) + eix[k,2]=int(values[8]) + k=k+1 + ei=eix[range(k),:] + print("number of open boundary nodes read: "+str(nbnd)) + print("number of elements read: "+str(k)) + return xi, yi, ei, zi + + +import numpy as np +from scipy.interpolate import griddata +#import matplotlib.pyplot as plt + +def interpolate_curvilinear_to_points(lon_in, lat_in, data_in, lon_out, lat_out): + """ + Performs bilinear-equivalent interpolation from a curvilinear grid to new points. + + Args: + lon_in (np.ndarray): 2D array of input longitudes. + lat_in (np.ndarray): 2D array of input latitudes. + data_in (np.ndarray): 2D array of data values corresponding to (lon_in, lat_in). + lon_out (np.ndarray or list): Longitudes of the target points. + lat_out (np.ndarray or list): Latitudes of the target points. + + Returns: + np.ndarray: Interpolated data values at the target points. + """ + # Flatten the input coordinates and data into 1D arrays + # griddata expects points as a list of (x, y) tuples or a 2D array + points_in = np.vstack((lon_in.flatten(), lat_in.flatten())).T + values_in = data_in.flatten() + + # Define the target points + points_out = np.vstack((lon_out, lat_out)).T + + # Perform the interpolation using scipy.interpolate.griddata with 'linear' method + # The 'linear' method in griddata is the appropriate choice for curvilinear data + # as it uses triangulation. + interpolated_data = griddata(points_in, values_in, points_out, method='linear') + + return interpolated_data + + +def interpolate_curvilinear_to_pointsMD(lon_in, lat_in, data_in, lon_out, lat_out): + """ + Performs bilinear-equivalent interpolation from a curvilinear grid to new points. + + Args: + lon_in (np.ndarray): 2D array of input longitudes. + lat_in (np.ndarray): 2D array of input latitudes. + data_in (np.ndarray): 3D array of data values corresponding to (lon_in, lat_in, ntimes). + lon_out (np.ndarray or list): Longitudes of the target points. + lat_out (np.ndarray or list): Latitudes of the target points. + + Returns: + np.ndarray: Interpolated data values at the target points (length(lon_out/lat_out x ntimes)). + """ + # Flatten the input coordinates and data into 1D arrays + # griddata expects points as a list of (x, y) tuples or a 2D array + points_in = np.vstack((lon_in.flatten(), lat_in.flatten())).T + + shp=data_in.shape + print(shp) + nx=shp[0] + ny=shp[1] + nt=shp[2] + + ns=nx*ny + S=np.zeros((ns,nt)) + s0=np.zeros((nx,ny)) + for k in range(nt): + s0[:,:]=np.transpose(data_in[:,:,k]) + S[:,k] = s0.flatten() + + # Define the target points + points_out = np.vstack((lon_out, lat_out)).T + + # Perform the interpolation using scipy.interpolate.griddata with 'linear' method + # The 'linear' method in griddata is the appropriate choice for curvilinear data + # as it uses triangulation. + interpolated_data = griddata(points_in, S, points_out, method='linear') + + return interpolated_data + + +def interpolate_curvilinear_to_pointsRRFS(lon_in, lat_in, data_in, lon_out, lat_out): + """ + Performs bilinear-equivalent interpolation from a curvilinear grid to new points. + + Args: + lon_in (np.ndarray): 2D array of input longitudes. + lat_in (np.ndarray): 2D array of input latitudes. + data_in (np.ndarray): 3D array of data values corresponding to (lon_in, lat_in, ntimes). + lon_out (np.ndarray or list): Longitudes of the target points. + lat_out (np.ndarray or list): Latitudes of the target points. + + Returns: + np.ndarray: Interpolated data values at the target points (length(lon_out/lat_out x ntimes)). + """ + # Flatten the input coordinates and data into 1D arrays + # griddata expects points as a list of (x, y) tuples or a 2D array + + points_in = np.vstack((lon_in.flatten(), lat_in.flatten())).T + # points_in = np.hstack((lon_in.flatten(), lat_in.flatten())) + + shp=data_in.shape + print(shp) + nx=shp[0] + ny=shp[1] + nt=shp[2] + + ns=nx*ny + S=np.zeros((ns,nt)) + #s0=np.zeros((nx,ny)) + s0=np.zeros((ny,nx)) + for k in range(nt): + s0[:,:]=np.transpose(data_in[:,:,k]) + #s0[:,:]=data_in[:,:,k] + S[:,k] = s0.flatten() + + # Define the target points + points_out = np.vstack((lon_out, lat_out)).T + + # Perform the interpolation using scipy.interpolate.griddata with 'linear' method + # The 'linear' method in griddata is the appropriate choice for curvilinear data + # as it uses triangulation. + print(S.shape) + print(points_in) + print(points_out) + + interpolated_data = griddata(points_in, S, points_out, method='linear') + + return interpolated_data + +def CopyAttributes(VarOld, VarNew): + #Copy attributes from old NetCDF file variable to new NetCDF file variable + att_names = VarOld.ncattrs() + for jatt in range(len(att_names)): + att_name=att_names[jatt] + if (not (att_name=="_FillValue")): + att_value = VarOld.getncattr(att_name) + VarNew.setncattr(att_name, att_value) + return + + +############################################################################################ +# BEGIN WIND TO RWPS INTERP ROUTINES +import esmpy +import scipy.sparse as sp + +def CurvilinearGridCreateInterpWeights(xi,yi,x1,y1, weights_file): +# Compute interpolation weights to interpolate from curvilinear grid (x1,y1) to points (xi,yi) +# and store in netcdf file using ESMPY + nx,ny=x1.shape + nn=len(xi) + n1=nx*ny + src_lon = x1 + src_lat = y1 + dst_lon=np.zeros((1,nn)) + dst_lat=np.zeros((1,nn)) + print("nn="+str(nn)) + dst_lon[0,:] = xi[:] + dst_lat[0,:] = yi[:] + + esmpy.Manager() + + src_grid = esmpy.Grid( + max_index=np.array([src_lon.shape[0], src_lon.shape[1]]), + staggerloc=esmpy.StaggerLoc.CENTER, + coord_sys=esmpy.CoordSys.SPH_DEG + ) + + dst_grid = esmpy.Grid( + max_index=np.array([nn, 1]), + staggerloc=esmpy.StaggerLoc.CENTER, + coord_sys=esmpy.CoordSys.SPH_DEG + ) + + # 4. Populate the coordinate data + src_lon_ptr = src_grid.get_coords(0) + src_lat_ptr = src_grid.get_coords(1) + src_lon_ptr[...] = src_lon + src_lat_ptr[...] = src_lat + + dst_lon_ptr = dst_grid.get_coords(0) + dst_lat_ptr = dst_grid.get_coords(1) + dst_lon_ptr[...] = dst_lon.T + dst_lat_ptr[...] = dst_lat.T + + # 5. Create esmpy Fields + src_field = esmpy.Field(src_grid, name="src_field") + dst_field = esmpy.Field(dst_grid, name="dst_field") +# src_field.data[...]=np.sqrt(x1/180)/(90+y1) # arbitrary function of x,y + src_field.data[...]=np.sqrt(np.abs(x1/180))/(90+y1) # arbitrary function of x,y + + np.savetxt('F.txt', src_field.data[...]) + np.savetxt('X.txt', x1) + np.savetxt('Y.txt', y1) + print(f"Creating weights: {weights_file}") + regrid = esmpy.Regrid( + src_field, + dst_field, + filename=weights_file, + regrid_method=esmpy.RegridMethod.BILINEAR, + ignore_degenerate=True, # <--- Add this parameter + unmapped_action=esmpy.UnmappedAction.IGNORE # Optional: Ignores missing/masked points + ) +#Add number of rows and columns to weights file for clarity when constructing sparse matrix for interpolation + with nc.Dataset(weights_file, mode="a") as ds: + ds.Nrows = nn + ds.Ncols = n1 + + np.savetxt('Fi.txt', dst_field.data[...]) + np.savetxt('xi.txt', xi) + np.savetxt('yi.txt', yi) + + return + +def CalculateDistanceToBoundary(xi,yi,x1,y1): +# Distance to boundary calculation for use when interpolation envelope corresponds with +# interior of curvilinear grid boundary. +# +# Inputs: +# xi (nn): longitude of unstructured mesh nodes +# yi (nn): latitude of unstructured mesh nodes +# x1 (nx x ny): longitude for interpoltated field +# y1 (nx x ny): latitude for interpoltated field +# +# Outputs: +# dist2bnd (nn) : distance to edge of interpolation envelope. + nx=x1.shape[0] + ny=x1.shape[1] + xb=np.hstack((x1[1,:],x1[:,ny-1].T,x1[nx-1,:],x1[:,1].T)) + yb=np.hstack((y1[1,:],y1[:,ny-1].T,y1[nx-1,:],y1[:,1].T)) + np.savetxt('xbyb.txt', np.vstack((xb,yb))) + dist2bnd=np.zeros(nn) + for k in range(nn): + dist2bnd[k]=QuickDistance(yi[k],xi[k],yb,xb) + if k%10000==0: + print("calculating distance to boundary, "+str(k)+":"+ str(nn)+":"+str(k/nn) ) + return dist2bnd + +def CalculateDistanceToInterpEnvelope(xi,yi,fi,SearchWidth): +# Alternative distance to boundary calculation for use when interpolation envelope is +# distinctly interior to curvilinear grid boundary as happens for RRFS NA grid +# +# Inputs: +# xi (nn): longitude of unstructured mesh nodes +# yi (nn): latitude of unstructured mesh nodes +# fi (nn): interpolated field on mesh nodes with 'nan' values outside of interpolation envelope +# SearchWidth: Computational speed up to remove extra search points in distance to boundary +# +# Outputs: +# dist2bnd (nn) : distance to edge of interpolation envelope. dist2bnd[k]=0 if (xi[k],yi[k]) is outside +# of the interpolation envelope + nn=len(xi) + #dist2bnd=np.zeros(nn) + dist2bnd=np.full(nn,np.nan) + jin = np.where(~np.isnan(fi))[0].tolist()#points inside interpolation envelope + jout = np.where(np.isnan(fi))[0].tolist() #points outside interpolation envelope + xin=xi[jin] + yin=yi[jin] + xout=xi[jout] + yout=yi[jout] + jxU=np.where( xout < np.max(xin)+SearchWidth )[0].tolist() + jxD=np.where( xout > np.min(xin)-SearchWidth )[0].tolist() + jyU=np.where( yout < np.max(yin)+SearchWidth )[0].tolist() + jyD=np.where( yout > np.min(yin)-SearchWidth )[0].tolist() + j=list( set(jxU) & set(jxD) & set(jyU) & set(jyD) ) + xout=xout[j] + yout=yout[j] + din=np.zeros(len(jin)) + print(len(xin)) + print(len(xout)) + for k in range(len(xin)): + din[k]=QuickDistance(yin[k],xin[k],yout,xout) # distance from node to closest point not interpolated to + if k%10000==0: + print("calculating distance to boundary, "+str(k)+":"+ str(nn)+":"+str(k/nn) ) + dist2bnd[jin]=din + return dist2bnd + +#END WIND TO RWPS Utils + +def QuickDistance(lat1, lon1, lats2, lons2): + deg2kmY=111. + deg2kmX=np.cos( np.pi * lat1 / 180.)*deg2kmY + d= np.min( np.sqrt( ( (lat1-lats2)*deg2kmY)**2 + ((lon1-lons2)*deg2kmX)**2 ) ) + return d + +def VarianceLinearDistanceToBndy(DistanceToBoundary, InteriorVariance, VarianceOnBoundary, LengthScale): + InteriorNodeList=np.where(DistanceToBoundary**2 >= 0 ) + Variance=np.zeros(len(DistanceToBoundary))+np.inf + SpatialFunction=DistanceToBoundary/LengthScale + j=np.where(SpatialFunction>1.) + SpatialFunction[j]=1. + Variance[InteriorNodeList] = VarianceOnBoundary + ( InteriorVariance - VarianceOnBoundary ) * SpatialFunction[InteriorNodeList] + return Variance + +def VarianceInverseDistanceToBndy( DistanceToBoundary, InteriorVariance, LengthScale): + InteriorNodeList=np.where(DistanceToBoundary**2 >= 0 ) + Variance=np.zeros(len(DistanceToBoundary))+np.inf + SpatialFunction=LengthScale / DistanceToBoundary + j=np.where(SpatialFunction>1.) + SpatialFunction[j]=1. + Variance[InteriorNodeList] = InteriorVariance * SpatialFunction[InteriorNodeList] + return Variance + +def VarianceLinearDepth(zi,VarianceShallow,VarianceDeep,Zshallow,Zdeep): + Variance = VarianceShallow + (VarianceDeep-VarianceShallow)*(zi-Zshallow)/(Zdeep-Zshallow) + js=np.where(ziZdeep) + Variance[js]=VarianceShallow + Variance[jd]=VarianceDeep + return Variance + +import numpy as np +import netCDF4 as nc +def WriteInterpolationWeightsToNetCDF(weights_file,row,col,weights,Nrows,Ncols): + #create a esmpy style sparse matrix netcdf file + print(Nrows) + print(Ncols) + print(row) + print(col) + print(weights) + n_s=len(weights) + + if isinstance(row , list): + row = np.array( row ) + if isinstance( col, list): + col = np.array( col ) + if isinstance( weights, list): + weights = np.array( weights ) + + with nc.Dataset(weights_file, 'w', format='NETCDF4') as ncout: + + ncout.createDimension('n_s' , n_s) + ncout.setncattr("Nrows", Nrows) + ncout.setncattr("Ncols", Ncols) + + r_var=ncout.createVariable('row', 'i4', ('n_s',)) + r_var.long_name = 'row index' + r_var[:]=row[:] + + c_var=ncout.createVariable('col', 'i4', ('n_s',)) + c_var.long_name = 'column index' + c_var[:]=col[:] + + s_var=ncout.createVariable('S', 'f4', ('n_s',)) + s_var.long_name = 'matrix value' + s_var[:]=weights[:] + + + +def IsInElement(x,y,xp,yp): + IsIn=False + c1 = (x[1] - x[0]) * (yp - y[0]) - (y[1] - y[0]) * (xp - x[0]) + c2 = (x[2] - x[1]) * (yp - y[1]) - (y[2] - y[1]) * (xp - x[1]) + c3 = (x[0] - x[2]) * (yp - y[2]) - (y[0] - y[2]) * (xp - x[2]) + if ( ( c1 > 0 and c2 > 0 and c3 > 0) or ( c1 < 0 and c2 < 0 and c3 < 0) ): + IsIn=True + if (c1*c2*c3 == 0): # include points on triangle + IsIn=True + return IsIn + +def FindElement(x,y,e,xi,yi): + nd=len(e.shape) + e=np.squeeze(e) + j=-9999 + ne=e.shape[0] + #print(nd) + #print(ne) + #print(e) + if nd > 1: + xc = np.squeeze(np.mean(x[e], axis=1)) + yc = np.squeeze(np.mean(y[e], axis=1)) + DistanceToElements = np.abs((xi + 1j*yi) - (xc + 1j*yc)) + n=0 + while (j < 0 and n < ne) : + n=n+1 + j = np.argmin( DistanceToElements ) + xl = np.squeeze(x[e[j,:]]) + yl = np.squeeze(y[e[j,:]]) + IsIn=IsInElement(xl,yl,xi,yi) + if IsIn : + return j + else: + DistanceToElements[j]=float('inf') + j=-9999 + else: + xl = np.squeeze(x[e]) + yl = np.squeeze(y[e]) + IsIn=IsInElement(xl,yl,xi,yi) + if IsIn: + j=0 + return j + else: + j=-9999 + return j + + return j +""" +import matplotlib.tri as mtri +def compute_mesh_to_mesh_interp_weights(x, y, e, xi, yi, flout): + +# Assume x, y are vertex coords (N,), triangles is (M, 3) connectivity array + e0=e-1 + triang = mtri.Triangulation(x, y, e0) + + # z are the known values at each vertex (N,) + linear_interp = mtri.LinearTriInterpolator(triang, z) + + # Evaluate at new points (callable directly) + z_new = linear_interp(x_new, y_new) + +""" + +def universal_len(obj): + try: + return len(obj) + except TypeError: + return 1 + + +def compute_mesh_to_mesh_interp_weights(x, y, e, xi, yi): + """ + Compute mesh-to-mesh interpolation weights using barycentric coordinates. + + Parameters: + ----------- + x : array-like + X coordinates of source mesh nodes + y : array-like + Y coordinates of source mesh nodes + e : array-like + Element connectivity matrix (n_elements x 3 for triangular elements) + (nodes indexed from 1 to nn) + xi : array-like + X coordinates of target points + yi : array-like + Y coordinates of target points + + Returns: + -------- + weights : ndarray + Interpolation weights (n_points x 3) + nodes : ndarray + Node indices for each point (n_points x 3) + elenum : ndarray + Element number for each point (n_points,) + Dist2EleCenter : ndarray + Distance to element center for each element + """ + + # Convert to numpy arrays + + deg2kmY=111. + UseNearestEle = False #if True just use closest element center + N = 12 # search N nearest elements (nearest by element center to target node distance) + + print(xi) + x = np.asarray(x) + y = np.asarray(y) + e = np.asarray(e) + xi = np.asarray(xi) + yi = np.asarray(yi) + print("e.shape") + print(e.shape) + # convert node indexs to 0 .. nn-1 + e0=e-1 + + +# triangle_indices, weights, valid_mask=compute_and_save_weights(x, y, e0, xi, yi) +# np.savetxt("triangle_indices.txt",triangle_indices) +# np.savetxt("weights.txt",weights) +# np.savetxt("mask.txt",valid_mask) + + xc = np.mean(x[e0], axis=1) + yc = np.mean(y[e0], axis=1) + + # Initialize output arrays + n_points = len(xi) + n_elements = len(e) + weights = np.zeros((n_points, 3)) + nodes = np.zeros((n_points, 3), dtype=int) + elenum = np.zeros(n_points, dtype=int) + Dist2EleCenter = np.zeros(n_points) + +# t0 = time.time() +# UseNearestEle=True + for k in range(n_points): + x0=xi[k] + y0=yi[k] + deg2kmX=np.cos( np.pi * y0 / 180.)*deg2kmY + #distances = np.abs((x0 + 1j*y0) - (xc + 1j*yc)) + distances = np.abs( deg2kmX*(x0 - xc) + 1j*deg2kmY*(y0 - yc)) +# print(x0) +# print(y0) +# print(e0) +# print(xc) +# print(yc) +# print(distances) + if UseNearestEle: + jg=np.argmin(distances) + else: + raw_indices = np.argpartition(distances, N)[:N] + sorted_sub_indices = np.argsort(distances[raw_indices]) + jg = raw_indices[sorted_sub_indices] + if UseNearestEle : + j=jg + else: + j=FindElement(x,y,e0[jg,:],x0,y0) + if j < 0: + print("couldn't find element for point : "+ str(k)) + print(str(x0)+" : "+str(y0)) + if len(jg)>0: + j = jg[0] + else: + j=0 + print("using closest element at distance : "+ str(distances[j])) + else: + j=jg[j] + + elenum[k] = j + Dist2EleCenter[k] = distances[j] + xl = x[e0[j, :]] + yl = y[e0[j, :]] + + # Compute barycentric coordinates using shoelace formula for areas + # Area of triangle formed by vertices 1, 2, and point (a3) + xt = np.array([xl[0], xl[1], x0, xl[0]]) + yt = np.array([yl[0], yl[1], y0, yl[0]]) + a3 = -np.dot(xt[1:4] - xt[0:3], yt[0:3] + yt[1:4]) / 2 + # Area of triangle formed by vertices 3, 1, and point (a2) + xt = np.array([xl[2], xl[0], x0, xl[2]]) + yt = np.array([yl[2], yl[0], y0, yl[2]]) + a2 = -np.dot(xt[1:4] - xt[0:3], yt[0:3] + yt[1:4]) / 2 + # Area of triangle formed by point, vertices 2, 3 (a1) + xt = np.array([x0, xl[1], xl[2], x0]) + yt = np.array([y0, yl[1], yl[2], y0]) + a1 = -np.dot(xt[1:4] - xt[0:3], yt[0:3] + yt[1:4]) / 2 + + # Normalize to get barycentric weights + total_area = a1 + a2 + a3 + weights[k, :] = [a1, a2, a3] / total_area + + nodes[k, :] = e[j, :] #<- indexed 1 .. nn + # Progress reporting every 100 iterations + if (k + 1) % 10 == 0: +# t1 = time.time() +# time_per_iter = (t1 - t0) / (k + 1) +# time_remaining = (n_points - k - 1) * time_per_iter / 60 + print(f"Progress: {k+1}/{n_points}") +# print(f"Time remaining: {time_remaining:.2f} minutes") + return weights, nodes, elenum, Dist2EleCenter + + +def InterpolateField2Nodes(nodes,weights, f): + fi=np.zeros(weights.shape[0]) + for k in range(weights.shape[0]): + fl=f[nodes[k,:]] + wl=weights[k,:] + fi[k]=np.dot(wl,fl) + if (not np.abs(fi[k]) > 0.): + fi[k]=0. + if ( fi[k]>np.max(fl) ): + fi[k]=np.max(fl) + if ( fi[k]cd $PBS_O_WORKDIR +#-->echo "Running on node: $(hostname)" +#--> python my_script.py --task $PBS_ARRAY_INDEX + +import os +def WriteInterpJobscriptPBS(fl,flin,mshfl,Njobs, ComputeNodes): + + meshslash=mshfl.rfind('/')+1 + TmpOutDir="STOFSInterpWeights."+mshfl[meshslash:len(mshfl)-4] + WghtFl="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".txt" + WghtFl="InterpWeights."+mshfl[meshslash:len(mshfl)-4]+".stofs.txt" + WghtFlNetCDF="InterpWeights."+mshfl[meshslash:len(mshfl)-4]+".stofs.nc" +# WghtFlNetCDF="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".nc" + + Njobs=64 #OVERWRITE FOR NOW + with open(fl, 'w') as f: + +#cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt + + +# From rwps.cron +#PBS -A RWPS-DEV +#PBS -l select=1:ncpus=1:mem=100MB +#PBS -l walltime=02:00:00 +#PBS -q dev +#PBS -N rwps.boss.lsf +#PBS -j oe +#PBS -o rwps.MakeUnstrWghts.out +#PBS -e rwps.MakeUnstrWghts.out + +#PBS -l select=2:ncpus=32:mem=128gb + f.write("#PBS -N ESMPy\n") + f.write("#PBS -j oe\n") + f.write("#PBS -S /bin/bash\n") + f.write("#PBS -q dev\n") + f.write("#PBS -A NWPS-DEV\n") + f.write("#PBS -l walltime=01:00:00\n") + f.write("#PBS -J 1-"+str(Njobs)+"\n") + f.write("#PBS -l select=2:ncpus=32:mem=128gb\n") +# f.write("#PBS -l select=1:ncpus=1:mem=8G\n") + f.write("#PBS -l place=excl\n") + f.write("#PBS -l debug=true\n") + f.write("#PBS -r y\n") + + f.write("module reset\n") + f.write("module load PrgEnv-intel/8.5.0\n") + f.write("module load intel/19.1.3.304\n") + f.write("module load craype/2.7.17\n") + f.write("module load cray-mpich/8.1.19\n") + f.write("module load hdf5-C/1.14.0\n") + f.write("module load netcdf-C/4.9.2\n") + f.write("module load esmf-C/8.6.0\n") + f.write("module load ve/hafs/2.1\n") + + f.write("pip list -v\n") + + current_dir = os.getcwd() + f.write("cd "+current_dir+"\n") + + f.write("# calculate interpolation weights in parallel geographically \n") + f.write("python ComputeUnstrToRWPSInterpWeights.py "+flin+" "+mshfl+" $PBS_ARRAY_INDEX " + str(Njobs)+" > InterpJob.$PBS_ARRAY_INDEX.out \n") +# f.write("wait\n") +# f.write("# concatonate different parts of the mesh to common text file \n") +# f.write("cat "+TmpOutDir+"/Part.IntrpWghts.*.txt > "+WghtFl+" \n") +# f.write("# convert output weights to netcdf file \n") +# f.write("python ConvertWeights2Netcdf.py "+flin+" "+mshfl+" \n") +# print("to run $qsub -r y "+fl) + + +def WriteInterpJobscriptSLURM(fl,flin,mshfl,Njobs, ComputeNodes): + + meshslash=mshfl.rfind('/')+1 + TmpOutDir="STOFSInterpWeights."+mshfl[meshslash:len(mshfl)-4] + WghtFl="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".txt" + WghtFlNetCDF="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".nc" + with open(fl, 'w') as f: + #yi[k]=float(values[4]) + f.write("#!/bin/bash \n") + f.write("#SBATCH --job-name=STOFS_interp_masterscript \n") +# f.write("#SBATCH --ntasks="+str(N)+" \n") + f.write("#SBATCH --ntasks=1 \n") # ntasks per interpolation + f.write("#SBATCH --time=08:00:00 \n") + f.write("#SBATCH --output=mpi_test_%j.log \n") + f.write("#SBATCH --error=%j.err \n") + f.write("#SBATCH --account=marine-cpu \n") + f.write("#SBATCH --nodes="+str(ComputeNodes)+" \n") + f.write("#SBATCH --ntasks-per-core=1"+" \n") + f.write("#SBATCH --array=0-"+str(Njobs-1)+" \n") + + f.write(" \n") + + f.write("module purge \n") + f.write("module use /scratch4/NCEPDEV/marine/Ali.Salimi/Hera_Data/HR4-OPT/FromJessica/Keston/ICunstructuredRuns15km-implicit-450s/global-workflow/sorc/ufs_model.fd/modulefiles \n") + f.write("module load ufs_ursa.intel \n") + f.write("module load py-scipy/1.14.1 \n") + f.write("module load py-netcdf4/1.7.1.post2 \n") + f.write("pip list \n") + f.write("# calculate interpolation weights in parallel geographically \n") + f.write("srun python GeoSubsetInterpolateSTOFS.py "+flin+" "+mshfl+" $SLURM_ARRAY_TASK_ID " + str(Njobs)+" > InterpJob.$SLURM_ARRAY_TASK_ID.out \n") + f.write("wait\n") + f.write("# concatonate different parts of the mesh to common text file \n") + f.write("cat "+TmpOutDir+"/Part.IntrpWghts.*.txt > "+WghtFl+" \n") + f.write("# convert output weights to netcdf file \n") + f.write("python ConvertWeights2Netcdf.py "+flin+" "+mshfl+" \n") + + + flintrp="STOFS.to."+mshfl[meshslash:len(mshfl)-4]+".sh" + flout=flin[0:-2]+mshfl[meshslash:len(mshfl)-4]+".nc" + flinuv=flin[0:-3]+".vel.nc" + floutuv=flinuv[0:-2]+mshfl[meshslash:len(mshfl)-4]+".nc" + with open(flintrp, 'w') as f: + f.write("#!/bin/bash \n") + f.write("#SBATCH --job-name=STOFS_interp_masterscript \n") + f.write(" \n") + f.write("module purge \n") + f.write("module use /scratch4/NCEPDEV/marine/Ali.Salimi/Hera_Data/HR4-OPT/FromJessica/Keston/ICunstructuredRuns15km-implicit-450s/global-workflow/sorc/ufs_model.fd/modulefiles \n") + f.write("module load ufs_ursa.intel \n") + f.write("module load py-scipy/1.14.1 \n") + f.write("module load py-netcdf4/1.7.1.post2 \n") + f.write("pip list \n") + f.write("# calculate interpolation weights in parallel geographically \n") + f.write("python InterpolateSTOFS.py "+flin+" "+mshfl+" "+flout+" zeta 2\n") + f.write("python InterpolateSTOFS.py "+flinuv+" "+mshfl+" "+floutuv+" u-vel:v-vel 2\n") + diff --git a/ush/PreProcess/InterpolateWithWeights.py b/ush/PreProcess/InterpolateWithWeights.py new file mode 100644 index 0000000..80c44fa --- /dev/null +++ b/ush/PreProcess/InterpolateWithWeights.py @@ -0,0 +1,269 @@ +import numpy as np +import netCDF4 as nc +import sys +import InterpUtilities as iutil +import xarray as xr +import scipy.sparse as sp +from scipy.interpolate import NearestNDInterpolator +import datetime + +# Engine for interpolating to WW3 unstructured mesh using precomputed interpolation weights from netcdf files with forecasts +# +# to call: +# python InterpolateSTOFS.py input_file meshpath outputfile variable1:variable2:variable3 ExtrapMethod +# +# example: +# python InterpolateSTOFS.py stofs.20260608.00/stofs.cwl.vel.nc meshes/RWPS.V0a.small.msh tesdtoZ.vel.nc u-vel:v-vel 2 +# or: +# python InterpolateSTOFS.py stofs.20260608.00/stofs.cwl.nc meshes/RWPS.V0a.small.msh tesdtoZ.vel.nc zeta 1 +# +# ExtrapMethod =-1 no extrapolation, NaN's potentially in output where source field is dry +# ExtrapMethod = 0 NaN values in interpolated field replaced with 0.0 +# ExtrapMethod = 1 Nearest Neighbor extrapolation from valid source values +# ExtrapMethod = 2 Nearest Neighbor extrapolation from valid interpolated values +# ExtrapMethod = 3 Nearest Neighbor extrapolation from interpolated nodes which allways have valid values (faster than 2 for larger source mesh) + +UseUnixTime=True +nargin = len(sys.argv) - 1 + +flin=sys.argv[1] +#mshfl=sys.argv[2] +#meshslash=mshfl.rfind('/')+1 + +#weights_file="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".nc" +weights_file=sys.argv[2] + +flout=sys.argv[3] +varname0=sys.argv[4] +varname=varname0.split(":") + +ExtrapMethod=-1 # no extrapolation +if nargin>4: + ExtrapMethod=int(sys.argv[5]) + +if ExtrapMethod==-1: + print("no extrapolation, nan left in place in output") +if ExtrapMethod==0: + print("Fill missing values in interpolated field with value 0") +if ExtrapMethod==1: + print("extrapolation from nearest valid point in source- can be slow if source mesh is much larger than destination mesh") +if ExtrapMethod==2: + print("extrapolation from nearest valid point in destination (interpolated field)") + +with xr.open_dataset(weights_file) as ds_s: + # Standard sparse storage uses 'row', 'col', and 'data' variables + row = ds_s['row'].values + col = ds_s['col'].values + weights = ds_s['S'].values + Nrows=ds_s.attrs.get('Nrows') + Ncols=ds_s.attrs.get('Ncols') + SrcFieldType=ds_s.attrs.get('SrcFieldType') + if ExtrapMethod>0: #these extrapolation methods need the source and destination nodes + x=ds_s['x_src'].values + y=ds_s['y_src'].values + xi=ds_s['x_dst'].values + yi=ds_s['y_dst'].values + +nni=Nrows +n1=Ncols +print("row") +print(row) +print("col") +print(col) + +matrix = sp.coo_matrix((weights, (row-1, col-1)), shape=(Nrows,Ncols)).tocsr() +print("sparse interpolation matrix") +print(matrix) +row_sum = matrix.sum(axis=1) +j0=np.where( row_sum==0 ) # destination nodes with no coverage from interpolation matrix + +data = nc.Dataset(flin,"r") +if "time" in data.variables: + time=iutil.ConvertTimeToUnixTime(flin,"time") +elif "MT" in data.variables: + time=iutil.ConvertTimeToUnixTime(flin,"MT") +else: + print("No time variable found in "+flin+" EXITING") + sys.exit(1) + +nt=len(time) + +#nt=4 +#time=time[0:nt] + +print(time) + +nvar=len(varname) +vari=np.zeros((nvar,nt,nni)) + +if ExtrapMethod>=0: + IsExtrap=np.zeros((nvar,nt,nni),dtype=int) + +if ExtrapMethod==3: + AnyExtrap=np.zeros((nvar,nni),dtype=int) + +nan=float("nan") +for jv in range(nvar): + fill_value0=data[varname[jv]]._FillValue + print("fill value="+str(fill_value0)) + for k in range(nt): + print("interpolating for time step = "+str(k)+" of "+str(nt)) + vshp = data.variables[varname[jv]].shape +# if SrcFieldType=="unstructured": + if len(vshp)==1: + var=np.asarray(data[varname[jv]][:]) # No time dimension?, just spatial data to interpolate + elif len(vshp)==2: + var=np.asarray(data[varname[jv]][k,:]) + elif len(vshp)==3: # Wind field with dimensions time, x, y + if "wind" in flin: + var0=np.asarray(data[varname[jv]][k,:,:]) + print("var0.shape") + print(var0.shape) + print(n1) + var=np.transpose(var0).reshape(n1) + elif "ice" in flin: + var0=np.asarray(data[varname[jv]][k,:,:]) + if "rtofs" in flin: #remove bad geometry edges + var0=var0[1:-1,1:-1] + var=np.transpose(var0).reshape(n1) + + elif len(vshp)==4: # RTOFS field with 2nd dimensional "Level" and garbage boundries + var0=np.asarray(data[varname[jv]][k,0,:,:]) + if "rtofs" in flin: #remove bad geometry edges + var0=var0[1:-1,1:-1] + var=np.transpose(var0).reshape(n1) + + else: + print(vshp) + print(len(vshp)) + print("unkown data shape for "+varname[jv]+" terminating") + sys.exit() + + #replace fill with nan to avoid interpolating fill + j=np.where(var==fill_value0) + var[j]=nan + if ExtrapMethod==0: + j=np.where(np.isnan(var)) + var[j]=0. + + vari[jv,k,:] = matrix @ var # actual spatial interpolation step + vari[jv,k,j0]=nan # empty rows + if ExtrapMethod==3: # Fast posthoc nearest neighbor extrapolator + jd=np.where(np.isnan(vari[jv,k,:])) + AnyExtrap[jv,jd]=1. + elif ExtrapMethod>0:# and ExtrapMethod<3: + jd=np.where(np.isnan(vari[jv,k,:])) + dstp=np.array((xi[jd],yi[jd])) + if ExtrapMethod==1: + #extrapolate using nearest neighbor of source with valid value + js=np.where(~np.isnan(var)) + srcp=np.array((x[js],y[js])) + srcv=var[js] + if ExtrapMethod==2: + #extrapolate using nearest neighbor of interpolated field with valid value + js=np.where(~np.isnan(vari[jv,k,:])) + srcp=np.array((xi[js],yi[js])) + tmp=vari[jv,k,js] + srcv=tmp.flatten() + interp = NearestNDInterpolator(srcp.T,srcv) + ExtrapVals = interp( dstp.T ) + vari[jv,k,jd]=ExtrapVals + IsExtrap[jv,k,jd]=1 + +if ExtrapMethod==0: + jd=np.where(np.isnan(vari)) + vari[jd]==0. + IsExtrap[jd]=1 + +if ExtrapMethod==3: #posthoc extrapolation from points which are valid at all times + for jv in range(nvar): + jd=np.where(AnyExtrap[jv,:]==1) # nodes that have some "nan" intrepolated values + js=np.where(AnyExtrap[jv,:]==0) # nodes that have no "nan" intrepolated values + srcp = np.array((xi[js],yi[js])).T + srcv = vari[jv,0,js] #dummy input field + dstp = np.array((xi[jd],yi[jd])).T + srcv=srcv[0,:] + interpolator = NearestNDInterpolator(srcp, srcv) + distances, jsrc = interpolator.tree.query(dstp) + jd=jd[0] + for k in range(nt): + jdk=np.where(np.isnan(vari[jv,k,jd])) + jdk=jdk[0] + vari[jv,k,jd[jdk]]=vari[jv,k,jsrc[jdk]] # value of nearest "always valid" destination point + IsExtrap[jv,k,jd[jdk]]=1 + +print("nn(target mesh) = "+str(nni)+": Nrows = "+str(Nrows)) +print("nn(source mesh) = "+str(n1)+": Ncols = "+str(Ncols)) +if not ((nni==Nrows) and (n1==Ncols)): + print("WARNING: Wrong matrix weights: number of rows from "+ mshfl +" = "+str(nni)+ + " but number of rows in "+ weights_file +" = "+str(Nrows)+ + ", number of spatial points in "+ flin +" = "+str(n1)+ + " but number of columns in "+ weights_file +" = "+str(Ncols) ) + print(" You may need to regnerate file "+ weights_file +" with appropriate weights") + +#ne=ei.shape[0] + +with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: + + ncout.createDimension('level' , 1) + ncout.createDimension('node' , nni) + ncout.createDimension('time', nt) + + time_var=ncout.createVariable('time', 'f8', ('time',)) + varin = data["time"] + iutil.CopyAttributes(varin, time_var) + if UseUnixTime: + time_var.units = 'seconds since 1970-01-01 00:00:00.0 0:00' + time_var.standard_name = 'time' + time_var[:]=time[:] + + for jv in range(nvar): + print("writing output for :"+varname[jv]) + varin = data[varname[jv]] + F_var=ncout.createVariable(varname[jv], 'f4', ('time','node'),fill_value = fill_value0) + iutil.CopyAttributes(varin, F_var) + F_var.location = 'node' + F_var[:,:] = vari[jv,:,:] + + if ExtrapMethod >= 0 : + xtrp_var=ncout.createVariable(varname[jv]+'IsExtrap', 'i1', ('time','node')) + xtrp_var.long_name = '==1 if the interpolated value extrapolated. 0 if interpolated' + xtrp_var.standard_name = 'is extrapolated' + xtrp_var.location = 'node' + if ExtrapMethod == 0: + xtrp_var.method = 'Interpolated nan values replaced with 0' + if ExtrapMethod == 1: + xtrp_var.method = 'nearest valid neighbor in source field' + if ExtrapMethod == 2: + xtrp_var.method = 'nearest valid neighbor in interpolated field' + xtrp_var[:,:] = IsExtrap[jv,:,:] + + ncout.close + + +#mesh geometry should be added later +""" + + ncout.createDimension('element' , ne) + ncout.createDimension('noel', 3) + + lon_var=ncout.createVariable('longitude', 'f8', ('node',)) + lon_var.units = 'degree_east' + lon_var.long_name = 'longitude' + lon_var.standard_name = 'longitude' + lon_var.axis = 'X' + lon_var[:]=xi[:] + + lat_var=ncout.createVariable('latitude', 'f8', ('node',)) + lat_var.units = 'degree_north' + lat_var.long_name = 'latitude' + lat_var.standard_name = 'latitude' + lat_var.axis = 'Y' + lat_var[:]=yi[:] + + tri_var=ncout.createVariable('tri', 'i4', ('noel','element')) + tri_var.long_name = 'element list' + tri_var.standard_name = 'element list' + tri_var[:]=np.transpose(ei) +""" + diff --git a/ush/PreProcess/InterpolateWithWeightsAndErrorVariance.py b/ush/PreProcess/InterpolateWithWeightsAndErrorVariance.py new file mode 100644 index 0000000..1ddc6a2 --- /dev/null +++ b/ush/PreProcess/InterpolateWithWeightsAndErrorVariance.py @@ -0,0 +1,336 @@ +import numpy as np +import netCDF4 as nc +import sys +import InterpUtilities as iutil +import xarray as xr +import scipy.sparse as sp +from scipy.interpolate import NearestNDInterpolator +import datetime + +# Engine for interpolating to WW3 unstructured mesh using precomputed interpolation weights from netcdf files with forecasts +# +# to call: +# python InterpolateSTOFS.py input_file meshpath outputfile variable1:variable2:variable3 ExtrapMethod +# +# example: +# python InterpolateSTOFS.py stofs.20260608.00/stofs.cwl.vel.nc meshes/RWPS.V0a.small.msh tesdtoZ.vel.nc u-vel:v-vel 2 +# or: +# python InterpolateSTOFS.py stofs.20260608.00/stofs.cwl.nc meshes/RWPS.V0a.small.msh tesdtoZ.vel.nc zeta 1 +# +# ExtrapMethod =-1 no extrapolation, NaN's potentially in output where source field is dry +# ExtrapMethod = 0 NaN values in interpolated field replaced with 0.0 +# ExtrapMethod = 1 Nearest Neighbor extrapolation from valid source values +# ExtrapMethod = 2 Nearest Neighbor extrapolation from valid interpolated values +# ExtrapMethod = 3 Nearest Neighbor extrapolation from interpolated nodes which allways have valid values (faster than 2 for larger source mesh) + +UseUnixTime=True +nargin = len(sys.argv) - 1 + +flin=sys.argv[1] +#mshfl=sys.argv[2] +#meshslash=mshfl.rfind('/')+1 + +#weights_file="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".nc" +weights_file=sys.argv[2] + +flout=sys.argv[3] +varname0=sys.argv[4] +varname=varname0.split(":") +if nargin>4: + VarParam0=sys.argv[5] + IncludeErrorVariance=True +else: + print("no variance parameters provided- error variance will not be included in file "+flout) + IncludeErrorVariance=False + +VariableType='Wind' +if "vel" in varname[0]: + VariableType='Current' +if "zeta" in varname[0]: + VariableType='WaterLevel' +if "ice" in varname[0]: + VariableType='Ice' + +ExtrapMethod=-1 # no extrapolation +if nargin>4: + ExtrapMethod=int(sys.argv[5]) + +if ExtrapMethod==-1: + print("no extrapolation, nan left in place in output") +if ExtrapMethod==0: + print("Fill missing values in interpolated field with value 0") +if ExtrapMethod==1: + print("extrapolation from nearest valid point in source- can be slow if source mesh is much larger than destination mesh") +if ExtrapMethod==2: + print("extrapolation from nearest valid point in destination (interpolated field)") + +with xr.open_dataset(weights_file) as ds_s: + # Standard sparse storage uses 'row', 'col', and 'data' variables + row = ds_s['row'].values + col = ds_s['col'].values + weights = ds_s['S'].values + Nrows=ds_s.attrs.get('Nrows') + Ncols=ds_s.attrs.get('Ncols') + SrcFieldType=ds_s.attrs.get('SrcFieldType') + if ExtrapMethod>0: #these extrapolation methods need the source and destination nodes + x=ds_s['x_src'].values + y=ds_s['y_src'].values + xi=ds_s['x_dst'].values + yi=ds_s['y_dst'].values + #shift to RWPS convention + j=np.where(x>90) + x[j]=x[j]-360. + j=np.where(xi>90) + xi[j]=xi[j]-360. + +nni=Nrows +n1=Ncols + +matrix = sp.coo_matrix((weights, (row-1, col-1)), shape=(Nrows,Ncols)).tocsr() +print("sparse interpolation matrix") +print(matrix) + +data = nc.Dataset(flin,"r") +if "time" in data.variables: + time=iutil.ConvertTimeToUnixTime(flin,"time") +elif "MT" in data.variables: + time=iutil.ConvertTimeToUnixTime(flin,"MT") +else: + print("No time variable found in "+flin+" EXITING") + sys.exit(1) + +nt=len(time) + +#nt=4 +#time=time[0:nt] + +print(time) + +nvar=len(varname) +vari=np.zeros((nvar,nt,nni)) + +if ExtrapMethod>=0: + IsExtrap=np.zeros((nvar,nt,nni),dtype=int) + +if ExtrapMethod==3: + AnyExtrap=np.zeros((nvar,nni),dtype=int) + +nan=float("nan") +for jv in range(nvar): + fill_value0=data[varname[jv]]._FillValue + print("fill value="+str(fill_value0)) + for k in range(nt): + print("interpolating for time step = "+str(k)+" of "+str(nt)) + vshp = data.variables[varname[jv]].shape +# if SrcFieldType=="unstructured": + if len(vshp)==1: + var=np.asarray(data[varname[jv]][:]) # No time dimension?, just spatial data to interpolate + if len(vshp)==2: + var=np.asarray(data[varname[jv]][k,:]) + if len(vshp)==3: # Wind field with dimensions time, x, y + var0=np.asarray(data[varname[jv]][k,:,:]) + var=np.transpose(var0).reshape(n1) + if len(vshp)==4: # RTOFS field with 2nd dimensional "Level" and garbage boundries + var0=np.asarray(data[varname[jv]][k,0,:,:]) + if "rtofs" in flin: #remove bad geometry edges + var0=var0[1:-1,1:-1] + var=np.transpose(var0).reshape(n1) + else: + print("unkown data shape for "+varname[jv]+" terminating") + sys.exit() + + #replace fill with nan to avoid interpolating fill + j=np.where(var==fill_value0) + var[j]=nan + + if ExtrapMethod==0: + j=np.where(np.isnan(var)) + var[j]=0. + + vari[jv,k,:] = matrix @ var # actual spatial interpolation step + + if ExtrapMethod==3: # Fast posthoc nearest neighbor extrapolator + jd=np.where(np.isnan(vari[jv,k,:])) + AnyExtrap[jv,jd]=1. + elif ExtrapMethod>0:# and ExtrapMethod<3: + jd=np.where(np.isnan(vari[jv,k,:])) + dstp=np.array((xi[jd],yi[jd])) + if ExtrapMethod==1: + #extrapolate using nearest neighbor of source with valid value + js=np.where(~np.isnan(var)) + srcp=np.array((x[js],y[js])) + srcv=var[js] + if ExtrapMethod==2: + #extrapolate using nearest neighbor of interpolated field with valid value + js=np.where(~np.isnan(vari[jv,k,:])) + srcp=np.array((xi[js],yi[js])) + tmp=vari[jv,k,js] + srcv=tmp.flatten() + interp = NearestNDInterpolator(srcp.T,srcv) + ExtrapVals = interp( dstp.T ) + vari[jv,k,jd]=ExtrapVals + IsExtrap[jv,k,jd]=1 + +if ExtrapMethod==0: + jd=np.where(np.isnan(vari)) + vari[jd]==0. + IsExtrap[jd]=1 + +if ExtrapMethod==3: #posthoc extrapolation from points which are valid at all times + for jv in range(nvar): + jd=np.where(AnyExtrap[jv,:]==1) # nodes that have some "nan" intrepolated values + js=np.where(AnyExtrap[jv,:]==0) # nodes that have no "nan" intrepolated values + srcp = np.array((xi[js],yi[js])).T + srcv = vari[jv,0,js] #dummy input field + dstp = np.array((xi[jd],yi[jd])).T + srcv=srcv[0,:] + interpolator = NearestNDInterpolator(srcp, srcv) + distances, jsrc = interpolator.tree.query(dstp) + jd=jd[0] + for k in range(nt): + jdk=np.where(np.isnan(vari[jv,k,jd])) + jdk=jdk[0] + vari[jv,k,jd[jdk]]=vari[jv,k,jsrc[jdk]] # value of nearest "always valid" destination point + IsExtrap[jv,k,jd[jdk]]=1 + +print("nn(target mesh) = "+str(nni)+": Nrows = "+str(Nrows)) +print("nn(source mesh) = "+str(n1)+": Ncols = "+str(Ncols)) +if not ((nni==Nrows) and (n1==Ncols)): + print("WARNING: Wrong matrix weights: number of rows from "+ mshfl +" = "+str(nni)+ + " but number of rows in "+ weights_file +" = "+str(Nrows)+ + ", number of spatial points in "+ flin +" = "+str(n1)+ + " but number of columns in "+ weights_file +" = "+str(Ncols) ) + print(" You may need to regnerate file "+ weights_file +" with appropriate weights") + +########################################################################################## +# CONSTRUCT PRESCRIBED ERROR COVARIANCE FOR UPDATING ESTIMATE +########################################################################################## +#grab variables for prescribing error variance +if IcludeErrorVariance: + dist2bnd_file=weights_file.replace("InterpolationWeights", "DistToBnd") + with xr.open_dataset(dist2bnd_file) as ds_s: + dist2bnd = ds_s['dist2bnd'].values + zi = ds_s['depth'].values + + if VariableType=="Current": + VarShallow=float(VarParam[0]) # variance (m/s)**2 for shallow regions + VarDeep=float(VarParam[1]) # variance (m/s)**2 for deep regions + BatShallow=float(VarParam[2]) # isobath (m) for shallow regions + BatDeep=float(VarParam[3]) # isobath (m) for deep regions + if "stofs" in flin: +# Variance = iutil.VarianceLinearDepth(zi,1.,100.,50.,250.) + Variance = iutil.VarianceLinearDepth(zi,VarShallow,VarDeep,BatShallow,BatDeep) + if "rtofs" in flin: #variance high in shallows and near boundary of coverage +# VarianceDepth = iutil.VarianceLinearDepth(zi,100.,1.,50.,250.) + VarianceDepth = iutil.VarianceLinearDepth(zi,VarShallow,VarDeep,BatShallow,BatDeep) + VarLambda= float(VarParam[4]) # lengthscale (km) for linear transition from bounadry variance(==VarShallow) to interior variance(==VarDeep) + VarianceBnd = iutil.VarianceLinearDistanceToBndy( dist2bnd, VarDeep,VarShallow, VarLambda) + Variance = np.maximum(VarianceDepth, VarianceBnd) + + if VariableType=="WaterLevel": + if "stofs" in flin: +# Variance = 1.+0*zi + VarInterior=float(VarParam[0]) # variance (m)**2 for stofs water level + Variance = VarInterior+0.*zi + if VariableType=="Wind": + ##LocalFS = [ rwps_pr, rwps_hi, rwps_ak, rwps_conus, rwps_na] # file names + ##VarFS = [ 4. , 4. , 9. , 16. , 25. ] # (m m /s /s) + ##LambdaFS = [ 150. , 200. , 500. , 1000. , 1500. ] # (km) + VarInterior=float(VarParam[0]) # variance (m/s)**2 for interior of forecast + if "nbm" in flin: + Variance = VarInterior + 0.*dist2bnd[:] + if "rrfs" in flin: + VarBoundary = float(VarParam[1]) # variance (m/s)**2 for boundary of forecast + VarLambda = float(VarParam[2]) # lengthscale (km) for linear transition from bounadry variance to interior variance + Variance = iutil.VarianceLinearDistanceToBndy( dist2bnd, VarInterior, VarBoundary,VarLambda ) + + ErrorVariance=np.zeros((nt,nni)) + for k in range(nt): + ErrorVariance[k,:]=Variance[:] +########################################################################################## +# CONSTRUCT PRESCRIBED ERROR COVARIANCE FOR UPDATING ESTIMATE +########################################################################################## + +ne=ei.shape[0] +with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: + + ncout.createDimension('level' , 1) + ncout.createDimension('node' , nni) + ncout.createDimension('element' , ne) + ncout.createDimension('time', nt) + ncout.createDimension('noel', 3) + + lon_var=ncout.createVariable('longitude', 'f8', ('node',)) + lon_var.units = 'degree_east' + lon_var.long_name = 'longitude' + lon_var.standard_name = 'longitude' + lon_var.axis = 'X' + lon_var[:]=xi[:] + + lat_var=ncout.createVariable('latitude', 'f8', ('node',)) + lat_var.units = 'degree_north' + lat_var.long_name = 'latitude' + lat_var.standard_name = 'latitude' + lat_var.axis = 'Y' + lat_var[:]=yi[:] + + if UseUnixTime: + units = 'seconds since 1970-01-01 00:00:00.0 0:00' + long_name = 'verification time generated by wgrib2 function verftime()' + standard_name = 'time' + else: + varin = data["time"] + units = varin.units + standard_name = varin.standard_name + long_name = varin.long_name + + time_var=ncout.createVariable('time', 'f8', ('time',)) + time_var.units = units + time_var.long_name = long_name + time_var.standard_name = standard_name + time_var[:]=time[:] + + tri_var=ncout.createVariable('tri', 'i4', ('noel','element')) + tri_var.long_name = 'element list' + tri_var.standard_name = 'element list' + tri_var[:]=np.transpose(ei) + + for jv in range(nvar): + if varname[jv]=='' + print("writing output for :"+varname[jv]) + varin = data[varname[jv]] + units = varin.units + standard_name = varin.standard_name + long_name = varin.long_name + location = 'node' + + F_var=ncout.createVariable(varname[jv], 'f4', ('time','node'),fill_value = fill_value0) + F_var.long_name = long_name + F_var.units = units + F_var.standard_name = standard_name + F_var.location = location + F_var[:,:] = vari[jv,:,:] + + if ExtrapMethod >= 0 : + xtrp_var=ncout.createVariable(varname[jv]+'IsExtrap', 'i1', ('time','node')) + xtrp_var.long_name = '==1 if the interpolated value extrapolated. 0 if interpolated' + xtrp_var.standard_name = 'is extrapolated' + xtrp_var.location = 'node' + if ExtrapMethod == 0: + xtrp_var.method = 'Interpolated nan values replaced with 0' + if ExtrapMethod == 1: + xtrp_var.method = 'nearest valid neighbor in source field' + if ExtrapMethod == 2: + xtrp_var.method = 'nearest valid neighbor in interpolated field' + xtrp_var[:,:] = IsExtrap[jv,:,:] + + if IcludeErrorVariance: + ErrorVariance_var=ncout.createVariable('ErrorVariance', 'f4', ('time','node'),fill_value = fill_value0) + ErrorVariance_var.long_name = 'forecast error variance' + ErrorVariance_var.units = "("+units+")**2" + ErrorVariance_var.standard_name = 'variance' + ErrorVariance_var[:,:]=ErrorVariance + + ncout.close + + diff --git a/ush/PreProcess/ProcessCurrents.sh b/ush/PreProcess/ProcessCurrents.sh new file mode 100644 index 0000000..bb44c37 --- /dev/null +++ b/ush/PreProcess/ProcessCurrents.sh @@ -0,0 +1,106 @@ +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=00:05:00 +#PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + +pip list -v + +#date="20260602" +#cycl="00" +#mesh="meshes/RWPS.V0a.small.msh" + +#date=$1 +#cycl=$2 +#mesh=$3 + +source ./rwpsenv + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +stofscur="stofs.$date.$cycl/stofs_2d_glo.t${cycl}z.fields.cwl.vel.nc" +rtofscur="rtofs.$date.nc" + +varnames="u-vel:v-vel" + +#name of blended wind +combinedcur=$frc/$meshname.$date.$cycl.vel.stofsxrtofs.nc +echo "outputting combined stofs and rtofs currents to $combinedcur" + +## STOFS interpolation +stofs_wghts="$fix/InterpolationWeights.$meshname.stofs.nc" +stofs_dists="$fix/DistToBndy.$meshname.stofs.nc" +stofs_rwps="$tmp/$meshname.$date.$cycl.vel.cwl.stofs.nc" +stofs_rwps_ti="$tmp/$meshname.$date.$cycl.vel.cwl.stofs.ti.nc" + +if [ ! -f "$stofs_wghts" ]; then + echo "missing stofs interpolation weights file: $stofs_wghts" + echo "compute with script ComputeUnstrToRWPSInterpWeights.sh" + exit 1 +fi +if [ ! -f "$stofs_dists" ]; then + echo "missing stofs distance to boundary file: $stofs_dists" + echo "compute with script ComputeUnstrToRWPSInterpWeights.sh" + exit 1 +fi + +# extrapolate with zero fill +python InterpolateWithWeights.py $stofscur $stofs_wghts $stofs_rwps $varnames 0 & + +## RTOFS interpolation +rtofs_wghts="$fix/InterpolationWeights.$meshname.rtofs.currents.nc" +rtofs_dists="$fix/DistToBndy.$meshname.rtofs.currents.nc" +rtofs_rwps="$tmp/$meshname.$date.vel.rtofs.nc" +rtofs_rwps_ti="$tmp/$meshname.$date.$cycl.vel.cwl.rtofs.ti.nc" + +if [ ! -f "$rtofs_wghts" ]; then + echo "missing rtofs interpolation weights file: $stofs_wghts" + echo "compute with script ComputeGridToRWPSInterpWeights.py" + exit 2 +fi +if [ ! -f "$rtofs_dists" ]; then + echo "missing stofs distance to boundary file: $rtofs_dists" + echo "compute with script ComputeUnstrToRWPSInterpWeights.py" + exit 2 +fi +# no extrapolation +python InterpolateWithWeights.py $rtofscur $rtofs_wghts $rtofs_rwps $varnames -1 & + +wait; + +python AddMeshGeomToFile.py $rtofs_rwps $mesh +python AddMeshGeomToFile.py $stofs_rwps $mesh + +#python AddErrVarToFile.py $rtofs_rwps $rtofs_dists 100.:1.:50.:250.:50. +#python AddErrVarToFile.py $stofs_rwps $stofs_dists 1.:100.:50.:250. + +#interpolate from stofs to common stofs and rtofs times within range of stofs time +python InterpTime.py $stofs_rwps $rtofs_rwps $stofs_rwps_ti $varnames False & + +#interpolate from rtofs to common stofs and rtofs times within range of stofs time +#values out of range are extrapolated to assuming persistance +python InterpTime.py $stofs_rwps $rtofs_rwps $rtofs_rwps_ti $varnames True & + +wait + +python AddErrVarToFile.py $rtofs_rwps_ti $rtofs_dists 100.:1.:50.:250.:50. +python AddErrVarToFile.py $stofs_rwps_ti $stofs_dists 1.:100.:50.:250. + +python BayesForecastUpdate.py $stofs_rwps_ti $rtofs_rwps_ti $combinedcur $varnames + diff --git a/ush/PreProcess/ProcessIce.sh b/ush/PreProcess/ProcessIce.sh new file mode 100644 index 0000000..29396cd --- /dev/null +++ b/ush/PreProcess/ProcessIce.sh @@ -0,0 +1,121 @@ +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=00:05:00 +#PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + +pip list -v + +#date="20260602" +#cycl="00" +#mesh="meshes/RWPS.V0a.small.msh" + +#date=$1 +#cycl=$2 +#mesh=$3 + +source ./rwpsenv + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + + +inpdir=ice.$date.$cycl + +nbmice=$inpdir/nbm.$date.$cycl.ice.ak.nc +rtofsice=$inpdir/rtofs.ice.$date.nc + + +rtofs_wghts="$fix/InterpolationWeights.$meshname.rtofs.ice.nc" +rtofs_dists="$fix/DistToBndy.$meshname.rtofs.ice.nc" +nbm_ak_wghts="$fix/InterpolationWeights.$meshname.nbm.ak.nc" +nbm_ak_dists="$fix/DistToBndy.$meshname.nbm.ak.nc" + +rtofs_rwps="$tmp/$meshname.$date.ice.rtofs.nc" +rtofs_rwps_ti="$tmp/$meshname.$date.$cycl.ice.rtofs.ti.nc" + +nbm_rwps="$tmp/$meshname.$date.$cycl.ice.nbm.ak.nc" +nbm_rwps_ti="$tmp/$meshname.$date.$cycl.ice.nbm.ak.ti.nc" + +varnames="ICEC_surface" + +combinedice="$frc/$meshname.$date.$cycl.ice.rtofsxnbm.nc" + +## NBM AK domain interpolation +## NOTE WE ARE USING THE RRFS ak WEIGHTS HERE NEED TO RELABEL AND RECOMPUTE FOR NBM AK DOMAIN +## DIFFERENCES ARE SMALL. posional distance ~200m on 3km grid roughly + +#../../fix/DistToBndy.rwps.oc_1500m_30km.nbm.ak.nc + + +if [ ! -f "$nbm_ak_wghts" ]; then + echo "missing nbm ak interpolation weights file: $nbm_ak_wghts" + echo "compute with script ComputeUnstrToRWPSInterpWeights.sh" + exit 1 +fi + +if [ ! -f "$nbm_ak_dists" ]; then + echo "missing nbm ak distance to boundary file: $nbm_ak_dists" + echo "compute with script ComputeUnstrToRWPSInterpWeights.sh" + exit 1 +fi + +# no extrapolation +python InterpolateWithWeights.py $nbmice $nbm_ak_wghts $nbm_rwps $varnames -1 & + +## RTOFS interpolation + +if [ ! -f "$rtofs_wghts" ]; then + echo "missing rtofs interpolation weights file: $rtofs_wghts" + echo "compute with script ComputeGridToRWPSInterpWeights.py" + exit 2 +fi +if [ ! -f "$rtofs_dists" ]; then + echo "missing stofs distance to boundary file: $rtofs_dists" + echo "compute with script ComputeUnstrToRWPSInterpWeights.py" + exit 2 +fi + +# extrapolate with 0 as fill +echo "$rtofsice" +python InterpolateWithWeights.py $rtofsice $rtofs_wghts $rtofs_rwps $varnames 0 & + +wait; + +python AddMeshGeomToFile.py $rtofs_rwps $mesh +python AddMeshGeomToFile.py $nbm_rwps $mesh + +#python AddErrVarToFile.py $rtofs_rwps $rtofs_dists 100.:1.:50.:250.:50. +#python AddErrVarToFile.py $stofs_rwps $stofs_dists 1.:100.:50.:250. + +#interpolate from stofs to common stofs and rtofs times within range of stofs time +python InterpTime.py $rtofs_rwps $nbm_rwps $rtofs_rwps_ti $varnames False & + +#interpolate from rtofs to common stofs and rtofs times within range of stofs time +#values out of range are extrapolated to assuming persistance +python InterpTime.py $rtofs_rwps $nbm_rwps $nbm_rwps_ti $varnames True & + +wait + +#uniform variance of 100. +python AddErrVarToFile.py $rtofs_rwps_ti $rtofs_dists 100. + +#interior variance of 4., boundary variance fof 400., transition lengthscale 9. km +python AddErrVarToFile.py $nbm_rwps_ti $nbm_ak_dists 4.:400.:9. + +python BayesForecastUpdate.py $rtofs_rwps_ti $nbm_rwps_ti $combinedice $varnames diff --git a/ush/PreProcess/ProcessWaterLevel.sh b/ush/PreProcess/ProcessWaterLevel.sh new file mode 100644 index 0000000..e8a54e9 --- /dev/null +++ b/ush/PreProcess/ProcessWaterLevel.sh @@ -0,0 +1,57 @@ +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=00:05:00 +#PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + +pip list -v + +#date=$1 +#cycl=$2 +#mesh=$3 + +source ./rwpsenv + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +stofslev="stofs.$date.$cycl/stofs_2d_glo.t${cycl}z.fields.cwl.nc" +stofs_wghts="$fix/InterpolationWeights.$meshname.stofs.nc" +stofs_dists="$fix/DistToBndy.$meshname.stofs.nc" + +stofs_rwps="$frc/$meshname.$date.$cycl.cwl.stofs.nc" + +varnames="zeta" + +## STOFS interpolation + +if [ ! -f "$stofs_wghts" ]; then + echo "missing stofs interpolation weights file: $stofs_wghts" + echo "compute with script ComputeUnstrToRWPSInterpWeights.sh" + exit 1 +fi +if [ ! -f "$stofs_dists" ]; then + echo "missing stofs distance to boundary file: $stofs_dists" + echo "compute with script ComputeUnstrToRWPSInterpWeights.sh" + exit 1 +fi + +python InterpolateWithWeights.py $stofslev $stofs_wghts $stofs_rwps $varnames 0 +python AddMeshGeomToFile.py $stofs_rwps $mesh +python AddErrVarToFile.py $stofs_rwps $stofs_dists 1. + diff --git a/ush/PreProcess/ProcessWinds.sh b/ush/PreProcess/ProcessWinds.sh new file mode 100644 index 0000000..8e5a4d4 --- /dev/null +++ b/ush/PreProcess/ProcessWinds.sh @@ -0,0 +1,156 @@ +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=00:05:00 +#PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + +pip list -v + +##date="20260527" +#date=20260602 +#cycl="00" +#mesh=meshes/RWPS.V0a.small.msh + +#date=$1 +#cycl=$2 +#mesh=$3 + +source ./rwpsenv + +#winddir="forecasts/wind.$date.$cycl" +winddir="wind.$date.$cycl" +windvars="UGRD_10maboveground:VGRD_10maboveground" + +# extract mesh name from file path +meshname="${mesh##*/}" +# remove .msh suffix from mesh name +meshname="${meshname: 0: -4}" + +# incorporate meshname date and cycle into output directory name to avoid +# applying winds to wrong mesh + +#outdir="rwps_winds.$meshname.$date.$cycl" +outdir="$tmp/rwps_winds.$meshname.$date.$cycl" + +rwps_est="$frc/rwps.est.$meshname.$date.$cycl.wind10m.nc" + +echo "outputing files to: $outdir" + +nbm_oc="$winddir/nbm.$date.$cycl.wind10m.oc.nc" +nbm_oc_uv="$winddir/nbm.$date.$cycl.wind10m.oc.uv.nc" + +rrfs_pr="$winddir/rrfs.$date.$cycl.wind10m.pr.nc" +rrfs_hi="$winddir/rrfs.$date.$cycl.wind10m.hi.nc" +rrfs_na="$winddir/rrfs.$date.$cycl.wind10m.na.nc" +rrfs_ak="$winddir/rrfs.$date.$cycl.wind10m.ak.nc" +rrfs_conus="$winddir/rrfs.$date.$cycl.wind10m.conus.nc" + +rwps_oc="$outdir/$meshname.$date.$cycl.wind10m.nbm.oc.nc" +rwps_oc_ti="$outdir/$meshname.$date.$cycl.wind10m.nbm.oc.ti.nc" +rwps_pr="$outdir/$meshname.$date.$cycl.wind10m.rrfs.pr.nc" +rwps_hi="$outdir/$meshname.$date.$cycl.wind10m.rrfs.hi.nc" +rwps_na="$outdir/$meshname.$date.$cycl.wind10m.rrfs.na.nc" +rwps_ak="$outdir/$meshname.$date.$cycl.wind10m.rrfs.ak.nc" +rwps_conus="$outdir/$meshname.$date.$cycl.wind10m.rrfs.conus.nc" + + +mkdir $outdir + + +##weights_file = "InterpolationWeights."+mshfl[meshslash:len(mshfl)-3]+dom+".nc" + +##LocalFS = [ rwps_pr, rwps_hi, rwps_ak, rwps_conus, rwps_na] # file names +##VarFS = [ 4. , 4. , 9. , 16. , 25. ] # (m m /s /s) +##LambdaFS = [ 150. , 200. , 500. , 1000. , 1500. ] # (km) +nbm_oc_wghts="$fix/InterpolationWeights.$meshname.nbm.oc.nc" +rrfs_hi_wghts="$fix/InterpolationWeights.$meshname.rrfs.hi.nc" +rrfs_pr_wghts="$fix/InterpolationWeights.$meshname.rrfs.pr.nc" +rrfs_ak_wghts="$fix/InterpolationWeights.$meshname.rrfs.ak.nc" +rrfs_na_wghts="$fix/InterpolationWeights.$meshname.rrfs.na.nc" +rrfs_conus_wghts="$fix/InterpolationWeights.$meshname.rrfs.conus.nc" + +nbm_oc_dist="$fix/DistToBndy.$meshname.nbm.oc.nc" +rrfs_hi_dist="$fix/DistToBndy.$meshname.rrfs.hi.nc" +rrfs_pr_dist="$fix/DistToBndy.$meshname.rrfs.pr.nc" +rrfs_ak_dist="$fix/DistToBndy.$meshname.rrfs.ak.nc" +rrfs_na_dist="$fix/DistToBndy.$meshname.rrfs.na.nc" +rrfs_conus_dist="$fix/DistToBndy.$meshname.rrfs.conus.nc" + + +( + #Convert NBM speed and direction to u,v + python SpdDir2UVnbm.py $nbm_oc $nbm_oc_uv + # If the interpolation weights do not already exist for the domains create them + # also creates distance to boundary used in prescribed error covariance specification + [ ! -f "$nbm_oc_wghts" ] && python ComputeGriddedToRWPSInterpWeights.py $nbm_oc_uv $mesh 1 + python InterpolateWithWeights.py $nbm_oc_uv $nbm_oc_wghts $rwps_oc $windvars 3 + python AddMeshGeomToFile.py $rwps_oc $mesh +)& + +( + [ ! -f "$rrfs_hi_wghts" ] && python ComputeGriddedToRWPSInterpWeights.py $rrfs_hi $mesh $rrfs_hi_wghts $rrfs_hi_dist + python InterpolateWithWeights.py $rrfs_hi $rrfs_hi_wghts $rwps_hi $windvars -1 > intrp.rrfs.hi.out + #add mesh geometry into interpolated file + python AddMeshGeomToFile.py $rwps_hi $mesh + # Add error covariance field to files with interpolated fields for bayesian update + # Based on distance to boundary of input field and commant line parameters InternalVariance:BoundaryVariance:LengthScale(km) + python AddErrVarToFile.py $rwps_hi $rrfs_hi_dist 4.:40.:200. +)& + +( + [ ! -f "$rrfs_pr_wghts" ] && python ComputeGriddedToRWPSInterpWeights.py $rrfs_pr $mesh $rrfs_pr_wghts $rrfs_pr_dist + python InterpolateWithWeights.py $rrfs_pr $rrfs_pr_wghts $rwps_pr $windvars -1 > intrp.rrfs.pr.out + python AddMeshGeomToFile.py $rwps_pr $mesh + python AddErrVarToFile.py $rwps_pr $rrfs_pr_dist 4.:40.:150. +)& + +( + [ ! -f "$rrfs_ak_wghts" ] && python ComputeGriddedToRWPSInterpWeights.py $rrfs_ak $mesh $rrfs_ak_wghts $rrfs_ak_dist + python InterpolateWithWeights.py $rrfs_ak $rrfs_ak_wghts $rwps_ak $windvars -1 > intrp.rrfs.ak.out + python AddMeshGeomToFile.py $rwps_ak $mesh + python AddErrVarToFile.py $rwps_ak $rrfs_ak_dist 9.:90.:500. +)& + +( + [ ! -f "$rrfs_conus_wghts" ] && python ComputeGriddedToRWPSInterpWeights.py $rrfs_conus $mesh $rrfs_conus_wghts $rrfs_conus_dist + python InterpolateWithWeights.py $rrfs_conus $rrfs_conus_wghts $rwps_conus $windvars -1 + python AddMeshGeomToFile.py $rwps_conus $mesh + python AddErrVarToFile.py $rwps_conus $rrfs_conus_dist 16.:160.:1000. +)& + +( + [ ! -f "$rrfs_na_wghts" ] && python ComputeGriddedToRWPSInterpWeights.py $rrfs_na $mesh $rrfs_na_wghts $rrfs_na_dist + python InterpolateWithWeights.py $rrfs_na $rrfs_na_wghts $rwps_na $windvars -1 + python AddMeshGeomToFile.py $rwps_na $mesh + python AddErrVarToFile.py $rwps_na $rrfs_na_dist 50.:500.:1500. +)& + +wait; +#Interpolate NBM in time to times within the NBM forecast covered by the RRFS forecast +python InterpTime.py $rwps_oc $rwps_pr $rwps_oc_ti $windvars +#add mesh geometry into file +python AddMeshGeomToFile.py $rwps_oc_ti $mesh +#add prescribed error covariance for nbm oc domain (assumed constant 100. (m/s)^2 ) +python AddErrVarToFile.py $rwps_oc_ti $nbm_oc_dist 100. + +cp $rwps_oc_ti $rwps_est +[ ! -f "$rwps_hi" ] && python BayesForecastUpdate.py $rwps_est $rwps_hi $rwps_est $windvars +[ ! -f "$rwps_pr" ] && python BayesForecastUpdate.py $rwps_est $rwps_pr $rwps_est $windvars +[ ! -f "$rwps_ak" ] && python BayesForecastUpdate.py $rwps_est $rwps_ak $rwps_est $windvars +[ ! -f "$rwps_conus" ] && python BayesForecastUpdate.py $rwps_est $rwps_conus $rwps_est $windvars +[ ! -f "$rwps_na" ] && python BayesForecastUpdate.py $rwps_est $rwps_na $rwps_est $windvars diff --git a/ush/PreProcess/SpdDir2UVnbm.py b/ush/PreProcess/SpdDir2UVnbm.py new file mode 100644 index 0000000..e25aaa1 --- /dev/null +++ b/ush/PreProcess/SpdDir2UVnbm.py @@ -0,0 +1,86 @@ +import os +import argparse +import numpy as np +import netCDF4 as nc +#import jigsawpy +import sys +import math +flin=sys.argv[1] +flout=sys.argv[2] +#fld="wdir10m.nc" +#fls="wspd10m.nc" +#flout="wind.08.31.WW3.nc" +fcst0 = nc.Dataset(flin,"r") + +x=np.asarray(fcst0["longitude"][:]) +y=np.asarray(fcst0["latitude"][:]) +t=np.asarray(fcst0["time"][:]) +spd=np.asarray(fcst0["WIND_10maboveground"][:,:,:]) +theta=np.asarray(fcst0["WDIR_10maboveground"][:,:,:]) + +spdV=fcst0["WIND_10maboveground"] +fill_value0 = spdV._FillValue + +print("fil val") +print(fill_value0) + +print("spd shape") +print(spd.shape) + +u=-1*spd*np.sin(theta*np.pi/180.) +v=-1*spd*np.cos(theta*np.pi/180.) +u[np.where(spd==fill_value0)]=fill_value0 +v[np.where(spd==fill_value0)]=fill_value0 + +nx=len(x) +ny=len(y) +nt=len(t) + +with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: + # Create dimensions + ncout.createDimension('lon' , nx) # Unlimited dimension + ncout.createDimension('lat' , ny) + ncout.createDimension('time', nt) + + lon_var=ncout.createVariable('longitude', 'f8', ('lon',)) + lon_var.units = 'degree_east' + lon_var.long_name = 'longitude' + lon_var.standard_name = 'longitude' + lon_var.axis = 'lon' + lon_var[:]=x[:] + + lat_var=ncout.createVariable('latitude', 'f8', ('lat',)) + lat_var.units = 'degree_north' + lat_var.long_name = 'latitude' + lat_var.standard_name = 'latitude' + lat_var.axis = 'lat' + lat_var[:]=y[:] + + time_var=ncout.createVariable('time', 'f8', ('time',)) + time_var.units = 'seconds since 1970-01-01 00:00:00.0 0:00' + time_var.long_name = 'verification time generated by wgrib2 function verftime()' + time_var.standard_name = 'time' + time_var.axis = 'time' + time_var[:]=t[:] + +# u_var=ncout.createVariable('UGRD_10maboveground', 'f4', ('lon','lat','time'),fill_value = -99999) + u_var=ncout.createVariable('UGRD_10maboveground', 'f4', ('time','lat','lon'),fill_value = fill_value0) + u_var.long_name = 'U-Component of Wind' + u_var.units = 'm/s' + u_var.standard_name = 'UGRD_10maboveground' + u_var.level = '10 m above ground' + u_var[:,:,:]=u[:,:,:] +# u_var[:,:,:]=np.transpose(u[:,:,:],(2,1,0)) + + v_var=ncout.createVariable('VGRD_10maboveground', 'f4', ('time','lat','lon'),fill_value = fill_value0) + v_var.long_name = 'V-Component of Wind' + v_var.units = 'm/s' + v_var.standard_name = 'VGRD_10maboveground' + v_var.level = '10 m above ground' + v_var[:,:,:]=v[:,:,:] +# v_var[:,:,:]=np.transpose(v[:,:,:],(2,1,0)) + + + ncout.close + + diff --git a/ush/PreProcess/nbm/ConvertNBMIcetif2NetCDF.py b/ush/PreProcess/nbm/ConvertNBMIcetif2NetCDF.py new file mode 100644 index 0000000..5c4701d --- /dev/null +++ b/ush/PreProcess/nbm/ConvertNBMIcetif2NetCDF.py @@ -0,0 +1,56 @@ +#aws s3 ls --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/ | g ice +#aws s3 cp --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/iceconcentration/blendv5.0_alaska_iceconcentration_2026-05-07T00:00_2026-05-08T12:00.tif ./ +#aws s3 cp --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/icethickness/blendv5.0_alaska_icethickness_2026-05-07T00:00_2026-05-08T12:00.tif ./ +#pip install rioxarray xarray pyproj numpy NetCDF4 +#python ConvertNBMIcetif2NetCDF.py iceconcentration/blendv5.0_alaska_iceconcentration_2026-05-07T00:00_2026-05-08T12:00.tif +import numpy as np +import pyproj +import rioxarray as rio +import xarray as xr +import sys + +flin = sys.argv[1] +flout=flin[0:-4]+".nc" +# 1. Load the original GeoTIFF file +# Replace 'input.tif' with your actual file path +da = rio.open_rasterio(flin) + +# 2. Extract the 1D projected X and Y coordinates (in meters) +x_coords = da.x.values +y_coords = da.y.values + +# 3. Create a 2D meshgrid of the projected coordinates +X, Y = np.meshgrid(x_coords, y_coords) + +# 4. Set up the coordinate transformer +# From EPSG:5936 (Polar Stereographic) to EPSG:4326 (Lat/Lon) +transformer = pyproj.Transformer.from_crs( + "EPSG:5936", "EPSG:4326", always_xy=True +) + +# 5. Compute the 2D curvilinear latitude and longitude grids +lon_2d, lat_2d = transformer.transform(X, Y) + +# 6. Restructure the DataArray, dropping old 1D spatial coordinates +# We assume band 0 is your primary data array +data_var = da.isel(band=0).drop_vars(["x", "y", "spatial_ref"]) + +# 7. Build the NetCDF dataset with 2D curvilinear coordinates +ds = xr.Dataset( + data_vars={"variable_name": (["y", "x"], data_var.values)}, +# data_vars={"Band1": (["y", "x"], data_var.values)}, + coords={ + "lon": (["y", "x"], lon_2d), + "lat": (["y", "x"], lat_2d), + }, +) + +# Add standard CF-compliant metadata for curvilinear grids +ds["variable_name"].attrs["coordinates"] = "lon lat" +ds["lon"].attrs["units"] = "degrees_east" +ds["lat"].attrs["units"] = "degrees_north" + +# 8. Export to NetCDF with compression enabled +ds.to_netcdf(flout, encoding={"variable_name": {"zlib": True}}) + +print("Conversion complete: "+flout+" saved.") diff --git a/ush/PreProcess/nbm/GetNBMIce.sh b/ush/PreProcess/nbm/GetNBMIce.sh new file mode 100755 index 0000000..6195ba6 --- /dev/null +++ b/ush/PreProcess/nbm/GetNBMIce.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# This is just a place holder with notes for the time being. Notes on aws retrieval and processing are below +# This script takes rrfs grib2 forecast files, extracts 10m u and v wind +# components and outputs to netcdf. Comand line arguments are +# with aws- make a +#aws s3 ls --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/ | g ice +#aws s3 cp --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/iceconcentration/blendv5.0_alaska_iceconcentration_2026-05-07T00:00_2026-05-08T12:00.tif ./ +#aws s3 cp --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/icethickness/blendv5.0_alaska_icethickness_2026-05-07T00:00_2026-05-08T12:00.tif ./ +#pip install rioxarray xarray pyproj numpy NetCDF4 +#python ConvertNBMIcetif2NetCDF.py iceconcentration/blendv5.0_alaska_iceconcentration_2026-05-07T00:00_2026-05-08T12:00.tif + +#for all files +#aws s3 cp --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/icethickness/ . --recursive --exclude "*" --include "*alaska_icethickness_*" +# +module load intel-oneapi/2022.2.0.262 +module load wgrib2/2.0.8 + + + +INPUT_DIR="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.$1/$2/grib2" +# /lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.20260729/00/grib2/blend.t00z.icec.ak.grib2 +ICE_FILE="$INPUT_DIR/blend.t$2z.icec.ak.grib2" + +OUTPUT_DIR="ice.$1.$2" +OUTPUT_FILE="$OUTPUT_DIR/nbm.$1.$2.ice.ak.nc" + +mkdir "$OUTPUT_DIR" +# Remove existing output file to avoid mixing old data +rm -f "$OUTPUT_FILE" + +echo "writing ice from $INPUT_DIR to $OUTPUT_FILE" + +wgrib2 "$ICE_FILE" -match ":ICEC:" -netcdf "$OUTPUT_FILE" + +echo "nbm ice processing complete for forecast date $1, cycle $2, domain ak" +echo "output written to: $OUTPUT_FILE" diff --git a/ush/PreProcess/nbm/MakeNBMWind.sh b/ush/PreProcess/nbm/MakeNBMWind.sh new file mode 100755 index 0000000..2150074 --- /dev/null +++ b/ush/PreProcess/nbm/MakeNBMWind.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# This script takes rrfs grib2 forecast files, extracts 10m u and v wind +# components and outputs to netcdf. Comand line arguments are + +module load intel-oneapi/2022.2.0.262 +module load wgrib2/2.0.8 + +#INPUT_DIR="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.1/blend.$1/$2/grib2" +INPUT_DIR="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.$1/$2/grib2" +WSPD_FILE="$INPUT_DIR/blend.t$2z.wspd.$3.grib2" +WDIR_FILE="$INPUT_DIR/blend.t$2z.wdir.$3.grib2" + +OUTPUT_DIR="wind.$1.$2" +OUTPUT_FILE="$OUTPUT_DIR/nbm.$1.$2.wind10m.$3.nc" + +mkdir -p "$OUTPUT_DIR" +# Remove existing output file to avoid mixing old data +rm -f "$OUTPUT_FILE" + +echo "writing 10m wind from $INPUT_DIR to $OUTPUT_FILE" + +wgrib2 "$WSPD_FILE" -match ":WIND:10 m" -netcdf "$OUTPUT_FILE" +wgrib2 "$WDIR_FILE" -match ":WDIR:10 m" -append -netcdf "$OUTPUT_FILE" + +echo "nbm processing complete for forecast date $1, cycle $2, domain $3" +echo "output written to: $OUTPUT_FILE" diff --git a/ush/PreProcess/nbm/MakeNBMWindUV.sh b/ush/PreProcess/nbm/MakeNBMWindUV.sh new file mode 100644 index 0000000..97eeda5 --- /dev/null +++ b/ush/PreProcess/nbm/MakeNBMWindUV.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +# This script takes rrfs grib2 forecast files, extracts 10m u and v wind +# components and outputs to netcdf. Comand line arguments are +# forecast time: YYYYMMDD +# forecast cycle: CC +# frecast region: hi,pr,na,ak or conus +# +# For example call as: +# sh MakeRRFSWind.sh 20260428 00 pr +# to produce output file: +# rrfs.20260428.00.wind10m.pr.nc +# +# ensemble(of n=5) output is available: +#/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.20260428/00/m001 +#/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.20260428/00/m002 +#/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.20260428/00/m003 +#/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.20260428/00/m004 +#/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.20260428/00/m005 +# wgrib2 input.grib2 -wind_uv output.grib2 + +INPUT_DIR="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.0/blend.$1/$2/grib2" +WSPD_FILE="$INPUT_DIR/blend.t00z.wspd.$3.grib2" +WDIR_FILE="$INPUT_DIR/blend.t00z.wdir.$3.grib2" + +module load intel-oneapi/2022.2.0.262 +module load wgrib2/2.0.8 + +OUTPUT_FILE="nbm.$1.$2.wind10m.$3.nc" + +# Remove existing output file to avoid mixing old data +rm -f "$OUTPUT_FILE" + +echo "writing 10m wind from $INPUT_DIR to $OUTPUT_FILE" + +# wgrib2 "$WSPD_FILE" -match ":WIND:10 m" -netcdf "$OUTPUT_FILE" +# wgrib2 "$WDIR_FILE" -match ":WDIR:10 m" -append -netcdf "$OUTPUT_FILE" + +wgrib2 "$WSPD_FILE" -match ":WIND:10 m" tmp.grib2 +wgrib2 "$WDIR_FILE" -match ":WDIR:10 m" -append tmp.grib2 + +wgrib2 tmp.grib2 -wind_uv -netcdf "$OUTPUT_FILE" + +# Note: Ensure files are in the correct chronological order (e.g., sorted by name) +#for file in $(ls "$INPUT_DIR"/rrfs.t00z.2dfld.*km.f*.$3.grib2 | sort); do +# echo "Processing: $file" + # Convert and append to the NetCDF file + # -netcdf: specifies the output format and filename + # -append: adds data to the existing netcdf file instead of overwriting +# wgrib2 "$file" -match ":UGRD:10 m" -append -netcdf "$OUTPUT_FILE" +# wgrib2 "$file" -match ":VGRD:10 m" -append -netcdf "$OUTPUT_FILE" +#done + +echo "nbm processing complete for forecast date $1, cycle $2, domain $3" +echo "output written to: $OUTPUT_FILE" diff --git a/ush/PreProcess/rrfs/MakeEnsRRFSWind.sh b/ush/PreProcess/rrfs/MakeEnsRRFSWind.sh new file mode 100644 index 0000000..bac5ef3 --- /dev/null +++ b/ush/PreProcess/rrfs/MakeEnsRRFSWind.sh @@ -0,0 +1,77 @@ +#!/bin/bash + +# This script takes ensemble rrfs grib2 forecast files, extracts 10m u and v wind +# components and outputs to netcdf. Comand line arguments are +# forecast time: YYYYMMDD +# forecast cycle: CC +# frecast region: hi,pr,na,ak or conus +# +# For example call as: +# sh MakeEnsRRFSWind.sh 20260428 00 pr +# to produce output file: +# rrfs.20260428.00.wind10m.pr.nc +# + +module load intel-oneapi/2022.2.0.262 +module load wgrib2/2.0.8 + +#INPUT_DIR="/lfs/h1/ops/para/com/rrfs/v1.0/rrfs.$1/$2" +OUTPUT_FILE="rrfs.ensemble.$1.$2.wind10m.$3.nc" +INPUT_DIR1="/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.$1/$2/m001/" + +for i in {1..5}; do + echo "Number: $i" + rm varname$i.txt + echo "# variable renaming for ensemble member $i">varname$i.txt + echo "UGRD:10 m above ground:UGRDn$i" >>varname$i.txt + echo "VGRD:10 m above ground:VGRDn$i" >>varname$i.txt +done + + +# Remove existing output file to avoid mixing old data +rm -f "$OUTPUT_FILE" + +echo "writing ensemble 10m wind from $INPUT_DIR1 to $OUTPUT_FILE" + +# Note: Ensure files are in the correct chronological order (e.g., sorted by name) +for file1 in $(ls "$INPUT_DIR1"/rrfs.t$2z.m001.2dfld.*km.f*.$3.grib2 | sort); do + file2="${file1//m001/m002}" + file3="${file1//m001/m003}" + file4="${file1//m001/m004}" + file5="${file1//m001/m005}" + fileN="${file1//m001/m00N}" + + echo "Processing: ensemble $fileN" + wgrib2 $file1 -match ":UGRD:10 m" -nc_table varname1.txt -append -netcdf "$OUTPUT_FILE" + wgrib2 $file1 -match ":VGRD:10 m" -nc_table varname1.txt -append -netcdf "$OUTPUT_FILE" + + wgrib2 $file2 -match ":UGRD:10 m" -nc_table varname2.txt -append -netcdf "$OUTPUT_FILE" + wgrib2 $file2 -match ":VGRD:10 m" -nc_table varname2.txt -append -netcdf "$OUTPUT_FILE" + + wgrib2 $file3 -match ":UGRD:10 m" -nc_table varname3.txt -append -netcdf "$OUTPUT_FILE" + wgrib2 $file3 -match ":VGRD:10 m" -nc_table varname3.txt -append -netcdf "$OUTPUT_FILE" + + wgrib2 $file4 -match ":UGRD:10 m" -nc_table varname4.txt -append -netcdf "$OUTPUT_FILE" + wgrib2 $file4 -match ":VGRD:10 m" -nc_table varname4.txt -append -netcdf "$OUTPUT_FILE" + + wgrib2 $file5 -match ":UGRD:10 m" -nc_table varname5.txt -append -netcdf "$OUTPUT_FILE" + wgrib2 $file5 -match ":VGRD:10 m" -nc_table varname5.txt -append -netcdf "$OUTPUT_FILE" + +# wgrib2 $file2 -nc_table varname2.txt -append -netcdf "$OUTPUT_FILE" +# wgrib2 $file3 -nc_table varname3.txt -append -netcdf "$OUTPUT_FILE" +# wgrib2 $file4 -nc_table varname4.txt -append -netcdf "$OUTPUT_FILE" +# wgrib2 $file5 -nc_table varname5.txt -append -netcdf "$OUTPUT_FILE" + + +# cat $file1 $file2 $file3 $file4 $file5 | wgrib2 - -match ":(UGRD|VGRD):10 m" -append -netcdf "$OUTPUT_FILE" +# equivalent alternates +# cat $file1 $file2 $file3 $file4 $file5 > ensemble.grib2 +# wgrib2 ensemble.grib2 -match ":UGRD:10 m" -append -netcdf "$OUTPUT_FILE" +# wgrib2 ensemble.grib2 -match ":VGRD:10 m" -append -netcdf "$OUTPUT_FILE" +# or +# cat $file1 $file2 $file3 $file4 $file5 | wgrib2 - -match ":UGRD:10 m" -append -netcdf "$OUTPUT_FILE" +# cat $file1 $file2 $file3 $file4 $file5 | wgrib2 - -match ":VGRD:10 m" -append -netcdf "$OUTPUT_FILE" +done + +echo "rrfs ensemble processing complete for forecast date $1, cycle $2, domain $3" +echo "output written to: $OUTPUT_FILE" diff --git a/ush/PreProcess/rrfs/MakeRRFSWind.sh b/ush/PreProcess/rrfs/MakeRRFSWind.sh new file mode 100755 index 0000000..8a12f56 --- /dev/null +++ b/ush/PreProcess/rrfs/MakeRRFSWind.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +# This script takes rrfs grib2 forecast files, extracts 10m u and v wind +# components and outputs to netcdf. Comand line arguments are +# forecast time: YYYYMMDD +# forecast cycle: CC +# frecast region: hi,pr,na,ak or conus +# +# For example call as: +# sh MakeRRFSWind.sh 20260428 00 pr +# to produce output file: +# rrfs.20260428.00.wind10m.pr.nc +# +echo "MakeRRFSWind.sh fetching rrfs : time = $1, cycle = $2, domain = $3" + +module load intel-oneapi/2022.2.0.262 +module load wgrib2/2.0.8 + +INPUT_DIR="/lfs/h1/ops/para/com/rrfs/v1.0/rrfs.$1/$2" +OUTPUT_DIR="wind.$1.$2" +OUTPUT_FILE="$OUTPUT_DIR/rrfs.$1.$2.wind10m.$3.nc" + +mkdir "$OUTPUT_DIR" +# Remove existing output file to avoid mixing old data +rm -f "$OUTPUT_FILE" + +echo "writing 10m wind from $INPUT_DIR to $OUTPUT_FILE" + +# Note: Ensure files are in the correct chronological order (e.g., sorted by name) +for file in $(ls "$INPUT_DIR"/rrfs.t$2z.2dfld.*km.f*.$3.grib2 | sort); do + echo "Processing: $file" + # Convert and append to the NetCDF file + # -netcdf: specifies the output format and filename + # -append: adds data to the existing netcdf file instead of overwriting + wgrib2 "$file" -match ":UGRD:10 m" -append -netcdf "$OUTPUT_FILE" + wgrib2 "$file" -match ":VGRD:10 m" -append -netcdf "$OUTPUT_FILE" +done + +echo "rrfs processing complete for forecast date $1, cycle $2, domain $3" +echo "output written to: $OUTPUT_FILE" diff --git a/ush/PreProcess/rtofs/GetRTOFS.sh b/ush/PreProcess/rtofs/GetRTOFS.sh new file mode 100755 index 0000000..9f31806 --- /dev/null +++ b/ush/PreProcess/rtofs/GetRTOFS.sh @@ -0,0 +1,34 @@ +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=00:05:00 +#PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + +pip list -v + +date=$1 + +tmpdir="tmp.rtofs.$date" +filesin="/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs.$date/*prog.nc" +flout="rtofs.$date.nc" + +mkdir $tmpdir +cp $filesin $tmpdir/ +python rtofs/GetRTOFSfcst.py $tmpdir $flout + +#rm -rf $tmpdir diff --git a/ush/PreProcess/rtofs/GetRTOFSIce.sh b/ush/PreProcess/rtofs/GetRTOFSIce.sh new file mode 100755 index 0000000..8e915ce --- /dev/null +++ b/ush/PreProcess/rtofs/GetRTOFSIce.sh @@ -0,0 +1,42 @@ +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=00:05:00 +#PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + + + +#"rtofs_glo_3dz_n006_6hrly_hvr_alaska.nc" + +#/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs.20260727/rtofs_glo_2ds_f186_ice.nc + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + +pip list -v + +date=$1 +cycl=$2 + +tmpdir="tmp.rtofsIce.$date" +filesin="/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs.$date/*ice.nc" +dirout=ice.$date.$cycl +flout="$dirout/rtofs.ice.$date.nc" + +mkdir $tmpdir +cp $filesin $tmpdir/ +python rtofs/GetRTOFSIcefcst.py $tmpdir $flout + +## rm -rf $tmpdir diff --git a/ush/PreProcess/rtofs/GetRTOFSIcefcst.py b/ush/PreProcess/rtofs/GetRTOFSIcefcst.py new file mode 100644 index 0000000..9b7eb8d --- /dev/null +++ b/ush/PreProcess/rtofs/GetRTOFSIcefcst.py @@ -0,0 +1,107 @@ +# aws s3 cp --no-sign-request s3://noaa-nws-rtofs-pds/rtofs.20260115/ ./rtofs_jan2026_ice/ --recursive --exclude "*" --include "*ice*" +#Consolidate ice_coverage from RTOFS forecast files +import numpy as np +import os +import netCDF4 as nc +import sys + +# Get the path relative to this file and add to sys.path +#sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'utils'))) +#import helper +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) +import InterpUtilities as iutil + +dirin=sys.argv[1] +flout=sys.argv[2] + +ncfiles = os.listdir(dirin) +print(ncfiles) +nt=len(ncfiles) +k=0 +flin=dirin+"/"+ncfiles[k] +data=nc.Dataset(flin,"r") +X=data["Longitude"][:,:] +Y=data["Latitude"][:,:] +fill_value0=data["ice_coverage"]._FillValue +nx=X.shape[0] +ny=X.shape[1] +F=np.zeros((nt,nx,ny),dtype=np.float32) +MT=np.zeros(nt) +time=np.zeros(nt) +print("nx = "+str(nx)) +print("ny = "+str(ny)) +print(F.shape) +for k in range(nt): + flin=dirin+"/"+ncfiles[k] + + flinT=flin.replace("Ice","") + flinT=flinT.replace("ice","prog") + + print("ICE: org flin="+flin+" Time flin="+flinT) + + dataT=nc.Dataset(flinT,"r") + + data=nc.Dataset(flin,"r") + F0=data["ice_coverage"][:] +# T0=data["MT"][:] + T0=dataT["MT"][:] + + print(F0.shape) + print(F.shape) + print(str(k)+" of "+ str(nt)) + F[k,:,:]=F0[0,:,:] + MT[k]=T0 +# tmp=iutil.ConvertTimeToUnixTime(flin,"MT") + + tmp=iutil.ConvertTimeToUnixTime(flinT,"MT") + + time[k]=tmp[0] + +#-rw-r--r-- 1 keston.smith couple 64M Jul 29 17:59 tmp.rtofsIce.20260728/rtofs_glo_2ds_f007_ice.nc +#-rw-r--r-- 1 keston.smith couple 64M Jul 29 17:59 tmp.rtofsIce.20260728/rtofs_glo_2ds_n007_ice.nc +#keston.smith@dlogin06:/lfs/h2/emc/couple/noscrub/keston.smith/RWPSInterpolationUtilities> l tmp.rtofs.20260728/*007*nc +#-rw-r--r-- 1 keston.smith couple 149M Jul 29 17:49 tmp.rtofs.20260728/rtofs_glo_2ds_f007_prog.nc +#-rw-r--r-- 1 keston.smith couple 149M Jul 29 17:50 tmp.rtofs.20260728/rtofs_glo_2ds_n007_prog.nc + + + + +tindx = np.argsort(time) +time=time[tindx] +MT=MT[tindx] +F=F[tindx,:,:] + +with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: + + ncout.createDimension('X' , nx) + ncout.createDimension('Y' , ny) + ncout.createDimension('time', nt) + + lon_var=ncout.createVariable('longitude', 'f4', ('X','Y')) + var=data["Longitude"] + iutil.CopyAttributes(var, lon_var) + lon_var[:,:]=X[:,:] + + lat_var=ncout.createVariable('latitude', 'f4', ('X','Y')) + var=data["Latitude"] + iutil.CopyAttributes(var, lat_var) + lat_var[:,:]=Y[:,:] + + # Keep redundent time variables (time and MT) for conviniences + time_var=ncout.createVariable('time', 'f8', ('time',)) + time_var.units = 'seconds since 1970-01-01 00:00:00.0 0:00' + time_var.long_name = 'verification time generated by wgrib2 function verftime()' + time_var.standard_name = 'time' + time_var.axis = 'T' + time_var[:] = time[:] + + MT_var=ncout.createVariable("MT", 'f8', ('time',)) + var=data["MT"] + iutil.CopyAttributes(var, MT_var) + MT_var[:] = MT[:] + +# f_var = ncout.createVariable('ice_coverage', 'f4', ('time','X','Y'),fill_value = fill_value0) + f_var = ncout.createVariable('ICEC_surface', 'f4', ('time','X','Y'),fill_value = fill_value0) + var=data["ice_coverage"] + iutil.CopyAttributes(var, f_var) + f_var[:,:,:] = F[:,:,:] diff --git a/ush/PreProcess/rtofs/GetRTOFSfcst.py b/ush/PreProcess/rtofs/GetRTOFSfcst.py new file mode 100644 index 0000000..290f7e2 --- /dev/null +++ b/ush/PreProcess/rtofs/GetRTOFSfcst.py @@ -0,0 +1,96 @@ +# Consolidate u,v surface currents from +import numpy as np +import os +import netCDF4 as nc +import sys + +# Get the path relative to this file and add to sys.path +#sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'utils'))) +#import helper +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) +import InterpUtilities as iutil + +dirin=sys.argv[1] +flout=sys.argv[2] + +ncfiles = os.listdir(dirin) +print(ncfiles) +nt=len(ncfiles) +k=0 +flin=dirin+"/"+ncfiles[k] +data=nc.Dataset(flin,"r") +X=data["Longitude"][:,:] +Y=data["Latitude"][:,:] +fill_value0=data["u_velocity"]._FillValue +nx=X.shape[0] +ny=X.shape[1] +U=np.zeros((nt,1,nx,ny)) +V=np.zeros((nt,1,nx,ny)) +MT=np.zeros(nt) +time=np.zeros(nt) +print(U.shape) +for k in range(nt): + flin=dirin+"/"+ncfiles[k] + data=nc.Dataset(flin,"r") + U0=data["u_velocity"][:] + V0=data["v_velocity"][:] + T0=data["MT"][:] + print(k) + U[k,0,:,:]=U0[0,0,:,:] + V[k,0,:,:]=V0[0,0,:,:] + MT[k]=T0 + tmp=iutil.ConvertTimeToUnixTime(flin,"MT") + time[k]=tmp[0] + +tindx = np.argsort(time) +time=time[tindx] +MT=MT[tindx] +U=U[tindx,:,:,:] +V=V[tindx,:,:,:] + +Layers=data["Layer"][:] + +with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: + + ncout.createDimension('Layer' , 1) + ncout.createDimension('X' , nx) + ncout.createDimension('Y' , ny) + ncout.createDimension('time', nt) + + lon_var=ncout.createVariable('longitude', 'f4', ('X','Y')) + var=data["Longitude"] + iutil.CopyAttributes(var, lon_var) + lon_var[:,:]=X[:,:] + + lat_var=ncout.createVariable('latitude', 'f4', ('X','Y')) + var=data["Latitude"] + iutil.CopyAttributes(var, lat_var) + lat_var[:,:]=Y[:,:] + + # Keep redundent time variables (time and MT) for conviniences + time_var=ncout.createVariable('time', 'f8', ('time',)) + time_var.units = 'seconds since 1970-01-01 00:00:00.0 0:00' + time_var.long_name = 'verification time generated by wgrib2 function verftime()' + time_var.standard_name = 'time' + time_var.axis = 'T' + time_var[:] = time[:] + + MT_var=ncout.createVariable("MT", 'f8', ('time',)) + var=data["MT"] + iutil.CopyAttributes(var, MT_var) + MT_var[:] = MT[:] + + u_var = ncout.createVariable('u-vel', 'f4', ('time','Layer','X','Y'),fill_value = fill_value0) + var=data["u_velocity"] + iutil.CopyAttributes(var, u_var) + u_var[:,:,:,:] = U + + v_var = ncout.createVariable('v-vel', 'f4', ('time','Layer','X','Y'),fill_value = fill_value0) + var=data["v_velocity"] + iutil.CopyAttributes(var, v_var) + v_var[:,:,:,:] = V + + l_var = ncout.createVariable('Layer', 'i4', ('Layer',)) + var=data["Layer"] + iutil.CopyAttributes(var, l_var) + l_var[:] = Layers[0] diff --git a/ush/PreProcess/rwpsenv b/ush/PreProcess/rwpsenv new file mode 100644 index 0000000..6640aa5 --- /dev/null +++ b/ush/PreProcess/rwpsenv @@ -0,0 +1,11 @@ +date=20260803 +cycl=00 +rootdir=$(pwd) +mesh="$rootdir/../../fix/rwps.oc_1500m_30km.msh" +fix="$rootdir/../../fix" +prep="$rootdir/../../PrepInputs" +tmp="$prep/tmpfiles" +frc="$prep/forcing" +mkdir -p $prep +mkdir -p $tmp +mkdir -p $frc diff --git a/ush/PreProcess/stofs/GetSTOFS.sh b/ush/PreProcess/stofs/GetSTOFS.sh new file mode 100755 index 0000000..04ff98b --- /dev/null +++ b/ush/PreProcess/stofs/GetSTOFS.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +##script for retrieving stofs current and/or water level + +date=$1 +cycl=$2 + +if [ "$#" -lt 3 ]; then + echo "No arguments field argument." + echo "Retrieving both stofs currents and stofs water level." + fields="currents,waterlevel" +else + fields=$3 +fi + +mkdir stofs.$date.$cycl + +if [[ "$fields" == *"current"* ]]; then + echo retrieving stofs current for $date cycle $cycl + cp /lfs/h1/ops/prod/com/stofs/v2.1/stofs_2d_glo.$date/stofs_2d_glo.t"$cycl"z.fields.cwl.vel.nc stofs.$date.$cycl/ +fi + +if [[ "$fields" == *"level"* ]]; then + echo retrieving stofs water level for $date cycle $cycl + cp /lfs/h1/ops/prod/com/stofs/v2.1/stofs_2d_glo.$date/stofs_2d_glo.t"$cycl"z.fields.cwl.nc stofs.$date.$cycl/ +fi + From 5d69933f91260ca465284e4c39b8a1472d1ff85c Mon Sep 17 00:00:00 2001 From: keston Date: Tue, 11 Aug 2026 14:52:57 -0400 Subject: [PATCH 06/39] cleaned up files in ush/PreProcess and removed some other command line arg issues --- ush/PreProcess/BayesForecastUpdate.py | 2 - .../ComputeGriddedToRWPSInterpWeights.py | 18 +--- .../ComputeUnstrToRWPSInterpWeights.py | 5 -- .../ComputeWindToRWPSInterpWeights.py | 10 --- ush/PreProcess/ConvertWeights2Netcdf.py | 10 +-- ...GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh | 42 +++++----- ush/PreProcess/GetAllFocing.jobcard.sh | 34 ++++---- ush/PreProcess/GetAllFocing.sh | 46 +++++----- ush/PreProcess/GetCurrents.sh | 9 +- ush/PreProcess/GetIce.sh | 9 +- ush/PreProcess/GetWaterLevel.sh | 6 +- ush/PreProcess/GetWinds.sh | 26 +++--- ush/PreProcess/InterpTime.py | 3 - ush/PreProcess/InterpUtilities.py | 83 +------------------ ush/PreProcess/InterpolateWithWeights.py | 36 -------- .../InterpolateWithWeightsAndErrorVariance.py | 13 +-- ush/PreProcess/ProcessCurrents.sh | 36 ++------ ush/PreProcess/ProcessIce.sh | 33 ++------ ush/PreProcess/ProcessWaterLevel.sh | 17 +--- ush/PreProcess/ProcessWinds.sh | 58 ++++--------- ush/PreProcess/SpdDir2UVnbm.py | 21 ++--- ush/PreProcess/nbm/ConvertNBMIcetif2NetCDF.py | 6 -- ush/PreProcess/nbm/GetNBMIce.sh | 14 +--- ush/PreProcess/nbm/MakeNBMWind.sh | 1 - ush/PreProcess/nbm/MakeNBMWindUV.sh | 55 ------------ ush/PreProcess/rrfs/MakeEnsRRFSWind.sh | 15 ---- ush/PreProcess/rtofs/GetRTOFS.sh | 21 ++--- ush/PreProcess/rtofs/GetRTOFSIce.sh | 26 ++---- ush/PreProcess/rtofs/GetRTOFSIcefcst.py | 31 ++----- ush/PreProcess/rtofs/GetRTOFSfcst.py | 8 +- ush/PreProcess/stofs/GetSTOFS.sh | 15 ++-- 31 files changed, 158 insertions(+), 551 deletions(-) delete mode 100644 ush/PreProcess/nbm/MakeNBMWindUV.sh diff --git a/ush/PreProcess/BayesForecastUpdate.py b/ush/PreProcess/BayesForecastUpdate.py index 361c283..dd0aaea 100644 --- a/ush/PreProcess/BayesForecastUpdate.py +++ b/ush/PreProcess/BayesForecastUpdate.py @@ -1,5 +1,3 @@ - - import datetime import numpy as np import netCDF4 as nc diff --git a/ush/PreProcess/ComputeGriddedToRWPSInterpWeights.py b/ush/PreProcess/ComputeGriddedToRWPSInterpWeights.py index 3a8e877..1dfddcc 100644 --- a/ush/PreProcess/ComputeGriddedToRWPSInterpWeights.py +++ b/ush/PreProcess/ComputeGriddedToRWPSInterpWeights.py @@ -21,13 +21,7 @@ import InterpUtilities as iutil - -#mshfl="../meshes/RWPS.V0a.small.msh" -#flin="../RWPSWrkFlw/WindBlend/wind.20260507.00X/rrfs.20260507.00.wind10m.ak.nc" - - # Main program -#AddExtrapolationSupport=False AddExtrapolationSupport=True nargin = len(sys.argv) - 1 @@ -47,16 +41,12 @@ xi, yi, ei, zi = iutil.loadWW3Mesh(mshfl) nn=len(xi) #shift coords to[129,370] -#if np.mean(xi)<0.: - #xi=xi+360. data = nc.Dataset(flin,"r") + #read spaital dimensions and determine if input mesh is curvilinear or regular x1=np.asarray(data["longitude"][:]) y1=np.asarray(data["latitude"][:]) -# shift to common longitude -#if np.mean(np.mean(x1))<0: -# x1=x1+360. # rwps :[-231, 11] # nbm :[129, 370] # rrfs,pr :[ -75.5000 -62.5087] @@ -66,7 +56,6 @@ # rrfs,conus :[ 225.9045 299.0828] # rtofs,glo :[74.1552,434.0146] # stofs, glo :[-180,180] -# #Shift longitude coordinates to RWPS specs for various files if "hi" in flin: @@ -153,9 +142,7 @@ weightsExtrp=weights.tolist().append([1.0] * len(j0) ) rowExtrp=np.concatenate( (row, np.array(j0)) ) colExtrp=np.concatenate( (col, np.array(j0src+1)) ) -# this colExtrp=np.concatenate( (col, np.array(j0src)) ) weightsExtrp=np.concatenate( (weights, np.array([1.0] * len(j0))) ) -# os.replace(weights_file, "NoExtrap."+weights_file) os.replace(weights_file, weights_file[0:-3]+".NoExtrap.nc") iutil.WriteInterpolationWeightsToNetCDF(weights_file,rowExtrp,colExtrp,weightsExtrp,len(xi),len(x1v)) ################################################################################## @@ -198,9 +185,6 @@ ################################################################################## # START: Compute distance to boundary for each node in mesh: ################################################################################## -#if Extrapolate: -# dist2bnd=np.full(len(xi), np.inf) #all points are inside boundary- No boundary with this type of extrapolation -#else: row_sum = matrix.sum(axis=1) j0=np.where( row_sum==0 ) # destination nodes with no coverage from interpolation matrix j0=np.array(j0[0]).tolist() diff --git a/ush/PreProcess/ComputeUnstrToRWPSInterpWeights.py b/ush/PreProcess/ComputeUnstrToRWPSInterpWeights.py index 73b90ee..661ea27 100644 --- a/ush/PreProcess/ComputeUnstrToRWPSInterpWeights.py +++ b/ush/PreProcess/ComputeUnstrToRWPSInterpWeights.py @@ -2,7 +2,6 @@ import netCDF4 as nc import sys from scipy.interpolate import RegularGridInterpolator -#import CalculateSTOFStoRWPSInterpWeightsUtility as mshint import InterpUtilities as iutil import os @@ -40,9 +39,6 @@ latS=int(sys.argv[5]) latN=int(sys.argv[6]) -#latS=-40 -#latN=81 - meshslash=mshfl.rfind('/')+1 if nargin < 5: weights_file = TmpOutDir+"/Part.IntrpWghts."+str(jobID)+".txt" @@ -63,7 +59,6 @@ # and make North-South window contain the full target domain # NOTE: for efficiency the sections of the domain should have approximately # the same number of destination nodes and/or the same number of source elements -# will implement as function shortly if nargin < 5: # balance node load for diff --git a/ush/PreProcess/ComputeWindToRWPSInterpWeights.py b/ush/PreProcess/ComputeWindToRWPSInterpWeights.py index 87c47ac..381f6d1 100644 --- a/ush/PreProcess/ComputeWindToRWPSInterpWeights.py +++ b/ush/PreProcess/ComputeWindToRWPSInterpWeights.py @@ -8,23 +8,15 @@ import numpy as np import os - import datetime import netCDF4 as nc import sys import re import InterpUtilities as iutil - import xarray as xr import esmpy import scipy.sparse as sp -import InterpUtilities as iutil - - -#mshfl="../meshes/RWPS.V0a.small.msh" -#flin="../RWPSWrkFlw/WindBlend/wind.20260507.00X/rrfs.20260507.00.wind10m.ak.nc" - # Main program @@ -144,7 +136,6 @@ ################################################################################## # START: Compute distance to boundary for each node in mesh: ################################################################################## -#dist2bnd_file = "DistToBndy."+mshfl[meshslash:len(mshfl)-3]+dom+".txt" dist2bnd_file = "DistToBndy."+mshfl[meshslash:len(mshfl)-3]+dom+".nc" if Extrapolate: @@ -165,4 +156,3 @@ d_var.units = 'km' d_var.standard_name = 'distance to boundary' d_var[:]=dist2bnd[:] - diff --git a/ush/PreProcess/ConvertWeights2Netcdf.py b/ush/PreProcess/ConvertWeights2Netcdf.py index 0d90d5b..7f0d097 100644 --- a/ush/PreProcess/ConvertWeights2Netcdf.py +++ b/ush/PreProcess/ConvertWeights2Netcdf.py @@ -1,7 +1,6 @@ import numpy as np import netCDF4 as nc import sys -#import GeoComputeMeshToMeshInterpWeights as mshint import InterpUtilities as iutil import scipy.sparse as sp @@ -11,15 +10,10 @@ mshfl=sys.argv[2] meshslash=mshfl.rfind('/')+1 -#AddExtrapolationSupport=False AddExtrapolationSupport=True -#TextWeightFl="InterpWeights."+mshfl[meshslash:len(mshfl)-4]+".stofs.txt" - TextWeightFl=sys.argv[3] -##flout = "InterpolationWeights."+mshfl[meshslash:len(mshfl)-4]+".stofs.nc" - flout=TextWeightFl[0:len(TextWeightFl)-4]+".nc" xi, yi, ei, zi = iutil.loadWW3Mesh(mshfl) @@ -28,8 +22,9 @@ #read spaital dimensions and determine if input mesh is curvilinear or regular x=np.asarray(data["x"][:]) #convert to RWPS coordinates + jEast=np.where(x>90) -x[jEast]=x[jEast]=360. +x[jEast]=x[jEast]-360. nn_src=len(x) @@ -108,7 +103,6 @@ zdst_var.long_name = 'interpolation destination node latitude' zdst_var[:]=zi[:] -#Extrapolate=False Extrapolate=sys.argv[4] if Extrapolate: diff --git a/ush/PreProcess/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh b/ush/PreProcess/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh index 8bea1a7..aefd95d 100644 --- a/ush/PreProcess/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh +++ b/ush/PreProcess/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh @@ -1,8 +1,8 @@ #!/bin/sh -date=$1 -cycl=$2 -mesh=$3 +#date=$1 +#cycl=$2 +#mesh=$3 meshname="${mesh##*/}" meshname="${meshname: 0: -4}" @@ -37,9 +37,9 @@ echo "module load prod_util/2.0.8" >> $jobcard echo "module load prod_envir/2.0.5" >> $jobcard echo " " >> $jobcard -echo "date=$1" >> $jobcard -echo "cycl=$2" >> $jobcard -echo "mesh=$3" >> $jobcard +echo "#date=$1" >> $jobcard +echo "#cycl=$2" >> $jobcard +echo "#mesh=$3" >> $jobcard echo " " >> $jobcard echo "meshname=$meshname" >> $jobcard @@ -51,8 +51,8 @@ echo " " >> $jobcard # At present RTOFS ice files are missing time information (MT==0) so ProcessIce.sh will fail at the time interpolation step #echo "(" >> $jobcard -#echo " sh GetIce.sh $date $cycl > FetchIce.out" >> $jobcard -#echo " sh ProcessIce.sh $date $cycl $mesh > ProcIce.out" >> $jobcard +#echo " sh GetIce.sh $PDY $cyc > FetchIce.out" >> $jobcard +#echo " sh ProcessIce.sh $PDY $cyc $mesh > ProcIce.out" >> $jobcard #echo ")&" >> $jobcard #echo " " >> $jobcard @@ -60,38 +60,38 @@ echo " " >> $jobcard echo "(" >> $jobcard -echo " sh GetWaterLevel.sh $date $cycl > FetchWaterLevel.out" >> $jobcard -echo " sh ProcessWaterLevel.sh $date $cycl $mesh > ProcWaterLevel.out" >> $jobcard +echo " sh GetWaterLevel.sh $PDY $cyc > FetchWaterLevel.out" >> $jobcard +echo " sh ProcessWaterLevel.sh $PDY $cyc $mesh > ProcWaterLevel.out" >> $jobcard echo ")&" >> $jobcard echo " " >> $jobcard echo "(" >> $jobcard -echo " sh GetWinds.sh $date $cycl > FetchWinds.out" >> $jobcard -echo " sh ProcessWinds.sh $date $cycl $mesh > ProcWinds.out" >> $jobcard +echo " sh GetWinds.sh $PDY $cyc > FetchWinds.out" >> $jobcard +echo " sh ProcessWinds.sh $PDY $cyc $mesh > ProcWinds.out" >> $jobcard echo ")&" >> $jobcard echo " " >> $jobcard echo "(" >> $jobcard -echo " sh GetCurrents.sh $date $cycl > FetchCurrents.out" >> $jobcard -echo " sh ProcessCurrents.sh $date $cycl $mesh > ProcCurrents.out" >> $jobcard +echo " sh GetCurrents.sh $PDY $cyc > FetchCurrents.out" >> $jobcard +echo " sh ProcessCurrents.sh $PDY $cyc $mesh > ProcCurrents.out" >> $jobcard #ProcessIce Needs Time Variables from rtofs currents files -echo " sh GetIce.sh $date $cycl > FetchIce.out" >> $jobcard -echo " sh ProcessIce.sh $date $cycl $mesh > ProcIce.out" >> $jobcard +echo " sh GetIce.sh $PDY $cyc > FetchIce.out" >> $jobcard +echo " sh ProcessIce.sh $PDY $cyc $mesh > ProcIce.out" >> $jobcard echo ")&" >> $jobcard echo " " >> $jobcard echo " " >> $jobcard echo "wait" >> $jobcard echo " " >> $jobcard -echo "cp $meshname.$date.$cycl.cwl.stofs.nc $meshname.$date.$cycl.waterlevel.nc" >> $jobcard -echo "cp $meshname.$date.$cycl.vel.stofsxrtofs.nc $meshname.$date.$cycl.current.nc" >> $jobcard -echo "cp rwps_winds.$meshname.$date.$cycl/rwps.est.$meshname.$date.$cycl.wind10m.nc $meshname.$date.$cycl.wind.nc" >> $jobcard -echo "cp $meshname.$date.$cycl.ice.rtofsxnbm.nc $meshname.$date.$cycl.ice.nc" >> $jobcard +echo "cp $meshname.$PDY.$cyc.cwl.stofs.nc $meshname.$PDY.$cyc.waterlevel.nc" >> $jobcard +echo "cp $meshname.$PDY.$cyc.vel.stofsxrtofs.nc $meshname.$PDY.$cyc.current.nc" >> $jobcard +echo "cp rwps_winds.$meshname.$PDY.$cyc/rwps.est.$meshname.$PDY.$cyc.wind10m.nc $meshname.$PDY.$cyc.wind.nc" >> $jobcard +echo "cp $meshname.$PDY.$cyc.ice.rtofsxnbm.nc $meshname.$PDY.$cyc.ice.nc" >> $jobcard echo " " >> $jobcard ##Below is only needed because of missing rtofs ice time ## remove and move this to GetRTOFS.sh and GetRTOFSIce.sh -## echo "rm -rf tmp.rtofs*.$date" >> $jobcard +## echo "rm -rf tmp.rtofs*.$PDY" >> $jobcard qsub $jobcard > $outputfile diff --git a/ush/PreProcess/GetAllFocing.jobcard.sh b/ush/PreProcess/GetAllFocing.jobcard.sh index f2786b0..a05603b 100644 --- a/ush/PreProcess/GetAllFocing.jobcard.sh +++ b/ush/PreProcess/GetAllFocing.jobcard.sh @@ -1,8 +1,8 @@ #!/bin/sh -date=$1 -cycl=$2 -mesh=$3 +#date=$1 +#cycl=$2 +#mesh=$3 meshname="${mesh##*/}" meshname="${meshname: 0: -4}" @@ -33,9 +33,9 @@ echo "module load prod_util/2.0.8" >> $jobcard echo "module load prod_envir/2.0.5" >> $jobcard echo " " >> $jobcard -echo "date=$1" >> $jobcard -echo "cycl=$2" >> $jobcard -echo "mesh=$3" >> $jobcard +echo "#date=$1" >> $jobcard +echo "#cycl=$2" >> $jobcard +echo "#mesh=$3" >> $jobcard echo " " >> $jobcard echo "meshname=$meshname" >> $jobcard @@ -47,34 +47,34 @@ echo " " >> $jobcard # At present RTOFS ice files are missing time information (MT==0) so ProcessIce.sh will fail at the time interpolation step echo "(" >> $jobcard -echo " sh GetIce.sh $date $cycl > FetchIce.out" >> $jobcard -echo " sh ProcessIce.sh $date $cycl $mesh > ProcIce.out" >> $jobcard +echo " sh GetIce.sh $PDY $cyc > FetchIce.out" >> $jobcard +echo " sh ProcessIce.sh $PDY $cyc $mesh > ProcIce.out" >> $jobcard echo ")&" >> $jobcard echo " " >> $jobcard echo "(" >> $jobcard -echo " sh GetWaterLevel.sh $date $cycl > FetchWaterLevel.out" >> $jobcard -echo " sh ProcessWaterLevel.sh $date $cycl $mesh > ProcWaterLevel.out" >> $jobcard +echo " sh GetWaterLevel.sh $PDY $cyc > FetchWaterLevel.out" >> $jobcard +echo " sh ProcessWaterLevel.sh $PDY $cyc $mesh > ProcWaterLevel.out" >> $jobcard echo ")&" >> $jobcard echo " " >> $jobcard echo "(" >> $jobcard -echo " sh GetWinds.sh $date $cycl > FetchWinds.out" >> $jobcard -echo " sh ProcessWinds.sh $date $cycl $mesh > ProcWinds.out" >> $jobcard +echo " sh GetWinds.sh $PDY $cyc > FetchWinds.out" >> $jobcard +echo " sh ProcessWinds.sh $PDY $cyc $mesh > ProcWinds.out" >> $jobcard echo ")&" >> $jobcard echo " " >> $jobcard echo "(" >> $jobcard -echo " sh GetCurrents.sh $date $cycl > FetchCurrents.out" >> $jobcard -echo " sh ProcessCurrents.sh $date $cycl $mesh > ProcCurrents.out" >> $jobcard +echo " sh GetCurrents.sh $PDY $cyc > FetchCurrents.out" >> $jobcard +echo " sh ProcessCurrents.sh $PDY $cyc $mesh > ProcCurrents.out" >> $jobcard echo ")&" >> $jobcard echo " " >> $jobcard echo "wait" >> $jobcard echo " " >> $jobcard -echo "cp $meshname.$date.$cycl.cwl.stofs.nc $meshname.$date.$cycl.waterlevel.nc" >> $jobcard -echo "cp $meshname.$date.$cycl.vel.stofsxrtofs.nc $meshname.$date.$cycl.current.nc" >> $jobcard -echo "cp rwps_winds.$meshname.$date.$cycl/rwps.est.$meshname.$date.$cycl.wind10m.nc $meshname.$date.$cycl.wind.nc" >> $jobcard +echo "cp $meshname.$PDY.$cyc.cwl.stofs.nc $meshname.$PDY.$cyc.waterlevel.nc" >> $jobcard +echo "cp $meshname.$PDY.$cyc.vel.stofsxrtofs.nc $meshname.$PDY.$cyc.current.nc" >> $jobcard +echo "cp rwps_winds.$meshname.$PDY.$cyc/rwps.est.$meshname.$PDY.$cyc.wind10m.nc $meshname.$PDY.$cyc.wind.nc" >> $jobcard qsub $jobcard > $outputfile diff --git a/ush/PreProcess/GetAllFocing.sh b/ush/PreProcess/GetAllFocing.sh index 0ff36d7..fec5cc7 100644 --- a/ush/PreProcess/GetAllFocing.sh +++ b/ush/PreProcess/GetAllFocing.sh @@ -11,9 +11,9 @@ module load prod_envir/2.0.5 # 0.a Set necessary variables # This script retrieves and processes forcing for a forecast period -date=$1 -cycl=$2 -mesh=$3 +#date=$1 +#cycl=$2 +#mesh=$3 ##date=20260707 @@ -23,40 +23,40 @@ mesh=$3 meshname="${mesh##*/}" meshname="${meshname: 0: -4}" -echo "retrieving and processing RWPS forcing for $date z$cycl for WW3 mesh $mesh" +echo "retrieving and processing RWPS forcing for $PDY z$cyc for WW3 mesh $mesh" rm FetchWinds.out ProcWinds.out FetchCurrents.out ProcCurrents.out FetchWaterLevel.out ProcWaterLevel.out ( - echo "retrieving nbm and rrfs winds for $date z$cycl" - sh GetWinds.sh $date $cycl > FetchWinds.out - echo "processing winds for $date z$cycl for $mesh" - sh ProcessWinds.sh $date $cycl $mesh > ProcWinds.out + echo "retrieving nbm and rrfs winds for $PDY z$cyc" + sh GetWinds.sh $PDY $cyc > FetchWinds.out + echo "processing winds for $PDY z$cyc for $mesh" + sh ProcessWinds.sh $PDY $cyc $mesh > ProcWinds.out )& ( - echo "retrieving rtofs and stofs currents for $date z$cycl" - sh GetCurrents.sh $date $cycl > FetchCurrents.out - echo "processing currents for $date z$cycl for $mesh" - sh ProcessCurrents.sh $date $cycl $mesh > ProcCurrents.out + echo "retrieving rtofs and stofs currents for $PDY z$cyc" + sh GetCurrents.sh $PDY $cyc > FetchCurrents.out + echo "processing currents for $PDY z$cyc for $mesh" + sh ProcessCurrents.sh $PDY $cyc $mesh > ProcCurrents.out )& ( - echo "retrieving stofs water level for $date z$cycl" - sh GetWaterLevel.sh $date $cycl > FetchWaterLevel.out - echo "processing water level for $date z$cycl for $mesh" - sh ProcessWaterLevel.sh $date $cycl $mesh > ProcWaterLevel.out + echo "retrieving stofs water level for $PDY z$cyc" + sh GetWaterLevel.sh $PDY $cyc > FetchWaterLevel.out + echo "processing water level for $PDY z$cyc for $mesh" + sh ProcessWaterLevel.sh $PDY $cyc $mesh > ProcWaterLevel.out )& wait -echo "Finished preprocessing for $date z$cycl for $mesh" +echo "Finished preprocessing for $PDY z$cyc for $mesh" -cp $meshname.$date.$cycl.vel.stofsxrtofs.nc $meshname.$date.$cycl.current.nc -echo "current forcing file: $meshname.$date.$cycl.current.nc" +cp $meshname.$PDY.$cyc.vel.stofsxrtofs.nc $meshname.$PDY.$cyc.current.nc +echo "current forcing file: $meshname.$PDY.$cyc.current.nc" -cp $meshname.$date.$cycl.cwl.stofs.nc $meshname.$date.$cycl.waterlevel.nc -echo "water level forcing file: $meshname.$date.$cycl.watterlevel.nc" +cp $meshname.$PDY.$cyc.cwl.stofs.nc $meshname.$PDY.$cyc.waterlevel.nc +echo "water level forcing file: $meshname.$PDY.$cyc.watterlevel.nc" -cp rwps_winds.$meshname.$date.$cycl/rwps.est.$meshname.$date.$cycl.wind10m.nc $meshname.$date.$cycl.wind.nc -echo "wind forcing file: $meshname.$date.$cycl.wind.nc" +cp rwps_winds.$meshname.$PDY.$cyc/rwps.est.$meshname.$PDY.$cyc.wind10m.nc $meshname.$PDY.$cyc.wind.nc +echo "wind forcing file: $meshname.$PDY.$cyc.wind.nc" diff --git a/ush/PreProcess/GetCurrents.sh b/ush/PreProcess/GetCurrents.sh index 2cf5230..350a099 100644 --- a/ush/PreProcess/GetCurrents.sh +++ b/ush/PreProcess/GetCurrents.sh @@ -1,11 +1,8 @@ #!/bin/bash -# This script retrieves rtofs and stofs as netcdf files +# This script retrieves global RTOFS and STOFS as netcdf files - -date=$1 -cycl=$2 source ./rwpsenv -rtofs/GetRTOFS.sh $date & -stofs/GetSTOFS.sh $date $cycl current& +rtofs/GetRTOFS.sh $PDY & +stofs/GetSTOFS.sh $PDY $cyc current& wait; diff --git a/ush/PreProcess/GetIce.sh b/ush/PreProcess/GetIce.sh index 18299cc..d263552 100644 --- a/ush/PreProcess/GetIce.sh +++ b/ush/PreProcess/GetIce.sh @@ -1,11 +1,8 @@ #!/bin/bash -# This script retrieves rtofs and stofs as netcdf files +# This script retrieves ice forecasts for global RTOFS and Alaska NBM as netcdf files - -date=$1 -cycl=$2 source ./rwpsenv -rtofs/GetRTOFSIce.sh $date $cycl & -nbm/GetNBMIce.sh $date $cycl & +rtofs/GetRTOFSIce.sh $PDY $cyc & +nbm/GetNBMIce.sh $PDY $cyc & wait; diff --git a/ush/PreProcess/GetWaterLevel.sh b/ush/PreProcess/GetWaterLevel.sh index da54b58..5f7d0f7 100644 --- a/ush/PreProcess/GetWaterLevel.sh +++ b/ush/PreProcess/GetWaterLevel.sh @@ -1,11 +1,9 @@ #!/bin/bash -## This script retrieves stofs water level as netcdf file +## This script retrieves global STOFS water level as netcdf file -#date=$1 -#cycl=$2 curdir=$(pwd) echo $curdir source ./rwpsenv -stofs/GetSTOFS.sh $date $cycl waterlevel +stofs/GetSTOFS.sh $PDY $cyc waterlevel diff --git a/ush/PreProcess/GetWinds.sh b/ush/PreProcess/GetWinds.sh index 811dac4..0a9a4f6 100644 --- a/ush/PreProcess/GetWinds.sh +++ b/ush/PreProcess/GetWinds.sh @@ -2,46 +2,44 @@ # This script retrieves rrfs and nbm winbds and exports as # netcdf files -#date=$1 -#cycl=$2 source ./rwpsenv echo "retrieving winds from rrfs and nbm for rwps wind" ( - echo "sh nbm/MakeNBMWind.sh $date $cycl oc > nbm.oc.out" - nbm/MakeNBMWind.sh $date $cycl oc > nbm.oc.out + echo "sh nbm/MakeNBMWind.sh $PDY $cyc oc > nbm.oc.out" + nbm/MakeNBMWind.sh $PDY $cyc oc > nbm.oc.out echo "retrieved winds from nbm oc domain" echo "Not retrieving other nbm domain winds" )& ( - echo "sh rrfs/MakeRRFSWind.sh $date $cycl na > rrfs.na.out" - rrfs/MakeRRFSWind.sh $date $cycl na > rrfs.na.out + echo "sh rrfs/MakeRRFSWind.sh $PDY $cyc na > rrfs.na.out" + rrfs/MakeRRFSWind.sh $PDY $cyc na > rrfs.na.out echo "retrieved winds from rrfs na domain" )& ( - echo "sh rrfs/MakeRRFSWind.sh $date $cycl ak > rrfs.ak.out" - rrfs/MakeRRFSWind.sh $date $cycl ak > rrfs.ak.out + echo "sh rrfs/MakeRRFSWind.sh $PDY $cyc ak > rrfs.ak.out" + rrfs/MakeRRFSWind.sh $PDY $cyc ak > rrfs.ak.out echo "retrieved winds from rrfs ak domain" )& ( - echo "sh rrfs/MakeRRFSWind.sh $date $cycl pr > rrfs.pr.out" - rrfs/MakeRRFSWind.sh $date $cycl pr > rrfs.pr.out + echo "sh rrfs/MakeRRFSWind.sh $PDY $cyc pr > rrfs.pr.out" + rrfs/MakeRRFSWind.sh $PDY $cyc pr > rrfs.pr.out echo "retrieved winds from rrfs pr domain" )& ( - echo "sh rrfs/MakeRRFSWind.sh $date $cycl hi > rrfs.hi.out" - rrfs/MakeRRFSWind.sh $date $cycl hi > rrfs.hi.out + echo "sh rrfs/MakeRRFSWind.sh $PDY $cyc hi > rrfs.hi.out" + rrfs/MakeRRFSWind.sh $PDY $cyc hi > rrfs.hi.out echo "retrieved winds from rrfs hi domain" )& ( - echo "sh rrfs/MakeRRFSWind.sh $date $cycl conus > rrfs.conus.out" - rrfs/MakeRRFSWind.sh $date $cycl conus > rrfs.conus.out + echo "sh rrfs/MakeRRFSWind.sh $PDY $cyc conus > rrfs.conus.out" + rrfs/MakeRRFSWind.sh $PDY $cyc conus > rrfs.conus.out echo "retrieved winds from rrfs conus domain" )& wait diff --git a/ush/PreProcess/InterpTime.py b/ush/PreProcess/InterpTime.py index d438977..2bc8c88 100644 --- a/ush/PreProcess/InterpTime.py +++ b/ush/PreProcess/InterpTime.py @@ -86,9 +86,6 @@ u[jb]=nan #set up interpolator for u -# fi = interp1d(t, u, axis=0, kind='linear') -# fi = interp1d(t, u, axis=0, kind='linear',fill_value=np.nan) -# fi = interp1d(tu, u[indx,:], axis=0, kind='linear',fill_value=np.nan) if IsExtrap: fi = interp1d(tu, u[indx,:], axis=0, kind='linear',fill_value="extrapolate") #extrapolated values will be overwritten else: diff --git a/ush/PreProcess/InterpUtilities.py b/ush/PreProcess/InterpUtilities.py index 7770fb8..105b205 100644 --- a/ush/PreProcess/InterpUtilities.py +++ b/ush/PreProcess/InterpUtilities.py @@ -29,7 +29,6 @@ def ConvertTimeToUnixTime(flin,TimeVarName = None): print(tstr) secstr=tstr[2].rsplit(".", 1)[0] base_date = datetime(int(dstr[0]),int(dstr[1]),int(dstr[2]),int(tstr[0]),int(tstr[1]),int(secstr)) - #base_date = datetime(int(dstr[0]),int(dstr[1]),int(dstr[2]),int(tstr[0]),int(tstr[1]),int(tstr[2])) base_offset = int((base_date - epoch_1970).total_seconds()) if tunits=="seconds": unix_time = time + base_offset @@ -206,11 +205,9 @@ def interpolate_curvilinear_to_pointsRRFS(lon_in, lat_in, data_in, lon_out, lat_ ns=nx*ny S=np.zeros((ns,nt)) - #s0=np.zeros((nx,ny)) s0=np.zeros((ny,nx)) for k in range(nt): s0[:,:]=np.transpose(data_in[:,:,k]) - #s0[:,:]=data_in[:,:,k] S[:,k] = s0.flatten() # Define the target points @@ -285,7 +282,6 @@ def CurvilinearGridCreateInterpWeights(xi,yi,x1,y1, weights_file): # 5. Create esmpy Fields src_field = esmpy.Field(src_grid, name="src_field") dst_field = esmpy.Field(dst_grid, name="dst_field") -# src_field.data[...]=np.sqrt(x1/180)/(90+y1) # arbitrary function of x,y src_field.data[...]=np.sqrt(np.abs(x1/180))/(90+y1) # arbitrary function of x,y np.savetxt('F.txt', src_field.data[...]) @@ -374,8 +370,6 @@ def CalculateDistanceToInterpEnvelope(xi,yi,fi,SearchWidth): dist2bnd[jin]=din return dist2bnd -#END WIND TO RWPS Utils - def QuickDistance(lat1, lon1, lats2, lons2): deg2kmY=111. deg2kmX=np.cos( np.pi * lat1 / 180.)*deg2kmY @@ -462,9 +456,6 @@ def FindElement(x,y,e,xi,yi): e=np.squeeze(e) j=-9999 ne=e.shape[0] - #print(nd) - #print(ne) - #print(e) if nd > 1: xc = np.squeeze(np.mean(x[e], axis=1)) yc = np.squeeze(np.mean(y[e], axis=1)) @@ -493,27 +484,6 @@ def FindElement(x,y,e,xi,yi): return j return j -""" -import matplotlib.tri as mtri -def compute_mesh_to_mesh_interp_weights(x, y, e, xi, yi, flout): - -# Assume x, y are vertex coords (N,), triangles is (M, 3) connectivity array - e0=e-1 - triang = mtri.Triangulation(x, y, e0) - - # z are the known values at each vertex (N,) - linear_interp = mtri.LinearTriInterpolator(triang, z) - - # Evaluate at new points (callable directly) - z_new = linear_interp(x_new, y_new) - -""" - -def universal_len(obj): - try: - return len(obj) - except TypeError: - return 1 def compute_mesh_to_mesh_interp_weights(x, y, e, xi, yi): @@ -563,12 +533,6 @@ def compute_mesh_to_mesh_interp_weights(x, y, e, xi, yi): # convert node indexs to 0 .. nn-1 e0=e-1 - -# triangle_indices, weights, valid_mask=compute_and_save_weights(x, y, e0, xi, yi) -# np.savetxt("triangle_indices.txt",triangle_indices) -# np.savetxt("weights.txt",weights) -# np.savetxt("mask.txt",valid_mask) - xc = np.mean(x[e0], axis=1) yc = np.mean(y[e0], axis=1) @@ -580,20 +544,12 @@ def compute_mesh_to_mesh_interp_weights(x, y, e, xi, yi): elenum = np.zeros(n_points, dtype=int) Dist2EleCenter = np.zeros(n_points) -# t0 = time.time() # UseNearestEle=True for k in range(n_points): x0=xi[k] y0=yi[k] deg2kmX=np.cos( np.pi * y0 / 180.)*deg2kmY - #distances = np.abs((x0 + 1j*y0) - (xc + 1j*yc)) distances = np.abs( deg2kmX*(x0 - xc) + 1j*deg2kmY*(y0 - yc)) -# print(x0) -# print(y0) -# print(e0) -# print(xc) -# print(yc) -# print(distances) if UseNearestEle: jg=np.argmin(distances) else: @@ -640,12 +596,8 @@ def compute_mesh_to_mesh_interp_weights(x, y, e, xi, yi): nodes[k, :] = e[j, :] #<- indexed 1 .. nn # Progress reporting every 100 iterations - if (k + 1) % 10 == 0: -# t1 = time.time() -# time_per_iter = (t1 - t0) / (k + 1) -# time_remaining = (n_points - k - 1) * time_per_iter / 60 + if (k + 1) % 100 == 0: print(f"Progress: {k+1}/{n_points}") -# print(f"Time remaining: {time_remaining:.2f} minutes") return weights, nodes, elenum, Dist2EleCenter @@ -664,14 +616,6 @@ def InterpolateField2Nodes(nodes,weights, f): return fi -#!/bin/bash -#PBS -N my_array_job -#PBS -l select=1:ncpus=1:mem=2gb -#PBS -l walltime=01:00:00 -#PBS -J 1-10%5 -#PBS -o my_job_array_out.txt -#PBS -e my_job_array_err.txt - # Move to the directory where the job was submitted #-->cd $PBS_O_WORKDIR #-->echo "Running on node: $(hostname)" @@ -685,25 +629,8 @@ def WriteInterpJobscriptPBS(fl,flin,mshfl,Njobs, ComputeNodes): WghtFl="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".txt" WghtFl="InterpWeights."+mshfl[meshslash:len(mshfl)-4]+".stofs.txt" WghtFlNetCDF="InterpWeights."+mshfl[meshslash:len(mshfl)-4]+".stofs.nc" -# WghtFlNetCDF="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".nc" - Njobs=64 #OVERWRITE FOR NOW with open(fl, 'w') as f: - -#cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt - - -# From rwps.cron -#PBS -A RWPS-DEV -#PBS -l select=1:ncpus=1:mem=100MB -#PBS -l walltime=02:00:00 -#PBS -q dev -#PBS -N rwps.boss.lsf -#PBS -j oe -#PBS -o rwps.MakeUnstrWghts.out -#PBS -e rwps.MakeUnstrWghts.out - -#PBS -l select=2:ncpus=32:mem=128gb f.write("#PBS -N ESMPy\n") f.write("#PBS -j oe\n") f.write("#PBS -S /bin/bash\n") @@ -734,12 +661,6 @@ def WriteInterpJobscriptPBS(fl,flin,mshfl,Njobs, ComputeNodes): f.write("# calculate interpolation weights in parallel geographically \n") f.write("python ComputeUnstrToRWPSInterpWeights.py "+flin+" "+mshfl+" $PBS_ARRAY_INDEX " + str(Njobs)+" > InterpJob.$PBS_ARRAY_INDEX.out \n") -# f.write("wait\n") -# f.write("# concatonate different parts of the mesh to common text file \n") -# f.write("cat "+TmpOutDir+"/Part.IntrpWghts.*.txt > "+WghtFl+" \n") -# f.write("# convert output weights to netcdf file \n") -# f.write("python ConvertWeights2Netcdf.py "+flin+" "+mshfl+" \n") -# print("to run $qsub -r y "+fl) def WriteInterpJobscriptSLURM(fl,flin,mshfl,Njobs, ComputeNodes): @@ -749,10 +670,8 @@ def WriteInterpJobscriptSLURM(fl,flin,mshfl,Njobs, ComputeNodes): WghtFl="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".txt" WghtFlNetCDF="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".nc" with open(fl, 'w') as f: - #yi[k]=float(values[4]) f.write("#!/bin/bash \n") f.write("#SBATCH --job-name=STOFS_interp_masterscript \n") -# f.write("#SBATCH --ntasks="+str(N)+" \n") f.write("#SBATCH --ntasks=1 \n") # ntasks per interpolation f.write("#SBATCH --time=08:00:00 \n") f.write("#SBATCH --output=mpi_test_%j.log \n") diff --git a/ush/PreProcess/InterpolateWithWeights.py b/ush/PreProcess/InterpolateWithWeights.py index 80c44fa..1edf6f0 100644 --- a/ush/PreProcess/InterpolateWithWeights.py +++ b/ush/PreProcess/InterpolateWithWeights.py @@ -27,10 +27,7 @@ nargin = len(sys.argv) - 1 flin=sys.argv[1] -#mshfl=sys.argv[2] -#meshslash=mshfl.rfind('/')+1 -#weights_file="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".nc" weights_file=sys.argv[2] flout=sys.argv[3] @@ -88,9 +85,6 @@ nt=len(time) -#nt=4 -#time=time[0:nt] - print(time) nvar=len(varname) @@ -201,8 +195,6 @@ " but number of columns in "+ weights_file +" = "+str(Ncols) ) print(" You may need to regnerate file "+ weights_file +" with appropriate weights") -#ne=ei.shape[0] - with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: ncout.createDimension('level' , 1) @@ -239,31 +231,3 @@ xtrp_var[:,:] = IsExtrap[jv,:,:] ncout.close - - -#mesh geometry should be added later -""" - - ncout.createDimension('element' , ne) - ncout.createDimension('noel', 3) - - lon_var=ncout.createVariable('longitude', 'f8', ('node',)) - lon_var.units = 'degree_east' - lon_var.long_name = 'longitude' - lon_var.standard_name = 'longitude' - lon_var.axis = 'X' - lon_var[:]=xi[:] - - lat_var=ncout.createVariable('latitude', 'f8', ('node',)) - lat_var.units = 'degree_north' - lat_var.long_name = 'latitude' - lat_var.standard_name = 'latitude' - lat_var.axis = 'Y' - lat_var[:]=yi[:] - - tri_var=ncout.createVariable('tri', 'i4', ('noel','element')) - tri_var.long_name = 'element list' - tri_var.standard_name = 'element list' - tri_var[:]=np.transpose(ei) -""" - diff --git a/ush/PreProcess/InterpolateWithWeightsAndErrorVariance.py b/ush/PreProcess/InterpolateWithWeightsAndErrorVariance.py index 1ddc6a2..8ba8dc0 100644 --- a/ush/PreProcess/InterpolateWithWeightsAndErrorVariance.py +++ b/ush/PreProcess/InterpolateWithWeightsAndErrorVariance.py @@ -27,10 +27,7 @@ nargin = len(sys.argv) - 1 flin=sys.argv[1] -#mshfl=sys.argv[2] -#meshslash=mshfl.rfind('/')+1 -#weights_file="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".nc" weights_file=sys.argv[2] flout=sys.argv[3] @@ -101,9 +98,6 @@ nt=len(time) -#nt=4 -#time=time[0:nt] - print(time) nvar=len(varname) @@ -203,7 +197,7 @@ print(" You may need to regnerate file "+ weights_file +" with appropriate weights") ########################################################################################## -# CONSTRUCT PRESCRIBED ERROR COVARIANCE FOR UPDATING ESTIMATE +# START: CONSTRUCT PRESCRIBED ERROR COVARIANCE FOR UPDATING ESTIMATE ########################################################################################## #grab variables for prescribing error variance if IcludeErrorVariance: @@ -247,8 +241,9 @@ ErrorVariance=np.zeros((nt,nni)) for k in range(nt): ErrorVariance[k,:]=Variance[:] + ########################################################################################## -# CONSTRUCT PRESCRIBED ERROR COVARIANCE FOR UPDATING ESTIMATE +# FINISHED: CONSTRUCT PRESCRIBED ERROR COVARIANCE FOR UPDATING ESTIMATE ########################################################################################## ne=ei.shape[0] @@ -332,5 +327,3 @@ ErrorVariance_var[:,:]=ErrorVariance ncout.close - - diff --git a/ush/PreProcess/ProcessCurrents.sh b/ush/PreProcess/ProcessCurrents.sh index bb44c37..55071f2 100644 --- a/ush/PreProcess/ProcessCurrents.sh +++ b/ush/PreProcess/ProcessCurrents.sh @@ -1,13 +1,4 @@ #!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=00:05:00 -#PBS -l select=1:ncpus=1:mem=8G -#PBS -l place=excl -#PBS -l debug=true module reset module load PrgEnv-intel/8.5.0 @@ -21,33 +12,25 @@ module load ve/hafs/2.1 pip list -v -#date="20260602" -#cycl="00" -#mesh="meshes/RWPS.V0a.small.msh" - -#date=$1 -#cycl=$2 -#mesh=$3 - source ./rwpsenv meshname="${mesh##*/}" meshname="${meshname: 0: -4}" -stofscur="stofs.$date.$cycl/stofs_2d_glo.t${cycl}z.fields.cwl.vel.nc" -rtofscur="rtofs.$date.nc" +stofscur="stofs.$PDY.$cyc/stofs_2d_glo.t${cycl}z.fields.cwl.vel.nc" +rtofscur="rtofs.$PDY.nc" varnames="u-vel:v-vel" #name of blended wind -combinedcur=$frc/$meshname.$date.$cycl.vel.stofsxrtofs.nc +combinedcur=$frc/$meshname.$PDY.$cyc.vel.stofsxrtofs.nc echo "outputting combined stofs and rtofs currents to $combinedcur" ## STOFS interpolation stofs_wghts="$fix/InterpolationWeights.$meshname.stofs.nc" stofs_dists="$fix/DistToBndy.$meshname.stofs.nc" -stofs_rwps="$tmp/$meshname.$date.$cycl.vel.cwl.stofs.nc" -stofs_rwps_ti="$tmp/$meshname.$date.$cycl.vel.cwl.stofs.ti.nc" +stofs_rwps="$tmp/$meshname.$PDY.$cyc.vel.cwl.stofs.nc" +stofs_rwps_ti="$tmp/$meshname.$PDY.$cyc.vel.cwl.stofs.ti.nc" if [ ! -f "$stofs_wghts" ]; then echo "missing stofs interpolation weights file: $stofs_wghts" @@ -66,8 +49,8 @@ python InterpolateWithWeights.py $stofscur $stofs_wghts $stofs_rwps $varnames 0 ## RTOFS interpolation rtofs_wghts="$fix/InterpolationWeights.$meshname.rtofs.currents.nc" rtofs_dists="$fix/DistToBndy.$meshname.rtofs.currents.nc" -rtofs_rwps="$tmp/$meshname.$date.vel.rtofs.nc" -rtofs_rwps_ti="$tmp/$meshname.$date.$cycl.vel.cwl.rtofs.ti.nc" +rtofs_rwps="$tmp/$meshname.$PDY.vel.rtofs.nc" +rtofs_rwps_ti="$tmp/$meshname.$PDY.$cyc.vel.cwl.rtofs.ti.nc" if [ ! -f "$rtofs_wghts" ]; then echo "missing rtofs interpolation weights file: $stofs_wghts" @@ -79,6 +62,7 @@ if [ ! -f "$rtofs_dists" ]; then echo "compute with script ComputeUnstrToRWPSInterpWeights.py" exit 2 fi + # no extrapolation python InterpolateWithWeights.py $rtofscur $rtofs_wghts $rtofs_rwps $varnames -1 & @@ -87,10 +71,6 @@ wait; python AddMeshGeomToFile.py $rtofs_rwps $mesh python AddMeshGeomToFile.py $stofs_rwps $mesh -#python AddErrVarToFile.py $rtofs_rwps $rtofs_dists 100.:1.:50.:250.:50. -#python AddErrVarToFile.py $stofs_rwps $stofs_dists 1.:100.:50.:250. - -#interpolate from stofs to common stofs and rtofs times within range of stofs time python InterpTime.py $stofs_rwps $rtofs_rwps $stofs_rwps_ti $varnames False & #interpolate from rtofs to common stofs and rtofs times within range of stofs time diff --git a/ush/PreProcess/ProcessIce.sh b/ush/PreProcess/ProcessIce.sh index 29396cd..7107e75 100644 --- a/ush/PreProcess/ProcessIce.sh +++ b/ush/PreProcess/ProcessIce.sh @@ -1,13 +1,4 @@ #!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=00:05:00 -#PBS -l select=1:ncpus=1:mem=8G -#PBS -l place=excl -#PBS -l debug=true module reset module load PrgEnv-intel/8.5.0 @@ -21,24 +12,16 @@ module load ve/hafs/2.1 pip list -v -#date="20260602" -#cycl="00" -#mesh="meshes/RWPS.V0a.small.msh" - -#date=$1 -#cycl=$2 -#mesh=$3 - source ./rwpsenv meshname="${mesh##*/}" meshname="${meshname: 0: -4}" -inpdir=ice.$date.$cycl +inpdir=ice.$PDY.$cyc -nbmice=$inpdir/nbm.$date.$cycl.ice.ak.nc -rtofsice=$inpdir/rtofs.ice.$date.nc +nbmice=$inpdir/nbm.$PDY.$cyc.ice.ak.nc +rtofsice=$inpdir/rtofs.ice.$PDY.nc rtofs_wghts="$fix/InterpolationWeights.$meshname.rtofs.ice.nc" @@ -46,15 +29,15 @@ rtofs_dists="$fix/DistToBndy.$meshname.rtofs.ice.nc" nbm_ak_wghts="$fix/InterpolationWeights.$meshname.nbm.ak.nc" nbm_ak_dists="$fix/DistToBndy.$meshname.nbm.ak.nc" -rtofs_rwps="$tmp/$meshname.$date.ice.rtofs.nc" -rtofs_rwps_ti="$tmp/$meshname.$date.$cycl.ice.rtofs.ti.nc" +rtofs_rwps="$tmp/$meshname.$PDY.ice.rtofs.nc" +rtofs_rwps_ti="$tmp/$meshname.$PDY.$cyc.ice.rtofs.ti.nc" -nbm_rwps="$tmp/$meshname.$date.$cycl.ice.nbm.ak.nc" -nbm_rwps_ti="$tmp/$meshname.$date.$cycl.ice.nbm.ak.ti.nc" +nbm_rwps="$tmp/$meshname.$PDY.$cyc.ice.nbm.ak.nc" +nbm_rwps_ti="$tmp/$meshname.$PDY.$cyc.ice.nbm.ak.ti.nc" varnames="ICEC_surface" -combinedice="$frc/$meshname.$date.$cycl.ice.rtofsxnbm.nc" +combinedice="$frc/$meshname.$PDY.$cyc.ice.rtofsxnbm.nc" ## NBM AK domain interpolation ## NOTE WE ARE USING THE RRFS ak WEIGHTS HERE NEED TO RELABEL AND RECOMPUTE FOR NBM AK DOMAIN diff --git a/ush/PreProcess/ProcessWaterLevel.sh b/ush/PreProcess/ProcessWaterLevel.sh index e8a54e9..91827da 100644 --- a/ush/PreProcess/ProcessWaterLevel.sh +++ b/ush/PreProcess/ProcessWaterLevel.sh @@ -1,13 +1,4 @@ #!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=00:05:00 -#PBS -l select=1:ncpus=1:mem=8G -#PBS -l place=excl -#PBS -l debug=true module reset module load PrgEnv-intel/8.5.0 @@ -21,20 +12,16 @@ module load ve/hafs/2.1 pip list -v -#date=$1 -#cycl=$2 -#mesh=$3 - source ./rwpsenv meshname="${mesh##*/}" meshname="${meshname: 0: -4}" -stofslev="stofs.$date.$cycl/stofs_2d_glo.t${cycl}z.fields.cwl.nc" +stofslev="stofs.$PDY.$cyc/stofs_2d_glo.t${cycl}z.fields.cwl.nc" stofs_wghts="$fix/InterpolationWeights.$meshname.stofs.nc" stofs_dists="$fix/DistToBndy.$meshname.stofs.nc" -stofs_rwps="$frc/$meshname.$date.$cycl.cwl.stofs.nc" +stofs_rwps="$frc/$meshname.$PDY.$cyc.cwl.stofs.nc" varnames="zeta" diff --git a/ush/PreProcess/ProcessWinds.sh b/ush/PreProcess/ProcessWinds.sh index 8e5a4d4..5ca8191 100644 --- a/ush/PreProcess/ProcessWinds.sh +++ b/ush/PreProcess/ProcessWinds.sh @@ -1,13 +1,4 @@ #!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=00:05:00 -#PBS -l select=1:ncpus=1:mem=8G -#PBS -l place=excl -#PBS -l debug=true module reset module load PrgEnv-intel/8.5.0 @@ -21,19 +12,9 @@ module load ve/hafs/2.1 pip list -v -##date="20260527" -#date=20260602 -#cycl="00" -#mesh=meshes/RWPS.V0a.small.msh - -#date=$1 -#cycl=$2 -#mesh=$3 - source ./rwpsenv -#winddir="forecasts/wind.$date.$cycl" -winddir="wind.$date.$cycl" +winddir="wind.$PDY.$cyc" windvars="UGRD_10maboveground:VGRD_10maboveground" # extract mesh name from file path @@ -44,36 +25,32 @@ meshname="${meshname: 0: -4}" # incorporate meshname date and cycle into output directory name to avoid # applying winds to wrong mesh -#outdir="rwps_winds.$meshname.$date.$cycl" -outdir="$tmp/rwps_winds.$meshname.$date.$cycl" +outdir="$tmp/rwps_winds.$meshname.$PDY.$cyc" -rwps_est="$frc/rwps.est.$meshname.$date.$cycl.wind10m.nc" +rwps_est="$frc/rwps.est.$meshname.$PDY.$cyc.wind10m.nc" echo "outputing files to: $outdir" -nbm_oc="$winddir/nbm.$date.$cycl.wind10m.oc.nc" -nbm_oc_uv="$winddir/nbm.$date.$cycl.wind10m.oc.uv.nc" +nbm_oc="$winddir/nbm.$PDY.$cyc.wind10m.oc.nc" +nbm_oc_uv="$winddir/nbm.$PDY.$cyc.wind10m.oc.uv.nc" -rrfs_pr="$winddir/rrfs.$date.$cycl.wind10m.pr.nc" -rrfs_hi="$winddir/rrfs.$date.$cycl.wind10m.hi.nc" -rrfs_na="$winddir/rrfs.$date.$cycl.wind10m.na.nc" -rrfs_ak="$winddir/rrfs.$date.$cycl.wind10m.ak.nc" -rrfs_conus="$winddir/rrfs.$date.$cycl.wind10m.conus.nc" +rrfs_pr="$winddir/rrfs.$PDY.$cyc.wind10m.pr.nc" +rrfs_hi="$winddir/rrfs.$PDY.$cyc.wind10m.hi.nc" +rrfs_na="$winddir/rrfs.$PDY.$cyc.wind10m.na.nc" +rrfs_ak="$winddir/rrfs.$PDY.$cyc.wind10m.ak.nc" +rrfs_conus="$winddir/rrfs.$PDY.$cyc.wind10m.conus.nc" -rwps_oc="$outdir/$meshname.$date.$cycl.wind10m.nbm.oc.nc" -rwps_oc_ti="$outdir/$meshname.$date.$cycl.wind10m.nbm.oc.ti.nc" -rwps_pr="$outdir/$meshname.$date.$cycl.wind10m.rrfs.pr.nc" -rwps_hi="$outdir/$meshname.$date.$cycl.wind10m.rrfs.hi.nc" -rwps_na="$outdir/$meshname.$date.$cycl.wind10m.rrfs.na.nc" -rwps_ak="$outdir/$meshname.$date.$cycl.wind10m.rrfs.ak.nc" -rwps_conus="$outdir/$meshname.$date.$cycl.wind10m.rrfs.conus.nc" +rwps_oc="$outdir/$meshname.$PDY.$cyc.wind10m.nbm.oc.nc" +rwps_oc_ti="$outdir/$meshname.$PDY.$cyc.wind10m.nbm.oc.ti.nc" +rwps_pr="$outdir/$meshname.$PDY.$cyc.wind10m.rrfs.pr.nc" +rwps_hi="$outdir/$meshname.$PDY.$cyc.wind10m.rrfs.hi.nc" +rwps_na="$outdir/$meshname.$PDY.$cyc.wind10m.rrfs.na.nc" +rwps_ak="$outdir/$meshname.$PDY.$cyc.wind10m.rrfs.ak.nc" +rwps_conus="$outdir/$meshname.$PDY.$cyc.wind10m.rrfs.conus.nc" mkdir $outdir - -##weights_file = "InterpolationWeights."+mshfl[meshslash:len(mshfl)-3]+dom+".nc" - ##LocalFS = [ rwps_pr, rwps_hi, rwps_ak, rwps_conus, rwps_na] # file names ##VarFS = [ 4. , 4. , 9. , 16. , 25. ] # (m m /s /s) ##LambdaFS = [ 150. , 200. , 500. , 1000. , 1500. ] # (km) @@ -141,6 +118,7 @@ rrfs_conus_dist="$fix/DistToBndy.$meshname.rrfs.conus.nc" )& wait; + #Interpolate NBM in time to times within the NBM forecast covered by the RRFS forecast python InterpTime.py $rwps_oc $rwps_pr $rwps_oc_ti $windvars #add mesh geometry into file diff --git a/ush/PreProcess/SpdDir2UVnbm.py b/ush/PreProcess/SpdDir2UVnbm.py index e25aaa1..18f5795 100644 --- a/ush/PreProcess/SpdDir2UVnbm.py +++ b/ush/PreProcess/SpdDir2UVnbm.py @@ -2,14 +2,15 @@ import argparse import numpy as np import netCDF4 as nc -#import jigsawpy import sys import math + +# Converts NBM direction and magnitude wind variables to U,V + + flin=sys.argv[1] flout=sys.argv[2] -#fld="wdir10m.nc" -#fls="wspd10m.nc" -#flout="wind.08.31.WW3.nc" + fcst0 = nc.Dataset(flin,"r") x=np.asarray(fcst0["longitude"][:]) @@ -21,12 +22,6 @@ spdV=fcst0["WIND_10maboveground"] fill_value0 = spdV._FillValue -print("fil val") -print(fill_value0) - -print("spd shape") -print(spd.shape) - u=-1*spd*np.sin(theta*np.pi/180.) v=-1*spd*np.cos(theta*np.pi/180.) u[np.where(spd==fill_value0)]=fill_value0 @@ -37,7 +32,7 @@ nt=len(t) with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: - # Create dimensions + # Create dimensions ncout.createDimension('lon' , nx) # Unlimited dimension ncout.createDimension('lat' , ny) ncout.createDimension('time', nt) @@ -63,14 +58,12 @@ time_var.axis = 'time' time_var[:]=t[:] -# u_var=ncout.createVariable('UGRD_10maboveground', 'f4', ('lon','lat','time'),fill_value = -99999) u_var=ncout.createVariable('UGRD_10maboveground', 'f4', ('time','lat','lon'),fill_value = fill_value0) u_var.long_name = 'U-Component of Wind' u_var.units = 'm/s' u_var.standard_name = 'UGRD_10maboveground' u_var.level = '10 m above ground' u_var[:,:,:]=u[:,:,:] -# u_var[:,:,:]=np.transpose(u[:,:,:],(2,1,0)) v_var=ncout.createVariable('VGRD_10maboveground', 'f4', ('time','lat','lon'),fill_value = fill_value0) v_var.long_name = 'V-Component of Wind' @@ -78,8 +71,6 @@ v_var.standard_name = 'VGRD_10maboveground' v_var.level = '10 m above ground' v_var[:,:,:]=v[:,:,:] -# v_var[:,:,:]=np.transpose(v[:,:,:],(2,1,0)) - ncout.close diff --git a/ush/PreProcess/nbm/ConvertNBMIcetif2NetCDF.py b/ush/PreProcess/nbm/ConvertNBMIcetif2NetCDF.py index 5c4701d..bd62981 100644 --- a/ush/PreProcess/nbm/ConvertNBMIcetif2NetCDF.py +++ b/ush/PreProcess/nbm/ConvertNBMIcetif2NetCDF.py @@ -1,8 +1,3 @@ -#aws s3 ls --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/ | g ice -#aws s3 cp --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/iceconcentration/blendv5.0_alaska_iceconcentration_2026-05-07T00:00_2026-05-08T12:00.tif ./ -#aws s3 cp --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/icethickness/blendv5.0_alaska_icethickness_2026-05-07T00:00_2026-05-08T12:00.tif ./ -#pip install rioxarray xarray pyproj numpy NetCDF4 -#python ConvertNBMIcetif2NetCDF.py iceconcentration/blendv5.0_alaska_iceconcentration_2026-05-07T00:00_2026-05-08T12:00.tif import numpy as np import pyproj import rioxarray as rio @@ -38,7 +33,6 @@ # 7. Build the NetCDF dataset with 2D curvilinear coordinates ds = xr.Dataset( data_vars={"variable_name": (["y", "x"], data_var.values)}, -# data_vars={"Band1": (["y", "x"], data_var.values)}, coords={ "lon": (["y", "x"], lon_2d), "lat": (["y", "x"], lat_2d), diff --git a/ush/PreProcess/nbm/GetNBMIce.sh b/ush/PreProcess/nbm/GetNBMIce.sh index 6195ba6..bd144e4 100755 --- a/ush/PreProcess/nbm/GetNBMIce.sh +++ b/ush/PreProcess/nbm/GetNBMIce.sh @@ -1,24 +1,16 @@ #!/bin/bash + # This is just a place holder with notes for the time being. Notes on aws retrieval and processing are below # This script takes rrfs grib2 forecast files, extracts 10m u and v wind # components and outputs to netcdf. Comand line arguments are -# with aws- make a -#aws s3 ls --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/ | g ice -#aws s3 cp --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/iceconcentration/blendv5.0_alaska_iceconcentration_2026-05-07T00:00_2026-05-08T12:00.tif ./ -#aws s3 cp --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/icethickness/blendv5.0_alaska_icethickness_2026-05-07T00:00_2026-05-08T12:00.tif ./ -#pip install rioxarray xarray pyproj numpy NetCDF4 -#python ConvertNBMIcetif2NetCDF.py iceconcentration/blendv5.0_alaska_iceconcentration_2026-05-07T00:00_2026-05-08T12:00.tif - -#for all files -#aws s3 cp --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/icethickness/ . --recursive --exclude "*" --include "*alaska_icethickness_*" -# + module load intel-oneapi/2022.2.0.262 module load wgrib2/2.0.8 INPUT_DIR="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.$1/$2/grib2" -# /lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.20260729/00/grib2/blend.t00z.icec.ak.grib2 + ICE_FILE="$INPUT_DIR/blend.t$2z.icec.ak.grib2" OUTPUT_DIR="ice.$1.$2" diff --git a/ush/PreProcess/nbm/MakeNBMWind.sh b/ush/PreProcess/nbm/MakeNBMWind.sh index 2150074..62a6f00 100755 --- a/ush/PreProcess/nbm/MakeNBMWind.sh +++ b/ush/PreProcess/nbm/MakeNBMWind.sh @@ -6,7 +6,6 @@ module load intel-oneapi/2022.2.0.262 module load wgrib2/2.0.8 -#INPUT_DIR="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.1/blend.$1/$2/grib2" INPUT_DIR="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.$1/$2/grib2" WSPD_FILE="$INPUT_DIR/blend.t$2z.wspd.$3.grib2" WDIR_FILE="$INPUT_DIR/blend.t$2z.wdir.$3.grib2" diff --git a/ush/PreProcess/nbm/MakeNBMWindUV.sh b/ush/PreProcess/nbm/MakeNBMWindUV.sh deleted file mode 100644 index 97eeda5..0000000 --- a/ush/PreProcess/nbm/MakeNBMWindUV.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -# This script takes rrfs grib2 forecast files, extracts 10m u and v wind -# components and outputs to netcdf. Comand line arguments are -# forecast time: YYYYMMDD -# forecast cycle: CC -# frecast region: hi,pr,na,ak or conus -# -# For example call as: -# sh MakeRRFSWind.sh 20260428 00 pr -# to produce output file: -# rrfs.20260428.00.wind10m.pr.nc -# -# ensemble(of n=5) output is available: -#/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.20260428/00/m001 -#/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.20260428/00/m002 -#/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.20260428/00/m003 -#/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.20260428/00/m004 -#/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.20260428/00/m005 -# wgrib2 input.grib2 -wind_uv output.grib2 - -INPUT_DIR="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.0/blend.$1/$2/grib2" -WSPD_FILE="$INPUT_DIR/blend.t00z.wspd.$3.grib2" -WDIR_FILE="$INPUT_DIR/blend.t00z.wdir.$3.grib2" - -module load intel-oneapi/2022.2.0.262 -module load wgrib2/2.0.8 - -OUTPUT_FILE="nbm.$1.$2.wind10m.$3.nc" - -# Remove existing output file to avoid mixing old data -rm -f "$OUTPUT_FILE" - -echo "writing 10m wind from $INPUT_DIR to $OUTPUT_FILE" - -# wgrib2 "$WSPD_FILE" -match ":WIND:10 m" -netcdf "$OUTPUT_FILE" -# wgrib2 "$WDIR_FILE" -match ":WDIR:10 m" -append -netcdf "$OUTPUT_FILE" - -wgrib2 "$WSPD_FILE" -match ":WIND:10 m" tmp.grib2 -wgrib2 "$WDIR_FILE" -match ":WDIR:10 m" -append tmp.grib2 - -wgrib2 tmp.grib2 -wind_uv -netcdf "$OUTPUT_FILE" - -# Note: Ensure files are in the correct chronological order (e.g., sorted by name) -#for file in $(ls "$INPUT_DIR"/rrfs.t00z.2dfld.*km.f*.$3.grib2 | sort); do -# echo "Processing: $file" - # Convert and append to the NetCDF file - # -netcdf: specifies the output format and filename - # -append: adds data to the existing netcdf file instead of overwriting -# wgrib2 "$file" -match ":UGRD:10 m" -append -netcdf "$OUTPUT_FILE" -# wgrib2 "$file" -match ":VGRD:10 m" -append -netcdf "$OUTPUT_FILE" -#done - -echo "nbm processing complete for forecast date $1, cycle $2, domain $3" -echo "output written to: $OUTPUT_FILE" diff --git a/ush/PreProcess/rrfs/MakeEnsRRFSWind.sh b/ush/PreProcess/rrfs/MakeEnsRRFSWind.sh index bac5ef3..8e38fc3 100644 --- a/ush/PreProcess/rrfs/MakeEnsRRFSWind.sh +++ b/ush/PreProcess/rrfs/MakeEnsRRFSWind.sh @@ -15,7 +15,6 @@ module load intel-oneapi/2022.2.0.262 module load wgrib2/2.0.8 -#INPUT_DIR="/lfs/h1/ops/para/com/rrfs/v1.0/rrfs.$1/$2" OUTPUT_FILE="rrfs.ensemble.$1.$2.wind10m.$3.nc" INPUT_DIR1="/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.$1/$2/m001/" @@ -57,20 +56,6 @@ for file1 in $(ls "$INPUT_DIR1"/rrfs.t$2z.m001.2dfld.*km.f*.$3.grib2 | sort); do wgrib2 $file5 -match ":UGRD:10 m" -nc_table varname5.txt -append -netcdf "$OUTPUT_FILE" wgrib2 $file5 -match ":VGRD:10 m" -nc_table varname5.txt -append -netcdf "$OUTPUT_FILE" -# wgrib2 $file2 -nc_table varname2.txt -append -netcdf "$OUTPUT_FILE" -# wgrib2 $file3 -nc_table varname3.txt -append -netcdf "$OUTPUT_FILE" -# wgrib2 $file4 -nc_table varname4.txt -append -netcdf "$OUTPUT_FILE" -# wgrib2 $file5 -nc_table varname5.txt -append -netcdf "$OUTPUT_FILE" - - -# cat $file1 $file2 $file3 $file4 $file5 | wgrib2 - -match ":(UGRD|VGRD):10 m" -append -netcdf "$OUTPUT_FILE" -# equivalent alternates -# cat $file1 $file2 $file3 $file4 $file5 > ensemble.grib2 -# wgrib2 ensemble.grib2 -match ":UGRD:10 m" -append -netcdf "$OUTPUT_FILE" -# wgrib2 ensemble.grib2 -match ":VGRD:10 m" -append -netcdf "$OUTPUT_FILE" -# or -# cat $file1 $file2 $file3 $file4 $file5 | wgrib2 - -match ":UGRD:10 m" -append -netcdf "$OUTPUT_FILE" -# cat $file1 $file2 $file3 $file4 $file5 | wgrib2 - -match ":VGRD:10 m" -append -netcdf "$OUTPUT_FILE" done echo "rrfs ensemble processing complete for forecast date $1, cycle $2, domain $3" diff --git a/ush/PreProcess/rtofs/GetRTOFS.sh b/ush/PreProcess/rtofs/GetRTOFS.sh index 9f31806..928f762 100755 --- a/ush/PreProcess/rtofs/GetRTOFS.sh +++ b/ush/PreProcess/rtofs/GetRTOFS.sh @@ -1,13 +1,6 @@ #!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=00:05:00 -#PBS -l select=1:ncpus=1:mem=8G -#PBS -l place=excl -#PBS -l debug=true + +#Retrieve global RTOFS currents and consolidate into a single NetCDF file module reset module load PrgEnv-intel/8.5.0 @@ -21,13 +14,11 @@ module load ve/hafs/2.1 pip list -v -date=$1 - -tmpdir="tmp.rtofs.$date" -filesin="/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs.$date/*prog.nc" -flout="rtofs.$date.nc" +tmpdir="$COMINlocal/tmp.rtofs.$PDY" +filesin="$COMINrtofs/*prog.nc" +flout="$COMINlocal/rtofs.$PDY.nc" -mkdir $tmpdir +mkdir -p $tmpdir cp $filesin $tmpdir/ python rtofs/GetRTOFSfcst.py $tmpdir $flout diff --git a/ush/PreProcess/rtofs/GetRTOFSIce.sh b/ush/PreProcess/rtofs/GetRTOFSIce.sh index 8e915ce..23e77a9 100755 --- a/ush/PreProcess/rtofs/GetRTOFSIce.sh +++ b/ush/PreProcess/rtofs/GetRTOFSIce.sh @@ -1,19 +1,6 @@ #!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=00:05:00 -#PBS -l select=1:ncpus=1:mem=8G -#PBS -l place=excl -#PBS -l debug=true - - -#"rtofs_glo_3dz_n006_6hrly_hvr_alaska.nc" - -#/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs.20260727/rtofs_glo_2ds_f186_ice.nc +#Retrieve global RTOFS ice forecast and consolidate in single NetCDF filesin module reset module load PrgEnv-intel/8.5.0 @@ -27,13 +14,10 @@ module load ve/hafs/2.1 pip list -v -date=$1 -cycl=$2 - -tmpdir="tmp.rtofsIce.$date" -filesin="/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs.$date/*ice.nc" -dirout=ice.$date.$cycl -flout="$dirout/rtofs.ice.$date.nc" +tmpdir="$COMINlocal/tmp.rtofsIce.$PDY" +filesin="$COMINrtofs/*ice.nc" +dirout="$COMINlocal/ice.$PDY.$cyc +flout="$COMINlocal/rtofs.ice.$PDY.nc" mkdir $tmpdir cp $filesin $tmpdir/ diff --git a/ush/PreProcess/rtofs/GetRTOFSIcefcst.py b/ush/PreProcess/rtofs/GetRTOFSIcefcst.py index 9b7eb8d..ecc68d6 100644 --- a/ush/PreProcess/rtofs/GetRTOFSIcefcst.py +++ b/ush/PreProcess/rtofs/GetRTOFSIcefcst.py @@ -1,13 +1,11 @@ -# aws s3 cp --no-sign-request s3://noaa-nws-rtofs-pds/rtofs.20260115/ ./rtofs_jan2026_ice/ --recursive --exclude "*" --include "*ice*" -#Consolidate ice_coverage from RTOFS forecast files import numpy as np import os import netCDF4 as nc import sys +#Consolidate RTOFS ice forecast files to a single NetCDF file. + # Get the path relative to this file and add to sys.path -#sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'utils'))) -#import helper sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) import InterpUtilities as iutil @@ -33,39 +31,21 @@ print(F.shape) for k in range(nt): flin=dirin+"/"+ncfiles[k] - flinT=flin.replace("Ice","") flinT=flinT.replace("ice","prog") - print("ICE: org flin="+flin+" Time flin="+flinT) - dataT=nc.Dataset(flinT,"r") - data=nc.Dataset(flin,"r") F0=data["ice_coverage"][:] -# T0=data["MT"][:] - T0=dataT["MT"][:] - + T0=dataT["MT"][:] print(F0.shape) print(F.shape) print(str(k)+" of "+ str(nt)) F[k,:,:]=F0[0,:,:] MT[k]=T0 -# tmp=iutil.ConvertTimeToUnixTime(flin,"MT") - tmp=iutil.ConvertTimeToUnixTime(flinT,"MT") - time[k]=tmp[0] -#-rw-r--r-- 1 keston.smith couple 64M Jul 29 17:59 tmp.rtofsIce.20260728/rtofs_glo_2ds_f007_ice.nc -#-rw-r--r-- 1 keston.smith couple 64M Jul 29 17:59 tmp.rtofsIce.20260728/rtofs_glo_2ds_n007_ice.nc -#keston.smith@dlogin06:/lfs/h2/emc/couple/noscrub/keston.smith/RWPSInterpolationUtilities> l tmp.rtofs.20260728/*007*nc -#-rw-r--r-- 1 keston.smith couple 149M Jul 29 17:49 tmp.rtofs.20260728/rtofs_glo_2ds_f007_prog.nc -#-rw-r--r-- 1 keston.smith couple 149M Jul 29 17:50 tmp.rtofs.20260728/rtofs_glo_2ds_n007_prog.nc - - - - tindx = np.argsort(time) time=time[tindx] MT=MT[tindx] @@ -86,7 +66,7 @@ var=data["Latitude"] iutil.CopyAttributes(var, lat_var) lat_var[:,:]=Y[:,:] - + # Keep redundent time variables (time and MT) for conviniences time_var=ncout.createVariable('time', 'f8', ('time',)) time_var.units = 'seconds since 1970-01-01 00:00:00.0 0:00' @@ -94,13 +74,12 @@ time_var.standard_name = 'time' time_var.axis = 'T' time_var[:] = time[:] - + MT_var=ncout.createVariable("MT", 'f8', ('time',)) var=data["MT"] iutil.CopyAttributes(var, MT_var) MT_var[:] = MT[:] -# f_var = ncout.createVariable('ice_coverage', 'f4', ('time','X','Y'),fill_value = fill_value0) f_var = ncout.createVariable('ICEC_surface', 'f4', ('time','X','Y'),fill_value = fill_value0) var=data["ice_coverage"] iutil.CopyAttributes(var, f_var) diff --git a/ush/PreProcess/rtofs/GetRTOFSfcst.py b/ush/PreProcess/rtofs/GetRTOFSfcst.py index 290f7e2..b6ca7d0 100644 --- a/ush/PreProcess/rtofs/GetRTOFSfcst.py +++ b/ush/PreProcess/rtofs/GetRTOFSfcst.py @@ -1,20 +1,18 @@ -# Consolidate u,v surface currents from import numpy as np import os import netCDF4 as nc import sys +import InterpUtilities as iutil + +# Consolidate u,v surface currents from global RTOFS into a sinble NetCDF file. # Get the path relative to this file and add to sys.path -#sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'utils'))) -#import helper sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) -import InterpUtilities as iutil dirin=sys.argv[1] flout=sys.argv[2] ncfiles = os.listdir(dirin) -print(ncfiles) nt=len(ncfiles) k=0 flin=dirin+"/"+ncfiles[k] diff --git a/ush/PreProcess/stofs/GetSTOFS.sh b/ush/PreProcess/stofs/GetSTOFS.sh index 04ff98b..4c7404b 100755 --- a/ush/PreProcess/stofs/GetSTOFS.sh +++ b/ush/PreProcess/stofs/GetSTOFS.sh @@ -1,9 +1,6 @@ #!/bin/bash -##script for retrieving stofs current and/or water level - -date=$1 -cycl=$2 +#script for retrieving stofs current and/or water level if [ "$#" -lt 3 ]; then echo "No arguments field argument." @@ -13,15 +10,15 @@ else fields=$3 fi -mkdir stofs.$date.$cycl +mkdir stofs.$PDY.$cyc if [[ "$fields" == *"current"* ]]; then - echo retrieving stofs current for $date cycle $cycl - cp /lfs/h1/ops/prod/com/stofs/v2.1/stofs_2d_glo.$date/stofs_2d_glo.t"$cycl"z.fields.cwl.vel.nc stofs.$date.$cycl/ + echo retrieving stofs current for $PDY cycle $cyc + cp /lfs/h1/ops/prod/com/stofs/v2.1/stofs_2d_glo.$PDY/stofs_2d_glo.t"$cyc"z.fields.cwl.vel.nc stofs.$PDY.$cyc/ fi if [[ "$fields" == *"level"* ]]; then - echo retrieving stofs water level for $date cycle $cycl - cp /lfs/h1/ops/prod/com/stofs/v2.1/stofs_2d_glo.$date/stofs_2d_glo.t"$cycl"z.fields.cwl.nc stofs.$date.$cycl/ + echo retrieving stofs water level for $PDY cycle $cyc + cp /lfs/h1/ops/prod/com/stofs/v2.1/stofs_2d_glo.$PDY/stofs_2d_glo.t"$cyc"z.fields.cwl.nc stofs.$PDY.$cyc/ fi From 4ba7b2d3329b83c11c087f4a2e6c3f6739f6a0a3 Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa Date: Thu, 13 Aug 2026 17:41:05 +0000 Subject: [PATCH 07/39] seperated preprocessing jobs by field and moved to ecf(wcoss2 version). fixed paths for some variables and simplified envvar names --- ecf/GenerateInterpolationWeights.ecf | 102 ++++++++++++++++++ ecf/jrwps_prep_currents.ecf | 34 ++++++ ecf/jrwps_prep_ice.ecf | 40 +++++++ ecf/jrwps_prep_waterlevel.ecf | 30 ++++++ ecf/jrwps_prep_wind.ecf | 34 ++++++ ...GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh | 97 ----------------- ush/PreProcess/GetAllFocing.jobcard.sh | 80 -------------- ush/PreProcess/GetAllFocing.sh | 62 ----------- ush/PreProcess/GetCurrents.sh | 2 +- ush/PreProcess/GetIce.sh | 4 +- ush/PreProcess/ProcessCurrents.sh | 11 +- ush/PreProcess/ProcessIce.sh | 7 +- ush/PreProcess/ProcessWaterLevel.sh | 5 +- ush/PreProcess/ProcessWinds.sh | 14 +-- ush/PreProcess/nbm/GetNBMIce.sh | 11 +- ush/PreProcess/nbm/MakeNBMWind.sh | 7 +- ush/PreProcess/rrfs/MakeRRFSWind.sh | 7 +- ush/PreProcess/rtofs/GetRTOFS.sh | 2 + ush/PreProcess/rtofs/GetRTOFSIce.sh | 10 +- ush/PreProcess/rtofs/GetRTOFSfcst.py | 7 +- ush/PreProcess/rwpsenv | 25 +++-- ush/PreProcess/stofs/GetSTOFS.sh | 13 ++- 22 files changed, 321 insertions(+), 283 deletions(-) create mode 100644 ecf/GenerateInterpolationWeights.ecf create mode 100644 ecf/jrwps_prep_currents.ecf create mode 100644 ecf/jrwps_prep_ice.ecf create mode 100644 ecf/jrwps_prep_waterlevel.ecf create mode 100644 ecf/jrwps_prep_wind.ecf delete mode 100644 ush/PreProcess/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh delete mode 100644 ush/PreProcess/GetAllFocing.jobcard.sh delete mode 100644 ush/PreProcess/GetAllFocing.sh diff --git a/ecf/GenerateInterpolationWeights.ecf b/ecf/GenerateInterpolationWeights.ecf new file mode 100644 index 0000000..e78bf95 --- /dev/null +++ b/ecf/GenerateInterpolationWeights.ecf @@ -0,0 +1,102 @@ +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=04:00:00 +##PBS -l select=1:ncpus=8:mem=128GB +#PBS -l select=1:ncpus=16:mem=256GB +###PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + +pip list -v + +cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/PreProcess + +source SetMeshName + +SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" +date="20260730" +cycl="00" +Nprocs=16 + + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +rrfs_hi=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.hi.nc +rrfs_pr=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.pr.nc +rrfs_ak=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.ak.nc +rrfs_na=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.na.nc +rrfs_conus=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.conus.nc + +out="../../fix" + + + +rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" +rrfsDst="$out/DistToBndy.$meshname.rrfs" + +#no extrapolation with rrfs forecasts +python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out +python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_pr $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 > GenWhts.rrfs.pr.out +python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_ak $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 > GenWhts.rrfs.ak.out +python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_na $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 > GenWhts.rrfs.na.out +python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_conus $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out + +nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc +nbmIntrp="$out/InterpolationWeights.$meshname.nbm" +nbmDst="$out/DistToBndy.$meshname.nbm" +#extrapolate nbm oc wind to all points +python ./ComputeGriddedToRWPSInterpWeights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out + +nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc +#do not extrapolate for NBM .ak. domain +python ./ComputeGriddedToRWPSInterpWeights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out + +rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc +rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" +rtofsDst="$out/DistToBndy.$meshname.rtofs" + +#extrapolate rtofs .glo. for full ice coverage + +python ./ComputeGriddedToRWPSInterpWeights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out + + +rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc +#do not extrapolate rtofs .glo. currents +python ./ComputeGriddedToRWPSInterpWeights.py $rtofs_cur $mesh $rtofsIntrp.currents.nc $rtofsDst.currents.nc -1 > GenWhts.rtofs.currents.out + + +cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/dev/PreProcess + +stofs_glo="$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" + +## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python ComputeUnstrToRWPSInterpWeights.py $stofs_glo $mesh $Nprocs + +## Now run parallel job script + +qsub -W block=true jobcardComputeUnstrToRWPSInterpWeightsPBS + +wait + +#combine text file output of parallel jobs +cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt + +# convert output weights to netcdf file +python ConvertWeights2Netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 +cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc +cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc diff --git a/ecf/jrwps_prep_currents.ecf b/ecf/jrwps_prep_currents.ecf new file mode 100644 index 0000000..d98ede5 --- /dev/null +++ b/ecf/jrwps_prep_currents.ecf @@ -0,0 +1,34 @@ +#!/bin/sh +#PBS -q dev +#PBS -l walltime=00:59:00 +#PBS -A GLWU-DEV +#PBS -N RWPS.PreProc.currents +#PBS -j oe +#PBS -l select=1:ncpus=4:mem=64GB +#PBS -o RWPS.PreProc.out + +cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/PreProcess + +module load PrgEnv-intel/8.1.0 +module load craype/2.7.8 +module load intel/19.1.3.304 +module load cfp/2.0.4 +module load prod_util/2.0.8 +module load prod_envir/2.0.5 + +#date=20260802 +#cycl=00 +#mesh=../../fix/rwps.oc_1500m_30km.msh + +source /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/PreProcess/rwpsenv + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +rm $prep/FetchCurrents.out $prep/ProcCurrents.out + +sh GetCurrents.sh $prep > $tmp/FetchCurrents.out +sh ProcessCurrents.sh $prep > $tmp/ProcCurrents.out + +mv $frc/$meshname.$date.$cycl.vel.stofsxrtofs.nc $frc/$meshname.$date.$cycl.current.nc + diff --git a/ecf/jrwps_prep_ice.ecf b/ecf/jrwps_prep_ice.ecf new file mode 100644 index 0000000..6f9ff23 --- /dev/null +++ b/ecf/jrwps_prep_ice.ecf @@ -0,0 +1,40 @@ +#!/bin/sh +#PBS -q dev +#PBS -l walltime=00:59:00 +#PBS -A GLWU-DEV +#PBS -N RWPS.PreProc.ice +#PBS -j oe +#PBS -l select=1:ncpus=4:mem=64GB +#PBS -o RWPS.PreProc.out + +cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/PreProcess + +module load PrgEnv-intel/8.1.0 +module load craype/2.7.8 +module load intel/19.1.3.304 +module load cfp/2.0.4 +module load prod_util/2.0.8 +module load prod_envir/2.0.5 + +#date=20260802 +#cycl=00 +#mesh=../../fix/rwps.oc_1500m_30km.msh + +source /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/PreProcess/rwpsenv + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +rm $prep/FetchIce.out $prep/ProcICE.out + +( +# sh GetCurrents.sh $prep > FetchCurrents.out +# sh ProcessCurrents.sh $prep > ProcCurrents.out + sh GetIce.sh $prep > $tmp/FetchIce.out + sh ProcessIce.sh $prep > $tmp/ProcIce.out +)& + +wait + +mv $frc/$meshname.$date.$cycl.ice.rtofsxnbm.nc $frc/$meshname.$date.$cycl.ice.nc + diff --git a/ecf/jrwps_prep_waterlevel.ecf b/ecf/jrwps_prep_waterlevel.ecf new file mode 100644 index 0000000..f4aa48e --- /dev/null +++ b/ecf/jrwps_prep_waterlevel.ecf @@ -0,0 +1,30 @@ +#!/bin/sh +#PBS -q dev +#PBS -l walltime=00:59:00 +#PBS -A GLWU-DEV +#PBS -N RWPS.PreProc.waterlevel +#PBS -j oe +#PBS -l select=1:ncpus=4:mem=64GB +#PBS -o RWPS.PreProc.out + +cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/PreProcess + +module load PrgEnv-intel/8.1.0 +module load craype/2.7.8 +module load intel/19.1.3.304 +module load cfp/2.0.4 +module load prod_util/2.0.8 +module load prod_envir/2.0.5 + +source rwpsenv + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +rm $tmp/FetchWaterLevel.out $tmp/ProcWaterLevel.out + +sh GetWaterLevel.sh > $tmp/FetchWaterLevel.out +sh ProcessWaterLevel.sh > $tmp/ProcWaterLevel.out + +mv $frc/$meshname.$date.$cycl.cwl.stofs.nc $frc/$meshname.$date.$cycl.waterlevel.nc + diff --git a/ecf/jrwps_prep_wind.ecf b/ecf/jrwps_prep_wind.ecf new file mode 100644 index 0000000..6c93b6c --- /dev/null +++ b/ecf/jrwps_prep_wind.ecf @@ -0,0 +1,34 @@ +#!/bin/sh +#PBS -q dev +#PBS -l walltime=00:59:00 +#PBS -A GLWU-DEV +#PBS -N RWPS.PreProc.wind +#PBS -j oe +#PBS -l select=1:ncpus=4:mem=64GB +#PBS -o RWPS.PreProc.out + +cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/PreProcess + +module load PrgEnv-intel/8.1.0 +module load craype/2.7.8 +module load intel/19.1.3.304 +module load cfp/2.0.4 +module load prod_util/2.0.8 +module load prod_envir/2.0.5 + +#date=20260802 +#cycl=00 +#mesh=../../fix/rwps.oc_1500m_30km.msh + +source /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/PreProcess/rwpsenv + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +rm $tmp/FetchWinds.out $tmp/ProcWinds.out + +sh GetWinds.sh > $tmp/FetchWinds.out +sh ProcessWinds.sh > $tmp/ProcWinds.out + +mv $frc/rwps.est.$meshname.$date.$cycl.wind10m.nc $frc/$meshname.$date.$cycl.wind.nc + diff --git a/ush/PreProcess/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh b/ush/PreProcess/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh deleted file mode 100644 index aefd95d..0000000 --- a/ush/PreProcess/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/sh - -#date=$1 -#cycl=$2 -#mesh=$3 - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - -jobcard="PreProcess.RWPS.$1.$2.jobcard" -outputfile="PreProcess.RWPS.$1.$2.out" - -rm $jobcard - -echo "#!/bin/sh" > $jobcard -echo "#PBS -q dev" >> $jobcard -echo "#PBS -l walltime=00:59:00" >> $jobcard -echo "#PBS -A GLWU-DEV" >> $jobcard -echo "#PBS -N RWPS.PreProc" >> $jobcard -echo "#PBS -j oe" >> $jobcard -echo "#PBS -l select=1:ncpus=4:mem=64GB" >> $jobcard -echo "#PBS -o RWPS.PreProc.out" >> $jobcard -echo " " >> $jobcard - -curdir=$(pwd) -echo "cd $curdir" >> $jobcard - - -echo " " >> $jobcard - -# Setup and load modules -echo "module load PrgEnv-intel/8.1.0" >> $jobcard -echo "module load craype/2.7.8" >> $jobcard -echo "module load intel/19.1.3.304" >> $jobcard -echo "module load cfp/2.0.4" >> $jobcard -echo "module load prod_util/2.0.8" >> $jobcard -echo "module load prod_envir/2.0.5" >> $jobcard -echo " " >> $jobcard - -echo "#date=$1" >> $jobcard -echo "#cycl=$2" >> $jobcard -echo "#mesh=$3" >> $jobcard -echo " " >> $jobcard - -echo "meshname=$meshname" >> $jobcard -echo " " >> $jobcard - -echo "rm FetchWinds.out ProcWinds.out FetchCurrents.out ProcCurrents.out FetchWaterLevel.out ProcWaterLevel.out" >> $jobcard -echo " " >> $jobcard - - -# At present RTOFS ice files are missing time information (MT==0) so ProcessIce.sh will fail at the time interpolation step -#echo "(" >> $jobcard -#echo " sh GetIce.sh $PDY $cyc > FetchIce.out" >> $jobcard -#echo " sh ProcessIce.sh $PDY $cyc $mesh > ProcIce.out" >> $jobcard -#echo ")&" >> $jobcard -#echo " " >> $jobcard - - - - -echo "(" >> $jobcard -echo " sh GetWaterLevel.sh $PDY $cyc > FetchWaterLevel.out" >> $jobcard -echo " sh ProcessWaterLevel.sh $PDY $cyc $mesh > ProcWaterLevel.out" >> $jobcard -echo ")&" >> $jobcard -echo " " >> $jobcard - -echo "(" >> $jobcard -echo " sh GetWinds.sh $PDY $cyc > FetchWinds.out" >> $jobcard -echo " sh ProcessWinds.sh $PDY $cyc $mesh > ProcWinds.out" >> $jobcard -echo ")&" >> $jobcard -echo " " >> $jobcard - -echo "(" >> $jobcard -echo " sh GetCurrents.sh $PDY $cyc > FetchCurrents.out" >> $jobcard -echo " sh ProcessCurrents.sh $PDY $cyc $mesh > ProcCurrents.out" >> $jobcard - -#ProcessIce Needs Time Variables from rtofs currents files -echo " sh GetIce.sh $PDY $cyc > FetchIce.out" >> $jobcard -echo " sh ProcessIce.sh $PDY $cyc $mesh > ProcIce.out" >> $jobcard -echo ")&" >> $jobcard -echo " " >> $jobcard -echo " " >> $jobcard - -echo "wait" >> $jobcard -echo " " >> $jobcard -echo "cp $meshname.$PDY.$cyc.cwl.stofs.nc $meshname.$PDY.$cyc.waterlevel.nc" >> $jobcard -echo "cp $meshname.$PDY.$cyc.vel.stofsxrtofs.nc $meshname.$PDY.$cyc.current.nc" >> $jobcard -echo "cp rwps_winds.$meshname.$PDY.$cyc/rwps.est.$meshname.$PDY.$cyc.wind10m.nc $meshname.$PDY.$cyc.wind.nc" >> $jobcard -echo "cp $meshname.$PDY.$cyc.ice.rtofsxnbm.nc $meshname.$PDY.$cyc.ice.nc" >> $jobcard -echo " " >> $jobcard - -##Below is only needed because of missing rtofs ice time -## remove and move this to GetRTOFS.sh and GetRTOFSIce.sh -## echo "rm -rf tmp.rtofs*.$PDY" >> $jobcard - -qsub $jobcard > $outputfile diff --git a/ush/PreProcess/GetAllFocing.jobcard.sh b/ush/PreProcess/GetAllFocing.jobcard.sh deleted file mode 100644 index a05603b..0000000 --- a/ush/PreProcess/GetAllFocing.jobcard.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh - -#date=$1 -#cycl=$2 -#mesh=$3 - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - -jobcard="PreProcess.RWPS.$1.$2.jobcard" -outputfile="PreProcess.RWPS.$1.$2.out" - -rm $jobcard - -echo "#!/bin/sh" > $jobcard -echo "#PBS -q dev" >> $jobcard -echo "#PBS -l walltime=00:59:00" >> $jobcard -echo "#PBS -A GLWU-DEV" >> $jobcard -echo "#PBS -N RWPS.PreProc" >> $jobcard -echo "#PBS -j oe" >> $jobcard -echo "#PBS -l select=1:ncpus=4:mem=64GB" >> $jobcard -echo "#PBS -o RWPS.PreProc.out" >> $jobcard -echo " " >> $jobcard -echo "cd /lfs/h2/emc/couple/noscrub/keston.smith/RWPSInterpolationUtilities" >> $jobcard -echo " " >> $jobcard - -# Setup and load modules -echo "module load PrgEnv-intel/8.1.0" >> $jobcard -echo "module load craype/2.7.8" >> $jobcard -echo "module load intel/19.1.3.304" >> $jobcard -echo "module load cfp/2.0.4" >> $jobcard -echo "module load prod_util/2.0.8" >> $jobcard -echo "module load prod_envir/2.0.5" >> $jobcard -echo " " >> $jobcard - -echo "#date=$1" >> $jobcard -echo "#cycl=$2" >> $jobcard -echo "#mesh=$3" >> $jobcard -echo " " >> $jobcard - -echo "meshname=$meshname" >> $jobcard -echo " " >> $jobcard - -echo "rm FetchWinds.out ProcWinds.out FetchCurrents.out ProcCurrents.out FetchWaterLevel.out ProcWaterLevel.out" >> $jobcard -echo " " >> $jobcard - - -# At present RTOFS ice files are missing time information (MT==0) so ProcessIce.sh will fail at the time interpolation step -echo "(" >> $jobcard -echo " sh GetIce.sh $PDY $cyc > FetchIce.out" >> $jobcard -echo " sh ProcessIce.sh $PDY $cyc $mesh > ProcIce.out" >> $jobcard -echo ")&" >> $jobcard -echo " " >> $jobcard - - -echo "(" >> $jobcard -echo " sh GetWaterLevel.sh $PDY $cyc > FetchWaterLevel.out" >> $jobcard -echo " sh ProcessWaterLevel.sh $PDY $cyc $mesh > ProcWaterLevel.out" >> $jobcard -echo ")&" >> $jobcard -echo " " >> $jobcard - -echo "(" >> $jobcard -echo " sh GetWinds.sh $PDY $cyc > FetchWinds.out" >> $jobcard -echo " sh ProcessWinds.sh $PDY $cyc $mesh > ProcWinds.out" >> $jobcard -echo ")&" >> $jobcard -echo " " >> $jobcard - -echo "(" >> $jobcard -echo " sh GetCurrents.sh $PDY $cyc > FetchCurrents.out" >> $jobcard -echo " sh ProcessCurrents.sh $PDY $cyc $mesh > ProcCurrents.out" >> $jobcard -echo ")&" >> $jobcard -echo " " >> $jobcard - -echo "wait" >> $jobcard -echo " " >> $jobcard -echo "cp $meshname.$PDY.$cyc.cwl.stofs.nc $meshname.$PDY.$cyc.waterlevel.nc" >> $jobcard -echo "cp $meshname.$PDY.$cyc.vel.stofsxrtofs.nc $meshname.$PDY.$cyc.current.nc" >> $jobcard -echo "cp rwps_winds.$meshname.$PDY.$cyc/rwps.est.$meshname.$PDY.$cyc.wind10m.nc $meshname.$PDY.$cyc.wind.nc" >> $jobcard - -qsub $jobcard > $outputfile diff --git a/ush/PreProcess/GetAllFocing.sh b/ush/PreProcess/GetAllFocing.sh deleted file mode 100644 index fec5cc7..0000000 --- a/ush/PreProcess/GetAllFocing.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -# Setup and load modules -module load PrgEnv-intel/8.1.0 -module load craype/2.7.8 -module load intel/19.1.3.304 -module load cfp/2.0.4 -module load prod_util/2.0.8 -module load prod_envir/2.0.5 - -# 0.a Set necessary variables - -# This script retrieves and processes forcing for a forecast period -#date=$1 -#cycl=$2 -#mesh=$3 - - -##date=20260707 -##cycl=00 -##mesh="../meshes/RWPS.V0a.small.msh" - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - -echo "retrieving and processing RWPS forcing for $PDY z$cyc for WW3 mesh $mesh" - -rm FetchWinds.out ProcWinds.out FetchCurrents.out ProcCurrents.out FetchWaterLevel.out ProcWaterLevel.out - -( - echo "retrieving nbm and rrfs winds for $PDY z$cyc" - sh GetWinds.sh $PDY $cyc > FetchWinds.out - echo "processing winds for $PDY z$cyc for $mesh" - sh ProcessWinds.sh $PDY $cyc $mesh > ProcWinds.out -)& - -( - echo "retrieving rtofs and stofs currents for $PDY z$cyc" - sh GetCurrents.sh $PDY $cyc > FetchCurrents.out - echo "processing currents for $PDY z$cyc for $mesh" - sh ProcessCurrents.sh $PDY $cyc $mesh > ProcCurrents.out -)& - -( - echo "retrieving stofs water level for $PDY z$cyc" - sh GetWaterLevel.sh $PDY $cyc > FetchWaterLevel.out - echo "processing water level for $PDY z$cyc for $mesh" - sh ProcessWaterLevel.sh $PDY $cyc $mesh > ProcWaterLevel.out -)& - -wait -echo "Finished preprocessing for $PDY z$cyc for $mesh" - -cp $meshname.$PDY.$cyc.vel.stofsxrtofs.nc $meshname.$PDY.$cyc.current.nc -echo "current forcing file: $meshname.$PDY.$cyc.current.nc" - -cp $meshname.$PDY.$cyc.cwl.stofs.nc $meshname.$PDY.$cyc.waterlevel.nc -echo "water level forcing file: $meshname.$PDY.$cyc.watterlevel.nc" - -cp rwps_winds.$meshname.$PDY.$cyc/rwps.est.$meshname.$PDY.$cyc.wind10m.nc $meshname.$PDY.$cyc.wind.nc -echo "wind forcing file: $meshname.$PDY.$cyc.wind.nc" - diff --git a/ush/PreProcess/GetCurrents.sh b/ush/PreProcess/GetCurrents.sh index 350a099..82e6cdb 100644 --- a/ush/PreProcess/GetCurrents.sh +++ b/ush/PreProcess/GetCurrents.sh @@ -2,7 +2,7 @@ # This script retrieves global RTOFS and STOFS as netcdf files -source ./rwpsenv +#source ./rwpsenv rtofs/GetRTOFS.sh $PDY & stofs/GetSTOFS.sh $PDY $cyc current& wait; diff --git a/ush/PreProcess/GetIce.sh b/ush/PreProcess/GetIce.sh index d263552..052027c 100644 --- a/ush/PreProcess/GetIce.sh +++ b/ush/PreProcess/GetIce.sh @@ -3,6 +3,6 @@ # This script retrieves ice forecasts for global RTOFS and Alaska NBM as netcdf files source ./rwpsenv -rtofs/GetRTOFSIce.sh $PDY $cyc & -nbm/GetNBMIce.sh $PDY $cyc & +sh rtofs/GetRTOFSIce.sh $PDY $cyc & +sh nbm/GetNBMIce.sh $PDY $cyc & wait; diff --git a/ush/PreProcess/ProcessCurrents.sh b/ush/PreProcess/ProcessCurrents.sh index 55071f2..892f722 100644 --- a/ush/PreProcess/ProcessCurrents.sh +++ b/ush/PreProcess/ProcessCurrents.sh @@ -17,14 +17,15 @@ source ./rwpsenv meshname="${mesh##*/}" meshname="${meshname: 0: -4}" -stofscur="stofs.$PDY.$cyc/stofs_2d_glo.t${cycl}z.fields.cwl.vel.nc" -rtofscur="rtofs.$PDY.nc" +stofscur="$tmp/stofs_2d_glo.t${cyc}z.fields.cwl.vel.nc" +rtofscur="$tmp/rtofs.$PDY.nc" varnames="u-vel:v-vel" #name of blended wind -combinedcur=$frc/$meshname.$PDY.$cyc.vel.stofsxrtofs.nc -echo "outputting combined stofs and rtofs currents to $combinedcur" +rwps_current=$frc/$meshname.$PDY.$cyc.current.nc +#rwps_current=$frc/$meshname.$PDY.$cyc.vel.stofsxrtofs.nc +echo "outputting combined stofs and rtofs currents to $rwps_current" ## STOFS interpolation stofs_wghts="$fix/InterpolationWeights.$meshname.stofs.nc" @@ -82,5 +83,5 @@ wait python AddErrVarToFile.py $rtofs_rwps_ti $rtofs_dists 100.:1.:50.:250.:50. python AddErrVarToFile.py $stofs_rwps_ti $stofs_dists 1.:100.:50.:250. -python BayesForecastUpdate.py $stofs_rwps_ti $rtofs_rwps_ti $combinedcur $varnames +python BayesForecastUpdate.py $stofs_rwps_ti $rtofs_rwps_ti $rwps_current $varnames diff --git a/ush/PreProcess/ProcessIce.sh b/ush/PreProcess/ProcessIce.sh index 7107e75..ea54937 100644 --- a/ush/PreProcess/ProcessIce.sh +++ b/ush/PreProcess/ProcessIce.sh @@ -18,7 +18,7 @@ meshname="${mesh##*/}" meshname="${meshname: 0: -4}" -inpdir=ice.$PDY.$cyc +inpdir=$tmp/ice.$PDY.$cyc nbmice=$inpdir/nbm.$PDY.$cyc.ice.ak.nc rtofsice=$inpdir/rtofs.ice.$PDY.nc @@ -37,7 +37,8 @@ nbm_rwps_ti="$tmp/$meshname.$PDY.$cyc.ice.nbm.ak.ti.nc" varnames="ICEC_surface" -combinedice="$frc/$meshname.$PDY.$cyc.ice.rtofsxnbm.nc" +#rwps_ice="$frc/$meshname.$PDY.$cyc.ice.rtofsxnbm.nc" +rwps_ice="$frc/$meshname.$PDY.$cyc.ice.nc" ## NBM AK domain interpolation ## NOTE WE ARE USING THE RRFS ak WEIGHTS HERE NEED TO RELABEL AND RECOMPUTE FOR NBM AK DOMAIN @@ -101,4 +102,4 @@ python AddErrVarToFile.py $rtofs_rwps_ti $rtofs_dists 100. #interior variance of 4., boundary variance fof 400., transition lengthscale 9. km python AddErrVarToFile.py $nbm_rwps_ti $nbm_ak_dists 4.:400.:9. -python BayesForecastUpdate.py $rtofs_rwps_ti $nbm_rwps_ti $combinedice $varnames +python BayesForecastUpdate.py $rtofs_rwps_ti $nbm_rwps_ti $rwps_ice $varnames diff --git a/ush/PreProcess/ProcessWaterLevel.sh b/ush/PreProcess/ProcessWaterLevel.sh index 91827da..489a28e 100644 --- a/ush/PreProcess/ProcessWaterLevel.sh +++ b/ush/PreProcess/ProcessWaterLevel.sh @@ -17,12 +17,13 @@ source ./rwpsenv meshname="${mesh##*/}" meshname="${meshname: 0: -4}" -stofslev="stofs.$PDY.$cyc/stofs_2d_glo.t${cycl}z.fields.cwl.nc" +stofslev="$tmp/stofs.$PDY.$cyc/stofs_2d_glo.t${cyc}z.fields.cwl.nc" stofs_wghts="$fix/InterpolationWeights.$meshname.stofs.nc" stofs_dists="$fix/DistToBndy.$meshname.stofs.nc" stofs_rwps="$frc/$meshname.$PDY.$cyc.cwl.stofs.nc" - +waterlevel_rwps="$frc/$meshname.$PDY.$cyc.cwl.waterlevel.nc" +stofs_rwps=$waterlevel_rwps varnames="zeta" ## STOFS interpolation diff --git a/ush/PreProcess/ProcessWinds.sh b/ush/PreProcess/ProcessWinds.sh index 5ca8191..c53906f 100644 --- a/ush/PreProcess/ProcessWinds.sh +++ b/ush/PreProcess/ProcessWinds.sh @@ -27,7 +27,7 @@ meshname="${meshname: 0: -4}" outdir="$tmp/rwps_winds.$meshname.$PDY.$cyc" -rwps_est="$frc/rwps.est.$meshname.$PDY.$cyc.wind10m.nc" +rwps_wind="$frc/$meshname.$PDY.$cyc.wind.nc" echo "outputing files to: $outdir" @@ -126,9 +126,9 @@ python AddMeshGeomToFile.py $rwps_oc_ti $mesh #add prescribed error covariance for nbm oc domain (assumed constant 100. (m/s)^2 ) python AddErrVarToFile.py $rwps_oc_ti $nbm_oc_dist 100. -cp $rwps_oc_ti $rwps_est -[ ! -f "$rwps_hi" ] && python BayesForecastUpdate.py $rwps_est $rwps_hi $rwps_est $windvars -[ ! -f "$rwps_pr" ] && python BayesForecastUpdate.py $rwps_est $rwps_pr $rwps_est $windvars -[ ! -f "$rwps_ak" ] && python BayesForecastUpdate.py $rwps_est $rwps_ak $rwps_est $windvars -[ ! -f "$rwps_conus" ] && python BayesForecastUpdate.py $rwps_est $rwps_conus $rwps_est $windvars -[ ! -f "$rwps_na" ] && python BayesForecastUpdate.py $rwps_est $rwps_na $rwps_est $windvars +cp $rwps_oc_ti $rwps_wind +[ ! -f "$rwps_hi" ] && python BayesForecastUpdate.py $rwps_wind $rwps_hi $rwps_wind $windvars +[ ! -f "$rwps_pr" ] && python BayesForecastUpdate.py $rwps_wind $rwps_pr $rwps_wind $windvars +[ ! -f "$rwps_ak" ] && python BayesForecastUpdate.py $rwps_wind $rwps_ak $rwps_wind $windvars +[ ! -f "$rwps_conus" ] && python BayesForecastUpdate.py $rwps_wind $rwps_conus $rwps_wind $windvars +[ ! -f "$rwps_na" ] && python BayesForecastUpdate.py $rwps_wind $rwps_na $rwps_wind $windvars diff --git a/ush/PreProcess/nbm/GetNBMIce.sh b/ush/PreProcess/nbm/GetNBMIce.sh index bd144e4..616f5b4 100755 --- a/ush/PreProcess/nbm/GetNBMIce.sh +++ b/ush/PreProcess/nbm/GetNBMIce.sh @@ -8,12 +8,17 @@ module load intel-oneapi/2022.2.0.262 module load wgrib2/2.0.8 +#source ../rwpsenv -INPUT_DIR="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.$1/$2/grib2" -ICE_FILE="$INPUT_DIR/blend.t$2z.icec.ak.grib2" +#INPUT_DIR="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.$1/$2/grib2" -OUTPUT_DIR="ice.$1.$2" +#ICE_FILE="$INPUT_DIR/blend.t$2z.icec.ak.grib2" + +ICE_FILE="$COMINnbm/blend.t$2z.icec.ak.grib2" + +#OUTPUT_DIR="$tmp/ice.$1.$2" +OUTPUT_DIR="$COMINlocal/ice.$1.$2" OUTPUT_FILE="$OUTPUT_DIR/nbm.$1.$2.ice.ak.nc" mkdir "$OUTPUT_DIR" diff --git a/ush/PreProcess/nbm/MakeNBMWind.sh b/ush/PreProcess/nbm/MakeNBMWind.sh index 62a6f00..f203625 100755 --- a/ush/PreProcess/nbm/MakeNBMWind.sh +++ b/ush/PreProcess/nbm/MakeNBMWind.sh @@ -7,10 +7,13 @@ module load intel-oneapi/2022.2.0.262 module load wgrib2/2.0.8 INPUT_DIR="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.$1/$2/grib2" -WSPD_FILE="$INPUT_DIR/blend.t$2z.wspd.$3.grib2" -WDIR_FILE="$INPUT_DIR/blend.t$2z.wdir.$3.grib2" +INPUT_DIR="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.$1/$2/grib2" + +WSPD_FILE="$COMINnbm/blend.t$2z.wspd.$3.grib2" +WDIR_FILE="$COMINnbm/blend.t$2z.wdir.$3.grib2" OUTPUT_DIR="wind.$1.$2" +OUTPUT_DIR="$COMINlocal/wind.$1.$2" OUTPUT_FILE="$OUTPUT_DIR/nbm.$1.$2.wind10m.$3.nc" mkdir -p "$OUTPUT_DIR" diff --git a/ush/PreProcess/rrfs/MakeRRFSWind.sh b/ush/PreProcess/rrfs/MakeRRFSWind.sh index 8a12f56..d2e44cb 100755 --- a/ush/PreProcess/rrfs/MakeRRFSWind.sh +++ b/ush/PreProcess/rrfs/MakeRRFSWind.sh @@ -16,11 +16,12 @@ echo "MakeRRFSWind.sh fetching rrfs : time = $1, cycle = $2, domain = $3" module load intel-oneapi/2022.2.0.262 module load wgrib2/2.0.8 -INPUT_DIR="/lfs/h1/ops/para/com/rrfs/v1.0/rrfs.$1/$2" -OUTPUT_DIR="wind.$1.$2" +#INPUT_DIR="/lfs/h1/ops/para/com/rrfs/v1.0/rrfs.$1/$2" +INPUT_DIR="$COMINrrfs" +OUTPUT_DIR="$COMINlocal/wind.$1.$2" OUTPUT_FILE="$OUTPUT_DIR/rrfs.$1.$2.wind10m.$3.nc" -mkdir "$OUTPUT_DIR" +mkdir -p "$OUTPUT_DIR" # Remove existing output file to avoid mixing old data rm -f "$OUTPUT_FILE" diff --git a/ush/PreProcess/rtofs/GetRTOFS.sh b/ush/PreProcess/rtofs/GetRTOFS.sh index 928f762..c8ff1e5 100755 --- a/ush/PreProcess/rtofs/GetRTOFS.sh +++ b/ush/PreProcess/rtofs/GetRTOFS.sh @@ -14,6 +14,8 @@ module load ve/hafs/2.1 pip list -v +cd $rootdir + tmpdir="$COMINlocal/tmp.rtofs.$PDY" filesin="$COMINrtofs/*prog.nc" flout="$COMINlocal/rtofs.$PDY.nc" diff --git a/ush/PreProcess/rtofs/GetRTOFSIce.sh b/ush/PreProcess/rtofs/GetRTOFSIce.sh index 23e77a9..2aecf0e 100755 --- a/ush/PreProcess/rtofs/GetRTOFSIce.sh +++ b/ush/PreProcess/rtofs/GetRTOFSIce.sh @@ -14,13 +14,19 @@ module load ve/hafs/2.1 pip list -v +#source rwpsenv + tmpdir="$COMINlocal/tmp.rtofsIce.$PDY" filesin="$COMINrtofs/*ice.nc" -dirout="$COMINlocal/ice.$PDY.$cyc -flout="$COMINlocal/rtofs.ice.$PDY.nc" +dirout="$COMINlocal/ice.$PDY.$cyc" +flout="$dirout/rtofs.ice.$PDY.nc" +#flout="$tmp/rtofs.ice.$PDY.nc" mkdir $tmpdir cp $filesin $tmpdir/ +echo $tmpdir +echo $flout + python rtofs/GetRTOFSIcefcst.py $tmpdir $flout ## rm -rf $tmpdir diff --git a/ush/PreProcess/rtofs/GetRTOFSfcst.py b/ush/PreProcess/rtofs/GetRTOFSfcst.py index b6ca7d0..db54f0b 100644 --- a/ush/PreProcess/rtofs/GetRTOFSfcst.py +++ b/ush/PreProcess/rtofs/GetRTOFSfcst.py @@ -2,12 +2,13 @@ import os import netCDF4 as nc import sys + +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) import InterpUtilities as iutil -# Consolidate u,v surface currents from global RTOFS into a sinble NetCDF file. -# Get the path relative to this file and add to sys.path -sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) + +# Consolidate u,v surface currents from global RTOFS into a single NetCDF file. dirin=sys.argv[1] flout=sys.argv[2] diff --git a/ush/PreProcess/rwpsenv b/ush/PreProcess/rwpsenv index 6640aa5..2f0293e 100644 --- a/ush/PreProcess/rwpsenv +++ b/ush/PreProcess/rwpsenv @@ -1,11 +1,20 @@ -date=20260803 -cycl=00 -rootdir=$(pwd) -mesh="$rootdir/../../fix/rwps.oc_1500m_30km.msh" -fix="$rootdir/../../fix" -prep="$rootdir/../../PrepInputs" -tmp="$prep/tmpfiles" -frc="$prep/forcing" +export PDY=20260813 +export cyc=00 +export rootdir=$(pwd) +export mesh="$rootdir/../../fix/rwps.oc_1500m_30km.msh" +export fix="$rootdir/../../fix" +export prep="$rootdir/../../PrepInputs" +export tmp="$prep/tmpfiles" +export frc="$prep/forcing" + mkdir -p $prep mkdir -p $tmp mkdir -p $frc + +export COMINrtofs="/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs.$PDY/" +export COMINnbm="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.$PDY/$cyc/grib2" +export COMINrrfs="/lfs/h1/ops/para/com/rrfs/v1.0/rrfs.$PDY/$cyc" +export COMINstofs="/lfs/h1/ops/prod/com/stofs/v2.1/stofs_2d_glo.$PDY" + +export COMINlocal=$tmp + diff --git a/ush/PreProcess/stofs/GetSTOFS.sh b/ush/PreProcess/stofs/GetSTOFS.sh index 4c7404b..398ed88 100755 --- a/ush/PreProcess/stofs/GetSTOFS.sh +++ b/ush/PreProcess/stofs/GetSTOFS.sh @@ -10,15 +10,22 @@ else fields=$3 fi -mkdir stofs.$PDY.$cyc +#source rwpsenv +#mkdir stofs.$PDY.$cyc + +outdir=$tmp/stofs.$PDY.$cyc + +mkdir -p $outdir if [[ "$fields" == *"current"* ]]; then echo retrieving stofs current for $PDY cycle $cyc - cp /lfs/h1/ops/prod/com/stofs/v2.1/stofs_2d_glo.$PDY/stofs_2d_glo.t"$cyc"z.fields.cwl.vel.nc stofs.$PDY.$cyc/ + cp $COMINstofs/stofs_2d_glo.t"$cyc"z.fields.cwl.vel.nc $outdir/ +# cp /lfs/h1/ops/prod/com/stofs/v2.1/stofs_2d_glo.$PDY/stofs_2d_glo.t"$cyc"z.fields.cwl.vel.nc stofs.$PDY.$cyc/ fi if [[ "$fields" == *"level"* ]]; then echo retrieving stofs water level for $PDY cycle $cyc - cp /lfs/h1/ops/prod/com/stofs/v2.1/stofs_2d_glo.$PDY/stofs_2d_glo.t"$cyc"z.fields.cwl.nc stofs.$PDY.$cyc/ + cp $COMINstofs/stofs_2d_glo.t"$cyc"z.fields.cwl.nc $outdir/ +# cp /lfs/h1/ops/prod/com/stofs/v2.1/stofs_2d_glo.$PDY/stofs_2d_glo.t"$cyc"z.fields.cwl.nc stofs.$PDY.$cyc/ fi From 531f59e36f253c8af93dc19f67dfc6e19b293891 Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa Date: Thu, 13 Aug 2026 19:53:37 +0000 Subject: [PATCH 08/39] fixed other path errors --- ecf/jrwps_prep_currents.ecf | 2 +- ecf/jrwps_prep_ice.ecf | 10 +++------- ecf/jrwps_prep_waterlevel.ecf | 3 +-- ecf/jrwps_prep_wind.ecf | 2 +- ush/PreProcess/ProcessWaterLevel.sh | 15 +++++++-------- 5 files changed, 13 insertions(+), 19 deletions(-) diff --git a/ecf/jrwps_prep_currents.ecf b/ecf/jrwps_prep_currents.ecf index d98ede5..f105871 100644 --- a/ecf/jrwps_prep_currents.ecf +++ b/ecf/jrwps_prep_currents.ecf @@ -30,5 +30,5 @@ rm $prep/FetchCurrents.out $prep/ProcCurrents.out sh GetCurrents.sh $prep > $tmp/FetchCurrents.out sh ProcessCurrents.sh $prep > $tmp/ProcCurrents.out -mv $frc/$meshname.$date.$cycl.vel.stofsxrtofs.nc $frc/$meshname.$date.$cycl.current.nc +#mv $frc/$meshname.$date.$cycl.vel.stofsxrtofs.nc $frc/$meshname.$date.$cycl.current.nc diff --git a/ecf/jrwps_prep_ice.ecf b/ecf/jrwps_prep_ice.ecf index 6f9ff23..9f97305 100644 --- a/ecf/jrwps_prep_ice.ecf +++ b/ecf/jrwps_prep_ice.ecf @@ -27,14 +27,10 @@ meshname="${meshname: 0: -4}" rm $prep/FetchIce.out $prep/ProcICE.out -( # sh GetCurrents.sh $prep > FetchCurrents.out # sh ProcessCurrents.sh $prep > ProcCurrents.out - sh GetIce.sh $prep > $tmp/FetchIce.out - sh ProcessIce.sh $prep > $tmp/ProcIce.out -)& +sh GetIce.sh $prep > $tmp/FetchIce.out +sh ProcessIce.sh $prep > $tmp/ProcIce.out -wait - -mv $frc/$meshname.$date.$cycl.ice.rtofsxnbm.nc $frc/$meshname.$date.$cycl.ice.nc +#mv $frc/$meshname.$date.$cycl.ice.rtofsxnbm.nc $frc/$meshname.$date.$cycl.ice.nc diff --git a/ecf/jrwps_prep_waterlevel.ecf b/ecf/jrwps_prep_waterlevel.ecf index f4aa48e..adae41e 100644 --- a/ecf/jrwps_prep_waterlevel.ecf +++ b/ecf/jrwps_prep_waterlevel.ecf @@ -16,7 +16,7 @@ module load cfp/2.0.4 module load prod_util/2.0.8 module load prod_envir/2.0.5 -source rwpsenv +source /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/PreProcess/rwpsenv meshname="${mesh##*/}" meshname="${meshname: 0: -4}" @@ -26,5 +26,4 @@ rm $tmp/FetchWaterLevel.out $tmp/ProcWaterLevel.out sh GetWaterLevel.sh > $tmp/FetchWaterLevel.out sh ProcessWaterLevel.sh > $tmp/ProcWaterLevel.out -mv $frc/$meshname.$date.$cycl.cwl.stofs.nc $frc/$meshname.$date.$cycl.waterlevel.nc diff --git a/ecf/jrwps_prep_wind.ecf b/ecf/jrwps_prep_wind.ecf index 6c93b6c..2331669 100644 --- a/ecf/jrwps_prep_wind.ecf +++ b/ecf/jrwps_prep_wind.ecf @@ -30,5 +30,5 @@ rm $tmp/FetchWinds.out $tmp/ProcWinds.out sh GetWinds.sh > $tmp/FetchWinds.out sh ProcessWinds.sh > $tmp/ProcWinds.out -mv $frc/rwps.est.$meshname.$date.$cycl.wind10m.nc $frc/$meshname.$date.$cycl.wind.nc +#mv $frc/rwps.est.$meshname.$date.$cycl.wind10m.nc $frc/$meshname.$date.$cycl.wind.nc diff --git a/ush/PreProcess/ProcessWaterLevel.sh b/ush/PreProcess/ProcessWaterLevel.sh index 489a28e..5ef5dc7 100644 --- a/ush/PreProcess/ProcessWaterLevel.sh +++ b/ush/PreProcess/ProcessWaterLevel.sh @@ -12,7 +12,7 @@ module load ve/hafs/2.1 pip list -v -source ./rwpsenv +#source ./rwpsenv meshname="${mesh##*/}" meshname="${meshname: 0: -4}" @@ -20,10 +20,10 @@ meshname="${meshname: 0: -4}" stofslev="$tmp/stofs.$PDY.$cyc/stofs_2d_glo.t${cyc}z.fields.cwl.nc" stofs_wghts="$fix/InterpolationWeights.$meshname.stofs.nc" stofs_dists="$fix/DistToBndy.$meshname.stofs.nc" +stofs_rwps="$frc/$meshname.$PDY.$cyc.cwl.waterlevel.nc" + +rwps_waterlevel="$frc/$meshname.$PDY.$cyc.waterlevel.nc" -stofs_rwps="$frc/$meshname.$PDY.$cyc.cwl.stofs.nc" -waterlevel_rwps="$frc/$meshname.$PDY.$cyc.cwl.waterlevel.nc" -stofs_rwps=$waterlevel_rwps varnames="zeta" ## STOFS interpolation @@ -39,7 +39,6 @@ if [ ! -f "$stofs_dists" ]; then exit 1 fi -python InterpolateWithWeights.py $stofslev $stofs_wghts $stofs_rwps $varnames 0 -python AddMeshGeomToFile.py $stofs_rwps $mesh -python AddErrVarToFile.py $stofs_rwps $stofs_dists 1. - +python InterpolateWithWeights.py $stofslev $stofs_wghts $rwps_waterlevel $varnames 0 +python AddMeshGeomToFile.py $rwps_waterlevel $mesh +python AddErrVarToFile.py $rwps_waterlevel $stofs_dists 1. From 97af00da02a246a973d3611d8e801794dd33f4ae Mon Sep 17 00:00:00 2001 From: keston Date: Wed, 19 Aug 2026 14:10:16 -0400 Subject: [PATCH 09/39] move script file names to all lower case --- ecf/GenerateInterpolationWeights.ecf | 26 ++++---- ecf/jrwps_prep_currents.ecf | 8 +-- ecf/jrwps_prep_ice.ecf | 8 +-- ecf/jrwps_prep_waterlevel.ecf | 8 +-- ecf/jrwps_prep_wind.ecf | 8 +-- ush/PreProcess/nbm/ConvertNBMIcetif2NetCDF.py | 50 --------------- ush/PreProcess/rrfs/MakeEnsRRFSWind.sh | 62 ------------------- .../add_err_var_to_file.py} | 0 .../add_mesh_geom_to_file.py} | 0 .../bayes_forecast_update.py} | 0 ...compute_gridded_to_rwps_interp_weights.py} | 0 .../compute_unstr_to_rwps_interp_weights.py} | 0 .../compute_unstr_to_rwps_interp_weights.sh} | 0 .../compute_unstr_to_rwps_interp_weights0.sh} | 0 .../compute_wind_to_rwps_interp_weights.py} | 0 .../convert_weights_to_netcdf.py} | 0 .../get_currents.sh} | 0 .../GetIce.sh => preprocess/get_ice.sh} | 0 .../get_waterlevel.sh} | 0 .../GetWinds.sh => preprocess/get_wind.sh} | 0 .../interp_time.py} | 0 .../interp_utilities.py} | 0 .../interpolate_with_weights.py} | 0 ...polate_with_weights_and_error_variance.py} | 0 .../nbm/get_nbm_ice.sh} | 0 .../nbm/make_nbm_wind.sh} | 0 .../process_currents.sh} | 0 .../process_ice.sh} | 0 .../process_waterlevel.sh} | 0 .../process_wind.sh} | 0 .../rrfs/make_rrfs_wind.sh} | 0 .../rtofs/GetRTOFS.sh | 0 .../rtofs/get_rtofs_fcst.py} | 0 .../rtofs/get_rtofs_ice.sh} | 0 .../rtofs/get_rtofs_ice_fcst.py} | 0 ush/{PreProcess => preprocess}/rwpsenv | 0 .../spd_dir_to_uv_nbm.py} | 0 .../stofs/get_stofs.sh} | 0 38 files changed, 29 insertions(+), 141 deletions(-) delete mode 100644 ush/PreProcess/nbm/ConvertNBMIcetif2NetCDF.py delete mode 100644 ush/PreProcess/rrfs/MakeEnsRRFSWind.sh rename ush/{PreProcess/AddErrVarToFile.py => preprocess/add_err_var_to_file.py} (100%) rename ush/{PreProcess/AddMeshGeomToFile.py => preprocess/add_mesh_geom_to_file.py} (100%) rename ush/{PreProcess/BayesForecastUpdate.py => preprocess/bayes_forecast_update.py} (100%) rename ush/{PreProcess/ComputeGriddedToRWPSInterpWeights.py => preprocess/compute_gridded_to_rwps_interp_weights.py} (100%) rename ush/{PreProcess/ComputeUnstrToRWPSInterpWeights.py => preprocess/compute_unstr_to_rwps_interp_weights.py} (100%) rename ush/{PreProcess/ComputeUnstrToRWPSInterpWeights.sh => preprocess/compute_unstr_to_rwps_interp_weights.sh} (100%) rename ush/{PreProcess/ComputeUnstrToRWPSInterpWeights0.sh => preprocess/compute_unstr_to_rwps_interp_weights0.sh} (100%) rename ush/{PreProcess/ComputeWindToRWPSInterpWeights.py => preprocess/compute_wind_to_rwps_interp_weights.py} (100%) rename ush/{PreProcess/ConvertWeights2Netcdf.py => preprocess/convert_weights_to_netcdf.py} (100%) rename ush/{PreProcess/GetCurrents.sh => preprocess/get_currents.sh} (100%) rename ush/{PreProcess/GetIce.sh => preprocess/get_ice.sh} (100%) rename ush/{PreProcess/GetWaterLevel.sh => preprocess/get_waterlevel.sh} (100%) rename ush/{PreProcess/GetWinds.sh => preprocess/get_wind.sh} (100%) rename ush/{PreProcess/InterpTime.py => preprocess/interp_time.py} (100%) rename ush/{PreProcess/InterpUtilities.py => preprocess/interp_utilities.py} (100%) rename ush/{PreProcess/InterpolateWithWeights.py => preprocess/interpolate_with_weights.py} (100%) rename ush/{PreProcess/InterpolateWithWeightsAndErrorVariance.py => preprocess/interpolate_with_weights_and_error_variance.py} (100%) rename ush/{PreProcess/nbm/GetNBMIce.sh => preprocess/nbm/get_nbm_ice.sh} (100%) rename ush/{PreProcess/nbm/MakeNBMWind.sh => preprocess/nbm/make_nbm_wind.sh} (100%) rename ush/{PreProcess/ProcessCurrents.sh => preprocess/process_currents.sh} (100%) rename ush/{PreProcess/ProcessIce.sh => preprocess/process_ice.sh} (100%) rename ush/{PreProcess/ProcessWaterLevel.sh => preprocess/process_waterlevel.sh} (100%) rename ush/{PreProcess/ProcessWinds.sh => preprocess/process_wind.sh} (100%) rename ush/{PreProcess/rrfs/MakeRRFSWind.sh => preprocess/rrfs/make_rrfs_wind.sh} (100%) rename ush/{PreProcess => preprocess}/rtofs/GetRTOFS.sh (100%) rename ush/{PreProcess/rtofs/GetRTOFSfcst.py => preprocess/rtofs/get_rtofs_fcst.py} (100%) rename ush/{PreProcess/rtofs/GetRTOFSIce.sh => preprocess/rtofs/get_rtofs_ice.sh} (100%) rename ush/{PreProcess/rtofs/GetRTOFSIcefcst.py => preprocess/rtofs/get_rtofs_ice_fcst.py} (100%) rename ush/{PreProcess => preprocess}/rwpsenv (100%) rename ush/{PreProcess/SpdDir2UVnbm.py => preprocess/spd_dir_to_uv_nbm.py} (100%) rename ush/{PreProcess/stofs/GetSTOFS.sh => preprocess/stofs/get_stofs.sh} (100%) diff --git a/ecf/GenerateInterpolationWeights.ecf b/ecf/GenerateInterpolationWeights.ecf index e78bf95..300dab8 100644 --- a/ecf/GenerateInterpolationWeights.ecf +++ b/ecf/GenerateInterpolationWeights.ecf @@ -23,7 +23,7 @@ module load ve/hafs/2.1 pip list -v -cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/PreProcess +cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/preprocess source SetMeshName @@ -50,21 +50,21 @@ rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" rrfsDst="$out/DistToBndy.$meshname.rrfs" #no extrapolation with rrfs forecasts -python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out -python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_pr $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 > GenWhts.rrfs.pr.out -python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_ak $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 > GenWhts.rrfs.ak.out -python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_na $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 > GenWhts.rrfs.na.out -python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_conus $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_pr $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 > GenWhts.rrfs.pr.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_ak $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 > GenWhts.rrfs.ak.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_na $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 > GenWhts.rrfs.na.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_conus $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc nbmIntrp="$out/InterpolationWeights.$meshname.nbm" nbmDst="$out/DistToBndy.$meshname.nbm" #extrapolate nbm oc wind to all points -python ./ComputeGriddedToRWPSInterpWeights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out +python ./compute_gridded_to_rwps_interp_weights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc #do not extrapolate for NBM .ak. domain -python ./ComputeGriddedToRWPSInterpWeights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out +python ./compute_gridded_to_rwps_interp_weights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" @@ -72,24 +72,24 @@ rtofsDst="$out/DistToBndy.$meshname.rtofs" #extrapolate rtofs .glo. for full ice coverage -python ./ComputeGriddedToRWPSInterpWeights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out +python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc #do not extrapolate rtofs .glo. currents -python ./ComputeGriddedToRWPSInterpWeights.py $rtofs_cur $mesh $rtofsIntrp.currents.nc $rtofsDst.currents.nc -1 > GenWhts.rtofs.currents.out +python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.currents.nc $rtofsDst.currents.nc -1 > GenWhts.rtofs.currents.out -cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/dev/PreProcess +cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/dev/preprocess stofs_glo="$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" ## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python ComputeUnstrToRWPSInterpWeights.py $stofs_glo $mesh $Nprocs +python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs ## Now run parallel job script -qsub -W block=true jobcardComputeUnstrToRWPSInterpWeightsPBS +qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS wait diff --git a/ecf/jrwps_prep_currents.ecf b/ecf/jrwps_prep_currents.ecf index f105871..c99d569 100644 --- a/ecf/jrwps_prep_currents.ecf +++ b/ecf/jrwps_prep_currents.ecf @@ -7,7 +7,7 @@ #PBS -l select=1:ncpus=4:mem=64GB #PBS -o RWPS.PreProc.out -cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/PreProcess +cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/preprocess module load PrgEnv-intel/8.1.0 module load craype/2.7.8 @@ -20,15 +20,15 @@ module load prod_envir/2.0.5 #cycl=00 #mesh=../../fix/rwps.oc_1500m_30km.msh -source /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/PreProcess/rwpsenv +source /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/preprocess/rwpsenv meshname="${mesh##*/}" meshname="${meshname: 0: -4}" rm $prep/FetchCurrents.out $prep/ProcCurrents.out -sh GetCurrents.sh $prep > $tmp/FetchCurrents.out -sh ProcessCurrents.sh $prep > $tmp/ProcCurrents.out +sh get_currents.sh $prep > $tmp/FetchCurrents.out +sh process_currents.sh $prep > $tmp/ProcCurrents.out #mv $frc/$meshname.$date.$cycl.vel.stofsxrtofs.nc $frc/$meshname.$date.$cycl.current.nc diff --git a/ecf/jrwps_prep_ice.ecf b/ecf/jrwps_prep_ice.ecf index 9f97305..868dd32 100644 --- a/ecf/jrwps_prep_ice.ecf +++ b/ecf/jrwps_prep_ice.ecf @@ -7,7 +7,7 @@ #PBS -l select=1:ncpus=4:mem=64GB #PBS -o RWPS.PreProc.out -cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/PreProcess +cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/preprocess module load PrgEnv-intel/8.1.0 module load craype/2.7.8 @@ -20,7 +20,7 @@ module load prod_envir/2.0.5 #cycl=00 #mesh=../../fix/rwps.oc_1500m_30km.msh -source /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/PreProcess/rwpsenv +source /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/preprocess/rwpsenv meshname="${mesh##*/}" meshname="${meshname: 0: -4}" @@ -29,8 +29,8 @@ rm $prep/FetchIce.out $prep/ProcICE.out # sh GetCurrents.sh $prep > FetchCurrents.out # sh ProcessCurrents.sh $prep > ProcCurrents.out -sh GetIce.sh $prep > $tmp/FetchIce.out -sh ProcessIce.sh $prep > $tmp/ProcIce.out +sh get_ice.sh $prep > $tmp/FetchIce.out +sh process_ice.sh $prep > $tmp/ProcIce.out #mv $frc/$meshname.$date.$cycl.ice.rtofsxnbm.nc $frc/$meshname.$date.$cycl.ice.nc diff --git a/ecf/jrwps_prep_waterlevel.ecf b/ecf/jrwps_prep_waterlevel.ecf index adae41e..b62f58c 100644 --- a/ecf/jrwps_prep_waterlevel.ecf +++ b/ecf/jrwps_prep_waterlevel.ecf @@ -7,7 +7,7 @@ #PBS -l select=1:ncpus=4:mem=64GB #PBS -o RWPS.PreProc.out -cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/PreProcess +cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/preprocess module load PrgEnv-intel/8.1.0 module load craype/2.7.8 @@ -16,14 +16,14 @@ module load cfp/2.0.4 module load prod_util/2.0.8 module load prod_envir/2.0.5 -source /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/PreProcess/rwpsenv +source /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/preprocess/rwpsenv meshname="${mesh##*/}" meshname="${meshname: 0: -4}" rm $tmp/FetchWaterLevel.out $tmp/ProcWaterLevel.out -sh GetWaterLevel.sh > $tmp/FetchWaterLevel.out -sh ProcessWaterLevel.sh > $tmp/ProcWaterLevel.out +sh get_waterlevel.sh > $tmp/FetchWaterLevel.out +sh process_waterlevel.sh > $tmp/ProcWaterLevel.out diff --git a/ecf/jrwps_prep_wind.ecf b/ecf/jrwps_prep_wind.ecf index 2331669..93b285c 100644 --- a/ecf/jrwps_prep_wind.ecf +++ b/ecf/jrwps_prep_wind.ecf @@ -7,7 +7,7 @@ #PBS -l select=1:ncpus=4:mem=64GB #PBS -o RWPS.PreProc.out -cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/PreProcess +cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/preprocess module load PrgEnv-intel/8.1.0 module load craype/2.7.8 @@ -20,15 +20,15 @@ module load prod_envir/2.0.5 #cycl=00 #mesh=../../fix/rwps.oc_1500m_30km.msh -source /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/PreProcess/rwpsenv +source /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/preprocess/rwpsenv meshname="${mesh##*/}" meshname="${meshname: 0: -4}" rm $tmp/FetchWinds.out $tmp/ProcWinds.out -sh GetWinds.sh > $tmp/FetchWinds.out -sh ProcessWinds.sh > $tmp/ProcWinds.out +sh get_winds.sh > $tmp/FetchWinds.out +sh process_winds.sh > $tmp/ProcWinds.out #mv $frc/rwps.est.$meshname.$date.$cycl.wind10m.nc $frc/$meshname.$date.$cycl.wind.nc diff --git a/ush/PreProcess/nbm/ConvertNBMIcetif2NetCDF.py b/ush/PreProcess/nbm/ConvertNBMIcetif2NetCDF.py deleted file mode 100644 index bd62981..0000000 --- a/ush/PreProcess/nbm/ConvertNBMIcetif2NetCDF.py +++ /dev/null @@ -1,50 +0,0 @@ -import numpy as np -import pyproj -import rioxarray as rio -import xarray as xr -import sys - -flin = sys.argv[1] -flout=flin[0:-4]+".nc" -# 1. Load the original GeoTIFF file -# Replace 'input.tif' with your actual file path -da = rio.open_rasterio(flin) - -# 2. Extract the 1D projected X and Y coordinates (in meters) -x_coords = da.x.values -y_coords = da.y.values - -# 3. Create a 2D meshgrid of the projected coordinates -X, Y = np.meshgrid(x_coords, y_coords) - -# 4. Set up the coordinate transformer -# From EPSG:5936 (Polar Stereographic) to EPSG:4326 (Lat/Lon) -transformer = pyproj.Transformer.from_crs( - "EPSG:5936", "EPSG:4326", always_xy=True -) - -# 5. Compute the 2D curvilinear latitude and longitude grids -lon_2d, lat_2d = transformer.transform(X, Y) - -# 6. Restructure the DataArray, dropping old 1D spatial coordinates -# We assume band 0 is your primary data array -data_var = da.isel(band=0).drop_vars(["x", "y", "spatial_ref"]) - -# 7. Build the NetCDF dataset with 2D curvilinear coordinates -ds = xr.Dataset( - data_vars={"variable_name": (["y", "x"], data_var.values)}, - coords={ - "lon": (["y", "x"], lon_2d), - "lat": (["y", "x"], lat_2d), - }, -) - -# Add standard CF-compliant metadata for curvilinear grids -ds["variable_name"].attrs["coordinates"] = "lon lat" -ds["lon"].attrs["units"] = "degrees_east" -ds["lat"].attrs["units"] = "degrees_north" - -# 8. Export to NetCDF with compression enabled -ds.to_netcdf(flout, encoding={"variable_name": {"zlib": True}}) - -print("Conversion complete: "+flout+" saved.") diff --git a/ush/PreProcess/rrfs/MakeEnsRRFSWind.sh b/ush/PreProcess/rrfs/MakeEnsRRFSWind.sh deleted file mode 100644 index 8e38fc3..0000000 --- a/ush/PreProcess/rrfs/MakeEnsRRFSWind.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -# This script takes ensemble rrfs grib2 forecast files, extracts 10m u and v wind -# components and outputs to netcdf. Comand line arguments are -# forecast time: YYYYMMDD -# forecast cycle: CC -# frecast region: hi,pr,na,ak or conus -# -# For example call as: -# sh MakeEnsRRFSWind.sh 20260428 00 pr -# to produce output file: -# rrfs.20260428.00.wind10m.pr.nc -# - -module load intel-oneapi/2022.2.0.262 -module load wgrib2/2.0.8 - -OUTPUT_FILE="rrfs.ensemble.$1.$2.wind10m.$3.nc" -INPUT_DIR1="/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.$1/$2/m001/" - -for i in {1..5}; do - echo "Number: $i" - rm varname$i.txt - echo "# variable renaming for ensemble member $i">varname$i.txt - echo "UGRD:10 m above ground:UGRDn$i" >>varname$i.txt - echo "VGRD:10 m above ground:VGRDn$i" >>varname$i.txt -done - - -# Remove existing output file to avoid mixing old data -rm -f "$OUTPUT_FILE" - -echo "writing ensemble 10m wind from $INPUT_DIR1 to $OUTPUT_FILE" - -# Note: Ensure files are in the correct chronological order (e.g., sorted by name) -for file1 in $(ls "$INPUT_DIR1"/rrfs.t$2z.m001.2dfld.*km.f*.$3.grib2 | sort); do - file2="${file1//m001/m002}" - file3="${file1//m001/m003}" - file4="${file1//m001/m004}" - file5="${file1//m001/m005}" - fileN="${file1//m001/m00N}" - - echo "Processing: ensemble $fileN" - wgrib2 $file1 -match ":UGRD:10 m" -nc_table varname1.txt -append -netcdf "$OUTPUT_FILE" - wgrib2 $file1 -match ":VGRD:10 m" -nc_table varname1.txt -append -netcdf "$OUTPUT_FILE" - - wgrib2 $file2 -match ":UGRD:10 m" -nc_table varname2.txt -append -netcdf "$OUTPUT_FILE" - wgrib2 $file2 -match ":VGRD:10 m" -nc_table varname2.txt -append -netcdf "$OUTPUT_FILE" - - wgrib2 $file3 -match ":UGRD:10 m" -nc_table varname3.txt -append -netcdf "$OUTPUT_FILE" - wgrib2 $file3 -match ":VGRD:10 m" -nc_table varname3.txt -append -netcdf "$OUTPUT_FILE" - - wgrib2 $file4 -match ":UGRD:10 m" -nc_table varname4.txt -append -netcdf "$OUTPUT_FILE" - wgrib2 $file4 -match ":VGRD:10 m" -nc_table varname4.txt -append -netcdf "$OUTPUT_FILE" - - wgrib2 $file5 -match ":UGRD:10 m" -nc_table varname5.txt -append -netcdf "$OUTPUT_FILE" - wgrib2 $file5 -match ":VGRD:10 m" -nc_table varname5.txt -append -netcdf "$OUTPUT_FILE" - -done - -echo "rrfs ensemble processing complete for forecast date $1, cycle $2, domain $3" -echo "output written to: $OUTPUT_FILE" diff --git a/ush/PreProcess/AddErrVarToFile.py b/ush/preprocess/add_err_var_to_file.py similarity index 100% rename from ush/PreProcess/AddErrVarToFile.py rename to ush/preprocess/add_err_var_to_file.py diff --git a/ush/PreProcess/AddMeshGeomToFile.py b/ush/preprocess/add_mesh_geom_to_file.py similarity index 100% rename from ush/PreProcess/AddMeshGeomToFile.py rename to ush/preprocess/add_mesh_geom_to_file.py diff --git a/ush/PreProcess/BayesForecastUpdate.py b/ush/preprocess/bayes_forecast_update.py similarity index 100% rename from ush/PreProcess/BayesForecastUpdate.py rename to ush/preprocess/bayes_forecast_update.py diff --git a/ush/PreProcess/ComputeGriddedToRWPSInterpWeights.py b/ush/preprocess/compute_gridded_to_rwps_interp_weights.py similarity index 100% rename from ush/PreProcess/ComputeGriddedToRWPSInterpWeights.py rename to ush/preprocess/compute_gridded_to_rwps_interp_weights.py diff --git a/ush/PreProcess/ComputeUnstrToRWPSInterpWeights.py b/ush/preprocess/compute_unstr_to_rwps_interp_weights.py similarity index 100% rename from ush/PreProcess/ComputeUnstrToRWPSInterpWeights.py rename to ush/preprocess/compute_unstr_to_rwps_interp_weights.py diff --git a/ush/PreProcess/ComputeUnstrToRWPSInterpWeights.sh b/ush/preprocess/compute_unstr_to_rwps_interp_weights.sh similarity index 100% rename from ush/PreProcess/ComputeUnstrToRWPSInterpWeights.sh rename to ush/preprocess/compute_unstr_to_rwps_interp_weights.sh diff --git a/ush/PreProcess/ComputeUnstrToRWPSInterpWeights0.sh b/ush/preprocess/compute_unstr_to_rwps_interp_weights0.sh similarity index 100% rename from ush/PreProcess/ComputeUnstrToRWPSInterpWeights0.sh rename to ush/preprocess/compute_unstr_to_rwps_interp_weights0.sh diff --git a/ush/PreProcess/ComputeWindToRWPSInterpWeights.py b/ush/preprocess/compute_wind_to_rwps_interp_weights.py similarity index 100% rename from ush/PreProcess/ComputeWindToRWPSInterpWeights.py rename to ush/preprocess/compute_wind_to_rwps_interp_weights.py diff --git a/ush/PreProcess/ConvertWeights2Netcdf.py b/ush/preprocess/convert_weights_to_netcdf.py similarity index 100% rename from ush/PreProcess/ConvertWeights2Netcdf.py rename to ush/preprocess/convert_weights_to_netcdf.py diff --git a/ush/PreProcess/GetCurrents.sh b/ush/preprocess/get_currents.sh similarity index 100% rename from ush/PreProcess/GetCurrents.sh rename to ush/preprocess/get_currents.sh diff --git a/ush/PreProcess/GetIce.sh b/ush/preprocess/get_ice.sh similarity index 100% rename from ush/PreProcess/GetIce.sh rename to ush/preprocess/get_ice.sh diff --git a/ush/PreProcess/GetWaterLevel.sh b/ush/preprocess/get_waterlevel.sh similarity index 100% rename from ush/PreProcess/GetWaterLevel.sh rename to ush/preprocess/get_waterlevel.sh diff --git a/ush/PreProcess/GetWinds.sh b/ush/preprocess/get_wind.sh similarity index 100% rename from ush/PreProcess/GetWinds.sh rename to ush/preprocess/get_wind.sh diff --git a/ush/PreProcess/InterpTime.py b/ush/preprocess/interp_time.py similarity index 100% rename from ush/PreProcess/InterpTime.py rename to ush/preprocess/interp_time.py diff --git a/ush/PreProcess/InterpUtilities.py b/ush/preprocess/interp_utilities.py similarity index 100% rename from ush/PreProcess/InterpUtilities.py rename to ush/preprocess/interp_utilities.py diff --git a/ush/PreProcess/InterpolateWithWeights.py b/ush/preprocess/interpolate_with_weights.py similarity index 100% rename from ush/PreProcess/InterpolateWithWeights.py rename to ush/preprocess/interpolate_with_weights.py diff --git a/ush/PreProcess/InterpolateWithWeightsAndErrorVariance.py b/ush/preprocess/interpolate_with_weights_and_error_variance.py similarity index 100% rename from ush/PreProcess/InterpolateWithWeightsAndErrorVariance.py rename to ush/preprocess/interpolate_with_weights_and_error_variance.py diff --git a/ush/PreProcess/nbm/GetNBMIce.sh b/ush/preprocess/nbm/get_nbm_ice.sh similarity index 100% rename from ush/PreProcess/nbm/GetNBMIce.sh rename to ush/preprocess/nbm/get_nbm_ice.sh diff --git a/ush/PreProcess/nbm/MakeNBMWind.sh b/ush/preprocess/nbm/make_nbm_wind.sh similarity index 100% rename from ush/PreProcess/nbm/MakeNBMWind.sh rename to ush/preprocess/nbm/make_nbm_wind.sh diff --git a/ush/PreProcess/ProcessCurrents.sh b/ush/preprocess/process_currents.sh similarity index 100% rename from ush/PreProcess/ProcessCurrents.sh rename to ush/preprocess/process_currents.sh diff --git a/ush/PreProcess/ProcessIce.sh b/ush/preprocess/process_ice.sh similarity index 100% rename from ush/PreProcess/ProcessIce.sh rename to ush/preprocess/process_ice.sh diff --git a/ush/PreProcess/ProcessWaterLevel.sh b/ush/preprocess/process_waterlevel.sh similarity index 100% rename from ush/PreProcess/ProcessWaterLevel.sh rename to ush/preprocess/process_waterlevel.sh diff --git a/ush/PreProcess/ProcessWinds.sh b/ush/preprocess/process_wind.sh similarity index 100% rename from ush/PreProcess/ProcessWinds.sh rename to ush/preprocess/process_wind.sh diff --git a/ush/PreProcess/rrfs/MakeRRFSWind.sh b/ush/preprocess/rrfs/make_rrfs_wind.sh similarity index 100% rename from ush/PreProcess/rrfs/MakeRRFSWind.sh rename to ush/preprocess/rrfs/make_rrfs_wind.sh diff --git a/ush/PreProcess/rtofs/GetRTOFS.sh b/ush/preprocess/rtofs/GetRTOFS.sh similarity index 100% rename from ush/PreProcess/rtofs/GetRTOFS.sh rename to ush/preprocess/rtofs/GetRTOFS.sh diff --git a/ush/PreProcess/rtofs/GetRTOFSfcst.py b/ush/preprocess/rtofs/get_rtofs_fcst.py similarity index 100% rename from ush/PreProcess/rtofs/GetRTOFSfcst.py rename to ush/preprocess/rtofs/get_rtofs_fcst.py diff --git a/ush/PreProcess/rtofs/GetRTOFSIce.sh b/ush/preprocess/rtofs/get_rtofs_ice.sh similarity index 100% rename from ush/PreProcess/rtofs/GetRTOFSIce.sh rename to ush/preprocess/rtofs/get_rtofs_ice.sh diff --git a/ush/PreProcess/rtofs/GetRTOFSIcefcst.py b/ush/preprocess/rtofs/get_rtofs_ice_fcst.py similarity index 100% rename from ush/PreProcess/rtofs/GetRTOFSIcefcst.py rename to ush/preprocess/rtofs/get_rtofs_ice_fcst.py diff --git a/ush/PreProcess/rwpsenv b/ush/preprocess/rwpsenv similarity index 100% rename from ush/PreProcess/rwpsenv rename to ush/preprocess/rwpsenv diff --git a/ush/PreProcess/SpdDir2UVnbm.py b/ush/preprocess/spd_dir_to_uv_nbm.py similarity index 100% rename from ush/PreProcess/SpdDir2UVnbm.py rename to ush/preprocess/spd_dir_to_uv_nbm.py diff --git a/ush/PreProcess/stofs/GetSTOFS.sh b/ush/preprocess/stofs/get_stofs.sh similarity index 100% rename from ush/PreProcess/stofs/GetSTOFS.sh rename to ush/preprocess/stofs/get_stofs.sh From a805b2906774af7b6c31805885caa88389889b84 Mon Sep 17 00:00:00 2001 From: keston Date: Wed, 19 Aug 2026 15:03:22 -0400 Subject: [PATCH 10/39] brought up to date with develop --- ush/preprocess/add_err_var_to_file.py | 2 +- ush/preprocess/add_mesh_geom_to_file.py | 2 +- ush/preprocess/bayes_forecast_update.py | 2 +- .../compute_gridded_to_rwps_interp_weights.py | 4 +- .../compute_unstr_to_rwps_interp_weights.py | 8 +-- .../compute_unstr_to_rwps_interp_weights.sh | 8 +-- .../compute_unstr_to_rwps_interp_weights0.sh | 10 +-- .../compute_wind_to_rwps_interp_weights.py | 2 +- ush/preprocess/convert_weights_to_netcdf.py | 2 +- ush/preprocess/get_currents.sh | 2 +- ush/preprocess/get_ice.sh | 4 +- ush/preprocess/get_waterlevel.sh | 2 +- ush/preprocess/get_wind.sh | 4 +- ush/preprocess/interp_time.py | 4 +- ush/preprocess/interp_utilities.py | 50 ++++++++++++++- ush/preprocess/interpolate_with_weights.py | 2 +- ...rpolate_with_weights_and_error_variance.py | 2 +- ush/preprocess/nbm/make_nbm_wind.sh | 21 ++++++ ush/preprocess/process_currents.sh | 24 +++---- ush/preprocess/process_ice.sh | 28 ++++---- ush/preprocess/process_waterlevel.sh | 10 +-- ush/preprocess/process_wind.sh | 64 +++++++++---------- ush/preprocess/rtofs/GetRTOFS.sh | 2 +- ush/preprocess/rtofs/get_rtofs_fcst.py | 2 +- ush/preprocess/rtofs/get_rtofs_ice.sh | 4 +- ush/preprocess/rtofs/get_rtofs_ice_fcst.py | 61 +++++++++++++++--- ush/preprocess/rwpsenv | 4 +- ush/preprocess/stofs/get_stofs.sh | 16 ++++- 28 files changed, 235 insertions(+), 111 deletions(-) diff --git a/ush/preprocess/add_err_var_to_file.py b/ush/preprocess/add_err_var_to_file.py index 8a9f483..8c9a4b9 100644 --- a/ush/preprocess/add_err_var_to_file.py +++ b/ush/preprocess/add_err_var_to_file.py @@ -1,7 +1,7 @@ import numpy as np import netCDF4 as nc import sys -import InterpUtilities as iutil +import interp_utilities as iutil import os #Add compute and add error variance field to existing file diff --git a/ush/preprocess/add_mesh_geom_to_file.py b/ush/preprocess/add_mesh_geom_to_file.py index e7e7d2a..c06deda 100644 --- a/ush/preprocess/add_mesh_geom_to_file.py +++ b/ush/preprocess/add_mesh_geom_to_file.py @@ -1,7 +1,7 @@ import numpy as np import netCDF4 as nc import sys -import InterpUtilities as iutil +import interp_utilities as iutil import os UseUnixTime=True diff --git a/ush/preprocess/bayes_forecast_update.py b/ush/preprocess/bayes_forecast_update.py index dd0aaea..fcc04c7 100644 --- a/ush/preprocess/bayes_forecast_update.py +++ b/ush/preprocess/bayes_forecast_update.py @@ -3,7 +3,7 @@ import netCDF4 as nc import sys import re -import InterpUtilities as iutil +import interp_utilities as iutil flin0=sys.argv[1] flin1=sys.argv[2] flout=sys.argv[3] diff --git a/ush/preprocess/compute_gridded_to_rwps_interp_weights.py b/ush/preprocess/compute_gridded_to_rwps_interp_weights.py index 1dfddcc..a7bcb3d 100644 --- a/ush/preprocess/compute_gridded_to_rwps_interp_weights.py +++ b/ush/preprocess/compute_gridded_to_rwps_interp_weights.py @@ -13,13 +13,13 @@ import netCDF4 as nc import sys import re -import InterpUtilities as iutil +import interp_utilities as iutil import xarray as xr import esmpy import scipy.sparse as sp -import InterpUtilities as iutil +import interp_utilities as iutil # Main program AddExtrapolationSupport=True diff --git a/ush/preprocess/compute_unstr_to_rwps_interp_weights.py b/ush/preprocess/compute_unstr_to_rwps_interp_weights.py index 661ea27..ca90d7b 100644 --- a/ush/preprocess/compute_unstr_to_rwps_interp_weights.py +++ b/ush/preprocess/compute_unstr_to_rwps_interp_weights.py @@ -2,7 +2,7 @@ import netCDF4 as nc import sys from scipy.interpolate import RegularGridInterpolator -import InterpUtilities as iutil +import interp_utilities as iutil import os nargin = len(sys.argv) - 1 @@ -21,10 +21,10 @@ os.remove(TmpOutDir+"/*.txt") except: print("directory "+TmpOutDir+" is alread empty") - iutil.WriteInterpJobscriptPBS("jobcardComputeUnstrToRWPSInterpWeightsPBS",flin,mshfl,Njobs, 1) - iutil.WriteInterpJobscriptSLURM("jobcardComputeUnstrToRWPSInterpWeightsSLURM",flin,mshfl,Njobs, 1) + iutil.WriteInterpJobscriptPBS("jobcardcompute_unstr_to_rwps_interp_weightsPBS",flin,mshfl,Njobs, 1) + iutil.WriteInterpJobscriptSLURM("jobcardcompute_unstr_to_rwps_interp_weightsSLURM",flin,mshfl,Njobs, 1) print("Made parallel jobcards to create interpolation weights with "+str(Njobs)+" processes. Next step:") - print("sbatch jobcardComputeUnstrToRWPSInterpWeightsSLURM") + print("sbatch jobcardcompute_unstr_to_rwps_interp_weightsSLURM") sys.exit() #if nargin==4 then do the part of the mesh for jobID of Njobs diff --git a/ush/preprocess/compute_unstr_to_rwps_interp_weights.sh b/ush/preprocess/compute_unstr_to_rwps_interp_weights.sh index 9af1a81..fc01138 100644 --- a/ush/preprocess/compute_unstr_to_rwps_interp_weights.sh +++ b/ush/preprocess/compute_unstr_to_rwps_interp_weights.sh @@ -26,16 +26,16 @@ meshfile=$2 Nprocs=$3 ## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python ComputeUnstrToRWPSInterpWeights.py $filein $meshfile $Nprocs +python compute_unstr_to_rwps_interp_weights.py $filein $meshfile $Nprocs ## Now run parallel job script -## sbatch jobcardComputeUnstrToRWPSInterpWeightsSLURM -qsub jobcardComputeUnstrToRWPSInterpWeightsPBS +## sbatch jobcardcompute_unstr_to_rwps_interp_weightsSLURM +qsub jobcardcompute_unstr_to_rwps_interp_weightsPBS wait; ## Now knit output from parallel job together and write to netcdf format ## The third argument "1" indicates to write (x,y) for destination and source nodes ## to support extrapolation -python ConvertWeights2Netcdf.py $filein $meshfile 1 +python convert_weights_to_netcdf.py $filein $meshfile 1 diff --git a/ush/preprocess/compute_unstr_to_rwps_interp_weights0.sh b/ush/preprocess/compute_unstr_to_rwps_interp_weights0.sh index 18aa2ec..8adcc4b 100644 --- a/ush/preprocess/compute_unstr_to_rwps_interp_weights0.sh +++ b/ush/preprocess/compute_unstr_to_rwps_interp_weights0.sh @@ -38,12 +38,12 @@ meshname="${meshname: 0: -4}" ## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python ComputeUnstrToRWPSInterpWeights.py $filein $meshfile $Nprocs +python compute_unstr_to_rwps_interp_weights.py $filein $meshfile $Nprocs ## Now run parallel job script -## sbatch jobcardComputeUnstrToRWPSInterpWeightsSLURM +## sbatch jobcardcompute_unstr_to_rwps_interp_weightsSLURM -qsub -W block=true jobcardComputeUnstrToRWPSInterpWeightsPBS +qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS wait @@ -54,11 +54,11 @@ cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname # convert output weights to netcdf file -##python ConvertWeights2Netcdf.py /lfs/h2/emc/couple/noscrub/keston.smith/SampleInput/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc /lfs/h2/emc/couple/noscrub/keston.smith/RWPS/fix/oc_1500m_30km/20260722/rwps.oc_1500m_30km.msh +##python convert_weights_to_netcdf.py /lfs/h2/emc/couple/noscrub/keston.smith/SampleInput/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc /lfs/h2/emc/couple/noscrub/keston.smith/RWPS/fix/oc_1500m_30km/20260722/rwps.oc_1500m_30km.msh ## Now knit output from parallel job together and write to netcdf format ## The third argument "1" indicates to write (x,y) for destination and source nodes ## to support extrapolation -python ConvertWeights2Netcdf.py $filein $meshfile 1 +python convert_weights_to_netcdf.py $filein $meshfile 1 diff --git a/ush/preprocess/compute_wind_to_rwps_interp_weights.py b/ush/preprocess/compute_wind_to_rwps_interp_weights.py index 381f6d1..d9e4376 100644 --- a/ush/preprocess/compute_wind_to_rwps_interp_weights.py +++ b/ush/preprocess/compute_wind_to_rwps_interp_weights.py @@ -12,7 +12,7 @@ import netCDF4 as nc import sys import re -import InterpUtilities as iutil +import interp_utilities as iutil import xarray as xr import esmpy import scipy.sparse as sp diff --git a/ush/preprocess/convert_weights_to_netcdf.py b/ush/preprocess/convert_weights_to_netcdf.py index 7f0d097..7d1ee50 100644 --- a/ush/preprocess/convert_weights_to_netcdf.py +++ b/ush/preprocess/convert_weights_to_netcdf.py @@ -1,7 +1,7 @@ import numpy as np import netCDF4 as nc import sys -import InterpUtilities as iutil +import interp_utilities as iutil import scipy.sparse as sp nargin = len(sys.argv) - 1 diff --git a/ush/preprocess/get_currents.sh b/ush/preprocess/get_currents.sh index 82e6cdb..b5a41b1 100644 --- a/ush/preprocess/get_currents.sh +++ b/ush/preprocess/get_currents.sh @@ -4,5 +4,5 @@ #source ./rwpsenv rtofs/GetRTOFS.sh $PDY & -stofs/GetSTOFS.sh $PDY $cyc current& +stofs/get_stofs.sh $PDY $cyc current& wait; diff --git a/ush/preprocess/get_ice.sh b/ush/preprocess/get_ice.sh index 052027c..57d7626 100644 --- a/ush/preprocess/get_ice.sh +++ b/ush/preprocess/get_ice.sh @@ -3,6 +3,6 @@ # This script retrieves ice forecasts for global RTOFS and Alaska NBM as netcdf files source ./rwpsenv -sh rtofs/GetRTOFSIce.sh $PDY $cyc & -sh nbm/GetNBMIce.sh $PDY $cyc & +sh rtofs/get_rtofs_ice.sh $PDY $cyc & +sh nbm/get_nbm_ice.sh $PDY $cyc & wait; diff --git a/ush/preprocess/get_waterlevel.sh b/ush/preprocess/get_waterlevel.sh index 5f7d0f7..922edd4 100644 --- a/ush/preprocess/get_waterlevel.sh +++ b/ush/preprocess/get_waterlevel.sh @@ -6,4 +6,4 @@ curdir=$(pwd) echo $curdir source ./rwpsenv -stofs/GetSTOFS.sh $PDY $cyc waterlevel +stofs/get_stofs.sh $PDY $cyc waterlevel diff --git a/ush/preprocess/get_wind.sh b/ush/preprocess/get_wind.sh index 0a9a4f6..6fed4e9 100644 --- a/ush/preprocess/get_wind.sh +++ b/ush/preprocess/get_wind.sh @@ -7,8 +7,8 @@ source ./rwpsenv echo "retrieving winds from rrfs and nbm for rwps wind" ( - echo "sh nbm/MakeNBMWind.sh $PDY $cyc oc > nbm.oc.out" - nbm/MakeNBMWind.sh $PDY $cyc oc > nbm.oc.out + echo "sh nbm/make_nbm_wind.sh $PDY $cyc oc > nbm.oc.out" + nbm/make_nbm_wind.sh $PDY $cyc oc > nbm.oc.out echo "retrieved winds from nbm oc domain" echo "Not retrieving other nbm domain winds" )& diff --git a/ush/preprocess/interp_time.py b/ush/preprocess/interp_time.py index 2bc8c88..e64c4b9 100644 --- a/ush/preprocess/interp_time.py +++ b/ush/preprocess/interp_time.py @@ -26,7 +26,7 @@ print("Interpolating fields from second file: "+str(InterpSecondFile)+" and extrapolating via persistance in time") #might want to rewrite with an input file to derive full set of times -print("running InterpTime.py: takes a forecast (arg1="+flin+") and interpolates to times ") +print("running interp_time.py: takes a forecast (arg1="+flin+") and interpolates to times ") print("in another file (arg2="+flinNewTimes+"). The origonal and interpoated values are output to ") print("a new file(arg3="+flout+") .") print("interpolating for variables:") @@ -114,7 +114,7 @@ InterpolatedVariables[jv,:,:]=uf[:,:] -import InterpUtilities as iutil +import interp_utilities as iutil with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: ncout.createDimension('level' , 1) diff --git a/ush/preprocess/interp_utilities.py b/ush/preprocess/interp_utilities.py index 105b205..ac1cc0e 100644 --- a/ush/preprocess/interp_utilities.py +++ b/ush/preprocess/interp_utilities.py @@ -38,6 +38,52 @@ def ConvertTimeToUnixTime(flin,TimeVarName = None): unix_time = time*60*60 + base_offset return unix_time +def FileNameToUnixTime(flin,FcastPDY,FcastCYC): + year0=int(FcastPDY[0:4]) + month0=int(FcastPDY[4:6]) + day0=int(FcastPDY[6:8]) + hr0=int(FcastCYC) + #remove path and file + suffixp = flin.rfind(".") + dirp = flin.rfind("/") + flin=flin[dirp+1:suffixp] + + IsForecast=True + ntimep=flin.find(".f") + ntimeu=flin.find("_f") + ntime=max(ntimep,ntimeu) + print("ntime: "+str(ntime)) + if ntime<1: + IsForecast=False + ntimep=flin.find(".n") + ntimeu=flin.find("_n") + ntime=max(ntimep,ntimeu) + + print("ntime: "+str(ntime)) + ctime=flin[ntime+2:ntime+5] + print(ctime) + ctime=ctime.replace(".", "") #remove trailing "." in some file names + + print("FileNameToUnixTime A:") + print(flin) + print(ctime) + hrf=int(ctime) + epoch_1970 = datetime(1970, 1, 1, 0, 0, 0) + FileTime = datetime(year0,month0,day0, hr0, 0, 0) + base_offset = int((FileTime - epoch_1970).total_seconds()) + if IsForecast: + unix_time = base_offset + abs(hrf)*3600 + else: + unix_time = base_offset - abs(hrf)*3600 + + print("FileNameToUnixTime:") + print(str(year0)+" "+str(month0)+ " " +str(day0) + " " +str(hr0)) + print(flin) + print(ctime) + print(base_offset) + print(hrf) + return unix_time + def loadWW3Mesh(fl): print("mesh file="+fl) f=open(fl, 'r') @@ -660,7 +706,7 @@ def WriteInterpJobscriptPBS(fl,flin,mshfl,Njobs, ComputeNodes): f.write("cd "+current_dir+"\n") f.write("# calculate interpolation weights in parallel geographically \n") - f.write("python ComputeUnstrToRWPSInterpWeights.py "+flin+" "+mshfl+" $PBS_ARRAY_INDEX " + str(Njobs)+" > InterpJob.$PBS_ARRAY_INDEX.out \n") + f.write("python compute_unstr_to_rwps_interp_weights.py "+flin+" "+mshfl+" $PBS_ARRAY_INDEX " + str(Njobs)+" > InterpJob.$PBS_ARRAY_INDEX.out \n") def WriteInterpJobscriptSLURM(fl,flin,mshfl,Njobs, ComputeNodes): @@ -695,7 +741,7 @@ def WriteInterpJobscriptSLURM(fl,flin,mshfl,Njobs, ComputeNodes): f.write("# concatonate different parts of the mesh to common text file \n") f.write("cat "+TmpOutDir+"/Part.IntrpWghts.*.txt > "+WghtFl+" \n") f.write("# convert output weights to netcdf file \n") - f.write("python ConvertWeights2Netcdf.py "+flin+" "+mshfl+" \n") + f.write("python convert_weights_to_netcdf.py "+flin+" "+mshfl+" \n") flintrp="STOFS.to."+mshfl[meshslash:len(mshfl)-4]+".sh" diff --git a/ush/preprocess/interpolate_with_weights.py b/ush/preprocess/interpolate_with_weights.py index 1edf6f0..fef0007 100644 --- a/ush/preprocess/interpolate_with_weights.py +++ b/ush/preprocess/interpolate_with_weights.py @@ -1,7 +1,7 @@ import numpy as np import netCDF4 as nc import sys -import InterpUtilities as iutil +import interp_utilities as iutil import xarray as xr import scipy.sparse as sp from scipy.interpolate import NearestNDInterpolator diff --git a/ush/preprocess/interpolate_with_weights_and_error_variance.py b/ush/preprocess/interpolate_with_weights_and_error_variance.py index 8ba8dc0..cb3c08e 100644 --- a/ush/preprocess/interpolate_with_weights_and_error_variance.py +++ b/ush/preprocess/interpolate_with_weights_and_error_variance.py @@ -1,7 +1,7 @@ import numpy as np import netCDF4 as nc import sys -import InterpUtilities as iutil +import interp_utilities as iutil import xarray as xr import scipy.sparse as sp from scipy.interpolate import NearestNDInterpolator diff --git a/ush/preprocess/nbm/make_nbm_wind.sh b/ush/preprocess/nbm/make_nbm_wind.sh index f203625..c7fa3c8 100755 --- a/ush/preprocess/nbm/make_nbm_wind.sh +++ b/ush/preprocess/nbm/make_nbm_wind.sh @@ -27,3 +27,24 @@ wgrib2 "$WDIR_FILE" -match ":WDIR:10 m" -append -netcdf "$OUTPUT_FILE" echo "nbm processing complete for forecast date $1, cycle $2, domain $3" echo "output written to: $OUTPUT_FILE" +blendv5.0_oceanic_windspd_2026-05-27T00:00_2026-06-03T03:00.tif + + +aws s3 cp --no-sign-request s3://noaa-nbm-grib2-pds/blend.20260524/00/core/blend.t00z.core.f258.oc.grib2 ./ +WIND_FILE="blend.t00z.core.f258.oc.grib2" +wgrib2 "$WIND_FILE" -match "(UGRD:10 m|VGRD:10 m)" -netcdf output.nc + +wgrib2 "$WIND_FILE" -match ":UGRD:10 m:VGRD:10 m" -netcdf "$OUTPUT_FILE" +#wgrib2 "$WIND_FILE" -match ":VGRD:10 m" -append -netcdf "$OUTPUT_FILE" + +#25:38322442:d=2026052400:UGRD:10 m above ground:258 hour fcst: +#26:39675712:d=2026052400:VGRD:10 m above ground:258 hour fcst: + +#aws s3 ls --no-sign-request s3://noaa-nbm-grib2-pds/blend.20260524/00/core/aws s3 ls --no-sign-request s3://noaa-nbm-grib2-pds/blend.20260524/00/core/ + + +#aws s3 ls --no-sign-request s3://noaa-nbm-grib2-pds/blend.t00z.core.f003.oc.grib2 +#aws s3 cp --no-sign-request s3://noaa-nbm-pds/blendv5.0/oceanic/2026/05/27/0000/windspd/blendv5.0_oceanic_windspd_2026-05-27T00:00_2026-06-03T03:00.tif ./ +#aws s3 cp --no-sign-request s3://noaa-nbm-pds/blendv5.0/oceanic/2026/05/27/0000/winddir/blendv5.0_oceanic_winddir_2026-05-27T00:00_2026-06-06T00:00.tif ./ + + diff --git a/ush/preprocess/process_currents.sh b/ush/preprocess/process_currents.sh index 892f722..aac3472 100644 --- a/ush/preprocess/process_currents.sh +++ b/ush/preprocess/process_currents.sh @@ -35,17 +35,17 @@ stofs_rwps_ti="$tmp/$meshname.$PDY.$cyc.vel.cwl.stofs.ti.nc" if [ ! -f "$stofs_wghts" ]; then echo "missing stofs interpolation weights file: $stofs_wghts" - echo "compute with script ComputeUnstrToRWPSInterpWeights.sh" + echo "compute with script compute_unstr_to_rwps_interp_weights.sh" exit 1 fi if [ ! -f "$stofs_dists" ]; then echo "missing stofs distance to boundary file: $stofs_dists" - echo "compute with script ComputeUnstrToRWPSInterpWeights.sh" + echo "compute with script compute_unstr_to_rwps_interp_weights.sh" exit 1 fi # extrapolate with zero fill -python InterpolateWithWeights.py $stofscur $stofs_wghts $stofs_rwps $varnames 0 & +python interpolate_with_weights.py $stofscur $stofs_wghts $stofs_rwps $varnames 0 & ## RTOFS interpolation rtofs_wghts="$fix/InterpolationWeights.$meshname.rtofs.currents.nc" @@ -60,28 +60,28 @@ if [ ! -f "$rtofs_wghts" ]; then fi if [ ! -f "$rtofs_dists" ]; then echo "missing stofs distance to boundary file: $rtofs_dists" - echo "compute with script ComputeUnstrToRWPSInterpWeights.py" + echo "compute with script compute_unstr_to_rwps_interp_weights.py" exit 2 fi # no extrapolation -python InterpolateWithWeights.py $rtofscur $rtofs_wghts $rtofs_rwps $varnames -1 & +python interpolate_with_weights.py $rtofscur $rtofs_wghts $rtofs_rwps $varnames -1 & wait; -python AddMeshGeomToFile.py $rtofs_rwps $mesh -python AddMeshGeomToFile.py $stofs_rwps $mesh +python add_mesh_geom_to_file.py $rtofs_rwps $mesh +python add_mesh_geom_to_file.py $stofs_rwps $mesh -python InterpTime.py $stofs_rwps $rtofs_rwps $stofs_rwps_ti $varnames False & +python interp_time.py $stofs_rwps $rtofs_rwps $stofs_rwps_ti $varnames False & #interpolate from rtofs to common stofs and rtofs times within range of stofs time #values out of range are extrapolated to assuming persistance -python InterpTime.py $stofs_rwps $rtofs_rwps $rtofs_rwps_ti $varnames True & +python interp_time.py $stofs_rwps $rtofs_rwps $rtofs_rwps_ti $varnames True & wait -python AddErrVarToFile.py $rtofs_rwps_ti $rtofs_dists 100.:1.:50.:250.:50. -python AddErrVarToFile.py $stofs_rwps_ti $stofs_dists 1.:100.:50.:250. +python add_err_var_to_file.py $rtofs_rwps_ti $rtofs_dists 100.:1.:50.:250.:50. +python add_err_var_to_file.py $stofs_rwps_ti $stofs_dists 1.:100.:50.:250. -python BayesForecastUpdate.py $stofs_rwps_ti $rtofs_rwps_ti $rwps_current $varnames +python bayes_forecast_update.py $stofs_rwps_ti $rtofs_rwps_ti $rwps_current $varnames diff --git a/ush/preprocess/process_ice.sh b/ush/preprocess/process_ice.sh index ea54937..a8d7b22 100644 --- a/ush/preprocess/process_ice.sh +++ b/ush/preprocess/process_ice.sh @@ -49,18 +49,18 @@ rwps_ice="$frc/$meshname.$PDY.$cyc.ice.nc" if [ ! -f "$nbm_ak_wghts" ]; then echo "missing nbm ak interpolation weights file: $nbm_ak_wghts" - echo "compute with script ComputeUnstrToRWPSInterpWeights.sh" + echo "compute with script compute_unstr_to_rwps_interp_weights.sh" exit 1 fi if [ ! -f "$nbm_ak_dists" ]; then echo "missing nbm ak distance to boundary file: $nbm_ak_dists" - echo "compute with script ComputeUnstrToRWPSInterpWeights.sh" + echo "compute with script compute_unstr_to_rwps_interp_weights.sh" exit 1 fi # no extrapolation -python InterpolateWithWeights.py $nbmice $nbm_ak_wghts $nbm_rwps $varnames -1 & +python interpolate_with_weights.py $nbmice $nbm_ak_wghts $nbm_rwps $varnames -1 & ## RTOFS interpolation @@ -71,35 +71,35 @@ if [ ! -f "$rtofs_wghts" ]; then fi if [ ! -f "$rtofs_dists" ]; then echo "missing stofs distance to boundary file: $rtofs_dists" - echo "compute with script ComputeUnstrToRWPSInterpWeights.py" + echo "compute with script compute_unstr_to_rwps_interp_weights.py" exit 2 fi # extrapolate with 0 as fill echo "$rtofsice" -python InterpolateWithWeights.py $rtofsice $rtofs_wghts $rtofs_rwps $varnames 0 & +python interpolate_with_weights.py $rtofsice $rtofs_wghts $rtofs_rwps $varnames 0 & wait; -python AddMeshGeomToFile.py $rtofs_rwps $mesh -python AddMeshGeomToFile.py $nbm_rwps $mesh +python add_mesh_geom_to_file.py $rtofs_rwps $mesh +python add_mesh_geom_to_file.py $nbm_rwps $mesh -#python AddErrVarToFile.py $rtofs_rwps $rtofs_dists 100.:1.:50.:250.:50. -#python AddErrVarToFile.py $stofs_rwps $stofs_dists 1.:100.:50.:250. +#python add_err_var_to_file.py $rtofs_rwps $rtofs_dists 100.:1.:50.:250.:50. +#python add_err_var_to_file.py $stofs_rwps $stofs_dists 1.:100.:50.:250. #interpolate from stofs to common stofs and rtofs times within range of stofs time -python InterpTime.py $rtofs_rwps $nbm_rwps $rtofs_rwps_ti $varnames False & +python interp_time.py $rtofs_rwps $nbm_rwps $rtofs_rwps_ti $varnames False & #interpolate from rtofs to common stofs and rtofs times within range of stofs time #values out of range are extrapolated to assuming persistance -python InterpTime.py $rtofs_rwps $nbm_rwps $nbm_rwps_ti $varnames True & +python interp_time.py $rtofs_rwps $nbm_rwps $nbm_rwps_ti $varnames True & wait #uniform variance of 100. -python AddErrVarToFile.py $rtofs_rwps_ti $rtofs_dists 100. +python add_err_var_to_file.py $rtofs_rwps_ti $rtofs_dists 100. #interior variance of 4., boundary variance fof 400., transition lengthscale 9. km -python AddErrVarToFile.py $nbm_rwps_ti $nbm_ak_dists 4.:400.:9. +python add_err_var_to_file.py $nbm_rwps_ti $nbm_ak_dists 4.:400.:9. -python BayesForecastUpdate.py $rtofs_rwps_ti $nbm_rwps_ti $rwps_ice $varnames +python bayes_forecast_update.py $rtofs_rwps_ti $nbm_rwps_ti $rwps_ice $varnames diff --git a/ush/preprocess/process_waterlevel.sh b/ush/preprocess/process_waterlevel.sh index 5ef5dc7..896101f 100644 --- a/ush/preprocess/process_waterlevel.sh +++ b/ush/preprocess/process_waterlevel.sh @@ -30,15 +30,15 @@ varnames="zeta" if [ ! -f "$stofs_wghts" ]; then echo "missing stofs interpolation weights file: $stofs_wghts" - echo "compute with script ComputeUnstrToRWPSInterpWeights.sh" + echo "compute with script compute_unstr_to_rwps_interp_weights.sh" exit 1 fi if [ ! -f "$stofs_dists" ]; then echo "missing stofs distance to boundary file: $stofs_dists" - echo "compute with script ComputeUnstrToRWPSInterpWeights.sh" + echo "compute with script compute_unstr_to_rwps_interp_weights.sh" exit 1 fi -python InterpolateWithWeights.py $stofslev $stofs_wghts $rwps_waterlevel $varnames 0 -python AddMeshGeomToFile.py $rwps_waterlevel $mesh -python AddErrVarToFile.py $rwps_waterlevel $stofs_dists 1. +python interpolate_with_weights.py $stofslev $stofs_wghts $rwps_waterlevel $varnames 0 +python add_mesh_geom_to_file.py $rwps_waterlevel $mesh +python add_err_var_to_file.py $rwps_waterlevel $stofs_dists 1. diff --git a/ush/preprocess/process_wind.sh b/ush/preprocess/process_wind.sh index c53906f..01131af 100644 --- a/ush/preprocess/process_wind.sh +++ b/ush/preprocess/process_wind.sh @@ -71,64 +71,64 @@ rrfs_conus_dist="$fix/DistToBndy.$meshname.rrfs.conus.nc" ( #Convert NBM speed and direction to u,v - python SpdDir2UVnbm.py $nbm_oc $nbm_oc_uv + python spd_dir_to_uv_nbm.py $nbm_oc $nbm_oc_uv # If the interpolation weights do not already exist for the domains create them # also creates distance to boundary used in prescribed error covariance specification - [ ! -f "$nbm_oc_wghts" ] && python ComputeGriddedToRWPSInterpWeights.py $nbm_oc_uv $mesh 1 - python InterpolateWithWeights.py $nbm_oc_uv $nbm_oc_wghts $rwps_oc $windvars 3 - python AddMeshGeomToFile.py $rwps_oc $mesh + [ ! -f "$nbm_oc_wghts" ] && python compute_gridded_to_rwps_interp_weights.py $nbm_oc_uv $mesh 1 + python interpolate_with_weights.py $nbm_oc_uv $nbm_oc_wghts $rwps_oc $windvars 3 + python add_mesh_geom_to_file.py $rwps_oc $mesh )& ( - [ ! -f "$rrfs_hi_wghts" ] && python ComputeGriddedToRWPSInterpWeights.py $rrfs_hi $mesh $rrfs_hi_wghts $rrfs_hi_dist - python InterpolateWithWeights.py $rrfs_hi $rrfs_hi_wghts $rwps_hi $windvars -1 > intrp.rrfs.hi.out + [ ! -f "$rrfs_hi_wghts" ] && python compute_gridded_to_rwps_interp_weights.py $rrfs_hi $mesh $rrfs_hi_wghts $rrfs_hi_dist + python interpolate_with_weights.py $rrfs_hi $rrfs_hi_wghts $rwps_hi $windvars -1 > intrp.rrfs.hi.out #add mesh geometry into interpolated file - python AddMeshGeomToFile.py $rwps_hi $mesh + python add_mesh_geom_to_file.py $rwps_hi $mesh # Add error covariance field to files with interpolated fields for bayesian update # Based on distance to boundary of input field and commant line parameters InternalVariance:BoundaryVariance:LengthScale(km) - python AddErrVarToFile.py $rwps_hi $rrfs_hi_dist 4.:40.:200. + python add_err_var_to_file.py $rwps_hi $rrfs_hi_dist 4.:40.:200. )& ( - [ ! -f "$rrfs_pr_wghts" ] && python ComputeGriddedToRWPSInterpWeights.py $rrfs_pr $mesh $rrfs_pr_wghts $rrfs_pr_dist - python InterpolateWithWeights.py $rrfs_pr $rrfs_pr_wghts $rwps_pr $windvars -1 > intrp.rrfs.pr.out - python AddMeshGeomToFile.py $rwps_pr $mesh - python AddErrVarToFile.py $rwps_pr $rrfs_pr_dist 4.:40.:150. + [ ! -f "$rrfs_pr_wghts" ] && python compute_gridded_to_rwps_interp_weights.py $rrfs_pr $mesh $rrfs_pr_wghts $rrfs_pr_dist + python interpolate_with_weights.py $rrfs_pr $rrfs_pr_wghts $rwps_pr $windvars -1 > intrp.rrfs.pr.out + python add_mesh_geom_to_file.py $rwps_pr $mesh + python add_err_var_to_file.py $rwps_pr $rrfs_pr_dist 4.:40.:150. )& ( - [ ! -f "$rrfs_ak_wghts" ] && python ComputeGriddedToRWPSInterpWeights.py $rrfs_ak $mesh $rrfs_ak_wghts $rrfs_ak_dist - python InterpolateWithWeights.py $rrfs_ak $rrfs_ak_wghts $rwps_ak $windvars -1 > intrp.rrfs.ak.out - python AddMeshGeomToFile.py $rwps_ak $mesh - python AddErrVarToFile.py $rwps_ak $rrfs_ak_dist 9.:90.:500. + [ ! -f "$rrfs_ak_wghts" ] && python compute_gridded_to_rwps_interp_weights.py $rrfs_ak $mesh $rrfs_ak_wghts $rrfs_ak_dist + python interpolate_with_weights.py $rrfs_ak $rrfs_ak_wghts $rwps_ak $windvars -1 > intrp.rrfs.ak.out + python add_mesh_geom_to_file.py $rwps_ak $mesh + python add_err_var_to_file.py $rwps_ak $rrfs_ak_dist 9.:90.:500. )& ( - [ ! -f "$rrfs_conus_wghts" ] && python ComputeGriddedToRWPSInterpWeights.py $rrfs_conus $mesh $rrfs_conus_wghts $rrfs_conus_dist - python InterpolateWithWeights.py $rrfs_conus $rrfs_conus_wghts $rwps_conus $windvars -1 - python AddMeshGeomToFile.py $rwps_conus $mesh - python AddErrVarToFile.py $rwps_conus $rrfs_conus_dist 16.:160.:1000. + [ ! -f "$rrfs_conus_wghts" ] && python compute_gridded_to_rwps_interp_weights.py $rrfs_conus $mesh $rrfs_conus_wghts $rrfs_conus_dist + python interpolate_with_weights.py $rrfs_conus $rrfs_conus_wghts $rwps_conus $windvars -1 + python add_mesh_geom_to_file.py $rwps_conus $mesh + python add_err_var_to_file.py $rwps_conus $rrfs_conus_dist 16.:160.:1000. )& ( - [ ! -f "$rrfs_na_wghts" ] && python ComputeGriddedToRWPSInterpWeights.py $rrfs_na $mesh $rrfs_na_wghts $rrfs_na_dist - python InterpolateWithWeights.py $rrfs_na $rrfs_na_wghts $rwps_na $windvars -1 - python AddMeshGeomToFile.py $rwps_na $mesh - python AddErrVarToFile.py $rwps_na $rrfs_na_dist 50.:500.:1500. + [ ! -f "$rrfs_na_wghts" ] && python compute_gridded_to_rwps_interp_weights.py $rrfs_na $mesh $rrfs_na_wghts $rrfs_na_dist + python interpolate_with_weights.py $rrfs_na $rrfs_na_wghts $rwps_na $windvars -1 + python add_mesh_geom_to_file.py $rwps_na $mesh + python add_err_var_to_file.py $rwps_na $rrfs_na_dist 50.:500.:1500. )& wait; #Interpolate NBM in time to times within the NBM forecast covered by the RRFS forecast -python InterpTime.py $rwps_oc $rwps_pr $rwps_oc_ti $windvars +python interp_time.py $rwps_oc $rwps_pr $rwps_oc_ti $windvars #add mesh geometry into file -python AddMeshGeomToFile.py $rwps_oc_ti $mesh +python add_mesh_geom_to_file.py $rwps_oc_ti $mesh #add prescribed error covariance for nbm oc domain (assumed constant 100. (m/s)^2 ) -python AddErrVarToFile.py $rwps_oc_ti $nbm_oc_dist 100. +python add_err_var_to_file.py $rwps_oc_ti $nbm_oc_dist 100. cp $rwps_oc_ti $rwps_wind -[ ! -f "$rwps_hi" ] && python BayesForecastUpdate.py $rwps_wind $rwps_hi $rwps_wind $windvars -[ ! -f "$rwps_pr" ] && python BayesForecastUpdate.py $rwps_wind $rwps_pr $rwps_wind $windvars -[ ! -f "$rwps_ak" ] && python BayesForecastUpdate.py $rwps_wind $rwps_ak $rwps_wind $windvars -[ ! -f "$rwps_conus" ] && python BayesForecastUpdate.py $rwps_wind $rwps_conus $rwps_wind $windvars -[ ! -f "$rwps_na" ] && python BayesForecastUpdate.py $rwps_wind $rwps_na $rwps_wind $windvars +[ ! -f "$rwps_hi" ] && python bayes_forecast_update.py $rwps_wind $rwps_hi $rwps_wind $windvars +[ ! -f "$rwps_pr" ] && python bayes_forecast_update.py $rwps_wind $rwps_pr $rwps_wind $windvars +[ ! -f "$rwps_ak" ] && python bayes_forecast_update.py $rwps_wind $rwps_ak $rwps_wind $windvars +[ ! -f "$rwps_conus" ] && python bayes_forecast_update.py $rwps_wind $rwps_conus $rwps_wind $windvars +[ ! -f "$rwps_na" ] && python bayes_forecast_update.py $rwps_wind $rwps_na $rwps_wind $windvars diff --git a/ush/preprocess/rtofs/GetRTOFS.sh b/ush/preprocess/rtofs/GetRTOFS.sh index c8ff1e5..4d5da2d 100755 --- a/ush/preprocess/rtofs/GetRTOFS.sh +++ b/ush/preprocess/rtofs/GetRTOFS.sh @@ -22,6 +22,6 @@ flout="$COMINlocal/rtofs.$PDY.nc" mkdir -p $tmpdir cp $filesin $tmpdir/ -python rtofs/GetRTOFSfcst.py $tmpdir $flout +python rtofs/get_rtofs_fcst.py $tmpdir $flout #rm -rf $tmpdir diff --git a/ush/preprocess/rtofs/get_rtofs_fcst.py b/ush/preprocess/rtofs/get_rtofs_fcst.py index db54f0b..480fc68 100644 --- a/ush/preprocess/rtofs/get_rtofs_fcst.py +++ b/ush/preprocess/rtofs/get_rtofs_fcst.py @@ -4,7 +4,7 @@ import sys sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) -import InterpUtilities as iutil +import interp_utilities as iutil diff --git a/ush/preprocess/rtofs/get_rtofs_ice.sh b/ush/preprocess/rtofs/get_rtofs_ice.sh index 2aecf0e..cd93ec9 100755 --- a/ush/preprocess/rtofs/get_rtofs_ice.sh +++ b/ush/preprocess/rtofs/get_rtofs_ice.sh @@ -27,6 +27,8 @@ cp $filesin $tmpdir/ echo $tmpdir echo $flout -python rtofs/GetRTOFSIcefcst.py $tmpdir $flout +PDYCC="${PDY}${cyc}" +echo $PDYCC +python rtofs/get_rtofs_ice_fcst.py $tmpdir $PDYCC $flout ## rm -rf $tmpdir diff --git a/ush/preprocess/rtofs/get_rtofs_ice_fcst.py b/ush/preprocess/rtofs/get_rtofs_ice_fcst.py index ecc68d6..8b3e769 100644 --- a/ush/preprocess/rtofs/get_rtofs_ice_fcst.py +++ b/ush/preprocess/rtofs/get_rtofs_ice_fcst.py @@ -3,18 +3,63 @@ import netCDF4 as nc import sys +import datetime +import re + +def get_rtofs_unix_time(file_path: str) -> int: + """ + Extracts the valid UTC Unix timestamp from a NOAA RTOFS file path. + Example path: '/pub/data/nccf/com/rtofs/prod/rtofs.20260813/rtofs_glo.t12z.f024.archv.nc' + """ + # Regex to find 8-digit date, cycle hour (tXXz), and forecast hour (fXXX) + match = re.search(r'rtofs\.(\d{8}).*?\.t(\d{2})z\.f(\d{3})', file_path) + + if not match: + raise ValueError("Could not parse RTOFS naming convention from path.") + + date_str, cycle_str, forecast_str = match.groups() + + # 1. Parse base model initialization time to a UTC datetime object + base_time_str = f"{date_str} {cycle_str}" + base_dt = datetime.datetime.strptime(base_time_str, "%Y%m%d %H").replace(tzinfo=datetime.timezone.utc) + + # 2. Add the forecast hour offset + forecast_hours = int(forecast_str) + valid_dt = base_dt + datetime.timedelta(hours=forecast_hours) + + # 3. Convert valid UTC datetime to epoch integer + return int(valid_dt.timestamp()) + +# --- Example Usage --- +sample_path = "/pub/data/nccf/com/rtofs/prod/rtofs.20260813/rtofs_glo.t12z.f024.archv.nc" +unix_time = get_rtofs_unix_time(sample_path) + +print(f"Unix Timestamp: {unix_time}") +# Output: 1786708800 (Reflects: 2026-08-14 12:00:00 UTC) + #Consolidate RTOFS ice forecast files to a single NetCDF file. # Get the path relative to this file and add to sys.path sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) -import InterpUtilities as iutil +import interp_utilities as iutil dirin=sys.argv[1] -flout=sys.argv[2] +PDYCC=sys.argv[2] +flout=sys.argv[3] +print(PDYCC) +PDY=PDYCC[0:8] +CYC=PDYCC[8:10] +print(PDY) +print(CYC) + ncfiles = os.listdir(dirin) print(ncfiles) nt=len(ncfiles) + +nt=17 + + k=0 flin=dirin+"/"+ncfiles[k] data=nc.Dataset(flin,"r") @@ -31,20 +76,16 @@ print(F.shape) for k in range(nt): flin=dirin+"/"+ncfiles[k] - flinT=flin.replace("Ice","") - flinT=flinT.replace("ice","prog") - print("ICE: org flin="+flin+" Time flin="+flinT) - dataT=nc.Dataset(flinT,"r") data=nc.Dataset(flin,"r") F0=data["ice_coverage"][:] - T0=dataT["MT"][:] print(F0.shape) print(F.shape) print(str(k)+" of "+ str(nt)) F[k,:,:]=F0[0,:,:] - MT[k]=T0 - tmp=iutil.ConvertTimeToUnixTime(flinT,"MT") - time[k]=tmp[0] + tmp=iutil.FileNameToUnixTime(flin,PDY,CYC) + time[k]=tmp + print(flin) + print(time[k]) tindx = np.argsort(time) time=time[tindx] diff --git a/ush/preprocess/rwpsenv b/ush/preprocess/rwpsenv index 2f0293e..0f30fd0 100644 --- a/ush/preprocess/rwpsenv +++ b/ush/preprocess/rwpsenv @@ -1,4 +1,4 @@ -export PDY=20260813 +export PDY=20251217 export cyc=00 export rootdir=$(pwd) export mesh="$rootdir/../../fix/rwps.oc_1500m_30km.msh" @@ -6,6 +6,8 @@ export fix="$rootdir/../../fix" export prep="$rootdir/../../PrepInputs" export tmp="$prep/tmpfiles" export frc="$prep/forcing" +export useAWS="true" +export outdir=$prep mkdir -p $prep mkdir -p $tmp diff --git a/ush/preprocess/stofs/get_stofs.sh b/ush/preprocess/stofs/get_stofs.sh index 398ed88..9d78fc7 100755 --- a/ush/preprocess/stofs/get_stofs.sh +++ b/ush/preprocess/stofs/get_stofs.sh @@ -19,13 +19,25 @@ mkdir -p $outdir if [[ "$fields" == *"current"* ]]; then echo retrieving stofs current for $PDY cycle $cyc - cp $COMINstofs/stofs_2d_glo.t"$cyc"z.fields.cwl.vel.nc $outdir/ + if [ "$useAWS" = "true" ]; then + aws s3 cp --no-sign-request s3://noaa-gestofs-pds/stofs_2d_glo.$PDY/stofs_2d_glo.t${cyc}z.fields.cwl.vel.nc $outdir/ + echo "Retrieving stofs_2d_glo.t${cyc}z.fields.cwl.vel.nc from s3://noaa-gestofs-pds/stofs_2d_glo.$PDY/" + else + cp $COMINstofs/stofs_2d_glo.t"$cyc"z.fields.cwl.vel.nc $outdir/ + fi +# cp $COMINstofs/stofs_2d_glo.t"$cyc"z.fields.cwl.vel.nc $outdir/ # cp /lfs/h1/ops/prod/com/stofs/v2.1/stofs_2d_glo.$PDY/stofs_2d_glo.t"$cyc"z.fields.cwl.vel.nc stofs.$PDY.$cyc/ fi if [[ "$fields" == *"level"* ]]; then echo retrieving stofs water level for $PDY cycle $cyc - cp $COMINstofs/stofs_2d_glo.t"$cyc"z.fields.cwl.nc $outdir/ + if [ "$useAWS" = "true" ]; then + aws s3 cp --no-sign-request s3://noaa-gestofs-pds/stofs_2d_glo.$PDY/stofs_2d_glo.t${cyc}z.fields.cwl.nc $outdir/ + echo "Retrieving stofs_2d_glo.t${cyc}z.fields.cwl.nc from s3://noaa-gestofs-pds/stofs_2d_glo.$PDY/" + else + cp $COMINstofs/stofs_2d_glo.t"$cyc"z.fields.cwl.nc $outdir/ + fi +# cp $COMINstofs/stofs_2d_glo.t"$cyc"z.fields.cwl.nc $outdir/ # cp /lfs/h1/ops/prod/com/stofs/v2.1/stofs_2d_glo.$PDY/stofs_2d_glo.t"$cyc"z.fields.cwl.nc stofs.$PDY.$cyc/ fi From 4aedb5ab52b7b34f2bc5b210e25a1fbeda4b0280 Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa Date: Wed, 19 Aug 2026 19:11:28 +0000 Subject: [PATCH 11/39] fixed filename convention for get_rtofs.sh --- ush/preprocess/get_currents.sh | 2 +- ush/preprocess/rtofs/{GetRTOFS.sh => get_rtofs.sh} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename ush/preprocess/rtofs/{GetRTOFS.sh => get_rtofs.sh} (100%) diff --git a/ush/preprocess/get_currents.sh b/ush/preprocess/get_currents.sh index b5a41b1..cd3cd44 100644 --- a/ush/preprocess/get_currents.sh +++ b/ush/preprocess/get_currents.sh @@ -3,6 +3,6 @@ # This script retrieves global RTOFS and STOFS as netcdf files #source ./rwpsenv -rtofs/GetRTOFS.sh $PDY & +rtofs/get_rtofs.sh $PDY & stofs/get_stofs.sh $PDY $cyc current& wait; diff --git a/ush/preprocess/rtofs/GetRTOFS.sh b/ush/preprocess/rtofs/get_rtofs.sh similarity index 100% rename from ush/preprocess/rtofs/GetRTOFS.sh rename to ush/preprocess/rtofs/get_rtofs.sh From 5988ba9007bedfe34c427d94fe308ee0ddd06fa1 Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa Date: Fri, 21 Aug 2026 18:15:32 +0000 Subject: [PATCH 12/39] fixed numerous path problems and added script for launching preprocessing --- ecf/GenerateInterpolationWeights.stofs.v3.ecf | 98 ++++++++ ecf/jrwps_prep_current.ecf | 24 ++ ecf/jrwps_prep_currents.ecf | 34 --- ecf/jrwps_prep_ice.ecf | 21 +- ecf/jrwps_prep_waterlevel.ecf | 7 +- ecf/jrwps_prep_wind.ecf | 16 +- sorc/get_externals.sh | 13 +- sorc/prepare_forcing.sh | 54 ++++ ush/preprocess/STOFS.to.rwps.oc_1500m_30km.sh | 12 + ush/preprocess/add_err_var_to_file.py | 21 +- ush/preprocess/get_currents.sh | 2 +- ush/preprocess/get_ice.sh | 3 +- ush/preprocess/get_waterlevel.sh | 5 +- ush/preprocess/get_wind.sh | 26 +- ush/preprocess/interpolate_with_weights.py | 7 +- ...interpolate_with_weights_with_fillvalue.py | 233 ++++++++++++++++++ ush/preprocess/nbm/get_nbm_ice.sh | 8 - ush/preprocess/process_currents.sh | 20 +- ush/preprocess/process_ice.sh | 2 +- ush/preprocess/process_waterlevel.sh | 2 +- ush/preprocess/process_wind.sh | 18 +- ush/preprocess/rrfs/make_rrfs_wind.sh | 5 +- ush/preprocess/rtofs/get_rtofs.sh | 2 +- ush/preprocess/rtofs/get_rtofs_ice.sh | 4 - ush/preprocess/rwpsenv | 22 -- ush/preprocess/stofs/get_stofs.sh | 23 +- 26 files changed, 509 insertions(+), 173 deletions(-) create mode 100644 ecf/GenerateInterpolationWeights.stofs.v3.ecf create mode 100644 ecf/jrwps_prep_current.ecf delete mode 100644 ecf/jrwps_prep_currents.ecf create mode 100755 sorc/prepare_forcing.sh create mode 100644 ush/preprocess/STOFS.to.rwps.oc_1500m_30km.sh create mode 100644 ush/preprocess/interpolate_with_weights_with_fillvalue.py delete mode 100644 ush/preprocess/rwpsenv diff --git a/ecf/GenerateInterpolationWeights.stofs.v3.ecf b/ecf/GenerateInterpolationWeights.stofs.v3.ecf new file mode 100644 index 0000000..cc41c22 --- /dev/null +++ b/ecf/GenerateInterpolationWeights.stofs.v3.ecf @@ -0,0 +1,98 @@ +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=04:00:00 +##PBS -l select=1:ncpus=8:mem=128GB +#PBS -l select=1:ncpus=16:mem=256GB +###PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + +pip list -v + +cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/preprocess + +source SetMeshName + +SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" +date="20260730" +cycl="00" +Nprocs=16 + + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +rrfs_hi=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.hi.nc +rrfs_pr=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.pr.nc +rrfs_ak=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.ak.nc +rrfs_na=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.na.nc +rrfs_conus=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.conus.nc + +out="../../fix" + + + +rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" +rrfsDst="$out/DistToBndy.$meshname.rrfs" + +#no extrapolation with rrfs forecasts + +nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc +nbmIntrp="$out/InterpolationWeights.$meshname.nbm" +nbmDst="$out/DistToBndy.$meshname.nbm" +#extrapolate nbm oc wind to all points +#python ./compute_gridded_to_rwps_interp_weights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out + +nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc +#do not extrapolate for NBM .ak. domain +#python ./compute_gridded_to_rwps_interp_weights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out + +rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc +rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" +rtofsDst="$out/DistToBndy.$meshname.rtofs" + +#extrapolate rtofs .glo. for full ice coverage + +#python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out + + +rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc +#do not extrapolate rtofs .glo. currents +#python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.currents.nc $rtofsDst.currents.nc -1 > GenWhts.rtofs.currents.out + + +cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/dev/preprocess + + +stofs_glo="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc" + +## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs + +## Now run parallel job script + +qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS + +wait + +#combine text file output of parallel jobs +cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt + +# convert output weights to netcdf file +python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 +cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc +cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc diff --git a/ecf/jrwps_prep_current.ecf b/ecf/jrwps_prep_current.ecf new file mode 100644 index 0000000..55a49dc --- /dev/null +++ b/ecf/jrwps_prep_current.ecf @@ -0,0 +1,24 @@ +#!/bin/sh +#PBS -q dev +#PBS -l walltime=00:59:00 +#PBS -A GLWU-DEV +#PBS -N RWPS.PreProc.currents +#PBS -j oe +#PBS -l select=1:ncpus=2:mem=64GB +#PBS -o RWPS.PreProc.out + +cd $RWPSroot/ush/preprocess + +module load PrgEnv-intel/8.1.0 +module load craype/2.7.8 +module load intel/19.1.3.304 +module load cfp/2.0.4 +module load prod_util/2.0.8 +module load prod_envir/2.0.5 + +rm $tmp/FetchCurrents.out $tmp/ProcCurrents.out + +sh get_currents.sh > $tmp/FetchCurrents.out +sh process_currents.sh > $tmp/ProcCurrents.out + + diff --git a/ecf/jrwps_prep_currents.ecf b/ecf/jrwps_prep_currents.ecf deleted file mode 100644 index c99d569..0000000 --- a/ecf/jrwps_prep_currents.ecf +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -#PBS -q dev -#PBS -l walltime=00:59:00 -#PBS -A GLWU-DEV -#PBS -N RWPS.PreProc.currents -#PBS -j oe -#PBS -l select=1:ncpus=4:mem=64GB -#PBS -o RWPS.PreProc.out - -cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/preprocess - -module load PrgEnv-intel/8.1.0 -module load craype/2.7.8 -module load intel/19.1.3.304 -module load cfp/2.0.4 -module load prod_util/2.0.8 -module load prod_envir/2.0.5 - -#date=20260802 -#cycl=00 -#mesh=../../fix/rwps.oc_1500m_30km.msh - -source /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/preprocess/rwpsenv - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - -rm $prep/FetchCurrents.out $prep/ProcCurrents.out - -sh get_currents.sh $prep > $tmp/FetchCurrents.out -sh process_currents.sh $prep > $tmp/ProcCurrents.out - -#mv $frc/$meshname.$date.$cycl.vel.stofsxrtofs.nc $frc/$meshname.$date.$cycl.current.nc - diff --git a/ecf/jrwps_prep_ice.ecf b/ecf/jrwps_prep_ice.ecf index 868dd32..219ee79 100644 --- a/ecf/jrwps_prep_ice.ecf +++ b/ecf/jrwps_prep_ice.ecf @@ -4,10 +4,10 @@ #PBS -A GLWU-DEV #PBS -N RWPS.PreProc.ice #PBS -j oe -#PBS -l select=1:ncpus=4:mem=64GB +#PBS -l select=1:ncpus=1:mem=64GB #PBS -o RWPS.PreProc.out -cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/preprocess +cd $RWPSroot/ush/preprocess module load PrgEnv-intel/8.1.0 module load craype/2.7.8 @@ -16,21 +16,10 @@ module load cfp/2.0.4 module load prod_util/2.0.8 module load prod_envir/2.0.5 -#date=20260802 -#cycl=00 -#mesh=../../fix/rwps.oc_1500m_30km.msh -source /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/preprocess/rwpsenv +rm $tmp/FetchIce.out $tmp/ProcICE.out -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" +sh get_ice.sh > $tmp/FetchIce.out +sh process_ice.sh > $tmp/ProcIce.out -rm $prep/FetchIce.out $prep/ProcICE.out - -# sh GetCurrents.sh $prep > FetchCurrents.out -# sh ProcessCurrents.sh $prep > ProcCurrents.out -sh get_ice.sh $prep > $tmp/FetchIce.out -sh process_ice.sh $prep > $tmp/ProcIce.out - -#mv $frc/$meshname.$date.$cycl.ice.rtofsxnbm.nc $frc/$meshname.$date.$cycl.ice.nc diff --git a/ecf/jrwps_prep_waterlevel.ecf b/ecf/jrwps_prep_waterlevel.ecf index b62f58c..e35ef5b 100644 --- a/ecf/jrwps_prep_waterlevel.ecf +++ b/ecf/jrwps_prep_waterlevel.ecf @@ -7,7 +7,7 @@ #PBS -l select=1:ncpus=4:mem=64GB #PBS -o RWPS.PreProc.out -cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/preprocess +cd $RWPSroot/ush/preprocess module load PrgEnv-intel/8.1.0 module load craype/2.7.8 @@ -16,11 +16,6 @@ module load cfp/2.0.4 module load prod_util/2.0.8 module load prod_envir/2.0.5 -source /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/preprocess/rwpsenv - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - rm $tmp/FetchWaterLevel.out $tmp/ProcWaterLevel.out sh get_waterlevel.sh > $tmp/FetchWaterLevel.out diff --git a/ecf/jrwps_prep_wind.ecf b/ecf/jrwps_prep_wind.ecf index 93b285c..50f3ffd 100644 --- a/ecf/jrwps_prep_wind.ecf +++ b/ecf/jrwps_prep_wind.ecf @@ -7,7 +7,7 @@ #PBS -l select=1:ncpus=4:mem=64GB #PBS -o RWPS.PreProc.out -cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/preprocess +cd $RWPSroot/ush/preprocess module load PrgEnv-intel/8.1.0 module load craype/2.7.8 @@ -16,19 +16,9 @@ module load cfp/2.0.4 module load prod_util/2.0.8 module load prod_envir/2.0.5 -#date=20260802 -#cycl=00 -#mesh=../../fix/rwps.oc_1500m_30km.msh - -source /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/preprocess/rwpsenv - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - rm $tmp/FetchWinds.out $tmp/ProcWinds.out -sh get_winds.sh > $tmp/FetchWinds.out -sh process_winds.sh > $tmp/ProcWinds.out +sh get_wind.sh > $tmp/FetchWind.out +sh process_wind.sh > $tmp/ProcWind.out -#mv $frc/rwps.est.$meshname.$date.$cycl.wind10m.nc $frc/$meshname.$date.$cycl.wind.nc diff --git a/sorc/get_externals.sh b/sorc/get_externals.sh index 47b172e..b48d8f6 100755 --- a/sorc/get_externals.sh +++ b/sorc/get_externals.sh @@ -7,7 +7,18 @@ # --------------------------------------------------------------------------- # echo 'Fetching externals...' -cp -p /lfs/h2/emc/couple/noscrub/keston.smith/meshes/RWPS.v0.msh ../fix/ + + +# copy mesh to local fix directory +cp -p $RWPSfix/fix/$meshname/20260722/rwps.$meshname.msh ../fix/ +# copy Interpoplation weights for nbm, rrfs, rtofs and stofs to local fix directory +cp -p $RWPSfix/fix/$meshname/20260722/InterpolationWeights*$meshname*.nc ../fix/ +# copy distance to boundary for nbm, rrfs, rtofs and stofs to local fix directory +cp -p $RWPSfix/fix/$meshname/20260722/DistToBndy*$meshname*.nc ../fix/ + + +#cp -p /lfs/h2/emc/couple/noscrub/keston.smith/meshes/RWPS.v0.msh ../fix/ + cp -p /lfs/h2/emc/couple/noscrub/saeideh.banihashemi/git/fv3gfs/fix/fix_glwu/mesh.glwu ../fix/mesh.rwps cp -p /lfs/h2/emc/couple/noscrub/saeideh.banihashemi/git/fv3gfs/fix/fix_glwu/grint_weights.grlc_2p5km ../fix/ cp -p /lfs/h2/emc/couple/noscrub/saeideh.banihashemi/git/fv3gfs/fix/fix_glwu/grint_weights.grlr ../fix/ diff --git a/sorc/prepare_forcing.sh b/sorc/prepare_forcing.sh new file mode 100755 index 0000000..c69e0f6 --- /dev/null +++ b/sorc/prepare_forcing.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# --------------------------------------------------------------------------- # +# # +# Copy external fix files that are too large to store in repository # +# # +# Last Changed : 08-15-2025 Aug 2025 # +# --------------------------------------------------------------------------- # + +echo 'setting paths...' + +export PDY=$1 +export cyc=$2 +export meshID=$3 + +export RWPSroot="$(pwd)/../" +export mesh="$RWPSroot/fix/rwps.$meshID.msh" +export fix="$RWPSroot/fix" +export prep="$RWPSroot/PrepInputs" +export tmp="$prep/tmpfiles" +export frc="$prep/forcing" +export outdir=$prep + +echo $RWPSroot +echo $fix $prep $tmp $outdir +mkdir -p $prep +mkdir -p $tmp +mkdir -p $frc + +#machine dependend path to rtofs, nbm, rrfs, and stofs forecast files +export COMINrtofs="/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs.$PDY/" +export COMINnbm="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.$PDY/$cyc/grib2" +export COMINrrfs="/lfs/h1/ops/prod/com/rrfs/v1.0/rrfs.$PDY/$cyc" +export COMINstofs="/lfs/h1/ops/prod/com/stofs/v3.1/stofs_2d_glo.$PDY" + +export COMINlocal=$tmp + +#machine dependend path to RWPS fix files +export RWPSfix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPS + +# copy mesh to local fix directory +cp -p $RWPSfix/fix/$meshID/20260722/rwps.$meshID.msh $RWPSroot/fix/ +# copy Interpoplation weights for nbm, rrfs, rtofs and stofs to local fix directory +cp -p $RWPSfix/fix/$meshID/20260722/InterpolationWeights*$meshID*.nc $RWPSroot/fix/ +# copy distance to boundary for nbm, rrfs, rtofs and stofs to local fix directory +cp -p $RWPSfix/fix/$meshID/20260722/DistToBndy*$meshID*.nc $RWPSroot/fix/ + +meshname="${mesh##*/}" +export meshname="${meshname: 0: -4}" + +#Retrieve current and process for forecast cycle +qsub -V $RWPSroot/ecf/jrwps_prep_current.ecf +qsub -V $RWPSroot/ecf/jrwps_prep_ice.ecf +qsub -V $RWPSroot/ecf/jrwps_prep_waterlevel.ecf +qsub -V $RWPSroot/ecf/jrwps_prep_wind.ecf diff --git a/ush/preprocess/STOFS.to.rwps.oc_1500m_30km.sh b/ush/preprocess/STOFS.to.rwps.oc_1500m_30km.sh new file mode 100644 index 0000000..6738e36 --- /dev/null +++ b/ush/preprocess/STOFS.to.rwps.oc_1500m_30km.sh @@ -0,0 +1,12 @@ +#!/bin/bash +#SBATCH --job-name=STOFS_interp_masterscript + +module purge +module use /scratch4/NCEPDEV/marine/Ali.Salimi/Hera_Data/HR4-OPT/FromJessica/Keston/ICunstructuredRuns15km-implicit-450s/global-workflow/sorc/ufs_model.fd/modulefiles +module load ufs_ursa.intel +module load py-scipy/1.14.1 +module load py-netcdf4/1.7.1.post2 +pip list +# calculate interpolation weights in parallel geographically +python InterpolateSTOFS.py /lfs/h2/emc/couple/noscrub/keston.smith/SampleInput/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/preprocess/../../fix/rwps.oc_1500m_30km.msh /lfs/h2/emc/couple/noscrub/keston.smith/SampleInput/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.rwps.oc_1500m_30km.nc zeta 2 +python InterpolateSTOFS.py /lfs/h2/emc/couple/noscrub/keston.smith/SampleInput/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.vel.nc /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/preprocess/../../fix/rwps.oc_1500m_30km.msh /lfs/h2/emc/couple/noscrub/keston.smith/SampleInput/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.vel.rwps.oc_1500m_30km.nc u-vel:v-vel 2 diff --git a/ush/preprocess/add_err_var_to_file.py b/ush/preprocess/add_err_var_to_file.py index 8c9a4b9..0e8545d 100644 --- a/ush/preprocess/add_err_var_to_file.py +++ b/ush/preprocess/add_err_var_to_file.py @@ -20,18 +20,27 @@ nn=len(dist2bnd) data.close() +#remove path and file +suffixp = flin.rfind(".") +dirp = flin.rfind("/") +filename=flin[dirp+1:suffixp] + VariableType="WaterLevel" -if "wind" in flin: +if "wind" in filename: VariableType="Wind" -elif "uv" in flin: +elif "uv" in filename: VariableType="Current" -elif "vel" in flin: +elif "vel" in filename: VariableType="Current" -elif "ice" in flin: +elif "ice" in filename: VariableType="Ice" +if "water" in filename: + VariableType="WaterLevel" +if "level" in filename: + VariableType="WaterLevel" - +print("flin = "+flin+ ", VariableType = "+ VariableType) if VariableType=="Current": VarShallow=float(VarParam[0]) # variance (m/s)**2 for shallow regions VarDeep=float(VarParam[1]) # variance (m/s)**2 for deep regions @@ -48,7 +57,7 @@ Variance = np.maximum(VarianceDepth, VarianceBnd) if VariableType=="WaterLevel": - if "stofs" in flin: + if (("stofs" in flin) or (True)): # Variance = 1.+0*zi VarInterior=float(VarParam[0]) # variance (m)**2 for stofs water level Variance = VarInterior+0.*zi diff --git a/ush/preprocess/get_currents.sh b/ush/preprocess/get_currents.sh index cd3cd44..a35b09d 100644 --- a/ush/preprocess/get_currents.sh +++ b/ush/preprocess/get_currents.sh @@ -1,8 +1,8 @@ #!/bin/bash # This script retrieves global RTOFS and STOFS as netcdf files +cd $RWPSroot/ush/preprocess -#source ./rwpsenv rtofs/get_rtofs.sh $PDY & stofs/get_stofs.sh $PDY $cyc current& wait; diff --git a/ush/preprocess/get_ice.sh b/ush/preprocess/get_ice.sh index 57d7626..caab91d 100644 --- a/ush/preprocess/get_ice.sh +++ b/ush/preprocess/get_ice.sh @@ -2,7 +2,8 @@ # This script retrieves ice forecasts for global RTOFS and Alaska NBM as netcdf files -source ./rwpsenv +cd $RWPSroot/ush/preprocess + sh rtofs/get_rtofs_ice.sh $PDY $cyc & sh nbm/get_nbm_ice.sh $PDY $cyc & wait; diff --git a/ush/preprocess/get_waterlevel.sh b/ush/preprocess/get_waterlevel.sh index 922edd4..0dddf7a 100644 --- a/ush/preprocess/get_waterlevel.sh +++ b/ush/preprocess/get_waterlevel.sh @@ -2,8 +2,5 @@ ## This script retrieves global STOFS water level as netcdf file -curdir=$(pwd) -echo $curdir -source ./rwpsenv - +cd $RWPSroot/ush/preprocess stofs/get_stofs.sh $PDY $cyc waterlevel diff --git a/ush/preprocess/get_wind.sh b/ush/preprocess/get_wind.sh index 6fed4e9..08a9a20 100644 --- a/ush/preprocess/get_wind.sh +++ b/ush/preprocess/get_wind.sh @@ -3,43 +3,43 @@ # This script retrieves rrfs and nbm winbds and exports as # netcdf files -source ./rwpsenv +cd $RWPSroot/ush/preprocess echo "retrieving winds from rrfs and nbm for rwps wind" ( - echo "sh nbm/make_nbm_wind.sh $PDY $cyc oc > nbm.oc.out" - nbm/make_nbm_wind.sh $PDY $cyc oc > nbm.oc.out + echo "sh nbm/make_nbm_wind.sh $PDY $cyc oc > $tmp/nbm.oc.out" + nbm/make_nbm_wind.sh $PDY $cyc oc > $tmp/nbm.oc.out echo "retrieved winds from nbm oc domain" echo "Not retrieving other nbm domain winds" )& ( - echo "sh rrfs/MakeRRFSWind.sh $PDY $cyc na > rrfs.na.out" - rrfs/MakeRRFSWind.sh $PDY $cyc na > rrfs.na.out + echo "sh rrfs/make_rrfs_wind.sh $PDY $cyc na > $tmp/rrfs.na.out" + rrfs/make_rrfs_wind.sh $PDY $cyc na > $tmp/rrfs.na.out echo "retrieved winds from rrfs na domain" )& ( - echo "sh rrfs/MakeRRFSWind.sh $PDY $cyc ak > rrfs.ak.out" - rrfs/MakeRRFSWind.sh $PDY $cyc ak > rrfs.ak.out + echo "sh rrfs/make_rrfs_wind.sh $PDY $cyc ak > $tmp/rrfs.ak.out" + rrfs/make_rrfs_wind.sh $PDY $cyc ak > $tmp/rrfs.ak.out echo "retrieved winds from rrfs ak domain" )& ( - echo "sh rrfs/MakeRRFSWind.sh $PDY $cyc pr > rrfs.pr.out" - rrfs/MakeRRFSWind.sh $PDY $cyc pr > rrfs.pr.out + echo "sh rrfs/make_rrfs_wind.sh $PDY $cyc pr > rrfs.pr.out" + rrfs/make_rrfs_wind.sh $PDY $cyc pr > $tmp/rrfs.pr.out echo "retrieved winds from rrfs pr domain" )& ( - echo "sh rrfs/MakeRRFSWind.sh $PDY $cyc hi > rrfs.hi.out" - rrfs/MakeRRFSWind.sh $PDY $cyc hi > rrfs.hi.out + echo "sh rrfs/make_rrfs_wind.sh $PDY $cyc hi > rrfs.hi.out" + rrfs/make_rrfs_wind.sh $PDY $cyc hi > $tmp/rrfs.hi.out echo "retrieved winds from rrfs hi domain" )& ( - echo "sh rrfs/MakeRRFSWind.sh $PDY $cyc conus > rrfs.conus.out" - rrfs/MakeRRFSWind.sh $PDY $cyc conus > rrfs.conus.out + echo "sh rrfs/make_rrfs_wind.sh $PDY $cyc conus > rrfs.conus.out" + rrfs/make_rrfs_wind.sh $PDY $cyc conus > $tmp/rrfs.conus.out echo "retrieved winds from rrfs conus domain" )& wait diff --git a/ush/preprocess/interpolate_with_weights.py b/ush/preprocess/interpolate_with_weights.py index fef0007..0c49572 100644 --- a/ush/preprocess/interpolate_with_weights.py +++ b/ush/preprocess/interpolate_with_weights.py @@ -98,7 +98,12 @@ nan=float("nan") for jv in range(nvar): - fill_value0=data[varname[jv]]._FillValue + +# fill_value0=data[varname[jv]]._FillValue + try: + fill_value0=data[varname[jv]]._FillValue + except: + fill_value0=-99999 print("fill value="+str(fill_value0)) for k in range(nt): print("interpolating for time step = "+str(k)+" of "+str(nt)) diff --git a/ush/preprocess/interpolate_with_weights_with_fillvalue.py b/ush/preprocess/interpolate_with_weights_with_fillvalue.py new file mode 100644 index 0000000..fef0007 --- /dev/null +++ b/ush/preprocess/interpolate_with_weights_with_fillvalue.py @@ -0,0 +1,233 @@ +import numpy as np +import netCDF4 as nc +import sys +import interp_utilities as iutil +import xarray as xr +import scipy.sparse as sp +from scipy.interpolate import NearestNDInterpolator +import datetime + +# Engine for interpolating to WW3 unstructured mesh using precomputed interpolation weights from netcdf files with forecasts +# +# to call: +# python InterpolateSTOFS.py input_file meshpath outputfile variable1:variable2:variable3 ExtrapMethod +# +# example: +# python InterpolateSTOFS.py stofs.20260608.00/stofs.cwl.vel.nc meshes/RWPS.V0a.small.msh tesdtoZ.vel.nc u-vel:v-vel 2 +# or: +# python InterpolateSTOFS.py stofs.20260608.00/stofs.cwl.nc meshes/RWPS.V0a.small.msh tesdtoZ.vel.nc zeta 1 +# +# ExtrapMethod =-1 no extrapolation, NaN's potentially in output where source field is dry +# ExtrapMethod = 0 NaN values in interpolated field replaced with 0.0 +# ExtrapMethod = 1 Nearest Neighbor extrapolation from valid source values +# ExtrapMethod = 2 Nearest Neighbor extrapolation from valid interpolated values +# ExtrapMethod = 3 Nearest Neighbor extrapolation from interpolated nodes which allways have valid values (faster than 2 for larger source mesh) + +UseUnixTime=True +nargin = len(sys.argv) - 1 + +flin=sys.argv[1] + +weights_file=sys.argv[2] + +flout=sys.argv[3] +varname0=sys.argv[4] +varname=varname0.split(":") + +ExtrapMethod=-1 # no extrapolation +if nargin>4: + ExtrapMethod=int(sys.argv[5]) + +if ExtrapMethod==-1: + print("no extrapolation, nan left in place in output") +if ExtrapMethod==0: + print("Fill missing values in interpolated field with value 0") +if ExtrapMethod==1: + print("extrapolation from nearest valid point in source- can be slow if source mesh is much larger than destination mesh") +if ExtrapMethod==2: + print("extrapolation from nearest valid point in destination (interpolated field)") + +with xr.open_dataset(weights_file) as ds_s: + # Standard sparse storage uses 'row', 'col', and 'data' variables + row = ds_s['row'].values + col = ds_s['col'].values + weights = ds_s['S'].values + Nrows=ds_s.attrs.get('Nrows') + Ncols=ds_s.attrs.get('Ncols') + SrcFieldType=ds_s.attrs.get('SrcFieldType') + if ExtrapMethod>0: #these extrapolation methods need the source and destination nodes + x=ds_s['x_src'].values + y=ds_s['y_src'].values + xi=ds_s['x_dst'].values + yi=ds_s['y_dst'].values + +nni=Nrows +n1=Ncols +print("row") +print(row) +print("col") +print(col) + +matrix = sp.coo_matrix((weights, (row-1, col-1)), shape=(Nrows,Ncols)).tocsr() +print("sparse interpolation matrix") +print(matrix) +row_sum = matrix.sum(axis=1) +j0=np.where( row_sum==0 ) # destination nodes with no coverage from interpolation matrix + +data = nc.Dataset(flin,"r") +if "time" in data.variables: + time=iutil.ConvertTimeToUnixTime(flin,"time") +elif "MT" in data.variables: + time=iutil.ConvertTimeToUnixTime(flin,"MT") +else: + print("No time variable found in "+flin+" EXITING") + sys.exit(1) + +nt=len(time) + +print(time) + +nvar=len(varname) +vari=np.zeros((nvar,nt,nni)) + +if ExtrapMethod>=0: + IsExtrap=np.zeros((nvar,nt,nni),dtype=int) + +if ExtrapMethod==3: + AnyExtrap=np.zeros((nvar,nni),dtype=int) + +nan=float("nan") +for jv in range(nvar): + fill_value0=data[varname[jv]]._FillValue + print("fill value="+str(fill_value0)) + for k in range(nt): + print("interpolating for time step = "+str(k)+" of "+str(nt)) + vshp = data.variables[varname[jv]].shape +# if SrcFieldType=="unstructured": + if len(vshp)==1: + var=np.asarray(data[varname[jv]][:]) # No time dimension?, just spatial data to interpolate + elif len(vshp)==2: + var=np.asarray(data[varname[jv]][k,:]) + elif len(vshp)==3: # Wind field with dimensions time, x, y + if "wind" in flin: + var0=np.asarray(data[varname[jv]][k,:,:]) + print("var0.shape") + print(var0.shape) + print(n1) + var=np.transpose(var0).reshape(n1) + elif "ice" in flin: + var0=np.asarray(data[varname[jv]][k,:,:]) + if "rtofs" in flin: #remove bad geometry edges + var0=var0[1:-1,1:-1] + var=np.transpose(var0).reshape(n1) + + elif len(vshp)==4: # RTOFS field with 2nd dimensional "Level" and garbage boundries + var0=np.asarray(data[varname[jv]][k,0,:,:]) + if "rtofs" in flin: #remove bad geometry edges + var0=var0[1:-1,1:-1] + var=np.transpose(var0).reshape(n1) + + else: + print(vshp) + print(len(vshp)) + print("unkown data shape for "+varname[jv]+" terminating") + sys.exit() + + #replace fill with nan to avoid interpolating fill + j=np.where(var==fill_value0) + var[j]=nan + if ExtrapMethod==0: + j=np.where(np.isnan(var)) + var[j]=0. + + vari[jv,k,:] = matrix @ var # actual spatial interpolation step + vari[jv,k,j0]=nan # empty rows + if ExtrapMethod==3: # Fast posthoc nearest neighbor extrapolator + jd=np.where(np.isnan(vari[jv,k,:])) + AnyExtrap[jv,jd]=1. + elif ExtrapMethod>0:# and ExtrapMethod<3: + jd=np.where(np.isnan(vari[jv,k,:])) + dstp=np.array((xi[jd],yi[jd])) + if ExtrapMethod==1: + #extrapolate using nearest neighbor of source with valid value + js=np.where(~np.isnan(var)) + srcp=np.array((x[js],y[js])) + srcv=var[js] + if ExtrapMethod==2: + #extrapolate using nearest neighbor of interpolated field with valid value + js=np.where(~np.isnan(vari[jv,k,:])) + srcp=np.array((xi[js],yi[js])) + tmp=vari[jv,k,js] + srcv=tmp.flatten() + interp = NearestNDInterpolator(srcp.T,srcv) + ExtrapVals = interp( dstp.T ) + vari[jv,k,jd]=ExtrapVals + IsExtrap[jv,k,jd]=1 + +if ExtrapMethod==0: + jd=np.where(np.isnan(vari)) + vari[jd]==0. + IsExtrap[jd]=1 + +if ExtrapMethod==3: #posthoc extrapolation from points which are valid at all times + for jv in range(nvar): + jd=np.where(AnyExtrap[jv,:]==1) # nodes that have some "nan" intrepolated values + js=np.where(AnyExtrap[jv,:]==0) # nodes that have no "nan" intrepolated values + srcp = np.array((xi[js],yi[js])).T + srcv = vari[jv,0,js] #dummy input field + dstp = np.array((xi[jd],yi[jd])).T + srcv=srcv[0,:] + interpolator = NearestNDInterpolator(srcp, srcv) + distances, jsrc = interpolator.tree.query(dstp) + jd=jd[0] + for k in range(nt): + jdk=np.where(np.isnan(vari[jv,k,jd])) + jdk=jdk[0] + vari[jv,k,jd[jdk]]=vari[jv,k,jsrc[jdk]] # value of nearest "always valid" destination point + IsExtrap[jv,k,jd[jdk]]=1 + +print("nn(target mesh) = "+str(nni)+": Nrows = "+str(Nrows)) +print("nn(source mesh) = "+str(n1)+": Ncols = "+str(Ncols)) +if not ((nni==Nrows) and (n1==Ncols)): + print("WARNING: Wrong matrix weights: number of rows from "+ mshfl +" = "+str(nni)+ + " but number of rows in "+ weights_file +" = "+str(Nrows)+ + ", number of spatial points in "+ flin +" = "+str(n1)+ + " but number of columns in "+ weights_file +" = "+str(Ncols) ) + print(" You may need to regnerate file "+ weights_file +" with appropriate weights") + +with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: + + ncout.createDimension('level' , 1) + ncout.createDimension('node' , nni) + ncout.createDimension('time', nt) + + time_var=ncout.createVariable('time', 'f8', ('time',)) + varin = data["time"] + iutil.CopyAttributes(varin, time_var) + if UseUnixTime: + time_var.units = 'seconds since 1970-01-01 00:00:00.0 0:00' + time_var.standard_name = 'time' + time_var[:]=time[:] + + for jv in range(nvar): + print("writing output for :"+varname[jv]) + varin = data[varname[jv]] + F_var=ncout.createVariable(varname[jv], 'f4', ('time','node'),fill_value = fill_value0) + iutil.CopyAttributes(varin, F_var) + F_var.location = 'node' + F_var[:,:] = vari[jv,:,:] + + if ExtrapMethod >= 0 : + xtrp_var=ncout.createVariable(varname[jv]+'IsExtrap', 'i1', ('time','node')) + xtrp_var.long_name = '==1 if the interpolated value extrapolated. 0 if interpolated' + xtrp_var.standard_name = 'is extrapolated' + xtrp_var.location = 'node' + if ExtrapMethod == 0: + xtrp_var.method = 'Interpolated nan values replaced with 0' + if ExtrapMethod == 1: + xtrp_var.method = 'nearest valid neighbor in source field' + if ExtrapMethod == 2: + xtrp_var.method = 'nearest valid neighbor in interpolated field' + xtrp_var[:,:] = IsExtrap[jv,:,:] + + ncout.close diff --git a/ush/preprocess/nbm/get_nbm_ice.sh b/ush/preprocess/nbm/get_nbm_ice.sh index 616f5b4..7540e78 100755 --- a/ush/preprocess/nbm/get_nbm_ice.sh +++ b/ush/preprocess/nbm/get_nbm_ice.sh @@ -8,16 +8,8 @@ module load intel-oneapi/2022.2.0.262 module load wgrib2/2.0.8 -#source ../rwpsenv - - -#INPUT_DIR="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.$1/$2/grib2" - -#ICE_FILE="$INPUT_DIR/blend.t$2z.icec.ak.grib2" - ICE_FILE="$COMINnbm/blend.t$2z.icec.ak.grib2" -#OUTPUT_DIR="$tmp/ice.$1.$2" OUTPUT_DIR="$COMINlocal/ice.$1.$2" OUTPUT_FILE="$OUTPUT_DIR/nbm.$1.$2.ice.ak.nc" diff --git a/ush/preprocess/process_currents.sh b/ush/preprocess/process_currents.sh index aac3472..f41922c 100644 --- a/ush/preprocess/process_currents.sh +++ b/ush/preprocess/process_currents.sh @@ -12,12 +12,12 @@ module load ve/hafs/2.1 pip list -v -source ./rwpsenv +cd $RWPSroot/ush/preprocess meshname="${mesh##*/}" meshname="${meshname: 0: -4}" -stofscur="$tmp/stofs_2d_glo.t${cyc}z.fields.cwl.vel.nc" +stofscur="$tmp/stofs.$PDY.$cyc/stofs_2d_glo.t${cyc}z.fields.cwl.vel.nc" rtofscur="$tmp/rtofs.$PDY.nc" varnames="u-vel:v-vel" @@ -33,6 +33,16 @@ stofs_dists="$fix/DistToBndy.$meshname.stofs.nc" stofs_rwps="$tmp/$meshname.$PDY.$cyc.vel.cwl.stofs.nc" stofs_rwps_ti="$tmp/$meshname.$PDY.$cyc.vel.cwl.stofs.ti.nc" + + +## RTOFS interpolation +rtofs_wghts="$fix/InterpolationWeights.$meshname.rtofs.current.nc" +rtofs_dists="$fix/DistToBndy.$meshname.rtofs.current.nc" +rtofs_rwps="$tmp/$meshname.$PDY.vel.rtofs.nc" +rtofs_rwps_ti="$tmp/$meshname.$PDY.$cyc.vel.cwl.rtofs.ti.nc" + + + if [ ! -f "$stofs_wghts" ]; then echo "missing stofs interpolation weights file: $stofs_wghts" echo "compute with script compute_unstr_to_rwps_interp_weights.sh" @@ -47,12 +57,6 @@ fi # extrapolate with zero fill python interpolate_with_weights.py $stofscur $stofs_wghts $stofs_rwps $varnames 0 & -## RTOFS interpolation -rtofs_wghts="$fix/InterpolationWeights.$meshname.rtofs.currents.nc" -rtofs_dists="$fix/DistToBndy.$meshname.rtofs.currents.nc" -rtofs_rwps="$tmp/$meshname.$PDY.vel.rtofs.nc" -rtofs_rwps_ti="$tmp/$meshname.$PDY.$cyc.vel.cwl.rtofs.ti.nc" - if [ ! -f "$rtofs_wghts" ]; then echo "missing rtofs interpolation weights file: $stofs_wghts" echo "compute with script ComputeGridToRWPSInterpWeights.py" diff --git a/ush/preprocess/process_ice.sh b/ush/preprocess/process_ice.sh index a8d7b22..87e1138 100644 --- a/ush/preprocess/process_ice.sh +++ b/ush/preprocess/process_ice.sh @@ -12,7 +12,7 @@ module load ve/hafs/2.1 pip list -v -source ./rwpsenv +cd $RWPSroot/ush/preprocess meshname="${mesh##*/}" meshname="${meshname: 0: -4}" diff --git a/ush/preprocess/process_waterlevel.sh b/ush/preprocess/process_waterlevel.sh index 896101f..b879bd0 100644 --- a/ush/preprocess/process_waterlevel.sh +++ b/ush/preprocess/process_waterlevel.sh @@ -12,7 +12,7 @@ module load ve/hafs/2.1 pip list -v -#source ./rwpsenv +cd $RWPSroot/ush/preprocess meshname="${mesh##*/}" meshname="${meshname: 0: -4}" diff --git a/ush/preprocess/process_wind.sh b/ush/preprocess/process_wind.sh index 01131af..bbeb2af 100644 --- a/ush/preprocess/process_wind.sh +++ b/ush/preprocess/process_wind.sh @@ -12,9 +12,9 @@ module load ve/hafs/2.1 pip list -v -source ./rwpsenv +cd $RWPSroot/ush/preprocess -winddir="wind.$PDY.$cyc" +winddir="$tmp/wind.$PDY.$cyc" windvars="UGRD_10maboveground:VGRD_10maboveground" # extract mesh name from file path @@ -25,7 +25,7 @@ meshname="${meshname: 0: -4}" # incorporate meshname date and cycle into output directory name to avoid # applying winds to wrong mesh -outdir="$tmp/rwps_winds.$meshname.$PDY.$cyc" +outdir="$tmp/rwps_wind.$meshname.$PDY.$cyc" rwps_wind="$frc/$meshname.$PDY.$cyc.wind.nc" @@ -75,13 +75,13 @@ rrfs_conus_dist="$fix/DistToBndy.$meshname.rrfs.conus.nc" # If the interpolation weights do not already exist for the domains create them # also creates distance to boundary used in prescribed error covariance specification [ ! -f "$nbm_oc_wghts" ] && python compute_gridded_to_rwps_interp_weights.py $nbm_oc_uv $mesh 1 - python interpolate_with_weights.py $nbm_oc_uv $nbm_oc_wghts $rwps_oc $windvars 3 + python interpolate_with_weights.py $nbm_oc_uv $nbm_oc_wghts $rwps_oc $windvars 3 > $tmp/intrp.rrfs.oc.out python add_mesh_geom_to_file.py $rwps_oc $mesh )& ( [ ! -f "$rrfs_hi_wghts" ] && python compute_gridded_to_rwps_interp_weights.py $rrfs_hi $mesh $rrfs_hi_wghts $rrfs_hi_dist - python interpolate_with_weights.py $rrfs_hi $rrfs_hi_wghts $rwps_hi $windvars -1 > intrp.rrfs.hi.out + python interpolate_with_weights.py $rrfs_hi $rrfs_hi_wghts $rwps_hi $windvars -1 > $tmp/intrp.rrfs.hi.out #add mesh geometry into interpolated file python add_mesh_geom_to_file.py $rwps_hi $mesh # Add error covariance field to files with interpolated fields for bayesian update @@ -91,28 +91,28 @@ rrfs_conus_dist="$fix/DistToBndy.$meshname.rrfs.conus.nc" ( [ ! -f "$rrfs_pr_wghts" ] && python compute_gridded_to_rwps_interp_weights.py $rrfs_pr $mesh $rrfs_pr_wghts $rrfs_pr_dist - python interpolate_with_weights.py $rrfs_pr $rrfs_pr_wghts $rwps_pr $windvars -1 > intrp.rrfs.pr.out + python interpolate_with_weights.py $rrfs_pr $rrfs_pr_wghts $rwps_pr $windvars -1 > $tmp/intrp.rrfs.pr.out python add_mesh_geom_to_file.py $rwps_pr $mesh python add_err_var_to_file.py $rwps_pr $rrfs_pr_dist 4.:40.:150. )& ( [ ! -f "$rrfs_ak_wghts" ] && python compute_gridded_to_rwps_interp_weights.py $rrfs_ak $mesh $rrfs_ak_wghts $rrfs_ak_dist - python interpolate_with_weights.py $rrfs_ak $rrfs_ak_wghts $rwps_ak $windvars -1 > intrp.rrfs.ak.out + python interpolate_with_weights.py $rrfs_ak $rrfs_ak_wghts $rwps_ak $windvars -1 > $tmp/intrp.rrfs.ak.out python add_mesh_geom_to_file.py $rwps_ak $mesh python add_err_var_to_file.py $rwps_ak $rrfs_ak_dist 9.:90.:500. )& ( [ ! -f "$rrfs_conus_wghts" ] && python compute_gridded_to_rwps_interp_weights.py $rrfs_conus $mesh $rrfs_conus_wghts $rrfs_conus_dist - python interpolate_with_weights.py $rrfs_conus $rrfs_conus_wghts $rwps_conus $windvars -1 + python interpolate_with_weights.py $rrfs_conus $rrfs_conus_wghts $rwps_conus $windvars -1 > $tmp/intrp.rrfs.conus.out python add_mesh_geom_to_file.py $rwps_conus $mesh python add_err_var_to_file.py $rwps_conus $rrfs_conus_dist 16.:160.:1000. )& ( [ ! -f "$rrfs_na_wghts" ] && python compute_gridded_to_rwps_interp_weights.py $rrfs_na $mesh $rrfs_na_wghts $rrfs_na_dist - python interpolate_with_weights.py $rrfs_na $rrfs_na_wghts $rwps_na $windvars -1 + python interpolate_with_weights.py $rrfs_na $rrfs_na_wghts $rwps_na $windvars -1 > $tmp/intrp.rrfs.na.out python add_mesh_geom_to_file.py $rwps_na $mesh python add_err_var_to_file.py $rwps_na $rrfs_na_dist 50.:500.:1500. )& diff --git a/ush/preprocess/rrfs/make_rrfs_wind.sh b/ush/preprocess/rrfs/make_rrfs_wind.sh index d2e44cb..c23e36a 100755 --- a/ush/preprocess/rrfs/make_rrfs_wind.sh +++ b/ush/preprocess/rrfs/make_rrfs_wind.sh @@ -7,16 +7,15 @@ # frecast region: hi,pr,na,ak or conus # # For example call as: -# sh MakeRRFSWind.sh 20260428 00 pr +# sh make_rrfs_wind.sh 20260428 00 pr # to produce output file: # rrfs.20260428.00.wind10m.pr.nc # -echo "MakeRRFSWind.sh fetching rrfs : time = $1, cycle = $2, domain = $3" +echo "make_rrfs_wind.sh fetching rrfs : time = $1, cycle = $2, domain = $3" module load intel-oneapi/2022.2.0.262 module load wgrib2/2.0.8 -#INPUT_DIR="/lfs/h1/ops/para/com/rrfs/v1.0/rrfs.$1/$2" INPUT_DIR="$COMINrrfs" OUTPUT_DIR="$COMINlocal/wind.$1.$2" OUTPUT_FILE="$OUTPUT_DIR/rrfs.$1.$2.wind10m.$3.nc" diff --git a/ush/preprocess/rtofs/get_rtofs.sh b/ush/preprocess/rtofs/get_rtofs.sh index 4d5da2d..3875fcb 100755 --- a/ush/preprocess/rtofs/get_rtofs.sh +++ b/ush/preprocess/rtofs/get_rtofs.sh @@ -14,7 +14,7 @@ module load ve/hafs/2.1 pip list -v -cd $rootdir +cd $RWPSroot/ush/preprocess tmpdir="$COMINlocal/tmp.rtofs.$PDY" filesin="$COMINrtofs/*prog.nc" diff --git a/ush/preprocess/rtofs/get_rtofs_ice.sh b/ush/preprocess/rtofs/get_rtofs_ice.sh index cd93ec9..4dea9fc 100755 --- a/ush/preprocess/rtofs/get_rtofs_ice.sh +++ b/ush/preprocess/rtofs/get_rtofs_ice.sh @@ -14,13 +14,10 @@ module load ve/hafs/2.1 pip list -v -#source rwpsenv - tmpdir="$COMINlocal/tmp.rtofsIce.$PDY" filesin="$COMINrtofs/*ice.nc" dirout="$COMINlocal/ice.$PDY.$cyc" flout="$dirout/rtofs.ice.$PDY.nc" -#flout="$tmp/rtofs.ice.$PDY.nc" mkdir $tmpdir cp $filesin $tmpdir/ @@ -31,4 +28,3 @@ PDYCC="${PDY}${cyc}" echo $PDYCC python rtofs/get_rtofs_ice_fcst.py $tmpdir $PDYCC $flout -## rm -rf $tmpdir diff --git a/ush/preprocess/rwpsenv b/ush/preprocess/rwpsenv deleted file mode 100644 index 0f30fd0..0000000 --- a/ush/preprocess/rwpsenv +++ /dev/null @@ -1,22 +0,0 @@ -export PDY=20251217 -export cyc=00 -export rootdir=$(pwd) -export mesh="$rootdir/../../fix/rwps.oc_1500m_30km.msh" -export fix="$rootdir/../../fix" -export prep="$rootdir/../../PrepInputs" -export tmp="$prep/tmpfiles" -export frc="$prep/forcing" -export useAWS="true" -export outdir=$prep - -mkdir -p $prep -mkdir -p $tmp -mkdir -p $frc - -export COMINrtofs="/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs.$PDY/" -export COMINnbm="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.$PDY/$cyc/grib2" -export COMINrrfs="/lfs/h1/ops/para/com/rrfs/v1.0/rrfs.$PDY/$cyc" -export COMINstofs="/lfs/h1/ops/prod/com/stofs/v2.1/stofs_2d_glo.$PDY" - -export COMINlocal=$tmp - diff --git a/ush/preprocess/stofs/get_stofs.sh b/ush/preprocess/stofs/get_stofs.sh index 9d78fc7..7985c6e 100755 --- a/ush/preprocess/stofs/get_stofs.sh +++ b/ush/preprocess/stofs/get_stofs.sh @@ -5,39 +5,22 @@ if [ "$#" -lt 3 ]; then echo "No arguments field argument." echo "Retrieving both stofs currents and stofs water level." - fields="currents,waterlevel" + fields="current, waterlevel" else fields=$3 fi -#source rwpsenv -#mkdir stofs.$PDY.$cyc - outdir=$tmp/stofs.$PDY.$cyc mkdir -p $outdir if [[ "$fields" == *"current"* ]]; then echo retrieving stofs current for $PDY cycle $cyc - if [ "$useAWS" = "true" ]; then - aws s3 cp --no-sign-request s3://noaa-gestofs-pds/stofs_2d_glo.$PDY/stofs_2d_glo.t${cyc}z.fields.cwl.vel.nc $outdir/ - echo "Retrieving stofs_2d_glo.t${cyc}z.fields.cwl.vel.nc from s3://noaa-gestofs-pds/stofs_2d_glo.$PDY/" - else - cp $COMINstofs/stofs_2d_glo.t"$cyc"z.fields.cwl.vel.nc $outdir/ - fi -# cp $COMINstofs/stofs_2d_glo.t"$cyc"z.fields.cwl.vel.nc $outdir/ -# cp /lfs/h1/ops/prod/com/stofs/v2.1/stofs_2d_glo.$PDY/stofs_2d_glo.t"$cyc"z.fields.cwl.vel.nc stofs.$PDY.$cyc/ + cp $COMINstofs/stofs_2d_glo.t"$cyc"z.fields.cwl.vel.nc $outdir/ fi if [[ "$fields" == *"level"* ]]; then echo retrieving stofs water level for $PDY cycle $cyc - if [ "$useAWS" = "true" ]; then - aws s3 cp --no-sign-request s3://noaa-gestofs-pds/stofs_2d_glo.$PDY/stofs_2d_glo.t${cyc}z.fields.cwl.nc $outdir/ - echo "Retrieving stofs_2d_glo.t${cyc}z.fields.cwl.nc from s3://noaa-gestofs-pds/stofs_2d_glo.$PDY/" - else - cp $COMINstofs/stofs_2d_glo.t"$cyc"z.fields.cwl.nc $outdir/ - fi -# cp $COMINstofs/stofs_2d_glo.t"$cyc"z.fields.cwl.nc $outdir/ -# cp /lfs/h1/ops/prod/com/stofs/v2.1/stofs_2d_glo.$PDY/stofs_2d_glo.t"$cyc"z.fields.cwl.nc stofs.$PDY.$cyc/ + cp $COMINstofs/stofs_2d_glo.t"$cyc"z.fields.cwl.nc $outdir/ fi From a493c003f0f4ead92b41e6c50da08b59673d1d0b Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa Date: Fri, 21 Aug 2026 18:34:21 +0000 Subject: [PATCH 13/39] restored missing .tmpl files and other fix files --- ecf/GenerateInterpolationWeights.ecf | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/ecf/GenerateInterpolationWeights.ecf b/ecf/GenerateInterpolationWeights.ecf index 300dab8..e57cf71 100644 --- a/ecf/GenerateInterpolationWeights.ecf +++ b/ecf/GenerateInterpolationWeights.ecf @@ -77,7 +77,7 @@ python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp. rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc #do not extrapolate rtofs .glo. currents -python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.currents.nc $rtofsDst.currents.nc -1 > GenWhts.rtofs.currents.out +python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.current.nc $rtofsDst.current.nc -1 > GenWhts.rtofs.current.out cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/dev/preprocess @@ -98,5 +98,30 @@ cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname # convert output weights to netcdf file python ConvertWeights2Netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 +cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.v2.nc +cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.v2.nc + + +#compute stofs weights for current(v3) stofs mesh +stofs_glo="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc" + +## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs + +## Now run parallel job script + +qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS + +wait + +#combine text file output of parallel jobs +cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt + +# convert output weights to netcdf file +python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc + + + + From b9fd93f198326a0838c0ac1536b171c51a7f15e3 Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa Date: Fri, 21 Aug 2026 18:38:41 +0000 Subject: [PATCH 14/39] removed redundant weight generation file for stofs v3 --- ecf/GenerateInterpolationWeights.stofs.v3.ecf | 98 ------------------- 1 file changed, 98 deletions(-) delete mode 100644 ecf/GenerateInterpolationWeights.stofs.v3.ecf diff --git a/ecf/GenerateInterpolationWeights.stofs.v3.ecf b/ecf/GenerateInterpolationWeights.stofs.v3.ecf deleted file mode 100644 index cc41c22..0000000 --- a/ecf/GenerateInterpolationWeights.stofs.v3.ecf +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=04:00:00 -##PBS -l select=1:ncpus=8:mem=128GB -#PBS -l select=1:ncpus=16:mem=256GB -###PBS -l select=1:ncpus=1:mem=8G -#PBS -l place=excl -#PBS -l debug=true - -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - -pip list -v - -cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/preprocess - -source SetMeshName - -SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" -date="20260730" -cycl="00" -Nprocs=16 - - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - -rrfs_hi=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.hi.nc -rrfs_pr=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.pr.nc -rrfs_ak=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.ak.nc -rrfs_na=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.na.nc -rrfs_conus=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.conus.nc - -out="../../fix" - - - -rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" -rrfsDst="$out/DistToBndy.$meshname.rrfs" - -#no extrapolation with rrfs forecasts - -nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc -nbmIntrp="$out/InterpolationWeights.$meshname.nbm" -nbmDst="$out/DistToBndy.$meshname.nbm" -#extrapolate nbm oc wind to all points -#python ./compute_gridded_to_rwps_interp_weights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out - -nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc -#do not extrapolate for NBM .ak. domain -#python ./compute_gridded_to_rwps_interp_weights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out - -rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc -rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" -rtofsDst="$out/DistToBndy.$meshname.rtofs" - -#extrapolate rtofs .glo. for full ice coverage - -#python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out - - -rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc -#do not extrapolate rtofs .glo. currents -#python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.currents.nc $rtofsDst.currents.nc -1 > GenWhts.rtofs.currents.out - - -cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/dev/preprocess - - -stofs_glo="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc" - -## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs - -## Now run parallel job script - -qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS - -wait - -#combine text file output of parallel jobs -cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt - -# convert output weights to netcdf file -python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 -cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc -cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc From c7b20dccd3d945b88ef0a0aa4c9d0b45b93522d7 Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa Date: Mon, 24 Aug 2026 13:13:03 +0000 Subject: [PATCH 15/39] fixed corrupted code in ush/preprocess/nbm/make_nbm_wind.sh --- ush/preprocess/nbm/make_nbm_wind.sh | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/ush/preprocess/nbm/make_nbm_wind.sh b/ush/preprocess/nbm/make_nbm_wind.sh index c7fa3c8..1adf9dc 100755 --- a/ush/preprocess/nbm/make_nbm_wind.sh +++ b/ush/preprocess/nbm/make_nbm_wind.sh @@ -6,10 +6,7 @@ module load intel-oneapi/2022.2.0.262 module load wgrib2/2.0.8 -INPUT_DIR="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.$1/$2/grib2" -INPUT_DIR="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.$1/$2/grib2" - -WSPD_FILE="$COMINnbm/blend.t$2z.wspd.$3.grib2" +WSPD_FILE="$COMINnbm/blend.t$2z.wspd.$3.grib2" WDIR_FILE="$COMINnbm/blend.t$2z.wdir.$3.grib2" OUTPUT_DIR="wind.$1.$2" @@ -17,6 +14,7 @@ OUTPUT_DIR="$COMINlocal/wind.$1.$2" OUTPUT_FILE="$OUTPUT_DIR/nbm.$1.$2.wind10m.$3.nc" mkdir -p "$OUTPUT_DIR" + # Remove existing output file to avoid mixing old data rm -f "$OUTPUT_FILE" @@ -27,24 +25,4 @@ wgrib2 "$WDIR_FILE" -match ":WDIR:10 m" -append -netcdf "$OUTPUT_FILE" echo "nbm processing complete for forecast date $1, cycle $2, domain $3" echo "output written to: $OUTPUT_FILE" -blendv5.0_oceanic_windspd_2026-05-27T00:00_2026-06-03T03:00.tif - - -aws s3 cp --no-sign-request s3://noaa-nbm-grib2-pds/blend.20260524/00/core/blend.t00z.core.f258.oc.grib2 ./ -WIND_FILE="blend.t00z.core.f258.oc.grib2" -wgrib2 "$WIND_FILE" -match "(UGRD:10 m|VGRD:10 m)" -netcdf output.nc - -wgrib2 "$WIND_FILE" -match ":UGRD:10 m:VGRD:10 m" -netcdf "$OUTPUT_FILE" -#wgrib2 "$WIND_FILE" -match ":VGRD:10 m" -append -netcdf "$OUTPUT_FILE" - -#25:38322442:d=2026052400:UGRD:10 m above ground:258 hour fcst: -#26:39675712:d=2026052400:VGRD:10 m above ground:258 hour fcst: - -#aws s3 ls --no-sign-request s3://noaa-nbm-grib2-pds/blend.20260524/00/core/aws s3 ls --no-sign-request s3://noaa-nbm-grib2-pds/blend.20260524/00/core/ - - -#aws s3 ls --no-sign-request s3://noaa-nbm-grib2-pds/blend.t00z.core.f003.oc.grib2 -#aws s3 cp --no-sign-request s3://noaa-nbm-pds/blendv5.0/oceanic/2026/05/27/0000/windspd/blendv5.0_oceanic_windspd_2026-05-27T00:00_2026-06-03T03:00.tif ./ -#aws s3 cp --no-sign-request s3://noaa-nbm-pds/blendv5.0/oceanic/2026/05/27/0000/winddir/blendv5.0_oceanic_winddir_2026-05-27T00:00_2026-06-06T00:00.tif ./ - From 005a568ecb02d7ab6ec9949efd23e2f8f6005ffb Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa Date: Tue, 25 Aug 2026 16:09:12 +0000 Subject: [PATCH 16/39] Removed module loading and added preprocessing script to version for preprocessing on wcoss2. Added scripts to dev for computing interpolation weights --- .../ecf/compute_interpolation_weights.ecf | 151 ++ .../sorc/ESMPy.o136957101 | 41 + .../sorc/compute_interpolation_weights.sh | 52 + .../sorc/logs/ESMPy.o136818048 | 757 ++++++++++ .../sorc/logs/ESMPy.o136825597 | 969 +++++++++++++ .../sorc/logs/ESMPy.o136832289 | 986 +++++++++++++ .../sorc/logs/ESMPy.o136853423 | 736 ++++++++++ .../sorc/logs/ESMPy.o136854537 | 1246 ++++++++++++++++ .../sorc/logs/ESMPy.o136857549 | 1272 +++++++++++++++++ ecf/jrwps_prep_current.ecf | 41 +- ecf/jrwps_prep_ice.ecf | 36 +- ecf/jrwps_prep_waterlevel.ecf | 33 +- ecf/jrwps_prep_wind.ecf | 35 +- sorc/prepare_forcing.sh | 39 +- .../compute_unstr_to_rwps_interp_weights.sh | 12 - .../compute_wind_to_rwps_interp_weights.py | 158 -- .../{get_currents.sh => get_current.sh} | 2 +- ush/preprocess/get_ice.sh | 2 +- ush/preprocess/get_waterlevel.sh | 2 +- ush/preprocess/get_wind.sh | 2 +- ush/preprocess/interp_utilities.py | 2 +- ush/preprocess/nbm/get_nbm_ice.sh | 4 - ush/preprocess/nbm/make_nbm_wind.sh | 3 - ...process_currents.sh => process_current.sh} | 14 +- ush/preprocess/process_ice.sh | 14 +- ush/preprocess/process_waterlevel.sh | 14 +- ush/preprocess/process_wind.sh | 14 +- ush/preprocess/rrfs/make_rrfs_wind.sh | 3 - ush/preprocess/rtofs/get_rtofs.sh | 14 +- ush/preprocess/rtofs/get_rtofs_ice.sh | 12 - versions/preproc.wcoss2.ver | 12 + 31 files changed, 6365 insertions(+), 313 deletions(-) create mode 100644 dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf create mode 100644 dev/compute_interpolation_weights/sorc/ESMPy.o136957101 create mode 100755 dev/compute_interpolation_weights/sorc/compute_interpolation_weights.sh create mode 100644 dev/compute_interpolation_weights/sorc/logs/ESMPy.o136818048 create mode 100644 dev/compute_interpolation_weights/sorc/logs/ESMPy.o136825597 create mode 100644 dev/compute_interpolation_weights/sorc/logs/ESMPy.o136832289 create mode 100644 dev/compute_interpolation_weights/sorc/logs/ESMPy.o136853423 create mode 100644 dev/compute_interpolation_weights/sorc/logs/ESMPy.o136854537 create mode 100644 dev/compute_interpolation_weights/sorc/logs/ESMPy.o136857549 delete mode 100644 ush/preprocess/compute_wind_to_rwps_interp_weights.py rename ush/preprocess/{get_currents.sh => get_current.sh} (84%) rename ush/preprocess/{process_currents.sh => process_current.sh} (90%) create mode 100755 versions/preproc.wcoss2.ver diff --git a/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf b/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf new file mode 100644 index 0000000..09c63a5 --- /dev/null +++ b/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf @@ -0,0 +1,151 @@ +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=04:00:00 +##PBS -l select=1:ncpus=8:mem=128GB +#PBS -l select=1:ncpus=16:mem=256GB +##PBS -l select=1:ncpus=32:mem=256GB +###PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + + +# Compute interpolation weights and distance to boundary for a RWPS mesh. +# Files are created in local RWPS/fix directory. + +pip list -v + +cd $RWPSroot/ush/preprocess + +SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" +date="20260730" +cycl="00" +Nprocs=16 + + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +rrfs_hi=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.hi.nc +rrfs_pr=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.pr.nc +rrfs_ak=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.ak.nc +rrfs_na=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.na.nc +rrfs_conus=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.conus.nc + +out="../../fix" + +rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" +rrfsDst="$out/DistToBndy.$meshname.rrfs" + +#no extrapolation with rrfs forecasts +rm -rf $rrfsIntrp.hi.nc $rrfsDst.hi.nc __pycache__ +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out +rm -rf $rrfsIntrp.pr.nc $rrfsDst.pr.nc __pycache__ +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_pr $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 > GenWhts.rrfs.pr.out +rm -rf $rrfsIntrp.ak.nc $rrfsDst.ak.nc __pycache__ +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_ak $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 > GenWhts.rrfs.ak.out +rm -rf $rrfsIntrp.na.nc $rrfsDst.na.nc __pycache__ +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_na $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 > GenWhts.rrfs.na.out +rm -rf $rrfsIntrp.conus.nc $rrfsDst.conus.nc __pycache__ +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_conus $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out + +nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc +nbmIntrp="$out/InterpolationWeights.$meshname.nbm" +nbmDst="$out/DistToBndy.$meshname.nbm" + +#extrapolate nbm oc wind to all points +rm $nbmIntrp.oc.nc $nbmDst.oc.nc +python ./compute_gridded_to_rwps_interp_weights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out + +nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc +#do not extrapolate for NBM .ak. domain +rm $nbmIntrp.ak.nc $nbmDst.ak.nc +python ./compute_gridded_to_rwps_interp_weights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out + +rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc +rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" +rtofsDst="$out/DistToBndy.$meshname.rtofs" + +#extrapolate rtofs .glo. for full ice coverage +rm $rtofsIntrp.ice.nc $rtofsDst.ice.nc +python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out + + +rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc +#do not extrapolate rtofs .glo. currents +rm $rtofsIntrp.ice.nc $rtofsDst.ice.nc +python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.current.nc $rtofsDst.current.nc -1 > GenWhts.rtofs.current.out + + + +#Old v2 of stofs +stofs_glo="$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" + +mkdir -p STOFSInterpWeights.$meshname +## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs + +## Now run parallel job script + +qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS + +wait + +#combine text file output of parallel jobs +cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt + +# convert output weights to netcdf file +python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 +cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.v2.nc +cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.v2.nc +mv DistToBndy.$meshname.stofs.nc DistToBndy.$meshname.stofs.v2.nc +mv InterpWeights.$meshname.stofs.nc InterpWeights.$meshname.stofs.v2.nc + +rm -rf STOFSInterpWeights.$meshname +rm InterpWeights.$meshname.stofs.txt +rm *.out +rm ESMPy* + + +mkdir -p STOFSInterpWeights.$meshname +#compute stofs weights for current(v3) stofs mesh +stofs_glo="$SID/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc" + +## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs + +## Now run parallel job script + +qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS + +wait + +#combine text file output of parallel jobs +cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt + +# convert output weights to netcdf file +python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 +cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc +cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc + + +rm -rf STOFSInterpWeights.$meshname +rm InterpWeights.$meshname.stofs.txt +rm *.out +rm ESMPy* + + + diff --git a/dev/compute_interpolation_weights/sorc/ESMPy.o136957101 b/dev/compute_interpolation_weights/sorc/ESMPy.o136957101 new file mode 100644 index 0000000..fce9ed5 --- /dev/null +++ b/dev/compute_interpolation_weights/sorc/ESMPy.o136957101 @@ -0,0 +1,41 @@ +PBS: Running prologue on parent mom node: nid001019... +Job 136957101.dbqs01 nodelist: nid001019 +Job 136957101.dbqs01 - Prologue complete. Execution time: 4 seconds +Agent pid 187446 +Identity added: /u/keston.smith/.ssh/id_ed25519 (keston.smith@noaa.gov) +/u/keston.smith/.bashrc: line 46: alias: eval "$(ssh-agent -s)"; ssh-add ~/.ssh/id_ed25519: not found +Resetting modules to system default. Reseting $MODULEPATH back to system default. All extra directories will be removed from $MODULEPATH. +Package Version Location Installer +------------------------- ----------- ---------------------------------------------------------------------------------- --------- +Cartopy 0.24.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +certifi 2025.1.31 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +cftime 1.6.4.post1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +contourpy 1.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +cycler 0.12.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +esmpy 8.6.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +fonttools 4.55.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +geographiclib 2.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +geopy 2.4.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +Jinja2 3.1.5 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +kiwisolver 1.4.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +MarkupSafe 3.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +matplotlib 3.10.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +netCDF4 1.7.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +numpy 2.2.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +packaging 24.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pandas 2.2.3 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pillow 11.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pip 25.0.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pyparsing 3.2.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pyproj 3.7.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pyshp 2.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +python-dateutil 2.9.0.post0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pytz 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +PyYAML 6.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +scipy 1.15.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +setuptools 75.8.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +setuptools-git-versioning 2.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +shapely 2.0.7 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +six 1.17.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +tzdata 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +xarray 2025.1.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip diff --git a/dev/compute_interpolation_weights/sorc/compute_interpolation_weights.sh b/dev/compute_interpolation_weights/sorc/compute_interpolation_weights.sh new file mode 100755 index 0000000..598393e --- /dev/null +++ b/dev/compute_interpolation_weights/sorc/compute_interpolation_weights.sh @@ -0,0 +1,52 @@ +!/bin/bash +# --------------------------------------------------------------------------- # +# # +# Copy external fix files that are too large to store in repository # +# # +# Last Changed : 08-15-2025 Aug 2025 # +# --------------------------------------------------------------------------- # + +echo 'setting paths...' + +export meshID=$1 +export RWPSroot="$(pwd)/../../../" +export mesh="$RWPSroot/fix/rwps.$meshID.msh" + + +export fix="$RWPSroot/fix" +export prep="$RWPSroot/PrepInputs" +export tmp="$prep/tmpfiles" +export frc="$prep/forcing" +export outdir=$prep + +echo $RWPSroot +echo $fix $prep $tmp $outdir +mkdir -p $prep +mkdir -p $tmp +mkdir -p $frc + + +echo $RWPSroot +echo $fix $prep $tmp $outdir + + +#machine dependend path to rtofs, nbm, rrfs, and stofs forecast files +export COMINrtofs="/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs.$PDY/" +export COMINnbm="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.$PDY/$cyc/grib2" +export COMINrrfs="/lfs/h1/ops/prod/com/rrfs/v1.0/rrfs.$PDY/$cyc" +export COMINstofs="/lfs/h1/ops/prod/com/stofs/v3.1/stofs_2d_glo.$PDY" + +export COMINlocal=$tmp + +#machine dependend path to RWPS fix files +export RWPSfix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPS + +# copy mesh to local fix directory +cp -p $RWPSfix/fix/$meshID/20260722/rwps.$meshID.msh $RWPSroot/fix/ + +meshname="${mesh##*/}" +export meshname="${meshname: 0: -4}" + +#Retrieve current and process for forecast cycle +qsub -V $RWPSroot/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf + diff --git a/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136818048 b/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136818048 new file mode 100644 index 0000000..b22e527 --- /dev/null +++ b/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136818048 @@ -0,0 +1,757 @@ +PBS: Running prologue on parent mom node: nid001112... +Job 136818048.dbqs01 nodelist: nid001112 +Job 136818048.dbqs01 - Prologue complete. Execution time: 4 seconds +Agent pid 1554071 +Identity added: /u/keston.smith/.ssh/id_ed25519 (keston.smith@noaa.gov) +/u/keston.smith/.bashrc: line 46: alias: eval "$(ssh-agent -s)"; ssh-add ~/.ssh/id_ed25519: not found +Resetting modules to system default. Reseting $MODULEPATH back to system default. All extra directories will be removed from $MODULEPATH. +Package Version Location Installer +------------------------- ----------- ---------------------------------------------------------------------------------- --------- +Cartopy 0.24.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +certifi 2025.1.31 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +cftime 1.6.4.post1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +contourpy 1.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +cycler 0.12.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +esmpy 8.6.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +fonttools 4.55.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +geographiclib 2.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +geopy 2.4.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +Jinja2 3.1.5 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +kiwisolver 1.4.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +MarkupSafe 3.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +matplotlib 3.10.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +netCDF4 1.7.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +numpy 2.2.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +packaging 24.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pandas 2.2.3 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pillow 11.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pip 25.0.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pyparsing 3.2.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pyproj 3.7.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pyshp 2.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +python-dateutil 2.9.0.post0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pytz 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +PyYAML 6.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +scipy 1.15.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +setuptools 75.8.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +setuptools-git-versioning 2.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +shapely 2.0.7 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +six 1.17.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +tzdata 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +xarray 2025.1.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 194, in + dist2bnd=iutil.CalculateDistanceToInterpEnvelope(xi,yi,u0, 1.) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 413, in CalculateDistanceToInterpEnvelope + din[k]=QuickDistance(yin[k],xin[k],yout,xout) # distance from node to closest point not interpolated to + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 422, in QuickDistance + d= np.min( np.sqrt( ( (lat1-lats2)*deg2kmY)**2 + ((lon1-lons2)*deg2kmX)**2 ) ) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/numpy/_core/fromnumeric.py", line 3302, in min + return _wrapreduction(a, np.minimum, 'min', axis, None, out, + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/numpy/_core/fromnumeric.py", line 86, in _wrapreduction + return ufunc.reduce(obj, axis, dtype, out, **passkwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +ValueError: zero-size array to reduction operation minimum which has no identity +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 194, in + dist2bnd=iutil.CalculateDistanceToInterpEnvelope(xi,yi,u0, 1.) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 413, in CalculateDistanceToInterpEnvelope + din[k]=QuickDistance(yin[k],xin[k],yout,xout) # distance from node to closest point not interpolated to + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 422, in QuickDistance + d= np.min( np.sqrt( ( (lat1-lats2)*deg2kmY)**2 + ((lon1-lons2)*deg2kmX)**2 ) ) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/numpy/_core/fromnumeric.py", line 3302, in min + return _wrapreduction(a, np.minimum, 'min', axis, None, out, + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/numpy/_core/fromnumeric.py", line 86, in _wrapreduction + return ufunc.reduce(obj, axis, dtype, out, **passkwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +ValueError: zero-size array to reduction operation minimum which has no identity +directory STOFSInterpWeights.rwps.oc_20km_300km is alread empty +Made parallel jobcards to create interpolation weights with 16 processes. Next step: +sbatch jobcardcompute_unstr_to_rwps_interp_weightsSLURM +136819126[].dbqs01 +python: can't open file '/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/ConvertWeights2Netcdf.py': [Errno 2] No such file or directory +cp: cannot stat 'InterpWeights.rwps.oc_20km_300km.stofs.nc': No such file or directory +cp: cannot stat 'DistToBndy.rwps.oc_20km_300km.stofs.nc': No such file or directory +directory STOFSInterpWeights.rwps.oc_20km_300km is alread empty +Made parallel jobcards to create interpolation weights with 16 processes. Next step: +sbatch jobcardcompute_unstr_to_rwps_interp_weightsSLURM +136819425[].dbqs01 +mesh file=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/sorc/../../..//fix/rwps.oc_20km_300km.msh +nn = 21329 +number of nodes read: 21329 +ne=40527 -includes boundary nodes +number of open boundary nodes read: 129 +number of elements read: 40398 +n=62076 +n_s=62076 +PBS: Running epilogue on parent mom node: nid001112... +================================================================== +BEGIN - DEBUG INFO +================================================================== +Job 136818048.dbqs01 - Post Job Mem Usage: +nid001112: 2026-08-24.51 1 =========================================== +nid001112: 2026-08-24.51 2 #### Node Memory Usage for nid001112 #### +nid001112: 2026-08-24.51 3 ------------------ +nid001112: 2026-08-24.51 4 Mem: total:526983544 used:17820532 free:510198608 shared:862632 cache:1554584 avail:509163012 +nid001112: 2026-08-24.51 5 4.0K /dev/shm +nid001112: 2026-08-24.51 6 40K /tmp +nid001112: 2026-08-24.51 7 =========================================== +nid001112: 2026-08-24.57 1 =========================================== +nid001112: 2026-08-24.57 2 #### Node Memory Usage for nid001112 #### +nid001112: 2026-08-24.57 3 ------------------ +nid001112: 2026-08-24.57 4 Mem: total:526983544 used:18714996 free:508390092 shared:862644 cache:3343248 avail:508268548 +nid001112: 2026-08-24.57 5 4.0K /dev/shm +nid001112: 2026-08-24.57 6 40K /tmp +nid001112: 2026-08-24.57 7 =========================================== + +------------------------------------------------------------------ +------------------------------------------------------------------ +Job 136818048.dbqs01 - Post Job Mem Usage Profile: +2026-08-24A--:--:--.------+--:-- nid001112 #### nid001112 - Job 136818048.dbqs01 NUMA Node Memory Allocation and Fragmentation Reports +Starting Fragmentation Report for nid001112 +Node Order9 Order10 Score MB_Free %Free State +0 5202 15 5232 10464 16 FRAG +1 9117 2771 14659 29318 45 MARG +2 5629 7539 20707 41414 64 OK +3 2883 11773 26429 52858 82 OK +4 6304 7640 21584 43168 66 OK +5 2042 12865 27772 55544 86 OK +6 3502 10704 24910 49820 77 OK +7 1516 13517 28550 57100 88 OK + +** nid001112 : node0_score=5232 node0_state=FRAG uptime=4577381s Overall=FRAG ** +Ending Fragmentation Report for nid001112 +Node Order9 Order10 Score MB_Free %Free State +0 5206 15 5236 10472 16 FRAG +1 9124 2774 14672 29344 45 MARG +2 5630 7540 20710 41420 64 OK +3 2882 11774 26430 52860 82 OK +4 6302 7643 21588 43176 66 OK +5 2022 12892 27806 55612 86 OK +6 3509 10707 24923 49846 77 OK +7 1520 13522 28564 57128 88 OK + +** nid001112 : node0_score=5236 node0_state=FRAG uptime=4578167s Overall=FRAG ** +2026-08-24A--:--:--.------+--:-- nid001112 #### nid001112 - Job 136818048.dbqs01 VMSTATS Memory Report +**Only Printing Significant Findings - TEST CODE - Results are NOT positive indication of a problem. ** +nid001112 [!] Inactive file cache ballooned: 431139 (threshold: 100000) + +------------------------------------------------------------------ +Job 136818048.dbqs01 - /var/log/messages for job duration: +2026-08-24A--:--:--.------+--:-- nid001112 #### nid001112 - Job 136818048.dbqs01 Runtime Data from /var/log/messages +nid001112: nid001112 #### nid001112 - Job 136818048.dbqs01 Runtime Data from /var/log/messages +nid001112: 2026-08-24T13:38:51.407558+00:00 nid001112 prologue: MARK: Job 136818048.dbqs01 Start +nid001112: 2026-08-24T13:38:51.413679+00:00 nid001112 prologue: Job 136818048.dbqs01 nodelist: nid001112 +nid001112: 2026-08-24T13:38:51.415558+00:00 nid001112 prologue: Job 136818048.dbqs01 - Recording pre-execution stats and counters... +nid001112: 2026-08-24T13:38:51.449276+00:00 nid001112 prologue: Job 136818048.dbqs01 - Killing any stray user processes... +nid001112: 2026-08-24T13:38:51.535866+00:00 nid001112 prologue: Job 136818048.dbqs01 - Clearing /tmp... +nid001112: 2026-08-24T13:38:51.551379+00:00 nid001112 prologue: Job 136818048.dbqs01 - Verifying key post-boot workarounds with warchk... +nid001112: 2026-08-24T13:38:51.579373+00:00 nid001112 WARCHK: root : /sfs/admin/scripts/warchk --batch +nid001112: 2026-08-24T13:38:51.771868+00:00 nid001112 prologue: Job 136818048.dbqs01 - Recording pre-job memory usage... +nid001112: 2026-08-24T13:38:51.851441+00:00 nid001112 prologue: Job 136818048.dbqs01 - FRAG_STATE: ** nid001112 : node0_score=5232 node0_state=FRAG uptime=4577381s Overall=FRAG ** +nid001112: 2026-08-24T13:38:51.852575+00:00 nid001112 prologue: Job 136818048.dbqs01 - Recording pre-job HSN counters... +nid001112: 2026-08-24T13:38:51.976365+00:00 nid001112 prologue: Job 136818048.dbqs01 - Recording pre-job Lustre counters... +nid001112: 2026-08-24T13:38:52.998196+00:00 nid001112 prologue: Job 136818048.dbqs01 - Recording initial NFS client statistics... +nid001112: 2026-08-24T13:38:53.008049+00:00 nid001112 prologue: Job 136818048.dbqs01 - Saving a copy of the job script... +nid001112: 2026-08-24T13:38:53.015124+00:00 nid001112 prologue: Job 136818048.dbqs01 - Checking existing ASLR settings... +nid001112: 2026-08-24T13:38:53.020906+00:00 nid001112 prologue: Job 136818048.dbqs01 - Checking palsd open file count... +nid001112: 2026-08-24T13:38:53.115961+00:00 nid001112 PBS_CMD: root : /opt/pbs/bin/qstat -Bf +nid001112: 2026-08-24T13:38:54.131024+00:00 nid001112 prologue: Job 136818048.dbqs01 - Checking one-shot enabled: False +nid001112: 2026-08-24T13:38:54.132179+00:00 nid001112 prologue: Job 136818048.dbqs01 - Enabling turboboost... +nid001112: 2026-08-24T13:38:54.135197+00:00 nid001112 prologue: Job 136818048.dbqs01 - Checking warchk results... +nid001112: 2026-08-24T13:38:54.138329+00:00 nid001112 prologue: Job 136818048.dbqs01 - Warchk Complete +nid001112: 2026-08-24T13:38:54.141005+00:00 nid001112 prologue: Job 136818048.dbqs01 - Prologue complete. Execution time: 4 seconds +nid001112: 2026-08-24T13:40:47.144700+00:00 nid001112 kernel: [4577206.032353][T13525] LNet: 13525:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds +nid001112: 2026-08-24T13:41:48.135821+00:00 nid001112 kernel: [4577267.020490][T13525] LNet: 13525:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.126.122@o2ib: 1 seconds +nid001112: 2026-08-24T13:43:15.817637+00:00 nid001112 kernel: [4577354.694851][T13514] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001112: 2026-08-24T13:43:40.046173+00:00 nid001112 systemd[1]: etc_update.service: Deactivated successfully. +nid001112: 2026-08-24T13:45:03.696624+00:00 nid001112 systemd[1]: session-11882.scope: Deactivated successfully. +nid001112: 2026-08-24T13:48:15.845649+00:00 nid001112 kernel: [4577654.707776][T13514] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001112: 2026-08-24T13:48:51.011503+00:00 nid001112 PBS_CMD: keston.smith : /opt/pbs/bin/qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS +nid001112: 2026-08-24T13:50:24.253091+00:00 nid001112 PBS_CMD: keston.smith : /opt/pbs/bin/qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS +nid001112: 2026-08-24T13:50:39.786587+00:00 nid001112 chronyd[951904]: Source 172.234.37.140 replaced with 162.244.81.139 (2.suse.pool.ntp.org) +nid001112: 2026-08-24T13:51:42.035807+00:00 nid001112 systemd[1]: etc_update.service: Deactivated successfully. +nid001112: 2026-08-24T13:51:57.168536+00:00 nid001112 epilogue: Job 136818048.dbqs01 complete, running post-job actions. +nid001112: 2026-08-24T13:51:57.188126+00:00 nid001112 epilogue: MARK: Job 136818048.dbqs01 Complete. + +------------------------------------------------------------------ +Job 136818048.dbqs01 - dmesg output for job duration: +2026-08-24A--:--:--.------+--:-- nid001112 #### nid001112 - Job 136818048.dbqs01 Runtime Data from dmesg +nid001112: nid001112 #### nid001112 - Job 136818048.dbqs01 Runtime Data from dmesg +nid001112: [Mon Aug 24 13:33:59 2026] MARK: Job 136818048.dbqs01 Start +nid001112: [Mon Aug 24 13:35:55 2026] LNet: 13525:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds +nid001112: [Mon Aug 24 13:36:56 2026] LNet: 13525:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.126.122@o2ib: 1 seconds +nid001112: [Mon Aug 24 13:38:23 2026] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001112: [Mon Aug 24 13:43:23 2026] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001112: [Mon Aug 24 13:47:05 2026] MARK: Job 136818048.dbqs01 Complete. + +------------------------------------------------------------------ +Job 136818048.dbqs01 - Pre/Post job diff on HSN (MLX) Counters: +2026-08-24A--:--:--.------+--:-- nid001112 #### nid001112 - Job 136818048.dbqs01 HSN0 MLX Counter Post-Job Difference +nid001112: multicast:: 5998376 | multicast:: 5998536 | Diff: 160 +nid001112: rx_bytes:: 175732410880 | rx_bytes:: 175733588514 | Diff: 1177634 +nid001112: rx_packets:: 56731654 | rx_packets:: 56732477 | Diff: 823 +nid001112: tx_bytes:: 459805352880 | tx_bytes:: 459805539523 | Diff: 186643 +nid001112: tx_packets:: 81385193 | tx_packets:: 81385985 | Diff: 792 +nid001112: port_rcv_data:: 218447199721576 | port_rcv_data:: 218447532387621 | Diff: 332666045 +nid001112: port_rcv_packets:: 357868701358 | port_rcv_packets:: 357869195490 | Diff: 494132 +nid001112: port_xmit_data:: 218557640868690 | port_xmit_data:: 218559188548079 | Diff: 1547679389 +nid001112: port_xmit_packets:: 355820321573 | port_xmit_packets:: 355821943197 | Diff: 1621624 +nid001112: unicast_rcv_packets:: 357868701358 | unicast_rcv_packets:: 357869195490 | Diff: 494132 +nid001112: unicast_xmit_packets:: 355820321573 | unicast_xmit_packets:: 355821943197 | Diff: 1621624 +nid001112: resp_cqe_error:: 76536 | resp_cqe_error:: 76572 | Diff: 36 +nid001112: resp_cqe_flush_error:: 72951 | resp_cqe_flush_error:: 72985 | Diff: 34 +nid001112: rx_write_requests:: 267371451 | rx_write_requests:: 267381876 | Diff: 10425 + +------------------------------------------------------------------ +Job 136818048.dbqs01 - Pre/Post job diff for Lustre Stats: +2026-08-24A--:--:--.------+--:-- nid001112 #### nid001112 - Job 136818048.dbqs01 Lustre Counters Post-Job Difference +nid001112: ### LustreStats: Multi-value diffs correspond to [samples min max total sum_of_squares] ### +nid001112: /lfs/h1 vah1-ffff922c9375f800 : +nid001112: h1: snapshot_time: Diffs: [ 786] secs +nid001112: h1: elapsed_time: Diffs: [ 785] secs +nid001112: h1: ioctl: Diffs: [ 2] reqs +nid001112: h1: getattr: Diffs: [ 15 0 0 58 732] Avg_usec : 3.86 +nid001112: h1: inode_permission: Diffs: [ 2 0 0 2 2] Avg_usec : 1.00 +nid001112: h1: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 +nid001112: ---------------- +nid001112: /lfs/h2 vah2-ffff923ccc444000 : +nid001112: h2: snapshot_time: Diffs: [ 786] secs +nid001112: h2: elapsed_time: Diffs: [ 785] secs +nid001112: h2: read_bytes: Diffs: [ 559426 0 0 5503438117 43105739845453767] Avg_bytes: 9837.65 +nid001112: h2: write_bytes: Diffs: [ 339788 0 0 6622063266 65429322276485738] Avg_bytes: 19488.80 +nid001112: h2: read: Diffs: [ 559406 0 0 4789832 412510293996] Avg_usec : 8.56 +nid001112: h2: write: Diffs: [ 340011 0 0 6200260 74845333006] Avg_usec : 18.23 +nid001112: h2: ioctl: Diffs: [ 758] reqs +nid001112: h2: open: Diffs: [ 527 0 0 68403 24655545] Avg_usec : 129.79 +nid001112: h2: close: Diffs: [ 528 0 0 36951 5626697] Avg_usec : 69.98 +nid001112: h2: seek: Diffs: [ 1278975 0 0 753 24119] Avg_usec : 0 +nid001112: h2: readdir: Diffs: [ 59 0 0 6795 2951687] Avg_usec : 115.16 +nid001112: h2: truncate: Diffs: [ 109 0 0 359934 14330718878] Avg_usec : 3302.14 +nid001112: h2: flock: Diffs: [ 92 0 0 5832 859180] Avg_usec : 63.39 +nid001112: h2: getattr: Diffs: [ 2871 0 0 375419 9704657913] Avg_usec : 130.76 +nid001112: h2: unlink: Diffs: [ 31 0 0 15366 8006106] Avg_usec : 495.67 +nid001112: h2: mkdir: Diffs: [ 2 0 0 707 250145] Avg_usec : 353.50 +nid001112: h2: rmdir: Diffs: [ 1 0 0 246 60516] Avg_usec : 246.00 +nid001112: h2: mknod: Diffs: [ 42 0 0 19138 12684482] Avg_usec : 455.66 +nid001112: h2: rename: Diffs: [ 3 0 0 1791 1098873] Avg_usec : 597.00 +nid001112: h2: getxattr: Diffs: [ 273 0 0 5024 507858] Avg_usec : 18.40 +nid001112: h2: getxattr_hits: Diffs: [ 203] reqs +nid001112: h2: inode_permission: Diffs: [ 20842 0 0 8768 46402] Avg_usec : .42 +nid001112: h2: opencount: Diffs: [ 529 0 0 3341 41341] Avg_reqs : 6.31 +nid001112: ---------------- +nid001112: /lfs/f1 vaf1-ffff923ccc444800 : +nid001112: f1: snapshot_time: Diffs: [ 785] secs +nid001112: f1: elapsed_time: Diffs: [ 785] secs +nid001112: f1: ioctl: Diffs: [ 2] reqs +nid001112: f1: getattr: Diffs: [ 11 0 0 35 253] Avg_usec : 3.18 +nid001112: f1: inode_permission: Diffs: [ 2 0 0 2 2] Avg_usec : 1.00 +nid001112: f1: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 +nid001112: ---------------- +nid001112: /lfs/f2 vaf2-ffff922c9f5a8800 : +nid001112: f2: snapshot_time: Diffs: [ 785] secs +nid001112: f2: elapsed_time: Diffs: [ 786] secs +nid001112: f2: read_bytes: Diffs: [ 20 0 0 122109 1783525125] Avg_bytes: 6105.45 +nid001112: f2: write_bytes: Diffs: [ 18 0 0 29161 96835341] Avg_bytes: 1620.05 +nid001112: f2: read: Diffs: [ 20 0 0 327 10491] Avg_usec : 16.35 +nid001112: f2: write: Diffs: [ 484 0 0 7805 3573829] Avg_usec : 16.12 +nid001112: f2: ioctl: Diffs: [ 14] reqs +nid001112: f2: open: Diffs: [ 23 0 0 708 121820] Avg_usec : 30.78 +nid001112: f2: close: Diffs: [ 23 0 0 2280 774426] Avg_usec : 99.13 +nid001112: f2: seek: Diffs: [ 21 0 0 2 4] Avg_usec : .09 +nid001112: f2: readdir: Diffs: [ 2 0 0 387 149769] Avg_usec : 193.50 +nid001112: f2: getattr: Diffs: [ 38 0 0 4256 1330196] Avg_usec : 112.00 +nid001112: f2: mknod: Diffs: [ 11 0 0 2829 848225] Avg_usec : 257.18 +nid001112: f2: getxattr: Diffs: [ 11 0 0 1358 179244] Avg_usec : 123.45 +nid001112: f2: inode_permission: Diffs: [ 138 0 0 358 8106] Avg_usec : 2.59 +nid001112: f2: opencount: Diffs: [ 25 0 0 56 230] Avg_reqs : 2.24 +nid001112: ---------------- +nid001112: /lfs/h3 vah3-ffff922c93235000 : +nid001112: h3: snapshot_time: Diffs: [ 785] secs +nid001112: h3: elapsed_time: Diffs: [ 786] secs +nid001112: h3: ioctl: Diffs: [ 2] reqs +nid001112: h3: getattr: Diffs: [ 7 0 0 28 198] Avg_usec : 4.00 +nid001112: h3: inode_permission: Diffs: [ 2 0 0 2 2] Avg_usec : 1.00 +nid001112: h3: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 +nid001112: ---------------- +nid001112: /apps vaf2-ffff922c97713000 : +nid001112: apps: snapshot_time: Diffs: [ 785] secs +nid001112: apps: elapsed_time: Diffs: [ 786] secs +nid001112: apps: read_bytes: Diffs: [ 14883 0 0 268925845 25166134096371] Avg_bytes: 18069.33 +nid001112: apps: read: Diffs: [ 14883 0 0 760989 249255825] Avg_usec : 51.13 +nid001112: apps: ioctl: Diffs: [ 10934] reqs +nid001112: apps: open: Diffs: [ 17634 0 0 862373 167033917] Avg_usec : 48.90 +nid001112: apps: close: Diffs: [ 17634 0 0 667602 134779154] Avg_usec : 37.85 +nid001112: apps: mmap: Diffs: [ 8112 0 0 47407 710627] Avg_usec : 5.84 +nid001112: apps: page_fault: Diffs: [ 171776 0 0 12810 35074] Avg_usec : .07 +nid001112: apps: seek: Diffs: [ 21713 0 0 24 38] Avg_usec : 0 +nid001112: apps: readdir: Diffs: [ 6626 0 0 413072 348261918] Avg_usec : 62.34 +nid001112: apps: getattr: Diffs: [ 78610 0 0 1402798 217899610] Avg_usec : 17.84 +nid001112: apps: getxattr: Diffs: [ 14 0 0 134 5896] Avg_usec : 9.57 +nid001112: apps: getxattr_hits: Diffs: [ 13] reqs +nid001112: apps: inode_permission: Diffs: [ 1079411 0 0 148154 370760] Avg_usec : .13 +nid001112: apps: opencount: Diffs: [ 17636 0 0 58582 321052] Avg_reqs : 3.32 +nid001112: ---------------- + +------------------------------------------------------------------ +### Job 136818048.dbqs01 - NFS Statistics for job duration: +#### 2026-08-24A--:--:--.------+--:-- nid001112 Job 136818048.dbqs01 - DEBUG-NFS: Unable to find NFS stats file: /lfs/f2/hpc/jobdata/136818048/nfsstats.136818048.nid001112 + +------------------------------------------------------------------ +### Job 136818048.dbqs01 - Lustre evictions (if present): + +------------------------------------------------------------------ +### Job 136818048.dbqs01 - Exit status is 0 + +------------------------------------------------------------------ +Job 136818048.dbqs01 - Job summary: +Job Id: 136818048.dbqs01 + Job_Name = ESMPy + Job_Owner = keston.smith@dlogin03.dogwood.wcoss2.ncep.noaa.gov + resources_used.cpupercent = 110 + resources_used.cput = 00:10:27 + resources_used.mem = 12832188kb + resources_used.ncpus = 16 + resources_used.vmem = 11770788kb + resources_used.walltime = 00:12:04 + job_state = R + queue = dev + server = dbqs01 + Account_Name = NWPS-DEV + Checkpoint = u + ctime = Mon Aug 24 13:38:48 2026 + Error_Path = dlogin03.dogwood.wcoss2.ncep.noaa.gov:/lfs/h2/emc/couple/noscr + ub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/sor + c/ESMPy.e136818048 + exec_host = nid001112/0*16 + exec_vnode = (nid001112:ncpus=16:mem=268435456kb) + Hold_Types = n + Join_Path = oe + Keep_Files = oed + Mail_Points = a + mtime = Mon Aug 24 13:51:01 2026 + Output_Path = dlogin03.dogwood.wcoss2.ncep.noaa.gov:/lfs/h2/emc/couple/nosc + rub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/so + rc/ESMPy.o136818048 + Priority = 0 + qtime = Mon Aug 24 13:38:48 2026 + Rerunable = False + Resource_List.alvl = 2 + Resource_List.aslr = True + Resource_List.debug = True + Resource_List.dfs = False + Resource_List.hyper = True + Resource_List.ldebug = False + Resource_List.mem = 256gb + Resource_List.ncpus = 16 + Resource_List.nodect = 1 + Resource_List.one-shot = False + Resource_List.place = exclhost + Resource_List.select = 1:ncpus=16:mem=256GB + Resource_List.turbo = True + Resource_List.walltime = 04:00:00 + schedselect = 1:ncpus=16:mem=256GB:prepost=False + stime = Mon Aug 24 13:38:50 2026 + session_id = 1552072 + Shell_Path_List = /bin/bash + jobdir = /u/keston.smith + substate = 42 + Variable_List = PBS_O_HOME=/u/keston.smith,PBS_O_LANG=en_US.UTF-8, + PBS_O_LOGNAME=keston.smith, + PBS_O_PATH=/opt/cray/bin:/u/keston.smith/.local/bin:/usr/local/bin:/us + r/bin:/bin:/opt/c3/bin:/opt/pbs/bin:/sbin, + PBS_O_MAIL=/var/spool/mail/keston.smith,PBS_O_SHELL=/bin/bash, + PBS_O_WORKDIR=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWP + S/dev/compute_interpolation_weights/sorc,PBS_O_SYSTEM=Linux, + LMOD_FAMILY_CRAYPE_NETWORK_VERSION=false,meshID=oc_20km_300km, + LD_LIBRARY_PATH=/opt/cray/lib64, + LS_COLORS=no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd= + 40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com + =01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tg + z=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.l + zma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2= + 00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.xz=00;31:*.avi=01;35:*.bmp + =01;35:*.dl=01;35:*.fli=01;35:*.gif=01;35:*.gl=01;35:*.jpg=01;35:*.jpeg + =01;35:*.mkv=01;35:*.mng=01;35:*.mov=01;35:*.mp4=01;35:*.mpg=01;35:*.pc + x=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.svg=01;35:*.t + ga=01;35:*.tif=01;35:*.webm=01;35:*.webp=01;35:*.wmv=01;35:*.xbm=01;35: + *.xcf=01;35:*.xpm=01;35:*.aiff=00;32:*.ape=00;32:*.au=00;32:*.flac=00;3 + 2:*.m4a=00;32:*.mid=00;32:*.mp3=00;32:*.mpc=00;32:*.ogg=00;32:*.voc=00; + 32:*.wav=00;32:*.wma=00;32:*.wv=00;32:,HOSTTYPE=x86_64, + prep=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/sorc/.. + //PrepInputs, + __LMOD_REF_COUNT_PATH=/opt/cray/bin:1;/u/keston.smith/.local/bin:1;/us + r/local/bin:1;/usr/bin:1;/bin:2;/opt/c3/bin:1;/opt/pbs/bin:1;/sbin:1, + _ModuleTable002_=ck5hbWUiXT0iY3JheXBlLW5ldHdvcmstb2ZpIix9LFsiY3JheXBlL + Xg4Ni1yb21lIl09e1siZm4iXT0iL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY3Jh + eXBlLXRhcmdldHMvZGVmYXVsdC9jcmF5cGUteDg2LXJvbWUubHVhIixbImZ1bGxOYW1lIl0 + 9ImNyYXlwZS14ODYtcm9tZSIsWyJsb2FkT3JkZXIiXT0xLHByb3BUPXt9LFsic3RhY2tEZX + B0aCJdPTEsWyJzdGF0dXMiXT0iYWN0aXZlIixbInVzZXJOYW1lIl09ImNyYXlwZS14ODYtc + m9tZSIsfSxlbnZ2YXI9e1siZm4iXT0iL2FwcHMvcHJvZC9sbW9kdWxlcy9zeXNfY29yZS9l + bnZ2YXIvMS4wIixbImZ1bGxOYW1lIl09ImVudnZhci8xLjAiLFsibG9hZE9yZGVyIl09NCx + wcm9wVD17fSxbInN0YWNrRGVwdGgiXT0w, + SSH_CONNECTION=192.58.153.6 55826 192.58.153.13 22, + mesh=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/com + pute_interpolation_weights/sorc/../../..//fix/rwps.oc_20km_300km.msh, + XAUTHLOCALHOSTNAME=dlogin03,LESSCLOSE=lessclose.sh %s %s, + XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB, + LMOD_FAMILY_CRAYPE_CPU=craype-x86-rome, + LMOD_MODULERCFILE=/apps/prod/lmodules/.modulerc.lua, + PE_PRODUCT_LIST=CRAYPE_X86_ROME,LMOD_IGNORE_CACHE=yes,LANG=en_US.UTF-8, + WINDOWMANAGER=xterm,LESS=-M -I -R,DISPLAY=localhost:16.0, + HISTTIMEFORMAT=%F %T,HOSTNAME=dlogin03, + LMOD_SYSTEM_DEFAULT_MODULES=envvar/1.0, + OLDPWD=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/c + ompute_interpolation_weights/ecf, + __LMOD_REF_COUNT__LMFILES_=/opt/cray/pe/lmod/modulefiles/craype-target + s/default/craype-x86-rome.lua:1;/opt/cray/modulefiles/libfabric/1.20.1: + 1;/opt/cray/pe/lmod/modulefiles/craype-targets/default/craype-network-o + fi.lua:1;/apps/prod/lmodules/sys_core/envvar/1.0:1, + CONFIG_SITE=/usr/share/site/x86_64-unknown-linux-gnu,CSHEDIT=emacs, + LMOD_CUSTOM_CNCM_INTEL_19_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX + =/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/apps + /ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4, + LMOD_CUSTOM_COMPILER_GNU_8_0_PREFIX=/apps/prod/lmodules/gcc/11.2.0:/ap + ps/prod/lmodules/gcc/10.2.0,GPG_TTY=/dev/pts/12, + LESS_ADVANCED_PREPROCESSOR=no,COLORTERM=1, + frc=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/sorc/../ + /PrepInputs/forcing,LMOD_FAMILY_CRAYPE_NETWORK=craype-network-ofi, + MACHTYPE=x86_64-suse-linux, + __LMOD_REF_COUNT_LD_LIBRARY_PATH=/opt/cray/lib64:1, + __LMOD_REF_COUNT_PKG_CONFIG_PATH=/opt/cray/lib64/pkgconfig:1, + LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_UCX_1_0_PREFIX=/apps/prod/lmodules/cce + /13.0.0:/apps/prod/lmodules/cce/12.0.3:/apps/prod/lmodules/cce/11.0.4, + tmp=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/sorc/../ + /PrepInputs/tmpfiles,SSH_AUTH_SOCK=/tmp/ssh-8YXrZyNz6e62/agent.4140983, + _ModuleTable004_=U0lPTi9tb2R1bGVmaWxlcyIsIi91c3Ivc2hhcmUvbW9kdWxlcy9tb + 2R1bGVmaWxlcyIsIi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvTGludXgiLCIvdXNyL3NoYXJl + L21vZHVsZWZpbGVzL0NvcmUiLCIvdXNyL3NoYXJlL2xtb2QvbG1vZC9tb2R1bGVmaWxlcy9 + Db3JlIiwiL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY29yZSIsIi9vcHQvY3JheS + 9wZS9sbW9kL21vZHVsZWZpbGVzL2NyYXlwZS10YXJnZXRzL2RlZmF1bHQiLCIvYXBwcy9wc + m9kL2xtb2R1bGVzL3N5c19jb3JlIiwiL2FwcHMvb3BzL3Byb2QvbmNvL21vZHVsZWZpbGVz + L2NvcmUiLCIvYXBwcy9wcm9kL2xtb2R1bGVzL2NvcmUiLCIvb3B0L2NyYXkvbW9kdWxlZml + sZXMiLH0sWyJzeXN0ZW1CYXNlTVBBVEgi,MINICOM=-c on, + QT_SYSTEM_DIR=/usr/share/desktop-data,OSTYPE=linux, + meshname=rwps.oc_20km_300km,USER=keston.smith, + MODULES_SET_SHELL_STARTUP=0,PAGER=less,MODULE_VERSION=3.2.10, + LMOD_CUSTOM_CNCM_GNU_8_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX=/a + pps/prod/lmodules/GCC_cray_mpich/10.2.0/cray-mpich/8.1.4, + LMOD_CUSTOM_CNCM_GNU_8_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX=/a + pps/prod/lmodules/GCC_cray_mpich/10.2.0/cray-mpich/8.1.4, + CRAY_CPU_TARGET=x86-rome, + LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PR + EFIX=/apps/prod/lmodules/CCE_cray_mpich/11.0.4/cray-mpich/8.1.4, + __LMOD_REF_COUNT_MODULEPATH=/opt/cray/pe/lmod/modulefiles/net/ofi/1.0: + 1;/opt/cray/pe/lmod/modulefiles/cpu/x86-rome/1.0:1;/usr/share/modules:1 + ;/usr/share/Modules/$MODULE_VERSION/modulefiles:1;/usr/share/modules/mo + dulefiles:1;/usr/share/modulefiles/Linux:1;/usr/share/modulefiles/Core: + 1;/usr/share/lmod/lmod/modulefiles/Core:1;/opt/cray/pe/lmod/modulefiles + /core:1;/opt/cray/pe/lmod/modulefiles/craype-targets/default:1;/apps/pr + od/lmodules/sys_core:1;/apps/ops/prod/nco/modulefiles/core:1;/apps/prod + /lmodules/core:1;/opt/cray/modulefiles:1, + COMINrrfs=/lfs/h1/ops/prod/com/rrfs/v1.0/rrfs./,MORE=-sl, + __LMOD_REF_COUNT_LOADEDMODULES=craype-x86-rome:1;libfabric/1.20.1:1;cr + aype-network-ofi:1;envvar/1.0:1, + PWD=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp + ute_interpolation_weights/sorc, + COMINrtofs=/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs./, + HOME=/u/keston.smith, + COMINnbm=/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.//grib2, + PELOCAL_PRGENV=true,SSH_AGENT_PID=4140994,HOST=dlogin03, + SSH_CLIENT=192.58.153.6 55826 22,LMOD_VERSION=8.3.1, + XNLSPATH=/usr/share/X11/nls,CRAY_LMOD_CPU=x86-rome/1.0, + LMOD_FAMILY_CRAYPE_CPU_VERSION=false, + BASH_ENV=/usr/share/lmod/lmod/init/bash,XDG_DATA_DIRS=/usr/share, + LMOD_CUSTOM_CNCM_INTEL_19_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX + =/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/apps + /ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4, + CRAY_LMOD_NET=ofi/1.0, + RWPSroot=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev + /compute_interpolation_weights/sorc/../../../, + COMINlocal=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/s + orc/..//PrepInputs/tmpfiles, + __LMOD_REF_COUNT_LMOD_CUSTOM_COMPILER_INTEL_19_0_PREFIX=/apps/ops/prod + /nco/models/modulefiles:1;/apps/prod/lmodules/intel/19.1.3.304:1;/apps/ + ops/prod/libs/modulefiles/compiler/intel/19.1.3.304:1;/apps/ops/prod/nc + o/modulefiles/compiler/intel/19.1.3.304:1,LIBGL_DEBUG=quiet, + LMOD_CUSTOM_COMPILER_INTEL_19_0_PREFIX=/apps/ops/prod/nco/models/modul + efiles:/apps/prod/lmodules/intel/19.1.3.304:/apps/ops/prod/libs/modulef + iles/compiler/intel/19.1.3.304:/apps/ops/prod/nco/modulefiles/compiler/ + intel/19.1.3.304,PROFILEREAD=true,LMOD_sys=Linux, + _ModuleTable001_=X01vZHVsZVRhYmxlXz17WyJNVHZlcnNpb24iXT0zLFsiY19yZWJ1a + WxkVGltZSJdPWZhbHNlLFsiY19zaG9ydFRpbWUiXT1mYWxzZSxkZXB0aFQ9e30sZmFtaWx5 + PXtbImNyYXlwZV9jcHUiXT0iY3JheXBlLXg4Ni1yb21lIixbImNyYXlwZV9uZXR3b3JrIl0 + 9ImNyYXlwZS1uZXR3b3JrLW9maSIsfSxtVD17WyJjcmF5cGUtbmV0d29yay1vZmkiXT17Wy + JmbiJdPSIvb3B0L2NyYXkvcGUvbG1vZC9tb2R1bGVmaWxlcy9jcmF5cGUtdGFyZ2V0cy9kZ + WZhdWx0L2NyYXlwZS1uZXR3b3JrLW9maS5sdWEiLFsiZnVsbE5hbWUiXT0iY3JheXBlLW5l + dHdvcmstb2ZpIixbImxvYWRPcmRlciJdPTMscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MSx + bInN0YXR1cyJdPSJhY3RpdmUiLFsidXNl, + LOADEDMODULES=craype-x86-rome:libfabric/1.20.1:craype-network-ofi:envv + ar/1.0,LMOD_AVAIL_STYLE=en_grouped:system,CRAYPE_NETWORK_TARGET=ofi, + _ModuleTable006_=b2R1bGVmaWxlcyIsfQ==, + __LMOD_REF_COUNT_MANPATH=/opt/cray/share/man:1;/usr/share/lmod/lmod/sh + are/man:1;/usr/share/man:1;/opt/c3/man:1;/opt/pbs/share/man:1, + _ModuleTable003_=LFsic3RhdHVzIl09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJdPSJlbnZ2Y + XIvMS4wIix9LGxpYmZhYnJpYz17WyJmbiJdPSIvb3B0L2NyYXkvbW9kdWxlZmlsZXMvbGli + ZmFicmljLzEuMjAuMSIsWyJmdWxsTmFtZSJdPSJsaWJmYWJyaWMvMS4yMC4xIixbImxvYWR + PcmRlciJdPTIscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MixbInN0YXR1cyJdPSJhY3Rpdm + UiLFsidXNlck5hbWUiXT0ibGliZmFicmljIix9LH0sbXBhdGhBPXsiL29wdC9jcmF5L3BlL + 2xtb2QvbW9kdWxlZmlsZXMvbmV0L29maS8xLjAiLCIvb3B0L2NyYXkvcGUvbG1vZC9tb2R1 + bGVmaWxlcy9jcHUveDg2LXJvbWUvMS4wIiwiL3Vzci9zaGFyZS9tb2R1bGVzIiwiL3Vzci9 + zaGFyZS9Nb2R1bGVzLyRNT0RVTEVfVkVS,LMOD_ROOT=/usr/share/lmod, + SSH_TTY=/dev/pts/12,FROM_HEADER=,MAIL=/var/spool/mail/keston.smith, + COMINstofs=/lfs/h1/ops/prod/com/stofs/v3.1/stofs_2d_glo., + LESSKEY=/etc/lesskey.bin,TERM=xterm-256color,SHELL=/bin/bash, + LMOD_ADMIN_FILE=/apps/prod/lmodules/admin.list, + LMOD_CUSTOM_COMPILER_GNU_8_0_UCX_1_0_PREFIX=/apps/prod/lmodules/gcc/11 + .2.0:/apps/prod/lmodules/gcc/10.2.0, + outdir=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/sorc/ + ..//PrepInputs,lmod_prefix_path=/usr/share, + LMOD_CUSTOM_COMPILER_CRAYCLANG_10_0_PREFIX=/apps/prod/lmodules/cce/13. + 0.0:/apps/prod/lmodules/cce/12.0.3:/apps/prod/lmodules/cce/11.0.4, + _ModuleTable_Sz_=6,LS_OPTIONS=-N --color=tty -T 0, + LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PR + EFIX=/apps/prod/lmodules/CCE_cray_mpich/11.0.4/cray-mpich/8.1.4, + TMOUT=1800,PYTHONSTARTUP=/etc/pythonstart, + RWPSfix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPS,SHLVL=3, + LANGUAGE=en_US.UTF-8,G_FILENAME_ENCODING=@locale\,UTF-8\,ISO-8859-15\, + CP1252, + LMOD_CUSTOM_COMPILER_INTEL_19_0_UCX_1_0_PREFIX=/apps/prod/lmodules/int + el/19.1.3.304:/apps/ops/prod/libs/modulefiles/compiler/intel/19.1.3.304 + :/apps/ops/prod/nco/modulefiles/compiler/intel/19.1.3.304, + HPC_OPT=/apps/ops/prod/libs, + MANPATH=/opt/cray/share/man:/usr/share/lmod/lmod/share/man:/usr/share/ + man:/opt/c3/man:/opt/pbs/share/man,OSCAR_HOME=/opt/oscar, + fix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp + ute_interpolation_weights/sorc/../../..//fix, + MODULEPATH=/opt/cray/pe/lmod/modulefiles/net/ofi/1.0:/opt/cray/pe/lmod + /modulefiles/cpu/x86-rome/1.0:/usr/share/modules:/usr/share/Modules/$MO + DULE_VERSION/modulefiles:/usr/share/modules/modulefiles:/usr/share/modu + lefiles/Linux:/usr/share/modulefiles/Core:/usr/share/lmod/lmod/modulefi + les/Core:/opt/cray/pe/lmod/modulefiles/core:/opt/cray/pe/lmod/modulefil + es/craype-targets/default:/apps/prod/lmodules/sys_core:/apps/ops/prod/n + co/modulefiles/core:/apps/prod/lmodules/core:/opt/cray/modulefiles, + LOGNAME=keston.smith,MODULE_VERSION_STACK=3.2.10, + MODULEPATH_ROOT=/usr/share/modulefiles, + LMOD_PACKAGE_PATH=/apps/prod/lmodules,XDG_CONFIG_DIRS=/etc/xdg, + PATH=/opt/cray/bin:/u/keston.smith/.local/bin:/usr/local/bin:/usr/bin: + /bin:/opt/c3/bin:/opt/pbs/bin:/sbin, + __LMOD_REF_COUNT_PE_PRODUCT_LIST=CRAYPE_X86_ROME:1, + _LMFILES_=/opt/cray/pe/lmod/modulefiles/craype-targets/default/craype- + x86-rome.lua:/opt/cray/modulefiles/libfabric/1.20.1:/opt/cray/pe/lmod/m + odulefiles/craype-targets/default/craype-network-ofi.lua:/apps/prod/lmo + dules/sys_core/envvar/1.0,MODULESHOME=/usr/share/lmod/lmod, + PKG_CONFIG_PATH=/opt/cray/lib64/pkgconfig, + LMOD_SETTARG_FULL_SUPPORT=no,INFOPATH=:/apps/docs/info, + G_BROKEN_FILENAMES=1,HISTSIZE=10000,LMOD_PKG=/usr/share/lmod/lmod, + CPU=x86_64, + _ModuleTable005_=XT0iL3Vzci9zaGFyZS9tb2R1bGVzOi91c3Ivc2hhcmUvTW9kdWxlc + y8kTU9EVUxFX1ZFUlNJT04vbW9kdWxlZmlsZXM6L3Vzci9zaGFyZS9tb2R1bGVzL21vZHVs + ZWZpbGVzOi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvTGludXg6L3Vzci9zaGFyZS9tb2R1bGV + maWxlcy9Db3JlOi91c3Ivc2hhcmUvbG1vZC9sbW9kL21vZHVsZWZpbGVzL0NvcmU6L29wdC + 9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY29yZTovb3B0L2NyYXkvcGUvbG1vZC9tb2R1b + GVmaWxlcy9jcmF5cGUtdGFyZ2V0cy9kZWZhdWx0Oi9hcHBzL3Byb2QvbG1vZHVsZXMvc3lz + X2NvcmU6L2FwcHMvb3BzL3Byb2QvbmNvL21vZHVsZWZpbGVzL2NvcmU6L2FwcHMvcHJvZC9 + sbW9kdWxlcy9jb3JlOi9vcHQvY3JheS9t, + LMOD_CMD=/usr/share/lmod/lmod/libexec/lmod,CVS_RSH=ssh, + LESSOPEN=lessopen.sh %s,LMOD_DIR=/usr/share/lmod/lmod/libexec, + LC_TIME=C.UTF-8, + BASH_FUNC_module%%=() { eval $($LMOD_CMD bash \"$@\") && eval $(${LMO + D_SETTARG_CMD:-:} -s sh) + euser = keston.smith + egroup = emc + hashname = 136818048.dbqs01 + queue_rank = 1787578728965575 + queue_type = E + comment = Job run at Mon Aug 24 at 13:38 on (nid001112:ncpus=16:mem=2684354 + 56kb) + etime = Mon Aug 24 13:38:48 2026 + umask = 22 + run_count = 6 + eligible_time = 00:00:08 + accrue_type = 3 + Submit_arguments = -V /lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/ + RWPS/dev/compute_interpolation_weights/sorc/../../..//dev/compute_inter + polation_weights/ecf/compute_interpolation_weights.ecf + project = NWPS-DEV + run_version = 1 + Submit_Host = dlogin03.dogwood.wcoss2.ncep.noaa.gov + server_instance_id = dbqs01.dogwood.wcoss2.ncep.noaa.gov:15001 + + +------------------------------------------------------------------ +Job 136818048.dbqs01 - PBS tracejob output (for parent mom node only): + +Job: 136818048.dbqs01 + +08/24/2026 13:38:50 M update_job_usage: CPU usage: 0.000 secs +08/24/2026 13:38:50 M update_job_usage: cpupercent initialized to zero +08/24/2026 13:38:50 M update_job_usage: Memory usage: mem=0b +08/24/2026 13:38:54 M Started, pid = 1552072 +08/24/2026 13:40:21 M update_job_usage: CPU usage: 101.000 secs +08/24/2026 13:40:21 M update_job_usage: 136818048.dbqs01 measured interval cpupercent 110 increased job cpupercent to 110 +08/24/2026 13:40:21 M update_job_usage: Memory usage: mem=2176660kb +08/24/2026 13:42:22 M update_job_usage: CPU usage: 228.000 secs +08/24/2026 13:42:22 M update_job_usage: Memory usage: mem=4368980kb +08/24/2026 13:44:24 M update_job_usage: CPU usage: 349.000 secs +08/24/2026 13:44:24 M update_job_usage: Memory usage: mem=11424744kb +08/24/2026 13:46:25 M update_job_usage: CPU usage: 474.000 secs +08/24/2026 13:46:25 M update_job_usage: Memory usage: mem=11424744kb +08/24/2026 13:48:26 M update_job_usage: CPU usage: 594.000 secs +08/24/2026 13:48:26 M update_job_usage: Memory usage: mem=12687432kb +08/24/2026 13:50:27 M update_job_usage: CPU usage: 627.000 secs +08/24/2026 13:50:27 M update_job_usage: Memory usage: mem=12832188kb +08/24/2026 13:51:56 M task 00000001 terminated +08/24/2026 13:51:56 M Terminated +08/24/2026 13:51:56 M task 00000001 cput=00:10:34 +08/24/2026 13:51:56 M kill_job +08/24/2026 13:51:56 M nid001112 cput=00:10:27 mem=12832188kb +08/24/2026 13:51:56 M update_job_usage: CPU usage: 632.000 secs +08/24/2026 13:51:56 M update_job_usage: Memory usage: mem=12832188kb + +------------------------------------------------------------------ +To see full PBS log data, run: /sfs/admin/scripts/tracejob.sh 136818048.dbqs01 + +================================================================== +END - DEBUG INFO +================================================================== + +Job 136818048.dbqs01 - Epilogue DEBUG complete. DEBUG Execution time: 6 seconds +Job 136818048.dbqs01 - Epilogue complete. Execution time: 8 seconds +##### Job 136818048.dbqs01 - PBS Job Script: +(Note: Duplicate #PBS entries are a function how PBS interprets and caches the original job script.) + +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=04:00:00 +##PBS -l select=1:ncpus=8:mem=128GB +#PBS -l select=1:ncpus=16:mem=256GB +###PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + +pip list -v + +cd $RWPSroot/ush/preprocess + +SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" +date="20260730" +cycl="00" +Nprocs=16 + + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +rrfs_hi=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.hi.nc +rrfs_pr=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.pr.nc +rrfs_ak=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.ak.nc +rrfs_na=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.na.nc +rrfs_conus=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.conus.nc + +out="../../fix" + +rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" +rrfsDst="$out/DistToBndy.$meshname.rrfs" + +#no extrapolation with rrfs forecasts +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_pr $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 > GenWhts.rrfs.pr.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_ak $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 > GenWhts.rrfs.ak.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_na $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 > GenWhts.rrfs.na.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_conus $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out + +nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc +nbmIntrp="$out/InterpolationWeights.$meshname.nbm" +nbmDst="$out/DistToBndy.$meshname.nbm" +#extrapolate nbm oc wind to all points +python ./compute_gridded_to_rwps_interp_weights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out + +nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc +#do not extrapolate for NBM .ak. domain +python ./compute_gridded_to_rwps_interp_weights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out + +rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc +rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" +rtofsDst="$out/DistToBndy.$meshname.rtofs" + +#extrapolate rtofs .glo. for full ice coverage + +python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out + + +rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc +#do not extrapolate rtofs .glo. currents +python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.current.nc $rtofsDst.current.nc -1 > GenWhts.rtofs.current.out + + +stofs_glo="$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" + +## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs + +## Now run parallel job script + +qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS + +wait + +#combine text file output of parallel jobs +cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt + +# convert output weights to netcdf file +python ConvertWeights2Netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 +cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.v2.nc +cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.v2.nc + +rm -rf STOFSInterpWeights.$meshname + +#compute stofs weights for current(v3) stofs mesh +stofs_glo="$SID/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc" + +## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs + +## Now run parallel job script + +qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS + +wait + +#combine text file output of parallel jobs +cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt + +# convert output weights to netcdf file +python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 +cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc +cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc + + + + + +##### End of job script +------------------------------------------------------------------ + diff --git a/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136825597 b/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136825597 new file mode 100644 index 0000000..46f8fc5 --- /dev/null +++ b/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136825597 @@ -0,0 +1,969 @@ +PBS: Running prologue on parent mom node: nid001957... +Job 136825597.dbqs01 nodelist: nid001957 +Job 136825597.dbqs01 - Prologue complete. Execution time: 4 seconds +Agent pid 2040048 +Identity added: /u/keston.smith/.ssh/id_ed25519 (keston.smith@noaa.gov) +/u/keston.smith/.bashrc: line 46: alias: eval "$(ssh-agent -s)"; ssh-add ~/.ssh/id_ed25519: not found +Resetting modules to system default. Reseting $MODULEPATH back to system default. All extra directories will be removed from $MODULEPATH. +Package Version Location Installer +------------------------- ----------- ---------------------------------------------------------------------------------- --------- +Cartopy 0.24.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +certifi 2025.1.31 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +cftime 1.6.4.post1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +contourpy 1.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +cycler 0.12.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +esmpy 8.6.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +fonttools 4.55.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +geographiclib 2.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +geopy 2.4.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +Jinja2 3.1.5 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +kiwisolver 1.4.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +MarkupSafe 3.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +matplotlib 3.10.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +netCDF4 1.7.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +numpy 2.2.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +packaging 24.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pandas 2.2.3 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pillow 11.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pip 25.0.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pyparsing 3.2.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pyproj 3.7.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pyshp 2.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +python-dateutil 2.9.0.post0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pytz 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +PyYAML 6.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +scipy 1.15.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +setuptools 75.8.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +setuptools-git-versioning 2.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +shapely 2.0.7 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +six 1.17.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +tzdata 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +xarray 2025.1.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in + iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights + regrid = esmpy.Regrid( + ^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ + self._routehandle = ESMP_FieldRegridStoreFile( + ^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile + raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ +ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in + iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights + regrid = esmpy.Regrid( + ^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ + self._routehandle = ESMP_FieldRegridStoreFile( + ^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile + raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ +ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in + iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights + regrid = esmpy.Regrid( + ^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ + self._routehandle = ESMP_FieldRegridStoreFile( + ^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile + raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ +ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in + iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights + regrid = esmpy.Regrid( + ^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ + self._routehandle = ESMP_FieldRegridStoreFile( + ^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile + raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ +ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in + iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights + regrid = esmpy.Regrid( + ^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ + self._routehandle = ESMP_FieldRegridStoreFile( + ^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile + raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ +ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in + iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights + regrid = esmpy.Regrid( + ^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ + self._routehandle = ESMP_FieldRegridStoreFile( + ^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile + raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ +ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in + iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights + regrid = esmpy.Regrid( + ^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ + self._routehandle = ESMP_FieldRegridStoreFile( + ^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile + raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ +ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in + iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights + regrid = esmpy.Regrid( + ^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ + self._routehandle = ESMP_FieldRegridStoreFile( + ^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile + raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ +ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in + iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights + regrid = esmpy.Regrid( + ^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ + self._routehandle = ESMP_FieldRegridStoreFile( + ^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile + raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ +ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). +directory STOFSInterpWeights.rwps.oc_1500m_30km is alread empty +Made parallel jobcards to create interpolation weights with 16 processes. Next step: +sbatch jobcardcompute_unstr_to_rwps_interp_weightsSLURM +136827246[].dbqs01 +mesh file=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/sorc/../../..//fix/rwps.oc_1500m_30km.msh +nn = 675917 +number of nodes read: 675917 +ne=1299317 -includes boundary nodes +number of open boundary nodes read: 1149 +number of elements read: 1298168 +n=1964475 +n_s=1964475 +directory STOFSInterpWeights.rwps.oc_1500m_30km is alread empty +Made parallel jobcards to create interpolation weights with 16 processes. Next step: +sbatch jobcardcompute_unstr_to_rwps_interp_weightsSLURM +136829528[].dbqs01 +mesh file=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/sorc/../../..//fix/rwps.oc_1500m_30km.msh +nn = 675917 +number of nodes read: 675917 +ne=1299317 -includes boundary nodes +number of open boundary nodes read: 1149 +number of elements read: 1298168 +n=1964475 +n_s=1964475 +PBS: Running epilogue on parent mom node: nid001957... +================================================================== +BEGIN - DEBUG INFO +================================================================== +Job 136825597.dbqs01 - Post Job Mem Usage: +nid001957: 2026-08-24.47 1 =========================================== +nid001957: 2026-08-24.47 2 #### Node Memory Usage for nid001957 #### +nid001957: 2026-08-24.47 3 ------------------ +nid001957: 2026-08-24.47 4 Mem: total:526983516 used:16299488 free:511749592 shared:657020 cache:1289304 avail:510684028 +nid001957: 2026-08-24.47 5 4.0K /dev/shm +nid001957: 2026-08-24.47 6 40K /tmp +nid001957: 2026-08-24.47 7 =========================================== +nid001957: 2026-08-24.07 1 =========================================== +nid001957: 2026-08-24.07 2 #### Node Memory Usage for nid001957 #### +nid001957: 2026-08-24.07 3 ------------------ +nid001957: 2026-08-24.07 4 Mem: total:526983516 used:17617160 free:509252636 shared:657008 cache:3616752 avail:509366356 +nid001957: 2026-08-24.07 5 4.0K /dev/shm +nid001957: 2026-08-24.07 6 40K /tmp +nid001957: 2026-08-24.07 7 =========================================== + +------------------------------------------------------------------ +------------------------------------------------------------------ +Job 136825597.dbqs01 - Post Job Mem Usage Profile: +2026-08-24A--:--:--.------+--:-- nid001957 #### nid001957 - Job 136825597.dbqs01 NUMA Node Memory Allocation and Fragmentation Reports +Starting Fragmentation Report for nid001957 +Node Order9 Order10 Score MB_Free %Free State +0 8187 3711 15609 31218 49 MARG +1 5648 7856 21360 42720 66 OK +2 3918 9666 23250 46500 72 OK +3 2885 11901 26687 53374 82 OK +4 3163 11666 26495 52990 82 OK +5 1612 13479 28570 57140 88 OK +6 1539 13494 28527 57054 88 OK +7 2045 13085 28215 56430 87 OK + +** nid001957 : node0_score=15609 node0_state=MARG uptime=4568226s Overall=MARG ** +Ending Fragmentation Report for nid001957 +Node Order9 Order10 Score MB_Free %Free State +0 8184 3715 15614 31228 49 MARG +1 5662 7871 21404 42808 66 OK +2 3978 9691 23360 46720 72 OK +3 2877 11929 26735 53470 82 OK +4 3156 11672 26500 53000 82 OK +5 1606 13489 28584 57168 88 OK +6 1514 13552 28618 57236 88 OK +7 1821 13313 28447 56894 88 OK + +** nid001957 : node0_score=15614 node0_state=MARG uptime=4570706s Overall=MARG ** +2026-08-24A--:--:--.------+--:-- nid001957 #### nid001957 - Job 136825597.dbqs01 VMSTATS Memory Report +**Only Printing Significant Findings - TEST CODE - Results are NOT positive indication of a problem. ** +nid001957 [!] Inactive file cache ballooned: 553217 (threshold: 100000) + +------------------------------------------------------------------ +Job 136825597.dbqs01 - /var/log/messages for job duration: +2026-08-24A--:--:--.------+--:-- nid001957 #### nid001957 - Job 136825597.dbqs01 Runtime Data from /var/log/messages +nid001957: nid001957 #### nid001957 - Job 136825597.dbqs01 Runtime Data from /var/log/messages +nid001957: 2026-08-24T14:45:46.904058+00:00 nid001957 prologue: MARK: Job 136825597.dbqs01 Start +nid001957: 2026-08-24T14:45:46.915397+00:00 nid001957 prologue: Job 136825597.dbqs01 nodelist: nid001957 +nid001957: 2026-08-24T14:45:46.917037+00:00 nid001957 prologue: Job 136825597.dbqs01 - Recording pre-execution stats and counters... +nid001957: 2026-08-24T14:45:46.948890+00:00 nid001957 prologue: Job 136825597.dbqs01 - Killing any stray user processes... +nid001957: 2026-08-24T14:45:47.032838+00:00 nid001957 prologue: Job 136825597.dbqs01 - Clearing /tmp... +nid001957: 2026-08-24T14:45:47.049943+00:00 nid001957 prologue: Job 136825597.dbqs01 - Verifying key post-boot workarounds with warchk... +nid001957: 2026-08-24T14:45:47.080200+00:00 nid001957 WARCHK: root : /sfs/admin/scripts/warchk --batch +nid001957: 2026-08-24T14:45:47.289295+00:00 nid001957 prologue: Job 136825597.dbqs01 - Recording pre-job memory usage... +nid001957: 2026-08-24T14:45:47.370177+00:00 nid001957 prologue: Job 136825597.dbqs01 - FRAG_STATE: ** nid001957 : node0_score=15609 node0_state=MARG uptime=4568226s Overall=MARG ** +nid001957: 2026-08-24T14:45:47.371619+00:00 nid001957 prologue: Job 136825597.dbqs01 - Recording pre-job HSN counters... +nid001957: 2026-08-24T14:45:47.493171+00:00 nid001957 prologue: Job 136825597.dbqs01 - Recording pre-job Lustre counters... +nid001957: 2026-08-24T14:45:48.481933+00:00 nid001957 prologue: Job 136825597.dbqs01 - Recording initial NFS client statistics... +nid001957: 2026-08-24T14:45:48.492518+00:00 nid001957 prologue: Job 136825597.dbqs01 - Saving a copy of the job script... +nid001957: 2026-08-24T14:45:48.499865+00:00 nid001957 prologue: Job 136825597.dbqs01 - Checking existing ASLR settings... +nid001957: 2026-08-24T14:45:48.505302+00:00 nid001957 prologue: Job 136825597.dbqs01 - Checking palsd open file count... +nid001957: 2026-08-24T14:45:48.597627+00:00 nid001957 PBS_CMD: root : /opt/pbs/bin/qstat -Bf +nid001957: 2026-08-24T14:45:49.612236+00:00 nid001957 prologue: Job 136825597.dbqs01 - Checking one-shot enabled: False +nid001957: 2026-08-24T14:45:49.613350+00:00 nid001957 prologue: Job 136825597.dbqs01 - Enabling turboboost... +nid001957: 2026-08-24T14:45:49.616245+00:00 nid001957 prologue: Job 136825597.dbqs01 - Checking warchk results... +nid001957: 2026-08-24T14:45:49.619278+00:00 nid001957 prologue: Job 136825597.dbqs01 - Warchk Complete +nid001957: 2026-08-24T14:45:49.622016+00:00 nid001957 prologue: Job 136825597.dbqs01 - Prologue complete. Execution time: 4 seconds +nid001957: 2026-08-24T14:47:55.378970+00:00 nid001957 kernel: [4568119.490559][T13872] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001957: 2026-08-24T14:51:16.162789+00:00 nid001957 systemd[1]: etc_update.service: Deactivated successfully. +nid001957: 2026-08-24T14:52:55.410966+00:00 nid001957 kernel: [4568419.506851][T13872] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001957: 2026-08-24T14:55:30.279242+00:00 nid001957 kernel: [4568574.346730][T13882] LNet: 13882:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds +nid001957: 2026-08-24T14:55:30.279259+00:00 nid001957 kernel: [4568574.367865][T13882] LNet: 13882:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 1 previous similar message +nid001957: 2026-08-24T14:57:32.207383+00:00 nid001957 PBS_CMD: keston.smith : /opt/pbs/bin/qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS +nid001957: 2026-08-24T14:57:55.442969+00:00 nid001957 kernel: [4568719.523110][T13872] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001957: 2026-08-24T15:00:06.138528+00:00 nid001957 systemd[1]: Started Timeline of Snapper Snapshots. +nid001957: 2026-08-24T15:00:06.188843+00:00 nid001957 dbus-daemon[4828]: [system] Activating via systemd: service name='org.opensuse.Snapper' unit='snapperd.service' requested by ':1.33751' (uid=0 pid=2042784 comm="/usr/lib/snapper/systemd-helper --timeline ") +nid001957: 2026-08-24T15:00:06.192515+00:00 nid001957 systemd[1]: Starting DBus interface for snapper... +nid001957: 2026-08-24T15:00:06.200058+00:00 nid001957 dbus-daemon[4828]: [system] Successfully activated service 'org.opensuse.Snapper' +nid001957: 2026-08-24T15:00:06.200208+00:00 nid001957 systemd[1]: Started DBus interface for snapper. +nid001957: 2026-08-24T15:00:06.204540+00:00 nid001957 systemd[1]: snapper-timeline.service: Deactivated successfully. +nid001957: 2026-08-24T15:01:06.266611+00:00 nid001957 systemd[1]: snapperd.service: Deactivated successfully. +nid001957: 2026-08-24T15:02:42.155196+00:00 nid001957 systemd[1]: etc_update.service: Deactivated successfully. +nid001957: 2026-08-24T15:02:55.474967+00:00 nid001957 kernel: [4569019.539342][T13872] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001957: 2026-08-24T15:07:55.510962+00:00 nid001957 kernel: [4569319.555604][T13872] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001957: 2026-08-24T15:10:29.288372+00:00 nid001957 kernel: [4569473.307559][T13882] LNet: 13882:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 0 seconds +nid001957: 2026-08-24T15:10:29.288389+00:00 nid001957 kernel: [4569473.330076][T13882] LNet: 13882:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 1 previous similar message +nid001957: 2026-08-24T15:12:18.796407+00:00 nid001957 PBS_CMD: keston.smith : /opt/pbs/bin/qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS +nid001957: 2026-08-24T15:12:55.538960+00:00 nid001957 kernel: [4569619.571856][T13872] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001957: 2026-08-24T15:13:29.886366+00:00 nid001957 chronyd[1387427]: Source 45.79.82.45 replaced with 170.187.147.56 (2.suse.pool.ntp.org) +nid001957: 2026-08-24T15:14:46.156924+00:00 nid001957 systemd[1]: etc_update.service: Deactivated successfully. +nid001957: 2026-08-24T15:15:08.730019+00:00 nid001957 systemd[1]: session-15546.scope: Deactivated successfully. +nid001957: 2026-08-24T15:17:55.570960+00:00 nid001957 kernel: [4569919.588171][T13872] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001957: 2026-08-24T15:20:46.155390+00:00 nid001957 systemd[1]: etc_update.service: Deactivated successfully. +nid001957: 2026-08-24T15:22:55.602960+00:00 nid001957 kernel: [4570219.604458][T13872] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001957: 2026-08-24T15:25:30.279891+00:00 nid001957 kernel: [4570374.252367][T13882] LNet: 13882:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds +nid001957: 2026-08-24T15:25:30.279906+00:00 nid001957 kernel: [4570374.273776][T13882] LNet: 13882:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 1 previous similar message +nid001957: 2026-08-24T15:27:06.853772+00:00 nid001957 epilogue: Job 136825597.dbqs01 complete, running post-job actions. +nid001957: 2026-08-24T15:27:06.870540+00:00 nid001957 epilogue: MARK: Job 136825597.dbqs01 Complete. + +------------------------------------------------------------------ +Job 136825597.dbqs01 - dmesg output for job duration: +2026-08-24A--:--:--.------+--:-- nid001957 #### nid001957 - Job 136825597.dbqs01 Runtime Data from dmesg +nid001957: nid001957 #### nid001957 - Job 136825597.dbqs01 Runtime Data from dmesg +nid001957: [Mon Aug 24 14:41:51 2026] MARK: Job 136825597.dbqs01 Start +nid001957: [Mon Aug 24 14:43:59 2026] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001957: [Mon Aug 24 14:48:59 2026] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001957: [Mon Aug 24 14:51:34 2026] LNet: 13882:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds +nid001957: [Mon Aug 24 14:51:34 2026] LNet: 13882:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 1 previous similar message +nid001957: [Mon Aug 24 14:53:59 2026] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001957: [Mon Aug 24 14:58:59 2026] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001957: [Mon Aug 24 15:03:59 2026] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001957: [Mon Aug 24 15:06:33 2026] LNet: 13882:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 0 seconds +nid001957: [Mon Aug 24 15:06:33 2026] LNet: 13882:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 1 previous similar message +nid001957: [Mon Aug 24 15:08:59 2026] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001957: [Mon Aug 24 15:13:59 2026] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001957: [Mon Aug 24 15:18:59 2026] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001957: [Mon Aug 24 15:21:34 2026] LNet: 13882:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds +nid001957: [Mon Aug 24 15:21:34 2026] LNet: 13882:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 1 previous similar message +nid001957: [Mon Aug 24 15:23:10 2026] MARK: Job 136825597.dbqs01 Complete. + +------------------------------------------------------------------ +Job 136825597.dbqs01 - Pre/Post job diff on HSN (MLX) Counters: +2026-08-24A--:--:--.------+--:-- nid001957 #### nid001957 - Job 136825597.dbqs01 HSN0 MLX Counter Post-Job Difference +nid001957: multicast:: 5543460 | multicast:: 5543982 | Diff: 522 +nid001957: rx_bytes:: 225229507347 | rx_bytes:: 225230520724 | Diff: 1013377 +nid001957: rx_packets:: 43201761 | rx_packets:: 43203555 | Diff: 1794 +nid001957: tx_bytes:: 162361679831 | tx_bytes:: 162362127587 | Diff: 447756 +nid001957: tx_packets:: 33347353 | tx_packets:: 33348948 | Diff: 1595 +nid001957: port_rcv_data:: 381496422377642 | port_rcv_data:: 381497059824666 | Diff: 637447024 +nid001957: port_rcv_packets:: 615315401470 | port_rcv_packets:: 615316199689 | Diff: 798219 +nid001957: port_xmit_data:: 375556521845260 | port_xmit_data:: 375557712852364 | Diff: 1191007104 +nid001957: port_xmit_packets:: 612025632750 | port_xmit_packets:: 612026930298 | Diff: 1297548 +nid001957: unicast_rcv_packets:: 615315401470 | unicast_rcv_packets:: 615316199689 | Diff: 798219 +nid001957: unicast_xmit_packets:: 612025632750 | unicast_xmit_packets:: 612026930298 | Diff: 1297548 +nid001957: resp_cqe_error:: 55419 | resp_cqe_error:: 55509 | Diff: 90 +nid001957: resp_cqe_flush_error:: 52386 | resp_cqe_flush_error:: 52471 | Diff: 85 +nid001957: rx_write_requests:: 149318934 | rx_write_requests:: 149330341 | Diff: 11407 + +------------------------------------------------------------------ +Job 136825597.dbqs01 - Pre/Post job diff for Lustre Stats: +2026-08-24A--:--:--.------+--:-- nid001957 #### nid001957 - Job 136825597.dbqs01 Lustre Counters Post-Job Difference +nid001957: ### LustreStats: Multi-value diffs correspond to [samples min max total sum_of_squares] ### +nid001957: /lfs/h1 vah1-ffff9e132359e000 : +nid001957: h1: snapshot_time: Diffs: [ 2480] secs +nid001957: h1: elapsed_time: Diffs: [ 2480] secs +nid001957: h1: ioctl: Diffs: [ 2] reqs +nid001957: h1: getattr: Diffs: [ 15 0 0 72 1056] Avg_usec : 4.80 +nid001957: h1: inode_permission: Diffs: [ 2 0 0 3 5] Avg_usec : 1.50 +nid001957: h1: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 +nid001957: ---------------- +nid001957: /lfs/h2 vah2-ffff9e12d9661800 : +nid001957: h2: snapshot_time: Diffs: [ 2480] secs +nid001957: h2: elapsed_time: Diffs: [ 2480] secs +nid001957: h2: read_bytes: Diffs: [ 121046 0 0 3006327104 56782317572138634] Avg_bytes: 24836.23 +nid001957: h2: write_bytes: Diffs: [ 1436 0 0 4705304939 70228028486733085] Avg_bytes: 3276674.74 +nid001957: h2: read: Diffs: [ 120988 0 0 12625919 480067214399] Avg_usec : 104.35 +nid001957: h2: write: Diffs: [ 1662 0 0 3654471 120817045273] Avg_usec : 2198.83 +nid001957: h2: ioctl: Diffs: [ 740] reqs +nid001957: h2: open: Diffs: [ 330 0 0 36186 15716046] Avg_usec : 109.65 +nid001957: h2: close: Diffs: [ 331 0 0 27278 4256994] Avg_usec : 82.41 +nid001957: h2: seek: Diffs: [ 4031 0 0 522 18092] Avg_usec : .12 +nid001957: h2: readdir: Diffs: [ 70 0 0 8933 4100057] Avg_usec : 127.61 +nid001957: h2: truncate: Diffs: [ 72 0 0 1589339 621766699255] Avg_usec : 22074.15 +nid001957: h2: flock: Diffs: [ 52 0 0 3998 664446] Avg_usec : 76.88 +nid001957: h2: getattr: Diffs: [ 2876 0 0 99032 32823388] Avg_usec : 34.43 +nid001957: h2: unlink: Diffs: [ 203 0 0 82327 36910333] Avg_usec : 405.55 +nid001957: h2: mkdir: Diffs: [ 2 0 0 995 666125] Avg_usec : 497.50 +nid001957: h2: rmdir: Diffs: [ 2 0 0 365 66833] Avg_usec : 182.50 +nid001957: h2: mknod: Diffs: [ 19 0 0 8070 4532410] Avg_usec : 424.73 +nid001957: h2: rename: Diffs: [ 2 0 0 909 422801] Avg_usec : 454.50 +nid001957: h2: statfs: Diffs: [ 1 0 0 110 12100] Avg_usec : 110.00 +nid001957: h2: getxattr: Diffs: [ 134 0 0 4831 700089] Avg_usec : 36.05 +nid001957: h2: getxattr_hits: Diffs: [ 93] reqs +nid001957: h2: inode_permission: Diffs: [ 20680 0 0 9171 52433] Avg_usec : .44 +nid001957: h2: opencount: Diffs: [ 332 0 0 954 5646] Avg_reqs : 2.87 +nid001957: ---------------- +nid001957: /lfs/f1 vaf1-ffff9e12ee70c800 : +nid001957: f1: snapshot_time: Diffs: [ 2480] secs +nid001957: f1: elapsed_time: Diffs: [ 2479] secs +nid001957: f1: ioctl: Diffs: [ 2] reqs +nid001957: f1: getattr: Diffs: [ 11 0 0 35 259] Avg_usec : 3.18 +nid001957: f1: inode_permission: Diffs: [ 2 0 0 2 2] Avg_usec : 1.00 +nid001957: f1: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 +nid001957: ---------------- +nid001957: /lfs/f2 vaf2-ffff9e03a06ba000 : +nid001957: f2: snapshot_time: Diffs: [ 2480] secs +nid001957: f2: elapsed_time: Diffs: [ 2479] secs +nid001957: f2: read_bytes: Diffs: [ 20 0 0 118636 1681384642] Avg_bytes: 5931.80 +nid001957: f2: write_bytes: Diffs: [ 18 0 0 29367 99300731] Avg_bytes: 1631.50 +nid001957: f2: read: Diffs: [ 20 0 0 341 12099] Avg_usec : 17.05 +nid001957: f2: write: Diffs: [ 482 0 0 10590 7572702] Avg_usec : 21.97 +nid001957: f2: ioctl: Diffs: [ 14] reqs +nid001957: f2: open: Diffs: [ 23 0 0 710 116026] Avg_usec : 30.86 +nid001957: f2: close: Diffs: [ 23 0 0 2124 601290] Avg_usec : 92.34 +nid001957: f2: seek: Diffs: [ 21 0 0 2 4] Avg_usec : .09 +nid001957: f2: readdir: Diffs: [ 2 0 0 365 133225] Avg_usec : 182.50 +nid001957: f2: getattr: Diffs: [ 38 0 0 6484 3950224] Avg_usec : 170.63 +nid001957: f2: mknod: Diffs: [ 11 0 0 3235 1128625] Avg_usec : 294.09 +nid001957: f2: getxattr: Diffs: [ 11 0 0 1748 356776] Avg_usec : 158.90 +nid001957: f2: inode_permission: Diffs: [ 138 0 0 392 9748] Avg_usec : 2.84 +nid001957: f2: opencount: Diffs: [ 25 0 0 56 230] Avg_reqs : 2.24 +nid001957: ---------------- +nid001957: /lfs/h3 vah3-ffff9e03a06bf800 : +nid001957: h3: snapshot_time: Diffs: [ 2480] secs +nid001957: h3: elapsed_time: Diffs: [ 2480] secs +nid001957: h3: ioctl: Diffs: [ 2] reqs +nid001957: h3: getattr: Diffs: [ 7 0 0 27 183] Avg_usec : 3.85 +nid001957: h3: inode_permission: Diffs: [ 2 0 0 2 2] Avg_usec : 1.00 +nid001957: h3: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 +nid001957: ---------------- +nid001957: /apps vaf2-ffff9e12ee70f000 : +nid001957: apps: snapshot_time: Diffs: [ 2480] secs +nid001957: apps: elapsed_time: Diffs: [ 2480] secs +nid001957: apps: read_bytes: Diffs: [ 15686 0 0 282748004 26050514147340] Avg_bytes: 18025.50 +nid001957: apps: read: Diffs: [ 15686 0 0 686320 196622482] Avg_usec : 43.75 +nid001957: apps: ioctl: Diffs: [ 11444] reqs +nid001957: apps: open: Diffs: [ 18339 0 0 840067 154539613] Avg_usec : 45.80 +nid001957: apps: close: Diffs: [ 18339 0 0 658434 135932008] Avg_usec : 35.90 +nid001957: apps: mmap: Diffs: [ 8635 0 0 50588 762074] Avg_usec : 5.85 +nid001957: apps: page_fault: Diffs: [ 180587 0 0 11556 42634] Avg_usec : .06 +nid001957: apps: seek: Diffs: [ 22732 0 0 12 22] Avg_usec : 0 +nid001957: apps: readdir: Diffs: [ 6762 0 0 435313 378997455] Avg_usec : 64.37 +nid001957: apps: getattr: Diffs: [ 81960 0 0 1279934 173535710] Avg_usec : 15.61 +nid001957: apps: getxattr: Diffs: [ 14 0 0 149 8047] Avg_usec : 10.64 +nid001957: apps: getxattr_hits: Diffs: [ 13] reqs +nid001957: apps: inode_permission: Diffs: [ 1127643 0 0 151556 353886] Avg_usec : .13 +nid001957: apps: opencount: Diffs: [ 18341 0 0 60084 324976] Avg_reqs : 3.27 +nid001957: ---------------- + +------------------------------------------------------------------ +### Job 136825597.dbqs01 - NFS Statistics for job duration: +#### 2026-08-24A--:--:--.------+--:-- nid001957 Job 136825597.dbqs01 - DEBUG-NFS: Unable to find NFS stats file: /lfs/f2/hpc/jobdata/136825597/nfsstats.136825597.nid001957 + +------------------------------------------------------------------ +### Job 136825597.dbqs01 - Lustre evictions (if present): + +------------------------------------------------------------------ +### Job 136825597.dbqs01 - Exit status is 0 + +------------------------------------------------------------------ +Job 136825597.dbqs01 - Job summary: +Job Id: 136825597.dbqs01 + Job_Name = ESMPy + Job_Owner = keston.smith@dlogin09.dogwood.wcoss2.ncep.noaa.gov + resources_used.cpupercent = 111 + resources_used.cput = 00:12:26 + resources_used.mem = 13248244kb + resources_used.ncpus = 16 + resources_used.vmem = 11881628kb + resources_used.walltime = 00:41:12 + job_state = R + queue = dev + server = dbqs01 + Account_Name = NWPS-DEV + Checkpoint = u + ctime = Mon Aug 24 14:45:43 2026 + Error_Path = dlogin09.dogwood.wcoss2.ncep.noaa.gov:/lfs/h2/emc/couple/noscr + ub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/sor + c/ESMPy.e136825597 + exec_host = nid001957/0*16 + exec_vnode = (nid001957:ncpus=16:mem=268435456kb) + Hold_Types = n + Join_Path = oe + Keep_Files = oed + Mail_Points = a + mtime = Mon Aug 24 15:27:03 2026 + Output_Path = dlogin09.dogwood.wcoss2.ncep.noaa.gov:/lfs/h2/emc/couple/nosc + rub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/so + rc/ESMPy.o136825597 + Priority = 0 + qtime = Mon Aug 24 14:45:43 2026 + Rerunable = False + Resource_List.alvl = 2 + Resource_List.aslr = True + Resource_List.debug = True + Resource_List.dfs = False + Resource_List.hyper = True + Resource_List.ldebug = False + Resource_List.mem = 256gb + Resource_List.ncpus = 16 + Resource_List.nodect = 1 + Resource_List.one-shot = False + Resource_List.place = exclhost + Resource_List.select = 1:ncpus=16:mem=256GB + Resource_List.turbo = True + Resource_List.walltime = 04:00:00 + schedselect = 1:ncpus=16:mem=256GB:prepost=False + stime = Mon Aug 24 14:45:45 2026 + session_id = 2038059 + Shell_Path_List = /bin/bash + jobdir = /u/keston.smith + substate = 42 + Variable_List = PBS_O_HOME=/u/keston.smith,PBS_O_LANG=en_US.UTF-8, + PBS_O_LOGNAME=keston.smith, + PBS_O_PATH=/opt/cray/bin:/u/keston.smith/.local/bin:/usr/local/bin:/us + r/bin:/bin:/opt/c3/bin:/opt/pbs/bin:/sbin, + PBS_O_MAIL=/var/spool/mail/keston.smith,PBS_O_SHELL=/bin/bash, + PBS_O_WORKDIR=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWP + S/dev/compute_interpolation_weights/sorc,PBS_O_SYSTEM=Linux, + LMOD_FAMILY_CRAYPE_NETWORK_VERSION=false,meshID=oc_1500m_30km, + LD_LIBRARY_PATH=/opt/cray/lib64, + LS_COLORS=no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd= + 40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com + =01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tg + z=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.l + zma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2= + 00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.xz=00;31:*.avi=01;35:*.bmp + =01;35:*.dl=01;35:*.fli=01;35:*.gif=01;35:*.gl=01;35:*.jpg=01;35:*.jpeg + =01;35:*.mkv=01;35:*.mng=01;35:*.mov=01;35:*.mp4=01;35:*.mpg=01;35:*.pc + x=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.svg=01;35:*.t + ga=01;35:*.tif=01;35:*.webm=01;35:*.webp=01;35:*.wmv=01;35:*.xbm=01;35: + *.xcf=01;35:*.xpm=01;35:*.aiff=00;32:*.ape=00;32:*.au=00;32:*.flac=00;3 + 2:*.m4a=00;32:*.mid=00;32:*.mp3=00;32:*.mpc=00;32:*.ogg=00;32:*.voc=00; + 32:*.wav=00;32:*.wma=00;32:*.wv=00;32:,HOSTTYPE=x86_64, + __LMOD_REF_COUNT_PATH=/opt/cray/bin:1;/u/keston.smith/.local/bin:1;/us + r/local/bin:1;/usr/bin:1;/bin:2;/opt/c3/bin:1;/opt/pbs/bin:1;/sbin:1, + _ModuleTable002_=ck5hbWUiXT0iY3JheXBlLW5ldHdvcmstb2ZpIix9LFsiY3JheXBlL + Xg4Ni1yb21lIl09e1siZm4iXT0iL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY3Jh + eXBlLXRhcmdldHMvZGVmYXVsdC9jcmF5cGUteDg2LXJvbWUubHVhIixbImZ1bGxOYW1lIl0 + 9ImNyYXlwZS14ODYtcm9tZSIsWyJsb2FkT3JkZXIiXT0xLHByb3BUPXt9LFsic3RhY2tEZX + B0aCJdPTEsWyJzdGF0dXMiXT0iYWN0aXZlIixbInVzZXJOYW1lIl09ImNyYXlwZS14ODYtc + m9tZSIsfSxlbnZ2YXI9e1siZm4iXT0iL2FwcHMvcHJvZC9sbW9kdWxlcy9zeXNfY29yZS9l + bnZ2YXIvMS4wIixbImZ1bGxOYW1lIl09ImVudnZhci8xLjAiLFsibG9hZE9yZGVyIl09NCx + wcm9wVD17fSxbInN0YWNrRGVwdGgiXT0w, + SSH_CONNECTION=192.58.153.7 55526 192.58.153.19 22, + mesh=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/com + pute_interpolation_weights/sorc/../../..//fix/rwps.oc_1500m_30km.msh, + XAUTHLOCALHOSTNAME=dlogin09,LESSCLOSE=lessclose.sh %s %s, + XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB, + LMOD_FAMILY_CRAYPE_CPU=craype-x86-rome, + LMOD_MODULERCFILE=/apps/prod/lmodules/.modulerc.lua, + PE_PRODUCT_LIST=CRAYPE_X86_ROME,LMOD_IGNORE_CACHE=yes,LANG=en_US.UTF-8, + WINDOWMANAGER=xterm,LESS=-M -I -R,DISPLAY=localhost:15.0, + HISTTIMEFORMAT=%F %T,HOSTNAME=dlogin09, + LMOD_SYSTEM_DEFAULT_MODULES=envvar/1.0, + OLDPWD=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/c + ompute_interpolation_weights, + __LMOD_REF_COUNT__LMFILES_=/opt/cray/pe/lmod/modulefiles/craype-target + s/default/craype-x86-rome.lua:1;/opt/cray/modulefiles/libfabric/1.20.1: + 1;/opt/cray/pe/lmod/modulefiles/craype-targets/default/craype-network-o + fi.lua:1;/apps/prod/lmodules/sys_core/envvar/1.0:1, + CONFIG_SITE=/usr/share/site/x86_64-unknown-linux-gnu,CSHEDIT=emacs, + LMOD_CUSTOM_CNCM_INTEL_19_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX + =/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/apps + /ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4, + LMOD_CUSTOM_COMPILER_GNU_8_0_PREFIX=/apps/prod/lmodules/gcc/11.2.0:/ap + ps/prod/lmodules/gcc/10.2.0,GPG_TTY=/dev/pts/21, + LESS_ADVANCED_PREPROCESSOR=no,COLORTERM=1, + LMOD_FAMILY_CRAYPE_NETWORK=craype-network-ofi, + MACHTYPE=x86_64-suse-linux, + __LMOD_REF_COUNT_LD_LIBRARY_PATH=/opt/cray/lib64:1, + __LMOD_REF_COUNT_PKG_CONFIG_PATH=/opt/cray/lib64/pkgconfig:1, + LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_UCX_1_0_PREFIX=/apps/prod/lmodules/cce + /13.0.0:/apps/prod/lmodules/cce/12.0.3:/apps/prod/lmodules/cce/11.0.4, + tmp=/tmpfiles,SSH_AUTH_SOCK=/tmp/ssh-sLEbl3PUAYOZ/agent.543172, + _ModuleTable004_=U0lPTi9tb2R1bGVmaWxlcyIsIi91c3Ivc2hhcmUvbW9kdWxlcy9tb + 2R1bGVmaWxlcyIsIi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvTGludXgiLCIvdXNyL3NoYXJl + L21vZHVsZWZpbGVzL0NvcmUiLCIvdXNyL3NoYXJlL2xtb2QvbG1vZC9tb2R1bGVmaWxlcy9 + Db3JlIiwiL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY29yZSIsIi9vcHQvY3JheS + 9wZS9sbW9kL21vZHVsZWZpbGVzL2NyYXlwZS10YXJnZXRzL2RlZmF1bHQiLCIvYXBwcy9wc + m9kL2xtb2R1bGVzL3N5c19jb3JlIiwiL2FwcHMvb3BzL3Byb2QvbmNvL21vZHVsZWZpbGVz + L2NvcmUiLCIvYXBwcy9wcm9kL2xtb2R1bGVzL2NvcmUiLCIvb3B0L2NyYXkvbW9kdWxlZml + sZXMiLH0sWyJzeXN0ZW1CYXNlTVBBVEgi,MINICOM=-c on, + QT_SYSTEM_DIR=/usr/share/desktop-data,OSTYPE=linux, + meshname=rwps.oc_1500m_30km,USER=keston.smith, + MODULES_SET_SHELL_STARTUP=0,PAGER=less,MODULE_VERSION=3.2.10, + LMOD_CUSTOM_CNCM_GNU_8_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX=/a + pps/prod/lmodules/GCC_cray_mpich/10.2.0/cray-mpich/8.1.4, + LMOD_CUSTOM_CNCM_GNU_8_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX=/a + pps/prod/lmodules/GCC_cray_mpich/10.2.0/cray-mpich/8.1.4, + CRAY_CPU_TARGET=x86-rome, + LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PR + EFIX=/apps/prod/lmodules/CCE_cray_mpich/11.0.4/cray-mpich/8.1.4, + __LMOD_REF_COUNT_MODULEPATH=/opt/cray/pe/lmod/modulefiles/net/ofi/1.0: + 1;/opt/cray/pe/lmod/modulefiles/cpu/x86-rome/1.0:1;/usr/share/modules:1 + ;/usr/share/Modules/$MODULE_VERSION/modulefiles:1;/usr/share/modules/mo + dulefiles:1;/usr/share/modulefiles/Linux:1;/usr/share/modulefiles/Core: + 1;/usr/share/lmod/lmod/modulefiles/Core:1;/opt/cray/pe/lmod/modulefiles + /core:1;/opt/cray/pe/lmod/modulefiles/craype-targets/default:1;/apps/pr + od/lmodules/sys_core:1;/apps/ops/prod/nco/modulefiles/core:1;/apps/prod + /lmodules/core:1;/opt/cray/modulefiles:1, + COMINrrfs=/lfs/h1/ops/prod/com/rrfs/v1.0/rrfs./,MORE=-sl, + __LMOD_REF_COUNT_LOADEDMODULES=craype-x86-rome:1;libfabric/1.20.1:1;cr + aype-network-ofi:1;envvar/1.0:1, + PWD=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp + ute_interpolation_weights/sorc, + COMINrtofs=/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs./, + HOME=/u/keston.smith, + COMINnbm=/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.//grib2, + PELOCAL_PRGENV=true,SSH_AGENT_PID=543173,HOST=dlogin09, + SSH_CLIENT=192.58.153.7 55526 22,LMOD_VERSION=8.3.1, + XNLSPATH=/usr/share/X11/nls,CRAY_LMOD_CPU=x86-rome/1.0, + LMOD_FAMILY_CRAYPE_CPU_VERSION=false, + BASH_ENV=/usr/share/lmod/lmod/init/bash,XDG_DATA_DIRS=/usr/share, + LMOD_CUSTOM_CNCM_INTEL_19_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX + =/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/apps + /ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4, + CRAY_LMOD_NET=ofi/1.0, + RWPSroot=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev + /compute_interpolation_weights/sorc/../../../,COMINlocal=/tmpfiles, + __LMOD_REF_COUNT_LMOD_CUSTOM_COMPILER_INTEL_19_0_PREFIX=/apps/ops/prod + /nco/models/modulefiles:1;/apps/prod/lmodules/intel/19.1.3.304:1;/apps/ + ops/prod/libs/modulefiles/compiler/intel/19.1.3.304:1;/apps/ops/prod/nc + o/modulefiles/compiler/intel/19.1.3.304:1,LIBGL_DEBUG=quiet, + LMOD_CUSTOM_COMPILER_INTEL_19_0_PREFIX=/apps/ops/prod/nco/models/modul + efiles:/apps/prod/lmodules/intel/19.1.3.304:/apps/ops/prod/libs/modulef + iles/compiler/intel/19.1.3.304:/apps/ops/prod/nco/modulefiles/compiler/ + intel/19.1.3.304,PROFILEREAD=true,LMOD_sys=Linux, + _ModuleTable001_=X01vZHVsZVRhYmxlXz17WyJNVHZlcnNpb24iXT0zLFsiY19yZWJ1a + WxkVGltZSJdPWZhbHNlLFsiY19zaG9ydFRpbWUiXT1mYWxzZSxkZXB0aFQ9e30sZmFtaWx5 + PXtbImNyYXlwZV9jcHUiXT0iY3JheXBlLXg4Ni1yb21lIixbImNyYXlwZV9uZXR3b3JrIl0 + 9ImNyYXlwZS1uZXR3b3JrLW9maSIsfSxtVD17WyJjcmF5cGUtbmV0d29yay1vZmkiXT17Wy + JmbiJdPSIvb3B0L2NyYXkvcGUvbG1vZC9tb2R1bGVmaWxlcy9jcmF5cGUtdGFyZ2V0cy9kZ + WZhdWx0L2NyYXlwZS1uZXR3b3JrLW9maS5sdWEiLFsiZnVsbE5hbWUiXT0iY3JheXBlLW5l + dHdvcmstb2ZpIixbImxvYWRPcmRlciJdPTMscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MSx + bInN0YXR1cyJdPSJhY3RpdmUiLFsidXNl, + LOADEDMODULES=craype-x86-rome:libfabric/1.20.1:craype-network-ofi:envv + ar/1.0,LMOD_AVAIL_STYLE=en_grouped:system,CRAYPE_NETWORK_TARGET=ofi, + _ModuleTable006_=b2R1bGVmaWxlcyIsfQ==, + __LMOD_REF_COUNT_MANPATH=/opt/cray/share/man:1;/usr/share/lmod/lmod/sh + are/man:1;/usr/share/man:1;/opt/c3/man:1;/opt/pbs/share/man:1, + _ModuleTable003_=LFsic3RhdHVzIl09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJdPSJlbnZ2Y + XIvMS4wIix9LGxpYmZhYnJpYz17WyJmbiJdPSIvb3B0L2NyYXkvbW9kdWxlZmlsZXMvbGli + ZmFicmljLzEuMjAuMSIsWyJmdWxsTmFtZSJdPSJsaWJmYWJyaWMvMS4yMC4xIixbImxvYWR + PcmRlciJdPTIscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MixbInN0YXR1cyJdPSJhY3Rpdm + UiLFsidXNlck5hbWUiXT0ibGliZmFicmljIix9LH0sbXBhdGhBPXsiL29wdC9jcmF5L3BlL + 2xtb2QvbW9kdWxlZmlsZXMvbmV0L29maS8xLjAiLCIvb3B0L2NyYXkvcGUvbG1vZC9tb2R1 + bGVmaWxlcy9jcHUveDg2LXJvbWUvMS4wIiwiL3Vzci9zaGFyZS9tb2R1bGVzIiwiL3Vzci9 + zaGFyZS9Nb2R1bGVzLyRNT0RVTEVfVkVS,LMOD_ROOT=/usr/share/lmod, + SSH_TTY=/dev/pts/21,FROM_HEADER=,MAIL=/var/spool/mail/keston.smith, + COMINstofs=/lfs/h1/ops/prod/com/stofs/v3.1/stofs_2d_glo., + LESSKEY=/etc/lesskey.bin,TERM=xterm-256color,SHELL=/bin/bash, + LMOD_ADMIN_FILE=/apps/prod/lmodules/admin.list, + LMOD_CUSTOM_COMPILER_GNU_8_0_UCX_1_0_PREFIX=/apps/prod/lmodules/gcc/11 + .2.0:/apps/prod/lmodules/gcc/10.2.0,lmod_prefix_path=/usr/share, + LMOD_CUSTOM_COMPILER_CRAYCLANG_10_0_PREFIX=/apps/prod/lmodules/cce/13. + 0.0:/apps/prod/lmodules/cce/12.0.3:/apps/prod/lmodules/cce/11.0.4, + _ModuleTable_Sz_=6,LS_OPTIONS=-N --color=tty -T 0, + LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PR + EFIX=/apps/prod/lmodules/CCE_cray_mpich/11.0.4/cray-mpich/8.1.4, + TMOUT=1800,PYTHONSTARTUP=/etc/pythonstart, + RWPSfix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPS,SHLVL=3, + LANGUAGE=en_US.UTF-8,G_FILENAME_ENCODING=@locale\,UTF-8\,ISO-8859-15\, + CP1252, + LMOD_CUSTOM_COMPILER_INTEL_19_0_UCX_1_0_PREFIX=/apps/prod/lmodules/int + el/19.1.3.304:/apps/ops/prod/libs/modulefiles/compiler/intel/19.1.3.304 + :/apps/ops/prod/nco/modulefiles/compiler/intel/19.1.3.304, + HPC_OPT=/apps/ops/prod/libs, + MANPATH=/opt/cray/share/man:/usr/share/lmod/lmod/share/man:/usr/share/ + man:/opt/c3/man:/opt/pbs/share/man,OSCAR_HOME=/opt/oscar, + fix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp + ute_interpolation_weights/sorc/../../..//fix, + MODULEPATH=/opt/cray/pe/lmod/modulefiles/net/ofi/1.0:/opt/cray/pe/lmod + /modulefiles/cpu/x86-rome/1.0:/usr/share/modules:/usr/share/Modules/$MO + DULE_VERSION/modulefiles:/usr/share/modules/modulefiles:/usr/share/modu + lefiles/Linux:/usr/share/modulefiles/Core:/usr/share/lmod/lmod/modulefi + les/Core:/opt/cray/pe/lmod/modulefiles/core:/opt/cray/pe/lmod/modulefil + es/craype-targets/default:/apps/prod/lmodules/sys_core:/apps/ops/prod/n + co/modulefiles/core:/apps/prod/lmodules/core:/opt/cray/modulefiles, + LOGNAME=keston.smith,MODULE_VERSION_STACK=3.2.10, + MODULEPATH_ROOT=/usr/share/modulefiles, + LMOD_PACKAGE_PATH=/apps/prod/lmodules,XDG_CONFIG_DIRS=/etc/xdg, + PATH=/opt/cray/bin:/u/keston.smith/.local/bin:/usr/local/bin:/usr/bin: + /bin:/opt/c3/bin:/opt/pbs/bin:/sbin, + __LMOD_REF_COUNT_PE_PRODUCT_LIST=CRAYPE_X86_ROME:1, + _LMFILES_=/opt/cray/pe/lmod/modulefiles/craype-targets/default/craype- + x86-rome.lua:/opt/cray/modulefiles/libfabric/1.20.1:/opt/cray/pe/lmod/m + odulefiles/craype-targets/default/craype-network-ofi.lua:/apps/prod/lmo + dules/sys_core/envvar/1.0,MODULESHOME=/usr/share/lmod/lmod, + PKG_CONFIG_PATH=/opt/cray/lib64/pkgconfig, + LMOD_SETTARG_FULL_SUPPORT=no,INFOPATH=:/apps/docs/info, + G_BROKEN_FILENAMES=1,HISTSIZE=10000,LMOD_PKG=/usr/share/lmod/lmod, + CPU=x86_64, + _ModuleTable005_=XT0iL3Vzci9zaGFyZS9tb2R1bGVzOi91c3Ivc2hhcmUvTW9kdWxlc + y8kTU9EVUxFX1ZFUlNJT04vbW9kdWxlZmlsZXM6L3Vzci9zaGFyZS9tb2R1bGVzL21vZHVs + ZWZpbGVzOi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvTGludXg6L3Vzci9zaGFyZS9tb2R1bGV + maWxlcy9Db3JlOi91c3Ivc2hhcmUvbG1vZC9sbW9kL21vZHVsZWZpbGVzL0NvcmU6L29wdC + 9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY29yZTovb3B0L2NyYXkvcGUvbG1vZC9tb2R1b + GVmaWxlcy9jcmF5cGUtdGFyZ2V0cy9kZWZhdWx0Oi9hcHBzL3Byb2QvbG1vZHVsZXMvc3lz + X2NvcmU6L2FwcHMvb3BzL3Byb2QvbmNvL21vZHVsZWZpbGVzL2NvcmU6L2FwcHMvcHJvZC9 + sbW9kdWxlcy9jb3JlOi9vcHQvY3JheS9t, + LMOD_CMD=/usr/share/lmod/lmod/libexec/lmod,CVS_RSH=ssh, + LESSOPEN=lessopen.sh %s,LMOD_DIR=/usr/share/lmod/lmod/libexec, + LC_TIME=C.UTF-8, + BASH_FUNC_module%%=() { eval $($LMOD_CMD bash \"$@\") && eval $(${LMO + D_SETTARG_CMD:-:} -s sh) + euser = keston.smith + egroup = emc + hashname = 136825597.dbqs01 + queue_rank = 1787582743134363 + queue_type = E + comment = Job run at Mon Aug 24 at 14:45 on (nid001957:ncpus=16:mem=2684354 + 56kb) + etime = Mon Aug 24 14:45:43 2026 + umask = 22 + run_count = 6 + eligible_time = 00:00:08 + accrue_type = 3 + Submit_arguments = -V /lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/ + RWPS/dev/compute_interpolation_weights/sorc/../../..//dev/compute_inter + polation_weights/ecf/compute_interpolation_weights.ecf + project = NWPS-DEV + run_version = 1 + Submit_Host = dlogin09.dogwood.wcoss2.ncep.noaa.gov + server_instance_id = dbqs01.dogwood.wcoss2.ncep.noaa.gov:15001 + + +------------------------------------------------------------------ +Job 136825597.dbqs01 - PBS tracejob output (for parent mom node only): + +Job: 136825597.dbqs01 + +08/24/2026 14:45:45 M update_job_usage: CPU usage: 0.000 secs +08/24/2026 14:45:45 M update_job_usage: cpupercent initialized to zero +08/24/2026 14:45:45 M update_job_usage: Memory usage: mem=0b +08/24/2026 14:45:49 M Started, pid = 2038059 +08/24/2026 14:46:07 M update_job_usage: CPU usage: 16.000 secs +08/24/2026 14:46:07 M update_job_usage: 136825597.dbqs01 measured interval cpupercent 74 increased job cpupercent to 74 +08/24/2026 14:46:07 M update_job_usage: Memory usage: mem=659248kb +08/24/2026 14:48:08 M update_job_usage: CPU usage: 150.000 secs +08/24/2026 14:48:08 M update_job_usage: 136825597.dbqs01 measured interval cpupercent 111 increased job cpupercent to 111 +08/24/2026 14:48:08 M update_job_usage: Memory usage: mem=2628252kb +08/24/2026 14:50:09 M update_job_usage: CPU usage: 277.000 secs +08/24/2026 14:50:09 M update_job_usage: Memory usage: mem=5532752kb +08/24/2026 14:52:10 M update_job_usage: CPU usage: 398.000 secs +08/24/2026 14:52:10 M update_job_usage: Memory usage: mem=11584280kb +08/24/2026 14:54:11 M update_job_usage: CPU usage: 522.000 secs +08/24/2026 14:56:13 M update_job_usage: CPU usage: 644.000 secs +08/24/2026 14:58:14 M update_job_usage: CPU usage: 726.000 secs +08/24/2026 15:00:15 M update_job_usage: CPU usage: 726.000 secs +08/24/2026 15:02:16 M update_job_usage: CPU usage: 726.000 secs +08/24/2026 15:04:17 M update_job_usage: CPU usage: 726.000 secs +08/24/2026 15:06:18 M update_job_usage: CPU usage: 726.000 secs +08/24/2026 15:08:19 M update_job_usage: CPU usage: 726.000 secs +08/24/2026 15:10:21 M update_job_usage: CPU usage: 726.000 secs +08/24/2026 15:12:22 M update_job_usage: CPU usage: 746.000 secs +08/24/2026 15:14:23 M update_job_usage: CPU usage: 746.000 secs +08/24/2026 15:16:24 M update_job_usage: CPU usage: 746.000 secs +08/24/2026 15:18:25 M update_job_usage: CPU usage: 746.000 secs +08/24/2026 15:20:26 M update_job_usage: CPU usage: 746.000 secs +08/24/2026 15:22:27 M update_job_usage: CPU usage: 746.000 secs +08/24/2026 15:24:29 M update_job_usage: CPU usage: 746.000 secs +08/24/2026 15:26:30 M update_job_usage: CPU usage: 746.000 secs +08/24/2026 15:27:06 M task 00000001 terminated +08/24/2026 15:27:06 M Terminated +08/24/2026 15:27:06 M task 00000001 cput=00:12:44 +08/24/2026 15:27:06 M kill_job +08/24/2026 15:27:06 M nid001957 cput=00:12:26 mem=13248244kb +08/24/2026 15:27:06 M update_job_usage: CPU usage: 761.000 secs +08/24/2026 15:27:06 M update_job_usage: Memory usage: mem=13248244kb + +------------------------------------------------------------------ +To see full PBS log data, run: /sfs/admin/scripts/tracejob.sh 136825597.dbqs01 + +================================================================== +END - DEBUG INFO +================================================================== + +Job 136825597.dbqs01 - Epilogue DEBUG complete. DEBUG Execution time: 5 seconds +Job 136825597.dbqs01 - Epilogue complete. Execution time: 9 seconds +##### Job 136825597.dbqs01 - PBS Job Script: +(Note: Duplicate #PBS entries are a function how PBS interprets and caches the original job script.) + +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=04:00:00 +##PBS -l select=1:ncpus=8:mem=128GB +#PBS -l select=1:ncpus=16:mem=256GB +##PBS -l select=1:ncpus=32:mem=256GB +###PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + +pip list -v + +cd $RWPSroot/ush/preprocess + +SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" +date="20260730" +cycl="00" +Nprocs=16 + + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +rrfs_hi=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.hi.nc +rrfs_pr=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.pr.nc +rrfs_ak=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.ak.nc +rrfs_na=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.na.nc +rrfs_conus=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.conus.nc + +out="../../fix" + +rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" +rrfsDst="$out/DistToBndy.$meshname.rrfs" + +#no extrapolation with rrfs forecasts +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_pr $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 > GenWhts.rrfs.pr.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_ak $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 > GenWhts.rrfs.ak.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_na $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 > GenWhts.rrfs.na.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_conus $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out + +nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc +nbmIntrp="$out/InterpolationWeights.$meshname.nbm" +nbmDst="$out/DistToBndy.$meshname.nbm" +#extrapolate nbm oc wind to all points +python ./compute_gridded_to_rwps_interp_weights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out + +nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc +#do not extrapolate for NBM .ak. domain +python ./compute_gridded_to_rwps_interp_weights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out + +rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc +rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" +rtofsDst="$out/DistToBndy.$meshname.rtofs" + +#extrapolate rtofs .glo. for full ice coverage + +python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out + + +rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc +#do not extrapolate rtofs .glo. currents +python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.current.nc $rtofsDst.current.nc -1 > GenWhts.rtofs.current.out + + + +#Old v2 of stofs +stofs_glo="$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" + +mkdir -p STOFSInterpWeights.$meshname +## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs + +## Now run parallel job script + +qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS + +wait + +#combine text file output of parallel jobs +cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt + +# convert output weights to netcdf file +python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 +cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.v2.nc +cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.v2.nc +mv DistToBndy.$meshname.stofs.nc DistToBndy.$meshname.stofs.v2.nc +mv InterpWeights.$meshname.stofs.nc InterpWeights.$meshname.stofs.v2.nc + +rm -rf STOFSInterpWeights.$meshname +rm InterpWeights.$meshname.stofs.txt +rm *.out +rm ESMPy* + + +mkdir -p STOFSInterpWeights.$meshname +#compute stofs weights for current(v3) stofs mesh +stofs_glo="$SID/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc" + +## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs + +## Now run parallel job script + +qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS + +wait + +#combine text file output of parallel jobs +cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt + +# convert output weights to netcdf file +python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 +cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc +cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc + + +rm -rf STOFSInterpWeights.$meshname +rm InterpWeights.$meshname.stofs.txt +rm *.out +rm ESMPy* + + + + +##### End of job script +------------------------------------------------------------------ + diff --git a/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136832289 b/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136832289 new file mode 100644 index 0000000..e1294b1 --- /dev/null +++ b/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136832289 @@ -0,0 +1,986 @@ +PBS: Running prologue on parent mom node: nid001042... +Job 136832289.dbqs01 nodelist: nid001042 +Job 136832289.dbqs01 - Prologue complete. Execution time: 4 seconds +Agent pid 2647705 +Identity added: /u/keston.smith/.ssh/id_ed25519 (keston.smith@noaa.gov) +/u/keston.smith/.bashrc: line 46: alias: eval "$(ssh-agent -s)"; ssh-add ~/.ssh/id_ed25519: not found +Resetting modules to system default. Reseting $MODULEPATH back to system default. All extra directories will be removed from $MODULEPATH. +Package Version Location Installer +------------------------- ----------- ---------------------------------------------------------------------------------- --------- +Cartopy 0.24.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +certifi 2025.1.31 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +cftime 1.6.4.post1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +contourpy 1.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +cycler 0.12.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +esmpy 8.6.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +fonttools 4.55.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +geographiclib 2.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +geopy 2.4.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +Jinja2 3.1.5 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +kiwisolver 1.4.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +MarkupSafe 3.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +matplotlib 3.10.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +netCDF4 1.7.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +numpy 2.2.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +packaging 24.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pandas 2.2.3 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pillow 11.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pip 25.0.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pyparsing 3.2.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pyproj 3.7.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pyshp 2.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +python-dateutil 2.9.0.post0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pytz 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +PyYAML 6.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +scipy 1.15.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +setuptools 75.8.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +setuptools-git-versioning 2.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +shapely 2.0.7 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +six 1.17.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +tzdata 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +xarray 2025.1.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in + with xr.open_dataset(weights_file, overwrite=True) as ds_s: + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset + backend_ds = backend.open_dataset( + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in + with xr.open_dataset(weights_file, overwrite=True) as ds_s: + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset + backend_ds = backend.open_dataset( + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in + with xr.open_dataset(weights_file, overwrite=True) as ds_s: + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset + backend_ds = backend.open_dataset( + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in + with xr.open_dataset(weights_file, overwrite=True) as ds_s: + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset + backend_ds = backend.open_dataset( + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in + with xr.open_dataset(weights_file, overwrite=True) as ds_s: + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset + backend_ds = backend.open_dataset( + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in + with xr.open_dataset(weights_file, overwrite=True) as ds_s: + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset + backend_ds = backend.open_dataset( + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in + with xr.open_dataset(weights_file, overwrite=True) as ds_s: + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset + backend_ds = backend.open_dataset( + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in + with xr.open_dataset(weights_file, overwrite=True) as ds_s: + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset + backend_ds = backend.open_dataset( + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in + with xr.open_dataset(weights_file, overwrite=True) as ds_s: + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset + backend_ds = backend.open_dataset( + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' +directory STOFSInterpWeights.rwps.oc_500m_10km is alread empty +Made parallel jobcards to create interpolation weights with 16 processes. Next step: +sbatch jobcardcompute_unstr_to_rwps_interp_weightsSLURM +136837224[].dbqs01 +Job submit error: 2. +mesh file=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/sorc/../../..//fix/rwps.oc_500m_10km.msh +nn = 5294967 +number of nodes read: 5294967 +ne=10377117 -includes boundary nodes +number of open boundary nodes read: 3495 +number of elements read: 10373622 +n=12906555 +n_s=12906555 +directory STOFSInterpWeights.rwps.oc_500m_10km is alread empty +Made parallel jobcards to create interpolation weights with 16 processes. Next step: +sbatch jobcardcompute_unstr_to_rwps_interp_weightsSLURM +136844289[].dbqs01 +Job submit error: 2. +mesh file=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/sorc/../../..//fix/rwps.oc_500m_10km.msh +nn = 5294967 +number of nodes read: 5294967 +ne=10377117 -includes boundary nodes +number of open boundary nodes read: 3495 +number of elements read: 10373622 +n=12906555 +n_s=12906555 +PBS: Running epilogue on parent mom node: nid001042... +================================================================== +BEGIN - DEBUG INFO +================================================================== +Job 136832289.dbqs01 - Post Job Mem Usage: +nid001042: 2026-08-24.40 1 =========================================== +nid001042: 2026-08-24.40 2 #### Node Memory Usage for nid001042 #### +nid001042: 2026-08-24.40 3 ------------------ +nid001042: 2026-08-24.40 4 Mem: total:526983536 used:16816232 free:511230964 shared:900020 cache:1536804 avail:510167304 +nid001042: 2026-08-24.40 5 4.0K /dev/shm +nid001042: 2026-08-24.40 6 40K /tmp +nid001042: 2026-08-24.40 7 =========================================== +nid001042: 2026-08-24.03 1 =========================================== +nid001042: 2026-08-24.03 2 #### Node Memory Usage for nid001042 #### +nid001042: 2026-08-24.03 3 ------------------ +nid001042: 2026-08-24.03 4 Mem: total:526983536 used:17629088 free:508266984 shared:899528 cache:4235000 avail:509354448 +nid001042: 2026-08-24.03 5 4.0K /dev/shm +nid001042: 2026-08-24.03 6 40K /tmp +nid001042: 2026-08-24.03 7 =========================================== + +------------------------------------------------------------------ +------------------------------------------------------------------ +Job 136832289.dbqs01 - Post Job Mem Usage Profile: +2026-08-24A--:--:--.------+--:-- nid001042 #### nid001042 - Job 136832289.dbqs01 NUMA Node Memory Allocation and Fragmentation Reports +Starting Fragmentation Report for nid001042 +Node Order9 Order10 Score MB_Free %Free State +0 5278 43 5364 10728 16 FRAG +1 8860 3060 14980 29960 46 MARG +2 6872 6314 19500 39000 60 OK +3 4519 9526 23571 47142 73 OK +4 7032 7099 21230 42460 65 OK +5 2688 12224 27136 54272 84 OK +6 1777 13436 28649 57298 88 OK +7 1707 12965 27637 55274 85 OK + +** nid001042 : node0_score=5364 node0_state=FRAG uptime=4584444s Overall=FRAG ** +Ending Fragmentation Report for nid001042 +Node Order9 Order10 Score MB_Free %Free State +0 5273 44 5361 10722 16 FRAG +1 8856 3062 14980 29960 46 MARG +2 6835 6316 19467 38934 60 OK +3 4523 9526 23575 47150 73 OK +4 7026 7121 21268 42536 65 OK +5 2689 12227 27143 54286 84 OK +6 1778 13436 28650 57300 88 OK +7 1701 12966 27633 55266 85 OK + +** nid001042 : node0_score=5361 node0_state=FRAG uptime=4593946s Overall=FRAG ** +2026-08-24A--:--:--.------+--:-- nid001042 #### nid001042 - Job 136832289.dbqs01 VMSTATS Memory Report +**Only Printing Significant Findings - TEST CODE - Results are NOT positive indication of a problem. ** +nid001042 [!] Inactive file cache ballooned: 653698 (threshold: 100000) +nid001042 [!] Write-pending pages high at end: 100771 (threshold: 100000) + +------------------------------------------------------------------ +Job 136832289.dbqs01 - /var/log/messages for job duration: +2026-08-24A--:--:--.------+--:-- nid001042 #### nid001042 - Job 136832289.dbqs01 Runtime Data from /var/log/messages +nid001042: nid001042 #### nid001042 - Job 136832289.dbqs01 Runtime Data from /var/log/messages +nid001042: 2026-08-24T15:35:40.214817+00:00 nid001042 prologue: MARK: Job 136832289.dbqs01 Start +nid001042: 2026-08-24T15:35:40.226527+00:00 nid001042 prologue: Job 136832289.dbqs01 nodelist: nid001042 +nid001042: 2026-08-24T15:35:40.228418+00:00 nid001042 prologue: Job 136832289.dbqs01 - Recording pre-execution stats and counters... +nid001042: 2026-08-24T15:35:40.264253+00:00 nid001042 prologue: Job 136832289.dbqs01 - Killing any stray user processes... +nid001042: 2026-08-24T15:35:40.347275+00:00 nid001042 prologue: Job 136832289.dbqs01 - Clearing /tmp... +nid001042: 2026-08-24T15:35:40.364219+00:00 nid001042 prologue: Job 136832289.dbqs01 - Verifying key post-boot workarounds with warchk... +nid001042: 2026-08-24T15:35:40.396869+00:00 nid001042 WARCHK: root : /sfs/admin/scripts/warchk --batch +nid001042: 2026-08-24T15:35:40.618983+00:00 nid001042 prologue: Job 136832289.dbqs01 - Recording pre-job memory usage... +nid001042: 2026-08-24T15:35:40.710005+00:00 nid001042 prologue: Job 136832289.dbqs01 - FRAG_STATE: ** nid001042 : node0_score=5364 node0_state=FRAG uptime=4584444s Overall=FRAG ** +nid001042: 2026-08-24T15:35:40.711202+00:00 nid001042 prologue: Job 136832289.dbqs01 - Recording pre-job HSN counters... +nid001042: 2026-08-24T15:35:40.842747+00:00 nid001042 prologue: Job 136832289.dbqs01 - Recording pre-job Lustre counters... +nid001042: 2026-08-24T15:35:41.877738+00:00 nid001042 prologue: Job 136832289.dbqs01 - Recording initial NFS client statistics... +nid001042: 2026-08-24T15:35:41.888206+00:00 nid001042 prologue: Job 136832289.dbqs01 - Saving a copy of the job script... +nid001042: 2026-08-24T15:35:41.895778+00:00 nid001042 prologue: Job 136832289.dbqs01 - Checking existing ASLR settings... +nid001042: 2026-08-24T15:35:41.901454+00:00 nid001042 prologue: Job 136832289.dbqs01 - Checking palsd open file count... +nid001042: 2026-08-24T15:35:42.003572+00:00 nid001042 PBS_CMD: root : /opt/pbs/bin/qstat -Bf +nid001042: 2026-08-24T15:35:43.055156+00:00 nid001042 prologue: Job 136832289.dbqs01 - Checking one-shot enabled: False +nid001042: 2026-08-24T15:35:43.056332+00:00 nid001042 prologue: Job 136832289.dbqs01 - Enabling turboboost... +nid001042: 2026-08-24T15:35:43.059174+00:00 nid001042 prologue: Job 136832289.dbqs01 - Checking warchk results... +nid001042: 2026-08-24T15:35:43.062261+00:00 nid001042 prologue: Job 136832289.dbqs01 - Warchk Complete +nid001042: 2026-08-24T15:35:43.064945+00:00 nid001042 prologue: Job 136832289.dbqs01 - Prologue complete. Execution time: 4 seconds +nid001042: 2026-08-24T15:38:37.396313+00:00 nid001042 kernel: [4584366.482195][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.126.115@o2ib: 1 seconds +nid001042: 2026-08-24T15:38:37.396329+00:00 nid001042 kernel: [4584366.503523][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 9 previous similar messages +nid001042: 2026-08-24T15:39:32.550877+00:00 nid001042 kernel: [4584421.647352][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: 2026-08-24T15:40:48.675189+00:00 nid001042 nscd: 5098 monitored file `/etc/passwd` was moved into place, adding watch +nid001042: 2026-08-24T15:40:48.699399+00:00 nid001042 check_and_pull_files.sh[2650178]: e9709a469275dbf82af8282d38161f470ddb6ed6 passwd +nid001042: 2026-08-24T15:40:48.699457+00:00 nid001042 check_and_pull_files.sh[2650178]: 56e7ca4365d1df56eff59df9f92c865c78ad544f group +nid001042: 2026-08-24T15:40:48.700013+00:00 nid001042 check_and_pull_files.sh[2650178]: ffc2ad9f7d4fc4d6fda47e210b99977f3b56a452 hosts +nid001042: 2026-08-24T15:40:48.703027+00:00 nid001042 check_and_pull_files.sh[2650178]: 9fb9ff4c9c2c2dded1625b4e009ff6a631716f5d shadow +nid001042: 2026-08-24T15:40:48.705542+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. +nid001042: 2026-08-24T15:44:32.610241+00:00 nid001042 kernel: [4584721.694163][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib +nid001042: 2026-08-24T15:45:02.690946+00:00 nid001042 systemd[1]: session-9925.scope: Deactivated successfully. +nid001042: 2026-08-24T15:49:32.642241+00:00 nid001042 kernel: [4585021.709190][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: 2026-08-24T15:52:02.661973+00:00 nid001042 nscd: 5098 monitored file `/etc/group` was moved into place, adding watch +nid001042: 2026-08-24T15:52:02.675184+00:00 nid001042 check_and_pull_files.sh[2650489]: e9709a469275dbf82af8282d38161f470ddb6ed6 passwd +nid001042: 2026-08-24T15:52:02.675228+00:00 nid001042 check_and_pull_files.sh[2650489]: f72b35bfcb2800b4dd6cfff175e7c35c1ed60978 group +nid001042: 2026-08-24T15:52:02.675750+00:00 nid001042 check_and_pull_files.sh[2650489]: ffc2ad9f7d4fc4d6fda47e210b99977f3b56a452 hosts +nid001042: 2026-08-24T15:52:02.678042+00:00 nid001042 check_and_pull_files.sh[2650489]: 9fb9ff4c9c2c2dded1625b4e009ff6a631716f5d shadow +nid001042: 2026-08-24T15:52:02.680976+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. +nid001042: 2026-08-24T15:54:32.674242+00:00 nid001042 kernel: [4585321.724114][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: 2026-08-24T15:55:22.389070+00:00 nid001042 kernel: [4585371.417306][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds +nid001042: 2026-08-24T15:55:22.389081+00:00 nid001042 kernel: [4585371.439811][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 3 previous similar messages +nid001042: 2026-08-24T15:59:32.706245+00:00 nid001042 kernel: [4585621.739081][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib +nid001042: 2026-08-24T16:00:22.620099+00:00 nid001042 systemd[1]: Started Timeline of Snapper Snapshots. +nid001042: 2026-08-24T16:00:22.674119+00:00 nid001042 dbus-daemon[4956]: [system] Activating via systemd: service name='org.opensuse.Snapper' unit='snapperd.service' requested by ':1.22529' (uid=0 pid=2650618 comm="/usr/lib/snapper/systemd-helper --timeline ") +nid001042: 2026-08-24T16:00:22.677879+00:00 nid001042 systemd[1]: Starting DBus interface for snapper... +nid001042: 2026-08-24T16:00:22.690123+00:00 nid001042 dbus-daemon[4956]: [system] Successfully activated service 'org.opensuse.Snapper' +nid001042: 2026-08-24T16:00:22.690365+00:00 nid001042 systemd[1]: Started DBus interface for snapper. +nid001042: 2026-08-24T16:00:22.693341+00:00 nid001042 systemd[1]: snapper-timeline.service: Deactivated successfully. +nid001042: 2026-08-24T16:01:22.755670+00:00 nid001042 systemd[1]: snapperd.service: Deactivated successfully. +nid001042: 2026-08-24T16:03:16.617710+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. +nid001042: 2026-08-24T16:04:32.738240+00:00 nid001042 kernel: [4585921.754107][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: 2026-08-24T16:06:45.672545+00:00 nid001042 chronyd[4107266]: Source 67.217.246.204 replaced with 108.59.2.24 (2.suse.pool.ntp.org) +nid001042: 2026-08-24T16:08:35.829999+00:00 nid001042 PBS_CMD: keston.smith : /opt/pbs/bin/qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS +nid001042: 2026-08-24T16:09:32.770243+00:00 nid001042 kernel: [4586221.769104][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: 2026-08-24T16:10:21.399389+00:00 nid001042 kernel: [4586270.374271][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 0 seconds +nid001042: 2026-08-24T16:10:21.399399+00:00 nid001042 kernel: [4586270.397495][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages +nid001042: 2026-08-24T16:11:02.638265+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. +nid001042: 2026-08-24T16:14:32.802242+00:00 nid001042 kernel: [4586521.784031][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib +nid001042: 2026-08-24T16:15:03.138335+00:00 nid001042 systemd[1]: session-9926.scope: Deactivated successfully. +nid001042: 2026-08-24T16:19:32.834243+00:00 nid001042 kernel: [4586821.798994][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: 2026-08-24T16:20:11.637241+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. +nid001042: 2026-08-24T16:24:32.866242+00:00 nid001042 kernel: [4587121.813966][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: 2026-08-24T16:25:22.387443+00:00 nid001042 kernel: [4587171.315132][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds +nid001042: 2026-08-24T16:25:22.387452+00:00 nid001042 kernel: [4587171.336625][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages +nid001042: 2026-08-24T16:29:32.898243+00:00 nid001042 kernel: [4587421.828867][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib +nid001042: 2026-08-24T16:34:32.930242+00:00 nid001042 kernel: [4587721.843735][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: 2026-08-24T16:34:57.636732+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. +nid001042: 2026-08-24T16:39:32.962247+00:00 nid001042 kernel: [4588021.858757][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: 2026-08-24T16:40:02.638649+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. +nid001042: 2026-08-24T16:40:23.381192+00:00 nid001042 kernel: [4588072.255893][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 2 seconds +nid001042: 2026-08-24T16:40:23.381209+00:00 nid001042 kernel: [4588072.278357][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages +nid001042: 2026-08-24T16:43:18.670632+00:00 nid001042 chronyd[4107266]: Source 204.2.134.172 replaced with 149.248.12.167 (2.suse.pool.ntp.org) +nid001042: 2026-08-24T16:44:32.998245+00:00 nid001042 kernel: [4588321.873729][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib +nid001042: 2026-08-24T16:45:02.634331+00:00 nid001042 systemd[1]: session-9927.scope: Deactivated successfully. +nid001042: 2026-08-24T16:49:32.034250+00:00 nid001042 kernel: [4588620.896639][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: 2026-08-24T16:52:48.638781+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. +nid001042: 2026-08-24T16:54:32.066244+00:00 nid001042 kernel: [4588920.911721][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: 2026-08-24T16:55:21.398525+00:00 nid001042 kernel: [4588970.220842][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 0 seconds +nid001042: 2026-08-24T16:55:21.398544+00:00 nid001042 kernel: [4588970.244575][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages +nid001042: 2026-08-24T16:59:32.098246+00:00 nid001042 kernel: [4589220.926654][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib +nid001042: 2026-08-24T17:00:12.622974+00:00 nid001042 systemd[1]: Started Timeline of Snapper Snapshots. +nid001042: 2026-08-24T17:00:12.629463+00:00 nid001042 dbus-daemon[4956]: [system] Activating via systemd: service name='org.opensuse.Snapper' unit='snapperd.service' requested by ':1.22535' (uid=0 pid=2651313 comm="/usr/lib/snapper/systemd-helper --timeline ") +nid001042: 2026-08-24T17:00:12.632624+00:00 nid001042 systemd[1]: Starting DBus interface for snapper... +nid001042: 2026-08-24T17:00:12.637595+00:00 nid001042 dbus-daemon[4956]: [system] Successfully activated service 'org.opensuse.Snapper' +nid001042: 2026-08-24T17:00:12.637773+00:00 nid001042 systemd[1]: Started DBus interface for snapper. +nid001042: 2026-08-24T17:00:12.639267+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. +nid001042: 2026-08-24T17:00:12.640096+00:00 nid001042 systemd[1]: snapper-timeline.service: Deactivated successfully. +nid001042: 2026-08-24T17:01:12.702038+00:00 nid001042 systemd[1]: snapperd.service: Deactivated successfully. +nid001042: 2026-08-24T17:04:32.130250+00:00 nid001042 kernel: [4589520.941750][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: 2026-08-24T17:09:32.162249+00:00 nid001042 kernel: [4589820.956749][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: 2026-08-24T17:10:13.071555+00:00 nid001042 PBS_CMD: WARNING: /opt/pbs/bin/qsub.exe failed for keston.smith: 2 - Generic +nid001042: 2026-08-24T17:10:22.387419+00:00 nid001042 kernel: [4589871.161904][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds +nid001042: 2026-08-24T17:10:22.387437+00:00 nid001042 kernel: [4589871.184117][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages +nid001042: 2026-08-24T17:11:21.623079+00:00 nid001042 PBS_CMD: keston.smith : /opt/pbs/bin/qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS +nid001042: 2026-08-24T17:12:42.637275+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. +nid001042: 2026-08-24T17:14:32.194246+00:00 nid001042 kernel: [4590120.971720][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib +nid001042: 2026-08-24T17:15:02.602894+00:00 nid001042 systemd[1]: session-9928.scope: Deactivated successfully. +nid001042: 2026-08-24T17:18:07.896349+00:00 nid001042 chronyd[4107266]: Source 216.229.4.69 replaced with 198.60.22.240 (2.suse.pool.ntp.org) +nid001042: 2026-08-24T17:19:32.226242+00:00 nid001042 kernel: [4590420.986759][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: 2026-08-24T17:21:00.638623+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. +nid001042: 2026-08-24T17:24:32.258244+00:00 nid001042 kernel: [4590721.001893][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: 2026-08-24T17:25:21.399112+00:00 nid001042 kernel: [4590770.119057][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 0 seconds +nid001042: 2026-08-24T17:25:21.399129+00:00 nid001042 kernel: [4590770.141458][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages +nid001042: 2026-08-24T17:29:32.290244+00:00 nid001042 kernel: [4591021.016884][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib +nid001042: 2026-08-24T17:34:08.637524+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. +nid001042: 2026-08-24T17:34:32.326245+00:00 nid001042 kernel: [4591321.031919][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: 2026-08-24T17:39:32.386250+00:00 nid001042 kernel: [4591621.078910][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: 2026-08-24T17:40:22.388771+00:00 nid001042 kernel: [4591671.060139][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 2 seconds +nid001042: 2026-08-24T17:40:22.388789+00:00 nid001042 kernel: [4591671.081455][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages +nid001042: 2026-08-24T17:44:02.638058+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. +nid001042: 2026-08-24T17:44:32.422249+00:00 nid001042 kernel: [4591921.094022][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib +nid001042: 2026-08-24T17:45:02.816628+00:00 nid001042 systemd[1]: session-9929.scope: Deactivated successfully. +nid001042: 2026-08-24T17:49:32.482243+00:00 nid001042 kernel: [4592221.140904][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: 2026-08-24T17:53:32.637843+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. +nid001042: 2026-08-24T17:54:16.713980+00:00 nid001042 chronyd[4107266]: Source 172.234.25.10 replaced with 69.64.225.2 (2.suse.pool.ntp.org) +nid001042: 2026-08-24T17:54:32.518245+00:00 nid001042 kernel: [4592521.155988][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: 2026-08-24T17:55:21.398785+00:00 nid001042 kernel: [4592570.017138][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 0 seconds +nid001042: 2026-08-24T17:55:21.398803+00:00 nid001042 kernel: [4592570.041169][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages +nid001042: 2026-08-24T17:59:32.578244+00:00 nid001042 kernel: [4592821.203033][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib +nid001042: 2026-08-24T18:00:22.619987+00:00 nid001042 systemd[1]: Started Timeline of Snapper Snapshots. +nid001042: 2026-08-24T18:00:22.625527+00:00 nid001042 dbus-daemon[4956]: [system] Activating via systemd: service name='org.opensuse.Snapper' unit='snapperd.service' requested by ':1.22541' (uid=0 pid=2652011 comm="/usr/lib/snapper/systemd-helper --timeline ") +nid001042: 2026-08-24T18:00:22.628658+00:00 nid001042 systemd[1]: Starting DBus interface for snapper... +nid001042: 2026-08-24T18:00:22.632472+00:00 nid001042 dbus-daemon[4956]: [system] Successfully activated service 'org.opensuse.Snapper' +nid001042: 2026-08-24T18:00:22.632704+00:00 nid001042 systemd[1]: Started DBus interface for snapper. +nid001042: 2026-08-24T18:00:22.634763+00:00 nid001042 systemd[1]: snapper-timeline.service: Deactivated successfully. +nid001042: 2026-08-24T18:00:32.636187+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. +nid001042: 2026-08-24T18:01:22.697004+00:00 nid001042 systemd[1]: snapperd.service: Deactivated successfully. +nid001042: 2026-08-24T18:04:32.614250+00:00 nid001042 kernel: [4593121.218123][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: 2026-08-24T18:09:32.674246+00:00 nid001042 kernel: [4593421.265092][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: 2026-08-24T18:10:22.388781+00:00 nid001042 kernel: [4593470.958302][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds +nid001042: 2026-08-24T18:10:22.388799+00:00 nid001042 kernel: [4593470.981403][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages +nid001042: 2026-08-24T18:12:57.221209+00:00 nid001042 PBS_CMD: WARNING: /opt/pbs/bin/qsub.exe failed for keston.smith: 2 - Generic +nid001042: 2026-08-24T18:13:12.636859+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. +nid001042: 2026-08-24T18:14:02.880906+00:00 nid001042 epilogue: Job 136832289.dbqs01 complete, running post-job actions. +nid001042: 2026-08-24T18:14:02.904813+00:00 nid001042 epilogue: MARK: Job 136832289.dbqs01 Complete. + +------------------------------------------------------------------ +Job 136832289.dbqs01 - dmesg output for job duration: +2026-08-24A--:--:--.------+--:-- nid001042 #### nid001042 - Job 136832289.dbqs01 Runtime Data from dmesg +nid001042: nid001042 #### nid001042 - Job 136832289.dbqs01 Runtime Data from dmesg +nid001042: [Mon Aug 24 15:31:25 2026] MARK: Job 136832289.dbqs01 Start +nid001042: [Mon Aug 24 15:34:22 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.126.115@o2ib: 1 seconds +nid001042: [Mon Aug 24 15:34:22 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 9 previous similar messages +nid001042: [Mon Aug 24 15:35:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: [Mon Aug 24 15:40:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib +nid001042: [Mon Aug 24 15:45:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: [Mon Aug 24 15:50:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: [Mon Aug 24 15:51:07 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds +nid001042: [Mon Aug 24 15:51:07 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 3 previous similar messages +nid001042: [Mon Aug 24 15:55:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib +nid001042: [Mon Aug 24 16:00:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: [Mon Aug 24 16:05:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: [Mon Aug 24 16:06:06 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 0 seconds +nid001042: [Mon Aug 24 16:06:06 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages +nid001042: [Mon Aug 24 16:10:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib +nid001042: [Mon Aug 24 16:15:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: [Mon Aug 24 16:20:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: [Mon Aug 24 16:21:07 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds +nid001042: [Mon Aug 24 16:21:07 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages +nid001042: [Mon Aug 24 16:25:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib +nid001042: [Mon Aug 24 16:30:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: [Mon Aug 24 16:35:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: [Mon Aug 24 16:36:08 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 2 seconds +nid001042: [Mon Aug 24 16:36:08 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages +nid001042: [Mon Aug 24 16:40:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib +nid001042: [Mon Aug 24 16:45:16 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: [Mon Aug 24 16:50:16 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: [Mon Aug 24 16:51:06 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 0 seconds +nid001042: [Mon Aug 24 16:51:06 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages +nid001042: [Mon Aug 24 16:55:16 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib +nid001042: [Mon Aug 24 17:00:16 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: [Mon Aug 24 17:05:16 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: [Mon Aug 24 17:06:07 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds +nid001042: [Mon Aug 24 17:06:07 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages +nid001042: [Mon Aug 24 17:10:16 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib +nid001042: [Mon Aug 24 17:15:16 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: [Mon Aug 24 17:20:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: [Mon Aug 24 17:21:06 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 0 seconds +nid001042: [Mon Aug 24 17:21:06 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages +nid001042: [Mon Aug 24 17:25:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib +nid001042: [Mon Aug 24 17:30:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: [Mon Aug 24 17:35:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: [Mon Aug 24 17:36:07 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 2 seconds +nid001042: [Mon Aug 24 17:36:07 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages +nid001042: [Mon Aug 24 17:40:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib +nid001042: [Mon Aug 24 17:45:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: [Mon Aug 24 17:50:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: [Mon Aug 24 17:51:06 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 0 seconds +nid001042: [Mon Aug 24 17:51:06 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages +nid001042: [Mon Aug 24 17:55:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib +nid001042: [Mon Aug 24 18:00:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: [Mon Aug 24 18:05:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid001042: [Mon Aug 24 18:06:06 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds +nid001042: [Mon Aug 24 18:06:06 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages +nid001042: [Mon Aug 24 18:09:47 2026] MARK: Job 136832289.dbqs01 Complete. + +------------------------------------------------------------------ +Job 136832289.dbqs01 - Pre/Post job diff on HSN (MLX) Counters: +2026-08-24A--:--:--.------+--:-- nid001042 #### nid001042 - Job 136832289.dbqs01 HSN0 MLX Counter Post-Job Difference +nid001042: multicast:: 6008879 | multicast:: 6012605 | Diff: 3726 +nid001042: rx_bytes:: 163110612685 | rx_bytes:: 163113395743 | Diff: 2783058 +nid001042: rx_packets:: 66430584 | rx_packets:: 66438669 | Diff: 8085 +nid001042: tx_bytes:: 538745976119 | tx_bytes:: 538747461233 | Diff: 1485114 +nid001042: tx_packets:: 98281780 | tx_packets:: 98287151 | Diff: 5371 +nid001042: port_rcv_data:: 191996120403711 | port_rcv_data:: 191997155389563 | Diff: 1034985852 +nid001042: port_rcv_packets:: 404406083678 | port_rcv_packets:: 404407460630 | Diff: 1376952 +nid001042: port_xmit_data:: 196194153915823 | port_xmit_data:: 196197229201844 | Diff: 3075286021 +nid001042: port_xmit_packets:: 404692601710 | port_xmit_packets:: 404695866554 | Diff: 3264844 +nid001042: unicast_rcv_packets:: 404406083678 | unicast_rcv_packets:: 404407460630 | Diff: 1376952 +nid001042: unicast_xmit_packets:: 404692601710 | unicast_xmit_packets:: 404695866554 | Diff: 3264844 +nid001042: resp_cqe_error:: 76629 | resp_cqe_error:: 77187 | Diff: 558 +nid001042: resp_cqe_flush_error:: 73006 | resp_cqe_flush_error:: 73533 | Diff: 527 +nid001042: rx_write_requests:: 316459021 | rx_write_requests:: 316472245 | Diff: 13224 + +------------------------------------------------------------------ +Job 136832289.dbqs01 - Pre/Post job diff for Lustre Stats: +2026-08-24A--:--:--.------+--:-- nid001042 #### nid001042 - Job 136832289.dbqs01 Lustre Counters Post-Job Difference +nid001042: ### LustreStats: Multi-value diffs correspond to [samples min max total sum_of_squares] ### +nid001042: /lfs/h1 vah1-ffff930495072000 : +nid001042: h1: snapshot_time: Diffs: [ 9503] secs +nid001042: h1: elapsed_time: Diffs: [ 9503] secs +nid001042: h1: ioctl: Diffs: [ 2] reqs +nid001042: h1: getattr: Diffs: [ 15 0 0 333 82941] Avg_usec : 22.20 +nid001042: h1: inode_permission: Diffs: [ 2 0 0 4 10] Avg_usec : 2.00 +nid001042: h1: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 +nid001042: ---------------- +nid001042: /lfs/h2 vah2-ffff93049697b000 : +nid001042: h2: snapshot_time: Diffs: [ 9503] secs +nid001042: h2: elapsed_time: Diffs: [ 9503] secs +nid001042: h2: read_bytes: Diffs: [ 988855 0 0 11962842840 85421159327846640] Avg_bytes: 12097.67 +nid001042: h2: write_bytes: Diffs: [ 2658 0 0 12039314439 226727960562525923] Avg_bytes: 4529463.67 +nid001042: h2: read: Diffs: [ 988791 0 0 9133151 321036694735] Avg_usec : 9.23 +nid001042: h2: write: Diffs: [ 2765 0 0 8326464 165062691156] Avg_usec : 3011.37 +nid001042: h2: ioctl: Diffs: [ 778] reqs +nid001042: h2: open: Diffs: [ 450 0 0 66057 23640305] Avg_usec : 146.79 +nid001042: h2: close: Diffs: [ 451 0 0 44119 9927603] Avg_usec : 97.82 +nid001042: h2: seek: Diffs: [ 4175 0 0 558 15874] Avg_usec : .13 +nid001042: h2: readdir: Diffs: [ 74 0 0 8939 3857387] Avg_usec : 120.79 +nid001042: h2: truncate: Diffs: [ 112 0 0 1551724 142939744724] Avg_usec : 13854.67 +nid001042: h2: flock: Diffs: [ 52 0 0 4391 816975] Avg_usec : 84.44 +nid001042: h2: getattr: Diffs: [ 3035 0 0 292719 20388193851] Avg_usec : 96.44 +nid001042: h2: unlink: Diffs: [ 191 0 0 93127 55388701] Avg_usec : 487.57 +nid001042: h2: mkdir: Diffs: [ 2 0 0 1419 1480145] Avg_usec : 709.50 +nid001042: h2: rmdir: Diffs: [ 2 0 0 421 88645] Avg_usec : 210.50 +nid001042: h2: mknod: Diffs: [ 32 0 0 23572 55457274] Avg_usec : 736.62 +nid001042: h2: rename: Diffs: [ 2 0 0 802 322052] Avg_usec : 401.00 +nid001042: h2: getxattr: Diffs: [ 248 0 0 6617 1076167] Avg_usec : 26.68 +nid001042: h2: getxattr_hits: Diffs: [ 183] reqs +nid001042: h2: inode_permission: Diffs: [ 21725 0 0 11937 1746437] Avg_usec : .54 +nid001042: h2: opencount: Diffs: [ 452 0 0 1421 9965] Avg_reqs : 3.14 +nid001042: ---------------- +nid001042: /lfs/f1 vaf1-ffff9304942ba800 : +nid001042: f1: snapshot_time: Diffs: [ 9503] secs +nid001042: f1: elapsed_time: Diffs: [ 9503] secs +nid001042: f1: ioctl: Diffs: [ 2] reqs +nid001042: f1: getattr: Diffs: [ 11 0 0 249 52539] Avg_usec : 22.63 +nid001042: f1: inode_permission: Diffs: [ 2 0 0 3 5] Avg_usec : 1.50 +nid001042: f1: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 +nid001042: ---------------- +nid001042: /lfs/f2 vaf2-ffff930494ffa000 : +nid001042: f2: snapshot_time: Diffs: [ 9503] secs +nid001042: f2: elapsed_time: Diffs: [ 9502] secs +nid001042: f2: read_bytes: Diffs: [ 20 0 0 118645 1681617709] Avg_bytes: 5932.25 +nid001042: f2: write_bytes: Diffs: [ 18 0 0 29756 101912244] Avg_bytes: 1653.11 +nid001042: f2: read: Diffs: [ 20 0 0 842 279924] Avg_usec : 42.10 +nid001042: f2: write: Diffs: [ 480 0 0 8224 3919140] Avg_usec : 17.13 +nid001042: f2: ioctl: Diffs: [ 14] reqs +nid001042: f2: open: Diffs: [ 23 0 0 850 137546] Avg_usec : 36.95 +nid001042: f2: close: Diffs: [ 23 0 0 1836 262580] Avg_usec : 79.82 +nid001042: f2: seek: Diffs: [ 21 0 0 2 4] Avg_usec : .09 +nid001042: f2: readdir: Diffs: [ 2 0 0 342 116964] Avg_usec : 171.00 +nid001042: f2: getattr: Diffs: [ 38 0 0 6455 4049741] Avg_usec : 169.86 +nid001042: f2: mknod: Diffs: [ 11 0 0 3163 1364899] Avg_usec : 287.54 +nid001042: f2: getxattr: Diffs: [ 11 0 0 1331 165543] Avg_usec : 121.00 +nid001042: f2: inode_permission: Diffs: [ 138 0 0 589 49367] Avg_usec : 4.26 +nid001042: f2: opencount: Diffs: [ 25 0 0 56 230] Avg_reqs : 2.24 +nid001042: ---------------- +nid001042: /lfs/h3 vah3-ffff9304949ff000 : +nid001042: h3: snapshot_time: Diffs: [ 9503] secs +nid001042: h3: elapsed_time: Diffs: [ 9502] secs +nid001042: h3: ioctl: Diffs: [ 2] reqs +nid001042: h3: getattr: Diffs: [ 7 0 0 156 19958] Avg_usec : 22.28 +nid001042: h3: inode_permission: Diffs: [ 2 0 0 3 5] Avg_usec : 1.50 +nid001042: h3: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 +nid001042: ---------------- +nid001042: /apps vaf2-ffff9304949f8000 : +nid001042: apps: snapshot_time: Diffs: [ 9503] secs +nid001042: apps: elapsed_time: Diffs: [ 9502] secs +nid001042: apps: read_bytes: Diffs: [ 15820 0 0 282099158 26044381430104] Avg_bytes: 17831.80 +nid001042: apps: read: Diffs: [ 15820 0 0 775405 260691509] Avg_usec : 49.01 +nid001042: apps: ioctl: Diffs: [ 11515] reqs +nid001042: apps: open: Diffs: [ 18710 0 0 1793528 385538050] Avg_usec : 95.85 +nid001042: apps: close: Diffs: [ 18710 0 0 1643986 319627350] Avg_usec : 87.86 +nid001042: apps: mmap: Diffs: [ 8635 0 0 51163 779597] Avg_usec : 5.92 +nid001042: apps: page_fault: Diffs: [ 181098 0 0 13655 62315] Avg_usec : .07 +nid001042: apps: seek: Diffs: [ 22858 0 0 9 21] Avg_usec : 0 +nid001042: apps: readdir: Diffs: [ 7002 0 0 441061 390032177] Avg_usec : 62.99 +nid001042: apps: getattr: Diffs: [ 83100 0 0 1446350 229129686] Avg_usec : 17.40 +nid001042: apps: getxattr: Diffs: [ 14 0 0 347 46883] Avg_usec : 24.78 +nid001042: apps: getxattr_hits: Diffs: [ 12] reqs +nid001042: apps: inode_permission: Diffs: [ 1142514 0 0 162992 445224] Avg_usec : .14 +nid001042: apps: opencount: Diffs: [ 18712 0 0 40780 201946] Avg_reqs : 2.17 +nid001042: ---------------- + +------------------------------------------------------------------ +### Job 136832289.dbqs01 - NFS Statistics for job duration: +#### 2026-08-24A--:--:--.------+--:-- nid001042 Job 136832289.dbqs01 - DEBUG-NFS: Unable to find NFS stats file: /lfs/f2/hpc/jobdata/136832289/nfsstats.136832289.nid001042 + +------------------------------------------------------------------ +### Job 136832289.dbqs01 - Lustre evictions (if present): + +------------------------------------------------------------------ +### Job 136832289.dbqs01 - Exit status is 0 + +------------------------------------------------------------------ +Job 136832289.dbqs01 - Job summary: +Job Id: 136832289.dbqs01 + Job_Name = ESMPy + Job_Owner = keston.smith@dlogin09.dogwood.wcoss2.ncep.noaa.gov + resources_used.cpupercent = 102 + resources_used.cput = 00:34:30 + resources_used.mem = 23201368kb + resources_used.ncpus = 16 + resources_used.vmem = 20707600kb + resources_used.walltime = 02:37:56 + job_state = R + queue = dev + server = dbqs01 + Account_Name = NWPS-DEV + Checkpoint = u + ctime = Mon Aug 24 15:35:37 2026 + Error_Path = dlogin09.dogwood.wcoss2.ncep.noaa.gov:/lfs/h2/emc/couple/noscr + ub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/sor + c/ESMPy.e136832289 + exec_host = nid001042/0*16 + exec_vnode = (nid001042:ncpus=16:mem=268435456kb) + Hold_Types = n + Join_Path = oe + Keep_Files = oed + Mail_Points = a + mtime = Mon Aug 24 18:13:41 2026 + Output_Path = dlogin09.dogwood.wcoss2.ncep.noaa.gov:/lfs/h2/emc/couple/nosc + rub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/so + rc/ESMPy.o136832289 + Priority = 0 + qtime = Mon Aug 24 15:35:37 2026 + Rerunable = False + Resource_List.alvl = 2 + Resource_List.aslr = True + Resource_List.debug = True + Resource_List.dfs = False + Resource_List.hyper = True + Resource_List.ldebug = False + Resource_List.mem = 256gb + Resource_List.ncpus = 16 + Resource_List.nodect = 1 + Resource_List.one-shot = False + Resource_List.place = exclhost + Resource_List.select = 1:ncpus=16:mem=256GB + Resource_List.turbo = True + Resource_List.walltime = 04:00:00 + schedselect = 1:ncpus=16:mem=256GB:prepost=False + stime = Mon Aug 24 15:35:38 2026 + session_id = 2645723 + Shell_Path_List = /bin/bash + jobdir = /u/keston.smith + substate = 42 + Variable_List = PBS_O_HOME=/u/keston.smith,PBS_O_LANG=en_US.UTF-8, + PBS_O_LOGNAME=keston.smith, + PBS_O_PATH=/opt/cray/bin:/u/keston.smith/.local/bin:/usr/local/bin:/us + r/bin:/bin:/opt/c3/bin:/opt/pbs/bin:/sbin, + PBS_O_MAIL=/var/spool/mail/keston.smith,PBS_O_SHELL=/bin/bash, + PBS_O_WORKDIR=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWP + S/dev/compute_interpolation_weights/sorc,PBS_O_SYSTEM=Linux, + LMOD_FAMILY_CRAYPE_NETWORK_VERSION=false,meshID=oc_500m_10km, + LD_LIBRARY_PATH=/opt/cray/lib64, + LS_COLORS=no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd= + 40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com + =01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tg + z=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.l + zma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2= + 00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.xz=00;31:*.avi=01;35:*.bmp + =01;35:*.dl=01;35:*.fli=01;35:*.gif=01;35:*.gl=01;35:*.jpg=01;35:*.jpeg + =01;35:*.mkv=01;35:*.mng=01;35:*.mov=01;35:*.mp4=01;35:*.mpg=01;35:*.pc + x=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.svg=01;35:*.t + ga=01;35:*.tif=01;35:*.webm=01;35:*.webp=01;35:*.wmv=01;35:*.xbm=01;35: + *.xcf=01;35:*.xpm=01;35:*.aiff=00;32:*.ape=00;32:*.au=00;32:*.flac=00;3 + 2:*.m4a=00;32:*.mid=00;32:*.mp3=00;32:*.mpc=00;32:*.ogg=00;32:*.voc=00; + 32:*.wav=00;32:*.wma=00;32:*.wv=00;32:,HOSTTYPE=x86_64, + __LMOD_REF_COUNT_PATH=/opt/cray/bin:1;/u/keston.smith/.local/bin:1;/us + r/local/bin:1;/usr/bin:1;/bin:2;/opt/c3/bin:1;/opt/pbs/bin:1;/sbin:1, + _ModuleTable002_=ck5hbWUiXT0iY3JheXBlLW5ldHdvcmstb2ZpIix9LFsiY3JheXBlL + Xg4Ni1yb21lIl09e1siZm4iXT0iL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY3Jh + eXBlLXRhcmdldHMvZGVmYXVsdC9jcmF5cGUteDg2LXJvbWUubHVhIixbImZ1bGxOYW1lIl0 + 9ImNyYXlwZS14ODYtcm9tZSIsWyJsb2FkT3JkZXIiXT0xLHByb3BUPXt9LFsic3RhY2tEZX + B0aCJdPTEsWyJzdGF0dXMiXT0iYWN0aXZlIixbInVzZXJOYW1lIl09ImNyYXlwZS14ODYtc + m9tZSIsfSxlbnZ2YXI9e1siZm4iXT0iL2FwcHMvcHJvZC9sbW9kdWxlcy9zeXNfY29yZS9l + bnZ2YXIvMS4wIixbImZ1bGxOYW1lIl09ImVudnZhci8xLjAiLFsibG9hZE9yZGVyIl09NCx + wcm9wVD17fSxbInN0YWNrRGVwdGgiXT0w, + SSH_CONNECTION=192.58.153.7 55526 192.58.153.19 22, + mesh=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/com + pute_interpolation_weights/sorc/../../..//fix/rwps.oc_500m_10km.msh, + XAUTHLOCALHOSTNAME=dlogin09,LESSCLOSE=lessclose.sh %s %s, + XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB, + LMOD_FAMILY_CRAYPE_CPU=craype-x86-rome, + LMOD_MODULERCFILE=/apps/prod/lmodules/.modulerc.lua, + PE_PRODUCT_LIST=CRAYPE_X86_ROME,LMOD_IGNORE_CACHE=yes,LANG=en_US.UTF-8, + WINDOWMANAGER=xterm,LESS=-M -I -R,DISPLAY=localhost:15.0, + HISTTIMEFORMAT=%F %T,HOSTNAME=dlogin09, + LMOD_SYSTEM_DEFAULT_MODULES=envvar/1.0, + OLDPWD=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/c + ompute_interpolation_weights/ecf, + __LMOD_REF_COUNT__LMFILES_=/opt/cray/pe/lmod/modulefiles/craype-target + s/default/craype-x86-rome.lua:1;/opt/cray/modulefiles/libfabric/1.20.1: + 1;/opt/cray/pe/lmod/modulefiles/craype-targets/default/craype-network-o + fi.lua:1;/apps/prod/lmodules/sys_core/envvar/1.0:1, + CONFIG_SITE=/usr/share/site/x86_64-unknown-linux-gnu,CSHEDIT=emacs, + LMOD_CUSTOM_CNCM_INTEL_19_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX + =/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/apps + /ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4, + LMOD_CUSTOM_COMPILER_GNU_8_0_PREFIX=/apps/prod/lmodules/gcc/11.2.0:/ap + ps/prod/lmodules/gcc/10.2.0,GPG_TTY=/dev/pts/21, + LESS_ADVANCED_PREPROCESSOR=no,COLORTERM=1, + LMOD_FAMILY_CRAYPE_NETWORK=craype-network-ofi, + MACHTYPE=x86_64-suse-linux, + __LMOD_REF_COUNT_LD_LIBRARY_PATH=/opt/cray/lib64:1, + __LMOD_REF_COUNT_PKG_CONFIG_PATH=/opt/cray/lib64/pkgconfig:1, + LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_UCX_1_0_PREFIX=/apps/prod/lmodules/cce + /13.0.0:/apps/prod/lmodules/cce/12.0.3:/apps/prod/lmodules/cce/11.0.4, + tmp=/tmpfiles,SSH_AUTH_SOCK=/tmp/ssh-sLEbl3PUAYOZ/agent.543172, + _ModuleTable004_=U0lPTi9tb2R1bGVmaWxlcyIsIi91c3Ivc2hhcmUvbW9kdWxlcy9tb + 2R1bGVmaWxlcyIsIi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvTGludXgiLCIvdXNyL3NoYXJl + L21vZHVsZWZpbGVzL0NvcmUiLCIvdXNyL3NoYXJlL2xtb2QvbG1vZC9tb2R1bGVmaWxlcy9 + Db3JlIiwiL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY29yZSIsIi9vcHQvY3JheS + 9wZS9sbW9kL21vZHVsZWZpbGVzL2NyYXlwZS10YXJnZXRzL2RlZmF1bHQiLCIvYXBwcy9wc + m9kL2xtb2R1bGVzL3N5c19jb3JlIiwiL2FwcHMvb3BzL3Byb2QvbmNvL21vZHVsZWZpbGVz + L2NvcmUiLCIvYXBwcy9wcm9kL2xtb2R1bGVzL2NvcmUiLCIvb3B0L2NyYXkvbW9kdWxlZml + sZXMiLH0sWyJzeXN0ZW1CYXNlTVBBVEgi,MINICOM=-c on, + QT_SYSTEM_DIR=/usr/share/desktop-data,OSTYPE=linux, + meshname=rwps.oc_500m_10km,USER=keston.smith, + MODULES_SET_SHELL_STARTUP=0,PAGER=less,MODULE_VERSION=3.2.10, + LMOD_CUSTOM_CNCM_GNU_8_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX=/a + pps/prod/lmodules/GCC_cray_mpich/10.2.0/cray-mpich/8.1.4, + LMOD_CUSTOM_CNCM_GNU_8_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX=/a + pps/prod/lmodules/GCC_cray_mpich/10.2.0/cray-mpich/8.1.4, + CRAY_CPU_TARGET=x86-rome, + LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PR + EFIX=/apps/prod/lmodules/CCE_cray_mpich/11.0.4/cray-mpich/8.1.4, + __LMOD_REF_COUNT_MODULEPATH=/opt/cray/pe/lmod/modulefiles/net/ofi/1.0: + 1;/opt/cray/pe/lmod/modulefiles/cpu/x86-rome/1.0:1;/usr/share/modules:1 + ;/usr/share/Modules/$MODULE_VERSION/modulefiles:1;/usr/share/modules/mo + dulefiles:1;/usr/share/modulefiles/Linux:1;/usr/share/modulefiles/Core: + 1;/usr/share/lmod/lmod/modulefiles/Core:1;/opt/cray/pe/lmod/modulefiles + /core:1;/opt/cray/pe/lmod/modulefiles/craype-targets/default:1;/apps/pr + od/lmodules/sys_core:1;/apps/ops/prod/nco/modulefiles/core:1;/apps/prod + /lmodules/core:1;/opt/cray/modulefiles:1, + COMINrrfs=/lfs/h1/ops/prod/com/rrfs/v1.0/rrfs./,MORE=-sl, + __LMOD_REF_COUNT_LOADEDMODULES=craype-x86-rome:1;libfabric/1.20.1:1;cr + aype-network-ofi:1;envvar/1.0:1, + PWD=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp + ute_interpolation_weights/sorc, + COMINrtofs=/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs./, + HOME=/u/keston.smith, + COMINnbm=/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.//grib2, + PELOCAL_PRGENV=true,SSH_AGENT_PID=543173,HOST=dlogin09, + SSH_CLIENT=192.58.153.7 55526 22,LMOD_VERSION=8.3.1, + XNLSPATH=/usr/share/X11/nls,CRAY_LMOD_CPU=x86-rome/1.0, + LMOD_FAMILY_CRAYPE_CPU_VERSION=false, + BASH_ENV=/usr/share/lmod/lmod/init/bash,XDG_DATA_DIRS=/usr/share, + LMOD_CUSTOM_CNCM_INTEL_19_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX + =/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/apps + /ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4, + CRAY_LMOD_NET=ofi/1.0, + RWPSroot=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev + /compute_interpolation_weights/sorc/../../../,COMINlocal=/tmpfiles, + __LMOD_REF_COUNT_LMOD_CUSTOM_COMPILER_INTEL_19_0_PREFIX=/apps/ops/prod + /nco/models/modulefiles:1;/apps/prod/lmodules/intel/19.1.3.304:1;/apps/ + ops/prod/libs/modulefiles/compiler/intel/19.1.3.304:1;/apps/ops/prod/nc + o/modulefiles/compiler/intel/19.1.3.304:1,LIBGL_DEBUG=quiet, + LMOD_CUSTOM_COMPILER_INTEL_19_0_PREFIX=/apps/ops/prod/nco/models/modul + efiles:/apps/prod/lmodules/intel/19.1.3.304:/apps/ops/prod/libs/modulef + iles/compiler/intel/19.1.3.304:/apps/ops/prod/nco/modulefiles/compiler/ + intel/19.1.3.304,PROFILEREAD=true,LMOD_sys=Linux, + _ModuleTable001_=X01vZHVsZVRhYmxlXz17WyJNVHZlcnNpb24iXT0zLFsiY19yZWJ1a + WxkVGltZSJdPWZhbHNlLFsiY19zaG9ydFRpbWUiXT1mYWxzZSxkZXB0aFQ9e30sZmFtaWx5 + PXtbImNyYXlwZV9jcHUiXT0iY3JheXBlLXg4Ni1yb21lIixbImNyYXlwZV9uZXR3b3JrIl0 + 9ImNyYXlwZS1uZXR3b3JrLW9maSIsfSxtVD17WyJjcmF5cGUtbmV0d29yay1vZmkiXT17Wy + JmbiJdPSIvb3B0L2NyYXkvcGUvbG1vZC9tb2R1bGVmaWxlcy9jcmF5cGUtdGFyZ2V0cy9kZ + WZhdWx0L2NyYXlwZS1uZXR3b3JrLW9maS5sdWEiLFsiZnVsbE5hbWUiXT0iY3JheXBlLW5l + dHdvcmstb2ZpIixbImxvYWRPcmRlciJdPTMscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MSx + bInN0YXR1cyJdPSJhY3RpdmUiLFsidXNl, + LOADEDMODULES=craype-x86-rome:libfabric/1.20.1:craype-network-ofi:envv + ar/1.0,LMOD_AVAIL_STYLE=en_grouped:system,CRAYPE_NETWORK_TARGET=ofi, + _ModuleTable006_=b2R1bGVmaWxlcyIsfQ==, + __LMOD_REF_COUNT_MANPATH=/opt/cray/share/man:1;/usr/share/lmod/lmod/sh + are/man:1;/usr/share/man:1;/opt/c3/man:1;/opt/pbs/share/man:1, + _ModuleTable003_=LFsic3RhdHVzIl09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJdPSJlbnZ2Y + XIvMS4wIix9LGxpYmZhYnJpYz17WyJmbiJdPSIvb3B0L2NyYXkvbW9kdWxlZmlsZXMvbGli + ZmFicmljLzEuMjAuMSIsWyJmdWxsTmFtZSJdPSJsaWJmYWJyaWMvMS4yMC4xIixbImxvYWR + PcmRlciJdPTIscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MixbInN0YXR1cyJdPSJhY3Rpdm + UiLFsidXNlck5hbWUiXT0ibGliZmFicmljIix9LH0sbXBhdGhBPXsiL29wdC9jcmF5L3BlL + 2xtb2QvbW9kdWxlZmlsZXMvbmV0L29maS8xLjAiLCIvb3B0L2NyYXkvcGUvbG1vZC9tb2R1 + bGVmaWxlcy9jcHUveDg2LXJvbWUvMS4wIiwiL3Vzci9zaGFyZS9tb2R1bGVzIiwiL3Vzci9 + zaGFyZS9Nb2R1bGVzLyRNT0RVTEVfVkVS,LMOD_ROOT=/usr/share/lmod, + SSH_TTY=/dev/pts/21,FROM_HEADER=,MAIL=/var/spool/mail/keston.smith, + COMINstofs=/lfs/h1/ops/prod/com/stofs/v3.1/stofs_2d_glo., + LESSKEY=/etc/lesskey.bin,TERM=xterm-256color,SHELL=/bin/bash, + LMOD_ADMIN_FILE=/apps/prod/lmodules/admin.list, + LMOD_CUSTOM_COMPILER_GNU_8_0_UCX_1_0_PREFIX=/apps/prod/lmodules/gcc/11 + .2.0:/apps/prod/lmodules/gcc/10.2.0,lmod_prefix_path=/usr/share, + LMOD_CUSTOM_COMPILER_CRAYCLANG_10_0_PREFIX=/apps/prod/lmodules/cce/13. + 0.0:/apps/prod/lmodules/cce/12.0.3:/apps/prod/lmodules/cce/11.0.4, + _ModuleTable_Sz_=6,LS_OPTIONS=-N --color=tty -T 0, + LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PR + EFIX=/apps/prod/lmodules/CCE_cray_mpich/11.0.4/cray-mpich/8.1.4, + TMOUT=1800,PYTHONSTARTUP=/etc/pythonstart, + RWPSfix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPS,SHLVL=3, + LANGUAGE=en_US.UTF-8,G_FILENAME_ENCODING=@locale\,UTF-8\,ISO-8859-15\, + CP1252, + LMOD_CUSTOM_COMPILER_INTEL_19_0_UCX_1_0_PREFIX=/apps/prod/lmodules/int + el/19.1.3.304:/apps/ops/prod/libs/modulefiles/compiler/intel/19.1.3.304 + :/apps/ops/prod/nco/modulefiles/compiler/intel/19.1.3.304, + HPC_OPT=/apps/ops/prod/libs, + MANPATH=/opt/cray/share/man:/usr/share/lmod/lmod/share/man:/usr/share/ + man:/opt/c3/man:/opt/pbs/share/man,OSCAR_HOME=/opt/oscar, + fix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp + ute_interpolation_weights/sorc/../../..//fix, + MODULEPATH=/opt/cray/pe/lmod/modulefiles/net/ofi/1.0:/opt/cray/pe/lmod + /modulefiles/cpu/x86-rome/1.0:/usr/share/modules:/usr/share/Modules/$MO + DULE_VERSION/modulefiles:/usr/share/modules/modulefiles:/usr/share/modu + lefiles/Linux:/usr/share/modulefiles/Core:/usr/share/lmod/lmod/modulefi + les/Core:/opt/cray/pe/lmod/modulefiles/core:/opt/cray/pe/lmod/modulefil + es/craype-targets/default:/apps/prod/lmodules/sys_core:/apps/ops/prod/n + co/modulefiles/core:/apps/prod/lmodules/core:/opt/cray/modulefiles, + LOGNAME=keston.smith,MODULE_VERSION_STACK=3.2.10, + MODULEPATH_ROOT=/usr/share/modulefiles, + LMOD_PACKAGE_PATH=/apps/prod/lmodules,XDG_CONFIG_DIRS=/etc/xdg, + PATH=/opt/cray/bin:/u/keston.smith/.local/bin:/usr/local/bin:/usr/bin: + /bin:/opt/c3/bin:/opt/pbs/bin:/sbin, + __LMOD_REF_COUNT_PE_PRODUCT_LIST=CRAYPE_X86_ROME:1, + _LMFILES_=/opt/cray/pe/lmod/modulefiles/craype-targets/default/craype- + x86-rome.lua:/opt/cray/modulefiles/libfabric/1.20.1:/opt/cray/pe/lmod/m + odulefiles/craype-targets/default/craype-network-ofi.lua:/apps/prod/lmo + dules/sys_core/envvar/1.0,MODULESHOME=/usr/share/lmod/lmod, + PKG_CONFIG_PATH=/opt/cray/lib64/pkgconfig, + LMOD_SETTARG_FULL_SUPPORT=no,INFOPATH=:/apps/docs/info, + G_BROKEN_FILENAMES=1,HISTSIZE=10000,LMOD_PKG=/usr/share/lmod/lmod, + CPU=x86_64, + _ModuleTable005_=XT0iL3Vzci9zaGFyZS9tb2R1bGVzOi91c3Ivc2hhcmUvTW9kdWxlc + y8kTU9EVUxFX1ZFUlNJT04vbW9kdWxlZmlsZXM6L3Vzci9zaGFyZS9tb2R1bGVzL21vZHVs + ZWZpbGVzOi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvTGludXg6L3Vzci9zaGFyZS9tb2R1bGV + maWxlcy9Db3JlOi91c3Ivc2hhcmUvbG1vZC9sbW9kL21vZHVsZWZpbGVzL0NvcmU6L29wdC + 9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY29yZTovb3B0L2NyYXkvcGUvbG1vZC9tb2R1b + GVmaWxlcy9jcmF5cGUtdGFyZ2V0cy9kZWZhdWx0Oi9hcHBzL3Byb2QvbG1vZHVsZXMvc3lz + X2NvcmU6L2FwcHMvb3BzL3Byb2QvbmNvL21vZHVsZWZpbGVzL2NvcmU6L2FwcHMvcHJvZC9 + sbW9kdWxlcy9jb3JlOi9vcHQvY3JheS9t, + LMOD_CMD=/usr/share/lmod/lmod/libexec/lmod,CVS_RSH=ssh, + LESSOPEN=lessopen.sh %s,LMOD_DIR=/usr/share/lmod/lmod/libexec, + LC_TIME=C.UTF-8, + BASH_FUNC_module%%=() { eval $($LMOD_CMD bash \"$@\") && eval $(${LMO + D_SETTARG_CMD:-:} -s sh) + euser = keston.smith + egroup = emc + hashname = 136832289.dbqs01 + queue_rank = 1787585737290750 + queue_type = E + comment = Job run at Mon Aug 24 at 15:35 on (nid001042:ncpus=16:mem=2684354 + 56kb) + etime = Mon Aug 24 15:35:37 2026 + umask = 22 + run_count = 6 + eligible_time = 00:00:08 + accrue_type = 3 + Submit_arguments = -V /lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/ + RWPS/dev/compute_interpolation_weights/sorc/../../..//dev/compute_inter + polation_weights/ecf/compute_interpolation_weights.ecf + project = NWPS-DEV + run_version = 1 + Submit_Host = dlogin09.dogwood.wcoss2.ncep.noaa.gov + server_instance_id = dbqs01.dogwood.wcoss2.ncep.noaa.gov:15001 + + +------------------------------------------------------------------ +Job 136832289.dbqs01 - PBS tracejob output (for parent mom node only): + +Job: 136832289.dbqs01 + +08/24/2026 15:35:38 M update_job_usage: CPU usage: 0.000 secs +08/24/2026 15:35:38 M update_job_usage: cpupercent initialized to zero +08/24/2026 15:35:38 M update_job_usage: Memory usage: mem=0b +08/24/2026 15:35:43 M Started, pid = 2645723 +08/24/2026 15:37:00 M update_job_usage: CPU usage: 75.000 secs +08/24/2026 15:37:00 M update_job_usage: 136832289.dbqs01 measured interval cpupercent 92 increased job cpupercent to 92 +08/24/2026 15:37:00 M update_job_usage: Memory usage: mem=1842656kb +08/24/2026 15:39:01 M update_job_usage: CPU usage: 199.000 secs +08/24/2026 15:39:01 M update_job_usage: 136832289.dbqs01 measured interval cpupercent 102 increased job cpupercent to 102 +08/24/2026 15:39:01 M update_job_usage: Memory usage: mem=2243880kb +08/24/2026 15:41:03 M update_job_usage: CPU usage: 324.000 secs +08/24/2026 15:41:03 M update_job_usage: Memory usage: mem=5884468kb +08/24/2026 15:43:04 M update_job_usage: CPU usage: 448.000 secs +08/24/2026 15:43:04 M update_job_usage: Memory usage: mem=6786064kb +08/24/2026 15:45:05 M update_job_usage: CPU usage: 572.000 secs +08/24/2026 15:45:05 M update_job_usage: Memory usage: mem=9392328kb +08/24/2026 15:47:06 M update_job_usage: CPU usage: 694.000 secs +08/24/2026 15:47:06 M update_job_usage: Memory usage: mem=9392328kb +08/24/2026 15:49:07 M update_job_usage: CPU usage: 817.000 secs +08/24/2026 15:49:07 M update_job_usage: Memory usage: mem=9392328kb +08/24/2026 15:51:09 M update_job_usage: CPU usage: 939.000 secs +08/24/2026 15:51:09 M update_job_usage: Memory usage: mem=16637064kb +08/24/2026 15:53:10 M update_job_usage: CPU usage: 1064.000 secs +08/24/2026 15:53:10 M update_job_usage: Memory usage: mem=16637064kb +08/24/2026 15:55:11 M update_job_usage: CPU usage: 1188.000 secs +08/24/2026 15:55:11 M update_job_usage: Memory usage: mem=16637064kb +08/24/2026 15:57:12 M update_job_usage: CPU usage: 1309.000 secs +08/24/2026 15:57:12 M update_job_usage: Memory usage: mem=16637064kb +08/24/2026 15:59:13 M update_job_usage: CPU usage: 1430.000 secs +08/24/2026 15:59:13 M update_job_usage: Memory usage: mem=16637064kb +08/24/2026 16:01:15 M update_job_usage: CPU usage: 1551.000 secs +08/24/2026 16:01:15 M update_job_usage: Memory usage: mem=21896884kb +08/24/2026 16:03:16 M update_job_usage: CPU usage: 1675.000 secs +08/24/2026 16:03:16 M update_job_usage: Memory usage: mem=21896884kb +08/24/2026 16:05:17 M update_job_usage: CPU usage: 1796.000 secs +08/24/2026 16:05:17 M update_job_usage: Memory usage: mem=21896884kb +08/24/2026 16:07:18 M update_job_usage: CPU usage: 1917.000 secs +08/24/2026 16:07:18 M update_job_usage: Memory usage: mem=22913548kb +08/24/2026 17:09:56 M update_job_usage: CPU usage: 1997.000 secs +08/24/2026 18:12:32 M update_job_usage: CPU usage: 2070.000 secs +08/24/2026 18:14:02 M task 00000001 terminated +08/24/2026 18:14:02 M Terminated +08/24/2026 18:14:02 M task 00000001 cput=00:35:39 +08/24/2026 18:14:02 M kill_job +08/24/2026 18:14:02 M nid001042 cput=00:34:30 mem=23201368kb +08/24/2026 18:14:02 M update_job_usage: CPU usage: 2136.000 secs +08/24/2026 18:14:02 M update_job_usage: Memory usage: mem=23201368kb + +------------------------------------------------------------------ +To see full PBS log data, run: /sfs/admin/scripts/tracejob.sh 136832289.dbqs01 + +================================================================== +END - DEBUG INFO +================================================================== + +Job 136832289.dbqs01 - Epilogue DEBUG complete. DEBUG Execution time: 6 seconds +Job 136832289.dbqs01 - Epilogue complete. Execution time: 9 seconds +##### Job 136832289.dbqs01 - PBS Job Script: +(Note: Duplicate #PBS entries are a function how PBS interprets and caches the original job script.) + +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=04:00:00 +##PBS -l select=1:ncpus=8:mem=128GB +#PBS -l select=1:ncpus=16:mem=256GB +##PBS -l select=1:ncpus=32:mem=256GB +###PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + +pip list -v + +cd $RWPSroot/ush/preprocess + +SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" +date="20260730" +cycl="00" +Nprocs=16 + + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +rrfs_hi=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.hi.nc +rrfs_pr=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.pr.nc +rrfs_ak=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.ak.nc +rrfs_na=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.na.nc +rrfs_conus=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.conus.nc + +out="../../fix" + +rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" +rrfsDst="$out/DistToBndy.$meshname.rrfs" + +#no extrapolation with rrfs forecasts +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_pr $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 > GenWhts.rrfs.pr.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_ak $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 > GenWhts.rrfs.ak.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_na $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 > GenWhts.rrfs.na.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_conus $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out + +nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc +nbmIntrp="$out/InterpolationWeights.$meshname.nbm" +nbmDst="$out/DistToBndy.$meshname.nbm" +#extrapolate nbm oc wind to all points +python ./compute_gridded_to_rwps_interp_weights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out + +nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc +#do not extrapolate for NBM .ak. domain +python ./compute_gridded_to_rwps_interp_weights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out + +rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc +rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" +rtofsDst="$out/DistToBndy.$meshname.rtofs" + +#extrapolate rtofs .glo. for full ice coverage + +python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out + + +rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc +#do not extrapolate rtofs .glo. currents +python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.current.nc $rtofsDst.current.nc -1 > GenWhts.rtofs.current.out + + + +#Old v2 of stofs +stofs_glo="$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" + +mkdir -p STOFSInterpWeights.$meshname +## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs + +## Now run parallel job script + +qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS + +wait + +#combine text file output of parallel jobs +cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt + +# convert output weights to netcdf file +python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 +cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.v2.nc +cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.v2.nc +mv DistToBndy.$meshname.stofs.nc DistToBndy.$meshname.stofs.v2.nc +mv InterpWeights.$meshname.stofs.nc InterpWeights.$meshname.stofs.v2.nc + +rm -rf STOFSInterpWeights.$meshname +rm InterpWeights.$meshname.stofs.txt +rm *.out +rm ESMPy* + + +mkdir -p STOFSInterpWeights.$meshname +#compute stofs weights for current(v3) stofs mesh +stofs_glo="$SID/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc" + +## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs + +## Now run parallel job script + +qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS + +wait + +#combine text file output of parallel jobs +cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt + +# convert output weights to netcdf file +python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 +cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc +cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc + + +rm -rf STOFSInterpWeights.$meshname +rm InterpWeights.$meshname.stofs.txt +rm *.out +rm ESMPy* + + + + +##### End of job script +------------------------------------------------------------------ + diff --git a/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136853423 b/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136853423 new file mode 100644 index 0000000..1137819 --- /dev/null +++ b/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136853423 @@ -0,0 +1,736 @@ +PBS: Running prologue on parent mom node: nid001586... +Job 136853423.dbqs01 nodelist: nid001586 +Job 136853423.dbqs01 - Prologue complete. Execution time: 4 seconds +Agent pid 3935289 +Identity added: /u/keston.smith/.ssh/id_ed25519 (keston.smith@noaa.gov) +/u/keston.smith/.bashrc: line 46: alias: eval "$(ssh-agent -s)"; ssh-add ~/.ssh/id_ed25519: not found +Resetting modules to system default. Reseting $MODULEPATH back to system default. All extra directories will be removed from $MODULEPATH. +Package Version Location Installer +------------------------- ----------- ---------------------------------------------------------------------------------- --------- +Cartopy 0.24.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +certifi 2025.1.31 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +cftime 1.6.4.post1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +contourpy 1.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +cycler 0.12.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +esmpy 8.6.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +fonttools 4.55.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +geographiclib 2.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +geopy 2.4.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +Jinja2 3.1.5 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +kiwisolver 1.4.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +MarkupSafe 3.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +matplotlib 3.10.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +netCDF4 1.7.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +numpy 2.2.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +packaging 24.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pandas 2.2.3 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pillow 11.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pip 25.0.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pyparsing 3.2.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pyproj 3.7.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pyshp 2.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +python-dateutil 2.9.0.post0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pytz 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +PyYAML 6.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +scipy 1.15.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +setuptools 75.8.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +setuptools-git-versioning 2.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +shapely 2.0.7 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +six 1.17.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +tzdata 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +xarray 2025.1.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in + with xr.open_dataset(weights_file, overwrite=True) as ds_s: + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset + backend_ds = backend.open_dataset( + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in + with xr.open_dataset(weights_file, overwrite=True) as ds_s: + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset + backend_ds = backend.open_dataset( + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in + with xr.open_dataset(weights_file, overwrite=True) as ds_s: + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset + backend_ds = backend.open_dataset( + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in + with xr.open_dataset(weights_file, overwrite=True) as ds_s: + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset + backend_ds = backend.open_dataset( + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in + with xr.open_dataset(weights_file, overwrite=True) as ds_s: + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset + backend_ds = backend.open_dataset( + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' +PBS: Running epilogue on parent mom node: nid001586... +================================================================== +BEGIN - DEBUG INFO +================================================================== +Job 136853423.dbqs01 - Post Job Mem Usage: +nid001586: 2026-08-24.15 1 =========================================== +nid001586: 2026-08-24.15 2 #### Node Memory Usage for nid001586 #### +nid001586: 2026-08-24.15 3 ------------------ +nid001586: 2026-08-24.15 4 Mem: total:526983796 used:17219808 free:510819960 shared:715336 cache:1366576 avail:509763988 +nid001586: 2026-08-24.15 5 4.0K /dev/shm +nid001586: 2026-08-24.15 6 40K /tmp +nid001586: 2026-08-24.15 7 =========================================== +nid001586: 2026-08-24.26 1 =========================================== +nid001586: 2026-08-24.26 2 #### Node Memory Usage for nid001586 #### +nid001586: 2026-08-24.26 3 ------------------ +nid001586: 2026-08-24.26 4 Mem: total:526983796 used:17759392 free:509822336 shared:715456 cache:2282592 avail:509224404 +nid001586: 2026-08-24.26 5 4.0K /dev/shm +nid001586: 2026-08-24.26 6 40K /tmp +nid001586: 2026-08-24.26 7 =========================================== + +------------------------------------------------------------------ +------------------------------------------------------------------ +Job 136853423.dbqs01 - Post Job Mem Usage Profile: +2026-08-24A--:--:--.------+--:-- nid001586 #### nid001586 - Job 136853423.dbqs01 NUMA Node Memory Allocation and Fragmentation Reports +Starting Fragmentation Report for nid001586 +Node Order9 Order10 Score MB_Free %Free State +0 9924 1154 12232 24464 38 MARG +1 6815 5838 18491 36982 57 OK +2 3772 9766 23304 46608 72 OK +3 3000 11311 25622 51244 79 OK +4 4251 10529 25309 50618 78 OK +5 1323 13486 28295 56590 87 OK +6 2002 13211 28424 56848 88 OK +7 1385 13301 27987 55974 86 OK + +** nid001586 : node0_score=12232 node0_state=MARG uptime=4588249s Overall=MARG ** +Ending Fragmentation Report for nid001586 +Node Order9 Order10 Score MB_Free %Free State +0 9926 1154 12234 24468 38 MARG +1 6815 5838 18491 36982 57 OK +2 3771 9767 23305 46610 72 OK +3 2999 11312 25623 51246 79 OK +4 4251 10529 25309 50618 78 OK +5 1322 13487 28296 56592 87 OK +6 2003 13211 28425 56850 88 OK +7 1385 13301 27987 55974 86 OK + +** nid001586 : node0_score=12234 node0_state=MARG uptime=4588380s Overall=MARG ** +2026-08-24A--:--:--.------+--:-- nid001586 #### nid001586 - Job 136853423.dbqs01 VMSTATS Memory Report +**Only Printing Significant Findings - TEST CODE - Results are NOT positive indication of a problem. ** +nid001586 [!] Inactive file cache ballooned: 202637 (threshold: 100000) + +------------------------------------------------------------------ +Job 136853423.dbqs01 - /var/log/messages for job duration: +2026-08-24A--:--:--.------+--:-- nid001586 #### nid001586 - Job 136853423.dbqs01 Runtime Data from /var/log/messages +nid001586: nid001586 #### nid001586 - Job 136853423.dbqs01 Runtime Data from /var/log/messages +nid001586: 2026-08-24T18:40:15.350135+00:00 nid001586 prologue: MARK: Job 136853423.dbqs01 Start +nid001586: 2026-08-24T18:40:15.361675+00:00 nid001586 prologue: Job 136853423.dbqs01 nodelist: nid001586 +nid001586: 2026-08-24T18:40:15.363643+00:00 nid001586 prologue: Job 136853423.dbqs01 - Recording pre-execution stats and counters... +nid001586: 2026-08-24T18:40:15.399916+00:00 nid001586 prologue: Job 136853423.dbqs01 - Killing any stray user processes... +nid001586: 2026-08-24T18:40:15.483312+00:00 nid001586 prologue: Job 136853423.dbqs01 - Clearing /tmp... +nid001586: 2026-08-24T18:40:15.500268+00:00 nid001586 prologue: Job 136853423.dbqs01 - Verifying key post-boot workarounds with warchk... +nid001586: 2026-08-24T18:40:15.532205+00:00 nid001586 WARCHK: root : /sfs/admin/scripts/warchk --batch +nid001586: 2026-08-24T18:40:15.729011+00:00 nid001586 prologue: Job 136853423.dbqs01 - Recording pre-job memory usage... +nid001586: 2026-08-24T18:40:15.803753+00:00 nid001586 prologue: Job 136853423.dbqs01 - FRAG_STATE: ** nid001586 : node0_score=12232 node0_state=MARG uptime=4588249s Overall=MARG ** +nid001586: 2026-08-24T18:40:15.804808+00:00 nid001586 prologue: Job 136853423.dbqs01 - Recording pre-job HSN counters... +nid001586: 2026-08-24T18:40:15.931707+00:00 nid001586 prologue: Job 136853423.dbqs01 - Recording pre-job Lustre counters... +nid001586: 2026-08-24T18:40:16.977517+00:00 nid001586 prologue: Job 136853423.dbqs01 - Recording initial NFS client statistics... +nid001586: 2026-08-24T18:40:16.987019+00:00 nid001586 prologue: Job 136853423.dbqs01 - Saving a copy of the job script... +nid001586: 2026-08-24T18:40:16.995136+00:00 nid001586 prologue: Job 136853423.dbqs01 - Checking existing ASLR settings... +nid001586: 2026-08-24T18:40:17.000218+00:00 nid001586 prologue: Job 136853423.dbqs01 - Checking palsd open file count... +nid001586: 2026-08-24T18:40:17.096158+00:00 nid001586 PBS_CMD: root : /opt/pbs/bin/qstat -Bf +nid001586: 2026-08-24T18:40:18.137962+00:00 nid001586 prologue: Job 136853423.dbqs01 - Checking one-shot enabled: False +nid001586: 2026-08-24T18:40:18.139192+00:00 nid001586 prologue: Job 136853423.dbqs01 - Enabling turboboost... +nid001586: 2026-08-24T18:40:18.142236+00:00 nid001586 prologue: Job 136853423.dbqs01 - Checking warchk results... +nid001586: 2026-08-24T18:40:18.145590+00:00 nid001586 prologue: Job 136853423.dbqs01 - Warchk Complete +nid001586: 2026-08-24T18:40:18.148715+00:00 nid001586 prologue: Job 136853423.dbqs01 - Prologue complete. Execution time: 4 seconds +nid001586: 2026-08-24T18:41:02.313970+00:00 nid001586 kernel: [4588190.806346][T13864] LNet: 13864:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 2 seconds +nid001586: 2026-08-24T18:41:02.313985+00:00 nid001586 kernel: [4588190.826765][T13864] LNet: 13864:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages +nid001586: 2026-08-24T18:42:26.495033+00:00 nid001586 epilogue: Job 136853423.dbqs01 complete, running post-job actions. +nid001586: 2026-08-24T18:42:26.513497+00:00 nid001586 epilogue: MARK: Job 136853423.dbqs01 Complete. + +------------------------------------------------------------------ +Job 136853423.dbqs01 - dmesg output for job duration: +2026-08-24A--:--:--.------+--:-- nid001586 #### nid001586 - Job 136853423.dbqs01 Runtime Data from dmesg +nid001586: nid001586 #### nid001586 - Job 136853423.dbqs01 Runtime Data from dmesg +nid001586: [Mon Aug 24 18:38:29 2026] MARK: Job 136853423.dbqs01 Start +nid001586: [Mon Aug 24 18:39:16 2026] LNet: 13864:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 2 seconds +nid001586: [Mon Aug 24 18:39:16 2026] LNet: 13864:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages +nid001586: [Mon Aug 24 18:40:41 2026] MARK: Job 136853423.dbqs01 Complete. + +------------------------------------------------------------------ +Job 136853423.dbqs01 - Pre/Post job diff on HSN (MLX) Counters: +2026-08-24A--:--:--.------+--:-- nid001586 #### nid001586 - Job 136853423.dbqs01 HSN0 MLX Counter Post-Job Difference +nid001586: multicast:: 5743872 | multicast:: 5743922 | Diff: 50 +nid001586: rx_bytes:: 202018189768 | rx_bytes:: 202019894861 | Diff: 1705093 +nid001586: rx_packets:: 46130838 | rx_packets:: 46131277 | Diff: 439 +nid001586: tx_bytes:: 209177107460 | tx_bytes:: 209177192530 | Diff: 85070 +nid001586: tx_packets:: 43325018 | tx_packets:: 43325379 | Diff: 361 +nid001586: port_rcv_data:: 332179470793687 | port_rcv_data:: 332179605084427 | Diff: 134290740 +nid001586: port_rcv_packets:: 586885563446 | port_rcv_packets:: 586885805945 | Diff: 242499 +nid001586: port_xmit_data:: 332522008713855 | port_xmit_data:: 332522193986284 | Diff: 185272429 +nid001586: port_xmit_packets:: 584386960708 | port_xmit_packets:: 584387242096 | Diff: 281388 +nid001586: unicast_rcv_packets:: 586885563446 | unicast_rcv_packets:: 586885805945 | Diff: 242499 +nid001586: unicast_xmit_packets:: 584386960708 | unicast_xmit_packets:: 584387242096 | Diff: 281388 +nid001586: rx_write_requests:: 159906504 | rx_write_requests:: 159915735 | Diff: 9231 + +------------------------------------------------------------------ +Job 136853423.dbqs01 - Pre/Post job diff for Lustre Stats: +2026-08-24A--:--:--.------+--:-- nid001586 #### nid001586 - Job 136853423.dbqs01 Lustre Counters Post-Job Difference +nid001586: ### LustreStats: Multi-value diffs correspond to [samples min max total sum_of_squares] ### +nid001586: /lfs/h1 vah1-ffff9b488f0f3800 : +nid001586: h1: snapshot_time: Diffs: [ 131] secs +nid001586: h1: elapsed_time: Diffs: [ 131] secs +nid001586: h1: ioctl: Diffs: [ 2] reqs +nid001586: h1: getattr: Diffs: [ 15 0 0 59 791] Avg_usec : 3.93 +nid001586: h1: inode_permission: Diffs: [ 2 0 0 3 5] Avg_usec : 1.50 +nid001586: h1: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 +nid001586: ---------------- +nid001586: /lfs/h2 vah2-ffff9b68663ce800 : +nid001586: h2: snapshot_time: Diffs: [ 131] secs +nid001586: h2: elapsed_time: Diffs: [ 131] secs +nid001586: h2: read_bytes: Diffs: [ 8884 0 0 185959330 926667447990956] Avg_bytes: 20931.93 +nid001586: h2: write_bytes: Diffs: [ 313 0 0 747601795 2968043260927341] Avg_bytes: 2388504.13 +nid001586: h2: read: Diffs: [ 8875 0 0 1362792 48636526700] Avg_usec : 153.55 +nid001586: h2: write: Diffs: [ 323 0 0 443535 1024714645] Avg_usec : 1373.17 +nid001586: h2: ioctl: Diffs: [ 623] reqs +nid001586: h2: open: Diffs: [ 202 0 0 41163 19760211] Avg_usec : 203.77 +nid001586: h2: close: Diffs: [ 203 0 0 14405 2204763] Avg_usec : 70.96 +nid001586: h2: seek: Diffs: [ 336 0 0 315 14127] Avg_usec : .93 +nid001586: h2: readdir: Diffs: [ 24 0 0 2814 1249108] Avg_usec : 117.25 +nid001586: h2: truncate: Diffs: [ 68 0 0 1589766 510757214264] Avg_usec : 23378.91 +nid001586: h2: flock: Diffs: [ 20 0 0 1810 352128] Avg_usec : 90.50 +nid001586: h2: getattr: Diffs: [ 1404 0 0 48373 19113717] Avg_usec : 34.45 +nid001586: h2: mknod: Diffs: [ 9 0 0 6292 5247846] Avg_usec : 699.11 +nid001586: h2: getxattr: Diffs: [ 134 0 0 2234 256844] Avg_usec : 16.67 +nid001586: h2: getxattr_hits: Diffs: [ 102] reqs +nid001586: h2: inode_permission: Diffs: [ 10450 0 0 5047 31595] Avg_usec : .48 +nid001586: h2: opencount: Diffs: [ 204 0 0 1242 10890] Avg_reqs : 6.08 +nid001586: ---------------- +nid001586: /lfs/f1 vaf1-ffff9b4857c44800 : +nid001586: f1: snapshot_time: Diffs: [ 131] secs +nid001586: f1: elapsed_time: Diffs: [ 131] secs +nid001586: f1: ioctl: Diffs: [ 2] reqs +nid001586: f1: getattr: Diffs: [ 11 0 0 34 254] Avg_usec : 3.09 +nid001586: f1: inode_permission: Diffs: [ 2 0 0 2 2] Avg_usec : 1.00 +nid001586: f1: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 +nid001586: ---------------- +nid001586: /lfs/f2 vaf2-ffff9b485864d800 : +nid001586: f2: snapshot_time: Diffs: [ 131] secs +nid001586: f2: elapsed_time: Diffs: [ 131] secs +nid001586: f2: read_bytes: Diffs: [ 20 0 0 117164 1638991042] Avg_bytes: 5858.20 +nid001586: f2: write_bytes: Diffs: [ 18 0 0 29586 101162102] Avg_bytes: 1643.66 +nid001586: f2: read: Diffs: [ 20 0 0 319 9967] Avg_usec : 15.95 +nid001586: f2: write: Diffs: [ 478 0 0 8896 4608274] Avg_usec : 18.61 +nid001586: f2: ioctl: Diffs: [ 14] reqs +nid001586: f2: open: Diffs: [ 23 0 0 870 197714] Avg_usec : 37.82 +nid001586: f2: close: Diffs: [ 23 0 0 1755 277887] Avg_usec : 76.30 +nid001586: f2: seek: Diffs: [ 21 0 0 2 4] Avg_usec : .09 +nid001586: f2: readdir: Diffs: [ 2 0 0 382 145924] Avg_usec : 191.00 +nid001586: f2: getattr: Diffs: [ 38 0 0 5241 2238021] Avg_usec : 137.92 +nid001586: f2: mknod: Diffs: [ 11 0 0 2630 697050] Avg_usec : 239.09 +nid001586: f2: getxattr: Diffs: [ 11 0 0 1405 192623] Avg_usec : 127.72 +nid001586: f2: inode_permission: Diffs: [ 138 0 0 381 9073] Avg_usec : 2.76 +nid001586: f2: opencount: Diffs: [ 25 0 0 56 230] Avg_reqs : 2.24 +nid001586: ---------------- +nid001586: /lfs/h3 vah3-ffff9b485864c000 : +nid001586: h3: snapshot_time: Diffs: [ 131] secs +nid001586: h3: elapsed_time: Diffs: [ 131] secs +nid001586: h3: ioctl: Diffs: [ 2] reqs +nid001586: h3: getattr: Diffs: [ 7 0 0 28 222] Avg_usec : 4.00 +nid001586: h3: inode_permission: Diffs: [ 2 0 0 2 2] Avg_usec : 1.00 +nid001586: h3: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 +nid001586: ---------------- +nid001586: /apps vaf2-ffff9af90dd3c000 : +nid001586: apps: snapshot_time: Diffs: [ 131] secs +nid001586: apps: elapsed_time: Diffs: [ 131] secs +nid001586: apps: read_bytes: Diffs: [ 8932 0 0 156524458 15162452154830] Avg_bytes: 17524.01 +nid001586: apps: read: Diffs: [ 8932 0 0 687028 249289320] Avg_usec : 76.91 +nid001586: apps: ioctl: Diffs: [ 6257] reqs +nid001586: apps: open: Diffs: [ 11317 0 0 865712 209117920] Avg_usec : 76.49 +nid001586: apps: close: Diffs: [ 11317 0 0 658336 149602696] Avg_usec : 58.17 +nid001586: apps: mmap: Diffs: [ 4366 0 0 25839 398123] Avg_usec : 5.91 +nid001586: apps: page_fault: Diffs: [ 88858 0 0 8470 23144] Avg_usec : .09 +nid001586: apps: seek: Diffs: [ 12404 0 0 16 98] Avg_usec : 0 +nid001586: apps: readdir: Diffs: [ 5336 0 0 417487 391882277] Avg_usec : 78.23 +nid001586: apps: getattr: Diffs: [ 49537 0 0 1160030 215639508] Avg_usec : 23.41 +nid001586: apps: getxattr: Diffs: [ 7 0 0 102 5890] Avg_usec : 14.57 +nid001586: apps: getxattr_hits: Diffs: [ 6] reqs +nid001586: apps: inode_permission: Diffs: [ 645142 0 0 91284 230158] Avg_usec : .14 +nid001586: apps: opencount: Diffs: [ 11319 0 0 45857 259427] Avg_reqs : 4.05 +nid001586: ---------------- + +------------------------------------------------------------------ +### Job 136853423.dbqs01 - NFS Statistics for job duration: +#### 2026-08-24A--:--:--.------+--:-- nid001586 Job 136853423.dbqs01 - DEBUG-NFS: Unable to find NFS stats file: /lfs/f2/hpc/jobdata/136853423/nfsstats.136853423.nid001586 + +------------------------------------------------------------------ +### Job 136853423.dbqs01 - Lustre evictions (if present): + +------------------------------------------------------------------ +### Job 136853423.dbqs01 - Exit status is 271 + +------------------------------------------------------------------ +Job 136853423.dbqs01 - Job summary: +Job Id: 136853423.dbqs01 + Job_Name = ESMPy + Job_Owner = keston.smith@dlogin06 + resources_used.cpupercent = 66 + resources_used.cput = 00:00:07 + resources_used.mem = 155244kb + resources_used.ncpus = 16 + resources_used.vmem = 2399784kb + resources_used.walltime = 00:02:07 + job_state = R + queue = dev + server = dbqs01 + Account_Name = NWPS-DEV + Checkpoint = u + ctime = Mon Aug 24 18:34:54 2026 + Error_Path = dlogin06:/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/ + RWPS/dev/compute_interpolation_weights/sorc/ESMPy.e136853423 + exec_host = nid001586/0*16 + exec_vnode = (nid001586:ncpus=16:mem=268435456kb) + Hold_Types = n + Join_Path = oe + Keep_Files = oed + Mail_Points = a + mtime = Mon Aug 24 18:42:26 2026 + Output_Path = dlogin06:/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow + /RWPS/dev/compute_interpolation_weights/sorc/ESMPy.o136853423 + Priority = 0 + qtime = Mon Aug 24 18:34:54 2026 + Rerunable = False + Resource_List.alvl = 2 + Resource_List.aslr = True + Resource_List.debug = True + Resource_List.dfs = False + Resource_List.hyper = True + Resource_List.ldebug = False + Resource_List.mem = 256gb + Resource_List.ncpus = 16 + Resource_List.nodect = 1 + Resource_List.one-shot = False + Resource_List.place = exclhost + Resource_List.select = 1:ncpus=16:mem=256GB + Resource_List.turbo = True + Resource_List.walltime = 04:00:00 + schedselect = 1:ncpus=16:mem=256GB:prepost=False + stime = Mon Aug 24 18:40:14 2026 + session_id = 3933318 + Shell_Path_List = /bin/bash + jobdir = /u/keston.smith + substate = 42 + Variable_List = PBS_O_HOME=/u/keston.smith,PBS_O_LANG=en_US.UTF-8, + PBS_O_LOGNAME=keston.smith, + PBS_O_PATH=/opt/cray/bin:/u/keston.smith/.local/bin:/usr/local/bin:/us + r/bin:/bin:/opt/c3/bin:/opt/pbs/bin:/sbin, + PBS_O_MAIL=/var/spool/mail/keston.smith,PBS_O_SHELL=/bin/bash, + PBS_O_WORKDIR=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWP + S/dev/compute_interpolation_weights/sorc,PBS_O_SYSTEM=Linux, + LMOD_FAMILY_CRAYPE_NETWORK_VERSION=false,meshID=oc_5km_100km, + LD_LIBRARY_PATH=/opt/cray/lib64, + LS_COLORS=no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd= + 40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com + =01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tg + z=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.l + zma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2= + 00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.xz=00;31:*.avi=01;35:*.bmp + =01;35:*.dl=01;35:*.fli=01;35:*.gif=01;35:*.gl=01;35:*.jpg=01;35:*.jpeg + =01;35:*.mkv=01;35:*.mng=01;35:*.mov=01;35:*.mp4=01;35:*.mpg=01;35:*.pc + x=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.svg=01;35:*.t + ga=01;35:*.tif=01;35:*.webm=01;35:*.webp=01;35:*.wmv=01;35:*.xbm=01;35: + *.xcf=01;35:*.xpm=01;35:*.aiff=00;32:*.ape=00;32:*.au=00;32:*.flac=00;3 + 2:*.m4a=00;32:*.mid=00;32:*.mp3=00;32:*.mpc=00;32:*.ogg=00;32:*.voc=00; + 32:*.wav=00;32:*.wma=00;32:*.wv=00;32:,HOSTTYPE=x86_64, + __LMOD_REF_COUNT_PATH=/opt/cray/bin:1;/u/keston.smith/.local/bin:1;/us + r/local/bin:1;/usr/bin:1;/bin:2;/opt/c3/bin:1;/opt/pbs/bin:1;/sbin:1, + _ModuleTable002_=ck5hbWUiXT0iY3JheXBlLW5ldHdvcmstb2ZpIix9LFsiY3JheXBlL + Xg4Ni1yb21lIl09e1siZm4iXT0iL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY3Jh + eXBlLXRhcmdldHMvZGVmYXVsdC9jcmF5cGUteDg2LXJvbWUubHVhIixbImZ1bGxOYW1lIl0 + 9ImNyYXlwZS14ODYtcm9tZSIsWyJsb2FkT3JkZXIiXT0xLHByb3BUPXt9LFsic3RhY2tEZX + B0aCJdPTEsWyJzdGF0dXMiXT0iYWN0aXZlIixbInVzZXJOYW1lIl09ImNyYXlwZS14ODYtc + m9tZSIsfSxlbnZ2YXI9e1siZm4iXT0iL2FwcHMvcHJvZC9sbW9kdWxlcy9zeXNfY29yZS9l + bnZ2YXIvMS4wIixbImZ1bGxOYW1lIl09ImVudnZhci8xLjAiLFsibG9hZE9yZGVyIl09NCx + wcm9wVD17fSxbInN0YWNrRGVwdGgiXT0w, + SSH_CONNECTION=192.58.153.6 58076 192.58.153.16 22, + mesh=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/com + pute_interpolation_weights/sorc/../../..//fix/rwps.oc_5km_100km.msh, + XAUTHLOCALHOSTNAME=dlogin06,LESSCLOSE=lessclose.sh %s %s, + XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB, + LMOD_FAMILY_CRAYPE_CPU=craype-x86-rome, + LMOD_MODULERCFILE=/apps/prod/lmodules/.modulerc.lua, + PE_PRODUCT_LIST=CRAYPE_X86_ROME,LMOD_IGNORE_CACHE=yes,LANG=en_US.UTF-8, + WINDOWMANAGER=xterm,LESS=-M -I -R,DISPLAY=localhost:20.0, + HISTTIMEFORMAT=%F %T,HOSTNAME=dlogin06, + LMOD_SYSTEM_DEFAULT_MODULES=envvar/1.0, + OLDPWD=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/fix, + __LMOD_REF_COUNT__LMFILES_=/opt/cray/pe/lmod/modulefiles/craype-target + s/default/craype-x86-rome.lua:1;/opt/cray/modulefiles/libfabric/1.20.1: + 1;/opt/cray/pe/lmod/modulefiles/craype-targets/default/craype-network-o + fi.lua:1;/apps/prod/lmodules/sys_core/envvar/1.0:1, + CONFIG_SITE=/usr/share/site/x86_64-unknown-linux-gnu,CSHEDIT=emacs, + LMOD_CUSTOM_CNCM_INTEL_19_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX + =/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/apps + /ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4, + LMOD_CUSTOM_COMPILER_GNU_8_0_PREFIX=/apps/prod/lmodules/gcc/11.2.0:/ap + ps/prod/lmodules/gcc/10.2.0,GPG_TTY=/dev/pts/37, + LESS_ADVANCED_PREPROCESSOR=no,COLORTERM=1, + LMOD_FAMILY_CRAYPE_NETWORK=craype-network-ofi, + MACHTYPE=x86_64-suse-linux, + __LMOD_REF_COUNT_LD_LIBRARY_PATH=/opt/cray/lib64:1, + __LMOD_REF_COUNT_PKG_CONFIG_PATH=/opt/cray/lib64/pkgconfig:1, + LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_UCX_1_0_PREFIX=/apps/prod/lmodules/cce + /13.0.0:/apps/prod/lmodules/cce/12.0.3:/apps/prod/lmodules/cce/11.0.4, + tmp=/tmpfiles,SSH_AUTH_SOCK=/tmp/ssh-bJSN2WGiSTA7/agent.2677855, + _ModuleTable004_=U0lPTi9tb2R1bGVmaWxlcyIsIi91c3Ivc2hhcmUvbW9kdWxlcy9tb + 2R1bGVmaWxlcyIsIi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvTGludXgiLCIvdXNyL3NoYXJl + L21vZHVsZWZpbGVzL0NvcmUiLCIvdXNyL3NoYXJlL2xtb2QvbG1vZC9tb2R1bGVmaWxlcy9 + Db3JlIiwiL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY29yZSIsIi9vcHQvY3JheS + 9wZS9sbW9kL21vZHVsZWZpbGVzL2NyYXlwZS10YXJnZXRzL2RlZmF1bHQiLCIvYXBwcy9wc + m9kL2xtb2R1bGVzL3N5c19jb3JlIiwiL2FwcHMvb3BzL3Byb2QvbmNvL21vZHVsZWZpbGVz + L2NvcmUiLCIvYXBwcy9wcm9kL2xtb2R1bGVzL2NvcmUiLCIvb3B0L2NyYXkvbW9kdWxlZml + sZXMiLH0sWyJzeXN0ZW1CYXNlTVBBVEgi,MINICOM=-c on, + QT_SYSTEM_DIR=/usr/share/desktop-data,OSTYPE=linux, + meshname=rwps.oc_5km_100km,USER=keston.smith, + MODULES_SET_SHELL_STARTUP=0,PAGER=less,MODULE_VERSION=3.2.10, + LMOD_CUSTOM_CNCM_GNU_8_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX=/a + pps/prod/lmodules/GCC_cray_mpich/10.2.0/cray-mpich/8.1.4, + LMOD_CUSTOM_CNCM_GNU_8_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX=/a + pps/prod/lmodules/GCC_cray_mpich/10.2.0/cray-mpich/8.1.4, + CRAY_CPU_TARGET=x86-rome, + LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PR + EFIX=/apps/prod/lmodules/CCE_cray_mpich/11.0.4/cray-mpich/8.1.4, + __LMOD_REF_COUNT_MODULEPATH=/opt/cray/pe/lmod/modulefiles/net/ofi/1.0: + 1;/opt/cray/pe/lmod/modulefiles/cpu/x86-rome/1.0:1;/usr/share/modules:1 + ;/usr/share/Modules/$MODULE_VERSION/modulefiles:1;/usr/share/modules/mo + dulefiles:1;/usr/share/modulefiles/Linux:1;/usr/share/modulefiles/Core: + 1;/usr/share/lmod/lmod/modulefiles/Core:1;/opt/cray/pe/lmod/modulefiles + /core:1;/opt/cray/pe/lmod/modulefiles/craype-targets/default:1;/apps/pr + od/lmodules/sys_core:1;/apps/ops/prod/nco/modulefiles/core:1;/apps/prod + /lmodules/core:1;/opt/cray/modulefiles:1, + COMINrrfs=/lfs/h1/ops/prod/com/rrfs/v1.0/rrfs./,MORE=-sl, + __LMOD_REF_COUNT_LOADEDMODULES=craype-x86-rome:1;libfabric/1.20.1:1;cr + aype-network-ofi:1;envvar/1.0:1, + PWD=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp + ute_interpolation_weights/sorc, + COMINrtofs=/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs./, + HOME=/u/keston.smith, + COMINnbm=/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.//grib2, + PELOCAL_PRGENV=true,SSH_AGENT_PID=2677858,HOST=dlogin06, + SSH_CLIENT=192.58.153.6 58076 22,LMOD_VERSION=8.3.1, + XNLSPATH=/usr/share/X11/nls,CRAY_LMOD_CPU=x86-rome/1.0, + LMOD_FAMILY_CRAYPE_CPU_VERSION=false, + BASH_ENV=/usr/share/lmod/lmod/init/bash,XDG_DATA_DIRS=/usr/share, + LMOD_CUSTOM_CNCM_INTEL_19_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX + =/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/apps + /ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4, + CRAY_LMOD_NET=ofi/1.0, + RWPSroot=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev + /compute_interpolation_weights/sorc/../../../,COMINlocal=/tmpfiles, + __LMOD_REF_COUNT_LMOD_CUSTOM_COMPILER_INTEL_19_0_PREFIX=/apps/ops/prod + /nco/models/modulefiles:1;/apps/prod/lmodules/intel/19.1.3.304:1;/apps/ + ops/prod/libs/modulefiles/compiler/intel/19.1.3.304:1;/apps/ops/prod/nc + o/modulefiles/compiler/intel/19.1.3.304:1,LIBGL_DEBUG=quiet, + LMOD_CUSTOM_COMPILER_INTEL_19_0_PREFIX=/apps/ops/prod/nco/models/modul + efiles:/apps/prod/lmodules/intel/19.1.3.304:/apps/ops/prod/libs/modulef + iles/compiler/intel/19.1.3.304:/apps/ops/prod/nco/modulefiles/compiler/ + intel/19.1.3.304,PROFILEREAD=true,LMOD_sys=Linux, + _ModuleTable001_=X01vZHVsZVRhYmxlXz17WyJNVHZlcnNpb24iXT0zLFsiY19yZWJ1a + WxkVGltZSJdPWZhbHNlLFsiY19zaG9ydFRpbWUiXT1mYWxzZSxkZXB0aFQ9e30sZmFtaWx5 + PXtbImNyYXlwZV9jcHUiXT0iY3JheXBlLXg4Ni1yb21lIixbImNyYXlwZV9uZXR3b3JrIl0 + 9ImNyYXlwZS1uZXR3b3JrLW9maSIsfSxtVD17WyJjcmF5cGUtbmV0d29yay1vZmkiXT17Wy + JmbiJdPSIvb3B0L2NyYXkvcGUvbG1vZC9tb2R1bGVmaWxlcy9jcmF5cGUtdGFyZ2V0cy9kZ + WZhdWx0L2NyYXlwZS1uZXR3b3JrLW9maS5sdWEiLFsiZnVsbE5hbWUiXT0iY3JheXBlLW5l + dHdvcmstb2ZpIixbImxvYWRPcmRlciJdPTMscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MSx + bInN0YXR1cyJdPSJhY3RpdmUiLFsidXNl, + LOADEDMODULES=craype-x86-rome:libfabric/1.20.1:craype-network-ofi:envv + ar/1.0,LMOD_AVAIL_STYLE=en_grouped:system,CRAYPE_NETWORK_TARGET=ofi, + _ModuleTable006_=b2R1bGVmaWxlcyIsfQ==, + __LMOD_REF_COUNT_MANPATH=/opt/cray/share/man:1;/usr/share/lmod/lmod/sh + are/man:1;/usr/share/man:1;/opt/c3/man:1;/opt/pbs/share/man:1, + _ModuleTable003_=LFsic3RhdHVzIl09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJdPSJlbnZ2Y + XIvMS4wIix9LGxpYmZhYnJpYz17WyJmbiJdPSIvb3B0L2NyYXkvbW9kdWxlZmlsZXMvbGli + ZmFicmljLzEuMjAuMSIsWyJmdWxsTmFtZSJdPSJsaWJmYWJyaWMvMS4yMC4xIixbImxvYWR + PcmRlciJdPTIscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MixbInN0YXR1cyJdPSJhY3Rpdm + UiLFsidXNlck5hbWUiXT0ibGliZmFicmljIix9LH0sbXBhdGhBPXsiL29wdC9jcmF5L3BlL + 2xtb2QvbW9kdWxlZmlsZXMvbmV0L29maS8xLjAiLCIvb3B0L2NyYXkvcGUvbG1vZC9tb2R1 + bGVmaWxlcy9jcHUveDg2LXJvbWUvMS4wIiwiL3Vzci9zaGFyZS9tb2R1bGVzIiwiL3Vzci9 + zaGFyZS9Nb2R1bGVzLyRNT0RVTEVfVkVS,LMOD_ROOT=/usr/share/lmod, + SSH_TTY=/dev/pts/37,FROM_HEADER=,MAIL=/var/spool/mail/keston.smith, + COMINstofs=/lfs/h1/ops/prod/com/stofs/v3.1/stofs_2d_glo., + LESSKEY=/etc/lesskey.bin,TERM=xterm-256color,SHELL=/bin/bash, + LMOD_ADMIN_FILE=/apps/prod/lmodules/admin.list, + LMOD_CUSTOM_COMPILER_GNU_8_0_UCX_1_0_PREFIX=/apps/prod/lmodules/gcc/11 + .2.0:/apps/prod/lmodules/gcc/10.2.0,lmod_prefix_path=/usr/share, + LMOD_CUSTOM_COMPILER_CRAYCLANG_10_0_PREFIX=/apps/prod/lmodules/cce/13. + 0.0:/apps/prod/lmodules/cce/12.0.3:/apps/prod/lmodules/cce/11.0.4, + _ModuleTable_Sz_=6,LS_OPTIONS=-N --color=tty -T 0, + LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PR + EFIX=/apps/prod/lmodules/CCE_cray_mpich/11.0.4/cray-mpich/8.1.4, + TMOUT=1800,PYTHONSTARTUP=/etc/pythonstart, + RWPSfix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPS,SHLVL=3, + LANGUAGE=en_US.UTF-8,G_FILENAME_ENCODING=@locale\,UTF-8\,ISO-8859-15\, + CP1252, + LMOD_CUSTOM_COMPILER_INTEL_19_0_UCX_1_0_PREFIX=/apps/prod/lmodules/int + el/19.1.3.304:/apps/ops/prod/libs/modulefiles/compiler/intel/19.1.3.304 + :/apps/ops/prod/nco/modulefiles/compiler/intel/19.1.3.304, + HPC_OPT=/apps/ops/prod/libs, + MANPATH=/opt/cray/share/man:/usr/share/lmod/lmod/share/man:/usr/share/ + man:/opt/c3/man:/opt/pbs/share/man,OSCAR_HOME=/opt/oscar, + fix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp + ute_interpolation_weights/sorc/../../..//fix, + MODULEPATH=/opt/cray/pe/lmod/modulefiles/net/ofi/1.0:/opt/cray/pe/lmod + /modulefiles/cpu/x86-rome/1.0:/usr/share/modules:/usr/share/Modules/$MO + DULE_VERSION/modulefiles:/usr/share/modules/modulefiles:/usr/share/modu + lefiles/Linux:/usr/share/modulefiles/Core:/usr/share/lmod/lmod/modulefi + les/Core:/opt/cray/pe/lmod/modulefiles/core:/opt/cray/pe/lmod/modulefil + es/craype-targets/default:/apps/prod/lmodules/sys_core:/apps/ops/prod/n + co/modulefiles/core:/apps/prod/lmodules/core:/opt/cray/modulefiles, + LOGNAME=keston.smith,MODULE_VERSION_STACK=3.2.10, + MODULEPATH_ROOT=/usr/share/modulefiles, + LMOD_PACKAGE_PATH=/apps/prod/lmodules,XDG_CONFIG_DIRS=/etc/xdg, + PATH=/opt/cray/bin:/u/keston.smith/.local/bin:/usr/local/bin:/usr/bin: + /bin:/opt/c3/bin:/opt/pbs/bin:/sbin, + __LMOD_REF_COUNT_PE_PRODUCT_LIST=CRAYPE_X86_ROME:1, + _LMFILES_=/opt/cray/pe/lmod/modulefiles/craype-targets/default/craype- + x86-rome.lua:/opt/cray/modulefiles/libfabric/1.20.1:/opt/cray/pe/lmod/m + odulefiles/craype-targets/default/craype-network-ofi.lua:/apps/prod/lmo + dules/sys_core/envvar/1.0,MODULESHOME=/usr/share/lmod/lmod, + PKG_CONFIG_PATH=/opt/cray/lib64/pkgconfig, + LMOD_SETTARG_FULL_SUPPORT=no,INFOPATH=:/apps/docs/info, + G_BROKEN_FILENAMES=1,HISTSIZE=10000,LMOD_PKG=/usr/share/lmod/lmod, + CPU=x86_64, + _ModuleTable005_=XT0iL3Vzci9zaGFyZS9tb2R1bGVzOi91c3Ivc2hhcmUvTW9kdWxlc + y8kTU9EVUxFX1ZFUlNJT04vbW9kdWxlZmlsZXM6L3Vzci9zaGFyZS9tb2R1bGVzL21vZHVs + ZWZpbGVzOi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvTGludXg6L3Vzci9zaGFyZS9tb2R1bGV + maWxlcy9Db3JlOi91c3Ivc2hhcmUvbG1vZC9sbW9kL21vZHVsZWZpbGVzL0NvcmU6L29wdC + 9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY29yZTovb3B0L2NyYXkvcGUvbG1vZC9tb2R1b + GVmaWxlcy9jcmF5cGUtdGFyZ2V0cy9kZWZhdWx0Oi9hcHBzL3Byb2QvbG1vZHVsZXMvc3lz + X2NvcmU6L2FwcHMvb3BzL3Byb2QvbmNvL21vZHVsZWZpbGVzL2NvcmU6L2FwcHMvcHJvZC9 + sbW9kdWxlcy9jb3JlOi9vcHQvY3JheS9t, + LMOD_CMD=/usr/share/lmod/lmod/libexec/lmod,CVS_RSH=ssh, + LESSOPEN=lessopen.sh %s,LMOD_DIR=/usr/share/lmod/lmod/libexec, + LC_TIME=C.UTF-8, + BASH_FUNC_module%%=() { eval $($LMOD_CMD bash \"$@\") && eval $(${LMO + D_SETTARG_CMD:-:} -s sh) + euser = keston.smith + egroup = emc + hashname = 136853423.dbqs01 + queue_rank = 1787596494650877 + queue_type = E + comment = Job run at Mon Aug 24 at 18:40 on (nid001586:ncpus=16:mem=2684354 + 56kb) and terminated by keston.smith@dlogin01.dogwood.wcoss2.ncep.noaa. + gov + etime = Mon Aug 24 18:34:54 2026 + umask = 22 + run_count = 6 + eligible_time = 00:05:26 + accrue_type = 3 + Submit_arguments = -V /lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/ + RWPS/dev/compute_interpolation_weights/sorc/../../..//dev/compute_inter + polation_weights/ecf/compute_interpolation_weights.ecf + project = NWPS-DEV + run_version = 1 + Submit_Host = dlogin06 + server_instance_id = dbqs01.dogwood.wcoss2.ncep.noaa.gov:15001 + + +------------------------------------------------------------------ +Job 136853423.dbqs01 - PBS tracejob output (for parent mom node only): + +Job: 136853423.dbqs01 + +08/24/2026 18:40:14 M update_job_usage: CPU usage: 0.000 secs +08/24/2026 18:40:14 M update_job_usage: cpupercent initialized to zero +08/24/2026 18:40:14 M update_job_usage: Memory usage: mem=0b +08/24/2026 18:40:18 M Started, pid = 3933318 +08/24/2026 18:40:24 M update_job_usage: CPU usage: 7.000 secs +08/24/2026 18:40:24 M update_job_usage: 136853423.dbqs01 measured interval cpupercent 66 increased job cpupercent to 66 +08/24/2026 18:40:24 M update_job_usage: Memory usage: mem=155244kb +08/24/2026 18:42:13 M signal job request received +08/24/2026 18:42:13 M signal job with TermJob +08/24/2026 18:42:13 M kill_job +08/24/2026 18:42:13 M task 00000001 terminated +08/24/2026 18:42:25 M no active process for task 00000001 +08/24/2026 18:42:25 M Terminated +08/24/2026 18:42:25 M task 00000001 cput=00:01:53 +08/24/2026 18:42:25 M kill_job +08/24/2026 18:42:25 M nid001586 cput=00:00:07 mem=155244kb +08/24/2026 18:42:25 M update_job_usage: CPU usage: 128.000 secs +08/24/2026 18:42:25 M update_job_usage: 136853423.dbqs01 measured interval cpupercent 100 increased job cpupercent to 100 +08/24/2026 18:42:25 M update_job_usage: Memory usage: mem=2777012kb +08/24/2026 18:42:26 M update_job_usage: CPU usage: 128.000 secs +08/24/2026 18:42:26 M update_job_usage: Memory usage: mem=2777012kb +08/24/2026 18:42:26 M no active tasks + +------------------------------------------------------------------ +To see full PBS log data, run: /sfs/admin/scripts/tracejob.sh 136853423.dbqs01 + +================================================================== +END - DEBUG INFO +================================================================== + +Job 136853423.dbqs01 - Epilogue DEBUG complete. DEBUG Execution time: 6 seconds +Job 136853423.dbqs01 - Epilogue complete. Execution time: 8 seconds +##### Job 136853423.dbqs01 - PBS Job Script: +(Note: Duplicate #PBS entries are a function how PBS interprets and caches the original job script.) + +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=04:00:00 +##PBS -l select=1:ncpus=8:mem=128GB +#PBS -l select=1:ncpus=16:mem=256GB +##PBS -l select=1:ncpus=32:mem=256GB +###PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + + +# Compute interpolation weights and distance to boundary for a RWPS mesh. +# Files are created in local RWPS/fix directory. + +pip list -v + +cd $RWPSroot/ush/preprocess + +SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" +date="20260730" +cycl="00" +Nprocs=16 + + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +rrfs_hi=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.hi.nc +rrfs_pr=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.pr.nc +rrfs_ak=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.ak.nc +rrfs_na=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.na.nc +rrfs_conus=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.conus.nc + +out="../../fix" + +rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" +rrfsDst="$out/DistToBndy.$meshname.rrfs" + +#no extrapolation with rrfs forecasts +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_pr $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 > GenWhts.rrfs.pr.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_ak $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 > GenWhts.rrfs.ak.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_na $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 > GenWhts.rrfs.na.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_conus $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out + +nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc +nbmIntrp="$out/InterpolationWeights.$meshname.nbm" +nbmDst="$out/DistToBndy.$meshname.nbm" +#extrapolate nbm oc wind to all points +python ./compute_gridded_to_rwps_interp_weights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out + +nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc +#do not extrapolate for NBM .ak. domain +python ./compute_gridded_to_rwps_interp_weights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out + +rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc +rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" +rtofsDst="$out/DistToBndy.$meshname.rtofs" + +#extrapolate rtofs .glo. for full ice coverage + +python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out + + +rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc +#do not extrapolate rtofs .glo. currents +python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.current.nc $rtofsDst.current.nc -1 > GenWhts.rtofs.current.out + + + +#Old v2 of stofs +stofs_glo="$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" + +mkdir -p STOFSInterpWeights.$meshname +## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs + +## Now run parallel job script + +qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS + +wait + +#combine text file output of parallel jobs +cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt + +# convert output weights to netcdf file +python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 +cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.v2.nc +cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.v2.nc +mv DistToBndy.$meshname.stofs.nc DistToBndy.$meshname.stofs.v2.nc +mv InterpWeights.$meshname.stofs.nc InterpWeights.$meshname.stofs.v2.nc + +rm -rf STOFSInterpWeights.$meshname +rm InterpWeights.$meshname.stofs.txt +rm *.out +rm ESMPy* + + +mkdir -p STOFSInterpWeights.$meshname +#compute stofs weights for current(v3) stofs mesh +stofs_glo="$SID/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc" + +## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs + +## Now run parallel job script + +qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS + +wait + +#combine text file output of parallel jobs +cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt + +# convert output weights to netcdf file +python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 +cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc +cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc + + +rm -rf STOFSInterpWeights.$meshname +rm InterpWeights.$meshname.stofs.txt +rm *.out +rm ESMPy* + + + + +##### End of job script +------------------------------------------------------------------ + diff --git a/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136854537 b/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136854537 new file mode 100644 index 0000000..5fb932f --- /dev/null +++ b/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136854537 @@ -0,0 +1,1246 @@ +PBS: Running prologue on parent mom node: nid003409... +Job 136854537.dbqs01 nodelist: nid003409 +Job 136854537.dbqs01 - Prologue complete. Execution time: 5 seconds +Agent pid 562728 +Identity added: /u/keston.smith/.ssh/id_ed25519 (keston.smith@noaa.gov) +/u/keston.smith/.bashrc: line 46: alias: eval "$(ssh-agent -s)"; ssh-add ~/.ssh/id_ed25519: not found +Resetting modules to system default. Reseting $MODULEPATH back to system default. All extra directories will be removed from $MODULEPATH. +Package Version Location Installer +------------------------- ----------- ---------------------------------------------------------------------------------- --------- +Cartopy 0.24.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +certifi 2025.1.31 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +cftime 1.6.4.post1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +contourpy 1.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +cycler 0.12.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +esmpy 8.6.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +fonttools 4.55.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +geographiclib 2.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +geopy 2.4.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +Jinja2 3.1.5 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +kiwisolver 1.4.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +MarkupSafe 3.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +matplotlib 3.10.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +netCDF4 1.7.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +numpy 2.2.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +packaging 24.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pandas 2.2.3 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pillow 11.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pip 25.0.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pyparsing 3.2.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pyproj 3.7.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pyshp 2.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +python-dateutil 2.9.0.post0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pytz 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +PyYAML 6.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +scipy 1.15.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +setuptools 75.8.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +setuptools-git-versioning 2.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +shapely 2.0.7 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +six 1.17.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +tzdata 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +xarray 2025.1.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in + iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights + regrid = esmpy.Regrid( + ^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ + self._routehandle = ESMP_FieldRegridStoreFile( + ^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile + raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ +ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in + iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights + regrid = esmpy.Regrid( + ^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ + self._routehandle = ESMP_FieldRegridStoreFile( + ^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile + raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ +ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in + iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights + regrid = esmpy.Regrid( + ^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ + self._routehandle = ESMP_FieldRegridStoreFile( + ^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile + raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ +ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in + iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights + regrid = esmpy.Regrid( + ^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ + self._routehandle = ESMP_FieldRegridStoreFile( + ^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile + raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ +ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in + iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights + regrid = esmpy.Regrid( + ^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ + self._routehandle = ESMP_FieldRegridStoreFile( + ^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile + raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ +ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in + with xr.open_dataset(weights_file, overwrite=True) as ds_s: + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset + backend_ds = backend.open_dataset( + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in + with xr.open_dataset(weights_file, overwrite=True) as ds_s: + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset + backend_ds = backend.open_dataset( + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' +PBS: Running epilogue on parent mom node: nid003409... +================================================================== +BEGIN - DEBUG INFO +================================================================== +Job 136854537.dbqs01 - Post Job Mem Usage: +nid003409: 2026-08-24.21 1 =========================================== +nid003409: 2026-08-24.21 2 #### Node Memory Usage for nid003409 #### +nid003409: 2026-08-24.21 3 ------------------ +nid003409: 2026-08-24.21 4 Mem: total:526983528 used:13236552 free:514828776 shared:457636 cache:1057272 avail:513746976 +nid003409: 2026-08-24.21 5 4.0K /dev/shm +nid003409: 2026-08-24.21 6 40K /tmp +nid003409: 2026-08-24.21 7 =========================================== +nid003409: 2026-08-24.10 1 =========================================== +nid003409: 2026-08-24.10 2 #### Node Memory Usage for nid003409 #### +nid003409: 2026-08-24.10 3 ------------------ +nid003409: 2026-08-24.10 4 Mem: total:526983528 used:14017704 free:512946524 shared:457652 cache:2923004 avail:512965824 +nid003409: 2026-08-24.10 5 4.0K /dev/shm +nid003409: 2026-08-24.10 6 40K /tmp +nid003409: 2026-08-24.10 7 =========================================== + +------------------------------------------------------------------ +------------------------------------------------------------------ +Job 136854537.dbqs01 - Post Job Mem Usage Profile: +2026-08-24A--:--:--.------+--:-- nid003409 #### nid003409 - Job 136854537.dbqs01 NUMA Node Memory Allocation and Fragmentation Reports +Starting Fragmentation Report for nid003409 +Node Order9 Order10 Score MB_Free %Free State +0 2772 10501 23774 47548 75 OK +1 2550 11439 25428 50856 78 OK +2 2646 11642 25930 51860 80 OK +3 2567 12665 27897 55794 86 OK +4 2452 12908 28268 56536 87 OK +5 1342 14232 29806 59612 92 OK +6 1520 13447 28414 56828 88 OK +7 1240 14165 29570 59140 91 OK + +** nid003409 : node0_score=23774 node0_state=OK uptime=4671519s Overall=OK ** +Ending Fragmentation Report for nid003409 +Node Order9 Order10 Score MB_Free %Free State +0 2752 10531 23814 47628 75 OK +1 2534 11459 25452 50904 78 OK +2 2637 11651 25939 51878 80 OK +3 2568 12668 27904 55808 86 OK +4 2439 12922 28283 56566 87 OK +5 1341 14235 29811 59622 92 OK +6 1516 13452 28420 56840 88 OK +7 1237 14169 29575 59150 91 OK + +** nid003409 : node0_score=23814 node0_state=OK uptime=4671807s Overall=OK ** +2026-08-24A--:--:--.------+--:-- nid003409 #### nid003409 - Job 136854537.dbqs01 VMSTATS Memory Report +**Only Printing Significant Findings - TEST CODE - Results are NOT positive indication of a problem. ** +nid003409 [!] Inactive file cache ballooned: 438647 (threshold: 100000) + +------------------------------------------------------------------ +Job 136854537.dbqs01 - /var/log/messages for job duration: +2026-08-24A--:--:--.------+--:-- nid003409 #### nid003409 - Job 136854537.dbqs01 Runtime Data from /var/log/messages +nid003409: nid003409 #### nid003409 - Job 136854537.dbqs01 Runtime Data from /var/log/messages +nid003409: 2026-08-24T18:49:21.318831+00:00 nid003409 prologue: MARK: Job 136854537.dbqs01 Start +nid003409: 2026-08-24T18:49:21.324496+00:00 nid003409 prologue: Job 136854537.dbqs01 nodelist: nid003409 +nid003409: 2026-08-24T18:49:21.326249+00:00 nid003409 prologue: Job 136854537.dbqs01 - Recording pre-execution stats and counters... +nid003409: 2026-08-24T18:49:21.357982+00:00 nid003409 prologue: Job 136854537.dbqs01 - Killing any stray user processes... +nid003409: 2026-08-24T18:49:21.435425+00:00 nid003409 prologue: Job 136854537.dbqs01 - Clearing /tmp... +nid003409: 2026-08-24T18:49:21.452682+00:00 nid003409 prologue: Job 136854537.dbqs01 - Verifying key post-boot workarounds with warchk... +nid003409: 2026-08-24T18:49:21.482526+00:00 nid003409 WARCHK: root : /sfs/admin/scripts/warchk --batch +nid003409: 2026-08-24T18:49:21.679906+00:00 nid003409 prologue: Job 136854537.dbqs01 - Recording pre-job memory usage... +nid003409: 2026-08-24T18:49:21.760267+00:00 nid003409 prologue: Job 136854537.dbqs01 - FRAG_STATE: ** nid003409 : node0_score=23774 node0_state=OK uptime=4671519s Overall=OK ** +nid003409: 2026-08-24T18:49:21.761334+00:00 nid003409 prologue: Job 136854537.dbqs01 - Recording pre-job HSN counters... +nid003409: 2026-08-24T18:49:21.880265+00:00 nid003409 prologue: Job 136854537.dbqs01 - Recording pre-job Lustre counters... +nid003409: 2026-08-24T18:49:22.954537+00:00 nid003409 prologue: Job 136854537.dbqs01 - Recording initial NFS client statistics... +nid003409: 2026-08-24T18:49:22.965794+00:00 nid003409 prologue: Job 136854537.dbqs01 - Saving a copy of the job script... +nid003409: 2026-08-24T18:49:22.974737+00:00 nid003409 prologue: Job 136854537.dbqs01 - Checking existing ASLR settings... +nid003409: 2026-08-24T18:49:22.980307+00:00 nid003409 prologue: Job 136854537.dbqs01 - Checking palsd open file count... +nid003409: 2026-08-24T18:49:23.071522+00:00 nid003409 PBS_CMD: root : /opt/pbs/bin/qstat -Bf +nid003409: 2026-08-24T18:49:24.124495+00:00 nid003409 prologue: Job 136854537.dbqs01 - Checking one-shot enabled: False +nid003409: 2026-08-24T18:49:24.125593+00:00 nid003409 prologue: Job 136854537.dbqs01 - Enabling turboboost... +nid003409: 2026-08-24T18:49:24.128380+00:00 nid003409 prologue: Job 136854537.dbqs01 - Checking warchk results... +nid003409: 2026-08-24T18:49:24.131491+00:00 nid003409 prologue: Job 136854537.dbqs01 - Warchk Complete +nid003409: 2026-08-24T18:49:24.133786+00:00 nid003409 prologue: Job 136854537.dbqs01 - Prologue complete. Execution time: 5 seconds +nid003409: 2026-08-24T18:50:09.938906+00:00 nid003409 kernel: [4671307.289038][T13202] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid003409: 2026-08-24T18:54:10.221298+00:00 nid003409 epilogue: Job 136854537.dbqs01 complete, running post-job actions. +nid003409: 2026-08-24T18:54:10.241470+00:00 nid003409 epilogue: MARK: Job 136854537.dbqs01 Complete. + +------------------------------------------------------------------ +Job 136854537.dbqs01 - dmesg output for job duration: +2026-08-24A--:--:--.------+--:-- nid003409 #### nid003409 - Job 136854537.dbqs01 Runtime Data from dmesg +nid003409: nid003409 #### nid003409 - Job 136854537.dbqs01 Runtime Data from dmesg +nid003409: [Mon Aug 24 18:45:00 2026] MARK: Job 136854537.dbqs01 Start +nid003409: [Mon Aug 24 18:45:49 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid003409: [Mon Aug 24 18:49:49 2026] MARK: Job 136854537.dbqs01 Complete. + +------------------------------------------------------------------ +Job 136854537.dbqs01 - Pre/Post job diff on HSN (MLX) Counters: +2026-08-24A--:--:--.------+--:-- nid003409 #### nid003409 - Job 136854537.dbqs01 HSN0 MLX Counter Post-Job Difference +nid003409: multicast:: 6868658 | multicast:: 6868717 | Diff: 59 +nid003409: rx_bytes:: 157209729693 | rx_bytes:: 157209943809 | Diff: 214116 +nid003409: rx_packets:: 31836333 | rx_packets:: 31836668 | Diff: 335 +nid003409: tx_bytes:: 103294324119 | tx_bytes:: 103294455541 | Diff: 131422 +nid003409: tx_packets:: 20964120 | tx_packets:: 20964521 | Diff: 401 +nid003409: port_rcv_data:: 153684810153467 | port_rcv_data:: 153685034522950 | Diff: 224369483 +nid003409: port_rcv_packets:: 240431339665 | port_rcv_packets:: 240431682354 | Diff: 342689 +nid003409: port_xmit_data:: 149794720738702 | port_xmit_data:: 149795225060326 | Diff: 504321624 +nid003409: port_xmit_packets:: 238821775557 | port_xmit_packets:: 238822370130 | Diff: 594573 +nid003409: unicast_rcv_packets:: 240431339665 | unicast_rcv_packets:: 240431682354 | Diff: 342689 +nid003409: unicast_xmit_packets:: 238821775557 | unicast_xmit_packets:: 238822370130 | Diff: 594573 +nid003409: resp_cqe_error:: 77766 | resp_cqe_error:: 77784 | Diff: 18 +nid003409: resp_cqe_flush_error:: 74108 | resp_cqe_flush_error:: 74125 | Diff: 17 +nid003409: rx_write_requests:: 41050680 | rx_write_requests:: 41060291 | Diff: 9611 + +------------------------------------------------------------------ +Job 136854537.dbqs01 - Pre/Post job diff for Lustre Stats: +2026-08-24A--:--:--.------+--:-- nid003409 #### nid003409 - Job 136854537.dbqs01 Lustre Counters Post-Job Difference +nid003409: ### LustreStats: Multi-value diffs correspond to [samples min max total sum_of_squares] ### +nid003409: /lfs/h1 vah1-ffff94ee483d2000 : +nid003409: h1: snapshot_time: Diffs: [ 289] secs +nid003409: h1: elapsed_time: Diffs: [ 289] secs +nid003409: h1: ioctl: Diffs: [ 2] reqs +nid003409: h1: getattr: Diffs: [ 15 0 0 61 1085] Avg_usec : 4.06 +nid003409: h1: inode_permission: Diffs: [ 2 0 0 2 2] Avg_usec : 1.00 +nid003409: h1: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 +nid003409: ---------------- +nid003409: /lfs/h2 vah2-ffff94ee483d3800 : +nid003409: h2: snapshot_time: Diffs: [ 289] secs +nid003409: h2: elapsed_time: Diffs: [ 289] secs +nid003409: h2: read_bytes: Diffs: [ 15312 0 0 361750965 7542816781202163] Avg_bytes: 23625.32 +nid003409: h2: write_bytes: Diffs: [ 689 0 0 1990834213 8160800327146371] Avg_bytes: 2889454.59 +nid003409: h2: read: Diffs: [ 15295 0 0 3085043 293929843099] Avg_usec : 201.70 +nid003409: h2: write: Diffs: [ 752 0 0 1154945 2832924837] Avg_usec : 1535.83 +nid003409: h2: ioctl: Diffs: [ 649] reqs +nid003409: h2: open: Diffs: [ 208 0 0 34092 13432148] Avg_usec : 163.90 +nid003409: h2: close: Diffs: [ 209 0 0 17169 4364695] Avg_usec : 82.14 +nid003409: h2: seek: Diffs: [ 3928 0 0 647 99769] Avg_usec : .16 +nid003409: h2: readdir: Diffs: [ 34 0 0 3937 1657585] Avg_usec : 115.79 +nid003409: h2: truncate: Diffs: [ 71 0 0 1673034 613464354878] Avg_usec : 23563.85 +nid003409: h2: flock: Diffs: [ 24 0 0 2193 424267] Avg_usec : 91.37 +nid003409: h2: getattr: Diffs: [ 1772 0 0 43079 15473757] Avg_usec : 24.31 +nid003409: h2: mkdir: Diffs: [ 1 0 0 1025 1050625] Avg_usec : 1025.00 +nid003409: h2: mknod: Diffs: [ 5 0 0 2054 1205822] Avg_usec : 410.80 +nid003409: h2: rename: Diffs: [ 1 0 0 389 151321] Avg_usec : 389.00 +nid003409: h2: getxattr: Diffs: [ 122 0 0 3070 358910] Avg_usec : 25.16 +nid003409: h2: getxattr_hits: Diffs: [ 88] reqs +nid003409: h2: inode_permission: Diffs: [ 13434 0 0 6548 38184] Avg_usec : .48 +nid003409: h2: opencount: Diffs: [ 210 0 0 1020 8312] Avg_reqs : 4.85 +nid003409: ---------------- +nid003409: /lfs/f1 vaf1-ffff94ee483d1000 : +nid003409: f1: snapshot_time: Diffs: [ 289] secs +nid003409: f1: elapsed_time: Diffs: [ 288] secs +nid003409: f1: ioctl: Diffs: [ 2] reqs +nid003409: f1: getattr: Diffs: [ 11 0 0 30 186] Avg_usec : 2.72 +nid003409: f1: inode_permission: Diffs: [ 2 0 0 2 2] Avg_usec : 1.00 +nid003409: f1: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 +nid003409: ---------------- +nid003409: /lfs/f2 vaf2-ffff94ee1c814800 : +nid003409: f2: snapshot_time: Diffs: [ 289] secs +nid003409: f2: elapsed_time: Diffs: [ 288] secs +nid003409: f2: read_bytes: Diffs: [ 28 0 0 338606 9271382370] Avg_bytes: 12093.07 +nid003409: f2: write_bytes: Diffs: [ 18 0 0 29262 98981158] Avg_bytes: 1625.66 +nid003409: f2: read: Diffs: [ 28 0 0 325 6267] Avg_usec : 11.60 +nid003409: f2: write: Diffs: [ 472 0 0 8792 4526556] Avg_usec : 18.62 +nid003409: f2: ioctl: Diffs: [ 14] reqs +nid003409: f2: open: Diffs: [ 23 0 0 665 104753] Avg_usec : 28.91 +nid003409: f2: close: Diffs: [ 23 0 0 2236 698796] Avg_usec : 97.21 +nid003409: f2: seek: Diffs: [ 37 0 0 2157 744751] Avg_usec : 58.29 +nid003409: f2: readdir: Diffs: [ 2 0 0 392 153664] Avg_usec : 196.00 +nid003409: f2: getattr: Diffs: [ 38 0 0 5389 2595479] Avg_usec : 141.81 +nid003409: f2: mknod: Diffs: [ 11 0 0 2969 1006545] Avg_usec : 269.90 +nid003409: f2: getxattr: Diffs: [ 11 0 0 1363 178553] Avg_usec : 123.90 +nid003409: f2: inode_permission: Diffs: [ 138 0 0 283 4861] Avg_usec : 2.05 +nid003409: f2: opencount: Diffs: [ 25 0 0 56 230] Avg_reqs : 2.24 +nid003409: ---------------- +nid003409: /lfs/h3 vah3-ffff94ee75d9a800 : +nid003409: h3: snapshot_time: Diffs: [ 289] secs +nid003409: h3: elapsed_time: Diffs: [ 288] secs +nid003409: h3: ioctl: Diffs: [ 2] reqs +nid003409: h3: getattr: Diffs: [ 7 0 0 26 194] Avg_usec : 3.71 +nid003409: h3: inode_permission: Diffs: [ 2 0 0 2 2] Avg_usec : 1.00 +nid003409: h3: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 +nid003409: ---------------- +nid003409: /apps vaf2-ffff94ee75d9c000 : +nid003409: apps: snapshot_time: Diffs: [ 289] secs +nid003409: apps: elapsed_time: Diffs: [ 289] secs +nid003409: apps: read_bytes: Diffs: [ 11471 0 0 206502228 20083556325462] Avg_bytes: 18002.11 +nid003409: apps: read: Diffs: [ 11471 0 0 704795 246064883] Avg_usec : 61.44 +nid003409: apps: ioctl: Diffs: [ 8177] reqs +nid003409: apps: open: Diffs: [ 14118 0 0 883286 181319070] Avg_usec : 62.56 +nid003409: apps: close: Diffs: [ 14118 0 0 673723 127921805] Avg_usec : 47.72 +nid003409: apps: mmap: Diffs: [ 5796 0 0 33792 504016] Avg_usec : 5.83 +nid003409: apps: page_fault: Diffs: [ 117584 0 0 8829 24361] Avg_usec : .07 +nid003409: apps: seek: Diffs: [ 16218 0 0 11 37] Avg_usec : 0 +nid003409: apps: readdir: Diffs: [ 6182 0 0 413021 351232631] Avg_usec : 66.81 +nid003409: apps: getattr: Diffs: [ 62505 0 0 1230883 201168087] Avg_usec : 19.69 +nid003409: apps: getxattr: Diffs: [ 9 0 0 139 10191] Avg_usec : 15.44 +nid003409: apps: getxattr_hits: Diffs: [ 8] reqs +nid003409: apps: inode_permission: Diffs: [ 833870 0 0 113565 273295] Avg_usec : .13 +nid003409: apps: opencount: Diffs: [ 14120 0 0 54733 317469] Avg_reqs : 3.87 +nid003409: ---------------- + +------------------------------------------------------------------ +### Job 136854537.dbqs01 - NFS Statistics for job duration: +#### 2026-08-24A--:--:--.------+--:-- nid003409 Job 136854537.dbqs01 - DEBUG-NFS: Unable to find NFS stats file: /lfs/f2/hpc/jobdata/136854537/nfsstats.136854537.nid003409 + +------------------------------------------------------------------ +### Job 136854537.dbqs01 - Lustre evictions (if present): + +------------------------------------------------------------------ +### Job 136854537.dbqs01 - Exit status is 271 + +------------------------------------------------------------------ +Job 136854537.dbqs01 - Job summary: +Job Id: 136854537.dbqs01 + Job_Name = ESMPy + Job_Owner = keston.smith@dlogin01.dogwood.wcoss2.ncep.noaa.gov + resources_used.cpupercent = 107 + resources_used.cput = 00:04:47 + resources_used.mem = 7615468kb + resources_used.ncpus = 16 + resources_used.vmem = 7241356kb + resources_used.walltime = 00:04:45 + job_state = R + queue = dev + server = dbqs01 + Account_Name = NWPS-DEV + Checkpoint = u + ctime = Mon Aug 24 18:43:28 2026 + Error_Path = dlogin01.dogwood.wcoss2.ncep.noaa.gov:/lfs/h2/emc/couple/noscr + ub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/sor + c/ESMPy.e136854537 + exec_host = nid003409/0*16 + exec_vnode = (nid003409:ncpus=16:mem=268435456kb) + Hold_Types = n + Join_Path = oe + Keep_Files = oed + Mail_Points = a + mtime = Mon Aug 24 18:54:12 2026 + Output_Path = dlogin01.dogwood.wcoss2.ncep.noaa.gov:/lfs/h2/emc/couple/nosc + rub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/so + rc/ESMPy.o136854537 + Priority = 0 + qtime = Mon Aug 24 18:43:28 2026 + Rerunable = False + Resource_List.alvl = 2 + Resource_List.aslr = True + Resource_List.debug = True + Resource_List.dfs = False + Resource_List.hyper = True + Resource_List.ldebug = False + Resource_List.mem = 256gb + Resource_List.ncpus = 16 + Resource_List.nodect = 1 + Resource_List.one-shot = False + Resource_List.place = exclhost + Resource_List.select = 1:ncpus=16:mem=256GB + Resource_List.turbo = True + Resource_List.walltime = 04:00:00 + schedselect = 1:ncpus=16:mem=256GB:prepost=False + stime = Mon Aug 24 18:49:20 2026 + session_id = 560784 + Shell_Path_List = /bin/bash + jobdir = /u/keston.smith + substate = 42 + Variable_List = PBS_O_HOME=/u/keston.smith,PBS_O_LANG=en_US.UTF-8, + PBS_O_LOGNAME=keston.smith, + PBS_O_PATH=/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/bin:/ + apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfatslqmcrzo5kb4raaq + /bin:/apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5lndzgkkqq36y4a2h4y + x3ahdy/bin:/pe/intel/compilers_and_libraries_2020.4.304/linux/bin/intel + 64:/pe/intel/compilers_and_libraries_2020.4.304/linux/bin:/pe/intel/com + pilers_and_libraries_2020.4.304/linux/mpi/intel64/bin:/pe/intel/debugge + r_2020/gdb/intel64/bin:/opt/cray/pe/craype/2.7.17/bin:/opt/cray/bin:/ap + ps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__ + e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6.0/bin:/apps/ + prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8 + .6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9.2/bin:/apps/p + rod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8. + 6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf5/1.14.0/bin:/opt/cray + /pe/mpich/8.1.19/bin:/u/keston.smith/.local/bin:/usr/local/bin:/usr/bin + :/bin:/opt/c3/bin:/opt/pbs/bin:/sbin:/opt/cray/pe/bin, + PBS_O_MAIL=/var/spool/mail/keston.smith,PBS_O_SHELL=/bin/bash, + PBS_O_WORKDIR=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWP + S/dev/compute_interpolation_weights/sorc,PBS_O_SYSTEM=Linux, + CRAY_LMOD_MPI=cray-mpich/8.0,LMOD_FAMILY_CRAYPE_NETWORK_VERSION=false, + meshID=oc_5km_100km, + LD_LIBRARY_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcf + atslqmcrzo5kb4raaq/lib:/apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5 + lndzgkkqq36y4a2h4yx3ahdy/lib:/pe/intel/compilers_and_libraries_2020.4.3 + 04/linux/compiler/lib/intel64_lin:/pe/intel/compilers_and_libraries_202 + 0.4.304/linux/mpi/intel64/lib/release:/pe/intel/compilers_and_libraries + _2020.4.304/linux/mpi/intel64/lib:/pe/intel/compilers_and_libraries_202 + 0.4.304/linux/ipp/lib/intel64:/pe/intel/compilers_and_libraries_2020.4. + 304/linux/mkl/lib/intel64_lin:/pe/intel/compilers_and_libraries_2020.4. + 304/linux/tbb/lib/intel64/gcc4.8:/pe/intel/debugger_2020/python/intel64 + /lib:/pe/intel/debugger_2020/libipt/intel64/lib:/opt/cray/lib64:/apps/p + rod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8. + 6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6.0/lib:/apps/prod + /hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0 + pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9.2/lib:/apps/prod/ + hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0p + netcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf5/1.14.0/lib, + LS_COLORS=no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd= + 40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com + =01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tg + z=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.l + zma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2= + 00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.xz=00;31:*.avi=01;35:*.bmp + =01;35:*.dl=01;35:*.fli=01;35:*.gif=01;35:*.gl=01;35:*.jpg=01;35:*.jpeg + =01;35:*.mkv=01;35:*.mng=01;35:*.mov=01;35:*.mp4=01;35:*.mpg=01;35:*.pc + x=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.svg=01;35:*.t + ga=01;35:*.tif=01;35:*.webm=01;35:*.webp=01;35:*.wmv=01;35:*.xbm=01;35: + *.xcf=01;35:*.xpm=01;35:*.aiff=00;32:*.ape=00;32:*.au=00;32:*.flac=00;3 + 2:*.m4a=00;32:*.mid=00;32:*.mp3=00;32:*.mpc=00;32:*.ogg=00;32:*.voc=00; + 32:*.wav=00;32:*.wma=00;32:*.wv=00;32:,HOSTTYPE=x86_64, + LMOD_CUSTOM_PATHS=COMPILER/apps/ops/prod/nco/modulefiles/compiler/inte + l/19.1.3.304:COMPILER/apps/ops/prod/libs/modulefiles/compiler/intel/19. + 1.3.304:COMPILER/apps/prod/lmodules/intel/19.1.3.304:COMPILER/apps/ops/ + prod/nco/models/modulefiles:CNCM/apps/ops/prod/libs/modulefiles/mpi/int + el/19.1.3.304/cray-mpich/8.1.4:CNCM/apps/prod/lmodules/INTEL_cray_mpich + /19.1.3.304/cray-mpich/8.1.4, + __LMOD_REF_COUNT_PATH=/apps/prod/ve/intel/19.1.3.304/python/3.12.0/haf + s/2.1/bin:1;/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfatslq + mcrzo5kb4raaq/bin:1;/apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5lnd + zgkkqq36y4a2h4yx3ahdy/bin:1;/pe/intel/compilers_and_libraries_2020.4.30 + 4/linux/bin/intel64:1;/pe/intel/compilers_and_libraries_2020.4.304/linu + x/bin:1;/pe/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/ + bin:1;/pe/intel/debugger_2020/gdb/intel64/bin:1;/opt/cray/pe/craype/2.7 + .17/bin:1;/opt/cray/bin:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__ + h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich + -8.1.12/esmf/8.6.0/bin:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h + -1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich- + 8.1.12/netcdf/4.9.2/bin:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__ + h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich + -8.1.12/hdf5/1.14.0/bin:1;/opt/cray/pe/mpich/8.1.19/bin:1;/u/keston.smi + th/.local/bin:1;/usr/local/bin:1;/usr/bin:1;/bin:2;/opt/c3/bin:1;/opt/p + bs/bin:1;/sbin:1;/opt/cray/pe/bin:1, + _ModuleTable002_=b2FkT3JkZXIiXT0xMCxwcm9wVD17fSxbInN0YWNrRGVwdGgiXT0xL + Fsic3RhdHVzIl09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJdPSJQcmdFbnYtaW50ZWwvOC41LjAi + LH0sWyJjcmF5LW1waWNoIl09e1siZm4iXT0iL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZml + sZXMvY29tbmV0L2ludGVsLzE5LjAvb2ZpLzEuMC9jcmF5LW1waWNoLzguMS4xOS5sdWEiLF + siZnVsbE5hbWUiXT0iY3JheS1tcGljaC84LjEuMTkiLFsibG9hZE9yZGVyIl09MSxwcm9wV + D17fSxbInN0YWNrRGVwdGgiXT0wLFsic3RhdHVzIl09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJd + PSJjcmF5LW1waWNoLzguMS4xOSIsfSxjcmF5cGU9e1siZm4iXT0iL29wdC9jcmF5L3BlL2x + tb2QvbW9kdWxlZmlsZXMvY29yZS9jcmF5, + PE_MPICH_GTL_DIR_amd_gfx90a=-L/opt/cray/pe/mpich/8.1.19/gtl/lib, + SSH_CONNECTION=192.58.153.8 43034 192.58.153.11 22, + mesh=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/com + pute_interpolation_weights/sorc/../../..//fix/rwps.oc_5km_100km.msh, + INCLUDE=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfatslqmcr + zo5kb4raaq/include:/apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5lndz + gkkqq36y4a2h4yx3ahdy/include,XAUTHLOCALHOSTNAME=dlogin01, + LESSCLOSE=lessclose.sh %s %s, + CRAY_LD_LIBRARY_PATH=/opt/cray/pe/mpich/8.1.19/ofi/intel/19.0/lib:/opt + /cray/pe/mpich/8.1.19/gtl/lib, + __LMOD_REF_COUNT_DYLD_LIBRARY_PATH=/apps/prod/hpc-stack/i-19.1.3.304__ + m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/ + cray-mpich-8.1.12/esmf/8.6.0/lib:1;/apps/prod/hpc-stack/i-19.1.3.304__m + -8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/c + ray-mpich-8.1.12/netcdf/4.9.2/lib:1;/apps/prod/hpc-stack/i-19.1.3.304__ + m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/ + cray-mpich-8.1.12/hdf5/1.14.0/lib:1, + XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB,PE_ENV=INTEL, + __LMOD_REF_COUNT_C_INCLUDE_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.30 + 4/cjbmc7tacv5qcfatslqmcrzo5kb4raaq/include:1;/apps/spack/geos/3.8.1/int + el/19.1.3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy/include:1, + __LMOD_REF_COUNT_PE_FORTRAN_PKGCONFIG_LIBS=mpichf90:1, + ESMF_LIB=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9. + 2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6 + .0/lib,LMOD_FAMILY_CRAYPE_CPU=craype-x86-rome, + CRAY_LMOD_COMPILER=intel/19.0, + LMOD_MODULERCFILE=/apps/prod/lmodules/.modulerc.lua, + PE_PRODUCT_LIST=CRAYPE:CRAYPE_X86_ROME,LMOD_IGNORE_CACHE=yes, + LMOD_FAMILY_MPI_VERSION=8.1.19, + PE_PERFTOOLS_MPICH_LIBDIR=/opt/cray/pe/mpich/8.1.19/ofi/intel/19.0/lib + ,PE_MPICH_GTL_DIR_amd_gfx906=-L/opt/cray/pe/mpich/8.1.19/gtl/lib, + LANG=en_US.UTF-8,NetCDF_VERSION=4.9.2, + PE_MPICH_GTL_DIR_amd_gfx908=-L/opt/cray/pe/mpich/8.1.19/gtl/lib, + WINDOWMANAGER=xterm, + _ModuleTable008_=ciJdPTMscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MCxbInN0YXR1c + yJdPSJhY3RpdmUiLFsidXNlck5hbWUiXT0ibmV0Y2RmLUMvNC45LjIiLH0scHJvaj17WyJm + biJdPSIvYXBwcy9wcm9kL2xtb2R1bGVzL2ludGVsLzE5LjEuMy4zMDQvcHJvai83LjEuMCI + sWyJmdWxsTmFtZSJdPSJwcm9qLzcuMS4wIixbImxvYWRPcmRlciJdPTEzLHByb3BUPXt9LF + sic3RhY2tEZXB0aCJdPTEsWyJzdGF0dXMiXT0iYWN0aXZlIixbInVzZXJOYW1lIl09InByb + 2ovNy4xLjAiLH0sWyJ2ZS9oYWZzIl09e1siZm4iXT0iL2FwcHMvcHJvZC9sbW9kdWxlcy9p + bnRlbC8xOS4xLjMuMzA0L3ZlL2hhZnMvMi4xIixbImZ1bGxOYW1lIl09InZlL2hhZnMvMi4 + xIixbImxvYWRPcmRlciJdPTE0LHByb3BU,LESS=-M -I -R, + PE_MPICH_GTL_LIBS_nvidia70=-lmpi_gtl_cuda, + __LMOD_REF_COUNT_INTEL_LICENSE_FILE=/pe/intel/compilers_and_libraries_ + 2020.4.304/linux/licenses:1;/opt/intel/licenses:1;/intel/licenses:1, + DISPLAY=localhost:20.0,HISTTIMEFORMAT=%F %T, + LMOD_FAMILY_COMPILER_VERSION=19.1.3.304,HOSTNAME=dlogin01, + IPPROOT=/pe/intel/compilers_and_libraries_2020.4.304/linux/ipp, + LMOD_SYSTEM_DEFAULT_MODULES=envvar/1.0, + OLDPWD=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/p + reprocess, + __LMOD_REF_COUNT__LMFILES_=/opt/cray/pe/lmod/modulefiles/comnet/intel/ + 19.0/ofi/1.0/cray-mpich/8.1.19.lua:1;/apps/prod/lmodules/INTEL_cray_mpi + ch/19.1.3.304/cray-mpich/8.1.4/hdf5-C/1.14.0.lua:1;/apps/prod/lmodules/ + INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4/netcdf-C/4.9.2.lua:1;/apps + /prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4/esmf-C/8.6. + 0.lua:1;/opt/cray/pe/lmod/modulefiles/craype-targets/default/craype-x86 + -rome.lua:1;/opt/cray/modulefiles/libfabric/1.20.1:1;/opt/cray/pe/lmod/ + modulefiles/craype-targets/default/craype-network-ofi.lua:1;/apps/prod/ + lmodules/sys_core/envvar/1.0:1;/opt/cray/pe/lmod/modulefiles/core/crayp + e/2.7.17.lua:1;/opt/cray/pe/lmod/modulefiles/core/PrgEnv-intel/8.5.0.lu + a:1;/apps/prod/lmodules/core/intel/19.1.3.304.lua:1;/apps/prod/lmodules + /intel/19.1.3.304/geos/3.8.1:1;/apps/prod/lmodules/intel/19.1.3.304/pro + j/7.1.0:1;/apps/prod/lmodules/intel/19.1.3.304/ve/hafs/2.1:1, + CONFIG_SITE=/usr/share/site/x86_64-unknown-linux-gnu,CSHEDIT=emacs, + NETCDF_ROOT=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4 + .9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcd + f/4.9.2, + C_INCLUDE_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfa + tslqmcrzo5kb4raaq/include:/apps/spack/geos/3.8.1/intel/19.1.3.304/5reck + tk5lndzgkkqq36y4a2h4yx3ahdy/include, + HDF5_ROOT=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9 + .2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf5/1. + 14.0, + LMOD_CUSTOM_CNCM_INTEL_19_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX + =/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/apps + /ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4, + NETCDF_VERSION=4.9.2, + LMOD_CUSTOM_COMPILER_GNU_8_0_PREFIX=/apps/prod/lmodules/gcc/11.2.0:/ap + ps/prod/lmodules/gcc/10.2.0,ESMF_VERSION=8.6.0,GPG_TTY=/dev/pts/20, + LESS_ADVANCED_PREPROCESSOR=no, + HDF5_LIBRARIES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__ + n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hd + f5/1.14.0/lib,COLORTERM=1, + _ModuleTable007_=PTEsWyJzdGF0dXMiXT0iYWN0aXZlIixbInVzZXJOYW1lIl09Imlud + GVsLzE5LjEuMy4zMDQiLH0sbGliZmFicmljPXtbImZuIl09Ii9vcHQvY3JheS9tb2R1bGVm + aWxlcy9saWJmYWJyaWMvMS4yMC4xIixbImZ1bGxOYW1lIl09ImxpYmZhYnJpYy8xLjIwLjE + iLFsibG9hZE9yZGVyIl09Nixwcm9wVD17fSxbInN0YWNrRGVwdGgiXT0zLFsic3RhdHVzIl + 09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJdPSJsaWJmYWJyaWMiLH0sWyJuZXRjZGYtQyJdPXtbI + mZuIl09Ii9hcHBzL3Byb2QvbG1vZHVsZXMvSU5URUxfY3JheV9tcGljaC8xOS4xLjMuMzA0 + L2NyYXktbXBpY2gvOC4xLjQvbmV0Y2RmLUMvNC45LjIubHVhIixbImZ1bGxOYW1lIl09Im5 + ldGNkZi1DLzQuOS4yIixbImxvYWRPcmRl, + ESMF_DIR=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9. + 2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6 + .0, + __LMOD_REF_COUNT_NLSPATH=/pe/intel/compilers_and_libraries_2020.4.304/ + linux/compiler/lib/intel64/locale/%l_%t/%N:1;/pe/intel/compilers_and_li + braries_2020.4.304/linux/mkl/lib/intel64_lin/locale/%l_%t/%N:1;/pe/inte + l/debugger_2020/gdb/intel64/share/locale/%l_%t/%N:1, + __LMOD_REF_COUNT_CPLUS_INCLUDE_PATH=/apps/spack/proj/7.1.0/intel/19.1. + 3.304/cjbmc7tacv5qcfatslqmcrzo5kb4raaq/include:1;/apps/spack/geos/3.8.1 + /intel/19.1.3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy/include:1, + LMOD_FAMILY_CRAYPE_NETWORK=craype-network-ofi, + LMOD_FAMILY_CRAYPE_VERSION=2.7.17, + NetCDF_INCLUDES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0_ + _n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/n + etcdf/4.9.2/include, + __LMOD_REF_COUNT_INCLUDE=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc + 7tacv5qcfatslqmcrzo5kb4raaq/include:1;/apps/spack/geos/3.8.1/intel/19.1 + .3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy/include:1, + DYLD_LIBRARY_PATH=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14. + 0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12 + /esmf/8.6.0/lib:/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__ + n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/ne + tcdf/4.9.2/lib:/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n + -4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf + 5/1.14.0/lib,MACHTYPE=x86_64-suse-linux, + __LMOD_REF_COUNT_LD_LIBRARY_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.3 + 04/cjbmc7tacv5qcfatslqmcrzo5kb4raaq/lib:1;/apps/spack/geos/3.8.1/intel/ + 19.1.3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy/lib:1;/pe/intel/compilers_a + nd_libraries_2020.4.304/linux/compiler/lib/intel64_lin:1;/pe/intel/comp + ilers_and_libraries_2020.4.304/linux/mpi/intel64/lib/release:1;/pe/inte + l/compilers_and_libraries_2020.4.304/linux/mpi/intel64/lib:1;/pe/intel/ + compilers_and_libraries_2020.4.304/linux/ipp/lib/intel64:1;/pe/intel/co + mpilers_and_libraries_2020.4.304/linux/mkl/lib/intel64_lin:1;/pe/intel/ + compilers_and_libraries_2020.4.304/linux/tbb/lib/intel64/gcc4.8:1;/pe/i + ntel/debugger_2020/python/intel64/lib:1;/pe/intel/debugger_2020/libipt/ + intel64/lib:1;/opt/cray/lib64:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8. + 1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray + -mpich-8.1.12/esmf/8.6.0/lib:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1 + .12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray- + mpich-8.1.12/netcdf/4.9.2/lib:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8. + 1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray + -mpich-8.1.12/hdf5/1.14.0/lib:1, + __LMOD_REF_COUNT_PKG_CONFIG_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.3 + 04/cjbmc7tacv5qcfatslqmcrzo5kb4raaq/lib/pkgconfig:1;/pe/intel/compilers + _and_libraries_2020.4.304/linux/mkl/bin/pkgconfig:1;/opt/cray/pe/craype + /2.7.17/pkg-config:1;/opt/cray/lib64/pkgconfig:1, + LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_UCX_1_0_PREFIX=/apps/prod/lmodules/cce + /13.0.0:/apps/prod/lmodules/cce/12.0.3:/apps/prod/lmodules/cce/11.0.4, + PE_PKGCONFIG_PRODUCTS=PE_MPICH, + CRAY_MPICH_BASEDIR=/opt/cray/pe/mpich/8.1.19/ofi, + PE_MPICH_GTL_DIR_nvidia80=-L/opt/cray/pe/mpich/8.1.19/gtl/lib, + tmp=/tmpfiles,SSH_AUTH_SOCK=/tmp/ssh-4Jj8NWWunyXC/agent.2417289, + _ModuleTable004_=cm9tZSJdPXtbImZuIl09Ii9vcHQvY3JheS9wZS9sbW9kL21vZHVsZ + WZpbGVzL2NyYXlwZS10YXJnZXRzL2RlZmF1bHQvY3JheXBlLXg4Ni1yb21lLmx1YSIsWyJm + dWxsTmFtZSJdPSJjcmF5cGUteDg2LXJvbWUiLFsibG9hZE9yZGVyIl09NSxwcm9wVD17fSx + bInN0YWNrRGVwdGgiXT0yLFsic3RhdHVzIl09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJdPSJjcm + F5cGUteDg2LXJvbWUiLH0sZW52dmFyPXtbImZuIl09Ii9hcHBzL3Byb2QvbG1vZHVsZXMvc + 3lzX2NvcmUvZW52dmFyLzEuMCIsWyJmdWxsTmFtZSJdPSJlbnZ2YXIvMS4wIixbImxvYWRP + cmRlciJdPTgscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MSxbInN0YXR1cyJdPSJhY3RpdmU + iLFsidXNlck5hbWUiXT0iZW52dmFyLzEu, + VIRTUAL_ENV=/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1, + MINICOM=-c on, + HDF5_INCLUDES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n + -4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf + 5/1.14.0/include, + PE_MPICH_PKGCONFIG_VARIABLES=PE_MPICH_GTL_DIR_@accelerator@:PE_MPICH_G + TL_LIBS_@accelerator@, + ESMFMKFILE=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4. + 9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8 + .6.0/lib/esmf.mk,PE_MPICH_PKGCONFIG_LIBS=mpich, + INTEL_PYTHONHOME=/pe/intel/debugger_2020/python/intel64/, + QT_SYSTEM_DIR=/usr/share/desktop-data,OSTYPE=linux, + NETCDF=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2_ + _p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9 + .2,meshname=rwps.oc_5km_100km, + CLASSPATH=/pe/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel + 64/lib/mpi.jar, + PROJ_LIB=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfatslqmc + rzo5kb4raaq/share/proj/,USER=keston.smith, + ESMF_INC=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9. + 2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6 + .0/include,MODULES_SET_SHELL_STARTUP=0,PAGER=less, + NetCDF_ROOT=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4 + .9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcd + f/4.9.2,PE_MPICH_GENCOMPILERS_INTEL=19.0,MODULE_VERSION=3.2.10, + ESMF_INCLUDES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n + -4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esm + f/8.6.0/include, + LMOD_CUSTOM_CNCM_GNU_8_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX=/a + pps/prod/lmodules/GCC_cray_mpich/10.2.0/cray-mpich/8.1.4, + LMOD_FAMILY_PRGENV_VERSION=8.5.0, + _ModuleTable012_=dWxlcy8kTU9EVUxFX1ZFUlNJT04vbW9kdWxlZmlsZXM6L3Vzci9za + GFyZS9tb2R1bGVzL21vZHVsZWZpbGVzOi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvTGludXg6 + L3Vzci9zaGFyZS9tb2R1bGVmaWxlcy9Db3JlOi91c3Ivc2hhcmUvbG1vZC9sbW9kL21vZHV + sZWZpbGVzL0NvcmU6L29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY29yZTovb3B0L2 + NyYXkvcGUvbG1vZC9tb2R1bGVmaWxlcy9jcmF5cGUtdGFyZ2V0cy9kZWZhdWx0Oi9hcHBzL + 3Byb2QvbG1vZHVsZXMvc3lzX2NvcmU6L2FwcHMvb3BzL3Byb2QvbmNvL21vZHVsZWZpbGVz + L2NvcmU6L2FwcHMvcHJvZC9sbW9kdWxlcy9jb3JlOi9vcHQvY3JheS9tb2R1bGVmaWxlcyI + sfQ==, + ESMF_PATH=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9 + .2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8. + 6.0, + LMOD_CUSTOM_CNCM_GNU_8_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX=/a + pps/prod/lmodules/GCC_cray_mpich/10.2.0/cray-mpich/8.1.4, + CRAY_CPU_TARGET=x86-rome, + LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PR + EFIX=/apps/prod/lmodules/CCE_cray_mpich/11.0.4/cray-mpich/8.1.4, + PKGCONFIG_ENABLED=1, + __LMOD_REF_COUNT_MODULEPATH=/apps/ops/prod/nco/modulefiles/compiler/in + tel/19.1.3.304:1;/apps/ops/prod/libs/modulefiles/compiler/intel/19.1.3. + 304:1;/apps/prod/lmodules/intel/19.1.3.304:1;/apps/ops/prod/nco/models/ + modulefiles:1;/apps/ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray + -mpich/8.1.4:1;/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpi + ch/8.1.4:1;/opt/cray/pe/lmod/modulefiles/comnet/intel/19.0/ofi/1.0:1;/a + pps/prod/lmodules/compiler/intel/19.0:1;/opt/cray/pe/lmod/modulefiles/n + et/ofi/1.0:1;/opt/cray/pe/lmod/modulefiles/cpu/x86-rome/1.0:1;/opt/cray + /pe/lmod/modulefiles/mpi/intel/19.0/ofi/1.0/cray-mpich/8.0:1;/usr/share + /modules:1;/usr/share/Modules/$MODULE_VERSION/modulefiles:1;/usr/share/ + modules/modulefiles:1;/usr/share/modulefiles/Linux:1;/usr/share/modulef + iles/Core:1;/usr/share/lmod/lmod/modulefiles/Core:1;/opt/cray/pe/lmod/m + odulefiles/core:1;/opt/cray/pe/lmod/modulefiles/craype-targets/default: + 1;/apps/prod/lmodules/sys_core:1;/apps/ops/prod/nco/modulefiles/core:1; + /apps/prod/lmodules/core:1;/opt/cray/modulefiles:1, + COMINrrfs=/lfs/h1/ops/prod/com/rrfs/v1.0/rrfs./,MORE=-sl, + PE_FORTRAN_PKGCONFIG_LIBS=mpichf90, + __LMOD_REF_COUNT_LOADEDMODULES=cray-mpich/8.1.19:1;hdf5-C/1.14.0:1;net + cdf-C/4.9.2:1;esmf-C/8.6.0:1;craype-x86-rome:1;libfabric/1.20.1:1;crayp + e-network-ofi:1;envvar/1.0:1;craype/2.7.17:1;PrgEnv-intel/8.5.0:1;intel + /19.1.3.304:1;geos/3.8.1:1;proj/7.1.0:1;ve/hafs/2.1:1, + __LMOD_REF_COUNT_CRAY_LD_LIBRARY_PATH=/opt/cray/pe/mpich/8.1.19/ofi/in + tel/19.0/lib:1;/opt/cray/pe/mpich/8.1.19/gtl/lib:1, + INTEL_MAJOR_VERSION=19.1, + PWD=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp + ute_interpolation_weights/sorc, + ESMF_MOD=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9. + 2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6 + .0/mod,PE_MPICH_GTL_DIR_nvidia70=-L/opt/cray/pe/mpich/8.1.19/gtl/lib, + COMINrtofs=/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs./, + HOME=/u/keston.smith, + COMINnbm=/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.//grib2, + PELOCAL_PRGENV=true, + CMAKE_PREFIX_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5q + cfatslqmcrzo5kb4raaq:/apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5ln + dzgkkqq36y4a2h4yx3ahdy,SSH_AGENT_PID=2417290,HOST=dlogin01, + SSH_CLIENT=192.58.153.8 43034 22,LMOD_VERSION=8.3.1, + XNLSPATH=/usr/share/X11/nls,PE_MPICH_FORTRAN_PKGCONFIG_LIBS=mpichf90, + CPATH=/pe/intel/compilers_and_libraries_2020.4.304/linux/ipp/include:/ + pe/intel/compilers_and_libraries_2020.4.304/linux/mkl/include:/pe/intel + /compilers_and_libraries_2020.4.304/linux/pstl/include:/pe/intel/compil + ers_and_libraries_2020.4.304/linux/pstl/stdlib:/pe/intel/compilers_and_ + libraries_2020.4.304/linux/tbb/include:/apps/prod/hpc-stack/i-19.1.3.30 + 4__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.3 + 04/cray-mpich-8.1.12/esmf/8.6.0/include:/apps/prod/hpc-stack/i-19.1.3.3 + 04__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3. + 304/cray-mpich-8.1.12/netcdf/4.9.2/include:/apps/prod/hpc-stack/i-19.1. + 3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1 + .3.304/cray-mpich-8.1.12/hdf5/1.14.0/include, + __LMOD_REF_COUNT_INFOPATH=/pe/intel/documentation_2020/en/debugger/gdb + -ia/info:1;/apps/docs/info:1,CRAY_LMOD_CPU=x86-rome/1.0, + PE_MPICH_GTL_LIBS_nvidia80=-lmpi_gtl_cuda, + LMOD_FAMILY_CRAYPE_CPU_VERSION=false, + BASH_ENV=/usr/share/lmod/lmod/init/bash,XDG_DATA_DIRS=/usr/share, + __LMOD_REF_COUNT_PE_MPICH_FORTRAN_PKGCONFIG_LIBS=mpichf90:1, + INTEL_MINOR_VERSION=3.304, + LMOD_CUSTOM_CNCM_INTEL_19_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX + =/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/apps + /ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4, + CRAY_LMOD_NET=ofi/1.0, + RWPSroot=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev + /compute_interpolation_weights/sorc/../../../,COMINlocal=/tmpfiles, + __LMOD_REF_COUNT_PE_PKGCONFIG_PRODUCTS=PE_MPICH:1, + PE_MPICH_MODULE_NAME=cray-mpich, + __LMOD_REF_COUNT_LMOD_CUSTOM_COMPILER_INTEL_19_0_PREFIX=/apps/ops/prod + /nco/models/modulefiles:10;/apps/prod/lmodules/intel/19.1.3.304:1;/apps + /ops/prod/libs/modulefiles/compiler/intel/19.1.3.304:1;/apps/ops/prod/n + co/modulefiles/compiler/intel/19.1.3.304:1, + NLSPATH=/pe/intel/compilers_and_libraries_2020.4.304/linux/compiler/li + b/intel64/locale/%l_%t/%N:/pe/intel/compilers_and_libraries_2020.4.304/ + linux/mkl/lib/intel64_lin/locale/%l_%t/%N:/pe/intel/debugger_2020/gdb/i + ntel64/share/locale/%l_%t/%N,LIBGL_DEBUG=quiet, + LMOD_CUSTOM_COMPILER_INTEL_19_0_PREFIX=/apps/ops/prod/nco/models/modul + efiles:/apps/prod/lmodules/intel/19.1.3.304:/apps/ops/prod/libs/modulef + iles/compiler/intel/19.1.3.304:/apps/ops/prod/nco/modulefiles/compiler/ + intel/19.1.3.304,__LMOD_REF_COUNT_PE_MPICH_FIXED_PRGENV=INTEL:1, + __LMOD_REF_COUNT_LIBRARY_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/ + cjbmc7tacv5qcfatslqmcrzo5kb4raaq/lib:1;/apps/spack/geos/3.8.1/intel/19. + 1.3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy/lib:1;/pe/intel/compilers_and_ + libraries_2020.4.304/linux/ipp/lib/intel64:1;/pe/intel/compilers_and_li + braries_2020.4.304/linux/compiler/lib/intel64_lin:1;/pe/intel/compilers + _and_libraries_2020.4.304/linux/mkl/lib/intel64_lin:1;/pe/intel/compile + rs_and_libraries_2020.4.304/linux/tbb/lib/intel64/gcc4.8:2;/apps/prod/h + pc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pn + etcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6.0/lib:1, + PROFILEREAD=true, + LIBRARY_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfats + lqmcrzo5kb4raaq/lib:/apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5lnd + zgkkqq36y4a2h4yx3ahdy/lib:/pe/intel/compilers_and_libraries_2020.4.304/ + linux/ipp/lib/intel64:/pe/intel/compilers_and_libraries_2020.4.304/linu + x/compiler/lib/intel64_lin:/pe/intel/compilers_and_libraries_2020.4.304 + /linux/mkl/lib/intel64_lin:/pe/intel/compilers_and_libraries_2020.4.304 + /linux/tbb/lib/intel64/gcc4.8:/apps/prod/hpc-stack/i-19.1.3.304__m-8.1. + 12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-m + pich-8.1.12/esmf/8.6.0/lib, + __LMOD_REF_COUNT_CMAKE_PREFIX_PATH=/apps/spack/proj/7.1.0/intel/19.1.3 + .304/cjbmc7tacv5qcfatslqmcrzo5kb4raaq:1;/apps/spack/geos/3.8.1/intel/19 + .1.3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy:1,LMOD_sys=Linux, + _ModuleTable010_=aWNoLzE5LjEuMy4zMDQvY3JheS1tcGljaC84LjEuNCIsIi9vcHQvY + 3JheS9wZS9sbW9kL21vZHVsZWZpbGVzL2NvbW5ldC9pbnRlbC8xOS4wL29maS8xLjAiLCIv + YXBwcy9wcm9kL2xtb2R1bGVzL2NvbXBpbGVyL2ludGVsLzE5LjAiLCIvb3B0L2NyYXkvcGU + vbG1vZC9tb2R1bGVmaWxlcy9uZXQvb2ZpLzEuMCIsIi9vcHQvY3JheS9wZS9sbW9kL21vZH + VsZWZpbGVzL2NwdS94ODYtcm9tZS8xLjAiLCIvb3B0L2NyYXkvcGUvbG1vZC9tb2R1bGVma + Wxlcy9tcGkvaW50ZWwvMTkuMC9vZmkvMS4wL2NyYXktbXBpY2gvOC4wIiwiL3Vzci9zaGFy + ZS9tb2R1bGVzIiwiL3Vzci9zaGFyZS9Nb2R1bGVzLyRNT0RVTEVfVkVSU0lPTi9tb2R1bGV + maWxlcyIsIi91c3Ivc2hhcmUvbW9kdWxl,PE_PKGCONFIG_LIBS=mpich, + _ModuleTable001_=X01vZHVsZVRhYmxlXz17WyJNVHZlcnNpb24iXT0zLFsiY19yZWJ1a + WxkVGltZSJdPWZhbHNlLFsiY19zaG9ydFRpbWUiXT1mYWxzZSxkZXB0aFQ9e30sZmFtaWx5 + PXtbIlByZ0VudiJdPSJQcmdFbnYtaW50ZWwiLFsiY29tcGlsZXIiXT0iaW50ZWwiLFsiY3J + heXBlIl09ImNyYXlwZSIsWyJjcmF5cGVfY3B1Il09ImNyYXlwZS14ODYtcm9tZSIsWyJjcm + F5cGVfbmV0d29yayJdPSJjcmF5cGUtbmV0d29yay1vZmkiLFsibXBpIl09ImNyYXktbXBpY + 2giLH0sbVQ9e1siUHJnRW52LWludGVsIl09e1siZm4iXT0iL29wdC9jcmF5L3BlL2xtb2Qv + bW9kdWxlZmlsZXMvY29yZS9QcmdFbnYtaW50ZWwvOC41LjAubHVhIixbImZ1bGxOYW1lIl0 + 9IlByZ0Vudi1pbnRlbC84LjUuMCIsWyJs, + LOADEDMODULES=cray-mpich/8.1.19:hdf5-C/1.14.0:netcdf-C/4.9.2:esmf-C/8. + 6.0:craype-x86-rome:libfabric/1.20.1:craype-network-ofi:envvar/1.0:cray + pe/2.7.17:PrgEnv-intel/8.5.0:intel/19.1.3.304:geos/3.8.1:proj/7.1.0:ve/ + hafs/2.1,LMOD_AVAIL_STYLE=en_grouped:system,CRAYPE_NETWORK_TARGET=ofi, + _ModuleTable006_=ZXJOYW1lIl09Imdlb3MvMy44LjEiLH0sWyJoZGY1LUMiXT17WyJmb + iJdPSIvYXBwcy9wcm9kL2xtb2R1bGVzL0lOVEVMX2NyYXlfbXBpY2gvMTkuMS4zLjMwNC9j + cmF5LW1waWNoLzguMS40L2hkZjUtQy8xLjE0LjAubHVhIixbImZ1bGxOYW1lIl09ImhkZjU + tQy8xLjE0LjAiLFsibG9hZE9yZGVyIl09Mixwcm9wVD17fSxbInN0YWNrRGVwdGgiXT0wLF + sic3RhdHVzIl09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJdPSJoZGY1LUMvMS4xNC4wIix9LGlud + GVsPXtbImZuIl09Ii9hcHBzL3Byb2QvbG1vZHVsZXMvY29yZS9pbnRlbC8xOS4xLjMuMzA0 + Lmx1YSIsWyJmdWxsTmFtZSJdPSJpbnRlbC8xOS4xLjMuMzA0IixbImxvYWRPcmRlciJdPTE + xLHByb3BUPXt9LFsic3RhY2tEZXB0aCJd, + __LMOD_REF_COUNT_MANPATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc + 7tacv5qcfatslqmcrzo5kb4raaq/share/man:1;/pe/intel/man/common:1;/pe/inte + l/compilers_and_libraries_2020.4.304/linux/mpi/man:1;/pe/intel/document + ation_2020/en/debugger/gdb-ia/man:1;/opt/cray/pe/craype/2.7.17/man:1;/o + pt/cray/share/man:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14 + .0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.1 + 2/esmf/8.6.0/share/man:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h + -1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich- + 8.1.12/netcdf/4.9.2/share/man:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8. + 1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray + -mpich-8.1.12/hdf5/1.14.0/share/man:1;/opt/cray/pe/mpich/8.1.19/ofi/man + :1;/opt/cray/pe/mpich/8.1.19/man/mpich:1;/usr/share/lmod/lmod/share/man + :1;/usr/share/man:1;/opt/c3/man:1;/opt/pbs/share/man:1, + _ModuleTable003_=cGUvMi43LjE3Lmx1YSIsWyJmdWxsTmFtZSJdPSJjcmF5cGUvMi43L + jE3IixbImxvYWRPcmRlciJdPTkscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MixbInN0YXR1 + cyJdPSJhY3RpdmUiLFsidXNlck5hbWUiXT0iY3JheXBlIix9LFsiY3JheXBlLW5ldHdvcms + tb2ZpIl09e1siZm4iXT0iL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY3JheXBlLX + RhcmdldHMvZGVmYXVsdC9jcmF5cGUtbmV0d29yay1vZmkubHVhIixbImZ1bGxOYW1lIl09I + mNyYXlwZS1uZXR3b3JrLW9maSIsWyJsb2FkT3JkZXIiXT03LHByb3BUPXt9LFsic3RhY2tE + ZXB0aCJdPTIsWyJzdGF0dXMiXT0iYWN0aXZlIixbInVzZXJOYW1lIl09ImNyYXlwZS1uZXR + 3b3JrLW9maSIsfSxbImNyYXlwZS14ODYt, + INTEL_LICENSE_FILE=/pe/intel/compilers_and_libraries_2020.4.304/linux/ + licenses:/opt/intel/licenses:/intel/licenses,LMOD_ROOT=/usr/share/lmod, + SSH_TTY=/dev/pts/20,FROM_HEADER=, + CRAY_MPICH_ROOTDIR=/opt/cray/pe/mpich/8.1.19, + MAIL=/var/spool/mail/keston.smith, + PE_INTEL_FIXED_PKGCONFIG_PATH=/opt/cray/pe/mpich/8.1.19/ofi/intel/19.0 + /lib/pkgconfig, + COMINstofs=/lfs/h1/ops/prod/com/stofs/v3.1/stofs_2d_glo., + __LMOD_REF_COUNT_PE_MPICH_GENCOMPILERS_INTEL=19.0:1, + LESSKEY=/etc/lesskey.bin, + _ModuleTable009_=PXt9LFsic3RhY2tEZXB0aCJdPTAsWyJzdGF0dXMiXT0iYWN0aXZlI + ixbInVzZXJOYW1lIl09InZlL2hhZnMvMi4xIix9LH0sbXBhdGhBPXsiL2FwcHMvb3BzL3By + b2QvbmNvL21vZHVsZWZpbGVzL2NvbXBpbGVyL2ludGVsLzE5LjEuMy4zMDQiLCIvYXBwcy9 + vcHMvcHJvZC9saWJzL21vZHVsZWZpbGVzL2NvbXBpbGVyL2ludGVsLzE5LjEuMy4zMDQiLC + IvYXBwcy9wcm9kL2xtb2R1bGVzL2ludGVsLzE5LjEuMy4zMDQiLCIvYXBwcy9vcHMvcHJvZ + C9uY28vbW9kZWxzL21vZHVsZWZpbGVzIiwiL2FwcHMvb3BzL3Byb2QvbGlicy9tb2R1bGVm + aWxlcy9tcGkvaW50ZWwvMTkuMS4zLjMwNC9jcmF5LW1waWNoLzguMS40IiwiL2FwcHMvcHJ + vZC9sbW9kdWxlcy9JTlRFTF9jcmF5X21w,TERM=xterm-256color,SHELL=/bin/bash, + ESMF_BIN=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9. + 2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6 + .0/bin,CRAY_MPICH_VER=8.1.19, + LMOD_ADMIN_FILE=/apps/prod/lmodules/admin.list, + LMOD_CUSTOM_COMPILER_GNU_8_0_UCX_1_0_PREFIX=/apps/prod/lmodules/gcc/11 + .2.0:/apps/prod/lmodules/gcc/10.2.0,PE_MPICH_FIXED_PRGENV=INTEL, + lmod_prefix_path=/usr/share, + LMOD_CUSTOM_COMPILER_CRAYCLANG_10_0_PREFIX=/apps/prod/lmodules/cce/13. + 0.0:/apps/prod/lmodules/cce/12.0.3:/apps/prod/lmodules/cce/11.0.4, + LMOD_FAMILY_PRGENV=PrgEnv-intel,_ModuleTable_Sz_=12, + __LMOD_REF_COUNT_CPATH=/pe/intel/compilers_and_libraries_2020.4.304/li + nux/ipp/include:1;/pe/intel/compilers_and_libraries_2020.4.304/linux/mk + l/include:1;/pe/intel/compilers_and_libraries_2020.4.304/linux/pstl/inc + lude:1;/pe/intel/compilers_and_libraries_2020.4.304/linux/pstl/stdlib:1 + ;/pe/intel/compilers_and_libraries_2020.4.304/linux/tbb/include:2;/apps + /prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e- + 8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6.0/include:1;/a + pps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10_ + _e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9.2/include + :1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2. + 5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf5/1.14.0/inc + lude:1,LS_OPTIONS=-N --color=tty -T 0, + NetCDF=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2_ + _p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9 + .2,LMOD_FAMILY_COMPILER=intel, + LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PR + EFIX=/apps/prod/lmodules/CCE_cray_mpich/11.0.4/cray-mpich/8.1.4, + TMOUT=1800,PYTHONSTARTUP=/etc/pythonstart, + NETCDF_INCLUDES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0_ + _n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/n + etcdf/4.9.2/include, + RWPSfix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPS,SHLVL=3, + LANGUAGE=en_US.UTF-8, + PYTHONPATH=/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/p + ython3.10/site-packages,G_FILENAME_ENCODING=@locale\,UTF-8\,ISO-8859-15\, + CP1252, + LMOD_CUSTOM_COMPILER_INTEL_19_0_UCX_1_0_PREFIX=/apps/prod/lmodules/int + el/19.1.3.304:/apps/ops/prod/libs/modulefiles/compiler/intel/19.1.3.304 + :/apps/ops/prod/nco/modulefiles/compiler/intel/19.1.3.304, + HPC_OPT=/apps/ops/prod/libs, + MANPATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfatslqmcr + zo5kb4raaq/share/man:/pe/intel/man/common:/pe/intel/compilers_and_libra + ries_2020.4.304/linux/mpi/man:/pe/intel/documentation_2020/en/debugger/ + gdb-ia/man:/opt/cray/pe/craype/2.7.17/man:/opt/cray/share/man:/apps/pro + d/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6. + 0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6.0/share/man:/apps/ + prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8 + .6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9.2/share/man:/ + apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10 + __e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf5/1.14.0/share/m + an:/opt/cray/pe/mpich/8.1.19/ofi/man:/opt/cray/pe/mpich/8.1.19/man/mpic + h:/usr/share/lmod/lmod/share/man:/usr/share/man:/opt/c3/man:/opt/pbs/sh + are/man, + __LMOD_REF_COUNT_CLASSPATH=/pe/intel/compilers_and_libraries_2020.4.30 + 4/linux/mpi/intel64/lib/mpi.jar:1, + INTEL_PATH=/pe/intel/compilers_and_libraries_2020.4.304, + MPICH_DIR=/opt/cray/pe/mpich/8.1.19/ofi/intel/19.0, + INTEL_VERSION=19.1.3.304,OSCAR_HOME=/opt/oscar, + fix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp + ute_interpolation_weights/sorc/../../..//fix, + MODULEPATH=/apps/ops/prod/nco/modulefiles/compiler/intel/19.1.3.304:/a + pps/ops/prod/libs/modulefiles/compiler/intel/19.1.3.304:/apps/prod/lmod + ules/intel/19.1.3.304:/apps/ops/prod/nco/models/modulefiles:/apps/ops/p + rod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4:/apps/prod/l + modules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/opt/cray/pe/lmod/ + modulefiles/comnet/intel/19.0/ofi/1.0:/apps/prod/lmodules/compiler/inte + l/19.0:/opt/cray/pe/lmod/modulefiles/net/ofi/1.0:/opt/cray/pe/lmod/modu + lefiles/cpu/x86-rome/1.0:/opt/cray/pe/lmod/modulefiles/mpi/intel/19.0/o + fi/1.0/cray-mpich/8.0:/usr/share/modules:/usr/share/Modules/$MODULE_VER + SION/modulefiles:/usr/share/modules/modulefiles:/usr/share/modulefiles/ + Linux:/usr/share/modulefiles/Core:/usr/share/lmod/lmod/modulefiles/Core + :/opt/cray/pe/lmod/modulefiles/core:/opt/cray/pe/lmod/modulefiles/crayp + e-targets/default:/apps/prod/lmodules/sys_core:/apps/ops/prod/nco/modul + efiles/core:/apps/prod/lmodules/core:/opt/cray/modulefiles, + CRAY_MPICH_DIR=/opt/cray/pe/mpich/8.1.19/ofi/intel/19.0, + LMOD_FAMILY_CRAYPE=craype,LOGNAME=keston.smith, + __LMOD_REF_COUNT_LMOD_CUSTOM_PATHS=COMPILER/apps/ops/prod/nco/modulefi + les/compiler/intel/19.1.3.304:1;COMPILER/apps/ops/prod/libs/modulefiles + /compiler/intel/19.1.3.304:1;COMPILER/apps/prod/lmodules/intel/19.1.3.3 + 04:1;COMPILER/apps/ops/prod/nco/models/modulefiles:1;CNCM/apps/ops/prod + /libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4:1;CNCM/apps/pro + d/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:1, + CRAY_MPICH_VERSION=8.1.19, + CPLUS_INCLUDE_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5 + qcfatslqmcrzo5kb4raaq/include:/apps/spack/geos/3.8.1/intel/19.1.3.304/5 + recktk5lndzgkkqq36y4a2h4yx3ahdy/include, + MKLROOT=/pe/intel/compilers_and_libraries_2020.4.304/linux/mkl, + MODULE_VERSION_STACK=3.2.10,MODULEPATH_ROOT=/usr/share/modulefiles, + LMOD_PACKAGE_PATH=/apps/prod/lmodules, + __LMOD_REF_COUNT_PE_INTEL_FIXED_PKGCONFIG_PATH=/opt/cray/pe/mpich/8.1. + 19/ofi/intel/19.0/lib/pkgconfig:1, + PE_MPICH_GTL_LIBS_amd_gfx906=-lmpi_gtl_hsa, + PSTLROOT=/pe/intel/compilers_and_libraries_2020.4.304/linux/pstl, + XDG_CONFIG_DIRS=/etc/xdg, + PATH=/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/bin:/apps/s + pack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfatslqmcrzo5kb4raaq/bin:/ + apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy + /bin:/pe/intel/compilers_and_libraries_2020.4.304/linux/bin/intel64:/pe + /intel/compilers_and_libraries_2020.4.304/linux/bin:/pe/intel/compilers + _and_libraries_2020.4.304/linux/mpi/intel64/bin:/pe/intel/debugger_2020 + /gdb/intel64/bin:/opt/cray/pe/craype/2.7.17/bin:/opt/cray/bin:/apps/pro + d/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6. + 0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6.0/bin:/apps/prod/h + pc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pn + etcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9.2/bin:/apps/prod/hp + c-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pne + tcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf5/1.14.0/bin:/opt/cray/pe/mp + ich/8.1.19/bin:/u/keston.smith/.local/bin:/usr/local/bin:/usr/bin:/bin: + /opt/c3/bin:/opt/pbs/bin:/sbin:/opt/cray/pe/bin, + PE_MPICH_GTL_LIBS_amd_gfx908=-lmpi_gtl_hsa, + TBBROOT=/pe/intel/compilers_and_libraries_2020.4.304/linux/tbb, + ESMF_LIBRARIES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__ + n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/es + mf/8.6.0/lib, + __LMOD_REF_COUNT_PE_PRODUCT_LIST=CRAYPE:1;CRAYPE_X86_ROME:1, + NetCDF_LIBRARIES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0 + __n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/ + netcdf/4.9.2/lib, + _LMFILES_=/opt/cray/pe/lmod/modulefiles/comnet/intel/19.0/ofi/1.0/cray + -mpich/8.1.19.lua:/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray- + mpich/8.1.4/hdf5-C/1.14.0.lua:/apps/prod/lmodules/INTEL_cray_mpich/19.1 + .3.304/cray-mpich/8.1.4/netcdf-C/4.9.2.lua:/apps/prod/lmodules/INTEL_cr + ay_mpich/19.1.3.304/cray-mpich/8.1.4/esmf-C/8.6.0.lua:/opt/cray/pe/lmod + /modulefiles/craype-targets/default/craype-x86-rome.lua:/opt/cray/modul + efiles/libfabric/1.20.1:/opt/cray/pe/lmod/modulefiles/craype-targets/de + fault/craype-network-ofi.lua:/apps/prod/lmodules/sys_core/envvar/1.0:/o + pt/cray/pe/lmod/modulefiles/core/craype/2.7.17.lua:/opt/cray/pe/lmod/mo + dulefiles/core/PrgEnv-intel/8.5.0.lua:/apps/prod/lmodules/core/intel/19 + .1.3.304.lua:/apps/prod/lmodules/intel/19.1.3.304/geos/3.8.1:/apps/prod + /lmodules/intel/19.1.3.304/proj/7.1.0:/apps/prod/lmodules/intel/19.1.3. + 304/ve/hafs/2.1,HDF5_VERSION=1.14.0,MODULESHOME=/usr/share/lmod/lmod, + PKG_CONFIG_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcf + atslqmcrzo5kb4raaq/lib/pkgconfig:/pe/intel/compilers_and_libraries_2020 + .4.304/linux/mkl/bin/pkgconfig:/opt/cray/pe/craype/2.7.17/pkg-config:/o + pt/cray/lib64/pkgconfig,LMOD_SETTARG_FULL_SUPPORT=no, + INFOPATH=/pe/intel/documentation_2020/en/debugger/gdb-ia/info::/apps/d + ocs/info,G_BROKEN_FILENAMES=1, + I_MPI_ROOT=/pe/intel/compilers_and_libraries_2020.4.304/linux/mpi, + _ModuleTable011_=cy9tb2R1bGVmaWxlcyIsIi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvT + GludXgiLCIvdXNyL3NoYXJlL21vZHVsZWZpbGVzL0NvcmUiLCIvdXNyL3NoYXJlL2xtb2Qv + bG1vZC9tb2R1bGVmaWxlcy9Db3JlIiwiL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXM + vY29yZSIsIi9vcHQvY3JheS9wZS9sbW9kL21vZHVsZWZpbGVzL2NyYXlwZS10YXJnZXRzL2 + RlZmF1bHQiLCIvYXBwcy9wcm9kL2xtb2R1bGVzL3N5c19jb3JlIiwiL2FwcHMvb3BzL3Byb + 2QvbmNvL21vZHVsZWZpbGVzL2NvcmUiLCIvYXBwcy9wcm9kL2xtb2R1bGVzL2NvcmUiLCIv + b3B0L2NyYXkvbW9kdWxlZmlsZXMiLH0sWyJzeXN0ZW1CYXNlTVBBVEgiXT0iL3Vzci9zaGF + yZS9tb2R1bGVzOi91c3Ivc2hhcmUvTW9k, + PE_MPICH_GTL_LIBS_amd_gfx90a=-lmpi_gtl_hsa,HISTSIZE=10000, + CRAYPE_DIR=/opt/cray/pe/craype/2.7.17,LMOD_PKG=/usr/share/lmod/lmod, + __LMOD_REF_COUNT_PE_MPICH_PKGCONFIG_LIBS=mpich:1, + __LMOD_REF_COUNT_PE_PKGCONFIG_LIBS=mpich:1,CPU=x86_64, + CRAYPE_VERSION=2.7.17, + NETCDF_LIBRARIES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0 + __n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/ + netcdf/4.9.2/lib, + _ModuleTable005_=MCIsfSxbImVzbWYtQyJdPXtbImZuIl09Ii9hcHBzL3Byb2QvbG1vZ + HVsZXMvSU5URUxfY3JheV9tcGljaC8xOS4xLjMuMzA0L2NyYXktbXBpY2gvOC4xLjQvZXNt + Zi1DLzguNi4wLmx1YSIsWyJmdWxsTmFtZSJdPSJlc21mLUMvOC42LjAiLFsibG9hZE9yZGV + yIl09NCxwcm9wVD17fSxbInN0YWNrRGVwdGgiXT0wLFsic3RhdHVzIl09ImFjdGl2ZSIsWy + J1c2VyTmFtZSJdPSJlc21mLUMvOC42LjAiLH0sZ2Vvcz17WyJmbiJdPSIvYXBwcy9wcm9kL + 2xtb2R1bGVzL2ludGVsLzE5LjEuMy4zMDQvZ2Vvcy8zLjguMSIsWyJmdWxsTmFtZSJdPSJn + ZW9zLzMuOC4xIixbImxvYWRPcmRlciJdPTEyLHByb3BUPXt9LFsic3RhY2tEZXB0aCJdPTE + sWyJzdGF0dXMiXT0iYWN0aXZlIixbInVz, + LMOD_CMD=/usr/share/lmod/lmod/libexec/lmod, + ESMF_ROOT=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9 + .2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8. + 6.0,CRAY_MPICH_PREFIX=/opt/cray/pe/mpich/8.1.19/ofi/intel/19.0, + CVS_RSH=ssh,LESSOPEN=lessopen.sh %s, + LMOD_DIR=/usr/share/lmod/lmod/libexec,LC_TIME=C.UTF-8, + LMOD_FAMILY_MPI=cray-mpich, + BASH_FUNC_module%%=() { eval $($LMOD_CMD bash \"$@\") && eval $(${LMO + D_SETTARG_CMD:-:} -s sh) + euser = keston.smith + egroup = emc + hashname = 136854537.dbqs01 + queue_rank = 1787597008259882 + queue_type = E + comment = Job run at Mon Aug 24 at 18:49 on (nid003409:ncpus=16:mem=2684354 + 56kb) and terminated by keston.smith@dlogin01.dogwood.wcoss2.ncep.noaa. + gov + etime = Mon Aug 24 18:43:28 2026 + umask = 22 + run_count = 6 + eligible_time = 00:05:58 + accrue_type = 3 + Submit_arguments = -V /lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/ + RWPS/dev/compute_interpolation_weights/sorc/../../..//dev/compute_inter + polation_weights/ecf/compute_interpolation_weights.ecf + project = NWPS-DEV + run_version = 1 + Submit_Host = dlogin01.dogwood.wcoss2.ncep.noaa.gov + server_instance_id = dbqs01.dogwood.wcoss2.ncep.noaa.gov:15001 + + +------------------------------------------------------------------ +Job 136854537.dbqs01 - PBS tracejob output (for parent mom node only): + +Job: 136854537.dbqs01 + +08/24/2026 18:49:19 M update_job_usage: CPU usage: 0.000 secs +08/24/2026 18:49:19 M update_job_usage: cpupercent initialized to zero +08/24/2026 18:49:19 M update_job_usage: Memory usage: mem=0b +08/24/2026 18:49:24 M Started, pid = 560784 +08/24/2026 18:49:50 M update_job_usage: CPU usage: 28.000 secs +08/24/2026 18:49:50 M update_job_usage: 136854537.dbqs01 measured interval cpupercent 93 increased job cpupercent to 93 +08/24/2026 18:49:50 M update_job_usage: Memory usage: mem=622752kb +08/24/2026 18:51:51 M update_job_usage: CPU usage: 158.000 secs +08/24/2026 18:51:51 M update_job_usage: 136854537.dbqs01 measured interval cpupercent 107 increased job cpupercent to 107 +08/24/2026 18:51:51 M update_job_usage: Memory usage: mem=4348868kb +08/24/2026 18:53:52 M update_job_usage: CPU usage: 287.000 secs +08/24/2026 18:53:52 M update_job_usage: Memory usage: mem=7615468kb +08/24/2026 18:54:06 M signal job request received +08/24/2026 18:54:06 M signal job with TermJob +08/24/2026 18:54:06 M kill_job +08/24/2026 18:54:06 M task 00000001 terminated +08/24/2026 18:54:09 M no active process for task 00000001 +08/24/2026 18:54:09 M Terminated +08/24/2026 18:54:09 M task 00000001 cput=00:04:50 +08/24/2026 18:54:09 M kill_job +08/24/2026 18:54:09 M nid003409 cput=00:04:47 mem=7615468kb +08/24/2026 18:54:09 M update_job_usage: CPU usage: 301.000 secs +08/24/2026 18:54:09 M update_job_usage: Memory usage: mem=9381228kb + +------------------------------------------------------------------ +To see full PBS log data, run: /sfs/admin/scripts/tracejob.sh 136854537.dbqs01 + +================================================================== +END - DEBUG INFO +================================================================== + +Job 136854537.dbqs01 - Epilogue DEBUG complete. DEBUG Execution time: 5 seconds +Job 136854537.dbqs01 - Epilogue complete. Execution time: 7 seconds +##### Job 136854537.dbqs01 - PBS Job Script: +(Note: Duplicate #PBS entries are a function how PBS interprets and caches the original job script.) + +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=04:00:00 +##PBS -l select=1:ncpus=8:mem=128GB +#PBS -l select=1:ncpus=16:mem=256GB +##PBS -l select=1:ncpus=32:mem=256GB +###PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + + +# Compute interpolation weights and distance to boundary for a RWPS mesh. +# Files are created in local RWPS/fix directory. + +pip list -v + +cd $RWPSroot/ush/preprocess + +SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" +date="20260730" +cycl="00" +Nprocs=16 + + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +rrfs_hi=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.hi.nc +rrfs_pr=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.pr.nc +rrfs_ak=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.ak.nc +rrfs_na=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.na.nc +rrfs_conus=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.conus.nc + +out="../../fix" + +rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" +rrfsDst="$out/DistToBndy.$meshname.rrfs" + +#no extrapolation with rrfs forecasts +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_pr $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 > GenWhts.rrfs.pr.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_ak $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 > GenWhts.rrfs.ak.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_na $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 > GenWhts.rrfs.na.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_conus $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out + +nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc +nbmIntrp="$out/InterpolationWeights.$meshname.nbm" +nbmDst="$out/DistToBndy.$meshname.nbm" +#extrapolate nbm oc wind to all points +python ./compute_gridded_to_rwps_interp_weights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out + +nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc +#do not extrapolate for NBM .ak. domain +python ./compute_gridded_to_rwps_interp_weights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out + +rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc +rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" +rtofsDst="$out/DistToBndy.$meshname.rtofs" + +#extrapolate rtofs .glo. for full ice coverage + +python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out + + +rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc +#do not extrapolate rtofs .glo. currents +python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.current.nc $rtofsDst.current.nc -1 > GenWhts.rtofs.current.out + + + +#Old v2 of stofs +stofs_glo="$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" + +mkdir -p STOFSInterpWeights.$meshname +## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs + +## Now run parallel job script + +qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS + +wait + +#combine text file output of parallel jobs +cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt + +# convert output weights to netcdf file +python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 +cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.v2.nc +cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.v2.nc +mv DistToBndy.$meshname.stofs.nc DistToBndy.$meshname.stofs.v2.nc +mv InterpWeights.$meshname.stofs.nc InterpWeights.$meshname.stofs.v2.nc + +rm -rf STOFSInterpWeights.$meshname +rm InterpWeights.$meshname.stofs.txt +rm *.out +rm ESMPy* + + +mkdir -p STOFSInterpWeights.$meshname +#compute stofs weights for current(v3) stofs mesh +stofs_glo="$SID/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc" + +## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs + +## Now run parallel job script + +qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS + +wait + +#combine text file output of parallel jobs +cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt + +# convert output weights to netcdf file +python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 +cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc +cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc + + +rm -rf STOFSInterpWeights.$meshname +rm InterpWeights.$meshname.stofs.txt +rm *.out +rm ESMPy* + + + + +##### End of job script +------------------------------------------------------------------ + diff --git a/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136857549 b/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136857549 new file mode 100644 index 0000000..3848f01 --- /dev/null +++ b/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136857549 @@ -0,0 +1,1272 @@ +PBS: Running prologue on parent mom node: nid002876... +Job 136857549.dbqs01 nodelist: nid002876 +Job 136857549.dbqs01 - Prologue complete. Execution time: 4 seconds +Agent pid 3053904 +Identity added: /u/keston.smith/.ssh/id_ed25519 (keston.smith@noaa.gov) +/u/keston.smith/.bashrc: line 46: alias: eval "$(ssh-agent -s)"; ssh-add ~/.ssh/id_ed25519: not found +Resetting modules to system default. Reseting $MODULEPATH back to system default. All extra directories will be removed from $MODULEPATH. +Package Version Location Installer +------------------------- ----------- ---------------------------------------------------------------------------------- --------- +Cartopy 0.24.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +certifi 2025.1.31 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +cftime 1.6.4.post1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +contourpy 1.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +cycler 0.12.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +esmpy 8.6.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +fonttools 4.55.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +geographiclib 2.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +geopy 2.4.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +Jinja2 3.1.5 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +kiwisolver 1.4.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +MarkupSafe 3.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +matplotlib 3.10.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +netCDF4 1.7.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +numpy 2.2.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +packaging 24.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pandas 2.2.3 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pillow 11.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pip 25.0.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pyparsing 3.2.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pyproj 3.7.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pyshp 2.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +python-dateutil 2.9.0.post0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +pytz 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +PyYAML 6.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +scipy 1.15.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +setuptools 75.8.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +setuptools-git-versioning 2.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +shapely 2.0.7 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +six 1.17.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +tzdata 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +xarray 2025.1.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in + iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights + regrid = esmpy.Regrid( + ^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: Regrid.__init__() got an unexpected keyword argument 'overwrite' +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in + iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights + regrid = esmpy.Regrid( + ^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: Regrid.__init__() got an unexpected keyword argument 'overwrite' +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in + iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights + regrid = esmpy.Regrid( + ^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: Regrid.__init__() got an unexpected keyword argument 'overwrite' +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in + iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights + regrid = esmpy.Regrid( + ^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: Regrid.__init__() got an unexpected keyword argument 'overwrite' +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in + iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights + regrid = esmpy.Regrid( + ^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: Regrid.__init__() got an unexpected keyword argument 'overwrite' +rm: cannot remove '../../fix/InterpolationWeights.rwps.oc_5km_100km.nbm.oc.nc': No such file or directory +rm: cannot remove '../../fix/DistToBndy.rwps.oc_5km_100km.nbm.oc.nc': No such file or directory +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in + iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights + regrid = esmpy.Regrid( + ^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: Regrid.__init__() got an unexpected keyword argument 'overwrite' +rm: cannot remove '../../fix/InterpolationWeights.rwps.oc_5km_100km.nbm.ak.nc': No such file or directory +rm: cannot remove '../../fix/DistToBndy.rwps.oc_5km_100km.nbm.ak.nc': No such file or directory +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in + iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights + regrid = esmpy.Regrid( + ^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: Regrid.__init__() got an unexpected keyword argument 'overwrite' +rm: cannot remove '../../fix/InterpolationWeights.rwps.oc_5km_100km.rtofs.ice.nc': No such file or directory +rm: cannot remove '../../fix/DistToBndy.rwps.oc_5km_100km.rtofs.ice.nc': No such file or directory +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in + iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights + regrid = esmpy.Regrid( + ^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: Regrid.__init__() got an unexpected keyword argument 'overwrite' +rm: cannot remove '../../fix/InterpolationWeights.rwps.oc_5km_100km.rtofs.ice.nc': No such file or directory +rm: cannot remove '../../fix/DistToBndy.rwps.oc_5km_100km.rtofs.ice.nc': No such file or directory +Traceback (most recent call last): + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in + iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) + File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights + regrid = esmpy.Regrid( + ^^^^^^^^^^^^^ + File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ +TypeError: Regrid.__init__() got an unexpected keyword argument 'overwrite' +directory STOFSInterpWeights.rwps.oc_5km_100km is alread empty +Made parallel jobcards to create interpolation weights with 16 processes. Next step: +sbatch jobcardcompute_unstr_to_rwps_interp_weightsSLURM +136858948[].dbqs01 +mesh file=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/sorc/../../..//fix/rwps.oc_5km_100km.msh +nn = 103333 +number of nodes read: 103333 +ne=195951 -includes boundary nodes +number of open boundary nodes read: 350 +number of elements read: 195601 +n=300402 +n_s=300402 +directory STOFSInterpWeights.rwps.oc_5km_100km is alread empty +Made parallel jobcards to create interpolation weights with 16 processes. Next step: +sbatch jobcardcompute_unstr_to_rwps_interp_weightsSLURM +136859518[].dbqs01 +qsub: wait for job 136859518[].dbqs01 interrupted by signal 15 +Job 136859518[].dbqs01 is being deleted +PBS: Running epilogue on parent mom node: nid002876... +================================================================== +BEGIN - DEBUG INFO +================================================================== +Job 136857549.dbqs01 - Post Job Mem Usage: +nid002876: 2026-08-24.24 1 =========================================== +nid002876: 2026-08-24.24 2 #### Node Memory Usage for nid002876 #### +nid002876: 2026-08-24.24 3 ------------------ +nid002876: 2026-08-24.24 4 Mem: total:526983488 used:14977484 free:513071112 shared:534156 cache:1166980 avail:512006004 +nid002876: 2026-08-24.24 5 4.0K /dev/shm +nid002876: 2026-08-24.24 6 40K /tmp +nid002876: 2026-08-24.24 7 =========================================== +nid002876: 2026-08-24.05 1 =========================================== +nid002876: 2026-08-24.05 2 #### Node Memory Usage for nid002876 #### +nid002876: 2026-08-24.05 3 ------------------ +nid002876: 2026-08-24.05 4 Mem: total:526983488 used:15711556 free:509902084 shared:534420 cache:4147872 avail:511271932 +nid002876: 2026-08-24.05 5 4.0K /dev/shm +nid002876: 2026-08-24.05 6 40K /tmp +nid002876: 2026-08-24.05 7 =========================================== + +------------------------------------------------------------------ +------------------------------------------------------------------ +Job 136857549.dbqs01 - Post Job Mem Usage Profile: +2026-08-24A--:--:--.------+--:-- nid002876 #### nid002876 - Job 136857549.dbqs01 NUMA Node Memory Allocation and Fragmentation Reports +Starting Fragmentation Report for nid002876 +Node Order9 Order10 Score MB_Free %Free State +0 4802 8374 21550 43100 68 OK +1 3062 11098 25258 50516 78 OK +2 2743 11603 25949 51898 80 OK +3 2552 12490 27532 55064 85 OK +4 2436 12825 28086 56172 87 OK +5 1275 14004 29283 58566 90 OK +6 1284 13992 29268 58536 90 OK +7 1766 13502 28770 57540 89 OK + +** nid002876 : node0_score=21550 node0_state=OK uptime=4680314s Overall=OK ** +Ending Fragmentation Report for nid002876 +Node Order9 Order10 Score MB_Free %Free State +0 4793 8382 21557 43114 68 OK +1 3054 11098 25250 50500 78 OK +2 2738 11605 25948 51896 80 OK +3 2551 12490 27531 55062 85 OK +4 2431 12827 28085 56170 87 OK +5 1274 14004 29282 58564 90 OK +6 1284 13992 29268 58536 90 OK +7 1764 13504 28772 57544 89 OK + +** nid002876 : node0_score=21557 node0_state=OK uptime=4680955s Overall=OK ** +2026-08-24A--:--:--.------+--:-- nid002876 #### nid002876 - Job 136857549.dbqs01 VMSTATS Memory Report +**Only Printing Significant Findings - TEST CODE - Results are NOT positive indication of a problem. ** +nid002876 [!] Inactive file cache ballooned: 719336 (threshold: 100000) + +------------------------------------------------------------------ +Job 136857549.dbqs01 - /var/log/messages for job duration: +2026-08-24A--:--:--.------+--:-- nid002876 #### nid002876 - Job 136857549.dbqs01 Runtime Data from /var/log/messages +nid002876: nid002876 #### nid002876 - Job 136857549.dbqs01 Runtime Data from /var/log/messages +nid002876: 2026-08-24T19:14:24.568224+00:00 nid002876 prologue: MARK: Job 136857549.dbqs01 Start +nid002876: 2026-08-24T19:14:24.574814+00:00 nid002876 prologue: Job 136857549.dbqs01 nodelist: nid002876 +nid002876: 2026-08-24T19:14:24.576538+00:00 nid002876 prologue: Job 136857549.dbqs01 - Recording pre-execution stats and counters... +nid002876: 2026-08-24T19:14:24.611232+00:00 nid002876 prologue: Job 136857549.dbqs01 - Killing any stray user processes... +nid002876: 2026-08-24T19:14:24.695594+00:00 nid002876 prologue: Job 136857549.dbqs01 - Clearing /tmp... +nid002876: 2026-08-24T19:14:24.711690+00:00 nid002876 prologue: Job 136857549.dbqs01 - Verifying key post-boot workarounds with warchk... +nid002876: 2026-08-24T19:14:24.742061+00:00 nid002876 WARCHK: root : /sfs/admin/scripts/warchk --batch +nid002876: 2026-08-24T19:14:24.950074+00:00 nid002876 prologue: Job 136857549.dbqs01 - Recording pre-job memory usage... +nid002876: 2026-08-24T19:14:25.029973+00:00 nid002876 prologue: Job 136857549.dbqs01 - FRAG_STATE: ** nid002876 : node0_score=21550 node0_state=OK uptime=4680314s Overall=OK ** +nid002876: 2026-08-24T19:14:25.031210+00:00 nid002876 prologue: Job 136857549.dbqs01 - Recording pre-job HSN counters... +nid002876: 2026-08-24T19:14:25.158228+00:00 nid002876 prologue: Job 136857549.dbqs01 - Recording pre-job Lustre counters... +nid002876: 2026-08-24T19:14:26.235490+00:00 nid002876 prologue: Job 136857549.dbqs01 - Recording initial NFS client statistics... +nid002876: 2026-08-24T19:14:26.247233+00:00 nid002876 prologue: Job 136857549.dbqs01 - Saving a copy of the job script... +nid002876: 2026-08-24T19:14:26.256349+00:00 nid002876 prologue: Job 136857549.dbqs01 - Checking existing ASLR settings... +nid002876: 2026-08-24T19:14:26.261868+00:00 nid002876 prologue: Job 136857549.dbqs01 - Checking palsd open file count... +nid002876: 2026-08-24T19:14:26.350307+00:00 nid002876 PBS_CMD: root : /opt/pbs/bin/qstat -Bf +nid002876: 2026-08-24T19:14:27.365852+00:00 nid002876 prologue: Job 136857549.dbqs01 - Checking one-shot enabled: False +nid002876: 2026-08-24T19:14:27.366963+00:00 nid002876 prologue: Job 136857549.dbqs01 - Enabling turboboost... +nid002876: 2026-08-24T19:14:27.369949+00:00 nid002876 prologue: Job 136857549.dbqs01 - Checking warchk results... +nid002876: 2026-08-24T19:14:27.373110+00:00 nid002876 prologue: Job 136857549.dbqs01 - Warchk Complete +nid002876: 2026-08-24T19:14:27.375936+00:00 nid002876 prologue: Job 136857549.dbqs01 - Prologue complete. Execution time: 4 seconds +nid002876: 2026-08-24T19:14:51.032982+00:00 nid002876 systemd[1]: etc_update.service: Deactivated successfully. +nid002876: 2026-08-24T19:15:14.071090+00:00 nid002876 systemd[1]: session-13761.scope: Deactivated successfully. +nid002876: 2026-08-24T19:17:12.681822+00:00 nid002876 PBS_CMD: keston.smith : /opt/pbs/bin/qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS +nid002876: 2026-08-24T19:18:37.003443+00:00 nid002876 kernel: [4680428.109660][T14054] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid002876: 2026-08-24T19:21:29.624548+00:00 nid002876 PBS_CMD: keston.smith : /opt/pbs/bin/qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS +nid002876: 2026-08-24T19:23:06.024592+00:00 nid002876 systemd[1]: etc_update.service: Deactivated successfully. +nid002876: 2026-08-24T19:23:36.011443+00:00 nid002876 kernel: [4680727.108831][T14054] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid002876: 2026-08-24T19:25:05.414129+00:00 nid002876 epilogue: Job 136857549.dbqs01 complete, running post-job actions. +nid002876: 2026-08-24T19:25:05.434015+00:00 nid002876 epilogue: MARK: Job 136857549.dbqs01 Complete. + +------------------------------------------------------------------ +Job 136857549.dbqs01 - dmesg output for job duration: +2026-08-24A--:--:--.------+--:-- nid002876 #### nid002876 - Job 136857549.dbqs01 Runtime Data from dmesg +nid002876: nid002876 #### nid002876 - Job 136857549.dbqs01 Runtime Data from dmesg +nid002876: [Mon Aug 24 19:12:05 2026] MARK: Job 136857549.dbqs01 Start +nid002876: [Mon Aug 24 19:16:18 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid002876: [Mon Aug 24 19:21:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib +nid002876: [Mon Aug 24 19:22:46 2026] MARK: Job 136857549.dbqs01 Complete. + +------------------------------------------------------------------ +Job 136857549.dbqs01 - Pre/Post job diff on HSN (MLX) Counters: +2026-08-24A--:--:--.------+--:-- nid002876 #### nid002876 - Job 136857549.dbqs01 HSN0 MLX Counter Post-Job Difference +nid002876: multicast:: 7094584 | multicast:: 7094782 | Diff: 198 +nid002876: rx_bytes:: 241632486674 | rx_bytes:: 241633346570 | Diff: 859896 +nid002876: rx_packets:: 46513587 | rx_packets:: 46514368 | Diff: 781 +nid002876: tx_bytes:: 201843908216 | tx_bytes:: 201844112707 | Diff: 204491 +nid002876: tx_packets:: 36400276 | tx_packets:: 36401008 | Diff: 732 +nid002876: port_rcv_data:: 370464178373853 | port_rcv_data:: 370464554478312 | Diff: 376104459 +nid002876: port_rcv_packets:: 645811616901 | port_rcv_packets:: 645812124065 | Diff: 507164 +nid002876: port_xmit_data:: 372155359532312 | port_xmit_data:: 372156227585855 | Diff: 868053543 +nid002876: port_xmit_packets:: 647281723478 | port_xmit_packets:: 647282678683 | Diff: 955205 +nid002876: unicast_rcv_packets:: 645811616901 | unicast_rcv_packets:: 645812124065 | Diff: 507164 +nid002876: unicast_xmit_packets:: 647281723478 | unicast_xmit_packets:: 647282678683 | Diff: 955205 +nid002876: resp_cqe_error:: 56918 | resp_cqe_error:: 56972 | Diff: 54 +nid002876: resp_cqe_flush_error:: 53845 | resp_cqe_flush_error:: 53896 | Diff: 51 +nid002876: rx_write_requests:: 59502696 | rx_write_requests:: 59512855 | Diff: 10159 + +------------------------------------------------------------------ +Job 136857549.dbqs01 - Pre/Post job diff for Lustre Stats: +2026-08-24A--:--:--.------+--:-- nid002876 #### nid002876 - Job 136857549.dbqs01 Lustre Counters Post-Job Difference +nid002876: ### LustreStats: Multi-value diffs correspond to [samples min max total sum_of_squares] ### +nid002876: /lfs/h1 vah1-ffff8f1f9df24800 : +nid002876: h1: snapshot_time: Diffs: [ 640] secs +nid002876: h1: elapsed_time: Diffs: [ 640] secs +nid002876: h1: ioctl: Diffs: [ 2] reqs +nid002876: h1: getattr: Diffs: [ 15 0 0 56 608] Avg_usec : 3.73 +nid002876: h1: inode_permission: Diffs: [ 2 0 0 3 5] Avg_usec : 1.50 +nid002876: h1: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 +nid002876: ---------------- +nid002876: /lfs/h2 vah2-ffff8f1f94b6f800 : +nid002876: h2: snapshot_time: Diffs: [ 640] secs +nid002876: h2: elapsed_time: Diffs: [ 641] secs +nid002876: h2: read_bytes: Diffs: [ 18874 0 0 940406996 15628740124068002] Avg_bytes: 49825.52 +nid002876: h2: write_bytes: Diffs: [ 1056 0 0 3529717378 34619386792483226] Avg_bytes: 3342535.39 +nid002876: h2: read: Diffs: [ 18829 0 0 5012818 471155360550] Avg_usec : 266.22 +nid002876: h2: write: Diffs: [ 1116 0 0 2443271 52936160595] Avg_usec : 2189.31 +nid002876: h2: ioctl: Diffs: [ 713] reqs +nid002876: h2: open: Diffs: [ 249 0 0 30467 13491729] Avg_usec : 122.35 +nid002876: h2: close: Diffs: [ 250 0 0 24597 4954647] Avg_usec : 98.38 +nid002876: h2: seek: Diffs: [ 3991 0 0 554 28328] Avg_usec : .13 +nid002876: h2: readdir: Diffs: [ 73 0 0 10785 4817955] Avg_usec : 147.73 +nid002876: h2: truncate: Diffs: [ 65 0 0 6942233 4648419164967] Avg_usec : 106803.58 +nid002876: h2: flock: Diffs: [ 40 0 0 3370 660684] Avg_usec : 84.25 +nid002876: h2: getattr: Diffs: [ 2613 0 0 120383 1821888757] Avg_usec : 46.07 +nid002876: h2: unlink: Diffs: [ 109 0 0 35061 18585175] Avg_usec : 321.66 +nid002876: h2: mkdir: Diffs: [ 7 0 0 10554 77064914] Avg_usec : 1507.71 +nid002876: h2: rmdir: Diffs: [ 5 0 0 1147 264587] Avg_usec : 229.40 +nid002876: h2: mknod: Diffs: [ 15 0 0 5471 3019099] Avg_usec : 364.73 +nid002876: h2: rename: Diffs: [ 7 0 0 2629 1009901] Avg_usec : 375.57 +nid002876: h2: getxattr: Diffs: [ 107 0 0 3750 520700] Avg_usec : 35.04 +nid002876: h2: getxattr_hits: Diffs: [ 81] reqs +nid002876: h2: inode_permission: Diffs: [ 19339 0 0 8651 46089] Avg_usec : .44 +nid002876: h2: opencount: Diffs: [ 251 0 0 1495 18807] Avg_reqs : 5.95 +nid002876: ---------------- +nid002876: /lfs/f1 vaf1-ffff8f1f9e842800 : +nid002876: f1: snapshot_time: Diffs: [ 640] secs +nid002876: f1: elapsed_time: Diffs: [ 641] secs +nid002876: f1: ioctl: Diffs: [ 2] reqs +nid002876: f1: getattr: Diffs: [ 11 0 0 33 221] Avg_usec : 3.00 +nid002876: f1: inode_permission: Diffs: [ 2 0 0 2 2] Avg_usec : 1.00 +nid002876: f1: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 +nid002876: ---------------- +nid002876: /lfs/f2 vaf2-ffff8f1f94cc7000 : +nid002876: f2: snapshot_time: Diffs: [ 640] secs +nid002876: f2: elapsed_time: Diffs: [ 641] secs +nid002876: f2: read_bytes: Diffs: [ 28 0 0 343662 9367820514] Avg_bytes: 12273.64 +nid002876: f2: write_bytes: Diffs: [ 18 0 0 29778 104071518] Avg_bytes: 1654.33 +nid002876: f2: read: Diffs: [ 28 0 0 379 7887] Avg_usec : 13.53 +nid002876: f2: write: Diffs: [ 478 0 0 8736 4547764] Avg_usec : 18.27 +nid002876: f2: ioctl: Diffs: [ 14] reqs +nid002876: f2: open: Diffs: [ 23 0 0 823 163867] Avg_usec : 35.78 +nid002876: f2: close: Diffs: [ 23 0 0 1557 212089] Avg_usec : 67.69 +nid002876: f2: seek: Diffs: [ 37 0 0 1806 463696] Avg_usec : 48.81 +nid002876: f2: readdir: Diffs: [ 2 0 0 405 164025] Avg_usec : 202.50 +nid002876: f2: getattr: Diffs: [ 38 0 0 4803 1681891] Avg_usec : 126.39 +nid002876: f2: mknod: Diffs: [ 11 0 0 2707 727251] Avg_usec : 246.09 +nid002876: f2: getxattr: Diffs: [ 11 0 0 1298 162422] Avg_usec : 118.00 +nid002876: f2: inode_permission: Diffs: [ 138 0 0 323 6125] Avg_usec : 2.34 +nid002876: f2: opencount: Diffs: [ 25 0 0 56 230] Avg_reqs : 2.24 +nid002876: ---------------- +nid002876: /lfs/h3 vah3-ffff8f1f9e844800 : +nid002876: h3: snapshot_time: Diffs: [ 640] secs +nid002876: h3: elapsed_time: Diffs: [ 641] secs +nid002876: h3: ioctl: Diffs: [ 2] reqs +nid002876: h3: getattr: Diffs: [ 7 0 0 27 185] Avg_usec : 3.85 +nid002876: h3: inode_permission: Diffs: [ 2 0 0 2 2] Avg_usec : 1.00 +nid002876: h3: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 +nid002876: ---------------- +nid002876: /apps vaf2-ffff8f1f94123000 : +nid002876: apps: snapshot_time: Diffs: [ 640] secs +nid002876: apps: elapsed_time: Diffs: [ 641] secs +nid002876: apps: read_bytes: Diffs: [ 14849 0 0 268789368 25164041953450] Avg_bytes: 18101.51 +nid002876: apps: read: Diffs: [ 14849 0 0 710583 223337109] Avg_usec : 47.85 +nid002876: apps: ioctl: Diffs: [ 10836] reqs +nid002876: apps: open: Diffs: [ 17782 0 0 882240 184925836] Avg_usec : 49.61 +nid002876: apps: close: Diffs: [ 17782 0 0 662105 115241959] Avg_usec : 37.23 +nid002876: apps: mmap: Diffs: [ 8104 0 0 47447 711573] Avg_usec : 5.85 +nid002876: apps: page_fault: Diffs: [ 163823 0 0 9240 21376] Avg_usec : .05 +nid002876: apps: seek: Diffs: [ 21508 0 0 26 58] Avg_usec : 0 +nid002876: apps: readdir: Diffs: [ 6944 0 0 421257 362839137] Avg_usec : 60.66 +nid002876: apps: getattr: Diffs: [ 79508 0 0 1354917 201129543] Avg_usec : 17.04 +nid002876: apps: getxattr: Diffs: [ 13 0 0 147 8551] Avg_usec : 11.30 +nid002876: apps: getxattr_hits: Diffs: [ 12] reqs +nid002876: apps: inode_permission: Diffs: [ 1091932 0 0 148769 373879] Avg_usec : .13 +nid002876: apps: opencount: Diffs: [ 17784 0 0 91801 681741] Avg_reqs : 5.16 +nid002876: ---------------- + +------------------------------------------------------------------ +### Job 136857549.dbqs01 - NFS Statistics for job duration: +#### 2026-08-24A--:--:--.------+--:-- nid002876 Job 136857549.dbqs01 - DEBUG-NFS: Unable to find NFS stats file: /lfs/f2/hpc/jobdata/136857549/nfsstats.136857549.nid002876 + +------------------------------------------------------------------ +### Job 136857549.dbqs01 - Lustre evictions (if present): + +------------------------------------------------------------------ +### Job 136857549.dbqs01 - Exit status is 271 + +------------------------------------------------------------------ +Job 136857549.dbqs01 - Job summary: +Job Id: 136857549.dbqs01 + Job_Name = ESMPy + Job_Owner = keston.smith@dlogin01.dogwood.wcoss2.ncep.noaa.gov + resources_used.cpupercent = 108 + resources_used.cput = 00:03:15 + resources_used.mem = 3121144kb + resources_used.ncpus = 16 + resources_used.vmem = 2063040kb + resources_used.walltime = 00:10:37 + job_state = R + queue = dev + server = dbqs01 + Account_Name = NWPS-DEV + Checkpoint = u + ctime = Mon Aug 24 19:08:06 2026 + Error_Path = dlogin01.dogwood.wcoss2.ncep.noaa.gov:/lfs/h2/emc/couple/noscr + ub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/sor + c/ESMPy.e136857549 + exec_host = nid002876/0*16 + exec_vnode = (nid002876:ncpus=16:mem=268435456kb) + Hold_Types = n + Join_Path = oe + Keep_Files = oed + Mail_Points = a + mtime = Mon Aug 24 19:25:08 2026 + Output_Path = dlogin01.dogwood.wcoss2.ncep.noaa.gov:/lfs/h2/emc/couple/nosc + rub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/so + rc/ESMPy.o136857549 + Priority = 0 + qtime = Mon Aug 24 19:08:06 2026 + Rerunable = False + Resource_List.alvl = 2 + Resource_List.aslr = True + Resource_List.debug = True + Resource_List.dfs = False + Resource_List.hyper = True + Resource_List.ldebug = False + Resource_List.mem = 256gb + Resource_List.ncpus = 16 + Resource_List.nodect = 1 + Resource_List.one-shot = False + Resource_List.place = exclhost + Resource_List.select = 1:ncpus=16:mem=256GB + Resource_List.turbo = True + Resource_List.walltime = 04:00:00 + schedselect = 1:ncpus=16:mem=256GB:prepost=False + stime = Mon Aug 24 19:14:23 2026 + session_id = 3051933 + Shell_Path_List = /bin/bash + jobdir = /u/keston.smith + substate = 42 + Variable_List = PBS_O_HOME=/u/keston.smith,PBS_O_LANG=en_US.UTF-8, + PBS_O_LOGNAME=keston.smith, + PBS_O_PATH=/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/bin:/ + apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfatslqmcrzo5kb4raaq + /bin:/apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5lndzgkkqq36y4a2h4y + x3ahdy/bin:/pe/intel/compilers_and_libraries_2020.4.304/linux/bin/intel + 64:/pe/intel/compilers_and_libraries_2020.4.304/linux/bin:/pe/intel/com + pilers_and_libraries_2020.4.304/linux/mpi/intel64/bin:/pe/intel/debugge + r_2020/gdb/intel64/bin:/opt/cray/pe/craype/2.7.17/bin:/opt/cray/bin:/ap + ps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__ + e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6.0/bin:/apps/ + prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8 + .6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9.2/bin:/apps/p + rod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8. + 6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf5/1.14.0/bin:/opt/cray + /pe/mpich/8.1.19/bin:/u/keston.smith/.local/bin:/usr/local/bin:/usr/bin + :/bin:/opt/c3/bin:/opt/pbs/bin:/sbin:/opt/cray/pe/bin, + PBS_O_MAIL=/var/spool/mail/keston.smith,PBS_O_SHELL=/bin/bash, + PBS_O_WORKDIR=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWP + S/dev/compute_interpolation_weights/sorc,PBS_O_SYSTEM=Linux, + CRAY_LMOD_MPI=cray-mpich/8.0,LMOD_FAMILY_CRAYPE_NETWORK_VERSION=false, + meshID=oc_5km_100km, + LD_LIBRARY_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcf + atslqmcrzo5kb4raaq/lib:/apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5 + lndzgkkqq36y4a2h4yx3ahdy/lib:/pe/intel/compilers_and_libraries_2020.4.3 + 04/linux/compiler/lib/intel64_lin:/pe/intel/compilers_and_libraries_202 + 0.4.304/linux/mpi/intel64/lib/release:/pe/intel/compilers_and_libraries + _2020.4.304/linux/mpi/intel64/lib:/pe/intel/compilers_and_libraries_202 + 0.4.304/linux/ipp/lib/intel64:/pe/intel/compilers_and_libraries_2020.4. + 304/linux/mkl/lib/intel64_lin:/pe/intel/compilers_and_libraries_2020.4. + 304/linux/tbb/lib/intel64/gcc4.8:/pe/intel/debugger_2020/python/intel64 + /lib:/pe/intel/debugger_2020/libipt/intel64/lib:/opt/cray/lib64:/apps/p + rod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8. + 6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6.0/lib:/apps/prod + /hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0 + pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9.2/lib:/apps/prod/ + hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0p + netcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf5/1.14.0/lib, + LS_COLORS=no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd= + 40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com + =01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tg + z=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.l + zma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2= + 00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.xz=00;31:*.avi=01;35:*.bmp + =01;35:*.dl=01;35:*.fli=01;35:*.gif=01;35:*.gl=01;35:*.jpg=01;35:*.jpeg + =01;35:*.mkv=01;35:*.mng=01;35:*.mov=01;35:*.mp4=01;35:*.mpg=01;35:*.pc + x=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.svg=01;35:*.t + ga=01;35:*.tif=01;35:*.webm=01;35:*.webp=01;35:*.wmv=01;35:*.xbm=01;35: + *.xcf=01;35:*.xpm=01;35:*.aiff=00;32:*.ape=00;32:*.au=00;32:*.flac=00;3 + 2:*.m4a=00;32:*.mid=00;32:*.mp3=00;32:*.mpc=00;32:*.ogg=00;32:*.voc=00; + 32:*.wav=00;32:*.wma=00;32:*.wv=00;32:,HOSTTYPE=x86_64, + LMOD_CUSTOM_PATHS=COMPILER/apps/ops/prod/nco/modulefiles/compiler/inte + l/19.1.3.304:COMPILER/apps/ops/prod/libs/modulefiles/compiler/intel/19. + 1.3.304:COMPILER/apps/prod/lmodules/intel/19.1.3.304:COMPILER/apps/ops/ + prod/nco/models/modulefiles:CNCM/apps/ops/prod/libs/modulefiles/mpi/int + el/19.1.3.304/cray-mpich/8.1.4:CNCM/apps/prod/lmodules/INTEL_cray_mpich + /19.1.3.304/cray-mpich/8.1.4, + prep=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/com + pute_interpolation_weights/sorc/../../..//PrepInputs, + __LMOD_REF_COUNT_PATH=/apps/prod/ve/intel/19.1.3.304/python/3.12.0/haf + s/2.1/bin:1;/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfatslq + mcrzo5kb4raaq/bin:1;/apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5lnd + zgkkqq36y4a2h4yx3ahdy/bin:1;/pe/intel/compilers_and_libraries_2020.4.30 + 4/linux/bin/intel64:1;/pe/intel/compilers_and_libraries_2020.4.304/linu + x/bin:1;/pe/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/ + bin:1;/pe/intel/debugger_2020/gdb/intel64/bin:1;/opt/cray/pe/craype/2.7 + .17/bin:1;/opt/cray/bin:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__ + h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich + -8.1.12/esmf/8.6.0/bin:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h + -1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich- + 8.1.12/netcdf/4.9.2/bin:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__ + h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich + -8.1.12/hdf5/1.14.0/bin:1;/opt/cray/pe/mpich/8.1.19/bin:1;/u/keston.smi + th/.local/bin:1;/usr/local/bin:1;/usr/bin:1;/bin:2;/opt/c3/bin:1;/opt/p + bs/bin:1;/sbin:1;/opt/cray/pe/bin:1, + _ModuleTable002_=b2FkT3JkZXIiXT0xMCxwcm9wVD17fSxbInN0YWNrRGVwdGgiXT0xL + Fsic3RhdHVzIl09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJdPSJQcmdFbnYtaW50ZWwvOC41LjAi + LH0sWyJjcmF5LW1waWNoIl09e1siZm4iXT0iL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZml + sZXMvY29tbmV0L2ludGVsLzE5LjAvb2ZpLzEuMC9jcmF5LW1waWNoLzguMS4xOS5sdWEiLF + siZnVsbE5hbWUiXT0iY3JheS1tcGljaC84LjEuMTkiLFsibG9hZE9yZGVyIl09MSxwcm9wV + D17fSxbInN0YWNrRGVwdGgiXT0wLFsic3RhdHVzIl09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJd + PSJjcmF5LW1waWNoLzguMS4xOSIsfSxjcmF5cGU9e1siZm4iXT0iL29wdC9jcmF5L3BlL2x + tb2QvbW9kdWxlZmlsZXMvY29yZS9jcmF5, + PE_MPICH_GTL_DIR_amd_gfx90a=-L/opt/cray/pe/mpich/8.1.19/gtl/lib, + SSH_CONNECTION=192.58.153.8 43034 192.58.153.11 22, + mesh=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/com + pute_interpolation_weights/sorc/../../..//fix/rwps.oc_5km_100km.msh, + INCLUDE=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfatslqmcr + zo5kb4raaq/include:/apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5lndz + gkkqq36y4a2h4yx3ahdy/include,XAUTHLOCALHOSTNAME=dlogin01, + LESSCLOSE=lessclose.sh %s %s, + CRAY_LD_LIBRARY_PATH=/opt/cray/pe/mpich/8.1.19/ofi/intel/19.0/lib:/opt + /cray/pe/mpich/8.1.19/gtl/lib, + __LMOD_REF_COUNT_DYLD_LIBRARY_PATH=/apps/prod/hpc-stack/i-19.1.3.304__ + m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/ + cray-mpich-8.1.12/esmf/8.6.0/lib:1;/apps/prod/hpc-stack/i-19.1.3.304__m + -8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/c + ray-mpich-8.1.12/netcdf/4.9.2/lib:1;/apps/prod/hpc-stack/i-19.1.3.304__ + m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/ + cray-mpich-8.1.12/hdf5/1.14.0/lib:1, + XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB,PE_ENV=INTEL, + __LMOD_REF_COUNT_C_INCLUDE_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.30 + 4/cjbmc7tacv5qcfatslqmcrzo5kb4raaq/include:1;/apps/spack/geos/3.8.1/int + el/19.1.3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy/include:1, + __LMOD_REF_COUNT_PE_FORTRAN_PKGCONFIG_LIBS=mpichf90:1, + ESMF_LIB=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9. + 2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6 + .0/lib,LMOD_FAMILY_CRAYPE_CPU=craype-x86-rome, + CRAY_LMOD_COMPILER=intel/19.0, + LMOD_MODULERCFILE=/apps/prod/lmodules/.modulerc.lua, + PE_PRODUCT_LIST=CRAYPE:CRAYPE_X86_ROME,LMOD_IGNORE_CACHE=yes, + LMOD_FAMILY_MPI_VERSION=8.1.19, + PE_PERFTOOLS_MPICH_LIBDIR=/opt/cray/pe/mpich/8.1.19/ofi/intel/19.0/lib + ,PE_MPICH_GTL_DIR_amd_gfx906=-L/opt/cray/pe/mpich/8.1.19/gtl/lib, + LANG=en_US.UTF-8,NetCDF_VERSION=4.9.2, + PE_MPICH_GTL_DIR_amd_gfx908=-L/opt/cray/pe/mpich/8.1.19/gtl/lib, + WINDOWMANAGER=xterm, + _ModuleTable008_=ciJdPTMscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MCxbInN0YXR1c + yJdPSJhY3RpdmUiLFsidXNlck5hbWUiXT0ibmV0Y2RmLUMvNC45LjIiLH0scHJvaj17WyJm + biJdPSIvYXBwcy9wcm9kL2xtb2R1bGVzL2ludGVsLzE5LjEuMy4zMDQvcHJvai83LjEuMCI + sWyJmdWxsTmFtZSJdPSJwcm9qLzcuMS4wIixbImxvYWRPcmRlciJdPTEzLHByb3BUPXt9LF + sic3RhY2tEZXB0aCJdPTEsWyJzdGF0dXMiXT0iYWN0aXZlIixbInVzZXJOYW1lIl09InByb + 2ovNy4xLjAiLH0sWyJ2ZS9oYWZzIl09e1siZm4iXT0iL2FwcHMvcHJvZC9sbW9kdWxlcy9p + bnRlbC8xOS4xLjMuMzA0L3ZlL2hhZnMvMi4xIixbImZ1bGxOYW1lIl09InZlL2hhZnMvMi4 + xIixbImxvYWRPcmRlciJdPTE0LHByb3BU,LESS=-M -I -R, + PE_MPICH_GTL_LIBS_nvidia70=-lmpi_gtl_cuda, + __LMOD_REF_COUNT_INTEL_LICENSE_FILE=/pe/intel/compilers_and_libraries_ + 2020.4.304/linux/licenses:1;/opt/intel/licenses:1;/intel/licenses:1, + DISPLAY=localhost:20.0,HISTTIMEFORMAT=%F %T, + LMOD_FAMILY_COMPILER_VERSION=19.1.3.304,HOSTNAME=dlogin01, + IPPROOT=/pe/intel/compilers_and_libraries_2020.4.304/linux/ipp, + LMOD_SYSTEM_DEFAULT_MODULES=envvar/1.0, + OLDPWD=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/p + reprocess, + __LMOD_REF_COUNT__LMFILES_=/opt/cray/pe/lmod/modulefiles/comnet/intel/ + 19.0/ofi/1.0/cray-mpich/8.1.19.lua:1;/apps/prod/lmodules/INTEL_cray_mpi + ch/19.1.3.304/cray-mpich/8.1.4/hdf5-C/1.14.0.lua:1;/apps/prod/lmodules/ + INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4/netcdf-C/4.9.2.lua:1;/apps + /prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4/esmf-C/8.6. + 0.lua:1;/opt/cray/pe/lmod/modulefiles/craype-targets/default/craype-x86 + -rome.lua:1;/opt/cray/modulefiles/libfabric/1.20.1:1;/opt/cray/pe/lmod/ + modulefiles/craype-targets/default/craype-network-ofi.lua:1;/apps/prod/ + lmodules/sys_core/envvar/1.0:1;/opt/cray/pe/lmod/modulefiles/core/crayp + e/2.7.17.lua:1;/opt/cray/pe/lmod/modulefiles/core/PrgEnv-intel/8.5.0.lu + a:1;/apps/prod/lmodules/core/intel/19.1.3.304.lua:1;/apps/prod/lmodules + /intel/19.1.3.304/geos/3.8.1:1;/apps/prod/lmodules/intel/19.1.3.304/pro + j/7.1.0:1;/apps/prod/lmodules/intel/19.1.3.304/ve/hafs/2.1:1, + CONFIG_SITE=/usr/share/site/x86_64-unknown-linux-gnu,CSHEDIT=emacs, + NETCDF_ROOT=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4 + .9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcd + f/4.9.2, + C_INCLUDE_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfa + tslqmcrzo5kb4raaq/include:/apps/spack/geos/3.8.1/intel/19.1.3.304/5reck + tk5lndzgkkqq36y4a2h4yx3ahdy/include, + HDF5_ROOT=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9 + .2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf5/1. + 14.0, + LMOD_CUSTOM_CNCM_INTEL_19_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX + =/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/apps + /ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4, + NETCDF_VERSION=4.9.2, + LMOD_CUSTOM_COMPILER_GNU_8_0_PREFIX=/apps/prod/lmodules/gcc/11.2.0:/ap + ps/prod/lmodules/gcc/10.2.0,ESMF_VERSION=8.6.0,GPG_TTY=/dev/pts/20, + LESS_ADVANCED_PREPROCESSOR=no, + HDF5_LIBRARIES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__ + n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hd + f5/1.14.0/lib,COLORTERM=1, + frc=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp + ute_interpolation_weights/sorc/../../..//PrepInputs/forcing, + _ModuleTable007_=PTEsWyJzdGF0dXMiXT0iYWN0aXZlIixbInVzZXJOYW1lIl09Imlud + GVsLzE5LjEuMy4zMDQiLH0sbGliZmFicmljPXtbImZuIl09Ii9vcHQvY3JheS9tb2R1bGVm + aWxlcy9saWJmYWJyaWMvMS4yMC4xIixbImZ1bGxOYW1lIl09ImxpYmZhYnJpYy8xLjIwLjE + iLFsibG9hZE9yZGVyIl09Nixwcm9wVD17fSxbInN0YWNrRGVwdGgiXT0zLFsic3RhdHVzIl + 09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJdPSJsaWJmYWJyaWMiLH0sWyJuZXRjZGYtQyJdPXtbI + mZuIl09Ii9hcHBzL3Byb2QvbG1vZHVsZXMvSU5URUxfY3JheV9tcGljaC8xOS4xLjMuMzA0 + L2NyYXktbXBpY2gvOC4xLjQvbmV0Y2RmLUMvNC45LjIubHVhIixbImZ1bGxOYW1lIl09Im5 + ldGNkZi1DLzQuOS4yIixbImxvYWRPcmRl, + ESMF_DIR=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9. + 2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6 + .0, + __LMOD_REF_COUNT_NLSPATH=/pe/intel/compilers_and_libraries_2020.4.304/ + linux/compiler/lib/intel64/locale/%l_%t/%N:1;/pe/intel/compilers_and_li + braries_2020.4.304/linux/mkl/lib/intel64_lin/locale/%l_%t/%N:1;/pe/inte + l/debugger_2020/gdb/intel64/share/locale/%l_%t/%N:1, + __LMOD_REF_COUNT_CPLUS_INCLUDE_PATH=/apps/spack/proj/7.1.0/intel/19.1. + 3.304/cjbmc7tacv5qcfatslqmcrzo5kb4raaq/include:1;/apps/spack/geos/3.8.1 + /intel/19.1.3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy/include:1, + LMOD_FAMILY_CRAYPE_NETWORK=craype-network-ofi, + LMOD_FAMILY_CRAYPE_VERSION=2.7.17, + NetCDF_INCLUDES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0_ + _n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/n + etcdf/4.9.2/include, + __LMOD_REF_COUNT_INCLUDE=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc + 7tacv5qcfatslqmcrzo5kb4raaq/include:1;/apps/spack/geos/3.8.1/intel/19.1 + .3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy/include:1, + DYLD_LIBRARY_PATH=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14. + 0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12 + /esmf/8.6.0/lib:/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__ + n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/ne + tcdf/4.9.2/lib:/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n + -4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf + 5/1.14.0/lib,MACHTYPE=x86_64-suse-linux, + __LMOD_REF_COUNT_LD_LIBRARY_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.3 + 04/cjbmc7tacv5qcfatslqmcrzo5kb4raaq/lib:1;/apps/spack/geos/3.8.1/intel/ + 19.1.3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy/lib:1;/pe/intel/compilers_a + nd_libraries_2020.4.304/linux/compiler/lib/intel64_lin:1;/pe/intel/comp + ilers_and_libraries_2020.4.304/linux/mpi/intel64/lib/release:1;/pe/inte + l/compilers_and_libraries_2020.4.304/linux/mpi/intel64/lib:1;/pe/intel/ + compilers_and_libraries_2020.4.304/linux/ipp/lib/intel64:1;/pe/intel/co + mpilers_and_libraries_2020.4.304/linux/mkl/lib/intel64_lin:1;/pe/intel/ + compilers_and_libraries_2020.4.304/linux/tbb/lib/intel64/gcc4.8:1;/pe/i + ntel/debugger_2020/python/intel64/lib:1;/pe/intel/debugger_2020/libipt/ + intel64/lib:1;/opt/cray/lib64:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8. + 1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray + -mpich-8.1.12/esmf/8.6.0/lib:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1 + .12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray- + mpich-8.1.12/netcdf/4.9.2/lib:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8. + 1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray + -mpich-8.1.12/hdf5/1.14.0/lib:1, + __LMOD_REF_COUNT_PKG_CONFIG_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.3 + 04/cjbmc7tacv5qcfatslqmcrzo5kb4raaq/lib/pkgconfig:1;/pe/intel/compilers + _and_libraries_2020.4.304/linux/mkl/bin/pkgconfig:1;/opt/cray/pe/craype + /2.7.17/pkg-config:1;/opt/cray/lib64/pkgconfig:1, + LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_UCX_1_0_PREFIX=/apps/prod/lmodules/cce + /13.0.0:/apps/prod/lmodules/cce/12.0.3:/apps/prod/lmodules/cce/11.0.4, + PE_PKGCONFIG_PRODUCTS=PE_MPICH, + CRAY_MPICH_BASEDIR=/opt/cray/pe/mpich/8.1.19/ofi, + PE_MPICH_GTL_DIR_nvidia80=-L/opt/cray/pe/mpich/8.1.19/gtl/lib, + tmp=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp + ute_interpolation_weights/sorc/../../..//PrepInputs/tmpfiles, + SSH_AUTH_SOCK=/tmp/ssh-4Jj8NWWunyXC/agent.2417289, + _ModuleTable004_=cm9tZSJdPXtbImZuIl09Ii9vcHQvY3JheS9wZS9sbW9kL21vZHVsZ + WZpbGVzL2NyYXlwZS10YXJnZXRzL2RlZmF1bHQvY3JheXBlLXg4Ni1yb21lLmx1YSIsWyJm + dWxsTmFtZSJdPSJjcmF5cGUteDg2LXJvbWUiLFsibG9hZE9yZGVyIl09NSxwcm9wVD17fSx + bInN0YWNrRGVwdGgiXT0yLFsic3RhdHVzIl09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJdPSJjcm + F5cGUteDg2LXJvbWUiLH0sZW52dmFyPXtbImZuIl09Ii9hcHBzL3Byb2QvbG1vZHVsZXMvc + 3lzX2NvcmUvZW52dmFyLzEuMCIsWyJmdWxsTmFtZSJdPSJlbnZ2YXIvMS4wIixbImxvYWRP + cmRlciJdPTgscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MSxbInN0YXR1cyJdPSJhY3RpdmU + iLFsidXNlck5hbWUiXT0iZW52dmFyLzEu, + VIRTUAL_ENV=/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1, + MINICOM=-c on, + HDF5_INCLUDES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n + -4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf + 5/1.14.0/include, + PE_MPICH_PKGCONFIG_VARIABLES=PE_MPICH_GTL_DIR_@accelerator@:PE_MPICH_G + TL_LIBS_@accelerator@, + ESMFMKFILE=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4. + 9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8 + .6.0/lib/esmf.mk,PE_MPICH_PKGCONFIG_LIBS=mpich, + INTEL_PYTHONHOME=/pe/intel/debugger_2020/python/intel64/, + QT_SYSTEM_DIR=/usr/share/desktop-data,OSTYPE=linux, + NETCDF=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2_ + _p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9 + .2,meshname=rwps.oc_5km_100km, + CLASSPATH=/pe/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel + 64/lib/mpi.jar, + PROJ_LIB=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfatslqmc + rzo5kb4raaq/share/proj/,USER=keston.smith, + ESMF_INC=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9. + 2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6 + .0/include,MODULES_SET_SHELL_STARTUP=0,PAGER=less, + NetCDF_ROOT=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4 + .9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcd + f/4.9.2,PE_MPICH_GENCOMPILERS_INTEL=19.0,MODULE_VERSION=3.2.10, + ESMF_INCLUDES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n + -4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esm + f/8.6.0/include, + LMOD_CUSTOM_CNCM_GNU_8_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX=/a + pps/prod/lmodules/GCC_cray_mpich/10.2.0/cray-mpich/8.1.4, + LMOD_FAMILY_PRGENV_VERSION=8.5.0, + _ModuleTable012_=dWxlcy8kTU9EVUxFX1ZFUlNJT04vbW9kdWxlZmlsZXM6L3Vzci9za + GFyZS9tb2R1bGVzL21vZHVsZWZpbGVzOi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvTGludXg6 + L3Vzci9zaGFyZS9tb2R1bGVmaWxlcy9Db3JlOi91c3Ivc2hhcmUvbG1vZC9sbW9kL21vZHV + sZWZpbGVzL0NvcmU6L29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY29yZTovb3B0L2 + NyYXkvcGUvbG1vZC9tb2R1bGVmaWxlcy9jcmF5cGUtdGFyZ2V0cy9kZWZhdWx0Oi9hcHBzL + 3Byb2QvbG1vZHVsZXMvc3lzX2NvcmU6L2FwcHMvb3BzL3Byb2QvbmNvL21vZHVsZWZpbGVz + L2NvcmU6L2FwcHMvcHJvZC9sbW9kdWxlcy9jb3JlOi9vcHQvY3JheS9tb2R1bGVmaWxlcyI + sfQ==, + ESMF_PATH=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9 + .2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8. + 6.0, + LMOD_CUSTOM_CNCM_GNU_8_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX=/a + pps/prod/lmodules/GCC_cray_mpich/10.2.0/cray-mpich/8.1.4, + CRAY_CPU_TARGET=x86-rome, + LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PR + EFIX=/apps/prod/lmodules/CCE_cray_mpich/11.0.4/cray-mpich/8.1.4, + PKGCONFIG_ENABLED=1, + __LMOD_REF_COUNT_MODULEPATH=/apps/ops/prod/nco/modulefiles/compiler/in + tel/19.1.3.304:1;/apps/ops/prod/libs/modulefiles/compiler/intel/19.1.3. + 304:1;/apps/prod/lmodules/intel/19.1.3.304:1;/apps/ops/prod/nco/models/ + modulefiles:1;/apps/ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray + -mpich/8.1.4:1;/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpi + ch/8.1.4:1;/opt/cray/pe/lmod/modulefiles/comnet/intel/19.0/ofi/1.0:1;/a + pps/prod/lmodules/compiler/intel/19.0:1;/opt/cray/pe/lmod/modulefiles/n + et/ofi/1.0:1;/opt/cray/pe/lmod/modulefiles/cpu/x86-rome/1.0:1;/opt/cray + /pe/lmod/modulefiles/mpi/intel/19.0/ofi/1.0/cray-mpich/8.0:1;/usr/share + /modules:1;/usr/share/Modules/$MODULE_VERSION/modulefiles:1;/usr/share/ + modules/modulefiles:1;/usr/share/modulefiles/Linux:1;/usr/share/modulef + iles/Core:1;/usr/share/lmod/lmod/modulefiles/Core:1;/opt/cray/pe/lmod/m + odulefiles/core:1;/opt/cray/pe/lmod/modulefiles/craype-targets/default: + 1;/apps/prod/lmodules/sys_core:1;/apps/ops/prod/nco/modulefiles/core:1; + /apps/prod/lmodules/core:1;/opt/cray/modulefiles:1, + COMINrrfs=/lfs/h1/ops/prod/com/rrfs/v1.0/rrfs./,MORE=-sl, + PE_FORTRAN_PKGCONFIG_LIBS=mpichf90, + __LMOD_REF_COUNT_LOADEDMODULES=cray-mpich/8.1.19:1;hdf5-C/1.14.0:1;net + cdf-C/4.9.2:1;esmf-C/8.6.0:1;craype-x86-rome:1;libfabric/1.20.1:1;crayp + e-network-ofi:1;envvar/1.0:1;craype/2.7.17:1;PrgEnv-intel/8.5.0:1;intel + /19.1.3.304:1;geos/3.8.1:1;proj/7.1.0:1;ve/hafs/2.1:1, + __LMOD_REF_COUNT_CRAY_LD_LIBRARY_PATH=/opt/cray/pe/mpich/8.1.19/ofi/in + tel/19.0/lib:1;/opt/cray/pe/mpich/8.1.19/gtl/lib:1, + INTEL_MAJOR_VERSION=19.1, + PWD=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp + ute_interpolation_weights/sorc, + ESMF_MOD=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9. + 2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6 + .0/mod,PE_MPICH_GTL_DIR_nvidia70=-L/opt/cray/pe/mpich/8.1.19/gtl/lib, + COMINrtofs=/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs./, + HOME=/u/keston.smith, + COMINnbm=/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.//grib2, + PELOCAL_PRGENV=true, + CMAKE_PREFIX_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5q + cfatslqmcrzo5kb4raaq:/apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5ln + dzgkkqq36y4a2h4yx3ahdy,SSH_AGENT_PID=2417290,HOST=dlogin01, + SSH_CLIENT=192.58.153.8 43034 22,LMOD_VERSION=8.3.1, + XNLSPATH=/usr/share/X11/nls,PE_MPICH_FORTRAN_PKGCONFIG_LIBS=mpichf90, + CPATH=/pe/intel/compilers_and_libraries_2020.4.304/linux/ipp/include:/ + pe/intel/compilers_and_libraries_2020.4.304/linux/mkl/include:/pe/intel + /compilers_and_libraries_2020.4.304/linux/pstl/include:/pe/intel/compil + ers_and_libraries_2020.4.304/linux/pstl/stdlib:/pe/intel/compilers_and_ + libraries_2020.4.304/linux/tbb/include:/apps/prod/hpc-stack/i-19.1.3.30 + 4__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.3 + 04/cray-mpich-8.1.12/esmf/8.6.0/include:/apps/prod/hpc-stack/i-19.1.3.3 + 04__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3. + 304/cray-mpich-8.1.12/netcdf/4.9.2/include:/apps/prod/hpc-stack/i-19.1. + 3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1 + .3.304/cray-mpich-8.1.12/hdf5/1.14.0/include, + __LMOD_REF_COUNT_INFOPATH=/pe/intel/documentation_2020/en/debugger/gdb + -ia/info:1;/apps/docs/info:1,CRAY_LMOD_CPU=x86-rome/1.0, + PE_MPICH_GTL_LIBS_nvidia80=-lmpi_gtl_cuda, + LMOD_FAMILY_CRAYPE_CPU_VERSION=false, + BASH_ENV=/usr/share/lmod/lmod/init/bash,XDG_DATA_DIRS=/usr/share, + __LMOD_REF_COUNT_PE_MPICH_FORTRAN_PKGCONFIG_LIBS=mpichf90:1, + INTEL_MINOR_VERSION=3.304, + LMOD_CUSTOM_CNCM_INTEL_19_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX + =/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/apps + /ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4, + CRAY_LMOD_NET=ofi/1.0, + RWPSroot=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev + /compute_interpolation_weights/sorc/../../../, + COMINlocal=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/d + ev/compute_interpolation_weights/sorc/../../..//PrepInputs/tmpfiles, + __LMOD_REF_COUNT_PE_PKGCONFIG_PRODUCTS=PE_MPICH:1, + PE_MPICH_MODULE_NAME=cray-mpich, + __LMOD_REF_COUNT_LMOD_CUSTOM_COMPILER_INTEL_19_0_PREFIX=/apps/ops/prod + /nco/models/modulefiles:10;/apps/prod/lmodules/intel/19.1.3.304:1;/apps + /ops/prod/libs/modulefiles/compiler/intel/19.1.3.304:1;/apps/ops/prod/n + co/modulefiles/compiler/intel/19.1.3.304:1, + NLSPATH=/pe/intel/compilers_and_libraries_2020.4.304/linux/compiler/li + b/intel64/locale/%l_%t/%N:/pe/intel/compilers_and_libraries_2020.4.304/ + linux/mkl/lib/intel64_lin/locale/%l_%t/%N:/pe/intel/debugger_2020/gdb/i + ntel64/share/locale/%l_%t/%N,LIBGL_DEBUG=quiet, + LMOD_CUSTOM_COMPILER_INTEL_19_0_PREFIX=/apps/ops/prod/nco/models/modul + efiles:/apps/prod/lmodules/intel/19.1.3.304:/apps/ops/prod/libs/modulef + iles/compiler/intel/19.1.3.304:/apps/ops/prod/nco/modulefiles/compiler/ + intel/19.1.3.304,__LMOD_REF_COUNT_PE_MPICH_FIXED_PRGENV=INTEL:1, + __LMOD_REF_COUNT_LIBRARY_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/ + cjbmc7tacv5qcfatslqmcrzo5kb4raaq/lib:1;/apps/spack/geos/3.8.1/intel/19. + 1.3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy/lib:1;/pe/intel/compilers_and_ + libraries_2020.4.304/linux/ipp/lib/intel64:1;/pe/intel/compilers_and_li + braries_2020.4.304/linux/compiler/lib/intel64_lin:1;/pe/intel/compilers + _and_libraries_2020.4.304/linux/mkl/lib/intel64_lin:1;/pe/intel/compile + rs_and_libraries_2020.4.304/linux/tbb/lib/intel64/gcc4.8:2;/apps/prod/h + pc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pn + etcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6.0/lib:1, + PROFILEREAD=true, + LIBRARY_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfats + lqmcrzo5kb4raaq/lib:/apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5lnd + zgkkqq36y4a2h4yx3ahdy/lib:/pe/intel/compilers_and_libraries_2020.4.304/ + linux/ipp/lib/intel64:/pe/intel/compilers_and_libraries_2020.4.304/linu + x/compiler/lib/intel64_lin:/pe/intel/compilers_and_libraries_2020.4.304 + /linux/mkl/lib/intel64_lin:/pe/intel/compilers_and_libraries_2020.4.304 + /linux/tbb/lib/intel64/gcc4.8:/apps/prod/hpc-stack/i-19.1.3.304__m-8.1. + 12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-m + pich-8.1.12/esmf/8.6.0/lib, + __LMOD_REF_COUNT_CMAKE_PREFIX_PATH=/apps/spack/proj/7.1.0/intel/19.1.3 + .304/cjbmc7tacv5qcfatslqmcrzo5kb4raaq:1;/apps/spack/geos/3.8.1/intel/19 + .1.3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy:1,LMOD_sys=Linux, + _ModuleTable010_=aWNoLzE5LjEuMy4zMDQvY3JheS1tcGljaC84LjEuNCIsIi9vcHQvY + 3JheS9wZS9sbW9kL21vZHVsZWZpbGVzL2NvbW5ldC9pbnRlbC8xOS4wL29maS8xLjAiLCIv + YXBwcy9wcm9kL2xtb2R1bGVzL2NvbXBpbGVyL2ludGVsLzE5LjAiLCIvb3B0L2NyYXkvcGU + vbG1vZC9tb2R1bGVmaWxlcy9uZXQvb2ZpLzEuMCIsIi9vcHQvY3JheS9wZS9sbW9kL21vZH + VsZWZpbGVzL2NwdS94ODYtcm9tZS8xLjAiLCIvb3B0L2NyYXkvcGUvbG1vZC9tb2R1bGVma + Wxlcy9tcGkvaW50ZWwvMTkuMC9vZmkvMS4wL2NyYXktbXBpY2gvOC4wIiwiL3Vzci9zaGFy + ZS9tb2R1bGVzIiwiL3Vzci9zaGFyZS9Nb2R1bGVzLyRNT0RVTEVfVkVSU0lPTi9tb2R1bGV + maWxlcyIsIi91c3Ivc2hhcmUvbW9kdWxl,PE_PKGCONFIG_LIBS=mpich, + _ModuleTable001_=X01vZHVsZVRhYmxlXz17WyJNVHZlcnNpb24iXT0zLFsiY19yZWJ1a + WxkVGltZSJdPWZhbHNlLFsiY19zaG9ydFRpbWUiXT1mYWxzZSxkZXB0aFQ9e30sZmFtaWx5 + PXtbIlByZ0VudiJdPSJQcmdFbnYtaW50ZWwiLFsiY29tcGlsZXIiXT0iaW50ZWwiLFsiY3J + heXBlIl09ImNyYXlwZSIsWyJjcmF5cGVfY3B1Il09ImNyYXlwZS14ODYtcm9tZSIsWyJjcm + F5cGVfbmV0d29yayJdPSJjcmF5cGUtbmV0d29yay1vZmkiLFsibXBpIl09ImNyYXktbXBpY + 2giLH0sbVQ9e1siUHJnRW52LWludGVsIl09e1siZm4iXT0iL29wdC9jcmF5L3BlL2xtb2Qv + bW9kdWxlZmlsZXMvY29yZS9QcmdFbnYtaW50ZWwvOC41LjAubHVhIixbImZ1bGxOYW1lIl0 + 9IlByZ0Vudi1pbnRlbC84LjUuMCIsWyJs, + LOADEDMODULES=cray-mpich/8.1.19:hdf5-C/1.14.0:netcdf-C/4.9.2:esmf-C/8. + 6.0:craype-x86-rome:libfabric/1.20.1:craype-network-ofi:envvar/1.0:cray + pe/2.7.17:PrgEnv-intel/8.5.0:intel/19.1.3.304:geos/3.8.1:proj/7.1.0:ve/ + hafs/2.1,LMOD_AVAIL_STYLE=en_grouped:system,CRAYPE_NETWORK_TARGET=ofi, + _ModuleTable006_=ZXJOYW1lIl09Imdlb3MvMy44LjEiLH0sWyJoZGY1LUMiXT17WyJmb + iJdPSIvYXBwcy9wcm9kL2xtb2R1bGVzL0lOVEVMX2NyYXlfbXBpY2gvMTkuMS4zLjMwNC9j + cmF5LW1waWNoLzguMS40L2hkZjUtQy8xLjE0LjAubHVhIixbImZ1bGxOYW1lIl09ImhkZjU + tQy8xLjE0LjAiLFsibG9hZE9yZGVyIl09Mixwcm9wVD17fSxbInN0YWNrRGVwdGgiXT0wLF + sic3RhdHVzIl09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJdPSJoZGY1LUMvMS4xNC4wIix9LGlud + GVsPXtbImZuIl09Ii9hcHBzL3Byb2QvbG1vZHVsZXMvY29yZS9pbnRlbC8xOS4xLjMuMzA0 + Lmx1YSIsWyJmdWxsTmFtZSJdPSJpbnRlbC8xOS4xLjMuMzA0IixbImxvYWRPcmRlciJdPTE + xLHByb3BUPXt9LFsic3RhY2tEZXB0aCJd, + __LMOD_REF_COUNT_MANPATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc + 7tacv5qcfatslqmcrzo5kb4raaq/share/man:1;/pe/intel/man/common:1;/pe/inte + l/compilers_and_libraries_2020.4.304/linux/mpi/man:1;/pe/intel/document + ation_2020/en/debugger/gdb-ia/man:1;/opt/cray/pe/craype/2.7.17/man:1;/o + pt/cray/share/man:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14 + .0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.1 + 2/esmf/8.6.0/share/man:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h + -1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich- + 8.1.12/netcdf/4.9.2/share/man:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8. + 1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray + -mpich-8.1.12/hdf5/1.14.0/share/man:1;/opt/cray/pe/mpich/8.1.19/ofi/man + :1;/opt/cray/pe/mpich/8.1.19/man/mpich:1;/usr/share/lmod/lmod/share/man + :1;/usr/share/man:1;/opt/c3/man:1;/opt/pbs/share/man:1, + _ModuleTable003_=cGUvMi43LjE3Lmx1YSIsWyJmdWxsTmFtZSJdPSJjcmF5cGUvMi43L + jE3IixbImxvYWRPcmRlciJdPTkscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MixbInN0YXR1 + cyJdPSJhY3RpdmUiLFsidXNlck5hbWUiXT0iY3JheXBlIix9LFsiY3JheXBlLW5ldHdvcms + tb2ZpIl09e1siZm4iXT0iL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY3JheXBlLX + RhcmdldHMvZGVmYXVsdC9jcmF5cGUtbmV0d29yay1vZmkubHVhIixbImZ1bGxOYW1lIl09I + mNyYXlwZS1uZXR3b3JrLW9maSIsWyJsb2FkT3JkZXIiXT03LHByb3BUPXt9LFsic3RhY2tE + ZXB0aCJdPTIsWyJzdGF0dXMiXT0iYWN0aXZlIixbInVzZXJOYW1lIl09ImNyYXlwZS1uZXR + 3b3JrLW9maSIsfSxbImNyYXlwZS14ODYt, + INTEL_LICENSE_FILE=/pe/intel/compilers_and_libraries_2020.4.304/linux/ + licenses:/opt/intel/licenses:/intel/licenses,LMOD_ROOT=/usr/share/lmod, + SSH_TTY=/dev/pts/20,FROM_HEADER=, + CRAY_MPICH_ROOTDIR=/opt/cray/pe/mpich/8.1.19, + MAIL=/var/spool/mail/keston.smith, + PE_INTEL_FIXED_PKGCONFIG_PATH=/opt/cray/pe/mpich/8.1.19/ofi/intel/19.0 + /lib/pkgconfig, + COMINstofs=/lfs/h1/ops/prod/com/stofs/v3.1/stofs_2d_glo., + __LMOD_REF_COUNT_PE_MPICH_GENCOMPILERS_INTEL=19.0:1, + LESSKEY=/etc/lesskey.bin, + _ModuleTable009_=PXt9LFsic3RhY2tEZXB0aCJdPTAsWyJzdGF0dXMiXT0iYWN0aXZlI + ixbInVzZXJOYW1lIl09InZlL2hhZnMvMi4xIix9LH0sbXBhdGhBPXsiL2FwcHMvb3BzL3By + b2QvbmNvL21vZHVsZWZpbGVzL2NvbXBpbGVyL2ludGVsLzE5LjEuMy4zMDQiLCIvYXBwcy9 + vcHMvcHJvZC9saWJzL21vZHVsZWZpbGVzL2NvbXBpbGVyL2ludGVsLzE5LjEuMy4zMDQiLC + IvYXBwcy9wcm9kL2xtb2R1bGVzL2ludGVsLzE5LjEuMy4zMDQiLCIvYXBwcy9vcHMvcHJvZ + C9uY28vbW9kZWxzL21vZHVsZWZpbGVzIiwiL2FwcHMvb3BzL3Byb2QvbGlicy9tb2R1bGVm + aWxlcy9tcGkvaW50ZWwvMTkuMS4zLjMwNC9jcmF5LW1waWNoLzguMS40IiwiL2FwcHMvcHJ + vZC9sbW9kdWxlcy9JTlRFTF9jcmF5X21w,TERM=xterm-256color,SHELL=/bin/bash, + ESMF_BIN=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9. + 2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6 + .0/bin,CRAY_MPICH_VER=8.1.19, + LMOD_ADMIN_FILE=/apps/prod/lmodules/admin.list, + LMOD_CUSTOM_COMPILER_GNU_8_0_UCX_1_0_PREFIX=/apps/prod/lmodules/gcc/11 + .2.0:/apps/prod/lmodules/gcc/10.2.0,PE_MPICH_FIXED_PRGENV=INTEL, + outdir=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/c + ompute_interpolation_weights/sorc/../../..//PrepInputs, + lmod_prefix_path=/usr/share, + LMOD_CUSTOM_COMPILER_CRAYCLANG_10_0_PREFIX=/apps/prod/lmodules/cce/13. + 0.0:/apps/prod/lmodules/cce/12.0.3:/apps/prod/lmodules/cce/11.0.4, + LMOD_FAMILY_PRGENV=PrgEnv-intel,_ModuleTable_Sz_=12, + __LMOD_REF_COUNT_CPATH=/pe/intel/compilers_and_libraries_2020.4.304/li + nux/ipp/include:1;/pe/intel/compilers_and_libraries_2020.4.304/linux/mk + l/include:1;/pe/intel/compilers_and_libraries_2020.4.304/linux/pstl/inc + lude:1;/pe/intel/compilers_and_libraries_2020.4.304/linux/pstl/stdlib:1 + ;/pe/intel/compilers_and_libraries_2020.4.304/linux/tbb/include:2;/apps + /prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e- + 8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6.0/include:1;/a + pps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10_ + _e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9.2/include + :1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2. + 5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf5/1.14.0/inc + lude:1,LS_OPTIONS=-N --color=tty -T 0, + NetCDF=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2_ + _p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9 + .2,LMOD_FAMILY_COMPILER=intel, + LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PR + EFIX=/apps/prod/lmodules/CCE_cray_mpich/11.0.4/cray-mpich/8.1.4, + TMOUT=1800,PYTHONSTARTUP=/etc/pythonstart, + NETCDF_INCLUDES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0_ + _n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/n + etcdf/4.9.2/include, + RWPSfix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPS,SHLVL=3, + LANGUAGE=en_US.UTF-8, + PYTHONPATH=/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/p + ython3.10/site-packages,G_FILENAME_ENCODING=@locale\,UTF-8\,ISO-8859-15\, + CP1252, + LMOD_CUSTOM_COMPILER_INTEL_19_0_UCX_1_0_PREFIX=/apps/prod/lmodules/int + el/19.1.3.304:/apps/ops/prod/libs/modulefiles/compiler/intel/19.1.3.304 + :/apps/ops/prod/nco/modulefiles/compiler/intel/19.1.3.304, + HPC_OPT=/apps/ops/prod/libs, + MANPATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfatslqmcr + zo5kb4raaq/share/man:/pe/intel/man/common:/pe/intel/compilers_and_libra + ries_2020.4.304/linux/mpi/man:/pe/intel/documentation_2020/en/debugger/ + gdb-ia/man:/opt/cray/pe/craype/2.7.17/man:/opt/cray/share/man:/apps/pro + d/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6. + 0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6.0/share/man:/apps/ + prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8 + .6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9.2/share/man:/ + apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10 + __e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf5/1.14.0/share/m + an:/opt/cray/pe/mpich/8.1.19/ofi/man:/opt/cray/pe/mpich/8.1.19/man/mpic + h:/usr/share/lmod/lmod/share/man:/usr/share/man:/opt/c3/man:/opt/pbs/sh + are/man, + __LMOD_REF_COUNT_CLASSPATH=/pe/intel/compilers_and_libraries_2020.4.30 + 4/linux/mpi/intel64/lib/mpi.jar:1, + INTEL_PATH=/pe/intel/compilers_and_libraries_2020.4.304, + MPICH_DIR=/opt/cray/pe/mpich/8.1.19/ofi/intel/19.0, + INTEL_VERSION=19.1.3.304,OSCAR_HOME=/opt/oscar, + fix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp + ute_interpolation_weights/sorc/../../..//fix, + MODULEPATH=/apps/ops/prod/nco/modulefiles/compiler/intel/19.1.3.304:/a + pps/ops/prod/libs/modulefiles/compiler/intel/19.1.3.304:/apps/prod/lmod + ules/intel/19.1.3.304:/apps/ops/prod/nco/models/modulefiles:/apps/ops/p + rod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4:/apps/prod/l + modules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/opt/cray/pe/lmod/ + modulefiles/comnet/intel/19.0/ofi/1.0:/apps/prod/lmodules/compiler/inte + l/19.0:/opt/cray/pe/lmod/modulefiles/net/ofi/1.0:/opt/cray/pe/lmod/modu + lefiles/cpu/x86-rome/1.0:/opt/cray/pe/lmod/modulefiles/mpi/intel/19.0/o + fi/1.0/cray-mpich/8.0:/usr/share/modules:/usr/share/Modules/$MODULE_VER + SION/modulefiles:/usr/share/modules/modulefiles:/usr/share/modulefiles/ + Linux:/usr/share/modulefiles/Core:/usr/share/lmod/lmod/modulefiles/Core + :/opt/cray/pe/lmod/modulefiles/core:/opt/cray/pe/lmod/modulefiles/crayp + e-targets/default:/apps/prod/lmodules/sys_core:/apps/ops/prod/nco/modul + efiles/core:/apps/prod/lmodules/core:/opt/cray/modulefiles, + CRAY_MPICH_DIR=/opt/cray/pe/mpich/8.1.19/ofi/intel/19.0, + LMOD_FAMILY_CRAYPE=craype,LOGNAME=keston.smith, + __LMOD_REF_COUNT_LMOD_CUSTOM_PATHS=COMPILER/apps/ops/prod/nco/modulefi + les/compiler/intel/19.1.3.304:1;COMPILER/apps/ops/prod/libs/modulefiles + /compiler/intel/19.1.3.304:1;COMPILER/apps/prod/lmodules/intel/19.1.3.3 + 04:1;COMPILER/apps/ops/prod/nco/models/modulefiles:1;CNCM/apps/ops/prod + /libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4:1;CNCM/apps/pro + d/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:1, + CRAY_MPICH_VERSION=8.1.19, + CPLUS_INCLUDE_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5 + qcfatslqmcrzo5kb4raaq/include:/apps/spack/geos/3.8.1/intel/19.1.3.304/5 + recktk5lndzgkkqq36y4a2h4yx3ahdy/include, + MKLROOT=/pe/intel/compilers_and_libraries_2020.4.304/linux/mkl, + MODULE_VERSION_STACK=3.2.10,MODULEPATH_ROOT=/usr/share/modulefiles, + LMOD_PACKAGE_PATH=/apps/prod/lmodules, + __LMOD_REF_COUNT_PE_INTEL_FIXED_PKGCONFIG_PATH=/opt/cray/pe/mpich/8.1. + 19/ofi/intel/19.0/lib/pkgconfig:1, + PE_MPICH_GTL_LIBS_amd_gfx906=-lmpi_gtl_hsa, + PSTLROOT=/pe/intel/compilers_and_libraries_2020.4.304/linux/pstl, + XDG_CONFIG_DIRS=/etc/xdg, + PATH=/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/bin:/apps/s + pack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfatslqmcrzo5kb4raaq/bin:/ + apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy + /bin:/pe/intel/compilers_and_libraries_2020.4.304/linux/bin/intel64:/pe + /intel/compilers_and_libraries_2020.4.304/linux/bin:/pe/intel/compilers + _and_libraries_2020.4.304/linux/mpi/intel64/bin:/pe/intel/debugger_2020 + /gdb/intel64/bin:/opt/cray/pe/craype/2.7.17/bin:/opt/cray/bin:/apps/pro + d/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6. + 0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6.0/bin:/apps/prod/h + pc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pn + etcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9.2/bin:/apps/prod/hp + c-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pne + tcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf5/1.14.0/bin:/opt/cray/pe/mp + ich/8.1.19/bin:/u/keston.smith/.local/bin:/usr/local/bin:/usr/bin:/bin: + /opt/c3/bin:/opt/pbs/bin:/sbin:/opt/cray/pe/bin, + PE_MPICH_GTL_LIBS_amd_gfx908=-lmpi_gtl_hsa, + TBBROOT=/pe/intel/compilers_and_libraries_2020.4.304/linux/tbb, + ESMF_LIBRARIES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__ + n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/es + mf/8.6.0/lib, + __LMOD_REF_COUNT_PE_PRODUCT_LIST=CRAYPE:1;CRAYPE_X86_ROME:1, + NetCDF_LIBRARIES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0 + __n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/ + netcdf/4.9.2/lib, + _LMFILES_=/opt/cray/pe/lmod/modulefiles/comnet/intel/19.0/ofi/1.0/cray + -mpich/8.1.19.lua:/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray- + mpich/8.1.4/hdf5-C/1.14.0.lua:/apps/prod/lmodules/INTEL_cray_mpich/19.1 + .3.304/cray-mpich/8.1.4/netcdf-C/4.9.2.lua:/apps/prod/lmodules/INTEL_cr + ay_mpich/19.1.3.304/cray-mpich/8.1.4/esmf-C/8.6.0.lua:/opt/cray/pe/lmod + /modulefiles/craype-targets/default/craype-x86-rome.lua:/opt/cray/modul + efiles/libfabric/1.20.1:/opt/cray/pe/lmod/modulefiles/craype-targets/de + fault/craype-network-ofi.lua:/apps/prod/lmodules/sys_core/envvar/1.0:/o + pt/cray/pe/lmod/modulefiles/core/craype/2.7.17.lua:/opt/cray/pe/lmod/mo + dulefiles/core/PrgEnv-intel/8.5.0.lua:/apps/prod/lmodules/core/intel/19 + .1.3.304.lua:/apps/prod/lmodules/intel/19.1.3.304/geos/3.8.1:/apps/prod + /lmodules/intel/19.1.3.304/proj/7.1.0:/apps/prod/lmodules/intel/19.1.3. + 304/ve/hafs/2.1,HDF5_VERSION=1.14.0,MODULESHOME=/usr/share/lmod/lmod, + PKG_CONFIG_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcf + atslqmcrzo5kb4raaq/lib/pkgconfig:/pe/intel/compilers_and_libraries_2020 + .4.304/linux/mkl/bin/pkgconfig:/opt/cray/pe/craype/2.7.17/pkg-config:/o + pt/cray/lib64/pkgconfig,LMOD_SETTARG_FULL_SUPPORT=no, + INFOPATH=/pe/intel/documentation_2020/en/debugger/gdb-ia/info::/apps/d + ocs/info,G_BROKEN_FILENAMES=1, + I_MPI_ROOT=/pe/intel/compilers_and_libraries_2020.4.304/linux/mpi, + _ModuleTable011_=cy9tb2R1bGVmaWxlcyIsIi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvT + GludXgiLCIvdXNyL3NoYXJlL21vZHVsZWZpbGVzL0NvcmUiLCIvdXNyL3NoYXJlL2xtb2Qv + bG1vZC9tb2R1bGVmaWxlcy9Db3JlIiwiL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXM + vY29yZSIsIi9vcHQvY3JheS9wZS9sbW9kL21vZHVsZWZpbGVzL2NyYXlwZS10YXJnZXRzL2 + RlZmF1bHQiLCIvYXBwcy9wcm9kL2xtb2R1bGVzL3N5c19jb3JlIiwiL2FwcHMvb3BzL3Byb + 2QvbmNvL21vZHVsZWZpbGVzL2NvcmUiLCIvYXBwcy9wcm9kL2xtb2R1bGVzL2NvcmUiLCIv + b3B0L2NyYXkvbW9kdWxlZmlsZXMiLH0sWyJzeXN0ZW1CYXNlTVBBVEgiXT0iL3Vzci9zaGF + yZS9tb2R1bGVzOi91c3Ivc2hhcmUvTW9k, + PE_MPICH_GTL_LIBS_amd_gfx90a=-lmpi_gtl_hsa,HISTSIZE=10000, + CRAYPE_DIR=/opt/cray/pe/craype/2.7.17,LMOD_PKG=/usr/share/lmod/lmod, + __LMOD_REF_COUNT_PE_MPICH_PKGCONFIG_LIBS=mpich:1, + __LMOD_REF_COUNT_PE_PKGCONFIG_LIBS=mpich:1,CPU=x86_64, + CRAYPE_VERSION=2.7.17, + NETCDF_LIBRARIES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0 + __n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/ + netcdf/4.9.2/lib, + _ModuleTable005_=MCIsfSxbImVzbWYtQyJdPXtbImZuIl09Ii9hcHBzL3Byb2QvbG1vZ + HVsZXMvSU5URUxfY3JheV9tcGljaC8xOS4xLjMuMzA0L2NyYXktbXBpY2gvOC4xLjQvZXNt + Zi1DLzguNi4wLmx1YSIsWyJmdWxsTmFtZSJdPSJlc21mLUMvOC42LjAiLFsibG9hZE9yZGV + yIl09NCxwcm9wVD17fSxbInN0YWNrRGVwdGgiXT0wLFsic3RhdHVzIl09ImFjdGl2ZSIsWy + J1c2VyTmFtZSJdPSJlc21mLUMvOC42LjAiLH0sZ2Vvcz17WyJmbiJdPSIvYXBwcy9wcm9kL + 2xtb2R1bGVzL2ludGVsLzE5LjEuMy4zMDQvZ2Vvcy8zLjguMSIsWyJmdWxsTmFtZSJdPSJn + ZW9zLzMuOC4xIixbImxvYWRPcmRlciJdPTEyLHByb3BUPXt9LFsic3RhY2tEZXB0aCJdPTE + sWyJzdGF0dXMiXT0iYWN0aXZlIixbInVz, + LMOD_CMD=/usr/share/lmod/lmod/libexec/lmod, + ESMF_ROOT=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9 + .2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8. + 6.0,CRAY_MPICH_PREFIX=/opt/cray/pe/mpich/8.1.19/ofi/intel/19.0, + CVS_RSH=ssh,LESSOPEN=lessopen.sh %s, + LMOD_DIR=/usr/share/lmod/lmod/libexec,LC_TIME=C.UTF-8, + LMOD_FAMILY_MPI=cray-mpich, + BASH_FUNC_module%%=() { eval $($LMOD_CMD bash \"$@\") && eval $(${LMO + D_SETTARG_CMD:-:} -s sh) + euser = keston.smith + egroup = emc + hashname = 136857549.dbqs01 + queue_rank = 1787598486766419 + queue_type = E + comment = Job run at Mon Aug 24 at 19:14 on (nid002876:ncpus=16:mem=2684354 + 56kb) and terminated by keston.smith@dlogin01.dogwood.wcoss2.ncep.noaa. + gov + etime = Mon Aug 24 19:08:06 2026 + umask = 22 + run_count = 6 + eligible_time = 00:06:23 + accrue_type = 3 + Submit_arguments = -V /lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/ + RWPS/dev/compute_interpolation_weights/sorc/../../..//dev/compute_inter + polation_weights/ecf/compute_interpolation_weights.ecf + project = NWPS-DEV + run_version = 1 + Submit_Host = dlogin01.dogwood.wcoss2.ncep.noaa.gov + server_instance_id = dbqs01.dogwood.wcoss2.ncep.noaa.gov:15001 + + +------------------------------------------------------------------ +Job 136857549.dbqs01 - PBS tracejob output (for parent mom node only): + +Job: 136857549.dbqs01 + +08/24/2026 19:14:23 M update_job_usage: CPU usage: 0.000 secs +08/24/2026 19:14:23 M update_job_usage: cpupercent initialized to zero +08/24/2026 19:14:23 M update_job_usage: Memory usage: mem=0b +08/24/2026 19:14:27 M Started, pid = 3051933 +08/24/2026 19:16:15 M update_job_usage: CPU usage: 121.000 secs +08/24/2026 19:16:15 M update_job_usage: 136857549.dbqs01 measured interval cpupercent 108 increased job cpupercent to 108 +08/24/2026 19:16:15 M update_job_usage: Memory usage: mem=2394260kb +08/24/2026 19:18:16 M update_job_usage: CPU usage: 185.000 secs +08/24/2026 19:18:16 M update_job_usage: Memory usage: mem=2773260kb +08/24/2026 19:20:17 M update_job_usage: CPU usage: 185.000 secs +08/24/2026 19:20:17 M update_job_usage: Memory usage: mem=2773260kb +08/24/2026 19:22:19 M update_job_usage: CPU usage: 195.000 secs +08/24/2026 19:22:19 M update_job_usage: Memory usage: mem=3121144kb +08/24/2026 19:24:20 M update_job_usage: CPU usage: 195.000 secs +08/24/2026 19:24:20 M update_job_usage: Memory usage: mem=3121144kb +08/24/2026 19:24:51 M signal job request received +08/24/2026 19:24:51 M signal job with TermJob +08/24/2026 19:24:51 M kill_job +08/24/2026 19:24:51 M task 00000001 terminated +08/24/2026 19:25:04 M no active process for task 00000001 +08/24/2026 19:25:04 M Terminated +08/24/2026 19:25:04 M task 00000001 cput=00:03:18 +08/24/2026 19:25:04 M kill_job +08/24/2026 19:25:04 M nid002876 cput=00:03:15 mem=3121144kb +08/24/2026 19:25:04 M update_job_usage: CPU usage: 195.000 secs +08/24/2026 19:25:04 M update_job_usage: Memory usage: mem=3121144kb + +------------------------------------------------------------------ +To see full PBS log data, run: /sfs/admin/scripts/tracejob.sh 136857549.dbqs01 + +================================================================== +END - DEBUG INFO +================================================================== + +Job 136857549.dbqs01 - Epilogue DEBUG complete. DEBUG Execution time: 6 seconds +Job 136857549.dbqs01 - Epilogue complete. Execution time: 8 seconds +##### Job 136857549.dbqs01 - PBS Job Script: +(Note: Duplicate #PBS entries are a function how PBS interprets and caches the original job script.) + +#!/bin/bash +#PBS -N ESMPy +#PBS -j oe +#PBS -S /bin/bash +#PBS -q dev +#PBS -A NWPS-DEV +#PBS -l walltime=04:00:00 +##PBS -l select=1:ncpus=8:mem=128GB +#PBS -l select=1:ncpus=16:mem=256GB +##PBS -l select=1:ncpus=32:mem=256GB +###PBS -l select=1:ncpus=1:mem=8G +#PBS -l place=excl +#PBS -l debug=true + +module reset +module load PrgEnv-intel/8.5.0 +module load intel/19.1.3.304 +module load craype/2.7.17 +module load cray-mpich/8.1.19 +module load hdf5-C/1.14.0 +module load netcdf-C/4.9.2 +module load esmf-C/8.6.0 +module load ve/hafs/2.1 + + +# Compute interpolation weights and distance to boundary for a RWPS mesh. +# Files are created in local RWPS/fix directory. + +pip list -v + +cd $RWPSroot/ush/preprocess + +SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" +date="20260730" +cycl="00" +Nprocs=16 + + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + +rrfs_hi=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.hi.nc +rrfs_pr=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.pr.nc +rrfs_ak=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.ak.nc +rrfs_na=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.na.nc +rrfs_conus=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.conus.nc + +out="../../fix" + +rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" +rrfsDst="$out/DistToBndy.$meshname.rrfs" + +#no extrapolation with rrfs forecasts +rm -rf $rrfsIntrp.hi.nc $rrfsDst.hi.nc __pycache__ +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out +rm -rf $rrfsIntrp.pr.nc $rrfsDst.pr.nc __pycache__ +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_pr $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 > GenWhts.rrfs.pr.out +rm -rf $rrfsIntrp.ak.nc $rrfsDst.ak.nc __pycache__ +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_ak $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 > GenWhts.rrfs.ak.out +rm -rf $rrfsIntrp.na.nc $rrfsDst.na.nc __pycache__ +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_na $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 > GenWhts.rrfs.na.out +rm -rf $rrfsIntrp.conus.nc $rrfsDst.conus.nc __pycache__ +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_conus $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out + +nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc +nbmIntrp="$out/InterpolationWeights.$meshname.nbm" +nbmDst="$out/DistToBndy.$meshname.nbm" + +#extrapolate nbm oc wind to all points +rm $nbmIntrp.oc.nc $nbmDst.oc.nc +python ./compute_gridded_to_rwps_interp_weights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out + +nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc +#do not extrapolate for NBM .ak. domain +rm $nbmIntrp.ak.nc $nbmDst.ak.nc +python ./compute_gridded_to_rwps_interp_weights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out + +rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc +rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" +rtofsDst="$out/DistToBndy.$meshname.rtofs" + +#extrapolate rtofs .glo. for full ice coverage +rm $rtofsIntrp.ice.nc $rtofsDst.ice.nc +python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out + + +rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc +#do not extrapolate rtofs .glo. currents +rm $rtofsIntrp.ice.nc $rtofsDst.ice.nc +python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.current.nc $rtofsDst.current.nc -1 > GenWhts.rtofs.current.out + + + +#Old v2 of stofs +stofs_glo="$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" + +mkdir -p STOFSInterpWeights.$meshname +## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs + +## Now run parallel job script + +qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS + +wait + +#combine text file output of parallel jobs +cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt + +# convert output weights to netcdf file +python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 +cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.v2.nc +cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.v2.nc +mv DistToBndy.$meshname.stofs.nc DistToBndy.$meshname.stofs.v2.nc +mv InterpWeights.$meshname.stofs.nc InterpWeights.$meshname.stofs.v2.nc + +rm -rf STOFSInterpWeights.$meshname +rm InterpWeights.$meshname.stofs.txt +rm *.out +rm ESMPy* + + +mkdir -p STOFSInterpWeights.$meshname +#compute stofs weights for current(v3) stofs mesh +stofs_glo="$SID/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc" + +## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs + +## Now run parallel job script + +qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS + +wait + +#combine text file output of parallel jobs +cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt + +# convert output weights to netcdf file +python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 +cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc +cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc + + +rm -rf STOFSInterpWeights.$meshname +rm InterpWeights.$meshname.stofs.txt +rm *.out +rm ESMPy* + + + + +##### End of job script +------------------------------------------------------------------ + diff --git a/ecf/jrwps_prep_current.ecf b/ecf/jrwps_prep_current.ecf index 55a49dc..ab283a2 100644 --- a/ecf/jrwps_prep_current.ecf +++ b/ecf/jrwps_prep_current.ecf @@ -2,23 +2,40 @@ #PBS -q dev #PBS -l walltime=00:59:00 #PBS -A GLWU-DEV -#PBS -N RWPS.PreProc.currents +#PBS -N RWPS.PreProc.current #PBS -j oe -#PBS -l select=1:ncpus=2:mem=64GB +#PBS -l select=1:ncpus=4:mem=64GB #PBS -o RWPS.PreProc.out -cd $RWPSroot/ush/preprocess +cd $HOMErwps/ush/preprocess -module load PrgEnv-intel/8.1.0 -module load craype/2.7.8 -module load intel/19.1.3.304 -module load cfp/2.0.4 -module load prod_util/2.0.8 -module load prod_envir/2.0.5 +module use ${HOMErwps}/modulefiles -rm $tmp/FetchCurrents.out $tmp/ProcCurrents.out +############################################################ +# Load modules +############################################################ +source $HOMErwps/versions/preproc.${MACHINE_ID}.ver -sh get_currents.sh > $tmp/FetchCurrents.out -sh process_currents.sh > $tmp/ProcCurrents.out +#modules for esmf +module reset +module load PrgEnv-intel/${PrgEnv_intel_ver} +module load craype/${craype_ver} +module load intel/${intel_ver} +module load cray-mpich/${cray_mpich_ver} +module load hdf5-C/${hdf5_C_ver} +module load netcdf-C/${netcdf_C_ver} +module load esmf-C/${esmf_C_ver} +module load ve/hafs/${ve_hafs_ver} + +#modules for wgrib2 +module load intel-oneapi/${intel_oneapi_ver} +module load wgrib2/${wgrib2_ver} + +module list + +rm $tmp/FetchCurrent.out $tmp/ProcCurrent.out + +sh get_current.sh > $tmp/FetchCurrent.out +sh process_current.sh > $tmp/ProcCurrent.out diff --git a/ecf/jrwps_prep_ice.ecf b/ecf/jrwps_prep_ice.ecf index 219ee79..e26250e 100644 --- a/ecf/jrwps_prep_ice.ecf +++ b/ecf/jrwps_prep_ice.ecf @@ -4,22 +4,38 @@ #PBS -A GLWU-DEV #PBS -N RWPS.PreProc.ice #PBS -j oe -#PBS -l select=1:ncpus=1:mem=64GB +#PBS -l select=1:ncpus=4:mem=64GB #PBS -o RWPS.PreProc.out -cd $RWPSroot/ush/preprocess +cd $HOMErwps/ush/preprocess -module load PrgEnv-intel/8.1.0 -module load craype/2.7.8 -module load intel/19.1.3.304 -module load cfp/2.0.4 -module load prod_util/2.0.8 -module load prod_envir/2.0.5 +module use ${HOMErwps}/modulefiles +############################################################ +# Load modules +############################################################ +source $HOMErwps/versions/preproc.${MACHINE_ID}.ver -rm $tmp/FetchIce.out $tmp/ProcICE.out +#modules for esmf +module reset +module load PrgEnv-intel/${PrgEnv_intel_ver} +module load craype/${craype_ver} +module load intel/${intel_ver} +module load cray-mpich/${cray_mpich_ver} +module load hdf5-C/${hdf5_C_ver} +module load netcdf-C/${netcdf_C_ver} +module load esmf-C/${esmf_C_ver} +module load ve/hafs/${ve_hafs_ver} + +#modules for wgrib2 +module load intel-oneapi/${intel_oneapi_ver} +module load wgrib2/${wgrib2_ver} + +module list + +rm $tmp/FetchIce.out $tmp/ProcIce.out sh get_ice.sh > $tmp/FetchIce.out -sh process_ice.sh > $tmp/ProcIce.out +sh process_ice.sh > $tmp/ProcIce.out diff --git a/ecf/jrwps_prep_waterlevel.ecf b/ecf/jrwps_prep_waterlevel.ecf index e35ef5b..f1110a5 100644 --- a/ecf/jrwps_prep_waterlevel.ecf +++ b/ecf/jrwps_prep_waterlevel.ecf @@ -7,14 +7,31 @@ #PBS -l select=1:ncpus=4:mem=64GB #PBS -o RWPS.PreProc.out -cd $RWPSroot/ush/preprocess - -module load PrgEnv-intel/8.1.0 -module load craype/2.7.8 -module load intel/19.1.3.304 -module load cfp/2.0.4 -module load prod_util/2.0.8 -module load prod_envir/2.0.5 +cd $HOMErwps/ush/preprocess + +module use ${HOMErwps}/modulefiles + +############################################################ +# Load modules +############################################################ +source $HOMErwps/versions/preproc.${MACHINE_ID}.ver + +#modules for esmf +module reset +module load PrgEnv-intel/${PrgEnv_intel_ver} +module load craype/${craype_ver} +module load intel/${intel_ver} +module load cray-mpich/${cray_mpich_ver} +module load hdf5-C/${hdf5_C_ver} +module load netcdf-C/${netcdf_C_ver} +module load esmf-C/${esmf_C_ver} +module load ve/hafs/${ve_hafs_ver} + +#modules for wgrib2 +module load intel-oneapi/${intel_oneapi_ver} +module load wgrib2/${wgrib2_ver} + +module list rm $tmp/FetchWaterLevel.out $tmp/ProcWaterLevel.out diff --git a/ecf/jrwps_prep_wind.ecf b/ecf/jrwps_prep_wind.ecf index 50f3ffd..ba97c2f 100644 --- a/ecf/jrwps_prep_wind.ecf +++ b/ecf/jrwps_prep_wind.ecf @@ -7,18 +7,35 @@ #PBS -l select=1:ncpus=4:mem=64GB #PBS -o RWPS.PreProc.out -cd $RWPSroot/ush/preprocess +cd $HOMErwps/ush/preprocess -module load PrgEnv-intel/8.1.0 -module load craype/2.7.8 -module load intel/19.1.3.304 -module load cfp/2.0.4 -module load prod_util/2.0.8 -module load prod_envir/2.0.5 +module use ${HOMErwps}/modulefiles -rm $tmp/FetchWinds.out $tmp/ProcWinds.out +############################################################ +# Load modules +############################################################ +source $HOMErwps/versions/preproc.${MACHINE_ID}.ver + +#modules for esmf +module reset +module load PrgEnv-intel/${PrgEnv_intel_ver} +module load craype/${craype_ver} +module load intel/${intel_ver} +module load cray-mpich/${cray_mpich_ver} +module load hdf5-C/${hdf5_C_ver} +module load netcdf-C/${netcdf_C_ver} +module load esmf-C/${esmf_C_ver} +module load ve/hafs/${ve_hafs_ver} + +#modules for wgrib2 +module load intel-oneapi/${intel_oneapi_ver} +module load wgrib2/${wgrib2_ver} + +module list + +rm $tmp/FetchWind.out $tmp/ProcWind.out sh get_wind.sh > $tmp/FetchWind.out -sh process_wind.sh > $tmp/ProcWind.out +sh process_wind.sh > $tmp/ProcWind.out diff --git a/sorc/prepare_forcing.sh b/sorc/prepare_forcing.sh index c69e0f6..27aee42 100755 --- a/sorc/prepare_forcing.sh +++ b/sorc/prepare_forcing.sh @@ -12,15 +12,30 @@ export PDY=$1 export cyc=$2 export meshID=$3 -export RWPSroot="$(pwd)/../" -export mesh="$RWPSroot/fix/rwps.$meshID.msh" -export fix="$RWPSroot/fix" -export prep="$RWPSroot/PrepInputs" +readonly HOMErwps=$(cd "$(dirname "$(readlink -f -n "${BASH_SOURCE[0]}")")" && git rev-parse --show-toplevel) +cd "${HOMErwps}/sorc" || exit 1 + +source "${HOMErwps}/ush/detect_machine.sh" +source "${HOMErwps}/ush/module-setup.sh" +#source "${HOMErwps}/versions/build.ver" + +export MACHINE_ID +export HOMErwps + +if [[ -z "${MACHINE_ID}" ]]; then + echo "FATAL: Unable to determine target machine" + exit 1 +fi + + +export mesh="$HOMErwps/fix/rwps.$meshID.msh" +export fix="$HOMErwps/fix" +export prep="$HOMErwps/PrepInputs" export tmp="$prep/tmpfiles" export frc="$prep/forcing" export outdir=$prep -echo $RWPSroot +echo $HOMErwps echo $fix $prep $tmp $outdir mkdir -p $prep mkdir -p $tmp @@ -38,17 +53,17 @@ export COMINlocal=$tmp export RWPSfix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPS # copy mesh to local fix directory -cp -p $RWPSfix/fix/$meshID/20260722/rwps.$meshID.msh $RWPSroot/fix/ +cp -p $RWPSfix/fix/$meshID/20260722/rwps.$meshID.msh $HOMErwps/fix/ # copy Interpoplation weights for nbm, rrfs, rtofs and stofs to local fix directory -cp -p $RWPSfix/fix/$meshID/20260722/InterpolationWeights*$meshID*.nc $RWPSroot/fix/ +cp -p $RWPSfix/fix/$meshID/20260722/InterpolationWeights*$meshID*.nc $HOMErwps/fix/ # copy distance to boundary for nbm, rrfs, rtofs and stofs to local fix directory -cp -p $RWPSfix/fix/$meshID/20260722/DistToBndy*$meshID*.nc $RWPSroot/fix/ +cp -p $RWPSfix/fix/$meshID/20260722/DistToBndy*$meshID*.nc $HOMErwps/fix/ meshname="${mesh##*/}" export meshname="${meshname: 0: -4}" #Retrieve current and process for forecast cycle -qsub -V $RWPSroot/ecf/jrwps_prep_current.ecf -qsub -V $RWPSroot/ecf/jrwps_prep_ice.ecf -qsub -V $RWPSroot/ecf/jrwps_prep_waterlevel.ecf -qsub -V $RWPSroot/ecf/jrwps_prep_wind.ecf +qsub -V $HOMErwps/ecf/jrwps_prep_current.ecf +qsub -V $HOMErwps/ecf/jrwps_prep_ice.ecf +qsub -V $HOMErwps/ecf/jrwps_prep_waterlevel_gws.ecf +qsub -V $HOMErwps/ecf/jrwps_prep_wind.ecf diff --git a/ush/preprocess/compute_unstr_to_rwps_interp_weights.sh b/ush/preprocess/compute_unstr_to_rwps_interp_weights.sh index fc01138..ccb3630 100644 --- a/ush/preprocess/compute_unstr_to_rwps_interp_weights.sh +++ b/ush/preprocess/compute_unstr_to_rwps_interp_weights.sh @@ -9,18 +9,6 @@ #PBS -l place=excl #PBS -l debug=true -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - -pip list -v - filein=$1 meshfile=$2 Nprocs=$3 diff --git a/ush/preprocess/compute_wind_to_rwps_interp_weights.py b/ush/preprocess/compute_wind_to_rwps_interp_weights.py deleted file mode 100644 index d9e4376..0000000 --- a/ush/preprocess/compute_wind_to_rwps_interp_weights.py +++ /dev/null @@ -1,158 +0,0 @@ -# This is a a set of routines that interpolate wind forecasts to an unstructured -# mesh from regular or curvilinear grids (using ESMPY). In addition to interpolation -# field the out file contains a spatially variable error variance estimate based on the -# distance to the forecast boundary. This error variance is used later to update -# dispirate forecasts in a bayesian manner to yield a spatially smooth estimate -# incorporating all forecasts. The understanding is that the more local forecast -# products are of higher accuracy than the coarser broader scale forecasts - -import numpy as np -import os -import datetime -import netCDF4 as nc -import sys -import re -import interp_utilities as iutil -import xarray as xr -import esmpy -import scipy.sparse as sp - - -# Main program - -nargin = len(sys.argv) - 1 - -flin=sys.argv[1] -mshfl=sys.argv[2] - -# Don't use nearest neighbor interpolation unless 6th positive integer argument present. -# This may be needed on boundary of RWPS mesh if node alignment is outside NBM OC domain -Extrapolate=False -if nargin > 2: - if int(sys.argv[3])>0: - print("using nearest neighbor to extrapolate wind field beyond geometric coverage") - Extrapolate=True - -xi, yi, ei, zi = iutil.loadWW3Mesh(mshfl) -nn=len(xi) - -if np.mean(xi)<0: - xi=xi+360. - -data = nc.Dataset(flin,"r") -#read spaital dimensions and determine if input mesh is curvilinear or regular -x1=np.asarray(data["longitude"][:]) -y1=np.asarray(data["latitude"][:]) -if (len(x1.shape)==2 and len(y1.shape)==2): - IsCrvLn=True -elif (len(x1.shape)==1 and len(y1.shape)==1): - IsCrvLn=False -else: - print("input file spatial dimension is not right. ending program") - sys.exit() -# shift to common longitude -if np.mean(np.mean(x1))<0: - x1=x1+360. - -####################################### -# === Create weights ===# -####################################### - -meshslash=mshfl.rfind('/')+1 -dom=flin.split(".") -dom=dom[len(dom)-2] -weights_file = "InterpolationWeights."+mshfl[meshslash:len(mshfl)-3]+dom+".nc" -print("interpolation weights will be written to file = "+ weights_file) - -if IsCrvLn: - nx=x1.shape[0] - ny=x1.shape[1] -else: - nx=len(x1) - ny=len(y1) -n1=nx*ny - -print("Computing weights and saving to file: "+ weights_file) - -if not IsCrvLn: - x1 = np.tile(x1,(ny,1)) - y1 = np.tile(y1,(nx,1)).T -#Use esmpy to construct bilinear interpolation weights -iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - -####################################### -# === read weights and ===# -####################################### -with xr.open_dataset(weights_file) as ds_s: - # Standard sparse storage uses 'row', 'col', and 'S'==weights variables - row = ds_s['row'].values - col = ds_s['col'].values - weights = ds_s['S'].values - Nrows=ds_s.attrs.get('Nrows') - Ncols=ds_s.attrs.get('Ncols') -print("nn = "+str(nn)+": Nrows = "+str(Nrows)) -print("n1 = "+str(n1)+": Ncols = "+str(Ncols)) -if not ((nn==Nrows) and (n1==Ncols)): - print("Wrong matrix weights: number of rows from "+ mshfl +" = "+str(nn)+ - " but number of rows in "+ weights_file +" = "+str(Nrows)+ - ", number of spatial points in "+ flin +" = "+str(n1)+ - " but number of columns in "+ weights_file +" = "+str(Ncols) ) - print(" You probably need to remove file "+ weights_file +" and rerun to generate appropriate weights") -matrix = sp.coo_matrix((weights, (row-1, col-1)), shape=(nn,n1)).tocsr() -print("sparse interpolation matrix") -print(matrix) - -################################################################################## -# START: Extrapolate for nodes not covered by interpolator -################################################################################## -if Extrapolate: - from scipy.interpolate import NearestNDInterpolator - if not IsCrvLn: - x1 = np.tile(x1,(ny,1)) - y1 = np.tile(y1,(nx,1)).T - x1v=np.transpose(x1).reshape(n1) # vectorize src nodes, consistant with Up, Vp - y1v=np.transpose(y1).reshape(n1) - srcp = np.array((x1v,y1v)).T - srcv = 1.+x1v**2 + y1v**2 #dummy input field - #dstv = matrix @ srcv.T - row_sum = matrix.sum(axis=1) - j0=np.where( row_sum==0 ) # destination nodes with no coverage from interpolation matrix - j0=np.array(j0[0]).tolist() - dstp = np.array((xi[j0],yi[j0])).T - interpolator = NearestNDInterpolator(srcp, srcv) - distances, j0src = interpolator.tree.query(dstp) - weightsExtrp=weights.tolist().append([1.0] * len(j0) ) - rowExtrp=np.concatenate( (row, np.array(j0)) ) - colExtrp=np.concatenate( (col, np.array(j0src)) ) - weightsExtrp=np.concatenate( (weights, np.array([1.0] * len(j0))) ) - - os.replace(weights_file, "NoExtrap."+weights_file) - iutil.WriteInterpolationWeightsToNetCDF(weights_file,rowExtrp,colExtrp,weightsExtrp,len(xi),len(x1v)) - -################################################################################## -# FINISHED: Extrapolate for nodes not covered by interpolator -################################################################################## - -################################################################################## -# START: Compute distance to boundary for each node in mesh: -################################################################################## -dist2bnd_file = "DistToBndy."+mshfl[meshslash:len(mshfl)-3]+dom+".nc" - -if Extrapolate: - dist2bnd=np.full(len(xi), np.inf) #all points are inside boundary- No boundary with this type of extrapolation -else: - row_sum = matrix.sum(axis=1) - j0=np.where( row_sum==0 ) # destination nodes with no coverage from interpolation matrix - j0=np.array(j0[0]).tolist() - u0=np.ones(xi.shape) - nan=float("nan") - u0[j0]=nan - dist2bnd=iutil.CalculateDistanceToInterpEnvelope(xi,yi,u0, 1.) - -with nc.Dataset(dist2bnd_file, 'w', format='NETCDF4') as ncout: - ncout.createDimension('node' , nn) - d_var=ncout.createVariable('dist2bnd', 'f4', ('node',)) - d_var.long_name = 'distance to boundary' - d_var.units = 'km' - d_var.standard_name = 'distance to boundary' - d_var[:]=dist2bnd[:] diff --git a/ush/preprocess/get_currents.sh b/ush/preprocess/get_current.sh similarity index 84% rename from ush/preprocess/get_currents.sh rename to ush/preprocess/get_current.sh index a35b09d..ac51b5d 100644 --- a/ush/preprocess/get_currents.sh +++ b/ush/preprocess/get_current.sh @@ -1,7 +1,7 @@ #!/bin/bash # This script retrieves global RTOFS and STOFS as netcdf files -cd $RWPSroot/ush/preprocess +cd $HOMErwps/ush/preprocess rtofs/get_rtofs.sh $PDY & stofs/get_stofs.sh $PDY $cyc current& diff --git a/ush/preprocess/get_ice.sh b/ush/preprocess/get_ice.sh index caab91d..c99dc27 100644 --- a/ush/preprocess/get_ice.sh +++ b/ush/preprocess/get_ice.sh @@ -2,7 +2,7 @@ # This script retrieves ice forecasts for global RTOFS and Alaska NBM as netcdf files -cd $RWPSroot/ush/preprocess +cd $HOMErwps/ush/preprocess sh rtofs/get_rtofs_ice.sh $PDY $cyc & sh nbm/get_nbm_ice.sh $PDY $cyc & diff --git a/ush/preprocess/get_waterlevel.sh b/ush/preprocess/get_waterlevel.sh index 0dddf7a..26b099e 100644 --- a/ush/preprocess/get_waterlevel.sh +++ b/ush/preprocess/get_waterlevel.sh @@ -2,5 +2,5 @@ ## This script retrieves global STOFS water level as netcdf file -cd $RWPSroot/ush/preprocess +cd $HOMErwps/ush/preprocess stofs/get_stofs.sh $PDY $cyc waterlevel diff --git a/ush/preprocess/get_wind.sh b/ush/preprocess/get_wind.sh index 08a9a20..056d3c5 100644 --- a/ush/preprocess/get_wind.sh +++ b/ush/preprocess/get_wind.sh @@ -3,7 +3,7 @@ # This script retrieves rrfs and nbm winbds and exports as # netcdf files -cd $RWPSroot/ush/preprocess +cd $HOMErwps/ush/preprocess echo "retrieving winds from rrfs and nbm for rwps wind" ( diff --git a/ush/preprocess/interp_utilities.py b/ush/preprocess/interp_utilities.py index ac1cc0e..909a8f9 100644 --- a/ush/preprocess/interp_utilities.py +++ b/ush/preprocess/interp_utilities.py @@ -675,7 +675,7 @@ def WriteInterpJobscriptPBS(fl,flin,mshfl,Njobs, ComputeNodes): WghtFl="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".txt" WghtFl="InterpWeights."+mshfl[meshslash:len(mshfl)-4]+".stofs.txt" WghtFlNetCDF="InterpWeights."+mshfl[meshslash:len(mshfl)-4]+".stofs.nc" - Njobs=64 #OVERWRITE FOR NOW + Njobs=32 #OVERWRITE FOR NOW with open(fl, 'w') as f: f.write("#PBS -N ESMPy\n") f.write("#PBS -j oe\n") diff --git a/ush/preprocess/nbm/get_nbm_ice.sh b/ush/preprocess/nbm/get_nbm_ice.sh index 7540e78..ec1aa6c 100755 --- a/ush/preprocess/nbm/get_nbm_ice.sh +++ b/ush/preprocess/nbm/get_nbm_ice.sh @@ -4,10 +4,6 @@ # This script takes rrfs grib2 forecast files, extracts 10m u and v wind # components and outputs to netcdf. Comand line arguments are -module load intel-oneapi/2022.2.0.262 -module load wgrib2/2.0.8 - - ICE_FILE="$COMINnbm/blend.t$2z.icec.ak.grib2" OUTPUT_DIR="$COMINlocal/ice.$1.$2" diff --git a/ush/preprocess/nbm/make_nbm_wind.sh b/ush/preprocess/nbm/make_nbm_wind.sh index 1adf9dc..ca031a0 100755 --- a/ush/preprocess/nbm/make_nbm_wind.sh +++ b/ush/preprocess/nbm/make_nbm_wind.sh @@ -3,9 +3,6 @@ # This script takes rrfs grib2 forecast files, extracts 10m u and v wind # components and outputs to netcdf. Comand line arguments are -module load intel-oneapi/2022.2.0.262 -module load wgrib2/2.0.8 - WSPD_FILE="$COMINnbm/blend.t$2z.wspd.$3.grib2" WDIR_FILE="$COMINnbm/blend.t$2z.wdir.$3.grib2" diff --git a/ush/preprocess/process_currents.sh b/ush/preprocess/process_current.sh similarity index 90% rename from ush/preprocess/process_currents.sh rename to ush/preprocess/process_current.sh index f41922c..242b8e7 100644 --- a/ush/preprocess/process_currents.sh +++ b/ush/preprocess/process_current.sh @@ -1,18 +1,6 @@ #!/bin/bash -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - -pip list -v - -cd $RWPSroot/ush/preprocess +cd $HOMErwps/ush/preprocess meshname="${mesh##*/}" meshname="${meshname: 0: -4}" diff --git a/ush/preprocess/process_ice.sh b/ush/preprocess/process_ice.sh index 87e1138..11394a1 100644 --- a/ush/preprocess/process_ice.sh +++ b/ush/preprocess/process_ice.sh @@ -1,18 +1,6 @@ #!/bin/bash -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - -pip list -v - -cd $RWPSroot/ush/preprocess +cd $HOMErwps/ush/preprocess meshname="${mesh##*/}" meshname="${meshname: 0: -4}" diff --git a/ush/preprocess/process_waterlevel.sh b/ush/preprocess/process_waterlevel.sh index b879bd0..4179452 100644 --- a/ush/preprocess/process_waterlevel.sh +++ b/ush/preprocess/process_waterlevel.sh @@ -1,18 +1,6 @@ #!/bin/bash -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - -pip list -v - -cd $RWPSroot/ush/preprocess +cd $HOMErwps/ush/preprocess meshname="${mesh##*/}" meshname="${meshname: 0: -4}" diff --git a/ush/preprocess/process_wind.sh b/ush/preprocess/process_wind.sh index bbeb2af..0384ad8 100644 --- a/ush/preprocess/process_wind.sh +++ b/ush/preprocess/process_wind.sh @@ -1,18 +1,6 @@ #!/bin/bash -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - -pip list -v - -cd $RWPSroot/ush/preprocess +cd $HOMErwps/ush/preprocess winddir="$tmp/wind.$PDY.$cyc" windvars="UGRD_10maboveground:VGRD_10maboveground" diff --git a/ush/preprocess/rrfs/make_rrfs_wind.sh b/ush/preprocess/rrfs/make_rrfs_wind.sh index c23e36a..337324c 100755 --- a/ush/preprocess/rrfs/make_rrfs_wind.sh +++ b/ush/preprocess/rrfs/make_rrfs_wind.sh @@ -13,9 +13,6 @@ # echo "make_rrfs_wind.sh fetching rrfs : time = $1, cycle = $2, domain = $3" -module load intel-oneapi/2022.2.0.262 -module load wgrib2/2.0.8 - INPUT_DIR="$COMINrrfs" OUTPUT_DIR="$COMINlocal/wind.$1.$2" OUTPUT_FILE="$OUTPUT_DIR/rrfs.$1.$2.wind10m.$3.nc" diff --git a/ush/preprocess/rtofs/get_rtofs.sh b/ush/preprocess/rtofs/get_rtofs.sh index 3875fcb..b68930c 100755 --- a/ush/preprocess/rtofs/get_rtofs.sh +++ b/ush/preprocess/rtofs/get_rtofs.sh @@ -2,19 +2,7 @@ #Retrieve global RTOFS currents and consolidate into a single NetCDF file -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - -pip list -v - -cd $RWPSroot/ush/preprocess +cd $HOMErwps/ush/preprocess tmpdir="$COMINlocal/tmp.rtofs.$PDY" filesin="$COMINrtofs/*prog.nc" diff --git a/ush/preprocess/rtofs/get_rtofs_ice.sh b/ush/preprocess/rtofs/get_rtofs_ice.sh index 4dea9fc..4621f30 100755 --- a/ush/preprocess/rtofs/get_rtofs_ice.sh +++ b/ush/preprocess/rtofs/get_rtofs_ice.sh @@ -2,18 +2,6 @@ #Retrieve global RTOFS ice forecast and consolidate in single NetCDF filesin -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - -pip list -v - tmpdir="$COMINlocal/tmp.rtofsIce.$PDY" filesin="$COMINrtofs/*ice.nc" dirout="$COMINlocal/ice.$PDY.$cyc" diff --git a/versions/preproc.wcoss2.ver b/versions/preproc.wcoss2.ver new file mode 100755 index 0000000..a53605b --- /dev/null +++ b/versions/preproc.wcoss2.ver @@ -0,0 +1,12 @@ +#! /usr/bin/env bash +export PrgEnv_intel_ver=8.5.0 +export interl_ver=19.1.3.304 +export craype_ver=2.7.17 +export cray_mpich_ver=8.1.19 +export hdf5_C_ver=1.14.0 +export netcdf_C_ver=4.9.2 +export esmf_C_ver=8.6.0 +export ve_hafs_ver=2.1 + +export intel_oneapi_ver=2022.2.0.262 +export wgrib2_ver=2.0.8 From 6c1c479399b004e385e3b5c9d3869f292d99c519 Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa Date: Tue, 25 Aug 2026 16:11:03 +0000 Subject: [PATCH 17/39] removed esmpy log files in dev that were unintentionally incorporated --- .../sorc/logs/ESMPy.o136818048 | 757 ---------- .../sorc/logs/ESMPy.o136825597 | 969 ------------- .../sorc/logs/ESMPy.o136832289 | 986 ------------- .../sorc/logs/ESMPy.o136853423 | 736 ---------- .../sorc/logs/ESMPy.o136854537 | 1246 ---------------- .../sorc/logs/ESMPy.o136857549 | 1272 ----------------- 6 files changed, 5966 deletions(-) delete mode 100644 dev/compute_interpolation_weights/sorc/logs/ESMPy.o136818048 delete mode 100644 dev/compute_interpolation_weights/sorc/logs/ESMPy.o136825597 delete mode 100644 dev/compute_interpolation_weights/sorc/logs/ESMPy.o136832289 delete mode 100644 dev/compute_interpolation_weights/sorc/logs/ESMPy.o136853423 delete mode 100644 dev/compute_interpolation_weights/sorc/logs/ESMPy.o136854537 delete mode 100644 dev/compute_interpolation_weights/sorc/logs/ESMPy.o136857549 diff --git a/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136818048 b/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136818048 deleted file mode 100644 index b22e527..0000000 --- a/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136818048 +++ /dev/null @@ -1,757 +0,0 @@ -PBS: Running prologue on parent mom node: nid001112... -Job 136818048.dbqs01 nodelist: nid001112 -Job 136818048.dbqs01 - Prologue complete. Execution time: 4 seconds -Agent pid 1554071 -Identity added: /u/keston.smith/.ssh/id_ed25519 (keston.smith@noaa.gov) -/u/keston.smith/.bashrc: line 46: alias: eval "$(ssh-agent -s)"; ssh-add ~/.ssh/id_ed25519: not found -Resetting modules to system default. Reseting $MODULEPATH back to system default. All extra directories will be removed from $MODULEPATH. -Package Version Location Installer -------------------------- ----------- ---------------------------------------------------------------------------------- --------- -Cartopy 0.24.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -certifi 2025.1.31 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -cftime 1.6.4.post1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -contourpy 1.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -cycler 0.12.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -esmpy 8.6.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -fonttools 4.55.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -geographiclib 2.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -geopy 2.4.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -Jinja2 3.1.5 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -kiwisolver 1.4.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -MarkupSafe 3.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -matplotlib 3.10.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -netCDF4 1.7.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -numpy 2.2.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -packaging 24.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pandas 2.2.3 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pillow 11.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pip 25.0.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pyparsing 3.2.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pyproj 3.7.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pyshp 2.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -python-dateutil 2.9.0.post0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pytz 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -PyYAML 6.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -scipy 1.15.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -setuptools 75.8.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -setuptools-git-versioning 2.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -shapely 2.0.7 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -six 1.17.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -tzdata 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -xarray 2025.1.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 194, in - dist2bnd=iutil.CalculateDistanceToInterpEnvelope(xi,yi,u0, 1.) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 413, in CalculateDistanceToInterpEnvelope - din[k]=QuickDistance(yin[k],xin[k],yout,xout) # distance from node to closest point not interpolated to - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 422, in QuickDistance - d= np.min( np.sqrt( ( (lat1-lats2)*deg2kmY)**2 + ((lon1-lons2)*deg2kmX)**2 ) ) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/numpy/_core/fromnumeric.py", line 3302, in min - return _wrapreduction(a, np.minimum, 'min', axis, None, out, - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/numpy/_core/fromnumeric.py", line 86, in _wrapreduction - return ufunc.reduce(obj, axis, dtype, out, **passkwargs) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -ValueError: zero-size array to reduction operation minimum which has no identity -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 194, in - dist2bnd=iutil.CalculateDistanceToInterpEnvelope(xi,yi,u0, 1.) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 413, in CalculateDistanceToInterpEnvelope - din[k]=QuickDistance(yin[k],xin[k],yout,xout) # distance from node to closest point not interpolated to - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 422, in QuickDistance - d= np.min( np.sqrt( ( (lat1-lats2)*deg2kmY)**2 + ((lon1-lons2)*deg2kmX)**2 ) ) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/numpy/_core/fromnumeric.py", line 3302, in min - return _wrapreduction(a, np.minimum, 'min', axis, None, out, - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/numpy/_core/fromnumeric.py", line 86, in _wrapreduction - return ufunc.reduce(obj, axis, dtype, out, **passkwargs) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -ValueError: zero-size array to reduction operation minimum which has no identity -directory STOFSInterpWeights.rwps.oc_20km_300km is alread empty -Made parallel jobcards to create interpolation weights with 16 processes. Next step: -sbatch jobcardcompute_unstr_to_rwps_interp_weightsSLURM -136819126[].dbqs01 -python: can't open file '/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/ConvertWeights2Netcdf.py': [Errno 2] No such file or directory -cp: cannot stat 'InterpWeights.rwps.oc_20km_300km.stofs.nc': No such file or directory -cp: cannot stat 'DistToBndy.rwps.oc_20km_300km.stofs.nc': No such file or directory -directory STOFSInterpWeights.rwps.oc_20km_300km is alread empty -Made parallel jobcards to create interpolation weights with 16 processes. Next step: -sbatch jobcardcompute_unstr_to_rwps_interp_weightsSLURM -136819425[].dbqs01 -mesh file=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/sorc/../../..//fix/rwps.oc_20km_300km.msh -nn = 21329 -number of nodes read: 21329 -ne=40527 -includes boundary nodes -number of open boundary nodes read: 129 -number of elements read: 40398 -n=62076 -n_s=62076 -PBS: Running epilogue on parent mom node: nid001112... -================================================================== -BEGIN - DEBUG INFO -================================================================== -Job 136818048.dbqs01 - Post Job Mem Usage: -nid001112: 2026-08-24.51 1 =========================================== -nid001112: 2026-08-24.51 2 #### Node Memory Usage for nid001112 #### -nid001112: 2026-08-24.51 3 ------------------ -nid001112: 2026-08-24.51 4 Mem: total:526983544 used:17820532 free:510198608 shared:862632 cache:1554584 avail:509163012 -nid001112: 2026-08-24.51 5 4.0K /dev/shm -nid001112: 2026-08-24.51 6 40K /tmp -nid001112: 2026-08-24.51 7 =========================================== -nid001112: 2026-08-24.57 1 =========================================== -nid001112: 2026-08-24.57 2 #### Node Memory Usage for nid001112 #### -nid001112: 2026-08-24.57 3 ------------------ -nid001112: 2026-08-24.57 4 Mem: total:526983544 used:18714996 free:508390092 shared:862644 cache:3343248 avail:508268548 -nid001112: 2026-08-24.57 5 4.0K /dev/shm -nid001112: 2026-08-24.57 6 40K /tmp -nid001112: 2026-08-24.57 7 =========================================== - ------------------------------------------------------------------- ------------------------------------------------------------------- -Job 136818048.dbqs01 - Post Job Mem Usage Profile: -2026-08-24A--:--:--.------+--:-- nid001112 #### nid001112 - Job 136818048.dbqs01 NUMA Node Memory Allocation and Fragmentation Reports -Starting Fragmentation Report for nid001112 -Node Order9 Order10 Score MB_Free %Free State -0 5202 15 5232 10464 16 FRAG -1 9117 2771 14659 29318 45 MARG -2 5629 7539 20707 41414 64 OK -3 2883 11773 26429 52858 82 OK -4 6304 7640 21584 43168 66 OK -5 2042 12865 27772 55544 86 OK -6 3502 10704 24910 49820 77 OK -7 1516 13517 28550 57100 88 OK - -** nid001112 : node0_score=5232 node0_state=FRAG uptime=4577381s Overall=FRAG ** -Ending Fragmentation Report for nid001112 -Node Order9 Order10 Score MB_Free %Free State -0 5206 15 5236 10472 16 FRAG -1 9124 2774 14672 29344 45 MARG -2 5630 7540 20710 41420 64 OK -3 2882 11774 26430 52860 82 OK -4 6302 7643 21588 43176 66 OK -5 2022 12892 27806 55612 86 OK -6 3509 10707 24923 49846 77 OK -7 1520 13522 28564 57128 88 OK - -** nid001112 : node0_score=5236 node0_state=FRAG uptime=4578167s Overall=FRAG ** -2026-08-24A--:--:--.------+--:-- nid001112 #### nid001112 - Job 136818048.dbqs01 VMSTATS Memory Report -**Only Printing Significant Findings - TEST CODE - Results are NOT positive indication of a problem. ** -nid001112 [!] Inactive file cache ballooned: 431139 (threshold: 100000) - ------------------------------------------------------------------- -Job 136818048.dbqs01 - /var/log/messages for job duration: -2026-08-24A--:--:--.------+--:-- nid001112 #### nid001112 - Job 136818048.dbqs01 Runtime Data from /var/log/messages -nid001112: nid001112 #### nid001112 - Job 136818048.dbqs01 Runtime Data from /var/log/messages -nid001112: 2026-08-24T13:38:51.407558+00:00 nid001112 prologue: MARK: Job 136818048.dbqs01 Start -nid001112: 2026-08-24T13:38:51.413679+00:00 nid001112 prologue: Job 136818048.dbqs01 nodelist: nid001112 -nid001112: 2026-08-24T13:38:51.415558+00:00 nid001112 prologue: Job 136818048.dbqs01 - Recording pre-execution stats and counters... -nid001112: 2026-08-24T13:38:51.449276+00:00 nid001112 prologue: Job 136818048.dbqs01 - Killing any stray user processes... -nid001112: 2026-08-24T13:38:51.535866+00:00 nid001112 prologue: Job 136818048.dbqs01 - Clearing /tmp... -nid001112: 2026-08-24T13:38:51.551379+00:00 nid001112 prologue: Job 136818048.dbqs01 - Verifying key post-boot workarounds with warchk... -nid001112: 2026-08-24T13:38:51.579373+00:00 nid001112 WARCHK: root : /sfs/admin/scripts/warchk --batch -nid001112: 2026-08-24T13:38:51.771868+00:00 nid001112 prologue: Job 136818048.dbqs01 - Recording pre-job memory usage... -nid001112: 2026-08-24T13:38:51.851441+00:00 nid001112 prologue: Job 136818048.dbqs01 - FRAG_STATE: ** nid001112 : node0_score=5232 node0_state=FRAG uptime=4577381s Overall=FRAG ** -nid001112: 2026-08-24T13:38:51.852575+00:00 nid001112 prologue: Job 136818048.dbqs01 - Recording pre-job HSN counters... -nid001112: 2026-08-24T13:38:51.976365+00:00 nid001112 prologue: Job 136818048.dbqs01 - Recording pre-job Lustre counters... -nid001112: 2026-08-24T13:38:52.998196+00:00 nid001112 prologue: Job 136818048.dbqs01 - Recording initial NFS client statistics... -nid001112: 2026-08-24T13:38:53.008049+00:00 nid001112 prologue: Job 136818048.dbqs01 - Saving a copy of the job script... -nid001112: 2026-08-24T13:38:53.015124+00:00 nid001112 prologue: Job 136818048.dbqs01 - Checking existing ASLR settings... -nid001112: 2026-08-24T13:38:53.020906+00:00 nid001112 prologue: Job 136818048.dbqs01 - Checking palsd open file count... -nid001112: 2026-08-24T13:38:53.115961+00:00 nid001112 PBS_CMD: root : /opt/pbs/bin/qstat -Bf -nid001112: 2026-08-24T13:38:54.131024+00:00 nid001112 prologue: Job 136818048.dbqs01 - Checking one-shot enabled: False -nid001112: 2026-08-24T13:38:54.132179+00:00 nid001112 prologue: Job 136818048.dbqs01 - Enabling turboboost... -nid001112: 2026-08-24T13:38:54.135197+00:00 nid001112 prologue: Job 136818048.dbqs01 - Checking warchk results... -nid001112: 2026-08-24T13:38:54.138329+00:00 nid001112 prologue: Job 136818048.dbqs01 - Warchk Complete -nid001112: 2026-08-24T13:38:54.141005+00:00 nid001112 prologue: Job 136818048.dbqs01 - Prologue complete. Execution time: 4 seconds -nid001112: 2026-08-24T13:40:47.144700+00:00 nid001112 kernel: [4577206.032353][T13525] LNet: 13525:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds -nid001112: 2026-08-24T13:41:48.135821+00:00 nid001112 kernel: [4577267.020490][T13525] LNet: 13525:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.126.122@o2ib: 1 seconds -nid001112: 2026-08-24T13:43:15.817637+00:00 nid001112 kernel: [4577354.694851][T13514] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001112: 2026-08-24T13:43:40.046173+00:00 nid001112 systemd[1]: etc_update.service: Deactivated successfully. -nid001112: 2026-08-24T13:45:03.696624+00:00 nid001112 systemd[1]: session-11882.scope: Deactivated successfully. -nid001112: 2026-08-24T13:48:15.845649+00:00 nid001112 kernel: [4577654.707776][T13514] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001112: 2026-08-24T13:48:51.011503+00:00 nid001112 PBS_CMD: keston.smith : /opt/pbs/bin/qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS -nid001112: 2026-08-24T13:50:24.253091+00:00 nid001112 PBS_CMD: keston.smith : /opt/pbs/bin/qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS -nid001112: 2026-08-24T13:50:39.786587+00:00 nid001112 chronyd[951904]: Source 172.234.37.140 replaced with 162.244.81.139 (2.suse.pool.ntp.org) -nid001112: 2026-08-24T13:51:42.035807+00:00 nid001112 systemd[1]: etc_update.service: Deactivated successfully. -nid001112: 2026-08-24T13:51:57.168536+00:00 nid001112 epilogue: Job 136818048.dbqs01 complete, running post-job actions. -nid001112: 2026-08-24T13:51:57.188126+00:00 nid001112 epilogue: MARK: Job 136818048.dbqs01 Complete. - ------------------------------------------------------------------- -Job 136818048.dbqs01 - dmesg output for job duration: -2026-08-24A--:--:--.------+--:-- nid001112 #### nid001112 - Job 136818048.dbqs01 Runtime Data from dmesg -nid001112: nid001112 #### nid001112 - Job 136818048.dbqs01 Runtime Data from dmesg -nid001112: [Mon Aug 24 13:33:59 2026] MARK: Job 136818048.dbqs01 Start -nid001112: [Mon Aug 24 13:35:55 2026] LNet: 13525:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds -nid001112: [Mon Aug 24 13:36:56 2026] LNet: 13525:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.126.122@o2ib: 1 seconds -nid001112: [Mon Aug 24 13:38:23 2026] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001112: [Mon Aug 24 13:43:23 2026] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001112: [Mon Aug 24 13:47:05 2026] MARK: Job 136818048.dbqs01 Complete. - ------------------------------------------------------------------- -Job 136818048.dbqs01 - Pre/Post job diff on HSN (MLX) Counters: -2026-08-24A--:--:--.------+--:-- nid001112 #### nid001112 - Job 136818048.dbqs01 HSN0 MLX Counter Post-Job Difference -nid001112: multicast:: 5998376 | multicast:: 5998536 | Diff: 160 -nid001112: rx_bytes:: 175732410880 | rx_bytes:: 175733588514 | Diff: 1177634 -nid001112: rx_packets:: 56731654 | rx_packets:: 56732477 | Diff: 823 -nid001112: tx_bytes:: 459805352880 | tx_bytes:: 459805539523 | Diff: 186643 -nid001112: tx_packets:: 81385193 | tx_packets:: 81385985 | Diff: 792 -nid001112: port_rcv_data:: 218447199721576 | port_rcv_data:: 218447532387621 | Diff: 332666045 -nid001112: port_rcv_packets:: 357868701358 | port_rcv_packets:: 357869195490 | Diff: 494132 -nid001112: port_xmit_data:: 218557640868690 | port_xmit_data:: 218559188548079 | Diff: 1547679389 -nid001112: port_xmit_packets:: 355820321573 | port_xmit_packets:: 355821943197 | Diff: 1621624 -nid001112: unicast_rcv_packets:: 357868701358 | unicast_rcv_packets:: 357869195490 | Diff: 494132 -nid001112: unicast_xmit_packets:: 355820321573 | unicast_xmit_packets:: 355821943197 | Diff: 1621624 -nid001112: resp_cqe_error:: 76536 | resp_cqe_error:: 76572 | Diff: 36 -nid001112: resp_cqe_flush_error:: 72951 | resp_cqe_flush_error:: 72985 | Diff: 34 -nid001112: rx_write_requests:: 267371451 | rx_write_requests:: 267381876 | Diff: 10425 - ------------------------------------------------------------------- -Job 136818048.dbqs01 - Pre/Post job diff for Lustre Stats: -2026-08-24A--:--:--.------+--:-- nid001112 #### nid001112 - Job 136818048.dbqs01 Lustre Counters Post-Job Difference -nid001112: ### LustreStats: Multi-value diffs correspond to [samples min max total sum_of_squares] ### -nid001112: /lfs/h1 vah1-ffff922c9375f800 : -nid001112: h1: snapshot_time: Diffs: [ 786] secs -nid001112: h1: elapsed_time: Diffs: [ 785] secs -nid001112: h1: ioctl: Diffs: [ 2] reqs -nid001112: h1: getattr: Diffs: [ 15 0 0 58 732] Avg_usec : 3.86 -nid001112: h1: inode_permission: Diffs: [ 2 0 0 2 2] Avg_usec : 1.00 -nid001112: h1: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 -nid001112: ---------------- -nid001112: /lfs/h2 vah2-ffff923ccc444000 : -nid001112: h2: snapshot_time: Diffs: [ 786] secs -nid001112: h2: elapsed_time: Diffs: [ 785] secs -nid001112: h2: read_bytes: Diffs: [ 559426 0 0 5503438117 43105739845453767] Avg_bytes: 9837.65 -nid001112: h2: write_bytes: Diffs: [ 339788 0 0 6622063266 65429322276485738] Avg_bytes: 19488.80 -nid001112: h2: read: Diffs: [ 559406 0 0 4789832 412510293996] Avg_usec : 8.56 -nid001112: h2: write: Diffs: [ 340011 0 0 6200260 74845333006] Avg_usec : 18.23 -nid001112: h2: ioctl: Diffs: [ 758] reqs -nid001112: h2: open: Diffs: [ 527 0 0 68403 24655545] Avg_usec : 129.79 -nid001112: h2: close: Diffs: [ 528 0 0 36951 5626697] Avg_usec : 69.98 -nid001112: h2: seek: Diffs: [ 1278975 0 0 753 24119] Avg_usec : 0 -nid001112: h2: readdir: Diffs: [ 59 0 0 6795 2951687] Avg_usec : 115.16 -nid001112: h2: truncate: Diffs: [ 109 0 0 359934 14330718878] Avg_usec : 3302.14 -nid001112: h2: flock: Diffs: [ 92 0 0 5832 859180] Avg_usec : 63.39 -nid001112: h2: getattr: Diffs: [ 2871 0 0 375419 9704657913] Avg_usec : 130.76 -nid001112: h2: unlink: Diffs: [ 31 0 0 15366 8006106] Avg_usec : 495.67 -nid001112: h2: mkdir: Diffs: [ 2 0 0 707 250145] Avg_usec : 353.50 -nid001112: h2: rmdir: Diffs: [ 1 0 0 246 60516] Avg_usec : 246.00 -nid001112: h2: mknod: Diffs: [ 42 0 0 19138 12684482] Avg_usec : 455.66 -nid001112: h2: rename: Diffs: [ 3 0 0 1791 1098873] Avg_usec : 597.00 -nid001112: h2: getxattr: Diffs: [ 273 0 0 5024 507858] Avg_usec : 18.40 -nid001112: h2: getxattr_hits: Diffs: [ 203] reqs -nid001112: h2: inode_permission: Diffs: [ 20842 0 0 8768 46402] Avg_usec : .42 -nid001112: h2: opencount: Diffs: [ 529 0 0 3341 41341] Avg_reqs : 6.31 -nid001112: ---------------- -nid001112: /lfs/f1 vaf1-ffff923ccc444800 : -nid001112: f1: snapshot_time: Diffs: [ 785] secs -nid001112: f1: elapsed_time: Diffs: [ 785] secs -nid001112: f1: ioctl: Diffs: [ 2] reqs -nid001112: f1: getattr: Diffs: [ 11 0 0 35 253] Avg_usec : 3.18 -nid001112: f1: inode_permission: Diffs: [ 2 0 0 2 2] Avg_usec : 1.00 -nid001112: f1: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 -nid001112: ---------------- -nid001112: /lfs/f2 vaf2-ffff922c9f5a8800 : -nid001112: f2: snapshot_time: Diffs: [ 785] secs -nid001112: f2: elapsed_time: Diffs: [ 786] secs -nid001112: f2: read_bytes: Diffs: [ 20 0 0 122109 1783525125] Avg_bytes: 6105.45 -nid001112: f2: write_bytes: Diffs: [ 18 0 0 29161 96835341] Avg_bytes: 1620.05 -nid001112: f2: read: Diffs: [ 20 0 0 327 10491] Avg_usec : 16.35 -nid001112: f2: write: Diffs: [ 484 0 0 7805 3573829] Avg_usec : 16.12 -nid001112: f2: ioctl: Diffs: [ 14] reqs -nid001112: f2: open: Diffs: [ 23 0 0 708 121820] Avg_usec : 30.78 -nid001112: f2: close: Diffs: [ 23 0 0 2280 774426] Avg_usec : 99.13 -nid001112: f2: seek: Diffs: [ 21 0 0 2 4] Avg_usec : .09 -nid001112: f2: readdir: Diffs: [ 2 0 0 387 149769] Avg_usec : 193.50 -nid001112: f2: getattr: Diffs: [ 38 0 0 4256 1330196] Avg_usec : 112.00 -nid001112: f2: mknod: Diffs: [ 11 0 0 2829 848225] Avg_usec : 257.18 -nid001112: f2: getxattr: Diffs: [ 11 0 0 1358 179244] Avg_usec : 123.45 -nid001112: f2: inode_permission: Diffs: [ 138 0 0 358 8106] Avg_usec : 2.59 -nid001112: f2: opencount: Diffs: [ 25 0 0 56 230] Avg_reqs : 2.24 -nid001112: ---------------- -nid001112: /lfs/h3 vah3-ffff922c93235000 : -nid001112: h3: snapshot_time: Diffs: [ 785] secs -nid001112: h3: elapsed_time: Diffs: [ 786] secs -nid001112: h3: ioctl: Diffs: [ 2] reqs -nid001112: h3: getattr: Diffs: [ 7 0 0 28 198] Avg_usec : 4.00 -nid001112: h3: inode_permission: Diffs: [ 2 0 0 2 2] Avg_usec : 1.00 -nid001112: h3: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 -nid001112: ---------------- -nid001112: /apps vaf2-ffff922c97713000 : -nid001112: apps: snapshot_time: Diffs: [ 785] secs -nid001112: apps: elapsed_time: Diffs: [ 786] secs -nid001112: apps: read_bytes: Diffs: [ 14883 0 0 268925845 25166134096371] Avg_bytes: 18069.33 -nid001112: apps: read: Diffs: [ 14883 0 0 760989 249255825] Avg_usec : 51.13 -nid001112: apps: ioctl: Diffs: [ 10934] reqs -nid001112: apps: open: Diffs: [ 17634 0 0 862373 167033917] Avg_usec : 48.90 -nid001112: apps: close: Diffs: [ 17634 0 0 667602 134779154] Avg_usec : 37.85 -nid001112: apps: mmap: Diffs: [ 8112 0 0 47407 710627] Avg_usec : 5.84 -nid001112: apps: page_fault: Diffs: [ 171776 0 0 12810 35074] Avg_usec : .07 -nid001112: apps: seek: Diffs: [ 21713 0 0 24 38] Avg_usec : 0 -nid001112: apps: readdir: Diffs: [ 6626 0 0 413072 348261918] Avg_usec : 62.34 -nid001112: apps: getattr: Diffs: [ 78610 0 0 1402798 217899610] Avg_usec : 17.84 -nid001112: apps: getxattr: Diffs: [ 14 0 0 134 5896] Avg_usec : 9.57 -nid001112: apps: getxattr_hits: Diffs: [ 13] reqs -nid001112: apps: inode_permission: Diffs: [ 1079411 0 0 148154 370760] Avg_usec : .13 -nid001112: apps: opencount: Diffs: [ 17636 0 0 58582 321052] Avg_reqs : 3.32 -nid001112: ---------------- - ------------------------------------------------------------------- -### Job 136818048.dbqs01 - NFS Statistics for job duration: -#### 2026-08-24A--:--:--.------+--:-- nid001112 Job 136818048.dbqs01 - DEBUG-NFS: Unable to find NFS stats file: /lfs/f2/hpc/jobdata/136818048/nfsstats.136818048.nid001112 - ------------------------------------------------------------------- -### Job 136818048.dbqs01 - Lustre evictions (if present): - ------------------------------------------------------------------- -### Job 136818048.dbqs01 - Exit status is 0 - ------------------------------------------------------------------- -Job 136818048.dbqs01 - Job summary: -Job Id: 136818048.dbqs01 - Job_Name = ESMPy - Job_Owner = keston.smith@dlogin03.dogwood.wcoss2.ncep.noaa.gov - resources_used.cpupercent = 110 - resources_used.cput = 00:10:27 - resources_used.mem = 12832188kb - resources_used.ncpus = 16 - resources_used.vmem = 11770788kb - resources_used.walltime = 00:12:04 - job_state = R - queue = dev - server = dbqs01 - Account_Name = NWPS-DEV - Checkpoint = u - ctime = Mon Aug 24 13:38:48 2026 - Error_Path = dlogin03.dogwood.wcoss2.ncep.noaa.gov:/lfs/h2/emc/couple/noscr - ub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/sor - c/ESMPy.e136818048 - exec_host = nid001112/0*16 - exec_vnode = (nid001112:ncpus=16:mem=268435456kb) - Hold_Types = n - Join_Path = oe - Keep_Files = oed - Mail_Points = a - mtime = Mon Aug 24 13:51:01 2026 - Output_Path = dlogin03.dogwood.wcoss2.ncep.noaa.gov:/lfs/h2/emc/couple/nosc - rub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/so - rc/ESMPy.o136818048 - Priority = 0 - qtime = Mon Aug 24 13:38:48 2026 - Rerunable = False - Resource_List.alvl = 2 - Resource_List.aslr = True - Resource_List.debug = True - Resource_List.dfs = False - Resource_List.hyper = True - Resource_List.ldebug = False - Resource_List.mem = 256gb - Resource_List.ncpus = 16 - Resource_List.nodect = 1 - Resource_List.one-shot = False - Resource_List.place = exclhost - Resource_List.select = 1:ncpus=16:mem=256GB - Resource_List.turbo = True - Resource_List.walltime = 04:00:00 - schedselect = 1:ncpus=16:mem=256GB:prepost=False - stime = Mon Aug 24 13:38:50 2026 - session_id = 1552072 - Shell_Path_List = /bin/bash - jobdir = /u/keston.smith - substate = 42 - Variable_List = PBS_O_HOME=/u/keston.smith,PBS_O_LANG=en_US.UTF-8, - PBS_O_LOGNAME=keston.smith, - PBS_O_PATH=/opt/cray/bin:/u/keston.smith/.local/bin:/usr/local/bin:/us - r/bin:/bin:/opt/c3/bin:/opt/pbs/bin:/sbin, - PBS_O_MAIL=/var/spool/mail/keston.smith,PBS_O_SHELL=/bin/bash, - PBS_O_WORKDIR=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWP - S/dev/compute_interpolation_weights/sorc,PBS_O_SYSTEM=Linux, - LMOD_FAMILY_CRAYPE_NETWORK_VERSION=false,meshID=oc_20km_300km, - LD_LIBRARY_PATH=/opt/cray/lib64, - LS_COLORS=no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd= - 40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com - =01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tg - z=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.l - zma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2= - 00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.xz=00;31:*.avi=01;35:*.bmp - =01;35:*.dl=01;35:*.fli=01;35:*.gif=01;35:*.gl=01;35:*.jpg=01;35:*.jpeg - =01;35:*.mkv=01;35:*.mng=01;35:*.mov=01;35:*.mp4=01;35:*.mpg=01;35:*.pc - x=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.svg=01;35:*.t - ga=01;35:*.tif=01;35:*.webm=01;35:*.webp=01;35:*.wmv=01;35:*.xbm=01;35: - *.xcf=01;35:*.xpm=01;35:*.aiff=00;32:*.ape=00;32:*.au=00;32:*.flac=00;3 - 2:*.m4a=00;32:*.mid=00;32:*.mp3=00;32:*.mpc=00;32:*.ogg=00;32:*.voc=00; - 32:*.wav=00;32:*.wma=00;32:*.wv=00;32:,HOSTTYPE=x86_64, - prep=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/sorc/.. - //PrepInputs, - __LMOD_REF_COUNT_PATH=/opt/cray/bin:1;/u/keston.smith/.local/bin:1;/us - r/local/bin:1;/usr/bin:1;/bin:2;/opt/c3/bin:1;/opt/pbs/bin:1;/sbin:1, - _ModuleTable002_=ck5hbWUiXT0iY3JheXBlLW5ldHdvcmstb2ZpIix9LFsiY3JheXBlL - Xg4Ni1yb21lIl09e1siZm4iXT0iL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY3Jh - eXBlLXRhcmdldHMvZGVmYXVsdC9jcmF5cGUteDg2LXJvbWUubHVhIixbImZ1bGxOYW1lIl0 - 9ImNyYXlwZS14ODYtcm9tZSIsWyJsb2FkT3JkZXIiXT0xLHByb3BUPXt9LFsic3RhY2tEZX - B0aCJdPTEsWyJzdGF0dXMiXT0iYWN0aXZlIixbInVzZXJOYW1lIl09ImNyYXlwZS14ODYtc - m9tZSIsfSxlbnZ2YXI9e1siZm4iXT0iL2FwcHMvcHJvZC9sbW9kdWxlcy9zeXNfY29yZS9l - bnZ2YXIvMS4wIixbImZ1bGxOYW1lIl09ImVudnZhci8xLjAiLFsibG9hZE9yZGVyIl09NCx - wcm9wVD17fSxbInN0YWNrRGVwdGgiXT0w, - SSH_CONNECTION=192.58.153.6 55826 192.58.153.13 22, - mesh=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/com - pute_interpolation_weights/sorc/../../..//fix/rwps.oc_20km_300km.msh, - XAUTHLOCALHOSTNAME=dlogin03,LESSCLOSE=lessclose.sh %s %s, - XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB, - LMOD_FAMILY_CRAYPE_CPU=craype-x86-rome, - LMOD_MODULERCFILE=/apps/prod/lmodules/.modulerc.lua, - PE_PRODUCT_LIST=CRAYPE_X86_ROME,LMOD_IGNORE_CACHE=yes,LANG=en_US.UTF-8, - WINDOWMANAGER=xterm,LESS=-M -I -R,DISPLAY=localhost:16.0, - HISTTIMEFORMAT=%F %T,HOSTNAME=dlogin03, - LMOD_SYSTEM_DEFAULT_MODULES=envvar/1.0, - OLDPWD=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/c - ompute_interpolation_weights/ecf, - __LMOD_REF_COUNT__LMFILES_=/opt/cray/pe/lmod/modulefiles/craype-target - s/default/craype-x86-rome.lua:1;/opt/cray/modulefiles/libfabric/1.20.1: - 1;/opt/cray/pe/lmod/modulefiles/craype-targets/default/craype-network-o - fi.lua:1;/apps/prod/lmodules/sys_core/envvar/1.0:1, - CONFIG_SITE=/usr/share/site/x86_64-unknown-linux-gnu,CSHEDIT=emacs, - LMOD_CUSTOM_CNCM_INTEL_19_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX - =/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/apps - /ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4, - LMOD_CUSTOM_COMPILER_GNU_8_0_PREFIX=/apps/prod/lmodules/gcc/11.2.0:/ap - ps/prod/lmodules/gcc/10.2.0,GPG_TTY=/dev/pts/12, - LESS_ADVANCED_PREPROCESSOR=no,COLORTERM=1, - frc=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/sorc/../ - /PrepInputs/forcing,LMOD_FAMILY_CRAYPE_NETWORK=craype-network-ofi, - MACHTYPE=x86_64-suse-linux, - __LMOD_REF_COUNT_LD_LIBRARY_PATH=/opt/cray/lib64:1, - __LMOD_REF_COUNT_PKG_CONFIG_PATH=/opt/cray/lib64/pkgconfig:1, - LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_UCX_1_0_PREFIX=/apps/prod/lmodules/cce - /13.0.0:/apps/prod/lmodules/cce/12.0.3:/apps/prod/lmodules/cce/11.0.4, - tmp=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/sorc/../ - /PrepInputs/tmpfiles,SSH_AUTH_SOCK=/tmp/ssh-8YXrZyNz6e62/agent.4140983, - _ModuleTable004_=U0lPTi9tb2R1bGVmaWxlcyIsIi91c3Ivc2hhcmUvbW9kdWxlcy9tb - 2R1bGVmaWxlcyIsIi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvTGludXgiLCIvdXNyL3NoYXJl - L21vZHVsZWZpbGVzL0NvcmUiLCIvdXNyL3NoYXJlL2xtb2QvbG1vZC9tb2R1bGVmaWxlcy9 - Db3JlIiwiL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY29yZSIsIi9vcHQvY3JheS - 9wZS9sbW9kL21vZHVsZWZpbGVzL2NyYXlwZS10YXJnZXRzL2RlZmF1bHQiLCIvYXBwcy9wc - m9kL2xtb2R1bGVzL3N5c19jb3JlIiwiL2FwcHMvb3BzL3Byb2QvbmNvL21vZHVsZWZpbGVz - L2NvcmUiLCIvYXBwcy9wcm9kL2xtb2R1bGVzL2NvcmUiLCIvb3B0L2NyYXkvbW9kdWxlZml - sZXMiLH0sWyJzeXN0ZW1CYXNlTVBBVEgi,MINICOM=-c on, - QT_SYSTEM_DIR=/usr/share/desktop-data,OSTYPE=linux, - meshname=rwps.oc_20km_300km,USER=keston.smith, - MODULES_SET_SHELL_STARTUP=0,PAGER=less,MODULE_VERSION=3.2.10, - LMOD_CUSTOM_CNCM_GNU_8_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX=/a - pps/prod/lmodules/GCC_cray_mpich/10.2.0/cray-mpich/8.1.4, - LMOD_CUSTOM_CNCM_GNU_8_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX=/a - pps/prod/lmodules/GCC_cray_mpich/10.2.0/cray-mpich/8.1.4, - CRAY_CPU_TARGET=x86-rome, - LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PR - EFIX=/apps/prod/lmodules/CCE_cray_mpich/11.0.4/cray-mpich/8.1.4, - __LMOD_REF_COUNT_MODULEPATH=/opt/cray/pe/lmod/modulefiles/net/ofi/1.0: - 1;/opt/cray/pe/lmod/modulefiles/cpu/x86-rome/1.0:1;/usr/share/modules:1 - ;/usr/share/Modules/$MODULE_VERSION/modulefiles:1;/usr/share/modules/mo - dulefiles:1;/usr/share/modulefiles/Linux:1;/usr/share/modulefiles/Core: - 1;/usr/share/lmod/lmod/modulefiles/Core:1;/opt/cray/pe/lmod/modulefiles - /core:1;/opt/cray/pe/lmod/modulefiles/craype-targets/default:1;/apps/pr - od/lmodules/sys_core:1;/apps/ops/prod/nco/modulefiles/core:1;/apps/prod - /lmodules/core:1;/opt/cray/modulefiles:1, - COMINrrfs=/lfs/h1/ops/prod/com/rrfs/v1.0/rrfs./,MORE=-sl, - __LMOD_REF_COUNT_LOADEDMODULES=craype-x86-rome:1;libfabric/1.20.1:1;cr - aype-network-ofi:1;envvar/1.0:1, - PWD=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp - ute_interpolation_weights/sorc, - COMINrtofs=/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs./, - HOME=/u/keston.smith, - COMINnbm=/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.//grib2, - PELOCAL_PRGENV=true,SSH_AGENT_PID=4140994,HOST=dlogin03, - SSH_CLIENT=192.58.153.6 55826 22,LMOD_VERSION=8.3.1, - XNLSPATH=/usr/share/X11/nls,CRAY_LMOD_CPU=x86-rome/1.0, - LMOD_FAMILY_CRAYPE_CPU_VERSION=false, - BASH_ENV=/usr/share/lmod/lmod/init/bash,XDG_DATA_DIRS=/usr/share, - LMOD_CUSTOM_CNCM_INTEL_19_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX - =/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/apps - /ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4, - CRAY_LMOD_NET=ofi/1.0, - RWPSroot=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev - /compute_interpolation_weights/sorc/../../../, - COMINlocal=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/s - orc/..//PrepInputs/tmpfiles, - __LMOD_REF_COUNT_LMOD_CUSTOM_COMPILER_INTEL_19_0_PREFIX=/apps/ops/prod - /nco/models/modulefiles:1;/apps/prod/lmodules/intel/19.1.3.304:1;/apps/ - ops/prod/libs/modulefiles/compiler/intel/19.1.3.304:1;/apps/ops/prod/nc - o/modulefiles/compiler/intel/19.1.3.304:1,LIBGL_DEBUG=quiet, - LMOD_CUSTOM_COMPILER_INTEL_19_0_PREFIX=/apps/ops/prod/nco/models/modul - efiles:/apps/prod/lmodules/intel/19.1.3.304:/apps/ops/prod/libs/modulef - iles/compiler/intel/19.1.3.304:/apps/ops/prod/nco/modulefiles/compiler/ - intel/19.1.3.304,PROFILEREAD=true,LMOD_sys=Linux, - _ModuleTable001_=X01vZHVsZVRhYmxlXz17WyJNVHZlcnNpb24iXT0zLFsiY19yZWJ1a - WxkVGltZSJdPWZhbHNlLFsiY19zaG9ydFRpbWUiXT1mYWxzZSxkZXB0aFQ9e30sZmFtaWx5 - PXtbImNyYXlwZV9jcHUiXT0iY3JheXBlLXg4Ni1yb21lIixbImNyYXlwZV9uZXR3b3JrIl0 - 9ImNyYXlwZS1uZXR3b3JrLW9maSIsfSxtVD17WyJjcmF5cGUtbmV0d29yay1vZmkiXT17Wy - JmbiJdPSIvb3B0L2NyYXkvcGUvbG1vZC9tb2R1bGVmaWxlcy9jcmF5cGUtdGFyZ2V0cy9kZ - WZhdWx0L2NyYXlwZS1uZXR3b3JrLW9maS5sdWEiLFsiZnVsbE5hbWUiXT0iY3JheXBlLW5l - dHdvcmstb2ZpIixbImxvYWRPcmRlciJdPTMscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MSx - bInN0YXR1cyJdPSJhY3RpdmUiLFsidXNl, - LOADEDMODULES=craype-x86-rome:libfabric/1.20.1:craype-network-ofi:envv - ar/1.0,LMOD_AVAIL_STYLE=en_grouped:system,CRAYPE_NETWORK_TARGET=ofi, - _ModuleTable006_=b2R1bGVmaWxlcyIsfQ==, - __LMOD_REF_COUNT_MANPATH=/opt/cray/share/man:1;/usr/share/lmod/lmod/sh - are/man:1;/usr/share/man:1;/opt/c3/man:1;/opt/pbs/share/man:1, - _ModuleTable003_=LFsic3RhdHVzIl09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJdPSJlbnZ2Y - XIvMS4wIix9LGxpYmZhYnJpYz17WyJmbiJdPSIvb3B0L2NyYXkvbW9kdWxlZmlsZXMvbGli - ZmFicmljLzEuMjAuMSIsWyJmdWxsTmFtZSJdPSJsaWJmYWJyaWMvMS4yMC4xIixbImxvYWR - PcmRlciJdPTIscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MixbInN0YXR1cyJdPSJhY3Rpdm - UiLFsidXNlck5hbWUiXT0ibGliZmFicmljIix9LH0sbXBhdGhBPXsiL29wdC9jcmF5L3BlL - 2xtb2QvbW9kdWxlZmlsZXMvbmV0L29maS8xLjAiLCIvb3B0L2NyYXkvcGUvbG1vZC9tb2R1 - bGVmaWxlcy9jcHUveDg2LXJvbWUvMS4wIiwiL3Vzci9zaGFyZS9tb2R1bGVzIiwiL3Vzci9 - zaGFyZS9Nb2R1bGVzLyRNT0RVTEVfVkVS,LMOD_ROOT=/usr/share/lmod, - SSH_TTY=/dev/pts/12,FROM_HEADER=,MAIL=/var/spool/mail/keston.smith, - COMINstofs=/lfs/h1/ops/prod/com/stofs/v3.1/stofs_2d_glo., - LESSKEY=/etc/lesskey.bin,TERM=xterm-256color,SHELL=/bin/bash, - LMOD_ADMIN_FILE=/apps/prod/lmodules/admin.list, - LMOD_CUSTOM_COMPILER_GNU_8_0_UCX_1_0_PREFIX=/apps/prod/lmodules/gcc/11 - .2.0:/apps/prod/lmodules/gcc/10.2.0, - outdir=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/sorc/ - ..//PrepInputs,lmod_prefix_path=/usr/share, - LMOD_CUSTOM_COMPILER_CRAYCLANG_10_0_PREFIX=/apps/prod/lmodules/cce/13. - 0.0:/apps/prod/lmodules/cce/12.0.3:/apps/prod/lmodules/cce/11.0.4, - _ModuleTable_Sz_=6,LS_OPTIONS=-N --color=tty -T 0, - LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PR - EFIX=/apps/prod/lmodules/CCE_cray_mpich/11.0.4/cray-mpich/8.1.4, - TMOUT=1800,PYTHONSTARTUP=/etc/pythonstart, - RWPSfix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPS,SHLVL=3, - LANGUAGE=en_US.UTF-8,G_FILENAME_ENCODING=@locale\,UTF-8\,ISO-8859-15\, - CP1252, - LMOD_CUSTOM_COMPILER_INTEL_19_0_UCX_1_0_PREFIX=/apps/prod/lmodules/int - el/19.1.3.304:/apps/ops/prod/libs/modulefiles/compiler/intel/19.1.3.304 - :/apps/ops/prod/nco/modulefiles/compiler/intel/19.1.3.304, - HPC_OPT=/apps/ops/prod/libs, - MANPATH=/opt/cray/share/man:/usr/share/lmod/lmod/share/man:/usr/share/ - man:/opt/c3/man:/opt/pbs/share/man,OSCAR_HOME=/opt/oscar, - fix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp - ute_interpolation_weights/sorc/../../..//fix, - MODULEPATH=/opt/cray/pe/lmod/modulefiles/net/ofi/1.0:/opt/cray/pe/lmod - /modulefiles/cpu/x86-rome/1.0:/usr/share/modules:/usr/share/Modules/$MO - DULE_VERSION/modulefiles:/usr/share/modules/modulefiles:/usr/share/modu - lefiles/Linux:/usr/share/modulefiles/Core:/usr/share/lmod/lmod/modulefi - les/Core:/opt/cray/pe/lmod/modulefiles/core:/opt/cray/pe/lmod/modulefil - es/craype-targets/default:/apps/prod/lmodules/sys_core:/apps/ops/prod/n - co/modulefiles/core:/apps/prod/lmodules/core:/opt/cray/modulefiles, - LOGNAME=keston.smith,MODULE_VERSION_STACK=3.2.10, - MODULEPATH_ROOT=/usr/share/modulefiles, - LMOD_PACKAGE_PATH=/apps/prod/lmodules,XDG_CONFIG_DIRS=/etc/xdg, - PATH=/opt/cray/bin:/u/keston.smith/.local/bin:/usr/local/bin:/usr/bin: - /bin:/opt/c3/bin:/opt/pbs/bin:/sbin, - __LMOD_REF_COUNT_PE_PRODUCT_LIST=CRAYPE_X86_ROME:1, - _LMFILES_=/opt/cray/pe/lmod/modulefiles/craype-targets/default/craype- - x86-rome.lua:/opt/cray/modulefiles/libfabric/1.20.1:/opt/cray/pe/lmod/m - odulefiles/craype-targets/default/craype-network-ofi.lua:/apps/prod/lmo - dules/sys_core/envvar/1.0,MODULESHOME=/usr/share/lmod/lmod, - PKG_CONFIG_PATH=/opt/cray/lib64/pkgconfig, - LMOD_SETTARG_FULL_SUPPORT=no,INFOPATH=:/apps/docs/info, - G_BROKEN_FILENAMES=1,HISTSIZE=10000,LMOD_PKG=/usr/share/lmod/lmod, - CPU=x86_64, - _ModuleTable005_=XT0iL3Vzci9zaGFyZS9tb2R1bGVzOi91c3Ivc2hhcmUvTW9kdWxlc - y8kTU9EVUxFX1ZFUlNJT04vbW9kdWxlZmlsZXM6L3Vzci9zaGFyZS9tb2R1bGVzL21vZHVs - ZWZpbGVzOi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvTGludXg6L3Vzci9zaGFyZS9tb2R1bGV - maWxlcy9Db3JlOi91c3Ivc2hhcmUvbG1vZC9sbW9kL21vZHVsZWZpbGVzL0NvcmU6L29wdC - 9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY29yZTovb3B0L2NyYXkvcGUvbG1vZC9tb2R1b - GVmaWxlcy9jcmF5cGUtdGFyZ2V0cy9kZWZhdWx0Oi9hcHBzL3Byb2QvbG1vZHVsZXMvc3lz - X2NvcmU6L2FwcHMvb3BzL3Byb2QvbmNvL21vZHVsZWZpbGVzL2NvcmU6L2FwcHMvcHJvZC9 - sbW9kdWxlcy9jb3JlOi9vcHQvY3JheS9t, - LMOD_CMD=/usr/share/lmod/lmod/libexec/lmod,CVS_RSH=ssh, - LESSOPEN=lessopen.sh %s,LMOD_DIR=/usr/share/lmod/lmod/libexec, - LC_TIME=C.UTF-8, - BASH_FUNC_module%%=() { eval $($LMOD_CMD bash \"$@\") && eval $(${LMO - D_SETTARG_CMD:-:} -s sh) - euser = keston.smith - egroup = emc - hashname = 136818048.dbqs01 - queue_rank = 1787578728965575 - queue_type = E - comment = Job run at Mon Aug 24 at 13:38 on (nid001112:ncpus=16:mem=2684354 - 56kb) - etime = Mon Aug 24 13:38:48 2026 - umask = 22 - run_count = 6 - eligible_time = 00:00:08 - accrue_type = 3 - Submit_arguments = -V /lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/ - RWPS/dev/compute_interpolation_weights/sorc/../../..//dev/compute_inter - polation_weights/ecf/compute_interpolation_weights.ecf - project = NWPS-DEV - run_version = 1 - Submit_Host = dlogin03.dogwood.wcoss2.ncep.noaa.gov - server_instance_id = dbqs01.dogwood.wcoss2.ncep.noaa.gov:15001 - - ------------------------------------------------------------------- -Job 136818048.dbqs01 - PBS tracejob output (for parent mom node only): - -Job: 136818048.dbqs01 - -08/24/2026 13:38:50 M update_job_usage: CPU usage: 0.000 secs -08/24/2026 13:38:50 M update_job_usage: cpupercent initialized to zero -08/24/2026 13:38:50 M update_job_usage: Memory usage: mem=0b -08/24/2026 13:38:54 M Started, pid = 1552072 -08/24/2026 13:40:21 M update_job_usage: CPU usage: 101.000 secs -08/24/2026 13:40:21 M update_job_usage: 136818048.dbqs01 measured interval cpupercent 110 increased job cpupercent to 110 -08/24/2026 13:40:21 M update_job_usage: Memory usage: mem=2176660kb -08/24/2026 13:42:22 M update_job_usage: CPU usage: 228.000 secs -08/24/2026 13:42:22 M update_job_usage: Memory usage: mem=4368980kb -08/24/2026 13:44:24 M update_job_usage: CPU usage: 349.000 secs -08/24/2026 13:44:24 M update_job_usage: Memory usage: mem=11424744kb -08/24/2026 13:46:25 M update_job_usage: CPU usage: 474.000 secs -08/24/2026 13:46:25 M update_job_usage: Memory usage: mem=11424744kb -08/24/2026 13:48:26 M update_job_usage: CPU usage: 594.000 secs -08/24/2026 13:48:26 M update_job_usage: Memory usage: mem=12687432kb -08/24/2026 13:50:27 M update_job_usage: CPU usage: 627.000 secs -08/24/2026 13:50:27 M update_job_usage: Memory usage: mem=12832188kb -08/24/2026 13:51:56 M task 00000001 terminated -08/24/2026 13:51:56 M Terminated -08/24/2026 13:51:56 M task 00000001 cput=00:10:34 -08/24/2026 13:51:56 M kill_job -08/24/2026 13:51:56 M nid001112 cput=00:10:27 mem=12832188kb -08/24/2026 13:51:56 M update_job_usage: CPU usage: 632.000 secs -08/24/2026 13:51:56 M update_job_usage: Memory usage: mem=12832188kb - ------------------------------------------------------------------- -To see full PBS log data, run: /sfs/admin/scripts/tracejob.sh 136818048.dbqs01 - -================================================================== -END - DEBUG INFO -================================================================== - -Job 136818048.dbqs01 - Epilogue DEBUG complete. DEBUG Execution time: 6 seconds -Job 136818048.dbqs01 - Epilogue complete. Execution time: 8 seconds -##### Job 136818048.dbqs01 - PBS Job Script: -(Note: Duplicate #PBS entries are a function how PBS interprets and caches the original job script.) - -#!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=04:00:00 -##PBS -l select=1:ncpus=8:mem=128GB -#PBS -l select=1:ncpus=16:mem=256GB -###PBS -l select=1:ncpus=1:mem=8G -#PBS -l place=excl -#PBS -l debug=true - -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - -pip list -v - -cd $RWPSroot/ush/preprocess - -SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" -date="20260730" -cycl="00" -Nprocs=16 - - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - -rrfs_hi=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.hi.nc -rrfs_pr=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.pr.nc -rrfs_ak=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.ak.nc -rrfs_na=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.na.nc -rrfs_conus=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.conus.nc - -out="../../fix" - -rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" -rrfsDst="$out/DistToBndy.$meshname.rrfs" - -#no extrapolation with rrfs forecasts -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_pr $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 > GenWhts.rrfs.pr.out -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_ak $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 > GenWhts.rrfs.ak.out -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_na $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 > GenWhts.rrfs.na.out -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_conus $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out - -nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc -nbmIntrp="$out/InterpolationWeights.$meshname.nbm" -nbmDst="$out/DistToBndy.$meshname.nbm" -#extrapolate nbm oc wind to all points -python ./compute_gridded_to_rwps_interp_weights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out - -nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc -#do not extrapolate for NBM .ak. domain -python ./compute_gridded_to_rwps_interp_weights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out - -rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc -rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" -rtofsDst="$out/DistToBndy.$meshname.rtofs" - -#extrapolate rtofs .glo. for full ice coverage - -python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out - - -rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc -#do not extrapolate rtofs .glo. currents -python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.current.nc $rtofsDst.current.nc -1 > GenWhts.rtofs.current.out - - -stofs_glo="$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" - -## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs - -## Now run parallel job script - -qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS - -wait - -#combine text file output of parallel jobs -cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt - -# convert output weights to netcdf file -python ConvertWeights2Netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 -cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.v2.nc -cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.v2.nc - -rm -rf STOFSInterpWeights.$meshname - -#compute stofs weights for current(v3) stofs mesh -stofs_glo="$SID/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc" - -## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs - -## Now run parallel job script - -qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS - -wait - -#combine text file output of parallel jobs -cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt - -# convert output weights to netcdf file -python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 -cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc -cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc - - - - - -##### End of job script ------------------------------------------------------------------- - diff --git a/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136825597 b/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136825597 deleted file mode 100644 index 46f8fc5..0000000 --- a/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136825597 +++ /dev/null @@ -1,969 +0,0 @@ -PBS: Running prologue on parent mom node: nid001957... -Job 136825597.dbqs01 nodelist: nid001957 -Job 136825597.dbqs01 - Prologue complete. Execution time: 4 seconds -Agent pid 2040048 -Identity added: /u/keston.smith/.ssh/id_ed25519 (keston.smith@noaa.gov) -/u/keston.smith/.bashrc: line 46: alias: eval "$(ssh-agent -s)"; ssh-add ~/.ssh/id_ed25519: not found -Resetting modules to system default. Reseting $MODULEPATH back to system default. All extra directories will be removed from $MODULEPATH. -Package Version Location Installer -------------------------- ----------- ---------------------------------------------------------------------------------- --------- -Cartopy 0.24.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -certifi 2025.1.31 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -cftime 1.6.4.post1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -contourpy 1.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -cycler 0.12.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -esmpy 8.6.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -fonttools 4.55.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -geographiclib 2.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -geopy 2.4.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -Jinja2 3.1.5 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -kiwisolver 1.4.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -MarkupSafe 3.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -matplotlib 3.10.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -netCDF4 1.7.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -numpy 2.2.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -packaging 24.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pandas 2.2.3 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pillow 11.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pip 25.0.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pyparsing 3.2.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pyproj 3.7.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pyshp 2.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -python-dateutil 2.9.0.post0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pytz 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -PyYAML 6.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -scipy 1.15.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -setuptools 75.8.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -setuptools-git-versioning 2.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -shapely 2.0.7 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -six 1.17.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -tzdata 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -xarray 2025.1.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in - iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights - regrid = esmpy.Regrid( - ^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ - self._routehandle = ESMP_FieldRegridStoreFile( - ^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile - raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ -ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in - iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights - regrid = esmpy.Regrid( - ^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ - self._routehandle = ESMP_FieldRegridStoreFile( - ^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile - raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ -ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in - iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights - regrid = esmpy.Regrid( - ^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ - self._routehandle = ESMP_FieldRegridStoreFile( - ^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile - raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ -ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in - iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights - regrid = esmpy.Regrid( - ^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ - self._routehandle = ESMP_FieldRegridStoreFile( - ^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile - raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ -ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in - iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights - regrid = esmpy.Regrid( - ^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ - self._routehandle = ESMP_FieldRegridStoreFile( - ^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile - raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ -ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in - iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights - regrid = esmpy.Regrid( - ^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ - self._routehandle = ESMP_FieldRegridStoreFile( - ^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile - raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ -ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in - iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights - regrid = esmpy.Regrid( - ^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ - self._routehandle = ESMP_FieldRegridStoreFile( - ^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile - raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ -ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in - iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights - regrid = esmpy.Regrid( - ^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ - self._routehandle = ESMP_FieldRegridStoreFile( - ^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile - raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ -ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in - iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights - regrid = esmpy.Regrid( - ^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ - self._routehandle = ESMP_FieldRegridStoreFile( - ^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile - raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ -ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). -directory STOFSInterpWeights.rwps.oc_1500m_30km is alread empty -Made parallel jobcards to create interpolation weights with 16 processes. Next step: -sbatch jobcardcompute_unstr_to_rwps_interp_weightsSLURM -136827246[].dbqs01 -mesh file=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/sorc/../../..//fix/rwps.oc_1500m_30km.msh -nn = 675917 -number of nodes read: 675917 -ne=1299317 -includes boundary nodes -number of open boundary nodes read: 1149 -number of elements read: 1298168 -n=1964475 -n_s=1964475 -directory STOFSInterpWeights.rwps.oc_1500m_30km is alread empty -Made parallel jobcards to create interpolation weights with 16 processes. Next step: -sbatch jobcardcompute_unstr_to_rwps_interp_weightsSLURM -136829528[].dbqs01 -mesh file=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/sorc/../../..//fix/rwps.oc_1500m_30km.msh -nn = 675917 -number of nodes read: 675917 -ne=1299317 -includes boundary nodes -number of open boundary nodes read: 1149 -number of elements read: 1298168 -n=1964475 -n_s=1964475 -PBS: Running epilogue on parent mom node: nid001957... -================================================================== -BEGIN - DEBUG INFO -================================================================== -Job 136825597.dbqs01 - Post Job Mem Usage: -nid001957: 2026-08-24.47 1 =========================================== -nid001957: 2026-08-24.47 2 #### Node Memory Usage for nid001957 #### -nid001957: 2026-08-24.47 3 ------------------ -nid001957: 2026-08-24.47 4 Mem: total:526983516 used:16299488 free:511749592 shared:657020 cache:1289304 avail:510684028 -nid001957: 2026-08-24.47 5 4.0K /dev/shm -nid001957: 2026-08-24.47 6 40K /tmp -nid001957: 2026-08-24.47 7 =========================================== -nid001957: 2026-08-24.07 1 =========================================== -nid001957: 2026-08-24.07 2 #### Node Memory Usage for nid001957 #### -nid001957: 2026-08-24.07 3 ------------------ -nid001957: 2026-08-24.07 4 Mem: total:526983516 used:17617160 free:509252636 shared:657008 cache:3616752 avail:509366356 -nid001957: 2026-08-24.07 5 4.0K /dev/shm -nid001957: 2026-08-24.07 6 40K /tmp -nid001957: 2026-08-24.07 7 =========================================== - ------------------------------------------------------------------- ------------------------------------------------------------------- -Job 136825597.dbqs01 - Post Job Mem Usage Profile: -2026-08-24A--:--:--.------+--:-- nid001957 #### nid001957 - Job 136825597.dbqs01 NUMA Node Memory Allocation and Fragmentation Reports -Starting Fragmentation Report for nid001957 -Node Order9 Order10 Score MB_Free %Free State -0 8187 3711 15609 31218 49 MARG -1 5648 7856 21360 42720 66 OK -2 3918 9666 23250 46500 72 OK -3 2885 11901 26687 53374 82 OK -4 3163 11666 26495 52990 82 OK -5 1612 13479 28570 57140 88 OK -6 1539 13494 28527 57054 88 OK -7 2045 13085 28215 56430 87 OK - -** nid001957 : node0_score=15609 node0_state=MARG uptime=4568226s Overall=MARG ** -Ending Fragmentation Report for nid001957 -Node Order9 Order10 Score MB_Free %Free State -0 8184 3715 15614 31228 49 MARG -1 5662 7871 21404 42808 66 OK -2 3978 9691 23360 46720 72 OK -3 2877 11929 26735 53470 82 OK -4 3156 11672 26500 53000 82 OK -5 1606 13489 28584 57168 88 OK -6 1514 13552 28618 57236 88 OK -7 1821 13313 28447 56894 88 OK - -** nid001957 : node0_score=15614 node0_state=MARG uptime=4570706s Overall=MARG ** -2026-08-24A--:--:--.------+--:-- nid001957 #### nid001957 - Job 136825597.dbqs01 VMSTATS Memory Report -**Only Printing Significant Findings - TEST CODE - Results are NOT positive indication of a problem. ** -nid001957 [!] Inactive file cache ballooned: 553217 (threshold: 100000) - ------------------------------------------------------------------- -Job 136825597.dbqs01 - /var/log/messages for job duration: -2026-08-24A--:--:--.------+--:-- nid001957 #### nid001957 - Job 136825597.dbqs01 Runtime Data from /var/log/messages -nid001957: nid001957 #### nid001957 - Job 136825597.dbqs01 Runtime Data from /var/log/messages -nid001957: 2026-08-24T14:45:46.904058+00:00 nid001957 prologue: MARK: Job 136825597.dbqs01 Start -nid001957: 2026-08-24T14:45:46.915397+00:00 nid001957 prologue: Job 136825597.dbqs01 nodelist: nid001957 -nid001957: 2026-08-24T14:45:46.917037+00:00 nid001957 prologue: Job 136825597.dbqs01 - Recording pre-execution stats and counters... -nid001957: 2026-08-24T14:45:46.948890+00:00 nid001957 prologue: Job 136825597.dbqs01 - Killing any stray user processes... -nid001957: 2026-08-24T14:45:47.032838+00:00 nid001957 prologue: Job 136825597.dbqs01 - Clearing /tmp... -nid001957: 2026-08-24T14:45:47.049943+00:00 nid001957 prologue: Job 136825597.dbqs01 - Verifying key post-boot workarounds with warchk... -nid001957: 2026-08-24T14:45:47.080200+00:00 nid001957 WARCHK: root : /sfs/admin/scripts/warchk --batch -nid001957: 2026-08-24T14:45:47.289295+00:00 nid001957 prologue: Job 136825597.dbqs01 - Recording pre-job memory usage... -nid001957: 2026-08-24T14:45:47.370177+00:00 nid001957 prologue: Job 136825597.dbqs01 - FRAG_STATE: ** nid001957 : node0_score=15609 node0_state=MARG uptime=4568226s Overall=MARG ** -nid001957: 2026-08-24T14:45:47.371619+00:00 nid001957 prologue: Job 136825597.dbqs01 - Recording pre-job HSN counters... -nid001957: 2026-08-24T14:45:47.493171+00:00 nid001957 prologue: Job 136825597.dbqs01 - Recording pre-job Lustre counters... -nid001957: 2026-08-24T14:45:48.481933+00:00 nid001957 prologue: Job 136825597.dbqs01 - Recording initial NFS client statistics... -nid001957: 2026-08-24T14:45:48.492518+00:00 nid001957 prologue: Job 136825597.dbqs01 - Saving a copy of the job script... -nid001957: 2026-08-24T14:45:48.499865+00:00 nid001957 prologue: Job 136825597.dbqs01 - Checking existing ASLR settings... -nid001957: 2026-08-24T14:45:48.505302+00:00 nid001957 prologue: Job 136825597.dbqs01 - Checking palsd open file count... -nid001957: 2026-08-24T14:45:48.597627+00:00 nid001957 PBS_CMD: root : /opt/pbs/bin/qstat -Bf -nid001957: 2026-08-24T14:45:49.612236+00:00 nid001957 prologue: Job 136825597.dbqs01 - Checking one-shot enabled: False -nid001957: 2026-08-24T14:45:49.613350+00:00 nid001957 prologue: Job 136825597.dbqs01 - Enabling turboboost... -nid001957: 2026-08-24T14:45:49.616245+00:00 nid001957 prologue: Job 136825597.dbqs01 - Checking warchk results... -nid001957: 2026-08-24T14:45:49.619278+00:00 nid001957 prologue: Job 136825597.dbqs01 - Warchk Complete -nid001957: 2026-08-24T14:45:49.622016+00:00 nid001957 prologue: Job 136825597.dbqs01 - Prologue complete. Execution time: 4 seconds -nid001957: 2026-08-24T14:47:55.378970+00:00 nid001957 kernel: [4568119.490559][T13872] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001957: 2026-08-24T14:51:16.162789+00:00 nid001957 systemd[1]: etc_update.service: Deactivated successfully. -nid001957: 2026-08-24T14:52:55.410966+00:00 nid001957 kernel: [4568419.506851][T13872] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001957: 2026-08-24T14:55:30.279242+00:00 nid001957 kernel: [4568574.346730][T13882] LNet: 13882:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds -nid001957: 2026-08-24T14:55:30.279259+00:00 nid001957 kernel: [4568574.367865][T13882] LNet: 13882:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 1 previous similar message -nid001957: 2026-08-24T14:57:32.207383+00:00 nid001957 PBS_CMD: keston.smith : /opt/pbs/bin/qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS -nid001957: 2026-08-24T14:57:55.442969+00:00 nid001957 kernel: [4568719.523110][T13872] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001957: 2026-08-24T15:00:06.138528+00:00 nid001957 systemd[1]: Started Timeline of Snapper Snapshots. -nid001957: 2026-08-24T15:00:06.188843+00:00 nid001957 dbus-daemon[4828]: [system] Activating via systemd: service name='org.opensuse.Snapper' unit='snapperd.service' requested by ':1.33751' (uid=0 pid=2042784 comm="/usr/lib/snapper/systemd-helper --timeline ") -nid001957: 2026-08-24T15:00:06.192515+00:00 nid001957 systemd[1]: Starting DBus interface for snapper... -nid001957: 2026-08-24T15:00:06.200058+00:00 nid001957 dbus-daemon[4828]: [system] Successfully activated service 'org.opensuse.Snapper' -nid001957: 2026-08-24T15:00:06.200208+00:00 nid001957 systemd[1]: Started DBus interface for snapper. -nid001957: 2026-08-24T15:00:06.204540+00:00 nid001957 systemd[1]: snapper-timeline.service: Deactivated successfully. -nid001957: 2026-08-24T15:01:06.266611+00:00 nid001957 systemd[1]: snapperd.service: Deactivated successfully. -nid001957: 2026-08-24T15:02:42.155196+00:00 nid001957 systemd[1]: etc_update.service: Deactivated successfully. -nid001957: 2026-08-24T15:02:55.474967+00:00 nid001957 kernel: [4569019.539342][T13872] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001957: 2026-08-24T15:07:55.510962+00:00 nid001957 kernel: [4569319.555604][T13872] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001957: 2026-08-24T15:10:29.288372+00:00 nid001957 kernel: [4569473.307559][T13882] LNet: 13882:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 0 seconds -nid001957: 2026-08-24T15:10:29.288389+00:00 nid001957 kernel: [4569473.330076][T13882] LNet: 13882:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 1 previous similar message -nid001957: 2026-08-24T15:12:18.796407+00:00 nid001957 PBS_CMD: keston.smith : /opt/pbs/bin/qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS -nid001957: 2026-08-24T15:12:55.538960+00:00 nid001957 kernel: [4569619.571856][T13872] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001957: 2026-08-24T15:13:29.886366+00:00 nid001957 chronyd[1387427]: Source 45.79.82.45 replaced with 170.187.147.56 (2.suse.pool.ntp.org) -nid001957: 2026-08-24T15:14:46.156924+00:00 nid001957 systemd[1]: etc_update.service: Deactivated successfully. -nid001957: 2026-08-24T15:15:08.730019+00:00 nid001957 systemd[1]: session-15546.scope: Deactivated successfully. -nid001957: 2026-08-24T15:17:55.570960+00:00 nid001957 kernel: [4569919.588171][T13872] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001957: 2026-08-24T15:20:46.155390+00:00 nid001957 systemd[1]: etc_update.service: Deactivated successfully. -nid001957: 2026-08-24T15:22:55.602960+00:00 nid001957 kernel: [4570219.604458][T13872] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001957: 2026-08-24T15:25:30.279891+00:00 nid001957 kernel: [4570374.252367][T13882] LNet: 13882:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds -nid001957: 2026-08-24T15:25:30.279906+00:00 nid001957 kernel: [4570374.273776][T13882] LNet: 13882:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 1 previous similar message -nid001957: 2026-08-24T15:27:06.853772+00:00 nid001957 epilogue: Job 136825597.dbqs01 complete, running post-job actions. -nid001957: 2026-08-24T15:27:06.870540+00:00 nid001957 epilogue: MARK: Job 136825597.dbqs01 Complete. - ------------------------------------------------------------------- -Job 136825597.dbqs01 - dmesg output for job duration: -2026-08-24A--:--:--.------+--:-- nid001957 #### nid001957 - Job 136825597.dbqs01 Runtime Data from dmesg -nid001957: nid001957 #### nid001957 - Job 136825597.dbqs01 Runtime Data from dmesg -nid001957: [Mon Aug 24 14:41:51 2026] MARK: Job 136825597.dbqs01 Start -nid001957: [Mon Aug 24 14:43:59 2026] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001957: [Mon Aug 24 14:48:59 2026] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001957: [Mon Aug 24 14:51:34 2026] LNet: 13882:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds -nid001957: [Mon Aug 24 14:51:34 2026] LNet: 13882:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 1 previous similar message -nid001957: [Mon Aug 24 14:53:59 2026] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001957: [Mon Aug 24 14:58:59 2026] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001957: [Mon Aug 24 15:03:59 2026] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001957: [Mon Aug 24 15:06:33 2026] LNet: 13882:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 0 seconds -nid001957: [Mon Aug 24 15:06:33 2026] LNet: 13882:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 1 previous similar message -nid001957: [Mon Aug 24 15:08:59 2026] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001957: [Mon Aug 24 15:13:59 2026] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001957: [Mon Aug 24 15:18:59 2026] LNet: 2 peer NIs in recovery (showing 2): 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001957: [Mon Aug 24 15:21:34 2026] LNet: 13882:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds -nid001957: [Mon Aug 24 15:21:34 2026] LNet: 13882:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 1 previous similar message -nid001957: [Mon Aug 24 15:23:10 2026] MARK: Job 136825597.dbqs01 Complete. - ------------------------------------------------------------------- -Job 136825597.dbqs01 - Pre/Post job diff on HSN (MLX) Counters: -2026-08-24A--:--:--.------+--:-- nid001957 #### nid001957 - Job 136825597.dbqs01 HSN0 MLX Counter Post-Job Difference -nid001957: multicast:: 5543460 | multicast:: 5543982 | Diff: 522 -nid001957: rx_bytes:: 225229507347 | rx_bytes:: 225230520724 | Diff: 1013377 -nid001957: rx_packets:: 43201761 | rx_packets:: 43203555 | Diff: 1794 -nid001957: tx_bytes:: 162361679831 | tx_bytes:: 162362127587 | Diff: 447756 -nid001957: tx_packets:: 33347353 | tx_packets:: 33348948 | Diff: 1595 -nid001957: port_rcv_data:: 381496422377642 | port_rcv_data:: 381497059824666 | Diff: 637447024 -nid001957: port_rcv_packets:: 615315401470 | port_rcv_packets:: 615316199689 | Diff: 798219 -nid001957: port_xmit_data:: 375556521845260 | port_xmit_data:: 375557712852364 | Diff: 1191007104 -nid001957: port_xmit_packets:: 612025632750 | port_xmit_packets:: 612026930298 | Diff: 1297548 -nid001957: unicast_rcv_packets:: 615315401470 | unicast_rcv_packets:: 615316199689 | Diff: 798219 -nid001957: unicast_xmit_packets:: 612025632750 | unicast_xmit_packets:: 612026930298 | Diff: 1297548 -nid001957: resp_cqe_error:: 55419 | resp_cqe_error:: 55509 | Diff: 90 -nid001957: resp_cqe_flush_error:: 52386 | resp_cqe_flush_error:: 52471 | Diff: 85 -nid001957: rx_write_requests:: 149318934 | rx_write_requests:: 149330341 | Diff: 11407 - ------------------------------------------------------------------- -Job 136825597.dbqs01 - Pre/Post job diff for Lustre Stats: -2026-08-24A--:--:--.------+--:-- nid001957 #### nid001957 - Job 136825597.dbqs01 Lustre Counters Post-Job Difference -nid001957: ### LustreStats: Multi-value diffs correspond to [samples min max total sum_of_squares] ### -nid001957: /lfs/h1 vah1-ffff9e132359e000 : -nid001957: h1: snapshot_time: Diffs: [ 2480] secs -nid001957: h1: elapsed_time: Diffs: [ 2480] secs -nid001957: h1: ioctl: Diffs: [ 2] reqs -nid001957: h1: getattr: Diffs: [ 15 0 0 72 1056] Avg_usec : 4.80 -nid001957: h1: inode_permission: Diffs: [ 2 0 0 3 5] Avg_usec : 1.50 -nid001957: h1: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 -nid001957: ---------------- -nid001957: /lfs/h2 vah2-ffff9e12d9661800 : -nid001957: h2: snapshot_time: Diffs: [ 2480] secs -nid001957: h2: elapsed_time: Diffs: [ 2480] secs -nid001957: h2: read_bytes: Diffs: [ 121046 0 0 3006327104 56782317572138634] Avg_bytes: 24836.23 -nid001957: h2: write_bytes: Diffs: [ 1436 0 0 4705304939 70228028486733085] Avg_bytes: 3276674.74 -nid001957: h2: read: Diffs: [ 120988 0 0 12625919 480067214399] Avg_usec : 104.35 -nid001957: h2: write: Diffs: [ 1662 0 0 3654471 120817045273] Avg_usec : 2198.83 -nid001957: h2: ioctl: Diffs: [ 740] reqs -nid001957: h2: open: Diffs: [ 330 0 0 36186 15716046] Avg_usec : 109.65 -nid001957: h2: close: Diffs: [ 331 0 0 27278 4256994] Avg_usec : 82.41 -nid001957: h2: seek: Diffs: [ 4031 0 0 522 18092] Avg_usec : .12 -nid001957: h2: readdir: Diffs: [ 70 0 0 8933 4100057] Avg_usec : 127.61 -nid001957: h2: truncate: Diffs: [ 72 0 0 1589339 621766699255] Avg_usec : 22074.15 -nid001957: h2: flock: Diffs: [ 52 0 0 3998 664446] Avg_usec : 76.88 -nid001957: h2: getattr: Diffs: [ 2876 0 0 99032 32823388] Avg_usec : 34.43 -nid001957: h2: unlink: Diffs: [ 203 0 0 82327 36910333] Avg_usec : 405.55 -nid001957: h2: mkdir: Diffs: [ 2 0 0 995 666125] Avg_usec : 497.50 -nid001957: h2: rmdir: Diffs: [ 2 0 0 365 66833] Avg_usec : 182.50 -nid001957: h2: mknod: Diffs: [ 19 0 0 8070 4532410] Avg_usec : 424.73 -nid001957: h2: rename: Diffs: [ 2 0 0 909 422801] Avg_usec : 454.50 -nid001957: h2: statfs: Diffs: [ 1 0 0 110 12100] Avg_usec : 110.00 -nid001957: h2: getxattr: Diffs: [ 134 0 0 4831 700089] Avg_usec : 36.05 -nid001957: h2: getxattr_hits: Diffs: [ 93] reqs -nid001957: h2: inode_permission: Diffs: [ 20680 0 0 9171 52433] Avg_usec : .44 -nid001957: h2: opencount: Diffs: [ 332 0 0 954 5646] Avg_reqs : 2.87 -nid001957: ---------------- -nid001957: /lfs/f1 vaf1-ffff9e12ee70c800 : -nid001957: f1: snapshot_time: Diffs: [ 2480] secs -nid001957: f1: elapsed_time: Diffs: [ 2479] secs -nid001957: f1: ioctl: Diffs: [ 2] reqs -nid001957: f1: getattr: Diffs: [ 11 0 0 35 259] Avg_usec : 3.18 -nid001957: f1: inode_permission: Diffs: [ 2 0 0 2 2] Avg_usec : 1.00 -nid001957: f1: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 -nid001957: ---------------- -nid001957: /lfs/f2 vaf2-ffff9e03a06ba000 : -nid001957: f2: snapshot_time: Diffs: [ 2480] secs -nid001957: f2: elapsed_time: Diffs: [ 2479] secs -nid001957: f2: read_bytes: Diffs: [ 20 0 0 118636 1681384642] Avg_bytes: 5931.80 -nid001957: f2: write_bytes: Diffs: [ 18 0 0 29367 99300731] Avg_bytes: 1631.50 -nid001957: f2: read: Diffs: [ 20 0 0 341 12099] Avg_usec : 17.05 -nid001957: f2: write: Diffs: [ 482 0 0 10590 7572702] Avg_usec : 21.97 -nid001957: f2: ioctl: Diffs: [ 14] reqs -nid001957: f2: open: Diffs: [ 23 0 0 710 116026] Avg_usec : 30.86 -nid001957: f2: close: Diffs: [ 23 0 0 2124 601290] Avg_usec : 92.34 -nid001957: f2: seek: Diffs: [ 21 0 0 2 4] Avg_usec : .09 -nid001957: f2: readdir: Diffs: [ 2 0 0 365 133225] Avg_usec : 182.50 -nid001957: f2: getattr: Diffs: [ 38 0 0 6484 3950224] Avg_usec : 170.63 -nid001957: f2: mknod: Diffs: [ 11 0 0 3235 1128625] Avg_usec : 294.09 -nid001957: f2: getxattr: Diffs: [ 11 0 0 1748 356776] Avg_usec : 158.90 -nid001957: f2: inode_permission: Diffs: [ 138 0 0 392 9748] Avg_usec : 2.84 -nid001957: f2: opencount: Diffs: [ 25 0 0 56 230] Avg_reqs : 2.24 -nid001957: ---------------- -nid001957: /lfs/h3 vah3-ffff9e03a06bf800 : -nid001957: h3: snapshot_time: Diffs: [ 2480] secs -nid001957: h3: elapsed_time: Diffs: [ 2480] secs -nid001957: h3: ioctl: Diffs: [ 2] reqs -nid001957: h3: getattr: Diffs: [ 7 0 0 27 183] Avg_usec : 3.85 -nid001957: h3: inode_permission: Diffs: [ 2 0 0 2 2] Avg_usec : 1.00 -nid001957: h3: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 -nid001957: ---------------- -nid001957: /apps vaf2-ffff9e12ee70f000 : -nid001957: apps: snapshot_time: Diffs: [ 2480] secs -nid001957: apps: elapsed_time: Diffs: [ 2480] secs -nid001957: apps: read_bytes: Diffs: [ 15686 0 0 282748004 26050514147340] Avg_bytes: 18025.50 -nid001957: apps: read: Diffs: [ 15686 0 0 686320 196622482] Avg_usec : 43.75 -nid001957: apps: ioctl: Diffs: [ 11444] reqs -nid001957: apps: open: Diffs: [ 18339 0 0 840067 154539613] Avg_usec : 45.80 -nid001957: apps: close: Diffs: [ 18339 0 0 658434 135932008] Avg_usec : 35.90 -nid001957: apps: mmap: Diffs: [ 8635 0 0 50588 762074] Avg_usec : 5.85 -nid001957: apps: page_fault: Diffs: [ 180587 0 0 11556 42634] Avg_usec : .06 -nid001957: apps: seek: Diffs: [ 22732 0 0 12 22] Avg_usec : 0 -nid001957: apps: readdir: Diffs: [ 6762 0 0 435313 378997455] Avg_usec : 64.37 -nid001957: apps: getattr: Diffs: [ 81960 0 0 1279934 173535710] Avg_usec : 15.61 -nid001957: apps: getxattr: Diffs: [ 14 0 0 149 8047] Avg_usec : 10.64 -nid001957: apps: getxattr_hits: Diffs: [ 13] reqs -nid001957: apps: inode_permission: Diffs: [ 1127643 0 0 151556 353886] Avg_usec : .13 -nid001957: apps: opencount: Diffs: [ 18341 0 0 60084 324976] Avg_reqs : 3.27 -nid001957: ---------------- - ------------------------------------------------------------------- -### Job 136825597.dbqs01 - NFS Statistics for job duration: -#### 2026-08-24A--:--:--.------+--:-- nid001957 Job 136825597.dbqs01 - DEBUG-NFS: Unable to find NFS stats file: /lfs/f2/hpc/jobdata/136825597/nfsstats.136825597.nid001957 - ------------------------------------------------------------------- -### Job 136825597.dbqs01 - Lustre evictions (if present): - ------------------------------------------------------------------- -### Job 136825597.dbqs01 - Exit status is 0 - ------------------------------------------------------------------- -Job 136825597.dbqs01 - Job summary: -Job Id: 136825597.dbqs01 - Job_Name = ESMPy - Job_Owner = keston.smith@dlogin09.dogwood.wcoss2.ncep.noaa.gov - resources_used.cpupercent = 111 - resources_used.cput = 00:12:26 - resources_used.mem = 13248244kb - resources_used.ncpus = 16 - resources_used.vmem = 11881628kb - resources_used.walltime = 00:41:12 - job_state = R - queue = dev - server = dbqs01 - Account_Name = NWPS-DEV - Checkpoint = u - ctime = Mon Aug 24 14:45:43 2026 - Error_Path = dlogin09.dogwood.wcoss2.ncep.noaa.gov:/lfs/h2/emc/couple/noscr - ub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/sor - c/ESMPy.e136825597 - exec_host = nid001957/0*16 - exec_vnode = (nid001957:ncpus=16:mem=268435456kb) - Hold_Types = n - Join_Path = oe - Keep_Files = oed - Mail_Points = a - mtime = Mon Aug 24 15:27:03 2026 - Output_Path = dlogin09.dogwood.wcoss2.ncep.noaa.gov:/lfs/h2/emc/couple/nosc - rub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/so - rc/ESMPy.o136825597 - Priority = 0 - qtime = Mon Aug 24 14:45:43 2026 - Rerunable = False - Resource_List.alvl = 2 - Resource_List.aslr = True - Resource_List.debug = True - Resource_List.dfs = False - Resource_List.hyper = True - Resource_List.ldebug = False - Resource_List.mem = 256gb - Resource_List.ncpus = 16 - Resource_List.nodect = 1 - Resource_List.one-shot = False - Resource_List.place = exclhost - Resource_List.select = 1:ncpus=16:mem=256GB - Resource_List.turbo = True - Resource_List.walltime = 04:00:00 - schedselect = 1:ncpus=16:mem=256GB:prepost=False - stime = Mon Aug 24 14:45:45 2026 - session_id = 2038059 - Shell_Path_List = /bin/bash - jobdir = /u/keston.smith - substate = 42 - Variable_List = PBS_O_HOME=/u/keston.smith,PBS_O_LANG=en_US.UTF-8, - PBS_O_LOGNAME=keston.smith, - PBS_O_PATH=/opt/cray/bin:/u/keston.smith/.local/bin:/usr/local/bin:/us - r/bin:/bin:/opt/c3/bin:/opt/pbs/bin:/sbin, - PBS_O_MAIL=/var/spool/mail/keston.smith,PBS_O_SHELL=/bin/bash, - PBS_O_WORKDIR=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWP - S/dev/compute_interpolation_weights/sorc,PBS_O_SYSTEM=Linux, - LMOD_FAMILY_CRAYPE_NETWORK_VERSION=false,meshID=oc_1500m_30km, - LD_LIBRARY_PATH=/opt/cray/lib64, - LS_COLORS=no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd= - 40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com - =01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tg - z=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.l - zma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2= - 00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.xz=00;31:*.avi=01;35:*.bmp - =01;35:*.dl=01;35:*.fli=01;35:*.gif=01;35:*.gl=01;35:*.jpg=01;35:*.jpeg - =01;35:*.mkv=01;35:*.mng=01;35:*.mov=01;35:*.mp4=01;35:*.mpg=01;35:*.pc - x=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.svg=01;35:*.t - ga=01;35:*.tif=01;35:*.webm=01;35:*.webp=01;35:*.wmv=01;35:*.xbm=01;35: - *.xcf=01;35:*.xpm=01;35:*.aiff=00;32:*.ape=00;32:*.au=00;32:*.flac=00;3 - 2:*.m4a=00;32:*.mid=00;32:*.mp3=00;32:*.mpc=00;32:*.ogg=00;32:*.voc=00; - 32:*.wav=00;32:*.wma=00;32:*.wv=00;32:,HOSTTYPE=x86_64, - __LMOD_REF_COUNT_PATH=/opt/cray/bin:1;/u/keston.smith/.local/bin:1;/us - r/local/bin:1;/usr/bin:1;/bin:2;/opt/c3/bin:1;/opt/pbs/bin:1;/sbin:1, - _ModuleTable002_=ck5hbWUiXT0iY3JheXBlLW5ldHdvcmstb2ZpIix9LFsiY3JheXBlL - Xg4Ni1yb21lIl09e1siZm4iXT0iL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY3Jh - eXBlLXRhcmdldHMvZGVmYXVsdC9jcmF5cGUteDg2LXJvbWUubHVhIixbImZ1bGxOYW1lIl0 - 9ImNyYXlwZS14ODYtcm9tZSIsWyJsb2FkT3JkZXIiXT0xLHByb3BUPXt9LFsic3RhY2tEZX - B0aCJdPTEsWyJzdGF0dXMiXT0iYWN0aXZlIixbInVzZXJOYW1lIl09ImNyYXlwZS14ODYtc - m9tZSIsfSxlbnZ2YXI9e1siZm4iXT0iL2FwcHMvcHJvZC9sbW9kdWxlcy9zeXNfY29yZS9l - bnZ2YXIvMS4wIixbImZ1bGxOYW1lIl09ImVudnZhci8xLjAiLFsibG9hZE9yZGVyIl09NCx - wcm9wVD17fSxbInN0YWNrRGVwdGgiXT0w, - SSH_CONNECTION=192.58.153.7 55526 192.58.153.19 22, - mesh=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/com - pute_interpolation_weights/sorc/../../..//fix/rwps.oc_1500m_30km.msh, - XAUTHLOCALHOSTNAME=dlogin09,LESSCLOSE=lessclose.sh %s %s, - XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB, - LMOD_FAMILY_CRAYPE_CPU=craype-x86-rome, - LMOD_MODULERCFILE=/apps/prod/lmodules/.modulerc.lua, - PE_PRODUCT_LIST=CRAYPE_X86_ROME,LMOD_IGNORE_CACHE=yes,LANG=en_US.UTF-8, - WINDOWMANAGER=xterm,LESS=-M -I -R,DISPLAY=localhost:15.0, - HISTTIMEFORMAT=%F %T,HOSTNAME=dlogin09, - LMOD_SYSTEM_DEFAULT_MODULES=envvar/1.0, - OLDPWD=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/c - ompute_interpolation_weights, - __LMOD_REF_COUNT__LMFILES_=/opt/cray/pe/lmod/modulefiles/craype-target - s/default/craype-x86-rome.lua:1;/opt/cray/modulefiles/libfabric/1.20.1: - 1;/opt/cray/pe/lmod/modulefiles/craype-targets/default/craype-network-o - fi.lua:1;/apps/prod/lmodules/sys_core/envvar/1.0:1, - CONFIG_SITE=/usr/share/site/x86_64-unknown-linux-gnu,CSHEDIT=emacs, - LMOD_CUSTOM_CNCM_INTEL_19_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX - =/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/apps - /ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4, - LMOD_CUSTOM_COMPILER_GNU_8_0_PREFIX=/apps/prod/lmodules/gcc/11.2.0:/ap - ps/prod/lmodules/gcc/10.2.0,GPG_TTY=/dev/pts/21, - LESS_ADVANCED_PREPROCESSOR=no,COLORTERM=1, - LMOD_FAMILY_CRAYPE_NETWORK=craype-network-ofi, - MACHTYPE=x86_64-suse-linux, - __LMOD_REF_COUNT_LD_LIBRARY_PATH=/opt/cray/lib64:1, - __LMOD_REF_COUNT_PKG_CONFIG_PATH=/opt/cray/lib64/pkgconfig:1, - LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_UCX_1_0_PREFIX=/apps/prod/lmodules/cce - /13.0.0:/apps/prod/lmodules/cce/12.0.3:/apps/prod/lmodules/cce/11.0.4, - tmp=/tmpfiles,SSH_AUTH_SOCK=/tmp/ssh-sLEbl3PUAYOZ/agent.543172, - _ModuleTable004_=U0lPTi9tb2R1bGVmaWxlcyIsIi91c3Ivc2hhcmUvbW9kdWxlcy9tb - 2R1bGVmaWxlcyIsIi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvTGludXgiLCIvdXNyL3NoYXJl - L21vZHVsZWZpbGVzL0NvcmUiLCIvdXNyL3NoYXJlL2xtb2QvbG1vZC9tb2R1bGVmaWxlcy9 - Db3JlIiwiL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY29yZSIsIi9vcHQvY3JheS - 9wZS9sbW9kL21vZHVsZWZpbGVzL2NyYXlwZS10YXJnZXRzL2RlZmF1bHQiLCIvYXBwcy9wc - m9kL2xtb2R1bGVzL3N5c19jb3JlIiwiL2FwcHMvb3BzL3Byb2QvbmNvL21vZHVsZWZpbGVz - L2NvcmUiLCIvYXBwcy9wcm9kL2xtb2R1bGVzL2NvcmUiLCIvb3B0L2NyYXkvbW9kdWxlZml - sZXMiLH0sWyJzeXN0ZW1CYXNlTVBBVEgi,MINICOM=-c on, - QT_SYSTEM_DIR=/usr/share/desktop-data,OSTYPE=linux, - meshname=rwps.oc_1500m_30km,USER=keston.smith, - MODULES_SET_SHELL_STARTUP=0,PAGER=less,MODULE_VERSION=3.2.10, - LMOD_CUSTOM_CNCM_GNU_8_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX=/a - pps/prod/lmodules/GCC_cray_mpich/10.2.0/cray-mpich/8.1.4, - LMOD_CUSTOM_CNCM_GNU_8_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX=/a - pps/prod/lmodules/GCC_cray_mpich/10.2.0/cray-mpich/8.1.4, - CRAY_CPU_TARGET=x86-rome, - LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PR - EFIX=/apps/prod/lmodules/CCE_cray_mpich/11.0.4/cray-mpich/8.1.4, - __LMOD_REF_COUNT_MODULEPATH=/opt/cray/pe/lmod/modulefiles/net/ofi/1.0: - 1;/opt/cray/pe/lmod/modulefiles/cpu/x86-rome/1.0:1;/usr/share/modules:1 - ;/usr/share/Modules/$MODULE_VERSION/modulefiles:1;/usr/share/modules/mo - dulefiles:1;/usr/share/modulefiles/Linux:1;/usr/share/modulefiles/Core: - 1;/usr/share/lmod/lmod/modulefiles/Core:1;/opt/cray/pe/lmod/modulefiles - /core:1;/opt/cray/pe/lmod/modulefiles/craype-targets/default:1;/apps/pr - od/lmodules/sys_core:1;/apps/ops/prod/nco/modulefiles/core:1;/apps/prod - /lmodules/core:1;/opt/cray/modulefiles:1, - COMINrrfs=/lfs/h1/ops/prod/com/rrfs/v1.0/rrfs./,MORE=-sl, - __LMOD_REF_COUNT_LOADEDMODULES=craype-x86-rome:1;libfabric/1.20.1:1;cr - aype-network-ofi:1;envvar/1.0:1, - PWD=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp - ute_interpolation_weights/sorc, - COMINrtofs=/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs./, - HOME=/u/keston.smith, - COMINnbm=/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.//grib2, - PELOCAL_PRGENV=true,SSH_AGENT_PID=543173,HOST=dlogin09, - SSH_CLIENT=192.58.153.7 55526 22,LMOD_VERSION=8.3.1, - XNLSPATH=/usr/share/X11/nls,CRAY_LMOD_CPU=x86-rome/1.0, - LMOD_FAMILY_CRAYPE_CPU_VERSION=false, - BASH_ENV=/usr/share/lmod/lmod/init/bash,XDG_DATA_DIRS=/usr/share, - LMOD_CUSTOM_CNCM_INTEL_19_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX - =/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/apps - /ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4, - CRAY_LMOD_NET=ofi/1.0, - RWPSroot=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev - /compute_interpolation_weights/sorc/../../../,COMINlocal=/tmpfiles, - __LMOD_REF_COUNT_LMOD_CUSTOM_COMPILER_INTEL_19_0_PREFIX=/apps/ops/prod - /nco/models/modulefiles:1;/apps/prod/lmodules/intel/19.1.3.304:1;/apps/ - ops/prod/libs/modulefiles/compiler/intel/19.1.3.304:1;/apps/ops/prod/nc - o/modulefiles/compiler/intel/19.1.3.304:1,LIBGL_DEBUG=quiet, - LMOD_CUSTOM_COMPILER_INTEL_19_0_PREFIX=/apps/ops/prod/nco/models/modul - efiles:/apps/prod/lmodules/intel/19.1.3.304:/apps/ops/prod/libs/modulef - iles/compiler/intel/19.1.3.304:/apps/ops/prod/nco/modulefiles/compiler/ - intel/19.1.3.304,PROFILEREAD=true,LMOD_sys=Linux, - _ModuleTable001_=X01vZHVsZVRhYmxlXz17WyJNVHZlcnNpb24iXT0zLFsiY19yZWJ1a - WxkVGltZSJdPWZhbHNlLFsiY19zaG9ydFRpbWUiXT1mYWxzZSxkZXB0aFQ9e30sZmFtaWx5 - PXtbImNyYXlwZV9jcHUiXT0iY3JheXBlLXg4Ni1yb21lIixbImNyYXlwZV9uZXR3b3JrIl0 - 9ImNyYXlwZS1uZXR3b3JrLW9maSIsfSxtVD17WyJjcmF5cGUtbmV0d29yay1vZmkiXT17Wy - JmbiJdPSIvb3B0L2NyYXkvcGUvbG1vZC9tb2R1bGVmaWxlcy9jcmF5cGUtdGFyZ2V0cy9kZ - WZhdWx0L2NyYXlwZS1uZXR3b3JrLW9maS5sdWEiLFsiZnVsbE5hbWUiXT0iY3JheXBlLW5l - dHdvcmstb2ZpIixbImxvYWRPcmRlciJdPTMscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MSx - bInN0YXR1cyJdPSJhY3RpdmUiLFsidXNl, - LOADEDMODULES=craype-x86-rome:libfabric/1.20.1:craype-network-ofi:envv - ar/1.0,LMOD_AVAIL_STYLE=en_grouped:system,CRAYPE_NETWORK_TARGET=ofi, - _ModuleTable006_=b2R1bGVmaWxlcyIsfQ==, - __LMOD_REF_COUNT_MANPATH=/opt/cray/share/man:1;/usr/share/lmod/lmod/sh - are/man:1;/usr/share/man:1;/opt/c3/man:1;/opt/pbs/share/man:1, - _ModuleTable003_=LFsic3RhdHVzIl09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJdPSJlbnZ2Y - XIvMS4wIix9LGxpYmZhYnJpYz17WyJmbiJdPSIvb3B0L2NyYXkvbW9kdWxlZmlsZXMvbGli - ZmFicmljLzEuMjAuMSIsWyJmdWxsTmFtZSJdPSJsaWJmYWJyaWMvMS4yMC4xIixbImxvYWR - PcmRlciJdPTIscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MixbInN0YXR1cyJdPSJhY3Rpdm - UiLFsidXNlck5hbWUiXT0ibGliZmFicmljIix9LH0sbXBhdGhBPXsiL29wdC9jcmF5L3BlL - 2xtb2QvbW9kdWxlZmlsZXMvbmV0L29maS8xLjAiLCIvb3B0L2NyYXkvcGUvbG1vZC9tb2R1 - bGVmaWxlcy9jcHUveDg2LXJvbWUvMS4wIiwiL3Vzci9zaGFyZS9tb2R1bGVzIiwiL3Vzci9 - zaGFyZS9Nb2R1bGVzLyRNT0RVTEVfVkVS,LMOD_ROOT=/usr/share/lmod, - SSH_TTY=/dev/pts/21,FROM_HEADER=,MAIL=/var/spool/mail/keston.smith, - COMINstofs=/lfs/h1/ops/prod/com/stofs/v3.1/stofs_2d_glo., - LESSKEY=/etc/lesskey.bin,TERM=xterm-256color,SHELL=/bin/bash, - LMOD_ADMIN_FILE=/apps/prod/lmodules/admin.list, - LMOD_CUSTOM_COMPILER_GNU_8_0_UCX_1_0_PREFIX=/apps/prod/lmodules/gcc/11 - .2.0:/apps/prod/lmodules/gcc/10.2.0,lmod_prefix_path=/usr/share, - LMOD_CUSTOM_COMPILER_CRAYCLANG_10_0_PREFIX=/apps/prod/lmodules/cce/13. - 0.0:/apps/prod/lmodules/cce/12.0.3:/apps/prod/lmodules/cce/11.0.4, - _ModuleTable_Sz_=6,LS_OPTIONS=-N --color=tty -T 0, - LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PR - EFIX=/apps/prod/lmodules/CCE_cray_mpich/11.0.4/cray-mpich/8.1.4, - TMOUT=1800,PYTHONSTARTUP=/etc/pythonstart, - RWPSfix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPS,SHLVL=3, - LANGUAGE=en_US.UTF-8,G_FILENAME_ENCODING=@locale\,UTF-8\,ISO-8859-15\, - CP1252, - LMOD_CUSTOM_COMPILER_INTEL_19_0_UCX_1_0_PREFIX=/apps/prod/lmodules/int - el/19.1.3.304:/apps/ops/prod/libs/modulefiles/compiler/intel/19.1.3.304 - :/apps/ops/prod/nco/modulefiles/compiler/intel/19.1.3.304, - HPC_OPT=/apps/ops/prod/libs, - MANPATH=/opt/cray/share/man:/usr/share/lmod/lmod/share/man:/usr/share/ - man:/opt/c3/man:/opt/pbs/share/man,OSCAR_HOME=/opt/oscar, - fix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp - ute_interpolation_weights/sorc/../../..//fix, - MODULEPATH=/opt/cray/pe/lmod/modulefiles/net/ofi/1.0:/opt/cray/pe/lmod - /modulefiles/cpu/x86-rome/1.0:/usr/share/modules:/usr/share/Modules/$MO - DULE_VERSION/modulefiles:/usr/share/modules/modulefiles:/usr/share/modu - lefiles/Linux:/usr/share/modulefiles/Core:/usr/share/lmod/lmod/modulefi - les/Core:/opt/cray/pe/lmod/modulefiles/core:/opt/cray/pe/lmod/modulefil - es/craype-targets/default:/apps/prod/lmodules/sys_core:/apps/ops/prod/n - co/modulefiles/core:/apps/prod/lmodules/core:/opt/cray/modulefiles, - LOGNAME=keston.smith,MODULE_VERSION_STACK=3.2.10, - MODULEPATH_ROOT=/usr/share/modulefiles, - LMOD_PACKAGE_PATH=/apps/prod/lmodules,XDG_CONFIG_DIRS=/etc/xdg, - PATH=/opt/cray/bin:/u/keston.smith/.local/bin:/usr/local/bin:/usr/bin: - /bin:/opt/c3/bin:/opt/pbs/bin:/sbin, - __LMOD_REF_COUNT_PE_PRODUCT_LIST=CRAYPE_X86_ROME:1, - _LMFILES_=/opt/cray/pe/lmod/modulefiles/craype-targets/default/craype- - x86-rome.lua:/opt/cray/modulefiles/libfabric/1.20.1:/opt/cray/pe/lmod/m - odulefiles/craype-targets/default/craype-network-ofi.lua:/apps/prod/lmo - dules/sys_core/envvar/1.0,MODULESHOME=/usr/share/lmod/lmod, - PKG_CONFIG_PATH=/opt/cray/lib64/pkgconfig, - LMOD_SETTARG_FULL_SUPPORT=no,INFOPATH=:/apps/docs/info, - G_BROKEN_FILENAMES=1,HISTSIZE=10000,LMOD_PKG=/usr/share/lmod/lmod, - CPU=x86_64, - _ModuleTable005_=XT0iL3Vzci9zaGFyZS9tb2R1bGVzOi91c3Ivc2hhcmUvTW9kdWxlc - y8kTU9EVUxFX1ZFUlNJT04vbW9kdWxlZmlsZXM6L3Vzci9zaGFyZS9tb2R1bGVzL21vZHVs - ZWZpbGVzOi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvTGludXg6L3Vzci9zaGFyZS9tb2R1bGV - maWxlcy9Db3JlOi91c3Ivc2hhcmUvbG1vZC9sbW9kL21vZHVsZWZpbGVzL0NvcmU6L29wdC - 9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY29yZTovb3B0L2NyYXkvcGUvbG1vZC9tb2R1b - GVmaWxlcy9jcmF5cGUtdGFyZ2V0cy9kZWZhdWx0Oi9hcHBzL3Byb2QvbG1vZHVsZXMvc3lz - X2NvcmU6L2FwcHMvb3BzL3Byb2QvbmNvL21vZHVsZWZpbGVzL2NvcmU6L2FwcHMvcHJvZC9 - sbW9kdWxlcy9jb3JlOi9vcHQvY3JheS9t, - LMOD_CMD=/usr/share/lmod/lmod/libexec/lmod,CVS_RSH=ssh, - LESSOPEN=lessopen.sh %s,LMOD_DIR=/usr/share/lmod/lmod/libexec, - LC_TIME=C.UTF-8, - BASH_FUNC_module%%=() { eval $($LMOD_CMD bash \"$@\") && eval $(${LMO - D_SETTARG_CMD:-:} -s sh) - euser = keston.smith - egroup = emc - hashname = 136825597.dbqs01 - queue_rank = 1787582743134363 - queue_type = E - comment = Job run at Mon Aug 24 at 14:45 on (nid001957:ncpus=16:mem=2684354 - 56kb) - etime = Mon Aug 24 14:45:43 2026 - umask = 22 - run_count = 6 - eligible_time = 00:00:08 - accrue_type = 3 - Submit_arguments = -V /lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/ - RWPS/dev/compute_interpolation_weights/sorc/../../..//dev/compute_inter - polation_weights/ecf/compute_interpolation_weights.ecf - project = NWPS-DEV - run_version = 1 - Submit_Host = dlogin09.dogwood.wcoss2.ncep.noaa.gov - server_instance_id = dbqs01.dogwood.wcoss2.ncep.noaa.gov:15001 - - ------------------------------------------------------------------- -Job 136825597.dbqs01 - PBS tracejob output (for parent mom node only): - -Job: 136825597.dbqs01 - -08/24/2026 14:45:45 M update_job_usage: CPU usage: 0.000 secs -08/24/2026 14:45:45 M update_job_usage: cpupercent initialized to zero -08/24/2026 14:45:45 M update_job_usage: Memory usage: mem=0b -08/24/2026 14:45:49 M Started, pid = 2038059 -08/24/2026 14:46:07 M update_job_usage: CPU usage: 16.000 secs -08/24/2026 14:46:07 M update_job_usage: 136825597.dbqs01 measured interval cpupercent 74 increased job cpupercent to 74 -08/24/2026 14:46:07 M update_job_usage: Memory usage: mem=659248kb -08/24/2026 14:48:08 M update_job_usage: CPU usage: 150.000 secs -08/24/2026 14:48:08 M update_job_usage: 136825597.dbqs01 measured interval cpupercent 111 increased job cpupercent to 111 -08/24/2026 14:48:08 M update_job_usage: Memory usage: mem=2628252kb -08/24/2026 14:50:09 M update_job_usage: CPU usage: 277.000 secs -08/24/2026 14:50:09 M update_job_usage: Memory usage: mem=5532752kb -08/24/2026 14:52:10 M update_job_usage: CPU usage: 398.000 secs -08/24/2026 14:52:10 M update_job_usage: Memory usage: mem=11584280kb -08/24/2026 14:54:11 M update_job_usage: CPU usage: 522.000 secs -08/24/2026 14:56:13 M update_job_usage: CPU usage: 644.000 secs -08/24/2026 14:58:14 M update_job_usage: CPU usage: 726.000 secs -08/24/2026 15:00:15 M update_job_usage: CPU usage: 726.000 secs -08/24/2026 15:02:16 M update_job_usage: CPU usage: 726.000 secs -08/24/2026 15:04:17 M update_job_usage: CPU usage: 726.000 secs -08/24/2026 15:06:18 M update_job_usage: CPU usage: 726.000 secs -08/24/2026 15:08:19 M update_job_usage: CPU usage: 726.000 secs -08/24/2026 15:10:21 M update_job_usage: CPU usage: 726.000 secs -08/24/2026 15:12:22 M update_job_usage: CPU usage: 746.000 secs -08/24/2026 15:14:23 M update_job_usage: CPU usage: 746.000 secs -08/24/2026 15:16:24 M update_job_usage: CPU usage: 746.000 secs -08/24/2026 15:18:25 M update_job_usage: CPU usage: 746.000 secs -08/24/2026 15:20:26 M update_job_usage: CPU usage: 746.000 secs -08/24/2026 15:22:27 M update_job_usage: CPU usage: 746.000 secs -08/24/2026 15:24:29 M update_job_usage: CPU usage: 746.000 secs -08/24/2026 15:26:30 M update_job_usage: CPU usage: 746.000 secs -08/24/2026 15:27:06 M task 00000001 terminated -08/24/2026 15:27:06 M Terminated -08/24/2026 15:27:06 M task 00000001 cput=00:12:44 -08/24/2026 15:27:06 M kill_job -08/24/2026 15:27:06 M nid001957 cput=00:12:26 mem=13248244kb -08/24/2026 15:27:06 M update_job_usage: CPU usage: 761.000 secs -08/24/2026 15:27:06 M update_job_usage: Memory usage: mem=13248244kb - ------------------------------------------------------------------- -To see full PBS log data, run: /sfs/admin/scripts/tracejob.sh 136825597.dbqs01 - -================================================================== -END - DEBUG INFO -================================================================== - -Job 136825597.dbqs01 - Epilogue DEBUG complete. DEBUG Execution time: 5 seconds -Job 136825597.dbqs01 - Epilogue complete. Execution time: 9 seconds -##### Job 136825597.dbqs01 - PBS Job Script: -(Note: Duplicate #PBS entries are a function how PBS interprets and caches the original job script.) - -#!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=04:00:00 -##PBS -l select=1:ncpus=8:mem=128GB -#PBS -l select=1:ncpus=16:mem=256GB -##PBS -l select=1:ncpus=32:mem=256GB -###PBS -l select=1:ncpus=1:mem=8G -#PBS -l place=excl -#PBS -l debug=true - -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - -pip list -v - -cd $RWPSroot/ush/preprocess - -SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" -date="20260730" -cycl="00" -Nprocs=16 - - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - -rrfs_hi=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.hi.nc -rrfs_pr=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.pr.nc -rrfs_ak=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.ak.nc -rrfs_na=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.na.nc -rrfs_conus=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.conus.nc - -out="../../fix" - -rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" -rrfsDst="$out/DistToBndy.$meshname.rrfs" - -#no extrapolation with rrfs forecasts -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_pr $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 > GenWhts.rrfs.pr.out -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_ak $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 > GenWhts.rrfs.ak.out -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_na $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 > GenWhts.rrfs.na.out -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_conus $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out - -nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc -nbmIntrp="$out/InterpolationWeights.$meshname.nbm" -nbmDst="$out/DistToBndy.$meshname.nbm" -#extrapolate nbm oc wind to all points -python ./compute_gridded_to_rwps_interp_weights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out - -nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc -#do not extrapolate for NBM .ak. domain -python ./compute_gridded_to_rwps_interp_weights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out - -rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc -rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" -rtofsDst="$out/DistToBndy.$meshname.rtofs" - -#extrapolate rtofs .glo. for full ice coverage - -python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out - - -rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc -#do not extrapolate rtofs .glo. currents -python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.current.nc $rtofsDst.current.nc -1 > GenWhts.rtofs.current.out - - - -#Old v2 of stofs -stofs_glo="$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" - -mkdir -p STOFSInterpWeights.$meshname -## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs - -## Now run parallel job script - -qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS - -wait - -#combine text file output of parallel jobs -cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt - -# convert output weights to netcdf file -python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 -cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.v2.nc -cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.v2.nc -mv DistToBndy.$meshname.stofs.nc DistToBndy.$meshname.stofs.v2.nc -mv InterpWeights.$meshname.stofs.nc InterpWeights.$meshname.stofs.v2.nc - -rm -rf STOFSInterpWeights.$meshname -rm InterpWeights.$meshname.stofs.txt -rm *.out -rm ESMPy* - - -mkdir -p STOFSInterpWeights.$meshname -#compute stofs weights for current(v3) stofs mesh -stofs_glo="$SID/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc" - -## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs - -## Now run parallel job script - -qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS - -wait - -#combine text file output of parallel jobs -cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt - -# convert output weights to netcdf file -python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 -cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc -cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc - - -rm -rf STOFSInterpWeights.$meshname -rm InterpWeights.$meshname.stofs.txt -rm *.out -rm ESMPy* - - - - -##### End of job script ------------------------------------------------------------------- - diff --git a/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136832289 b/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136832289 deleted file mode 100644 index e1294b1..0000000 --- a/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136832289 +++ /dev/null @@ -1,986 +0,0 @@ -PBS: Running prologue on parent mom node: nid001042... -Job 136832289.dbqs01 nodelist: nid001042 -Job 136832289.dbqs01 - Prologue complete. Execution time: 4 seconds -Agent pid 2647705 -Identity added: /u/keston.smith/.ssh/id_ed25519 (keston.smith@noaa.gov) -/u/keston.smith/.bashrc: line 46: alias: eval "$(ssh-agent -s)"; ssh-add ~/.ssh/id_ed25519: not found -Resetting modules to system default. Reseting $MODULEPATH back to system default. All extra directories will be removed from $MODULEPATH. -Package Version Location Installer -------------------------- ----------- ---------------------------------------------------------------------------------- --------- -Cartopy 0.24.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -certifi 2025.1.31 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -cftime 1.6.4.post1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -contourpy 1.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -cycler 0.12.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -esmpy 8.6.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -fonttools 4.55.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -geographiclib 2.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -geopy 2.4.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -Jinja2 3.1.5 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -kiwisolver 1.4.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -MarkupSafe 3.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -matplotlib 3.10.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -netCDF4 1.7.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -numpy 2.2.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -packaging 24.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pandas 2.2.3 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pillow 11.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pip 25.0.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pyparsing 3.2.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pyproj 3.7.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pyshp 2.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -python-dateutil 2.9.0.post0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pytz 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -PyYAML 6.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -scipy 1.15.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -setuptools 75.8.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -setuptools-git-versioning 2.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -shapely 2.0.7 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -six 1.17.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -tzdata 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -xarray 2025.1.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in - with xr.open_dataset(weights_file, overwrite=True) as ds_s: - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset - backend_ds = backend.open_dataset( - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in - with xr.open_dataset(weights_file, overwrite=True) as ds_s: - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset - backend_ds = backend.open_dataset( - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in - with xr.open_dataset(weights_file, overwrite=True) as ds_s: - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset - backend_ds = backend.open_dataset( - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in - with xr.open_dataset(weights_file, overwrite=True) as ds_s: - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset - backend_ds = backend.open_dataset( - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in - with xr.open_dataset(weights_file, overwrite=True) as ds_s: - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset - backend_ds = backend.open_dataset( - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in - with xr.open_dataset(weights_file, overwrite=True) as ds_s: - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset - backend_ds = backend.open_dataset( - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in - with xr.open_dataset(weights_file, overwrite=True) as ds_s: - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset - backend_ds = backend.open_dataset( - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in - with xr.open_dataset(weights_file, overwrite=True) as ds_s: - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset - backend_ds = backend.open_dataset( - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in - with xr.open_dataset(weights_file, overwrite=True) as ds_s: - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset - backend_ds = backend.open_dataset( - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' -directory STOFSInterpWeights.rwps.oc_500m_10km is alread empty -Made parallel jobcards to create interpolation weights with 16 processes. Next step: -sbatch jobcardcompute_unstr_to_rwps_interp_weightsSLURM -136837224[].dbqs01 -Job submit error: 2. -mesh file=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/sorc/../../..//fix/rwps.oc_500m_10km.msh -nn = 5294967 -number of nodes read: 5294967 -ne=10377117 -includes boundary nodes -number of open boundary nodes read: 3495 -number of elements read: 10373622 -n=12906555 -n_s=12906555 -directory STOFSInterpWeights.rwps.oc_500m_10km is alread empty -Made parallel jobcards to create interpolation weights with 16 processes. Next step: -sbatch jobcardcompute_unstr_to_rwps_interp_weightsSLURM -136844289[].dbqs01 -Job submit error: 2. -mesh file=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/sorc/../../..//fix/rwps.oc_500m_10km.msh -nn = 5294967 -number of nodes read: 5294967 -ne=10377117 -includes boundary nodes -number of open boundary nodes read: 3495 -number of elements read: 10373622 -n=12906555 -n_s=12906555 -PBS: Running epilogue on parent mom node: nid001042... -================================================================== -BEGIN - DEBUG INFO -================================================================== -Job 136832289.dbqs01 - Post Job Mem Usage: -nid001042: 2026-08-24.40 1 =========================================== -nid001042: 2026-08-24.40 2 #### Node Memory Usage for nid001042 #### -nid001042: 2026-08-24.40 3 ------------------ -nid001042: 2026-08-24.40 4 Mem: total:526983536 used:16816232 free:511230964 shared:900020 cache:1536804 avail:510167304 -nid001042: 2026-08-24.40 5 4.0K /dev/shm -nid001042: 2026-08-24.40 6 40K /tmp -nid001042: 2026-08-24.40 7 =========================================== -nid001042: 2026-08-24.03 1 =========================================== -nid001042: 2026-08-24.03 2 #### Node Memory Usage for nid001042 #### -nid001042: 2026-08-24.03 3 ------------------ -nid001042: 2026-08-24.03 4 Mem: total:526983536 used:17629088 free:508266984 shared:899528 cache:4235000 avail:509354448 -nid001042: 2026-08-24.03 5 4.0K /dev/shm -nid001042: 2026-08-24.03 6 40K /tmp -nid001042: 2026-08-24.03 7 =========================================== - ------------------------------------------------------------------- ------------------------------------------------------------------- -Job 136832289.dbqs01 - Post Job Mem Usage Profile: -2026-08-24A--:--:--.------+--:-- nid001042 #### nid001042 - Job 136832289.dbqs01 NUMA Node Memory Allocation and Fragmentation Reports -Starting Fragmentation Report for nid001042 -Node Order9 Order10 Score MB_Free %Free State -0 5278 43 5364 10728 16 FRAG -1 8860 3060 14980 29960 46 MARG -2 6872 6314 19500 39000 60 OK -3 4519 9526 23571 47142 73 OK -4 7032 7099 21230 42460 65 OK -5 2688 12224 27136 54272 84 OK -6 1777 13436 28649 57298 88 OK -7 1707 12965 27637 55274 85 OK - -** nid001042 : node0_score=5364 node0_state=FRAG uptime=4584444s Overall=FRAG ** -Ending Fragmentation Report for nid001042 -Node Order9 Order10 Score MB_Free %Free State -0 5273 44 5361 10722 16 FRAG -1 8856 3062 14980 29960 46 MARG -2 6835 6316 19467 38934 60 OK -3 4523 9526 23575 47150 73 OK -4 7026 7121 21268 42536 65 OK -5 2689 12227 27143 54286 84 OK -6 1778 13436 28650 57300 88 OK -7 1701 12966 27633 55266 85 OK - -** nid001042 : node0_score=5361 node0_state=FRAG uptime=4593946s Overall=FRAG ** -2026-08-24A--:--:--.------+--:-- nid001042 #### nid001042 - Job 136832289.dbqs01 VMSTATS Memory Report -**Only Printing Significant Findings - TEST CODE - Results are NOT positive indication of a problem. ** -nid001042 [!] Inactive file cache ballooned: 653698 (threshold: 100000) -nid001042 [!] Write-pending pages high at end: 100771 (threshold: 100000) - ------------------------------------------------------------------- -Job 136832289.dbqs01 - /var/log/messages for job duration: -2026-08-24A--:--:--.------+--:-- nid001042 #### nid001042 - Job 136832289.dbqs01 Runtime Data from /var/log/messages -nid001042: nid001042 #### nid001042 - Job 136832289.dbqs01 Runtime Data from /var/log/messages -nid001042: 2026-08-24T15:35:40.214817+00:00 nid001042 prologue: MARK: Job 136832289.dbqs01 Start -nid001042: 2026-08-24T15:35:40.226527+00:00 nid001042 prologue: Job 136832289.dbqs01 nodelist: nid001042 -nid001042: 2026-08-24T15:35:40.228418+00:00 nid001042 prologue: Job 136832289.dbqs01 - Recording pre-execution stats and counters... -nid001042: 2026-08-24T15:35:40.264253+00:00 nid001042 prologue: Job 136832289.dbqs01 - Killing any stray user processes... -nid001042: 2026-08-24T15:35:40.347275+00:00 nid001042 prologue: Job 136832289.dbqs01 - Clearing /tmp... -nid001042: 2026-08-24T15:35:40.364219+00:00 nid001042 prologue: Job 136832289.dbqs01 - Verifying key post-boot workarounds with warchk... -nid001042: 2026-08-24T15:35:40.396869+00:00 nid001042 WARCHK: root : /sfs/admin/scripts/warchk --batch -nid001042: 2026-08-24T15:35:40.618983+00:00 nid001042 prologue: Job 136832289.dbqs01 - Recording pre-job memory usage... -nid001042: 2026-08-24T15:35:40.710005+00:00 nid001042 prologue: Job 136832289.dbqs01 - FRAG_STATE: ** nid001042 : node0_score=5364 node0_state=FRAG uptime=4584444s Overall=FRAG ** -nid001042: 2026-08-24T15:35:40.711202+00:00 nid001042 prologue: Job 136832289.dbqs01 - Recording pre-job HSN counters... -nid001042: 2026-08-24T15:35:40.842747+00:00 nid001042 prologue: Job 136832289.dbqs01 - Recording pre-job Lustre counters... -nid001042: 2026-08-24T15:35:41.877738+00:00 nid001042 prologue: Job 136832289.dbqs01 - Recording initial NFS client statistics... -nid001042: 2026-08-24T15:35:41.888206+00:00 nid001042 prologue: Job 136832289.dbqs01 - Saving a copy of the job script... -nid001042: 2026-08-24T15:35:41.895778+00:00 nid001042 prologue: Job 136832289.dbqs01 - Checking existing ASLR settings... -nid001042: 2026-08-24T15:35:41.901454+00:00 nid001042 prologue: Job 136832289.dbqs01 - Checking palsd open file count... -nid001042: 2026-08-24T15:35:42.003572+00:00 nid001042 PBS_CMD: root : /opt/pbs/bin/qstat -Bf -nid001042: 2026-08-24T15:35:43.055156+00:00 nid001042 prologue: Job 136832289.dbqs01 - Checking one-shot enabled: False -nid001042: 2026-08-24T15:35:43.056332+00:00 nid001042 prologue: Job 136832289.dbqs01 - Enabling turboboost... -nid001042: 2026-08-24T15:35:43.059174+00:00 nid001042 prologue: Job 136832289.dbqs01 - Checking warchk results... -nid001042: 2026-08-24T15:35:43.062261+00:00 nid001042 prologue: Job 136832289.dbqs01 - Warchk Complete -nid001042: 2026-08-24T15:35:43.064945+00:00 nid001042 prologue: Job 136832289.dbqs01 - Prologue complete. Execution time: 4 seconds -nid001042: 2026-08-24T15:38:37.396313+00:00 nid001042 kernel: [4584366.482195][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.126.115@o2ib: 1 seconds -nid001042: 2026-08-24T15:38:37.396329+00:00 nid001042 kernel: [4584366.503523][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 9 previous similar messages -nid001042: 2026-08-24T15:39:32.550877+00:00 nid001042 kernel: [4584421.647352][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: 2026-08-24T15:40:48.675189+00:00 nid001042 nscd: 5098 monitored file `/etc/passwd` was moved into place, adding watch -nid001042: 2026-08-24T15:40:48.699399+00:00 nid001042 check_and_pull_files.sh[2650178]: e9709a469275dbf82af8282d38161f470ddb6ed6 passwd -nid001042: 2026-08-24T15:40:48.699457+00:00 nid001042 check_and_pull_files.sh[2650178]: 56e7ca4365d1df56eff59df9f92c865c78ad544f group -nid001042: 2026-08-24T15:40:48.700013+00:00 nid001042 check_and_pull_files.sh[2650178]: ffc2ad9f7d4fc4d6fda47e210b99977f3b56a452 hosts -nid001042: 2026-08-24T15:40:48.703027+00:00 nid001042 check_and_pull_files.sh[2650178]: 9fb9ff4c9c2c2dded1625b4e009ff6a631716f5d shadow -nid001042: 2026-08-24T15:40:48.705542+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. -nid001042: 2026-08-24T15:44:32.610241+00:00 nid001042 kernel: [4584721.694163][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib -nid001042: 2026-08-24T15:45:02.690946+00:00 nid001042 systemd[1]: session-9925.scope: Deactivated successfully. -nid001042: 2026-08-24T15:49:32.642241+00:00 nid001042 kernel: [4585021.709190][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: 2026-08-24T15:52:02.661973+00:00 nid001042 nscd: 5098 monitored file `/etc/group` was moved into place, adding watch -nid001042: 2026-08-24T15:52:02.675184+00:00 nid001042 check_and_pull_files.sh[2650489]: e9709a469275dbf82af8282d38161f470ddb6ed6 passwd -nid001042: 2026-08-24T15:52:02.675228+00:00 nid001042 check_and_pull_files.sh[2650489]: f72b35bfcb2800b4dd6cfff175e7c35c1ed60978 group -nid001042: 2026-08-24T15:52:02.675750+00:00 nid001042 check_and_pull_files.sh[2650489]: ffc2ad9f7d4fc4d6fda47e210b99977f3b56a452 hosts -nid001042: 2026-08-24T15:52:02.678042+00:00 nid001042 check_and_pull_files.sh[2650489]: 9fb9ff4c9c2c2dded1625b4e009ff6a631716f5d shadow -nid001042: 2026-08-24T15:52:02.680976+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. -nid001042: 2026-08-24T15:54:32.674242+00:00 nid001042 kernel: [4585321.724114][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: 2026-08-24T15:55:22.389070+00:00 nid001042 kernel: [4585371.417306][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds -nid001042: 2026-08-24T15:55:22.389081+00:00 nid001042 kernel: [4585371.439811][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 3 previous similar messages -nid001042: 2026-08-24T15:59:32.706245+00:00 nid001042 kernel: [4585621.739081][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib -nid001042: 2026-08-24T16:00:22.620099+00:00 nid001042 systemd[1]: Started Timeline of Snapper Snapshots. -nid001042: 2026-08-24T16:00:22.674119+00:00 nid001042 dbus-daemon[4956]: [system] Activating via systemd: service name='org.opensuse.Snapper' unit='snapperd.service' requested by ':1.22529' (uid=0 pid=2650618 comm="/usr/lib/snapper/systemd-helper --timeline ") -nid001042: 2026-08-24T16:00:22.677879+00:00 nid001042 systemd[1]: Starting DBus interface for snapper... -nid001042: 2026-08-24T16:00:22.690123+00:00 nid001042 dbus-daemon[4956]: [system] Successfully activated service 'org.opensuse.Snapper' -nid001042: 2026-08-24T16:00:22.690365+00:00 nid001042 systemd[1]: Started DBus interface for snapper. -nid001042: 2026-08-24T16:00:22.693341+00:00 nid001042 systemd[1]: snapper-timeline.service: Deactivated successfully. -nid001042: 2026-08-24T16:01:22.755670+00:00 nid001042 systemd[1]: snapperd.service: Deactivated successfully. -nid001042: 2026-08-24T16:03:16.617710+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. -nid001042: 2026-08-24T16:04:32.738240+00:00 nid001042 kernel: [4585921.754107][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: 2026-08-24T16:06:45.672545+00:00 nid001042 chronyd[4107266]: Source 67.217.246.204 replaced with 108.59.2.24 (2.suse.pool.ntp.org) -nid001042: 2026-08-24T16:08:35.829999+00:00 nid001042 PBS_CMD: keston.smith : /opt/pbs/bin/qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS -nid001042: 2026-08-24T16:09:32.770243+00:00 nid001042 kernel: [4586221.769104][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: 2026-08-24T16:10:21.399389+00:00 nid001042 kernel: [4586270.374271][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 0 seconds -nid001042: 2026-08-24T16:10:21.399399+00:00 nid001042 kernel: [4586270.397495][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages -nid001042: 2026-08-24T16:11:02.638265+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. -nid001042: 2026-08-24T16:14:32.802242+00:00 nid001042 kernel: [4586521.784031][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib -nid001042: 2026-08-24T16:15:03.138335+00:00 nid001042 systemd[1]: session-9926.scope: Deactivated successfully. -nid001042: 2026-08-24T16:19:32.834243+00:00 nid001042 kernel: [4586821.798994][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: 2026-08-24T16:20:11.637241+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. -nid001042: 2026-08-24T16:24:32.866242+00:00 nid001042 kernel: [4587121.813966][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: 2026-08-24T16:25:22.387443+00:00 nid001042 kernel: [4587171.315132][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds -nid001042: 2026-08-24T16:25:22.387452+00:00 nid001042 kernel: [4587171.336625][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages -nid001042: 2026-08-24T16:29:32.898243+00:00 nid001042 kernel: [4587421.828867][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib -nid001042: 2026-08-24T16:34:32.930242+00:00 nid001042 kernel: [4587721.843735][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: 2026-08-24T16:34:57.636732+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. -nid001042: 2026-08-24T16:39:32.962247+00:00 nid001042 kernel: [4588021.858757][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: 2026-08-24T16:40:02.638649+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. -nid001042: 2026-08-24T16:40:23.381192+00:00 nid001042 kernel: [4588072.255893][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 2 seconds -nid001042: 2026-08-24T16:40:23.381209+00:00 nid001042 kernel: [4588072.278357][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages -nid001042: 2026-08-24T16:43:18.670632+00:00 nid001042 chronyd[4107266]: Source 204.2.134.172 replaced with 149.248.12.167 (2.suse.pool.ntp.org) -nid001042: 2026-08-24T16:44:32.998245+00:00 nid001042 kernel: [4588321.873729][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib -nid001042: 2026-08-24T16:45:02.634331+00:00 nid001042 systemd[1]: session-9927.scope: Deactivated successfully. -nid001042: 2026-08-24T16:49:32.034250+00:00 nid001042 kernel: [4588620.896639][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: 2026-08-24T16:52:48.638781+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. -nid001042: 2026-08-24T16:54:32.066244+00:00 nid001042 kernel: [4588920.911721][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: 2026-08-24T16:55:21.398525+00:00 nid001042 kernel: [4588970.220842][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 0 seconds -nid001042: 2026-08-24T16:55:21.398544+00:00 nid001042 kernel: [4588970.244575][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages -nid001042: 2026-08-24T16:59:32.098246+00:00 nid001042 kernel: [4589220.926654][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib -nid001042: 2026-08-24T17:00:12.622974+00:00 nid001042 systemd[1]: Started Timeline of Snapper Snapshots. -nid001042: 2026-08-24T17:00:12.629463+00:00 nid001042 dbus-daemon[4956]: [system] Activating via systemd: service name='org.opensuse.Snapper' unit='snapperd.service' requested by ':1.22535' (uid=0 pid=2651313 comm="/usr/lib/snapper/systemd-helper --timeline ") -nid001042: 2026-08-24T17:00:12.632624+00:00 nid001042 systemd[1]: Starting DBus interface for snapper... -nid001042: 2026-08-24T17:00:12.637595+00:00 nid001042 dbus-daemon[4956]: [system] Successfully activated service 'org.opensuse.Snapper' -nid001042: 2026-08-24T17:00:12.637773+00:00 nid001042 systemd[1]: Started DBus interface for snapper. -nid001042: 2026-08-24T17:00:12.639267+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. -nid001042: 2026-08-24T17:00:12.640096+00:00 nid001042 systemd[1]: snapper-timeline.service: Deactivated successfully. -nid001042: 2026-08-24T17:01:12.702038+00:00 nid001042 systemd[1]: snapperd.service: Deactivated successfully. -nid001042: 2026-08-24T17:04:32.130250+00:00 nid001042 kernel: [4589520.941750][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: 2026-08-24T17:09:32.162249+00:00 nid001042 kernel: [4589820.956749][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: 2026-08-24T17:10:13.071555+00:00 nid001042 PBS_CMD: WARNING: /opt/pbs/bin/qsub.exe failed for keston.smith: 2 - Generic -nid001042: 2026-08-24T17:10:22.387419+00:00 nid001042 kernel: [4589871.161904][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds -nid001042: 2026-08-24T17:10:22.387437+00:00 nid001042 kernel: [4589871.184117][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages -nid001042: 2026-08-24T17:11:21.623079+00:00 nid001042 PBS_CMD: keston.smith : /opt/pbs/bin/qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS -nid001042: 2026-08-24T17:12:42.637275+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. -nid001042: 2026-08-24T17:14:32.194246+00:00 nid001042 kernel: [4590120.971720][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib -nid001042: 2026-08-24T17:15:02.602894+00:00 nid001042 systemd[1]: session-9928.scope: Deactivated successfully. -nid001042: 2026-08-24T17:18:07.896349+00:00 nid001042 chronyd[4107266]: Source 216.229.4.69 replaced with 198.60.22.240 (2.suse.pool.ntp.org) -nid001042: 2026-08-24T17:19:32.226242+00:00 nid001042 kernel: [4590420.986759][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: 2026-08-24T17:21:00.638623+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. -nid001042: 2026-08-24T17:24:32.258244+00:00 nid001042 kernel: [4590721.001893][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: 2026-08-24T17:25:21.399112+00:00 nid001042 kernel: [4590770.119057][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 0 seconds -nid001042: 2026-08-24T17:25:21.399129+00:00 nid001042 kernel: [4590770.141458][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages -nid001042: 2026-08-24T17:29:32.290244+00:00 nid001042 kernel: [4591021.016884][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib -nid001042: 2026-08-24T17:34:08.637524+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. -nid001042: 2026-08-24T17:34:32.326245+00:00 nid001042 kernel: [4591321.031919][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: 2026-08-24T17:39:32.386250+00:00 nid001042 kernel: [4591621.078910][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: 2026-08-24T17:40:22.388771+00:00 nid001042 kernel: [4591671.060139][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 2 seconds -nid001042: 2026-08-24T17:40:22.388789+00:00 nid001042 kernel: [4591671.081455][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages -nid001042: 2026-08-24T17:44:02.638058+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. -nid001042: 2026-08-24T17:44:32.422249+00:00 nid001042 kernel: [4591921.094022][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib -nid001042: 2026-08-24T17:45:02.816628+00:00 nid001042 systemd[1]: session-9929.scope: Deactivated successfully. -nid001042: 2026-08-24T17:49:32.482243+00:00 nid001042 kernel: [4592221.140904][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: 2026-08-24T17:53:32.637843+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. -nid001042: 2026-08-24T17:54:16.713980+00:00 nid001042 chronyd[4107266]: Source 172.234.25.10 replaced with 69.64.225.2 (2.suse.pool.ntp.org) -nid001042: 2026-08-24T17:54:32.518245+00:00 nid001042 kernel: [4592521.155988][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: 2026-08-24T17:55:21.398785+00:00 nid001042 kernel: [4592570.017138][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 0 seconds -nid001042: 2026-08-24T17:55:21.398803+00:00 nid001042 kernel: [4592570.041169][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages -nid001042: 2026-08-24T17:59:32.578244+00:00 nid001042 kernel: [4592821.203033][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib -nid001042: 2026-08-24T18:00:22.619987+00:00 nid001042 systemd[1]: Started Timeline of Snapper Snapshots. -nid001042: 2026-08-24T18:00:22.625527+00:00 nid001042 dbus-daemon[4956]: [system] Activating via systemd: service name='org.opensuse.Snapper' unit='snapperd.service' requested by ':1.22541' (uid=0 pid=2652011 comm="/usr/lib/snapper/systemd-helper --timeline ") -nid001042: 2026-08-24T18:00:22.628658+00:00 nid001042 systemd[1]: Starting DBus interface for snapper... -nid001042: 2026-08-24T18:00:22.632472+00:00 nid001042 dbus-daemon[4956]: [system] Successfully activated service 'org.opensuse.Snapper' -nid001042: 2026-08-24T18:00:22.632704+00:00 nid001042 systemd[1]: Started DBus interface for snapper. -nid001042: 2026-08-24T18:00:22.634763+00:00 nid001042 systemd[1]: snapper-timeline.service: Deactivated successfully. -nid001042: 2026-08-24T18:00:32.636187+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. -nid001042: 2026-08-24T18:01:22.697004+00:00 nid001042 systemd[1]: snapperd.service: Deactivated successfully. -nid001042: 2026-08-24T18:04:32.614250+00:00 nid001042 kernel: [4593121.218123][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: 2026-08-24T18:09:32.674246+00:00 nid001042 kernel: [4593421.265092][T13658] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: 2026-08-24T18:10:22.388781+00:00 nid001042 kernel: [4593470.958302][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds -nid001042: 2026-08-24T18:10:22.388799+00:00 nid001042 kernel: [4593470.981403][T13670] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages -nid001042: 2026-08-24T18:12:57.221209+00:00 nid001042 PBS_CMD: WARNING: /opt/pbs/bin/qsub.exe failed for keston.smith: 2 - Generic -nid001042: 2026-08-24T18:13:12.636859+00:00 nid001042 systemd[1]: etc_update.service: Deactivated successfully. -nid001042: 2026-08-24T18:14:02.880906+00:00 nid001042 epilogue: Job 136832289.dbqs01 complete, running post-job actions. -nid001042: 2026-08-24T18:14:02.904813+00:00 nid001042 epilogue: MARK: Job 136832289.dbqs01 Complete. - ------------------------------------------------------------------- -Job 136832289.dbqs01 - dmesg output for job duration: -2026-08-24A--:--:--.------+--:-- nid001042 #### nid001042 - Job 136832289.dbqs01 Runtime Data from dmesg -nid001042: nid001042 #### nid001042 - Job 136832289.dbqs01 Runtime Data from dmesg -nid001042: [Mon Aug 24 15:31:25 2026] MARK: Job 136832289.dbqs01 Start -nid001042: [Mon Aug 24 15:34:22 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.126.115@o2ib: 1 seconds -nid001042: [Mon Aug 24 15:34:22 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 9 previous similar messages -nid001042: [Mon Aug 24 15:35:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: [Mon Aug 24 15:40:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib -nid001042: [Mon Aug 24 15:45:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: [Mon Aug 24 15:50:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: [Mon Aug 24 15:51:07 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds -nid001042: [Mon Aug 24 15:51:07 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 3 previous similar messages -nid001042: [Mon Aug 24 15:55:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib -nid001042: [Mon Aug 24 16:00:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: [Mon Aug 24 16:05:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: [Mon Aug 24 16:06:06 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 0 seconds -nid001042: [Mon Aug 24 16:06:06 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages -nid001042: [Mon Aug 24 16:10:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib -nid001042: [Mon Aug 24 16:15:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: [Mon Aug 24 16:20:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: [Mon Aug 24 16:21:07 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds -nid001042: [Mon Aug 24 16:21:07 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages -nid001042: [Mon Aug 24 16:25:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib -nid001042: [Mon Aug 24 16:30:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: [Mon Aug 24 16:35:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: [Mon Aug 24 16:36:08 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 2 seconds -nid001042: [Mon Aug 24 16:36:08 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages -nid001042: [Mon Aug 24 16:40:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib -nid001042: [Mon Aug 24 16:45:16 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: [Mon Aug 24 16:50:16 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: [Mon Aug 24 16:51:06 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 0 seconds -nid001042: [Mon Aug 24 16:51:06 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages -nid001042: [Mon Aug 24 16:55:16 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib -nid001042: [Mon Aug 24 17:00:16 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: [Mon Aug 24 17:05:16 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: [Mon Aug 24 17:06:07 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds -nid001042: [Mon Aug 24 17:06:07 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages -nid001042: [Mon Aug 24 17:10:16 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib -nid001042: [Mon Aug 24 17:15:16 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: [Mon Aug 24 17:20:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: [Mon Aug 24 17:21:06 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 0 seconds -nid001042: [Mon Aug 24 17:21:06 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages -nid001042: [Mon Aug 24 17:25:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib -nid001042: [Mon Aug 24 17:30:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: [Mon Aug 24 17:35:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: [Mon Aug 24 17:36:07 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 2 seconds -nid001042: [Mon Aug 24 17:36:07 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages -nid001042: [Mon Aug 24 17:40:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib -nid001042: [Mon Aug 24 17:45:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: [Mon Aug 24 17:50:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: [Mon Aug 24 17:51:06 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 0 seconds -nid001042: [Mon Aug 24 17:51:06 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages -nid001042: [Mon Aug 24 17:55:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.122@o2ib, 10.253.127.25@o2ib, 10.253.126.115@o2ib -nid001042: [Mon Aug 24 18:00:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: [Mon Aug 24 18:05:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid001042: [Mon Aug 24 18:06:06 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 1 seconds -nid001042: [Mon Aug 24 18:06:06 2026] LNet: 13670:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages -nid001042: [Mon Aug 24 18:09:47 2026] MARK: Job 136832289.dbqs01 Complete. - ------------------------------------------------------------------- -Job 136832289.dbqs01 - Pre/Post job diff on HSN (MLX) Counters: -2026-08-24A--:--:--.------+--:-- nid001042 #### nid001042 - Job 136832289.dbqs01 HSN0 MLX Counter Post-Job Difference -nid001042: multicast:: 6008879 | multicast:: 6012605 | Diff: 3726 -nid001042: rx_bytes:: 163110612685 | rx_bytes:: 163113395743 | Diff: 2783058 -nid001042: rx_packets:: 66430584 | rx_packets:: 66438669 | Diff: 8085 -nid001042: tx_bytes:: 538745976119 | tx_bytes:: 538747461233 | Diff: 1485114 -nid001042: tx_packets:: 98281780 | tx_packets:: 98287151 | Diff: 5371 -nid001042: port_rcv_data:: 191996120403711 | port_rcv_data:: 191997155389563 | Diff: 1034985852 -nid001042: port_rcv_packets:: 404406083678 | port_rcv_packets:: 404407460630 | Diff: 1376952 -nid001042: port_xmit_data:: 196194153915823 | port_xmit_data:: 196197229201844 | Diff: 3075286021 -nid001042: port_xmit_packets:: 404692601710 | port_xmit_packets:: 404695866554 | Diff: 3264844 -nid001042: unicast_rcv_packets:: 404406083678 | unicast_rcv_packets:: 404407460630 | Diff: 1376952 -nid001042: unicast_xmit_packets:: 404692601710 | unicast_xmit_packets:: 404695866554 | Diff: 3264844 -nid001042: resp_cqe_error:: 76629 | resp_cqe_error:: 77187 | Diff: 558 -nid001042: resp_cqe_flush_error:: 73006 | resp_cqe_flush_error:: 73533 | Diff: 527 -nid001042: rx_write_requests:: 316459021 | rx_write_requests:: 316472245 | Diff: 13224 - ------------------------------------------------------------------- -Job 136832289.dbqs01 - Pre/Post job diff for Lustre Stats: -2026-08-24A--:--:--.------+--:-- nid001042 #### nid001042 - Job 136832289.dbqs01 Lustre Counters Post-Job Difference -nid001042: ### LustreStats: Multi-value diffs correspond to [samples min max total sum_of_squares] ### -nid001042: /lfs/h1 vah1-ffff930495072000 : -nid001042: h1: snapshot_time: Diffs: [ 9503] secs -nid001042: h1: elapsed_time: Diffs: [ 9503] secs -nid001042: h1: ioctl: Diffs: [ 2] reqs -nid001042: h1: getattr: Diffs: [ 15 0 0 333 82941] Avg_usec : 22.20 -nid001042: h1: inode_permission: Diffs: [ 2 0 0 4 10] Avg_usec : 2.00 -nid001042: h1: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 -nid001042: ---------------- -nid001042: /lfs/h2 vah2-ffff93049697b000 : -nid001042: h2: snapshot_time: Diffs: [ 9503] secs -nid001042: h2: elapsed_time: Diffs: [ 9503] secs -nid001042: h2: read_bytes: Diffs: [ 988855 0 0 11962842840 85421159327846640] Avg_bytes: 12097.67 -nid001042: h2: write_bytes: Diffs: [ 2658 0 0 12039314439 226727960562525923] Avg_bytes: 4529463.67 -nid001042: h2: read: Diffs: [ 988791 0 0 9133151 321036694735] Avg_usec : 9.23 -nid001042: h2: write: Diffs: [ 2765 0 0 8326464 165062691156] Avg_usec : 3011.37 -nid001042: h2: ioctl: Diffs: [ 778] reqs -nid001042: h2: open: Diffs: [ 450 0 0 66057 23640305] Avg_usec : 146.79 -nid001042: h2: close: Diffs: [ 451 0 0 44119 9927603] Avg_usec : 97.82 -nid001042: h2: seek: Diffs: [ 4175 0 0 558 15874] Avg_usec : .13 -nid001042: h2: readdir: Diffs: [ 74 0 0 8939 3857387] Avg_usec : 120.79 -nid001042: h2: truncate: Diffs: [ 112 0 0 1551724 142939744724] Avg_usec : 13854.67 -nid001042: h2: flock: Diffs: [ 52 0 0 4391 816975] Avg_usec : 84.44 -nid001042: h2: getattr: Diffs: [ 3035 0 0 292719 20388193851] Avg_usec : 96.44 -nid001042: h2: unlink: Diffs: [ 191 0 0 93127 55388701] Avg_usec : 487.57 -nid001042: h2: mkdir: Diffs: [ 2 0 0 1419 1480145] Avg_usec : 709.50 -nid001042: h2: rmdir: Diffs: [ 2 0 0 421 88645] Avg_usec : 210.50 -nid001042: h2: mknod: Diffs: [ 32 0 0 23572 55457274] Avg_usec : 736.62 -nid001042: h2: rename: Diffs: [ 2 0 0 802 322052] Avg_usec : 401.00 -nid001042: h2: getxattr: Diffs: [ 248 0 0 6617 1076167] Avg_usec : 26.68 -nid001042: h2: getxattr_hits: Diffs: [ 183] reqs -nid001042: h2: inode_permission: Diffs: [ 21725 0 0 11937 1746437] Avg_usec : .54 -nid001042: h2: opencount: Diffs: [ 452 0 0 1421 9965] Avg_reqs : 3.14 -nid001042: ---------------- -nid001042: /lfs/f1 vaf1-ffff9304942ba800 : -nid001042: f1: snapshot_time: Diffs: [ 9503] secs -nid001042: f1: elapsed_time: Diffs: [ 9503] secs -nid001042: f1: ioctl: Diffs: [ 2] reqs -nid001042: f1: getattr: Diffs: [ 11 0 0 249 52539] Avg_usec : 22.63 -nid001042: f1: inode_permission: Diffs: [ 2 0 0 3 5] Avg_usec : 1.50 -nid001042: f1: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 -nid001042: ---------------- -nid001042: /lfs/f2 vaf2-ffff930494ffa000 : -nid001042: f2: snapshot_time: Diffs: [ 9503] secs -nid001042: f2: elapsed_time: Diffs: [ 9502] secs -nid001042: f2: read_bytes: Diffs: [ 20 0 0 118645 1681617709] Avg_bytes: 5932.25 -nid001042: f2: write_bytes: Diffs: [ 18 0 0 29756 101912244] Avg_bytes: 1653.11 -nid001042: f2: read: Diffs: [ 20 0 0 842 279924] Avg_usec : 42.10 -nid001042: f2: write: Diffs: [ 480 0 0 8224 3919140] Avg_usec : 17.13 -nid001042: f2: ioctl: Diffs: [ 14] reqs -nid001042: f2: open: Diffs: [ 23 0 0 850 137546] Avg_usec : 36.95 -nid001042: f2: close: Diffs: [ 23 0 0 1836 262580] Avg_usec : 79.82 -nid001042: f2: seek: Diffs: [ 21 0 0 2 4] Avg_usec : .09 -nid001042: f2: readdir: Diffs: [ 2 0 0 342 116964] Avg_usec : 171.00 -nid001042: f2: getattr: Diffs: [ 38 0 0 6455 4049741] Avg_usec : 169.86 -nid001042: f2: mknod: Diffs: [ 11 0 0 3163 1364899] Avg_usec : 287.54 -nid001042: f2: getxattr: Diffs: [ 11 0 0 1331 165543] Avg_usec : 121.00 -nid001042: f2: inode_permission: Diffs: [ 138 0 0 589 49367] Avg_usec : 4.26 -nid001042: f2: opencount: Diffs: [ 25 0 0 56 230] Avg_reqs : 2.24 -nid001042: ---------------- -nid001042: /lfs/h3 vah3-ffff9304949ff000 : -nid001042: h3: snapshot_time: Diffs: [ 9503] secs -nid001042: h3: elapsed_time: Diffs: [ 9502] secs -nid001042: h3: ioctl: Diffs: [ 2] reqs -nid001042: h3: getattr: Diffs: [ 7 0 0 156 19958] Avg_usec : 22.28 -nid001042: h3: inode_permission: Diffs: [ 2 0 0 3 5] Avg_usec : 1.50 -nid001042: h3: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 -nid001042: ---------------- -nid001042: /apps vaf2-ffff9304949f8000 : -nid001042: apps: snapshot_time: Diffs: [ 9503] secs -nid001042: apps: elapsed_time: Diffs: [ 9502] secs -nid001042: apps: read_bytes: Diffs: [ 15820 0 0 282099158 26044381430104] Avg_bytes: 17831.80 -nid001042: apps: read: Diffs: [ 15820 0 0 775405 260691509] Avg_usec : 49.01 -nid001042: apps: ioctl: Diffs: [ 11515] reqs -nid001042: apps: open: Diffs: [ 18710 0 0 1793528 385538050] Avg_usec : 95.85 -nid001042: apps: close: Diffs: [ 18710 0 0 1643986 319627350] Avg_usec : 87.86 -nid001042: apps: mmap: Diffs: [ 8635 0 0 51163 779597] Avg_usec : 5.92 -nid001042: apps: page_fault: Diffs: [ 181098 0 0 13655 62315] Avg_usec : .07 -nid001042: apps: seek: Diffs: [ 22858 0 0 9 21] Avg_usec : 0 -nid001042: apps: readdir: Diffs: [ 7002 0 0 441061 390032177] Avg_usec : 62.99 -nid001042: apps: getattr: Diffs: [ 83100 0 0 1446350 229129686] Avg_usec : 17.40 -nid001042: apps: getxattr: Diffs: [ 14 0 0 347 46883] Avg_usec : 24.78 -nid001042: apps: getxattr_hits: Diffs: [ 12] reqs -nid001042: apps: inode_permission: Diffs: [ 1142514 0 0 162992 445224] Avg_usec : .14 -nid001042: apps: opencount: Diffs: [ 18712 0 0 40780 201946] Avg_reqs : 2.17 -nid001042: ---------------- - ------------------------------------------------------------------- -### Job 136832289.dbqs01 - NFS Statistics for job duration: -#### 2026-08-24A--:--:--.------+--:-- nid001042 Job 136832289.dbqs01 - DEBUG-NFS: Unable to find NFS stats file: /lfs/f2/hpc/jobdata/136832289/nfsstats.136832289.nid001042 - ------------------------------------------------------------------- -### Job 136832289.dbqs01 - Lustre evictions (if present): - ------------------------------------------------------------------- -### Job 136832289.dbqs01 - Exit status is 0 - ------------------------------------------------------------------- -Job 136832289.dbqs01 - Job summary: -Job Id: 136832289.dbqs01 - Job_Name = ESMPy - Job_Owner = keston.smith@dlogin09.dogwood.wcoss2.ncep.noaa.gov - resources_used.cpupercent = 102 - resources_used.cput = 00:34:30 - resources_used.mem = 23201368kb - resources_used.ncpus = 16 - resources_used.vmem = 20707600kb - resources_used.walltime = 02:37:56 - job_state = R - queue = dev - server = dbqs01 - Account_Name = NWPS-DEV - Checkpoint = u - ctime = Mon Aug 24 15:35:37 2026 - Error_Path = dlogin09.dogwood.wcoss2.ncep.noaa.gov:/lfs/h2/emc/couple/noscr - ub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/sor - c/ESMPy.e136832289 - exec_host = nid001042/0*16 - exec_vnode = (nid001042:ncpus=16:mem=268435456kb) - Hold_Types = n - Join_Path = oe - Keep_Files = oed - Mail_Points = a - mtime = Mon Aug 24 18:13:41 2026 - Output_Path = dlogin09.dogwood.wcoss2.ncep.noaa.gov:/lfs/h2/emc/couple/nosc - rub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/so - rc/ESMPy.o136832289 - Priority = 0 - qtime = Mon Aug 24 15:35:37 2026 - Rerunable = False - Resource_List.alvl = 2 - Resource_List.aslr = True - Resource_List.debug = True - Resource_List.dfs = False - Resource_List.hyper = True - Resource_List.ldebug = False - Resource_List.mem = 256gb - Resource_List.ncpus = 16 - Resource_List.nodect = 1 - Resource_List.one-shot = False - Resource_List.place = exclhost - Resource_List.select = 1:ncpus=16:mem=256GB - Resource_List.turbo = True - Resource_List.walltime = 04:00:00 - schedselect = 1:ncpus=16:mem=256GB:prepost=False - stime = Mon Aug 24 15:35:38 2026 - session_id = 2645723 - Shell_Path_List = /bin/bash - jobdir = /u/keston.smith - substate = 42 - Variable_List = PBS_O_HOME=/u/keston.smith,PBS_O_LANG=en_US.UTF-8, - PBS_O_LOGNAME=keston.smith, - PBS_O_PATH=/opt/cray/bin:/u/keston.smith/.local/bin:/usr/local/bin:/us - r/bin:/bin:/opt/c3/bin:/opt/pbs/bin:/sbin, - PBS_O_MAIL=/var/spool/mail/keston.smith,PBS_O_SHELL=/bin/bash, - PBS_O_WORKDIR=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWP - S/dev/compute_interpolation_weights/sorc,PBS_O_SYSTEM=Linux, - LMOD_FAMILY_CRAYPE_NETWORK_VERSION=false,meshID=oc_500m_10km, - LD_LIBRARY_PATH=/opt/cray/lib64, - LS_COLORS=no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd= - 40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com - =01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tg - z=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.l - zma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2= - 00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.xz=00;31:*.avi=01;35:*.bmp - =01;35:*.dl=01;35:*.fli=01;35:*.gif=01;35:*.gl=01;35:*.jpg=01;35:*.jpeg - =01;35:*.mkv=01;35:*.mng=01;35:*.mov=01;35:*.mp4=01;35:*.mpg=01;35:*.pc - x=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.svg=01;35:*.t - ga=01;35:*.tif=01;35:*.webm=01;35:*.webp=01;35:*.wmv=01;35:*.xbm=01;35: - *.xcf=01;35:*.xpm=01;35:*.aiff=00;32:*.ape=00;32:*.au=00;32:*.flac=00;3 - 2:*.m4a=00;32:*.mid=00;32:*.mp3=00;32:*.mpc=00;32:*.ogg=00;32:*.voc=00; - 32:*.wav=00;32:*.wma=00;32:*.wv=00;32:,HOSTTYPE=x86_64, - __LMOD_REF_COUNT_PATH=/opt/cray/bin:1;/u/keston.smith/.local/bin:1;/us - r/local/bin:1;/usr/bin:1;/bin:2;/opt/c3/bin:1;/opt/pbs/bin:1;/sbin:1, - _ModuleTable002_=ck5hbWUiXT0iY3JheXBlLW5ldHdvcmstb2ZpIix9LFsiY3JheXBlL - Xg4Ni1yb21lIl09e1siZm4iXT0iL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY3Jh - eXBlLXRhcmdldHMvZGVmYXVsdC9jcmF5cGUteDg2LXJvbWUubHVhIixbImZ1bGxOYW1lIl0 - 9ImNyYXlwZS14ODYtcm9tZSIsWyJsb2FkT3JkZXIiXT0xLHByb3BUPXt9LFsic3RhY2tEZX - B0aCJdPTEsWyJzdGF0dXMiXT0iYWN0aXZlIixbInVzZXJOYW1lIl09ImNyYXlwZS14ODYtc - m9tZSIsfSxlbnZ2YXI9e1siZm4iXT0iL2FwcHMvcHJvZC9sbW9kdWxlcy9zeXNfY29yZS9l - bnZ2YXIvMS4wIixbImZ1bGxOYW1lIl09ImVudnZhci8xLjAiLFsibG9hZE9yZGVyIl09NCx - wcm9wVD17fSxbInN0YWNrRGVwdGgiXT0w, - SSH_CONNECTION=192.58.153.7 55526 192.58.153.19 22, - mesh=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/com - pute_interpolation_weights/sorc/../../..//fix/rwps.oc_500m_10km.msh, - XAUTHLOCALHOSTNAME=dlogin09,LESSCLOSE=lessclose.sh %s %s, - XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB, - LMOD_FAMILY_CRAYPE_CPU=craype-x86-rome, - LMOD_MODULERCFILE=/apps/prod/lmodules/.modulerc.lua, - PE_PRODUCT_LIST=CRAYPE_X86_ROME,LMOD_IGNORE_CACHE=yes,LANG=en_US.UTF-8, - WINDOWMANAGER=xterm,LESS=-M -I -R,DISPLAY=localhost:15.0, - HISTTIMEFORMAT=%F %T,HOSTNAME=dlogin09, - LMOD_SYSTEM_DEFAULT_MODULES=envvar/1.0, - OLDPWD=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/c - ompute_interpolation_weights/ecf, - __LMOD_REF_COUNT__LMFILES_=/opt/cray/pe/lmod/modulefiles/craype-target - s/default/craype-x86-rome.lua:1;/opt/cray/modulefiles/libfabric/1.20.1: - 1;/opt/cray/pe/lmod/modulefiles/craype-targets/default/craype-network-o - fi.lua:1;/apps/prod/lmodules/sys_core/envvar/1.0:1, - CONFIG_SITE=/usr/share/site/x86_64-unknown-linux-gnu,CSHEDIT=emacs, - LMOD_CUSTOM_CNCM_INTEL_19_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX - =/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/apps - /ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4, - LMOD_CUSTOM_COMPILER_GNU_8_0_PREFIX=/apps/prod/lmodules/gcc/11.2.0:/ap - ps/prod/lmodules/gcc/10.2.0,GPG_TTY=/dev/pts/21, - LESS_ADVANCED_PREPROCESSOR=no,COLORTERM=1, - LMOD_FAMILY_CRAYPE_NETWORK=craype-network-ofi, - MACHTYPE=x86_64-suse-linux, - __LMOD_REF_COUNT_LD_LIBRARY_PATH=/opt/cray/lib64:1, - __LMOD_REF_COUNT_PKG_CONFIG_PATH=/opt/cray/lib64/pkgconfig:1, - LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_UCX_1_0_PREFIX=/apps/prod/lmodules/cce - /13.0.0:/apps/prod/lmodules/cce/12.0.3:/apps/prod/lmodules/cce/11.0.4, - tmp=/tmpfiles,SSH_AUTH_SOCK=/tmp/ssh-sLEbl3PUAYOZ/agent.543172, - _ModuleTable004_=U0lPTi9tb2R1bGVmaWxlcyIsIi91c3Ivc2hhcmUvbW9kdWxlcy9tb - 2R1bGVmaWxlcyIsIi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvTGludXgiLCIvdXNyL3NoYXJl - L21vZHVsZWZpbGVzL0NvcmUiLCIvdXNyL3NoYXJlL2xtb2QvbG1vZC9tb2R1bGVmaWxlcy9 - Db3JlIiwiL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY29yZSIsIi9vcHQvY3JheS - 9wZS9sbW9kL21vZHVsZWZpbGVzL2NyYXlwZS10YXJnZXRzL2RlZmF1bHQiLCIvYXBwcy9wc - m9kL2xtb2R1bGVzL3N5c19jb3JlIiwiL2FwcHMvb3BzL3Byb2QvbmNvL21vZHVsZWZpbGVz - L2NvcmUiLCIvYXBwcy9wcm9kL2xtb2R1bGVzL2NvcmUiLCIvb3B0L2NyYXkvbW9kdWxlZml - sZXMiLH0sWyJzeXN0ZW1CYXNlTVBBVEgi,MINICOM=-c on, - QT_SYSTEM_DIR=/usr/share/desktop-data,OSTYPE=linux, - meshname=rwps.oc_500m_10km,USER=keston.smith, - MODULES_SET_SHELL_STARTUP=0,PAGER=less,MODULE_VERSION=3.2.10, - LMOD_CUSTOM_CNCM_GNU_8_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX=/a - pps/prod/lmodules/GCC_cray_mpich/10.2.0/cray-mpich/8.1.4, - LMOD_CUSTOM_CNCM_GNU_8_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX=/a - pps/prod/lmodules/GCC_cray_mpich/10.2.0/cray-mpich/8.1.4, - CRAY_CPU_TARGET=x86-rome, - LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PR - EFIX=/apps/prod/lmodules/CCE_cray_mpich/11.0.4/cray-mpich/8.1.4, - __LMOD_REF_COUNT_MODULEPATH=/opt/cray/pe/lmod/modulefiles/net/ofi/1.0: - 1;/opt/cray/pe/lmod/modulefiles/cpu/x86-rome/1.0:1;/usr/share/modules:1 - ;/usr/share/Modules/$MODULE_VERSION/modulefiles:1;/usr/share/modules/mo - dulefiles:1;/usr/share/modulefiles/Linux:1;/usr/share/modulefiles/Core: - 1;/usr/share/lmod/lmod/modulefiles/Core:1;/opt/cray/pe/lmod/modulefiles - /core:1;/opt/cray/pe/lmod/modulefiles/craype-targets/default:1;/apps/pr - od/lmodules/sys_core:1;/apps/ops/prod/nco/modulefiles/core:1;/apps/prod - /lmodules/core:1;/opt/cray/modulefiles:1, - COMINrrfs=/lfs/h1/ops/prod/com/rrfs/v1.0/rrfs./,MORE=-sl, - __LMOD_REF_COUNT_LOADEDMODULES=craype-x86-rome:1;libfabric/1.20.1:1;cr - aype-network-ofi:1;envvar/1.0:1, - PWD=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp - ute_interpolation_weights/sorc, - COMINrtofs=/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs./, - HOME=/u/keston.smith, - COMINnbm=/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.//grib2, - PELOCAL_PRGENV=true,SSH_AGENT_PID=543173,HOST=dlogin09, - SSH_CLIENT=192.58.153.7 55526 22,LMOD_VERSION=8.3.1, - XNLSPATH=/usr/share/X11/nls,CRAY_LMOD_CPU=x86-rome/1.0, - LMOD_FAMILY_CRAYPE_CPU_VERSION=false, - BASH_ENV=/usr/share/lmod/lmod/init/bash,XDG_DATA_DIRS=/usr/share, - LMOD_CUSTOM_CNCM_INTEL_19_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX - =/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/apps - /ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4, - CRAY_LMOD_NET=ofi/1.0, - RWPSroot=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev - /compute_interpolation_weights/sorc/../../../,COMINlocal=/tmpfiles, - __LMOD_REF_COUNT_LMOD_CUSTOM_COMPILER_INTEL_19_0_PREFIX=/apps/ops/prod - /nco/models/modulefiles:1;/apps/prod/lmodules/intel/19.1.3.304:1;/apps/ - ops/prod/libs/modulefiles/compiler/intel/19.1.3.304:1;/apps/ops/prod/nc - o/modulefiles/compiler/intel/19.1.3.304:1,LIBGL_DEBUG=quiet, - LMOD_CUSTOM_COMPILER_INTEL_19_0_PREFIX=/apps/ops/prod/nco/models/modul - efiles:/apps/prod/lmodules/intel/19.1.3.304:/apps/ops/prod/libs/modulef - iles/compiler/intel/19.1.3.304:/apps/ops/prod/nco/modulefiles/compiler/ - intel/19.1.3.304,PROFILEREAD=true,LMOD_sys=Linux, - _ModuleTable001_=X01vZHVsZVRhYmxlXz17WyJNVHZlcnNpb24iXT0zLFsiY19yZWJ1a - WxkVGltZSJdPWZhbHNlLFsiY19zaG9ydFRpbWUiXT1mYWxzZSxkZXB0aFQ9e30sZmFtaWx5 - PXtbImNyYXlwZV9jcHUiXT0iY3JheXBlLXg4Ni1yb21lIixbImNyYXlwZV9uZXR3b3JrIl0 - 9ImNyYXlwZS1uZXR3b3JrLW9maSIsfSxtVD17WyJjcmF5cGUtbmV0d29yay1vZmkiXT17Wy - JmbiJdPSIvb3B0L2NyYXkvcGUvbG1vZC9tb2R1bGVmaWxlcy9jcmF5cGUtdGFyZ2V0cy9kZ - WZhdWx0L2NyYXlwZS1uZXR3b3JrLW9maS5sdWEiLFsiZnVsbE5hbWUiXT0iY3JheXBlLW5l - dHdvcmstb2ZpIixbImxvYWRPcmRlciJdPTMscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MSx - bInN0YXR1cyJdPSJhY3RpdmUiLFsidXNl, - LOADEDMODULES=craype-x86-rome:libfabric/1.20.1:craype-network-ofi:envv - ar/1.0,LMOD_AVAIL_STYLE=en_grouped:system,CRAYPE_NETWORK_TARGET=ofi, - _ModuleTable006_=b2R1bGVmaWxlcyIsfQ==, - __LMOD_REF_COUNT_MANPATH=/opt/cray/share/man:1;/usr/share/lmod/lmod/sh - are/man:1;/usr/share/man:1;/opt/c3/man:1;/opt/pbs/share/man:1, - _ModuleTable003_=LFsic3RhdHVzIl09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJdPSJlbnZ2Y - XIvMS4wIix9LGxpYmZhYnJpYz17WyJmbiJdPSIvb3B0L2NyYXkvbW9kdWxlZmlsZXMvbGli - ZmFicmljLzEuMjAuMSIsWyJmdWxsTmFtZSJdPSJsaWJmYWJyaWMvMS4yMC4xIixbImxvYWR - PcmRlciJdPTIscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MixbInN0YXR1cyJdPSJhY3Rpdm - UiLFsidXNlck5hbWUiXT0ibGliZmFicmljIix9LH0sbXBhdGhBPXsiL29wdC9jcmF5L3BlL - 2xtb2QvbW9kdWxlZmlsZXMvbmV0L29maS8xLjAiLCIvb3B0L2NyYXkvcGUvbG1vZC9tb2R1 - bGVmaWxlcy9jcHUveDg2LXJvbWUvMS4wIiwiL3Vzci9zaGFyZS9tb2R1bGVzIiwiL3Vzci9 - zaGFyZS9Nb2R1bGVzLyRNT0RVTEVfVkVS,LMOD_ROOT=/usr/share/lmod, - SSH_TTY=/dev/pts/21,FROM_HEADER=,MAIL=/var/spool/mail/keston.smith, - COMINstofs=/lfs/h1/ops/prod/com/stofs/v3.1/stofs_2d_glo., - LESSKEY=/etc/lesskey.bin,TERM=xterm-256color,SHELL=/bin/bash, - LMOD_ADMIN_FILE=/apps/prod/lmodules/admin.list, - LMOD_CUSTOM_COMPILER_GNU_8_0_UCX_1_0_PREFIX=/apps/prod/lmodules/gcc/11 - .2.0:/apps/prod/lmodules/gcc/10.2.0,lmod_prefix_path=/usr/share, - LMOD_CUSTOM_COMPILER_CRAYCLANG_10_0_PREFIX=/apps/prod/lmodules/cce/13. - 0.0:/apps/prod/lmodules/cce/12.0.3:/apps/prod/lmodules/cce/11.0.4, - _ModuleTable_Sz_=6,LS_OPTIONS=-N --color=tty -T 0, - LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PR - EFIX=/apps/prod/lmodules/CCE_cray_mpich/11.0.4/cray-mpich/8.1.4, - TMOUT=1800,PYTHONSTARTUP=/etc/pythonstart, - RWPSfix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPS,SHLVL=3, - LANGUAGE=en_US.UTF-8,G_FILENAME_ENCODING=@locale\,UTF-8\,ISO-8859-15\, - CP1252, - LMOD_CUSTOM_COMPILER_INTEL_19_0_UCX_1_0_PREFIX=/apps/prod/lmodules/int - el/19.1.3.304:/apps/ops/prod/libs/modulefiles/compiler/intel/19.1.3.304 - :/apps/ops/prod/nco/modulefiles/compiler/intel/19.1.3.304, - HPC_OPT=/apps/ops/prod/libs, - MANPATH=/opt/cray/share/man:/usr/share/lmod/lmod/share/man:/usr/share/ - man:/opt/c3/man:/opt/pbs/share/man,OSCAR_HOME=/opt/oscar, - fix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp - ute_interpolation_weights/sorc/../../..//fix, - MODULEPATH=/opt/cray/pe/lmod/modulefiles/net/ofi/1.0:/opt/cray/pe/lmod - /modulefiles/cpu/x86-rome/1.0:/usr/share/modules:/usr/share/Modules/$MO - DULE_VERSION/modulefiles:/usr/share/modules/modulefiles:/usr/share/modu - lefiles/Linux:/usr/share/modulefiles/Core:/usr/share/lmod/lmod/modulefi - les/Core:/opt/cray/pe/lmod/modulefiles/core:/opt/cray/pe/lmod/modulefil - es/craype-targets/default:/apps/prod/lmodules/sys_core:/apps/ops/prod/n - co/modulefiles/core:/apps/prod/lmodules/core:/opt/cray/modulefiles, - LOGNAME=keston.smith,MODULE_VERSION_STACK=3.2.10, - MODULEPATH_ROOT=/usr/share/modulefiles, - LMOD_PACKAGE_PATH=/apps/prod/lmodules,XDG_CONFIG_DIRS=/etc/xdg, - PATH=/opt/cray/bin:/u/keston.smith/.local/bin:/usr/local/bin:/usr/bin: - /bin:/opt/c3/bin:/opt/pbs/bin:/sbin, - __LMOD_REF_COUNT_PE_PRODUCT_LIST=CRAYPE_X86_ROME:1, - _LMFILES_=/opt/cray/pe/lmod/modulefiles/craype-targets/default/craype- - x86-rome.lua:/opt/cray/modulefiles/libfabric/1.20.1:/opt/cray/pe/lmod/m - odulefiles/craype-targets/default/craype-network-ofi.lua:/apps/prod/lmo - dules/sys_core/envvar/1.0,MODULESHOME=/usr/share/lmod/lmod, - PKG_CONFIG_PATH=/opt/cray/lib64/pkgconfig, - LMOD_SETTARG_FULL_SUPPORT=no,INFOPATH=:/apps/docs/info, - G_BROKEN_FILENAMES=1,HISTSIZE=10000,LMOD_PKG=/usr/share/lmod/lmod, - CPU=x86_64, - _ModuleTable005_=XT0iL3Vzci9zaGFyZS9tb2R1bGVzOi91c3Ivc2hhcmUvTW9kdWxlc - y8kTU9EVUxFX1ZFUlNJT04vbW9kdWxlZmlsZXM6L3Vzci9zaGFyZS9tb2R1bGVzL21vZHVs - ZWZpbGVzOi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvTGludXg6L3Vzci9zaGFyZS9tb2R1bGV - maWxlcy9Db3JlOi91c3Ivc2hhcmUvbG1vZC9sbW9kL21vZHVsZWZpbGVzL0NvcmU6L29wdC - 9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY29yZTovb3B0L2NyYXkvcGUvbG1vZC9tb2R1b - GVmaWxlcy9jcmF5cGUtdGFyZ2V0cy9kZWZhdWx0Oi9hcHBzL3Byb2QvbG1vZHVsZXMvc3lz - X2NvcmU6L2FwcHMvb3BzL3Byb2QvbmNvL21vZHVsZWZpbGVzL2NvcmU6L2FwcHMvcHJvZC9 - sbW9kdWxlcy9jb3JlOi9vcHQvY3JheS9t, - LMOD_CMD=/usr/share/lmod/lmod/libexec/lmod,CVS_RSH=ssh, - LESSOPEN=lessopen.sh %s,LMOD_DIR=/usr/share/lmod/lmod/libexec, - LC_TIME=C.UTF-8, - BASH_FUNC_module%%=() { eval $($LMOD_CMD bash \"$@\") && eval $(${LMO - D_SETTARG_CMD:-:} -s sh) - euser = keston.smith - egroup = emc - hashname = 136832289.dbqs01 - queue_rank = 1787585737290750 - queue_type = E - comment = Job run at Mon Aug 24 at 15:35 on (nid001042:ncpus=16:mem=2684354 - 56kb) - etime = Mon Aug 24 15:35:37 2026 - umask = 22 - run_count = 6 - eligible_time = 00:00:08 - accrue_type = 3 - Submit_arguments = -V /lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/ - RWPS/dev/compute_interpolation_weights/sorc/../../..//dev/compute_inter - polation_weights/ecf/compute_interpolation_weights.ecf - project = NWPS-DEV - run_version = 1 - Submit_Host = dlogin09.dogwood.wcoss2.ncep.noaa.gov - server_instance_id = dbqs01.dogwood.wcoss2.ncep.noaa.gov:15001 - - ------------------------------------------------------------------- -Job 136832289.dbqs01 - PBS tracejob output (for parent mom node only): - -Job: 136832289.dbqs01 - -08/24/2026 15:35:38 M update_job_usage: CPU usage: 0.000 secs -08/24/2026 15:35:38 M update_job_usage: cpupercent initialized to zero -08/24/2026 15:35:38 M update_job_usage: Memory usage: mem=0b -08/24/2026 15:35:43 M Started, pid = 2645723 -08/24/2026 15:37:00 M update_job_usage: CPU usage: 75.000 secs -08/24/2026 15:37:00 M update_job_usage: 136832289.dbqs01 measured interval cpupercent 92 increased job cpupercent to 92 -08/24/2026 15:37:00 M update_job_usage: Memory usage: mem=1842656kb -08/24/2026 15:39:01 M update_job_usage: CPU usage: 199.000 secs -08/24/2026 15:39:01 M update_job_usage: 136832289.dbqs01 measured interval cpupercent 102 increased job cpupercent to 102 -08/24/2026 15:39:01 M update_job_usage: Memory usage: mem=2243880kb -08/24/2026 15:41:03 M update_job_usage: CPU usage: 324.000 secs -08/24/2026 15:41:03 M update_job_usage: Memory usage: mem=5884468kb -08/24/2026 15:43:04 M update_job_usage: CPU usage: 448.000 secs -08/24/2026 15:43:04 M update_job_usage: Memory usage: mem=6786064kb -08/24/2026 15:45:05 M update_job_usage: CPU usage: 572.000 secs -08/24/2026 15:45:05 M update_job_usage: Memory usage: mem=9392328kb -08/24/2026 15:47:06 M update_job_usage: CPU usage: 694.000 secs -08/24/2026 15:47:06 M update_job_usage: Memory usage: mem=9392328kb -08/24/2026 15:49:07 M update_job_usage: CPU usage: 817.000 secs -08/24/2026 15:49:07 M update_job_usage: Memory usage: mem=9392328kb -08/24/2026 15:51:09 M update_job_usage: CPU usage: 939.000 secs -08/24/2026 15:51:09 M update_job_usage: Memory usage: mem=16637064kb -08/24/2026 15:53:10 M update_job_usage: CPU usage: 1064.000 secs -08/24/2026 15:53:10 M update_job_usage: Memory usage: mem=16637064kb -08/24/2026 15:55:11 M update_job_usage: CPU usage: 1188.000 secs -08/24/2026 15:55:11 M update_job_usage: Memory usage: mem=16637064kb -08/24/2026 15:57:12 M update_job_usage: CPU usage: 1309.000 secs -08/24/2026 15:57:12 M update_job_usage: Memory usage: mem=16637064kb -08/24/2026 15:59:13 M update_job_usage: CPU usage: 1430.000 secs -08/24/2026 15:59:13 M update_job_usage: Memory usage: mem=16637064kb -08/24/2026 16:01:15 M update_job_usage: CPU usage: 1551.000 secs -08/24/2026 16:01:15 M update_job_usage: Memory usage: mem=21896884kb -08/24/2026 16:03:16 M update_job_usage: CPU usage: 1675.000 secs -08/24/2026 16:03:16 M update_job_usage: Memory usage: mem=21896884kb -08/24/2026 16:05:17 M update_job_usage: CPU usage: 1796.000 secs -08/24/2026 16:05:17 M update_job_usage: Memory usage: mem=21896884kb -08/24/2026 16:07:18 M update_job_usage: CPU usage: 1917.000 secs -08/24/2026 16:07:18 M update_job_usage: Memory usage: mem=22913548kb -08/24/2026 17:09:56 M update_job_usage: CPU usage: 1997.000 secs -08/24/2026 18:12:32 M update_job_usage: CPU usage: 2070.000 secs -08/24/2026 18:14:02 M task 00000001 terminated -08/24/2026 18:14:02 M Terminated -08/24/2026 18:14:02 M task 00000001 cput=00:35:39 -08/24/2026 18:14:02 M kill_job -08/24/2026 18:14:02 M nid001042 cput=00:34:30 mem=23201368kb -08/24/2026 18:14:02 M update_job_usage: CPU usage: 2136.000 secs -08/24/2026 18:14:02 M update_job_usage: Memory usage: mem=23201368kb - ------------------------------------------------------------------- -To see full PBS log data, run: /sfs/admin/scripts/tracejob.sh 136832289.dbqs01 - -================================================================== -END - DEBUG INFO -================================================================== - -Job 136832289.dbqs01 - Epilogue DEBUG complete. DEBUG Execution time: 6 seconds -Job 136832289.dbqs01 - Epilogue complete. Execution time: 9 seconds -##### Job 136832289.dbqs01 - PBS Job Script: -(Note: Duplicate #PBS entries are a function how PBS interprets and caches the original job script.) - -#!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=04:00:00 -##PBS -l select=1:ncpus=8:mem=128GB -#PBS -l select=1:ncpus=16:mem=256GB -##PBS -l select=1:ncpus=32:mem=256GB -###PBS -l select=1:ncpus=1:mem=8G -#PBS -l place=excl -#PBS -l debug=true - -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - -pip list -v - -cd $RWPSroot/ush/preprocess - -SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" -date="20260730" -cycl="00" -Nprocs=16 - - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - -rrfs_hi=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.hi.nc -rrfs_pr=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.pr.nc -rrfs_ak=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.ak.nc -rrfs_na=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.na.nc -rrfs_conus=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.conus.nc - -out="../../fix" - -rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" -rrfsDst="$out/DistToBndy.$meshname.rrfs" - -#no extrapolation with rrfs forecasts -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_pr $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 > GenWhts.rrfs.pr.out -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_ak $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 > GenWhts.rrfs.ak.out -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_na $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 > GenWhts.rrfs.na.out -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_conus $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out - -nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc -nbmIntrp="$out/InterpolationWeights.$meshname.nbm" -nbmDst="$out/DistToBndy.$meshname.nbm" -#extrapolate nbm oc wind to all points -python ./compute_gridded_to_rwps_interp_weights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out - -nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc -#do not extrapolate for NBM .ak. domain -python ./compute_gridded_to_rwps_interp_weights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out - -rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc -rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" -rtofsDst="$out/DistToBndy.$meshname.rtofs" - -#extrapolate rtofs .glo. for full ice coverage - -python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out - - -rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc -#do not extrapolate rtofs .glo. currents -python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.current.nc $rtofsDst.current.nc -1 > GenWhts.rtofs.current.out - - - -#Old v2 of stofs -stofs_glo="$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" - -mkdir -p STOFSInterpWeights.$meshname -## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs - -## Now run parallel job script - -qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS - -wait - -#combine text file output of parallel jobs -cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt - -# convert output weights to netcdf file -python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 -cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.v2.nc -cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.v2.nc -mv DistToBndy.$meshname.stofs.nc DistToBndy.$meshname.stofs.v2.nc -mv InterpWeights.$meshname.stofs.nc InterpWeights.$meshname.stofs.v2.nc - -rm -rf STOFSInterpWeights.$meshname -rm InterpWeights.$meshname.stofs.txt -rm *.out -rm ESMPy* - - -mkdir -p STOFSInterpWeights.$meshname -#compute stofs weights for current(v3) stofs mesh -stofs_glo="$SID/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc" - -## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs - -## Now run parallel job script - -qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS - -wait - -#combine text file output of parallel jobs -cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt - -# convert output weights to netcdf file -python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 -cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc -cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc - - -rm -rf STOFSInterpWeights.$meshname -rm InterpWeights.$meshname.stofs.txt -rm *.out -rm ESMPy* - - - - -##### End of job script ------------------------------------------------------------------- - diff --git a/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136853423 b/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136853423 deleted file mode 100644 index 1137819..0000000 --- a/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136853423 +++ /dev/null @@ -1,736 +0,0 @@ -PBS: Running prologue on parent mom node: nid001586... -Job 136853423.dbqs01 nodelist: nid001586 -Job 136853423.dbqs01 - Prologue complete. Execution time: 4 seconds -Agent pid 3935289 -Identity added: /u/keston.smith/.ssh/id_ed25519 (keston.smith@noaa.gov) -/u/keston.smith/.bashrc: line 46: alias: eval "$(ssh-agent -s)"; ssh-add ~/.ssh/id_ed25519: not found -Resetting modules to system default. Reseting $MODULEPATH back to system default. All extra directories will be removed from $MODULEPATH. -Package Version Location Installer -------------------------- ----------- ---------------------------------------------------------------------------------- --------- -Cartopy 0.24.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -certifi 2025.1.31 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -cftime 1.6.4.post1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -contourpy 1.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -cycler 0.12.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -esmpy 8.6.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -fonttools 4.55.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -geographiclib 2.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -geopy 2.4.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -Jinja2 3.1.5 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -kiwisolver 1.4.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -MarkupSafe 3.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -matplotlib 3.10.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -netCDF4 1.7.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -numpy 2.2.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -packaging 24.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pandas 2.2.3 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pillow 11.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pip 25.0.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pyparsing 3.2.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pyproj 3.7.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pyshp 2.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -python-dateutil 2.9.0.post0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pytz 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -PyYAML 6.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -scipy 1.15.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -setuptools 75.8.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -setuptools-git-versioning 2.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -shapely 2.0.7 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -six 1.17.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -tzdata 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -xarray 2025.1.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in - with xr.open_dataset(weights_file, overwrite=True) as ds_s: - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset - backend_ds = backend.open_dataset( - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in - with xr.open_dataset(weights_file, overwrite=True) as ds_s: - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset - backend_ds = backend.open_dataset( - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in - with xr.open_dataset(weights_file, overwrite=True) as ds_s: - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset - backend_ds = backend.open_dataset( - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in - with xr.open_dataset(weights_file, overwrite=True) as ds_s: - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset - backend_ds = backend.open_dataset( - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in - with xr.open_dataset(weights_file, overwrite=True) as ds_s: - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset - backend_ds = backend.open_dataset( - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' -PBS: Running epilogue on parent mom node: nid001586... -================================================================== -BEGIN - DEBUG INFO -================================================================== -Job 136853423.dbqs01 - Post Job Mem Usage: -nid001586: 2026-08-24.15 1 =========================================== -nid001586: 2026-08-24.15 2 #### Node Memory Usage for nid001586 #### -nid001586: 2026-08-24.15 3 ------------------ -nid001586: 2026-08-24.15 4 Mem: total:526983796 used:17219808 free:510819960 shared:715336 cache:1366576 avail:509763988 -nid001586: 2026-08-24.15 5 4.0K /dev/shm -nid001586: 2026-08-24.15 6 40K /tmp -nid001586: 2026-08-24.15 7 =========================================== -nid001586: 2026-08-24.26 1 =========================================== -nid001586: 2026-08-24.26 2 #### Node Memory Usage for nid001586 #### -nid001586: 2026-08-24.26 3 ------------------ -nid001586: 2026-08-24.26 4 Mem: total:526983796 used:17759392 free:509822336 shared:715456 cache:2282592 avail:509224404 -nid001586: 2026-08-24.26 5 4.0K /dev/shm -nid001586: 2026-08-24.26 6 40K /tmp -nid001586: 2026-08-24.26 7 =========================================== - ------------------------------------------------------------------- ------------------------------------------------------------------- -Job 136853423.dbqs01 - Post Job Mem Usage Profile: -2026-08-24A--:--:--.------+--:-- nid001586 #### nid001586 - Job 136853423.dbqs01 NUMA Node Memory Allocation and Fragmentation Reports -Starting Fragmentation Report for nid001586 -Node Order9 Order10 Score MB_Free %Free State -0 9924 1154 12232 24464 38 MARG -1 6815 5838 18491 36982 57 OK -2 3772 9766 23304 46608 72 OK -3 3000 11311 25622 51244 79 OK -4 4251 10529 25309 50618 78 OK -5 1323 13486 28295 56590 87 OK -6 2002 13211 28424 56848 88 OK -7 1385 13301 27987 55974 86 OK - -** nid001586 : node0_score=12232 node0_state=MARG uptime=4588249s Overall=MARG ** -Ending Fragmentation Report for nid001586 -Node Order9 Order10 Score MB_Free %Free State -0 9926 1154 12234 24468 38 MARG -1 6815 5838 18491 36982 57 OK -2 3771 9767 23305 46610 72 OK -3 2999 11312 25623 51246 79 OK -4 4251 10529 25309 50618 78 OK -5 1322 13487 28296 56592 87 OK -6 2003 13211 28425 56850 88 OK -7 1385 13301 27987 55974 86 OK - -** nid001586 : node0_score=12234 node0_state=MARG uptime=4588380s Overall=MARG ** -2026-08-24A--:--:--.------+--:-- nid001586 #### nid001586 - Job 136853423.dbqs01 VMSTATS Memory Report -**Only Printing Significant Findings - TEST CODE - Results are NOT positive indication of a problem. ** -nid001586 [!] Inactive file cache ballooned: 202637 (threshold: 100000) - ------------------------------------------------------------------- -Job 136853423.dbqs01 - /var/log/messages for job duration: -2026-08-24A--:--:--.------+--:-- nid001586 #### nid001586 - Job 136853423.dbqs01 Runtime Data from /var/log/messages -nid001586: nid001586 #### nid001586 - Job 136853423.dbqs01 Runtime Data from /var/log/messages -nid001586: 2026-08-24T18:40:15.350135+00:00 nid001586 prologue: MARK: Job 136853423.dbqs01 Start -nid001586: 2026-08-24T18:40:15.361675+00:00 nid001586 prologue: Job 136853423.dbqs01 nodelist: nid001586 -nid001586: 2026-08-24T18:40:15.363643+00:00 nid001586 prologue: Job 136853423.dbqs01 - Recording pre-execution stats and counters... -nid001586: 2026-08-24T18:40:15.399916+00:00 nid001586 prologue: Job 136853423.dbqs01 - Killing any stray user processes... -nid001586: 2026-08-24T18:40:15.483312+00:00 nid001586 prologue: Job 136853423.dbqs01 - Clearing /tmp... -nid001586: 2026-08-24T18:40:15.500268+00:00 nid001586 prologue: Job 136853423.dbqs01 - Verifying key post-boot workarounds with warchk... -nid001586: 2026-08-24T18:40:15.532205+00:00 nid001586 WARCHK: root : /sfs/admin/scripts/warchk --batch -nid001586: 2026-08-24T18:40:15.729011+00:00 nid001586 prologue: Job 136853423.dbqs01 - Recording pre-job memory usage... -nid001586: 2026-08-24T18:40:15.803753+00:00 nid001586 prologue: Job 136853423.dbqs01 - FRAG_STATE: ** nid001586 : node0_score=12232 node0_state=MARG uptime=4588249s Overall=MARG ** -nid001586: 2026-08-24T18:40:15.804808+00:00 nid001586 prologue: Job 136853423.dbqs01 - Recording pre-job HSN counters... -nid001586: 2026-08-24T18:40:15.931707+00:00 nid001586 prologue: Job 136853423.dbqs01 - Recording pre-job Lustre counters... -nid001586: 2026-08-24T18:40:16.977517+00:00 nid001586 prologue: Job 136853423.dbqs01 - Recording initial NFS client statistics... -nid001586: 2026-08-24T18:40:16.987019+00:00 nid001586 prologue: Job 136853423.dbqs01 - Saving a copy of the job script... -nid001586: 2026-08-24T18:40:16.995136+00:00 nid001586 prologue: Job 136853423.dbqs01 - Checking existing ASLR settings... -nid001586: 2026-08-24T18:40:17.000218+00:00 nid001586 prologue: Job 136853423.dbqs01 - Checking palsd open file count... -nid001586: 2026-08-24T18:40:17.096158+00:00 nid001586 PBS_CMD: root : /opt/pbs/bin/qstat -Bf -nid001586: 2026-08-24T18:40:18.137962+00:00 nid001586 prologue: Job 136853423.dbqs01 - Checking one-shot enabled: False -nid001586: 2026-08-24T18:40:18.139192+00:00 nid001586 prologue: Job 136853423.dbqs01 - Enabling turboboost... -nid001586: 2026-08-24T18:40:18.142236+00:00 nid001586 prologue: Job 136853423.dbqs01 - Checking warchk results... -nid001586: 2026-08-24T18:40:18.145590+00:00 nid001586 prologue: Job 136853423.dbqs01 - Warchk Complete -nid001586: 2026-08-24T18:40:18.148715+00:00 nid001586 prologue: Job 136853423.dbqs01 - Prologue complete. Execution time: 4 seconds -nid001586: 2026-08-24T18:41:02.313970+00:00 nid001586 kernel: [4588190.806346][T13864] LNet: 13864:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 2 seconds -nid001586: 2026-08-24T18:41:02.313985+00:00 nid001586 kernel: [4588190.826765][T13864] LNet: 13864:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages -nid001586: 2026-08-24T18:42:26.495033+00:00 nid001586 epilogue: Job 136853423.dbqs01 complete, running post-job actions. -nid001586: 2026-08-24T18:42:26.513497+00:00 nid001586 epilogue: MARK: Job 136853423.dbqs01 Complete. - ------------------------------------------------------------------- -Job 136853423.dbqs01 - dmesg output for job duration: -2026-08-24A--:--:--.------+--:-- nid001586 #### nid001586 - Job 136853423.dbqs01 Runtime Data from dmesg -nid001586: nid001586 #### nid001586 - Job 136853423.dbqs01 Runtime Data from dmesg -nid001586: [Mon Aug 24 18:38:29 2026] MARK: Job 136853423.dbqs01 Start -nid001586: [Mon Aug 24 18:39:16 2026] LNet: 13864:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Timed out tx for 10.253.127.25@o2ib: 2 seconds -nid001586: [Mon Aug 24 18:39:16 2026] LNet: 13864:0:(o2iblnd_cb.c:3388:kiblnd_check_conns()) Skipped 2 previous similar messages -nid001586: [Mon Aug 24 18:40:41 2026] MARK: Job 136853423.dbqs01 Complete. - ------------------------------------------------------------------- -Job 136853423.dbqs01 - Pre/Post job diff on HSN (MLX) Counters: -2026-08-24A--:--:--.------+--:-- nid001586 #### nid001586 - Job 136853423.dbqs01 HSN0 MLX Counter Post-Job Difference -nid001586: multicast:: 5743872 | multicast:: 5743922 | Diff: 50 -nid001586: rx_bytes:: 202018189768 | rx_bytes:: 202019894861 | Diff: 1705093 -nid001586: rx_packets:: 46130838 | rx_packets:: 46131277 | Diff: 439 -nid001586: tx_bytes:: 209177107460 | tx_bytes:: 209177192530 | Diff: 85070 -nid001586: tx_packets:: 43325018 | tx_packets:: 43325379 | Diff: 361 -nid001586: port_rcv_data:: 332179470793687 | port_rcv_data:: 332179605084427 | Diff: 134290740 -nid001586: port_rcv_packets:: 586885563446 | port_rcv_packets:: 586885805945 | Diff: 242499 -nid001586: port_xmit_data:: 332522008713855 | port_xmit_data:: 332522193986284 | Diff: 185272429 -nid001586: port_xmit_packets:: 584386960708 | port_xmit_packets:: 584387242096 | Diff: 281388 -nid001586: unicast_rcv_packets:: 586885563446 | unicast_rcv_packets:: 586885805945 | Diff: 242499 -nid001586: unicast_xmit_packets:: 584386960708 | unicast_xmit_packets:: 584387242096 | Diff: 281388 -nid001586: rx_write_requests:: 159906504 | rx_write_requests:: 159915735 | Diff: 9231 - ------------------------------------------------------------------- -Job 136853423.dbqs01 - Pre/Post job diff for Lustre Stats: -2026-08-24A--:--:--.------+--:-- nid001586 #### nid001586 - Job 136853423.dbqs01 Lustre Counters Post-Job Difference -nid001586: ### LustreStats: Multi-value diffs correspond to [samples min max total sum_of_squares] ### -nid001586: /lfs/h1 vah1-ffff9b488f0f3800 : -nid001586: h1: snapshot_time: Diffs: [ 131] secs -nid001586: h1: elapsed_time: Diffs: [ 131] secs -nid001586: h1: ioctl: Diffs: [ 2] reqs -nid001586: h1: getattr: Diffs: [ 15 0 0 59 791] Avg_usec : 3.93 -nid001586: h1: inode_permission: Diffs: [ 2 0 0 3 5] Avg_usec : 1.50 -nid001586: h1: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 -nid001586: ---------------- -nid001586: /lfs/h2 vah2-ffff9b68663ce800 : -nid001586: h2: snapshot_time: Diffs: [ 131] secs -nid001586: h2: elapsed_time: Diffs: [ 131] secs -nid001586: h2: read_bytes: Diffs: [ 8884 0 0 185959330 926667447990956] Avg_bytes: 20931.93 -nid001586: h2: write_bytes: Diffs: [ 313 0 0 747601795 2968043260927341] Avg_bytes: 2388504.13 -nid001586: h2: read: Diffs: [ 8875 0 0 1362792 48636526700] Avg_usec : 153.55 -nid001586: h2: write: Diffs: [ 323 0 0 443535 1024714645] Avg_usec : 1373.17 -nid001586: h2: ioctl: Diffs: [ 623] reqs -nid001586: h2: open: Diffs: [ 202 0 0 41163 19760211] Avg_usec : 203.77 -nid001586: h2: close: Diffs: [ 203 0 0 14405 2204763] Avg_usec : 70.96 -nid001586: h2: seek: Diffs: [ 336 0 0 315 14127] Avg_usec : .93 -nid001586: h2: readdir: Diffs: [ 24 0 0 2814 1249108] Avg_usec : 117.25 -nid001586: h2: truncate: Diffs: [ 68 0 0 1589766 510757214264] Avg_usec : 23378.91 -nid001586: h2: flock: Diffs: [ 20 0 0 1810 352128] Avg_usec : 90.50 -nid001586: h2: getattr: Diffs: [ 1404 0 0 48373 19113717] Avg_usec : 34.45 -nid001586: h2: mknod: Diffs: [ 9 0 0 6292 5247846] Avg_usec : 699.11 -nid001586: h2: getxattr: Diffs: [ 134 0 0 2234 256844] Avg_usec : 16.67 -nid001586: h2: getxattr_hits: Diffs: [ 102] reqs -nid001586: h2: inode_permission: Diffs: [ 10450 0 0 5047 31595] Avg_usec : .48 -nid001586: h2: opencount: Diffs: [ 204 0 0 1242 10890] Avg_reqs : 6.08 -nid001586: ---------------- -nid001586: /lfs/f1 vaf1-ffff9b4857c44800 : -nid001586: f1: snapshot_time: Diffs: [ 131] secs -nid001586: f1: elapsed_time: Diffs: [ 131] secs -nid001586: f1: ioctl: Diffs: [ 2] reqs -nid001586: f1: getattr: Diffs: [ 11 0 0 34 254] Avg_usec : 3.09 -nid001586: f1: inode_permission: Diffs: [ 2 0 0 2 2] Avg_usec : 1.00 -nid001586: f1: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 -nid001586: ---------------- -nid001586: /lfs/f2 vaf2-ffff9b485864d800 : -nid001586: f2: snapshot_time: Diffs: [ 131] secs -nid001586: f2: elapsed_time: Diffs: [ 131] secs -nid001586: f2: read_bytes: Diffs: [ 20 0 0 117164 1638991042] Avg_bytes: 5858.20 -nid001586: f2: write_bytes: Diffs: [ 18 0 0 29586 101162102] Avg_bytes: 1643.66 -nid001586: f2: read: Diffs: [ 20 0 0 319 9967] Avg_usec : 15.95 -nid001586: f2: write: Diffs: [ 478 0 0 8896 4608274] Avg_usec : 18.61 -nid001586: f2: ioctl: Diffs: [ 14] reqs -nid001586: f2: open: Diffs: [ 23 0 0 870 197714] Avg_usec : 37.82 -nid001586: f2: close: Diffs: [ 23 0 0 1755 277887] Avg_usec : 76.30 -nid001586: f2: seek: Diffs: [ 21 0 0 2 4] Avg_usec : .09 -nid001586: f2: readdir: Diffs: [ 2 0 0 382 145924] Avg_usec : 191.00 -nid001586: f2: getattr: Diffs: [ 38 0 0 5241 2238021] Avg_usec : 137.92 -nid001586: f2: mknod: Diffs: [ 11 0 0 2630 697050] Avg_usec : 239.09 -nid001586: f2: getxattr: Diffs: [ 11 0 0 1405 192623] Avg_usec : 127.72 -nid001586: f2: inode_permission: Diffs: [ 138 0 0 381 9073] Avg_usec : 2.76 -nid001586: f2: opencount: Diffs: [ 25 0 0 56 230] Avg_reqs : 2.24 -nid001586: ---------------- -nid001586: /lfs/h3 vah3-ffff9b485864c000 : -nid001586: h3: snapshot_time: Diffs: [ 131] secs -nid001586: h3: elapsed_time: Diffs: [ 131] secs -nid001586: h3: ioctl: Diffs: [ 2] reqs -nid001586: h3: getattr: Diffs: [ 7 0 0 28 222] Avg_usec : 4.00 -nid001586: h3: inode_permission: Diffs: [ 2 0 0 2 2] Avg_usec : 1.00 -nid001586: h3: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 -nid001586: ---------------- -nid001586: /apps vaf2-ffff9af90dd3c000 : -nid001586: apps: snapshot_time: Diffs: [ 131] secs -nid001586: apps: elapsed_time: Diffs: [ 131] secs -nid001586: apps: read_bytes: Diffs: [ 8932 0 0 156524458 15162452154830] Avg_bytes: 17524.01 -nid001586: apps: read: Diffs: [ 8932 0 0 687028 249289320] Avg_usec : 76.91 -nid001586: apps: ioctl: Diffs: [ 6257] reqs -nid001586: apps: open: Diffs: [ 11317 0 0 865712 209117920] Avg_usec : 76.49 -nid001586: apps: close: Diffs: [ 11317 0 0 658336 149602696] Avg_usec : 58.17 -nid001586: apps: mmap: Diffs: [ 4366 0 0 25839 398123] Avg_usec : 5.91 -nid001586: apps: page_fault: Diffs: [ 88858 0 0 8470 23144] Avg_usec : .09 -nid001586: apps: seek: Diffs: [ 12404 0 0 16 98] Avg_usec : 0 -nid001586: apps: readdir: Diffs: [ 5336 0 0 417487 391882277] Avg_usec : 78.23 -nid001586: apps: getattr: Diffs: [ 49537 0 0 1160030 215639508] Avg_usec : 23.41 -nid001586: apps: getxattr: Diffs: [ 7 0 0 102 5890] Avg_usec : 14.57 -nid001586: apps: getxattr_hits: Diffs: [ 6] reqs -nid001586: apps: inode_permission: Diffs: [ 645142 0 0 91284 230158] Avg_usec : .14 -nid001586: apps: opencount: Diffs: [ 11319 0 0 45857 259427] Avg_reqs : 4.05 -nid001586: ---------------- - ------------------------------------------------------------------- -### Job 136853423.dbqs01 - NFS Statistics for job duration: -#### 2026-08-24A--:--:--.------+--:-- nid001586 Job 136853423.dbqs01 - DEBUG-NFS: Unable to find NFS stats file: /lfs/f2/hpc/jobdata/136853423/nfsstats.136853423.nid001586 - ------------------------------------------------------------------- -### Job 136853423.dbqs01 - Lustre evictions (if present): - ------------------------------------------------------------------- -### Job 136853423.dbqs01 - Exit status is 271 - ------------------------------------------------------------------- -Job 136853423.dbqs01 - Job summary: -Job Id: 136853423.dbqs01 - Job_Name = ESMPy - Job_Owner = keston.smith@dlogin06 - resources_used.cpupercent = 66 - resources_used.cput = 00:00:07 - resources_used.mem = 155244kb - resources_used.ncpus = 16 - resources_used.vmem = 2399784kb - resources_used.walltime = 00:02:07 - job_state = R - queue = dev - server = dbqs01 - Account_Name = NWPS-DEV - Checkpoint = u - ctime = Mon Aug 24 18:34:54 2026 - Error_Path = dlogin06:/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/ - RWPS/dev/compute_interpolation_weights/sorc/ESMPy.e136853423 - exec_host = nid001586/0*16 - exec_vnode = (nid001586:ncpus=16:mem=268435456kb) - Hold_Types = n - Join_Path = oe - Keep_Files = oed - Mail_Points = a - mtime = Mon Aug 24 18:42:26 2026 - Output_Path = dlogin06:/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow - /RWPS/dev/compute_interpolation_weights/sorc/ESMPy.o136853423 - Priority = 0 - qtime = Mon Aug 24 18:34:54 2026 - Rerunable = False - Resource_List.alvl = 2 - Resource_List.aslr = True - Resource_List.debug = True - Resource_List.dfs = False - Resource_List.hyper = True - Resource_List.ldebug = False - Resource_List.mem = 256gb - Resource_List.ncpus = 16 - Resource_List.nodect = 1 - Resource_List.one-shot = False - Resource_List.place = exclhost - Resource_List.select = 1:ncpus=16:mem=256GB - Resource_List.turbo = True - Resource_List.walltime = 04:00:00 - schedselect = 1:ncpus=16:mem=256GB:prepost=False - stime = Mon Aug 24 18:40:14 2026 - session_id = 3933318 - Shell_Path_List = /bin/bash - jobdir = /u/keston.smith - substate = 42 - Variable_List = PBS_O_HOME=/u/keston.smith,PBS_O_LANG=en_US.UTF-8, - PBS_O_LOGNAME=keston.smith, - PBS_O_PATH=/opt/cray/bin:/u/keston.smith/.local/bin:/usr/local/bin:/us - r/bin:/bin:/opt/c3/bin:/opt/pbs/bin:/sbin, - PBS_O_MAIL=/var/spool/mail/keston.smith,PBS_O_SHELL=/bin/bash, - PBS_O_WORKDIR=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWP - S/dev/compute_interpolation_weights/sorc,PBS_O_SYSTEM=Linux, - LMOD_FAMILY_CRAYPE_NETWORK_VERSION=false,meshID=oc_5km_100km, - LD_LIBRARY_PATH=/opt/cray/lib64, - LS_COLORS=no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd= - 40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com - =01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tg - z=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.l - zma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2= - 00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.xz=00;31:*.avi=01;35:*.bmp - =01;35:*.dl=01;35:*.fli=01;35:*.gif=01;35:*.gl=01;35:*.jpg=01;35:*.jpeg - =01;35:*.mkv=01;35:*.mng=01;35:*.mov=01;35:*.mp4=01;35:*.mpg=01;35:*.pc - x=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.svg=01;35:*.t - ga=01;35:*.tif=01;35:*.webm=01;35:*.webp=01;35:*.wmv=01;35:*.xbm=01;35: - *.xcf=01;35:*.xpm=01;35:*.aiff=00;32:*.ape=00;32:*.au=00;32:*.flac=00;3 - 2:*.m4a=00;32:*.mid=00;32:*.mp3=00;32:*.mpc=00;32:*.ogg=00;32:*.voc=00; - 32:*.wav=00;32:*.wma=00;32:*.wv=00;32:,HOSTTYPE=x86_64, - __LMOD_REF_COUNT_PATH=/opt/cray/bin:1;/u/keston.smith/.local/bin:1;/us - r/local/bin:1;/usr/bin:1;/bin:2;/opt/c3/bin:1;/opt/pbs/bin:1;/sbin:1, - _ModuleTable002_=ck5hbWUiXT0iY3JheXBlLW5ldHdvcmstb2ZpIix9LFsiY3JheXBlL - Xg4Ni1yb21lIl09e1siZm4iXT0iL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY3Jh - eXBlLXRhcmdldHMvZGVmYXVsdC9jcmF5cGUteDg2LXJvbWUubHVhIixbImZ1bGxOYW1lIl0 - 9ImNyYXlwZS14ODYtcm9tZSIsWyJsb2FkT3JkZXIiXT0xLHByb3BUPXt9LFsic3RhY2tEZX - B0aCJdPTEsWyJzdGF0dXMiXT0iYWN0aXZlIixbInVzZXJOYW1lIl09ImNyYXlwZS14ODYtc - m9tZSIsfSxlbnZ2YXI9e1siZm4iXT0iL2FwcHMvcHJvZC9sbW9kdWxlcy9zeXNfY29yZS9l - bnZ2YXIvMS4wIixbImZ1bGxOYW1lIl09ImVudnZhci8xLjAiLFsibG9hZE9yZGVyIl09NCx - wcm9wVD17fSxbInN0YWNrRGVwdGgiXT0w, - SSH_CONNECTION=192.58.153.6 58076 192.58.153.16 22, - mesh=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/com - pute_interpolation_weights/sorc/../../..//fix/rwps.oc_5km_100km.msh, - XAUTHLOCALHOSTNAME=dlogin06,LESSCLOSE=lessclose.sh %s %s, - XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB, - LMOD_FAMILY_CRAYPE_CPU=craype-x86-rome, - LMOD_MODULERCFILE=/apps/prod/lmodules/.modulerc.lua, - PE_PRODUCT_LIST=CRAYPE_X86_ROME,LMOD_IGNORE_CACHE=yes,LANG=en_US.UTF-8, - WINDOWMANAGER=xterm,LESS=-M -I -R,DISPLAY=localhost:20.0, - HISTTIMEFORMAT=%F %T,HOSTNAME=dlogin06, - LMOD_SYSTEM_DEFAULT_MODULES=envvar/1.0, - OLDPWD=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/fix, - __LMOD_REF_COUNT__LMFILES_=/opt/cray/pe/lmod/modulefiles/craype-target - s/default/craype-x86-rome.lua:1;/opt/cray/modulefiles/libfabric/1.20.1: - 1;/opt/cray/pe/lmod/modulefiles/craype-targets/default/craype-network-o - fi.lua:1;/apps/prod/lmodules/sys_core/envvar/1.0:1, - CONFIG_SITE=/usr/share/site/x86_64-unknown-linux-gnu,CSHEDIT=emacs, - LMOD_CUSTOM_CNCM_INTEL_19_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX - =/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/apps - /ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4, - LMOD_CUSTOM_COMPILER_GNU_8_0_PREFIX=/apps/prod/lmodules/gcc/11.2.0:/ap - ps/prod/lmodules/gcc/10.2.0,GPG_TTY=/dev/pts/37, - LESS_ADVANCED_PREPROCESSOR=no,COLORTERM=1, - LMOD_FAMILY_CRAYPE_NETWORK=craype-network-ofi, - MACHTYPE=x86_64-suse-linux, - __LMOD_REF_COUNT_LD_LIBRARY_PATH=/opt/cray/lib64:1, - __LMOD_REF_COUNT_PKG_CONFIG_PATH=/opt/cray/lib64/pkgconfig:1, - LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_UCX_1_0_PREFIX=/apps/prod/lmodules/cce - /13.0.0:/apps/prod/lmodules/cce/12.0.3:/apps/prod/lmodules/cce/11.0.4, - tmp=/tmpfiles,SSH_AUTH_SOCK=/tmp/ssh-bJSN2WGiSTA7/agent.2677855, - _ModuleTable004_=U0lPTi9tb2R1bGVmaWxlcyIsIi91c3Ivc2hhcmUvbW9kdWxlcy9tb - 2R1bGVmaWxlcyIsIi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvTGludXgiLCIvdXNyL3NoYXJl - L21vZHVsZWZpbGVzL0NvcmUiLCIvdXNyL3NoYXJlL2xtb2QvbG1vZC9tb2R1bGVmaWxlcy9 - Db3JlIiwiL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY29yZSIsIi9vcHQvY3JheS - 9wZS9sbW9kL21vZHVsZWZpbGVzL2NyYXlwZS10YXJnZXRzL2RlZmF1bHQiLCIvYXBwcy9wc - m9kL2xtb2R1bGVzL3N5c19jb3JlIiwiL2FwcHMvb3BzL3Byb2QvbmNvL21vZHVsZWZpbGVz - L2NvcmUiLCIvYXBwcy9wcm9kL2xtb2R1bGVzL2NvcmUiLCIvb3B0L2NyYXkvbW9kdWxlZml - sZXMiLH0sWyJzeXN0ZW1CYXNlTVBBVEgi,MINICOM=-c on, - QT_SYSTEM_DIR=/usr/share/desktop-data,OSTYPE=linux, - meshname=rwps.oc_5km_100km,USER=keston.smith, - MODULES_SET_SHELL_STARTUP=0,PAGER=less,MODULE_VERSION=3.2.10, - LMOD_CUSTOM_CNCM_GNU_8_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX=/a - pps/prod/lmodules/GCC_cray_mpich/10.2.0/cray-mpich/8.1.4, - LMOD_CUSTOM_CNCM_GNU_8_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX=/a - pps/prod/lmodules/GCC_cray_mpich/10.2.0/cray-mpich/8.1.4, - CRAY_CPU_TARGET=x86-rome, - LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PR - EFIX=/apps/prod/lmodules/CCE_cray_mpich/11.0.4/cray-mpich/8.1.4, - __LMOD_REF_COUNT_MODULEPATH=/opt/cray/pe/lmod/modulefiles/net/ofi/1.0: - 1;/opt/cray/pe/lmod/modulefiles/cpu/x86-rome/1.0:1;/usr/share/modules:1 - ;/usr/share/Modules/$MODULE_VERSION/modulefiles:1;/usr/share/modules/mo - dulefiles:1;/usr/share/modulefiles/Linux:1;/usr/share/modulefiles/Core: - 1;/usr/share/lmod/lmod/modulefiles/Core:1;/opt/cray/pe/lmod/modulefiles - /core:1;/opt/cray/pe/lmod/modulefiles/craype-targets/default:1;/apps/pr - od/lmodules/sys_core:1;/apps/ops/prod/nco/modulefiles/core:1;/apps/prod - /lmodules/core:1;/opt/cray/modulefiles:1, - COMINrrfs=/lfs/h1/ops/prod/com/rrfs/v1.0/rrfs./,MORE=-sl, - __LMOD_REF_COUNT_LOADEDMODULES=craype-x86-rome:1;libfabric/1.20.1:1;cr - aype-network-ofi:1;envvar/1.0:1, - PWD=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp - ute_interpolation_weights/sorc, - COMINrtofs=/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs./, - HOME=/u/keston.smith, - COMINnbm=/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.//grib2, - PELOCAL_PRGENV=true,SSH_AGENT_PID=2677858,HOST=dlogin06, - SSH_CLIENT=192.58.153.6 58076 22,LMOD_VERSION=8.3.1, - XNLSPATH=/usr/share/X11/nls,CRAY_LMOD_CPU=x86-rome/1.0, - LMOD_FAMILY_CRAYPE_CPU_VERSION=false, - BASH_ENV=/usr/share/lmod/lmod/init/bash,XDG_DATA_DIRS=/usr/share, - LMOD_CUSTOM_CNCM_INTEL_19_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX - =/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/apps - /ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4, - CRAY_LMOD_NET=ofi/1.0, - RWPSroot=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev - /compute_interpolation_weights/sorc/../../../,COMINlocal=/tmpfiles, - __LMOD_REF_COUNT_LMOD_CUSTOM_COMPILER_INTEL_19_0_PREFIX=/apps/ops/prod - /nco/models/modulefiles:1;/apps/prod/lmodules/intel/19.1.3.304:1;/apps/ - ops/prod/libs/modulefiles/compiler/intel/19.1.3.304:1;/apps/ops/prod/nc - o/modulefiles/compiler/intel/19.1.3.304:1,LIBGL_DEBUG=quiet, - LMOD_CUSTOM_COMPILER_INTEL_19_0_PREFIX=/apps/ops/prod/nco/models/modul - efiles:/apps/prod/lmodules/intel/19.1.3.304:/apps/ops/prod/libs/modulef - iles/compiler/intel/19.1.3.304:/apps/ops/prod/nco/modulefiles/compiler/ - intel/19.1.3.304,PROFILEREAD=true,LMOD_sys=Linux, - _ModuleTable001_=X01vZHVsZVRhYmxlXz17WyJNVHZlcnNpb24iXT0zLFsiY19yZWJ1a - WxkVGltZSJdPWZhbHNlLFsiY19zaG9ydFRpbWUiXT1mYWxzZSxkZXB0aFQ9e30sZmFtaWx5 - PXtbImNyYXlwZV9jcHUiXT0iY3JheXBlLXg4Ni1yb21lIixbImNyYXlwZV9uZXR3b3JrIl0 - 9ImNyYXlwZS1uZXR3b3JrLW9maSIsfSxtVD17WyJjcmF5cGUtbmV0d29yay1vZmkiXT17Wy - JmbiJdPSIvb3B0L2NyYXkvcGUvbG1vZC9tb2R1bGVmaWxlcy9jcmF5cGUtdGFyZ2V0cy9kZ - WZhdWx0L2NyYXlwZS1uZXR3b3JrLW9maS5sdWEiLFsiZnVsbE5hbWUiXT0iY3JheXBlLW5l - dHdvcmstb2ZpIixbImxvYWRPcmRlciJdPTMscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MSx - bInN0YXR1cyJdPSJhY3RpdmUiLFsidXNl, - LOADEDMODULES=craype-x86-rome:libfabric/1.20.1:craype-network-ofi:envv - ar/1.0,LMOD_AVAIL_STYLE=en_grouped:system,CRAYPE_NETWORK_TARGET=ofi, - _ModuleTable006_=b2R1bGVmaWxlcyIsfQ==, - __LMOD_REF_COUNT_MANPATH=/opt/cray/share/man:1;/usr/share/lmod/lmod/sh - are/man:1;/usr/share/man:1;/opt/c3/man:1;/opt/pbs/share/man:1, - _ModuleTable003_=LFsic3RhdHVzIl09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJdPSJlbnZ2Y - XIvMS4wIix9LGxpYmZhYnJpYz17WyJmbiJdPSIvb3B0L2NyYXkvbW9kdWxlZmlsZXMvbGli - ZmFicmljLzEuMjAuMSIsWyJmdWxsTmFtZSJdPSJsaWJmYWJyaWMvMS4yMC4xIixbImxvYWR - PcmRlciJdPTIscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MixbInN0YXR1cyJdPSJhY3Rpdm - UiLFsidXNlck5hbWUiXT0ibGliZmFicmljIix9LH0sbXBhdGhBPXsiL29wdC9jcmF5L3BlL - 2xtb2QvbW9kdWxlZmlsZXMvbmV0L29maS8xLjAiLCIvb3B0L2NyYXkvcGUvbG1vZC9tb2R1 - bGVmaWxlcy9jcHUveDg2LXJvbWUvMS4wIiwiL3Vzci9zaGFyZS9tb2R1bGVzIiwiL3Vzci9 - zaGFyZS9Nb2R1bGVzLyRNT0RVTEVfVkVS,LMOD_ROOT=/usr/share/lmod, - SSH_TTY=/dev/pts/37,FROM_HEADER=,MAIL=/var/spool/mail/keston.smith, - COMINstofs=/lfs/h1/ops/prod/com/stofs/v3.1/stofs_2d_glo., - LESSKEY=/etc/lesskey.bin,TERM=xterm-256color,SHELL=/bin/bash, - LMOD_ADMIN_FILE=/apps/prod/lmodules/admin.list, - LMOD_CUSTOM_COMPILER_GNU_8_0_UCX_1_0_PREFIX=/apps/prod/lmodules/gcc/11 - .2.0:/apps/prod/lmodules/gcc/10.2.0,lmod_prefix_path=/usr/share, - LMOD_CUSTOM_COMPILER_CRAYCLANG_10_0_PREFIX=/apps/prod/lmodules/cce/13. - 0.0:/apps/prod/lmodules/cce/12.0.3:/apps/prod/lmodules/cce/11.0.4, - _ModuleTable_Sz_=6,LS_OPTIONS=-N --color=tty -T 0, - LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PR - EFIX=/apps/prod/lmodules/CCE_cray_mpich/11.0.4/cray-mpich/8.1.4, - TMOUT=1800,PYTHONSTARTUP=/etc/pythonstart, - RWPSfix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPS,SHLVL=3, - LANGUAGE=en_US.UTF-8,G_FILENAME_ENCODING=@locale\,UTF-8\,ISO-8859-15\, - CP1252, - LMOD_CUSTOM_COMPILER_INTEL_19_0_UCX_1_0_PREFIX=/apps/prod/lmodules/int - el/19.1.3.304:/apps/ops/prod/libs/modulefiles/compiler/intel/19.1.3.304 - :/apps/ops/prod/nco/modulefiles/compiler/intel/19.1.3.304, - HPC_OPT=/apps/ops/prod/libs, - MANPATH=/opt/cray/share/man:/usr/share/lmod/lmod/share/man:/usr/share/ - man:/opt/c3/man:/opt/pbs/share/man,OSCAR_HOME=/opt/oscar, - fix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp - ute_interpolation_weights/sorc/../../..//fix, - MODULEPATH=/opt/cray/pe/lmod/modulefiles/net/ofi/1.0:/opt/cray/pe/lmod - /modulefiles/cpu/x86-rome/1.0:/usr/share/modules:/usr/share/Modules/$MO - DULE_VERSION/modulefiles:/usr/share/modules/modulefiles:/usr/share/modu - lefiles/Linux:/usr/share/modulefiles/Core:/usr/share/lmod/lmod/modulefi - les/Core:/opt/cray/pe/lmod/modulefiles/core:/opt/cray/pe/lmod/modulefil - es/craype-targets/default:/apps/prod/lmodules/sys_core:/apps/ops/prod/n - co/modulefiles/core:/apps/prod/lmodules/core:/opt/cray/modulefiles, - LOGNAME=keston.smith,MODULE_VERSION_STACK=3.2.10, - MODULEPATH_ROOT=/usr/share/modulefiles, - LMOD_PACKAGE_PATH=/apps/prod/lmodules,XDG_CONFIG_DIRS=/etc/xdg, - PATH=/opt/cray/bin:/u/keston.smith/.local/bin:/usr/local/bin:/usr/bin: - /bin:/opt/c3/bin:/opt/pbs/bin:/sbin, - __LMOD_REF_COUNT_PE_PRODUCT_LIST=CRAYPE_X86_ROME:1, - _LMFILES_=/opt/cray/pe/lmod/modulefiles/craype-targets/default/craype- - x86-rome.lua:/opt/cray/modulefiles/libfabric/1.20.1:/opt/cray/pe/lmod/m - odulefiles/craype-targets/default/craype-network-ofi.lua:/apps/prod/lmo - dules/sys_core/envvar/1.0,MODULESHOME=/usr/share/lmod/lmod, - PKG_CONFIG_PATH=/opt/cray/lib64/pkgconfig, - LMOD_SETTARG_FULL_SUPPORT=no,INFOPATH=:/apps/docs/info, - G_BROKEN_FILENAMES=1,HISTSIZE=10000,LMOD_PKG=/usr/share/lmod/lmod, - CPU=x86_64, - _ModuleTable005_=XT0iL3Vzci9zaGFyZS9tb2R1bGVzOi91c3Ivc2hhcmUvTW9kdWxlc - y8kTU9EVUxFX1ZFUlNJT04vbW9kdWxlZmlsZXM6L3Vzci9zaGFyZS9tb2R1bGVzL21vZHVs - ZWZpbGVzOi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvTGludXg6L3Vzci9zaGFyZS9tb2R1bGV - maWxlcy9Db3JlOi91c3Ivc2hhcmUvbG1vZC9sbW9kL21vZHVsZWZpbGVzL0NvcmU6L29wdC - 9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY29yZTovb3B0L2NyYXkvcGUvbG1vZC9tb2R1b - GVmaWxlcy9jcmF5cGUtdGFyZ2V0cy9kZWZhdWx0Oi9hcHBzL3Byb2QvbG1vZHVsZXMvc3lz - X2NvcmU6L2FwcHMvb3BzL3Byb2QvbmNvL21vZHVsZWZpbGVzL2NvcmU6L2FwcHMvcHJvZC9 - sbW9kdWxlcy9jb3JlOi9vcHQvY3JheS9t, - LMOD_CMD=/usr/share/lmod/lmod/libexec/lmod,CVS_RSH=ssh, - LESSOPEN=lessopen.sh %s,LMOD_DIR=/usr/share/lmod/lmod/libexec, - LC_TIME=C.UTF-8, - BASH_FUNC_module%%=() { eval $($LMOD_CMD bash \"$@\") && eval $(${LMO - D_SETTARG_CMD:-:} -s sh) - euser = keston.smith - egroup = emc - hashname = 136853423.dbqs01 - queue_rank = 1787596494650877 - queue_type = E - comment = Job run at Mon Aug 24 at 18:40 on (nid001586:ncpus=16:mem=2684354 - 56kb) and terminated by keston.smith@dlogin01.dogwood.wcoss2.ncep.noaa. - gov - etime = Mon Aug 24 18:34:54 2026 - umask = 22 - run_count = 6 - eligible_time = 00:05:26 - accrue_type = 3 - Submit_arguments = -V /lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/ - RWPS/dev/compute_interpolation_weights/sorc/../../..//dev/compute_inter - polation_weights/ecf/compute_interpolation_weights.ecf - project = NWPS-DEV - run_version = 1 - Submit_Host = dlogin06 - server_instance_id = dbqs01.dogwood.wcoss2.ncep.noaa.gov:15001 - - ------------------------------------------------------------------- -Job 136853423.dbqs01 - PBS tracejob output (for parent mom node only): - -Job: 136853423.dbqs01 - -08/24/2026 18:40:14 M update_job_usage: CPU usage: 0.000 secs -08/24/2026 18:40:14 M update_job_usage: cpupercent initialized to zero -08/24/2026 18:40:14 M update_job_usage: Memory usage: mem=0b -08/24/2026 18:40:18 M Started, pid = 3933318 -08/24/2026 18:40:24 M update_job_usage: CPU usage: 7.000 secs -08/24/2026 18:40:24 M update_job_usage: 136853423.dbqs01 measured interval cpupercent 66 increased job cpupercent to 66 -08/24/2026 18:40:24 M update_job_usage: Memory usage: mem=155244kb -08/24/2026 18:42:13 M signal job request received -08/24/2026 18:42:13 M signal job with TermJob -08/24/2026 18:42:13 M kill_job -08/24/2026 18:42:13 M task 00000001 terminated -08/24/2026 18:42:25 M no active process for task 00000001 -08/24/2026 18:42:25 M Terminated -08/24/2026 18:42:25 M task 00000001 cput=00:01:53 -08/24/2026 18:42:25 M kill_job -08/24/2026 18:42:25 M nid001586 cput=00:00:07 mem=155244kb -08/24/2026 18:42:25 M update_job_usage: CPU usage: 128.000 secs -08/24/2026 18:42:25 M update_job_usage: 136853423.dbqs01 measured interval cpupercent 100 increased job cpupercent to 100 -08/24/2026 18:42:25 M update_job_usage: Memory usage: mem=2777012kb -08/24/2026 18:42:26 M update_job_usage: CPU usage: 128.000 secs -08/24/2026 18:42:26 M update_job_usage: Memory usage: mem=2777012kb -08/24/2026 18:42:26 M no active tasks - ------------------------------------------------------------------- -To see full PBS log data, run: /sfs/admin/scripts/tracejob.sh 136853423.dbqs01 - -================================================================== -END - DEBUG INFO -================================================================== - -Job 136853423.dbqs01 - Epilogue DEBUG complete. DEBUG Execution time: 6 seconds -Job 136853423.dbqs01 - Epilogue complete. Execution time: 8 seconds -##### Job 136853423.dbqs01 - PBS Job Script: -(Note: Duplicate #PBS entries are a function how PBS interprets and caches the original job script.) - -#!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=04:00:00 -##PBS -l select=1:ncpus=8:mem=128GB -#PBS -l select=1:ncpus=16:mem=256GB -##PBS -l select=1:ncpus=32:mem=256GB -###PBS -l select=1:ncpus=1:mem=8G -#PBS -l place=excl -#PBS -l debug=true - -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - - -# Compute interpolation weights and distance to boundary for a RWPS mesh. -# Files are created in local RWPS/fix directory. - -pip list -v - -cd $RWPSroot/ush/preprocess - -SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" -date="20260730" -cycl="00" -Nprocs=16 - - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - -rrfs_hi=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.hi.nc -rrfs_pr=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.pr.nc -rrfs_ak=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.ak.nc -rrfs_na=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.na.nc -rrfs_conus=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.conus.nc - -out="../../fix" - -rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" -rrfsDst="$out/DistToBndy.$meshname.rrfs" - -#no extrapolation with rrfs forecasts -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_pr $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 > GenWhts.rrfs.pr.out -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_ak $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 > GenWhts.rrfs.ak.out -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_na $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 > GenWhts.rrfs.na.out -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_conus $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out - -nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc -nbmIntrp="$out/InterpolationWeights.$meshname.nbm" -nbmDst="$out/DistToBndy.$meshname.nbm" -#extrapolate nbm oc wind to all points -python ./compute_gridded_to_rwps_interp_weights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out - -nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc -#do not extrapolate for NBM .ak. domain -python ./compute_gridded_to_rwps_interp_weights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out - -rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc -rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" -rtofsDst="$out/DistToBndy.$meshname.rtofs" - -#extrapolate rtofs .glo. for full ice coverage - -python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out - - -rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc -#do not extrapolate rtofs .glo. currents -python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.current.nc $rtofsDst.current.nc -1 > GenWhts.rtofs.current.out - - - -#Old v2 of stofs -stofs_glo="$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" - -mkdir -p STOFSInterpWeights.$meshname -## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs - -## Now run parallel job script - -qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS - -wait - -#combine text file output of parallel jobs -cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt - -# convert output weights to netcdf file -python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 -cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.v2.nc -cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.v2.nc -mv DistToBndy.$meshname.stofs.nc DistToBndy.$meshname.stofs.v2.nc -mv InterpWeights.$meshname.stofs.nc InterpWeights.$meshname.stofs.v2.nc - -rm -rf STOFSInterpWeights.$meshname -rm InterpWeights.$meshname.stofs.txt -rm *.out -rm ESMPy* - - -mkdir -p STOFSInterpWeights.$meshname -#compute stofs weights for current(v3) stofs mesh -stofs_glo="$SID/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc" - -## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs - -## Now run parallel job script - -qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS - -wait - -#combine text file output of parallel jobs -cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt - -# convert output weights to netcdf file -python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 -cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc -cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc - - -rm -rf STOFSInterpWeights.$meshname -rm InterpWeights.$meshname.stofs.txt -rm *.out -rm ESMPy* - - - - -##### End of job script ------------------------------------------------------------------- - diff --git a/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136854537 b/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136854537 deleted file mode 100644 index 5fb932f..0000000 --- a/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136854537 +++ /dev/null @@ -1,1246 +0,0 @@ -PBS: Running prologue on parent mom node: nid003409... -Job 136854537.dbqs01 nodelist: nid003409 -Job 136854537.dbqs01 - Prologue complete. Execution time: 5 seconds -Agent pid 562728 -Identity added: /u/keston.smith/.ssh/id_ed25519 (keston.smith@noaa.gov) -/u/keston.smith/.bashrc: line 46: alias: eval "$(ssh-agent -s)"; ssh-add ~/.ssh/id_ed25519: not found -Resetting modules to system default. Reseting $MODULEPATH back to system default. All extra directories will be removed from $MODULEPATH. -Package Version Location Installer -------------------------- ----------- ---------------------------------------------------------------------------------- --------- -Cartopy 0.24.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -certifi 2025.1.31 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -cftime 1.6.4.post1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -contourpy 1.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -cycler 0.12.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -esmpy 8.6.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -fonttools 4.55.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -geographiclib 2.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -geopy 2.4.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -Jinja2 3.1.5 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -kiwisolver 1.4.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -MarkupSafe 3.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -matplotlib 3.10.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -netCDF4 1.7.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -numpy 2.2.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -packaging 24.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pandas 2.2.3 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pillow 11.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pip 25.0.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pyparsing 3.2.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pyproj 3.7.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pyshp 2.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -python-dateutil 2.9.0.post0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pytz 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -PyYAML 6.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -scipy 1.15.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -setuptools 75.8.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -setuptools-git-versioning 2.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -shapely 2.0.7 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -six 1.17.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -tzdata 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -xarray 2025.1.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in - iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights - regrid = esmpy.Regrid( - ^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ - self._routehandle = ESMP_FieldRegridStoreFile( - ^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile - raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ -ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in - iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights - regrid = esmpy.Regrid( - ^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ - self._routehandle = ESMP_FieldRegridStoreFile( - ^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile - raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ -ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in - iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights - regrid = esmpy.Regrid( - ^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ - self._routehandle = ESMP_FieldRegridStoreFile( - ^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile - raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ -ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in - iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights - regrid = esmpy.Regrid( - ^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ - self._routehandle = ESMP_FieldRegridStoreFile( - ^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile - raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ -ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in - iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights - regrid = esmpy.Regrid( - ^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/api/regrid.py", line 146, in __init__ - self._routehandle = ESMP_FieldRegridStoreFile( - ^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 86, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 71, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/interface/cbindings.py", line 2303, in ESMP_FieldRegridStoreFile - raise ValueError('ESMC_FieldRegridStoreFile() failed with rc = '+str(rc)+ -ValueError: ESMC_FieldRegridStoreFile() failed with rc = 22. Please check the log files (named "*ESMF_LogFile"). -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in - with xr.open_dataset(weights_file, overwrite=True) as ds_s: - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset - backend_ds = backend.open_dataset( - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 107, in - with xr.open_dataset(weights_file, overwrite=True) as ds_s: - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/xarray/backends/api.py", line 686, in open_dataset - backend_ds = backend.open_dataset( - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: NetCDF4BackendEntrypoint.open_dataset() got an unexpected keyword argument 'overwrite' -PBS: Running epilogue on parent mom node: nid003409... -================================================================== -BEGIN - DEBUG INFO -================================================================== -Job 136854537.dbqs01 - Post Job Mem Usage: -nid003409: 2026-08-24.21 1 =========================================== -nid003409: 2026-08-24.21 2 #### Node Memory Usage for nid003409 #### -nid003409: 2026-08-24.21 3 ------------------ -nid003409: 2026-08-24.21 4 Mem: total:526983528 used:13236552 free:514828776 shared:457636 cache:1057272 avail:513746976 -nid003409: 2026-08-24.21 5 4.0K /dev/shm -nid003409: 2026-08-24.21 6 40K /tmp -nid003409: 2026-08-24.21 7 =========================================== -nid003409: 2026-08-24.10 1 =========================================== -nid003409: 2026-08-24.10 2 #### Node Memory Usage for nid003409 #### -nid003409: 2026-08-24.10 3 ------------------ -nid003409: 2026-08-24.10 4 Mem: total:526983528 used:14017704 free:512946524 shared:457652 cache:2923004 avail:512965824 -nid003409: 2026-08-24.10 5 4.0K /dev/shm -nid003409: 2026-08-24.10 6 40K /tmp -nid003409: 2026-08-24.10 7 =========================================== - ------------------------------------------------------------------- ------------------------------------------------------------------- -Job 136854537.dbqs01 - Post Job Mem Usage Profile: -2026-08-24A--:--:--.------+--:-- nid003409 #### nid003409 - Job 136854537.dbqs01 NUMA Node Memory Allocation and Fragmentation Reports -Starting Fragmentation Report for nid003409 -Node Order9 Order10 Score MB_Free %Free State -0 2772 10501 23774 47548 75 OK -1 2550 11439 25428 50856 78 OK -2 2646 11642 25930 51860 80 OK -3 2567 12665 27897 55794 86 OK -4 2452 12908 28268 56536 87 OK -5 1342 14232 29806 59612 92 OK -6 1520 13447 28414 56828 88 OK -7 1240 14165 29570 59140 91 OK - -** nid003409 : node0_score=23774 node0_state=OK uptime=4671519s Overall=OK ** -Ending Fragmentation Report for nid003409 -Node Order9 Order10 Score MB_Free %Free State -0 2752 10531 23814 47628 75 OK -1 2534 11459 25452 50904 78 OK -2 2637 11651 25939 51878 80 OK -3 2568 12668 27904 55808 86 OK -4 2439 12922 28283 56566 87 OK -5 1341 14235 29811 59622 92 OK -6 1516 13452 28420 56840 88 OK -7 1237 14169 29575 59150 91 OK - -** nid003409 : node0_score=23814 node0_state=OK uptime=4671807s Overall=OK ** -2026-08-24A--:--:--.------+--:-- nid003409 #### nid003409 - Job 136854537.dbqs01 VMSTATS Memory Report -**Only Printing Significant Findings - TEST CODE - Results are NOT positive indication of a problem. ** -nid003409 [!] Inactive file cache ballooned: 438647 (threshold: 100000) - ------------------------------------------------------------------- -Job 136854537.dbqs01 - /var/log/messages for job duration: -2026-08-24A--:--:--.------+--:-- nid003409 #### nid003409 - Job 136854537.dbqs01 Runtime Data from /var/log/messages -nid003409: nid003409 #### nid003409 - Job 136854537.dbqs01 Runtime Data from /var/log/messages -nid003409: 2026-08-24T18:49:21.318831+00:00 nid003409 prologue: MARK: Job 136854537.dbqs01 Start -nid003409: 2026-08-24T18:49:21.324496+00:00 nid003409 prologue: Job 136854537.dbqs01 nodelist: nid003409 -nid003409: 2026-08-24T18:49:21.326249+00:00 nid003409 prologue: Job 136854537.dbqs01 - Recording pre-execution stats and counters... -nid003409: 2026-08-24T18:49:21.357982+00:00 nid003409 prologue: Job 136854537.dbqs01 - Killing any stray user processes... -nid003409: 2026-08-24T18:49:21.435425+00:00 nid003409 prologue: Job 136854537.dbqs01 - Clearing /tmp... -nid003409: 2026-08-24T18:49:21.452682+00:00 nid003409 prologue: Job 136854537.dbqs01 - Verifying key post-boot workarounds with warchk... -nid003409: 2026-08-24T18:49:21.482526+00:00 nid003409 WARCHK: root : /sfs/admin/scripts/warchk --batch -nid003409: 2026-08-24T18:49:21.679906+00:00 nid003409 prologue: Job 136854537.dbqs01 - Recording pre-job memory usage... -nid003409: 2026-08-24T18:49:21.760267+00:00 nid003409 prologue: Job 136854537.dbqs01 - FRAG_STATE: ** nid003409 : node0_score=23774 node0_state=OK uptime=4671519s Overall=OK ** -nid003409: 2026-08-24T18:49:21.761334+00:00 nid003409 prologue: Job 136854537.dbqs01 - Recording pre-job HSN counters... -nid003409: 2026-08-24T18:49:21.880265+00:00 nid003409 prologue: Job 136854537.dbqs01 - Recording pre-job Lustre counters... -nid003409: 2026-08-24T18:49:22.954537+00:00 nid003409 prologue: Job 136854537.dbqs01 - Recording initial NFS client statistics... -nid003409: 2026-08-24T18:49:22.965794+00:00 nid003409 prologue: Job 136854537.dbqs01 - Saving a copy of the job script... -nid003409: 2026-08-24T18:49:22.974737+00:00 nid003409 prologue: Job 136854537.dbqs01 - Checking existing ASLR settings... -nid003409: 2026-08-24T18:49:22.980307+00:00 nid003409 prologue: Job 136854537.dbqs01 - Checking palsd open file count... -nid003409: 2026-08-24T18:49:23.071522+00:00 nid003409 PBS_CMD: root : /opt/pbs/bin/qstat -Bf -nid003409: 2026-08-24T18:49:24.124495+00:00 nid003409 prologue: Job 136854537.dbqs01 - Checking one-shot enabled: False -nid003409: 2026-08-24T18:49:24.125593+00:00 nid003409 prologue: Job 136854537.dbqs01 - Enabling turboboost... -nid003409: 2026-08-24T18:49:24.128380+00:00 nid003409 prologue: Job 136854537.dbqs01 - Checking warchk results... -nid003409: 2026-08-24T18:49:24.131491+00:00 nid003409 prologue: Job 136854537.dbqs01 - Warchk Complete -nid003409: 2026-08-24T18:49:24.133786+00:00 nid003409 prologue: Job 136854537.dbqs01 - Prologue complete. Execution time: 5 seconds -nid003409: 2026-08-24T18:50:09.938906+00:00 nid003409 kernel: [4671307.289038][T13202] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid003409: 2026-08-24T18:54:10.221298+00:00 nid003409 epilogue: Job 136854537.dbqs01 complete, running post-job actions. -nid003409: 2026-08-24T18:54:10.241470+00:00 nid003409 epilogue: MARK: Job 136854537.dbqs01 Complete. - ------------------------------------------------------------------- -Job 136854537.dbqs01 - dmesg output for job duration: -2026-08-24A--:--:--.------+--:-- nid003409 #### nid003409 - Job 136854537.dbqs01 Runtime Data from dmesg -nid003409: nid003409 #### nid003409 - Job 136854537.dbqs01 Runtime Data from dmesg -nid003409: [Mon Aug 24 18:45:00 2026] MARK: Job 136854537.dbqs01 Start -nid003409: [Mon Aug 24 18:45:49 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid003409: [Mon Aug 24 18:49:49 2026] MARK: Job 136854537.dbqs01 Complete. - ------------------------------------------------------------------- -Job 136854537.dbqs01 - Pre/Post job diff on HSN (MLX) Counters: -2026-08-24A--:--:--.------+--:-- nid003409 #### nid003409 - Job 136854537.dbqs01 HSN0 MLX Counter Post-Job Difference -nid003409: multicast:: 6868658 | multicast:: 6868717 | Diff: 59 -nid003409: rx_bytes:: 157209729693 | rx_bytes:: 157209943809 | Diff: 214116 -nid003409: rx_packets:: 31836333 | rx_packets:: 31836668 | Diff: 335 -nid003409: tx_bytes:: 103294324119 | tx_bytes:: 103294455541 | Diff: 131422 -nid003409: tx_packets:: 20964120 | tx_packets:: 20964521 | Diff: 401 -nid003409: port_rcv_data:: 153684810153467 | port_rcv_data:: 153685034522950 | Diff: 224369483 -nid003409: port_rcv_packets:: 240431339665 | port_rcv_packets:: 240431682354 | Diff: 342689 -nid003409: port_xmit_data:: 149794720738702 | port_xmit_data:: 149795225060326 | Diff: 504321624 -nid003409: port_xmit_packets:: 238821775557 | port_xmit_packets:: 238822370130 | Diff: 594573 -nid003409: unicast_rcv_packets:: 240431339665 | unicast_rcv_packets:: 240431682354 | Diff: 342689 -nid003409: unicast_xmit_packets:: 238821775557 | unicast_xmit_packets:: 238822370130 | Diff: 594573 -nid003409: resp_cqe_error:: 77766 | resp_cqe_error:: 77784 | Diff: 18 -nid003409: resp_cqe_flush_error:: 74108 | resp_cqe_flush_error:: 74125 | Diff: 17 -nid003409: rx_write_requests:: 41050680 | rx_write_requests:: 41060291 | Diff: 9611 - ------------------------------------------------------------------- -Job 136854537.dbqs01 - Pre/Post job diff for Lustre Stats: -2026-08-24A--:--:--.------+--:-- nid003409 #### nid003409 - Job 136854537.dbqs01 Lustre Counters Post-Job Difference -nid003409: ### LustreStats: Multi-value diffs correspond to [samples min max total sum_of_squares] ### -nid003409: /lfs/h1 vah1-ffff94ee483d2000 : -nid003409: h1: snapshot_time: Diffs: [ 289] secs -nid003409: h1: elapsed_time: Diffs: [ 289] secs -nid003409: h1: ioctl: Diffs: [ 2] reqs -nid003409: h1: getattr: Diffs: [ 15 0 0 61 1085] Avg_usec : 4.06 -nid003409: h1: inode_permission: Diffs: [ 2 0 0 2 2] Avg_usec : 1.00 -nid003409: h1: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 -nid003409: ---------------- -nid003409: /lfs/h2 vah2-ffff94ee483d3800 : -nid003409: h2: snapshot_time: Diffs: [ 289] secs -nid003409: h2: elapsed_time: Diffs: [ 289] secs -nid003409: h2: read_bytes: Diffs: [ 15312 0 0 361750965 7542816781202163] Avg_bytes: 23625.32 -nid003409: h2: write_bytes: Diffs: [ 689 0 0 1990834213 8160800327146371] Avg_bytes: 2889454.59 -nid003409: h2: read: Diffs: [ 15295 0 0 3085043 293929843099] Avg_usec : 201.70 -nid003409: h2: write: Diffs: [ 752 0 0 1154945 2832924837] Avg_usec : 1535.83 -nid003409: h2: ioctl: Diffs: [ 649] reqs -nid003409: h2: open: Diffs: [ 208 0 0 34092 13432148] Avg_usec : 163.90 -nid003409: h2: close: Diffs: [ 209 0 0 17169 4364695] Avg_usec : 82.14 -nid003409: h2: seek: Diffs: [ 3928 0 0 647 99769] Avg_usec : .16 -nid003409: h2: readdir: Diffs: [ 34 0 0 3937 1657585] Avg_usec : 115.79 -nid003409: h2: truncate: Diffs: [ 71 0 0 1673034 613464354878] Avg_usec : 23563.85 -nid003409: h2: flock: Diffs: [ 24 0 0 2193 424267] Avg_usec : 91.37 -nid003409: h2: getattr: Diffs: [ 1772 0 0 43079 15473757] Avg_usec : 24.31 -nid003409: h2: mkdir: Diffs: [ 1 0 0 1025 1050625] Avg_usec : 1025.00 -nid003409: h2: mknod: Diffs: [ 5 0 0 2054 1205822] Avg_usec : 410.80 -nid003409: h2: rename: Diffs: [ 1 0 0 389 151321] Avg_usec : 389.00 -nid003409: h2: getxattr: Diffs: [ 122 0 0 3070 358910] Avg_usec : 25.16 -nid003409: h2: getxattr_hits: Diffs: [ 88] reqs -nid003409: h2: inode_permission: Diffs: [ 13434 0 0 6548 38184] Avg_usec : .48 -nid003409: h2: opencount: Diffs: [ 210 0 0 1020 8312] Avg_reqs : 4.85 -nid003409: ---------------- -nid003409: /lfs/f1 vaf1-ffff94ee483d1000 : -nid003409: f1: snapshot_time: Diffs: [ 289] secs -nid003409: f1: elapsed_time: Diffs: [ 288] secs -nid003409: f1: ioctl: Diffs: [ 2] reqs -nid003409: f1: getattr: Diffs: [ 11 0 0 30 186] Avg_usec : 2.72 -nid003409: f1: inode_permission: Diffs: [ 2 0 0 2 2] Avg_usec : 1.00 -nid003409: f1: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 -nid003409: ---------------- -nid003409: /lfs/f2 vaf2-ffff94ee1c814800 : -nid003409: f2: snapshot_time: Diffs: [ 289] secs -nid003409: f2: elapsed_time: Diffs: [ 288] secs -nid003409: f2: read_bytes: Diffs: [ 28 0 0 338606 9271382370] Avg_bytes: 12093.07 -nid003409: f2: write_bytes: Diffs: [ 18 0 0 29262 98981158] Avg_bytes: 1625.66 -nid003409: f2: read: Diffs: [ 28 0 0 325 6267] Avg_usec : 11.60 -nid003409: f2: write: Diffs: [ 472 0 0 8792 4526556] Avg_usec : 18.62 -nid003409: f2: ioctl: Diffs: [ 14] reqs -nid003409: f2: open: Diffs: [ 23 0 0 665 104753] Avg_usec : 28.91 -nid003409: f2: close: Diffs: [ 23 0 0 2236 698796] Avg_usec : 97.21 -nid003409: f2: seek: Diffs: [ 37 0 0 2157 744751] Avg_usec : 58.29 -nid003409: f2: readdir: Diffs: [ 2 0 0 392 153664] Avg_usec : 196.00 -nid003409: f2: getattr: Diffs: [ 38 0 0 5389 2595479] Avg_usec : 141.81 -nid003409: f2: mknod: Diffs: [ 11 0 0 2969 1006545] Avg_usec : 269.90 -nid003409: f2: getxattr: Diffs: [ 11 0 0 1363 178553] Avg_usec : 123.90 -nid003409: f2: inode_permission: Diffs: [ 138 0 0 283 4861] Avg_usec : 2.05 -nid003409: f2: opencount: Diffs: [ 25 0 0 56 230] Avg_reqs : 2.24 -nid003409: ---------------- -nid003409: /lfs/h3 vah3-ffff94ee75d9a800 : -nid003409: h3: snapshot_time: Diffs: [ 289] secs -nid003409: h3: elapsed_time: Diffs: [ 288] secs -nid003409: h3: ioctl: Diffs: [ 2] reqs -nid003409: h3: getattr: Diffs: [ 7 0 0 26 194] Avg_usec : 3.71 -nid003409: h3: inode_permission: Diffs: [ 2 0 0 2 2] Avg_usec : 1.00 -nid003409: h3: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 -nid003409: ---------------- -nid003409: /apps vaf2-ffff94ee75d9c000 : -nid003409: apps: snapshot_time: Diffs: [ 289] secs -nid003409: apps: elapsed_time: Diffs: [ 289] secs -nid003409: apps: read_bytes: Diffs: [ 11471 0 0 206502228 20083556325462] Avg_bytes: 18002.11 -nid003409: apps: read: Diffs: [ 11471 0 0 704795 246064883] Avg_usec : 61.44 -nid003409: apps: ioctl: Diffs: [ 8177] reqs -nid003409: apps: open: Diffs: [ 14118 0 0 883286 181319070] Avg_usec : 62.56 -nid003409: apps: close: Diffs: [ 14118 0 0 673723 127921805] Avg_usec : 47.72 -nid003409: apps: mmap: Diffs: [ 5796 0 0 33792 504016] Avg_usec : 5.83 -nid003409: apps: page_fault: Diffs: [ 117584 0 0 8829 24361] Avg_usec : .07 -nid003409: apps: seek: Diffs: [ 16218 0 0 11 37] Avg_usec : 0 -nid003409: apps: readdir: Diffs: [ 6182 0 0 413021 351232631] Avg_usec : 66.81 -nid003409: apps: getattr: Diffs: [ 62505 0 0 1230883 201168087] Avg_usec : 19.69 -nid003409: apps: getxattr: Diffs: [ 9 0 0 139 10191] Avg_usec : 15.44 -nid003409: apps: getxattr_hits: Diffs: [ 8] reqs -nid003409: apps: inode_permission: Diffs: [ 833870 0 0 113565 273295] Avg_usec : .13 -nid003409: apps: opencount: Diffs: [ 14120 0 0 54733 317469] Avg_reqs : 3.87 -nid003409: ---------------- - ------------------------------------------------------------------- -### Job 136854537.dbqs01 - NFS Statistics for job duration: -#### 2026-08-24A--:--:--.------+--:-- nid003409 Job 136854537.dbqs01 - DEBUG-NFS: Unable to find NFS stats file: /lfs/f2/hpc/jobdata/136854537/nfsstats.136854537.nid003409 - ------------------------------------------------------------------- -### Job 136854537.dbqs01 - Lustre evictions (if present): - ------------------------------------------------------------------- -### Job 136854537.dbqs01 - Exit status is 271 - ------------------------------------------------------------------- -Job 136854537.dbqs01 - Job summary: -Job Id: 136854537.dbqs01 - Job_Name = ESMPy - Job_Owner = keston.smith@dlogin01.dogwood.wcoss2.ncep.noaa.gov - resources_used.cpupercent = 107 - resources_used.cput = 00:04:47 - resources_used.mem = 7615468kb - resources_used.ncpus = 16 - resources_used.vmem = 7241356kb - resources_used.walltime = 00:04:45 - job_state = R - queue = dev - server = dbqs01 - Account_Name = NWPS-DEV - Checkpoint = u - ctime = Mon Aug 24 18:43:28 2026 - Error_Path = dlogin01.dogwood.wcoss2.ncep.noaa.gov:/lfs/h2/emc/couple/noscr - ub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/sor - c/ESMPy.e136854537 - exec_host = nid003409/0*16 - exec_vnode = (nid003409:ncpus=16:mem=268435456kb) - Hold_Types = n - Join_Path = oe - Keep_Files = oed - Mail_Points = a - mtime = Mon Aug 24 18:54:12 2026 - Output_Path = dlogin01.dogwood.wcoss2.ncep.noaa.gov:/lfs/h2/emc/couple/nosc - rub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/so - rc/ESMPy.o136854537 - Priority = 0 - qtime = Mon Aug 24 18:43:28 2026 - Rerunable = False - Resource_List.alvl = 2 - Resource_List.aslr = True - Resource_List.debug = True - Resource_List.dfs = False - Resource_List.hyper = True - Resource_List.ldebug = False - Resource_List.mem = 256gb - Resource_List.ncpus = 16 - Resource_List.nodect = 1 - Resource_List.one-shot = False - Resource_List.place = exclhost - Resource_List.select = 1:ncpus=16:mem=256GB - Resource_List.turbo = True - Resource_List.walltime = 04:00:00 - schedselect = 1:ncpus=16:mem=256GB:prepost=False - stime = Mon Aug 24 18:49:20 2026 - session_id = 560784 - Shell_Path_List = /bin/bash - jobdir = /u/keston.smith - substate = 42 - Variable_List = PBS_O_HOME=/u/keston.smith,PBS_O_LANG=en_US.UTF-8, - PBS_O_LOGNAME=keston.smith, - PBS_O_PATH=/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/bin:/ - apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfatslqmcrzo5kb4raaq - /bin:/apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5lndzgkkqq36y4a2h4y - x3ahdy/bin:/pe/intel/compilers_and_libraries_2020.4.304/linux/bin/intel - 64:/pe/intel/compilers_and_libraries_2020.4.304/linux/bin:/pe/intel/com - pilers_and_libraries_2020.4.304/linux/mpi/intel64/bin:/pe/intel/debugge - r_2020/gdb/intel64/bin:/opt/cray/pe/craype/2.7.17/bin:/opt/cray/bin:/ap - ps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__ - e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6.0/bin:/apps/ - prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8 - .6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9.2/bin:/apps/p - rod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8. - 6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf5/1.14.0/bin:/opt/cray - /pe/mpich/8.1.19/bin:/u/keston.smith/.local/bin:/usr/local/bin:/usr/bin - :/bin:/opt/c3/bin:/opt/pbs/bin:/sbin:/opt/cray/pe/bin, - PBS_O_MAIL=/var/spool/mail/keston.smith,PBS_O_SHELL=/bin/bash, - PBS_O_WORKDIR=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWP - S/dev/compute_interpolation_weights/sorc,PBS_O_SYSTEM=Linux, - CRAY_LMOD_MPI=cray-mpich/8.0,LMOD_FAMILY_CRAYPE_NETWORK_VERSION=false, - meshID=oc_5km_100km, - LD_LIBRARY_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcf - atslqmcrzo5kb4raaq/lib:/apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5 - lndzgkkqq36y4a2h4yx3ahdy/lib:/pe/intel/compilers_and_libraries_2020.4.3 - 04/linux/compiler/lib/intel64_lin:/pe/intel/compilers_and_libraries_202 - 0.4.304/linux/mpi/intel64/lib/release:/pe/intel/compilers_and_libraries - _2020.4.304/linux/mpi/intel64/lib:/pe/intel/compilers_and_libraries_202 - 0.4.304/linux/ipp/lib/intel64:/pe/intel/compilers_and_libraries_2020.4. - 304/linux/mkl/lib/intel64_lin:/pe/intel/compilers_and_libraries_2020.4. - 304/linux/tbb/lib/intel64/gcc4.8:/pe/intel/debugger_2020/python/intel64 - /lib:/pe/intel/debugger_2020/libipt/intel64/lib:/opt/cray/lib64:/apps/p - rod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8. - 6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6.0/lib:/apps/prod - /hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0 - pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9.2/lib:/apps/prod/ - hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0p - netcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf5/1.14.0/lib, - LS_COLORS=no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd= - 40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com - =01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tg - z=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.l - zma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2= - 00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.xz=00;31:*.avi=01;35:*.bmp - =01;35:*.dl=01;35:*.fli=01;35:*.gif=01;35:*.gl=01;35:*.jpg=01;35:*.jpeg - =01;35:*.mkv=01;35:*.mng=01;35:*.mov=01;35:*.mp4=01;35:*.mpg=01;35:*.pc - x=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.svg=01;35:*.t - ga=01;35:*.tif=01;35:*.webm=01;35:*.webp=01;35:*.wmv=01;35:*.xbm=01;35: - *.xcf=01;35:*.xpm=01;35:*.aiff=00;32:*.ape=00;32:*.au=00;32:*.flac=00;3 - 2:*.m4a=00;32:*.mid=00;32:*.mp3=00;32:*.mpc=00;32:*.ogg=00;32:*.voc=00; - 32:*.wav=00;32:*.wma=00;32:*.wv=00;32:,HOSTTYPE=x86_64, - LMOD_CUSTOM_PATHS=COMPILER/apps/ops/prod/nco/modulefiles/compiler/inte - l/19.1.3.304:COMPILER/apps/ops/prod/libs/modulefiles/compiler/intel/19. - 1.3.304:COMPILER/apps/prod/lmodules/intel/19.1.3.304:COMPILER/apps/ops/ - prod/nco/models/modulefiles:CNCM/apps/ops/prod/libs/modulefiles/mpi/int - el/19.1.3.304/cray-mpich/8.1.4:CNCM/apps/prod/lmodules/INTEL_cray_mpich - /19.1.3.304/cray-mpich/8.1.4, - __LMOD_REF_COUNT_PATH=/apps/prod/ve/intel/19.1.3.304/python/3.12.0/haf - s/2.1/bin:1;/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfatslq - mcrzo5kb4raaq/bin:1;/apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5lnd - zgkkqq36y4a2h4yx3ahdy/bin:1;/pe/intel/compilers_and_libraries_2020.4.30 - 4/linux/bin/intel64:1;/pe/intel/compilers_and_libraries_2020.4.304/linu - x/bin:1;/pe/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/ - bin:1;/pe/intel/debugger_2020/gdb/intel64/bin:1;/opt/cray/pe/craype/2.7 - .17/bin:1;/opt/cray/bin:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__ - h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich - -8.1.12/esmf/8.6.0/bin:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h - -1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich- - 8.1.12/netcdf/4.9.2/bin:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__ - h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich - -8.1.12/hdf5/1.14.0/bin:1;/opt/cray/pe/mpich/8.1.19/bin:1;/u/keston.smi - th/.local/bin:1;/usr/local/bin:1;/usr/bin:1;/bin:2;/opt/c3/bin:1;/opt/p - bs/bin:1;/sbin:1;/opt/cray/pe/bin:1, - _ModuleTable002_=b2FkT3JkZXIiXT0xMCxwcm9wVD17fSxbInN0YWNrRGVwdGgiXT0xL - Fsic3RhdHVzIl09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJdPSJQcmdFbnYtaW50ZWwvOC41LjAi - LH0sWyJjcmF5LW1waWNoIl09e1siZm4iXT0iL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZml - sZXMvY29tbmV0L2ludGVsLzE5LjAvb2ZpLzEuMC9jcmF5LW1waWNoLzguMS4xOS5sdWEiLF - siZnVsbE5hbWUiXT0iY3JheS1tcGljaC84LjEuMTkiLFsibG9hZE9yZGVyIl09MSxwcm9wV - D17fSxbInN0YWNrRGVwdGgiXT0wLFsic3RhdHVzIl09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJd - PSJjcmF5LW1waWNoLzguMS4xOSIsfSxjcmF5cGU9e1siZm4iXT0iL29wdC9jcmF5L3BlL2x - tb2QvbW9kdWxlZmlsZXMvY29yZS9jcmF5, - PE_MPICH_GTL_DIR_amd_gfx90a=-L/opt/cray/pe/mpich/8.1.19/gtl/lib, - SSH_CONNECTION=192.58.153.8 43034 192.58.153.11 22, - mesh=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/com - pute_interpolation_weights/sorc/../../..//fix/rwps.oc_5km_100km.msh, - INCLUDE=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfatslqmcr - zo5kb4raaq/include:/apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5lndz - gkkqq36y4a2h4yx3ahdy/include,XAUTHLOCALHOSTNAME=dlogin01, - LESSCLOSE=lessclose.sh %s %s, - CRAY_LD_LIBRARY_PATH=/opt/cray/pe/mpich/8.1.19/ofi/intel/19.0/lib:/opt - /cray/pe/mpich/8.1.19/gtl/lib, - __LMOD_REF_COUNT_DYLD_LIBRARY_PATH=/apps/prod/hpc-stack/i-19.1.3.304__ - m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/ - cray-mpich-8.1.12/esmf/8.6.0/lib:1;/apps/prod/hpc-stack/i-19.1.3.304__m - -8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/c - ray-mpich-8.1.12/netcdf/4.9.2/lib:1;/apps/prod/hpc-stack/i-19.1.3.304__ - m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/ - cray-mpich-8.1.12/hdf5/1.14.0/lib:1, - XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB,PE_ENV=INTEL, - __LMOD_REF_COUNT_C_INCLUDE_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.30 - 4/cjbmc7tacv5qcfatslqmcrzo5kb4raaq/include:1;/apps/spack/geos/3.8.1/int - el/19.1.3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy/include:1, - __LMOD_REF_COUNT_PE_FORTRAN_PKGCONFIG_LIBS=mpichf90:1, - ESMF_LIB=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9. - 2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6 - .0/lib,LMOD_FAMILY_CRAYPE_CPU=craype-x86-rome, - CRAY_LMOD_COMPILER=intel/19.0, - LMOD_MODULERCFILE=/apps/prod/lmodules/.modulerc.lua, - PE_PRODUCT_LIST=CRAYPE:CRAYPE_X86_ROME,LMOD_IGNORE_CACHE=yes, - LMOD_FAMILY_MPI_VERSION=8.1.19, - PE_PERFTOOLS_MPICH_LIBDIR=/opt/cray/pe/mpich/8.1.19/ofi/intel/19.0/lib - ,PE_MPICH_GTL_DIR_amd_gfx906=-L/opt/cray/pe/mpich/8.1.19/gtl/lib, - LANG=en_US.UTF-8,NetCDF_VERSION=4.9.2, - PE_MPICH_GTL_DIR_amd_gfx908=-L/opt/cray/pe/mpich/8.1.19/gtl/lib, - WINDOWMANAGER=xterm, - _ModuleTable008_=ciJdPTMscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MCxbInN0YXR1c - yJdPSJhY3RpdmUiLFsidXNlck5hbWUiXT0ibmV0Y2RmLUMvNC45LjIiLH0scHJvaj17WyJm - biJdPSIvYXBwcy9wcm9kL2xtb2R1bGVzL2ludGVsLzE5LjEuMy4zMDQvcHJvai83LjEuMCI - sWyJmdWxsTmFtZSJdPSJwcm9qLzcuMS4wIixbImxvYWRPcmRlciJdPTEzLHByb3BUPXt9LF - sic3RhY2tEZXB0aCJdPTEsWyJzdGF0dXMiXT0iYWN0aXZlIixbInVzZXJOYW1lIl09InByb - 2ovNy4xLjAiLH0sWyJ2ZS9oYWZzIl09e1siZm4iXT0iL2FwcHMvcHJvZC9sbW9kdWxlcy9p - bnRlbC8xOS4xLjMuMzA0L3ZlL2hhZnMvMi4xIixbImZ1bGxOYW1lIl09InZlL2hhZnMvMi4 - xIixbImxvYWRPcmRlciJdPTE0LHByb3BU,LESS=-M -I -R, - PE_MPICH_GTL_LIBS_nvidia70=-lmpi_gtl_cuda, - __LMOD_REF_COUNT_INTEL_LICENSE_FILE=/pe/intel/compilers_and_libraries_ - 2020.4.304/linux/licenses:1;/opt/intel/licenses:1;/intel/licenses:1, - DISPLAY=localhost:20.0,HISTTIMEFORMAT=%F %T, - LMOD_FAMILY_COMPILER_VERSION=19.1.3.304,HOSTNAME=dlogin01, - IPPROOT=/pe/intel/compilers_and_libraries_2020.4.304/linux/ipp, - LMOD_SYSTEM_DEFAULT_MODULES=envvar/1.0, - OLDPWD=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/p - reprocess, - __LMOD_REF_COUNT__LMFILES_=/opt/cray/pe/lmod/modulefiles/comnet/intel/ - 19.0/ofi/1.0/cray-mpich/8.1.19.lua:1;/apps/prod/lmodules/INTEL_cray_mpi - ch/19.1.3.304/cray-mpich/8.1.4/hdf5-C/1.14.0.lua:1;/apps/prod/lmodules/ - INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4/netcdf-C/4.9.2.lua:1;/apps - /prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4/esmf-C/8.6. - 0.lua:1;/opt/cray/pe/lmod/modulefiles/craype-targets/default/craype-x86 - -rome.lua:1;/opt/cray/modulefiles/libfabric/1.20.1:1;/opt/cray/pe/lmod/ - modulefiles/craype-targets/default/craype-network-ofi.lua:1;/apps/prod/ - lmodules/sys_core/envvar/1.0:1;/opt/cray/pe/lmod/modulefiles/core/crayp - e/2.7.17.lua:1;/opt/cray/pe/lmod/modulefiles/core/PrgEnv-intel/8.5.0.lu - a:1;/apps/prod/lmodules/core/intel/19.1.3.304.lua:1;/apps/prod/lmodules - /intel/19.1.3.304/geos/3.8.1:1;/apps/prod/lmodules/intel/19.1.3.304/pro - j/7.1.0:1;/apps/prod/lmodules/intel/19.1.3.304/ve/hafs/2.1:1, - CONFIG_SITE=/usr/share/site/x86_64-unknown-linux-gnu,CSHEDIT=emacs, - NETCDF_ROOT=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4 - .9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcd - f/4.9.2, - C_INCLUDE_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfa - tslqmcrzo5kb4raaq/include:/apps/spack/geos/3.8.1/intel/19.1.3.304/5reck - tk5lndzgkkqq36y4a2h4yx3ahdy/include, - HDF5_ROOT=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9 - .2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf5/1. - 14.0, - LMOD_CUSTOM_CNCM_INTEL_19_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX - =/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/apps - /ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4, - NETCDF_VERSION=4.9.2, - LMOD_CUSTOM_COMPILER_GNU_8_0_PREFIX=/apps/prod/lmodules/gcc/11.2.0:/ap - ps/prod/lmodules/gcc/10.2.0,ESMF_VERSION=8.6.0,GPG_TTY=/dev/pts/20, - LESS_ADVANCED_PREPROCESSOR=no, - HDF5_LIBRARIES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__ - n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hd - f5/1.14.0/lib,COLORTERM=1, - _ModuleTable007_=PTEsWyJzdGF0dXMiXT0iYWN0aXZlIixbInVzZXJOYW1lIl09Imlud - GVsLzE5LjEuMy4zMDQiLH0sbGliZmFicmljPXtbImZuIl09Ii9vcHQvY3JheS9tb2R1bGVm - aWxlcy9saWJmYWJyaWMvMS4yMC4xIixbImZ1bGxOYW1lIl09ImxpYmZhYnJpYy8xLjIwLjE - iLFsibG9hZE9yZGVyIl09Nixwcm9wVD17fSxbInN0YWNrRGVwdGgiXT0zLFsic3RhdHVzIl - 09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJdPSJsaWJmYWJyaWMiLH0sWyJuZXRjZGYtQyJdPXtbI - mZuIl09Ii9hcHBzL3Byb2QvbG1vZHVsZXMvSU5URUxfY3JheV9tcGljaC8xOS4xLjMuMzA0 - L2NyYXktbXBpY2gvOC4xLjQvbmV0Y2RmLUMvNC45LjIubHVhIixbImZ1bGxOYW1lIl09Im5 - ldGNkZi1DLzQuOS4yIixbImxvYWRPcmRl, - ESMF_DIR=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9. - 2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6 - .0, - __LMOD_REF_COUNT_NLSPATH=/pe/intel/compilers_and_libraries_2020.4.304/ - linux/compiler/lib/intel64/locale/%l_%t/%N:1;/pe/intel/compilers_and_li - braries_2020.4.304/linux/mkl/lib/intel64_lin/locale/%l_%t/%N:1;/pe/inte - l/debugger_2020/gdb/intel64/share/locale/%l_%t/%N:1, - __LMOD_REF_COUNT_CPLUS_INCLUDE_PATH=/apps/spack/proj/7.1.0/intel/19.1. - 3.304/cjbmc7tacv5qcfatslqmcrzo5kb4raaq/include:1;/apps/spack/geos/3.8.1 - /intel/19.1.3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy/include:1, - LMOD_FAMILY_CRAYPE_NETWORK=craype-network-ofi, - LMOD_FAMILY_CRAYPE_VERSION=2.7.17, - NetCDF_INCLUDES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0_ - _n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/n - etcdf/4.9.2/include, - __LMOD_REF_COUNT_INCLUDE=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc - 7tacv5qcfatslqmcrzo5kb4raaq/include:1;/apps/spack/geos/3.8.1/intel/19.1 - .3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy/include:1, - DYLD_LIBRARY_PATH=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14. - 0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12 - /esmf/8.6.0/lib:/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__ - n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/ne - tcdf/4.9.2/lib:/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n - -4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf - 5/1.14.0/lib,MACHTYPE=x86_64-suse-linux, - __LMOD_REF_COUNT_LD_LIBRARY_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.3 - 04/cjbmc7tacv5qcfatslqmcrzo5kb4raaq/lib:1;/apps/spack/geos/3.8.1/intel/ - 19.1.3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy/lib:1;/pe/intel/compilers_a - nd_libraries_2020.4.304/linux/compiler/lib/intel64_lin:1;/pe/intel/comp - ilers_and_libraries_2020.4.304/linux/mpi/intel64/lib/release:1;/pe/inte - l/compilers_and_libraries_2020.4.304/linux/mpi/intel64/lib:1;/pe/intel/ - compilers_and_libraries_2020.4.304/linux/ipp/lib/intel64:1;/pe/intel/co - mpilers_and_libraries_2020.4.304/linux/mkl/lib/intel64_lin:1;/pe/intel/ - compilers_and_libraries_2020.4.304/linux/tbb/lib/intel64/gcc4.8:1;/pe/i - ntel/debugger_2020/python/intel64/lib:1;/pe/intel/debugger_2020/libipt/ - intel64/lib:1;/opt/cray/lib64:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8. - 1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray - -mpich-8.1.12/esmf/8.6.0/lib:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1 - .12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray- - mpich-8.1.12/netcdf/4.9.2/lib:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8. - 1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray - -mpich-8.1.12/hdf5/1.14.0/lib:1, - __LMOD_REF_COUNT_PKG_CONFIG_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.3 - 04/cjbmc7tacv5qcfatslqmcrzo5kb4raaq/lib/pkgconfig:1;/pe/intel/compilers - _and_libraries_2020.4.304/linux/mkl/bin/pkgconfig:1;/opt/cray/pe/craype - /2.7.17/pkg-config:1;/opt/cray/lib64/pkgconfig:1, - LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_UCX_1_0_PREFIX=/apps/prod/lmodules/cce - /13.0.0:/apps/prod/lmodules/cce/12.0.3:/apps/prod/lmodules/cce/11.0.4, - PE_PKGCONFIG_PRODUCTS=PE_MPICH, - CRAY_MPICH_BASEDIR=/opt/cray/pe/mpich/8.1.19/ofi, - PE_MPICH_GTL_DIR_nvidia80=-L/opt/cray/pe/mpich/8.1.19/gtl/lib, - tmp=/tmpfiles,SSH_AUTH_SOCK=/tmp/ssh-4Jj8NWWunyXC/agent.2417289, - _ModuleTable004_=cm9tZSJdPXtbImZuIl09Ii9vcHQvY3JheS9wZS9sbW9kL21vZHVsZ - WZpbGVzL2NyYXlwZS10YXJnZXRzL2RlZmF1bHQvY3JheXBlLXg4Ni1yb21lLmx1YSIsWyJm - dWxsTmFtZSJdPSJjcmF5cGUteDg2LXJvbWUiLFsibG9hZE9yZGVyIl09NSxwcm9wVD17fSx - bInN0YWNrRGVwdGgiXT0yLFsic3RhdHVzIl09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJdPSJjcm - F5cGUteDg2LXJvbWUiLH0sZW52dmFyPXtbImZuIl09Ii9hcHBzL3Byb2QvbG1vZHVsZXMvc - 3lzX2NvcmUvZW52dmFyLzEuMCIsWyJmdWxsTmFtZSJdPSJlbnZ2YXIvMS4wIixbImxvYWRP - cmRlciJdPTgscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MSxbInN0YXR1cyJdPSJhY3RpdmU - iLFsidXNlck5hbWUiXT0iZW52dmFyLzEu, - VIRTUAL_ENV=/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1, - MINICOM=-c on, - HDF5_INCLUDES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n - -4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf - 5/1.14.0/include, - PE_MPICH_PKGCONFIG_VARIABLES=PE_MPICH_GTL_DIR_@accelerator@:PE_MPICH_G - TL_LIBS_@accelerator@, - ESMFMKFILE=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4. - 9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8 - .6.0/lib/esmf.mk,PE_MPICH_PKGCONFIG_LIBS=mpich, - INTEL_PYTHONHOME=/pe/intel/debugger_2020/python/intel64/, - QT_SYSTEM_DIR=/usr/share/desktop-data,OSTYPE=linux, - NETCDF=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2_ - _p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9 - .2,meshname=rwps.oc_5km_100km, - CLASSPATH=/pe/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel - 64/lib/mpi.jar, - PROJ_LIB=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfatslqmc - rzo5kb4raaq/share/proj/,USER=keston.smith, - ESMF_INC=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9. - 2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6 - .0/include,MODULES_SET_SHELL_STARTUP=0,PAGER=less, - NetCDF_ROOT=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4 - .9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcd - f/4.9.2,PE_MPICH_GENCOMPILERS_INTEL=19.0,MODULE_VERSION=3.2.10, - ESMF_INCLUDES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n - -4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esm - f/8.6.0/include, - LMOD_CUSTOM_CNCM_GNU_8_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX=/a - pps/prod/lmodules/GCC_cray_mpich/10.2.0/cray-mpich/8.1.4, - LMOD_FAMILY_PRGENV_VERSION=8.5.0, - _ModuleTable012_=dWxlcy8kTU9EVUxFX1ZFUlNJT04vbW9kdWxlZmlsZXM6L3Vzci9za - GFyZS9tb2R1bGVzL21vZHVsZWZpbGVzOi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvTGludXg6 - L3Vzci9zaGFyZS9tb2R1bGVmaWxlcy9Db3JlOi91c3Ivc2hhcmUvbG1vZC9sbW9kL21vZHV - sZWZpbGVzL0NvcmU6L29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY29yZTovb3B0L2 - NyYXkvcGUvbG1vZC9tb2R1bGVmaWxlcy9jcmF5cGUtdGFyZ2V0cy9kZWZhdWx0Oi9hcHBzL - 3Byb2QvbG1vZHVsZXMvc3lzX2NvcmU6L2FwcHMvb3BzL3Byb2QvbmNvL21vZHVsZWZpbGVz - L2NvcmU6L2FwcHMvcHJvZC9sbW9kdWxlcy9jb3JlOi9vcHQvY3JheS9tb2R1bGVmaWxlcyI - sfQ==, - ESMF_PATH=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9 - .2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8. - 6.0, - LMOD_CUSTOM_CNCM_GNU_8_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX=/a - pps/prod/lmodules/GCC_cray_mpich/10.2.0/cray-mpich/8.1.4, - CRAY_CPU_TARGET=x86-rome, - LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PR - EFIX=/apps/prod/lmodules/CCE_cray_mpich/11.0.4/cray-mpich/8.1.4, - PKGCONFIG_ENABLED=1, - __LMOD_REF_COUNT_MODULEPATH=/apps/ops/prod/nco/modulefiles/compiler/in - tel/19.1.3.304:1;/apps/ops/prod/libs/modulefiles/compiler/intel/19.1.3. - 304:1;/apps/prod/lmodules/intel/19.1.3.304:1;/apps/ops/prod/nco/models/ - modulefiles:1;/apps/ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray - -mpich/8.1.4:1;/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpi - ch/8.1.4:1;/opt/cray/pe/lmod/modulefiles/comnet/intel/19.0/ofi/1.0:1;/a - pps/prod/lmodules/compiler/intel/19.0:1;/opt/cray/pe/lmod/modulefiles/n - et/ofi/1.0:1;/opt/cray/pe/lmod/modulefiles/cpu/x86-rome/1.0:1;/opt/cray - /pe/lmod/modulefiles/mpi/intel/19.0/ofi/1.0/cray-mpich/8.0:1;/usr/share - /modules:1;/usr/share/Modules/$MODULE_VERSION/modulefiles:1;/usr/share/ - modules/modulefiles:1;/usr/share/modulefiles/Linux:1;/usr/share/modulef - iles/Core:1;/usr/share/lmod/lmod/modulefiles/Core:1;/opt/cray/pe/lmod/m - odulefiles/core:1;/opt/cray/pe/lmod/modulefiles/craype-targets/default: - 1;/apps/prod/lmodules/sys_core:1;/apps/ops/prod/nco/modulefiles/core:1; - /apps/prod/lmodules/core:1;/opt/cray/modulefiles:1, - COMINrrfs=/lfs/h1/ops/prod/com/rrfs/v1.0/rrfs./,MORE=-sl, - PE_FORTRAN_PKGCONFIG_LIBS=mpichf90, - __LMOD_REF_COUNT_LOADEDMODULES=cray-mpich/8.1.19:1;hdf5-C/1.14.0:1;net - cdf-C/4.9.2:1;esmf-C/8.6.0:1;craype-x86-rome:1;libfabric/1.20.1:1;crayp - e-network-ofi:1;envvar/1.0:1;craype/2.7.17:1;PrgEnv-intel/8.5.0:1;intel - /19.1.3.304:1;geos/3.8.1:1;proj/7.1.0:1;ve/hafs/2.1:1, - __LMOD_REF_COUNT_CRAY_LD_LIBRARY_PATH=/opt/cray/pe/mpich/8.1.19/ofi/in - tel/19.0/lib:1;/opt/cray/pe/mpich/8.1.19/gtl/lib:1, - INTEL_MAJOR_VERSION=19.1, - PWD=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp - ute_interpolation_weights/sorc, - ESMF_MOD=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9. - 2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6 - .0/mod,PE_MPICH_GTL_DIR_nvidia70=-L/opt/cray/pe/mpich/8.1.19/gtl/lib, - COMINrtofs=/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs./, - HOME=/u/keston.smith, - COMINnbm=/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.//grib2, - PELOCAL_PRGENV=true, - CMAKE_PREFIX_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5q - cfatslqmcrzo5kb4raaq:/apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5ln - dzgkkqq36y4a2h4yx3ahdy,SSH_AGENT_PID=2417290,HOST=dlogin01, - SSH_CLIENT=192.58.153.8 43034 22,LMOD_VERSION=8.3.1, - XNLSPATH=/usr/share/X11/nls,PE_MPICH_FORTRAN_PKGCONFIG_LIBS=mpichf90, - CPATH=/pe/intel/compilers_and_libraries_2020.4.304/linux/ipp/include:/ - pe/intel/compilers_and_libraries_2020.4.304/linux/mkl/include:/pe/intel - /compilers_and_libraries_2020.4.304/linux/pstl/include:/pe/intel/compil - ers_and_libraries_2020.4.304/linux/pstl/stdlib:/pe/intel/compilers_and_ - libraries_2020.4.304/linux/tbb/include:/apps/prod/hpc-stack/i-19.1.3.30 - 4__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.3 - 04/cray-mpich-8.1.12/esmf/8.6.0/include:/apps/prod/hpc-stack/i-19.1.3.3 - 04__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3. - 304/cray-mpich-8.1.12/netcdf/4.9.2/include:/apps/prod/hpc-stack/i-19.1. - 3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1 - .3.304/cray-mpich-8.1.12/hdf5/1.14.0/include, - __LMOD_REF_COUNT_INFOPATH=/pe/intel/documentation_2020/en/debugger/gdb - -ia/info:1;/apps/docs/info:1,CRAY_LMOD_CPU=x86-rome/1.0, - PE_MPICH_GTL_LIBS_nvidia80=-lmpi_gtl_cuda, - LMOD_FAMILY_CRAYPE_CPU_VERSION=false, - BASH_ENV=/usr/share/lmod/lmod/init/bash,XDG_DATA_DIRS=/usr/share, - __LMOD_REF_COUNT_PE_MPICH_FORTRAN_PKGCONFIG_LIBS=mpichf90:1, - INTEL_MINOR_VERSION=3.304, - LMOD_CUSTOM_CNCM_INTEL_19_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX - =/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/apps - /ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4, - CRAY_LMOD_NET=ofi/1.0, - RWPSroot=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev - /compute_interpolation_weights/sorc/../../../,COMINlocal=/tmpfiles, - __LMOD_REF_COUNT_PE_PKGCONFIG_PRODUCTS=PE_MPICH:1, - PE_MPICH_MODULE_NAME=cray-mpich, - __LMOD_REF_COUNT_LMOD_CUSTOM_COMPILER_INTEL_19_0_PREFIX=/apps/ops/prod - /nco/models/modulefiles:10;/apps/prod/lmodules/intel/19.1.3.304:1;/apps - /ops/prod/libs/modulefiles/compiler/intel/19.1.3.304:1;/apps/ops/prod/n - co/modulefiles/compiler/intel/19.1.3.304:1, - NLSPATH=/pe/intel/compilers_and_libraries_2020.4.304/linux/compiler/li - b/intel64/locale/%l_%t/%N:/pe/intel/compilers_and_libraries_2020.4.304/ - linux/mkl/lib/intel64_lin/locale/%l_%t/%N:/pe/intel/debugger_2020/gdb/i - ntel64/share/locale/%l_%t/%N,LIBGL_DEBUG=quiet, - LMOD_CUSTOM_COMPILER_INTEL_19_0_PREFIX=/apps/ops/prod/nco/models/modul - efiles:/apps/prod/lmodules/intel/19.1.3.304:/apps/ops/prod/libs/modulef - iles/compiler/intel/19.1.3.304:/apps/ops/prod/nco/modulefiles/compiler/ - intel/19.1.3.304,__LMOD_REF_COUNT_PE_MPICH_FIXED_PRGENV=INTEL:1, - __LMOD_REF_COUNT_LIBRARY_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/ - cjbmc7tacv5qcfatslqmcrzo5kb4raaq/lib:1;/apps/spack/geos/3.8.1/intel/19. - 1.3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy/lib:1;/pe/intel/compilers_and_ - libraries_2020.4.304/linux/ipp/lib/intel64:1;/pe/intel/compilers_and_li - braries_2020.4.304/linux/compiler/lib/intel64_lin:1;/pe/intel/compilers - _and_libraries_2020.4.304/linux/mkl/lib/intel64_lin:1;/pe/intel/compile - rs_and_libraries_2020.4.304/linux/tbb/lib/intel64/gcc4.8:2;/apps/prod/h - pc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pn - etcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6.0/lib:1, - PROFILEREAD=true, - LIBRARY_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfats - lqmcrzo5kb4raaq/lib:/apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5lnd - zgkkqq36y4a2h4yx3ahdy/lib:/pe/intel/compilers_and_libraries_2020.4.304/ - linux/ipp/lib/intel64:/pe/intel/compilers_and_libraries_2020.4.304/linu - x/compiler/lib/intel64_lin:/pe/intel/compilers_and_libraries_2020.4.304 - /linux/mkl/lib/intel64_lin:/pe/intel/compilers_and_libraries_2020.4.304 - /linux/tbb/lib/intel64/gcc4.8:/apps/prod/hpc-stack/i-19.1.3.304__m-8.1. - 12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-m - pich-8.1.12/esmf/8.6.0/lib, - __LMOD_REF_COUNT_CMAKE_PREFIX_PATH=/apps/spack/proj/7.1.0/intel/19.1.3 - .304/cjbmc7tacv5qcfatslqmcrzo5kb4raaq:1;/apps/spack/geos/3.8.1/intel/19 - .1.3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy:1,LMOD_sys=Linux, - _ModuleTable010_=aWNoLzE5LjEuMy4zMDQvY3JheS1tcGljaC84LjEuNCIsIi9vcHQvY - 3JheS9wZS9sbW9kL21vZHVsZWZpbGVzL2NvbW5ldC9pbnRlbC8xOS4wL29maS8xLjAiLCIv - YXBwcy9wcm9kL2xtb2R1bGVzL2NvbXBpbGVyL2ludGVsLzE5LjAiLCIvb3B0L2NyYXkvcGU - vbG1vZC9tb2R1bGVmaWxlcy9uZXQvb2ZpLzEuMCIsIi9vcHQvY3JheS9wZS9sbW9kL21vZH - VsZWZpbGVzL2NwdS94ODYtcm9tZS8xLjAiLCIvb3B0L2NyYXkvcGUvbG1vZC9tb2R1bGVma - Wxlcy9tcGkvaW50ZWwvMTkuMC9vZmkvMS4wL2NyYXktbXBpY2gvOC4wIiwiL3Vzci9zaGFy - ZS9tb2R1bGVzIiwiL3Vzci9zaGFyZS9Nb2R1bGVzLyRNT0RVTEVfVkVSU0lPTi9tb2R1bGV - maWxlcyIsIi91c3Ivc2hhcmUvbW9kdWxl,PE_PKGCONFIG_LIBS=mpich, - _ModuleTable001_=X01vZHVsZVRhYmxlXz17WyJNVHZlcnNpb24iXT0zLFsiY19yZWJ1a - WxkVGltZSJdPWZhbHNlLFsiY19zaG9ydFRpbWUiXT1mYWxzZSxkZXB0aFQ9e30sZmFtaWx5 - PXtbIlByZ0VudiJdPSJQcmdFbnYtaW50ZWwiLFsiY29tcGlsZXIiXT0iaW50ZWwiLFsiY3J - heXBlIl09ImNyYXlwZSIsWyJjcmF5cGVfY3B1Il09ImNyYXlwZS14ODYtcm9tZSIsWyJjcm - F5cGVfbmV0d29yayJdPSJjcmF5cGUtbmV0d29yay1vZmkiLFsibXBpIl09ImNyYXktbXBpY - 2giLH0sbVQ9e1siUHJnRW52LWludGVsIl09e1siZm4iXT0iL29wdC9jcmF5L3BlL2xtb2Qv - bW9kdWxlZmlsZXMvY29yZS9QcmdFbnYtaW50ZWwvOC41LjAubHVhIixbImZ1bGxOYW1lIl0 - 9IlByZ0Vudi1pbnRlbC84LjUuMCIsWyJs, - LOADEDMODULES=cray-mpich/8.1.19:hdf5-C/1.14.0:netcdf-C/4.9.2:esmf-C/8. - 6.0:craype-x86-rome:libfabric/1.20.1:craype-network-ofi:envvar/1.0:cray - pe/2.7.17:PrgEnv-intel/8.5.0:intel/19.1.3.304:geos/3.8.1:proj/7.1.0:ve/ - hafs/2.1,LMOD_AVAIL_STYLE=en_grouped:system,CRAYPE_NETWORK_TARGET=ofi, - _ModuleTable006_=ZXJOYW1lIl09Imdlb3MvMy44LjEiLH0sWyJoZGY1LUMiXT17WyJmb - iJdPSIvYXBwcy9wcm9kL2xtb2R1bGVzL0lOVEVMX2NyYXlfbXBpY2gvMTkuMS4zLjMwNC9j - cmF5LW1waWNoLzguMS40L2hkZjUtQy8xLjE0LjAubHVhIixbImZ1bGxOYW1lIl09ImhkZjU - tQy8xLjE0LjAiLFsibG9hZE9yZGVyIl09Mixwcm9wVD17fSxbInN0YWNrRGVwdGgiXT0wLF - sic3RhdHVzIl09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJdPSJoZGY1LUMvMS4xNC4wIix9LGlud - GVsPXtbImZuIl09Ii9hcHBzL3Byb2QvbG1vZHVsZXMvY29yZS9pbnRlbC8xOS4xLjMuMzA0 - Lmx1YSIsWyJmdWxsTmFtZSJdPSJpbnRlbC8xOS4xLjMuMzA0IixbImxvYWRPcmRlciJdPTE - xLHByb3BUPXt9LFsic3RhY2tEZXB0aCJd, - __LMOD_REF_COUNT_MANPATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc - 7tacv5qcfatslqmcrzo5kb4raaq/share/man:1;/pe/intel/man/common:1;/pe/inte - l/compilers_and_libraries_2020.4.304/linux/mpi/man:1;/pe/intel/document - ation_2020/en/debugger/gdb-ia/man:1;/opt/cray/pe/craype/2.7.17/man:1;/o - pt/cray/share/man:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14 - .0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.1 - 2/esmf/8.6.0/share/man:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h - -1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich- - 8.1.12/netcdf/4.9.2/share/man:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8. - 1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray - -mpich-8.1.12/hdf5/1.14.0/share/man:1;/opt/cray/pe/mpich/8.1.19/ofi/man - :1;/opt/cray/pe/mpich/8.1.19/man/mpich:1;/usr/share/lmod/lmod/share/man - :1;/usr/share/man:1;/opt/c3/man:1;/opt/pbs/share/man:1, - _ModuleTable003_=cGUvMi43LjE3Lmx1YSIsWyJmdWxsTmFtZSJdPSJjcmF5cGUvMi43L - jE3IixbImxvYWRPcmRlciJdPTkscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MixbInN0YXR1 - cyJdPSJhY3RpdmUiLFsidXNlck5hbWUiXT0iY3JheXBlIix9LFsiY3JheXBlLW5ldHdvcms - tb2ZpIl09e1siZm4iXT0iL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY3JheXBlLX - RhcmdldHMvZGVmYXVsdC9jcmF5cGUtbmV0d29yay1vZmkubHVhIixbImZ1bGxOYW1lIl09I - mNyYXlwZS1uZXR3b3JrLW9maSIsWyJsb2FkT3JkZXIiXT03LHByb3BUPXt9LFsic3RhY2tE - ZXB0aCJdPTIsWyJzdGF0dXMiXT0iYWN0aXZlIixbInVzZXJOYW1lIl09ImNyYXlwZS1uZXR - 3b3JrLW9maSIsfSxbImNyYXlwZS14ODYt, - INTEL_LICENSE_FILE=/pe/intel/compilers_and_libraries_2020.4.304/linux/ - licenses:/opt/intel/licenses:/intel/licenses,LMOD_ROOT=/usr/share/lmod, - SSH_TTY=/dev/pts/20,FROM_HEADER=, - CRAY_MPICH_ROOTDIR=/opt/cray/pe/mpich/8.1.19, - MAIL=/var/spool/mail/keston.smith, - PE_INTEL_FIXED_PKGCONFIG_PATH=/opt/cray/pe/mpich/8.1.19/ofi/intel/19.0 - /lib/pkgconfig, - COMINstofs=/lfs/h1/ops/prod/com/stofs/v3.1/stofs_2d_glo., - __LMOD_REF_COUNT_PE_MPICH_GENCOMPILERS_INTEL=19.0:1, - LESSKEY=/etc/lesskey.bin, - _ModuleTable009_=PXt9LFsic3RhY2tEZXB0aCJdPTAsWyJzdGF0dXMiXT0iYWN0aXZlI - ixbInVzZXJOYW1lIl09InZlL2hhZnMvMi4xIix9LH0sbXBhdGhBPXsiL2FwcHMvb3BzL3By - b2QvbmNvL21vZHVsZWZpbGVzL2NvbXBpbGVyL2ludGVsLzE5LjEuMy4zMDQiLCIvYXBwcy9 - vcHMvcHJvZC9saWJzL21vZHVsZWZpbGVzL2NvbXBpbGVyL2ludGVsLzE5LjEuMy4zMDQiLC - IvYXBwcy9wcm9kL2xtb2R1bGVzL2ludGVsLzE5LjEuMy4zMDQiLCIvYXBwcy9vcHMvcHJvZ - C9uY28vbW9kZWxzL21vZHVsZWZpbGVzIiwiL2FwcHMvb3BzL3Byb2QvbGlicy9tb2R1bGVm - aWxlcy9tcGkvaW50ZWwvMTkuMS4zLjMwNC9jcmF5LW1waWNoLzguMS40IiwiL2FwcHMvcHJ - vZC9sbW9kdWxlcy9JTlRFTF9jcmF5X21w,TERM=xterm-256color,SHELL=/bin/bash, - ESMF_BIN=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9. - 2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6 - .0/bin,CRAY_MPICH_VER=8.1.19, - LMOD_ADMIN_FILE=/apps/prod/lmodules/admin.list, - LMOD_CUSTOM_COMPILER_GNU_8_0_UCX_1_0_PREFIX=/apps/prod/lmodules/gcc/11 - .2.0:/apps/prod/lmodules/gcc/10.2.0,PE_MPICH_FIXED_PRGENV=INTEL, - lmod_prefix_path=/usr/share, - LMOD_CUSTOM_COMPILER_CRAYCLANG_10_0_PREFIX=/apps/prod/lmodules/cce/13. - 0.0:/apps/prod/lmodules/cce/12.0.3:/apps/prod/lmodules/cce/11.0.4, - LMOD_FAMILY_PRGENV=PrgEnv-intel,_ModuleTable_Sz_=12, - __LMOD_REF_COUNT_CPATH=/pe/intel/compilers_and_libraries_2020.4.304/li - nux/ipp/include:1;/pe/intel/compilers_and_libraries_2020.4.304/linux/mk - l/include:1;/pe/intel/compilers_and_libraries_2020.4.304/linux/pstl/inc - lude:1;/pe/intel/compilers_and_libraries_2020.4.304/linux/pstl/stdlib:1 - ;/pe/intel/compilers_and_libraries_2020.4.304/linux/tbb/include:2;/apps - /prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e- - 8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6.0/include:1;/a - pps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10_ - _e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9.2/include - :1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2. - 5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf5/1.14.0/inc - lude:1,LS_OPTIONS=-N --color=tty -T 0, - NetCDF=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2_ - _p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9 - .2,LMOD_FAMILY_COMPILER=intel, - LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PR - EFIX=/apps/prod/lmodules/CCE_cray_mpich/11.0.4/cray-mpich/8.1.4, - TMOUT=1800,PYTHONSTARTUP=/etc/pythonstart, - NETCDF_INCLUDES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0_ - _n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/n - etcdf/4.9.2/include, - RWPSfix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPS,SHLVL=3, - LANGUAGE=en_US.UTF-8, - PYTHONPATH=/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/p - ython3.10/site-packages,G_FILENAME_ENCODING=@locale\,UTF-8\,ISO-8859-15\, - CP1252, - LMOD_CUSTOM_COMPILER_INTEL_19_0_UCX_1_0_PREFIX=/apps/prod/lmodules/int - el/19.1.3.304:/apps/ops/prod/libs/modulefiles/compiler/intel/19.1.3.304 - :/apps/ops/prod/nco/modulefiles/compiler/intel/19.1.3.304, - HPC_OPT=/apps/ops/prod/libs, - MANPATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfatslqmcr - zo5kb4raaq/share/man:/pe/intel/man/common:/pe/intel/compilers_and_libra - ries_2020.4.304/linux/mpi/man:/pe/intel/documentation_2020/en/debugger/ - gdb-ia/man:/opt/cray/pe/craype/2.7.17/man:/opt/cray/share/man:/apps/pro - d/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6. - 0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6.0/share/man:/apps/ - prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8 - .6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9.2/share/man:/ - apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10 - __e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf5/1.14.0/share/m - an:/opt/cray/pe/mpich/8.1.19/ofi/man:/opt/cray/pe/mpich/8.1.19/man/mpic - h:/usr/share/lmod/lmod/share/man:/usr/share/man:/opt/c3/man:/opt/pbs/sh - are/man, - __LMOD_REF_COUNT_CLASSPATH=/pe/intel/compilers_and_libraries_2020.4.30 - 4/linux/mpi/intel64/lib/mpi.jar:1, - INTEL_PATH=/pe/intel/compilers_and_libraries_2020.4.304, - MPICH_DIR=/opt/cray/pe/mpich/8.1.19/ofi/intel/19.0, - INTEL_VERSION=19.1.3.304,OSCAR_HOME=/opt/oscar, - fix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp - ute_interpolation_weights/sorc/../../..//fix, - MODULEPATH=/apps/ops/prod/nco/modulefiles/compiler/intel/19.1.3.304:/a - pps/ops/prod/libs/modulefiles/compiler/intel/19.1.3.304:/apps/prod/lmod - ules/intel/19.1.3.304:/apps/ops/prod/nco/models/modulefiles:/apps/ops/p - rod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4:/apps/prod/l - modules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/opt/cray/pe/lmod/ - modulefiles/comnet/intel/19.0/ofi/1.0:/apps/prod/lmodules/compiler/inte - l/19.0:/opt/cray/pe/lmod/modulefiles/net/ofi/1.0:/opt/cray/pe/lmod/modu - lefiles/cpu/x86-rome/1.0:/opt/cray/pe/lmod/modulefiles/mpi/intel/19.0/o - fi/1.0/cray-mpich/8.0:/usr/share/modules:/usr/share/Modules/$MODULE_VER - SION/modulefiles:/usr/share/modules/modulefiles:/usr/share/modulefiles/ - Linux:/usr/share/modulefiles/Core:/usr/share/lmod/lmod/modulefiles/Core - :/opt/cray/pe/lmod/modulefiles/core:/opt/cray/pe/lmod/modulefiles/crayp - e-targets/default:/apps/prod/lmodules/sys_core:/apps/ops/prod/nco/modul - efiles/core:/apps/prod/lmodules/core:/opt/cray/modulefiles, - CRAY_MPICH_DIR=/opt/cray/pe/mpich/8.1.19/ofi/intel/19.0, - LMOD_FAMILY_CRAYPE=craype,LOGNAME=keston.smith, - __LMOD_REF_COUNT_LMOD_CUSTOM_PATHS=COMPILER/apps/ops/prod/nco/modulefi - les/compiler/intel/19.1.3.304:1;COMPILER/apps/ops/prod/libs/modulefiles - /compiler/intel/19.1.3.304:1;COMPILER/apps/prod/lmodules/intel/19.1.3.3 - 04:1;COMPILER/apps/ops/prod/nco/models/modulefiles:1;CNCM/apps/ops/prod - /libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4:1;CNCM/apps/pro - d/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:1, - CRAY_MPICH_VERSION=8.1.19, - CPLUS_INCLUDE_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5 - qcfatslqmcrzo5kb4raaq/include:/apps/spack/geos/3.8.1/intel/19.1.3.304/5 - recktk5lndzgkkqq36y4a2h4yx3ahdy/include, - MKLROOT=/pe/intel/compilers_and_libraries_2020.4.304/linux/mkl, - MODULE_VERSION_STACK=3.2.10,MODULEPATH_ROOT=/usr/share/modulefiles, - LMOD_PACKAGE_PATH=/apps/prod/lmodules, - __LMOD_REF_COUNT_PE_INTEL_FIXED_PKGCONFIG_PATH=/opt/cray/pe/mpich/8.1. - 19/ofi/intel/19.0/lib/pkgconfig:1, - PE_MPICH_GTL_LIBS_amd_gfx906=-lmpi_gtl_hsa, - PSTLROOT=/pe/intel/compilers_and_libraries_2020.4.304/linux/pstl, - XDG_CONFIG_DIRS=/etc/xdg, - PATH=/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/bin:/apps/s - pack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfatslqmcrzo5kb4raaq/bin:/ - apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy - /bin:/pe/intel/compilers_and_libraries_2020.4.304/linux/bin/intel64:/pe - /intel/compilers_and_libraries_2020.4.304/linux/bin:/pe/intel/compilers - _and_libraries_2020.4.304/linux/mpi/intel64/bin:/pe/intel/debugger_2020 - /gdb/intel64/bin:/opt/cray/pe/craype/2.7.17/bin:/opt/cray/bin:/apps/pro - d/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6. - 0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6.0/bin:/apps/prod/h - pc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pn - etcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9.2/bin:/apps/prod/hp - c-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pne - tcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf5/1.14.0/bin:/opt/cray/pe/mp - ich/8.1.19/bin:/u/keston.smith/.local/bin:/usr/local/bin:/usr/bin:/bin: - /opt/c3/bin:/opt/pbs/bin:/sbin:/opt/cray/pe/bin, - PE_MPICH_GTL_LIBS_amd_gfx908=-lmpi_gtl_hsa, - TBBROOT=/pe/intel/compilers_and_libraries_2020.4.304/linux/tbb, - ESMF_LIBRARIES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__ - n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/es - mf/8.6.0/lib, - __LMOD_REF_COUNT_PE_PRODUCT_LIST=CRAYPE:1;CRAYPE_X86_ROME:1, - NetCDF_LIBRARIES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0 - __n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/ - netcdf/4.9.2/lib, - _LMFILES_=/opt/cray/pe/lmod/modulefiles/comnet/intel/19.0/ofi/1.0/cray - -mpich/8.1.19.lua:/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray- - mpich/8.1.4/hdf5-C/1.14.0.lua:/apps/prod/lmodules/INTEL_cray_mpich/19.1 - .3.304/cray-mpich/8.1.4/netcdf-C/4.9.2.lua:/apps/prod/lmodules/INTEL_cr - ay_mpich/19.1.3.304/cray-mpich/8.1.4/esmf-C/8.6.0.lua:/opt/cray/pe/lmod - /modulefiles/craype-targets/default/craype-x86-rome.lua:/opt/cray/modul - efiles/libfabric/1.20.1:/opt/cray/pe/lmod/modulefiles/craype-targets/de - fault/craype-network-ofi.lua:/apps/prod/lmodules/sys_core/envvar/1.0:/o - pt/cray/pe/lmod/modulefiles/core/craype/2.7.17.lua:/opt/cray/pe/lmod/mo - dulefiles/core/PrgEnv-intel/8.5.0.lua:/apps/prod/lmodules/core/intel/19 - .1.3.304.lua:/apps/prod/lmodules/intel/19.1.3.304/geos/3.8.1:/apps/prod - /lmodules/intel/19.1.3.304/proj/7.1.0:/apps/prod/lmodules/intel/19.1.3. - 304/ve/hafs/2.1,HDF5_VERSION=1.14.0,MODULESHOME=/usr/share/lmod/lmod, - PKG_CONFIG_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcf - atslqmcrzo5kb4raaq/lib/pkgconfig:/pe/intel/compilers_and_libraries_2020 - .4.304/linux/mkl/bin/pkgconfig:/opt/cray/pe/craype/2.7.17/pkg-config:/o - pt/cray/lib64/pkgconfig,LMOD_SETTARG_FULL_SUPPORT=no, - INFOPATH=/pe/intel/documentation_2020/en/debugger/gdb-ia/info::/apps/d - ocs/info,G_BROKEN_FILENAMES=1, - I_MPI_ROOT=/pe/intel/compilers_and_libraries_2020.4.304/linux/mpi, - _ModuleTable011_=cy9tb2R1bGVmaWxlcyIsIi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvT - GludXgiLCIvdXNyL3NoYXJlL21vZHVsZWZpbGVzL0NvcmUiLCIvdXNyL3NoYXJlL2xtb2Qv - bG1vZC9tb2R1bGVmaWxlcy9Db3JlIiwiL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXM - vY29yZSIsIi9vcHQvY3JheS9wZS9sbW9kL21vZHVsZWZpbGVzL2NyYXlwZS10YXJnZXRzL2 - RlZmF1bHQiLCIvYXBwcy9wcm9kL2xtb2R1bGVzL3N5c19jb3JlIiwiL2FwcHMvb3BzL3Byb - 2QvbmNvL21vZHVsZWZpbGVzL2NvcmUiLCIvYXBwcy9wcm9kL2xtb2R1bGVzL2NvcmUiLCIv - b3B0L2NyYXkvbW9kdWxlZmlsZXMiLH0sWyJzeXN0ZW1CYXNlTVBBVEgiXT0iL3Vzci9zaGF - yZS9tb2R1bGVzOi91c3Ivc2hhcmUvTW9k, - PE_MPICH_GTL_LIBS_amd_gfx90a=-lmpi_gtl_hsa,HISTSIZE=10000, - CRAYPE_DIR=/opt/cray/pe/craype/2.7.17,LMOD_PKG=/usr/share/lmod/lmod, - __LMOD_REF_COUNT_PE_MPICH_PKGCONFIG_LIBS=mpich:1, - __LMOD_REF_COUNT_PE_PKGCONFIG_LIBS=mpich:1,CPU=x86_64, - CRAYPE_VERSION=2.7.17, - NETCDF_LIBRARIES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0 - __n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/ - netcdf/4.9.2/lib, - _ModuleTable005_=MCIsfSxbImVzbWYtQyJdPXtbImZuIl09Ii9hcHBzL3Byb2QvbG1vZ - HVsZXMvSU5URUxfY3JheV9tcGljaC8xOS4xLjMuMzA0L2NyYXktbXBpY2gvOC4xLjQvZXNt - Zi1DLzguNi4wLmx1YSIsWyJmdWxsTmFtZSJdPSJlc21mLUMvOC42LjAiLFsibG9hZE9yZGV - yIl09NCxwcm9wVD17fSxbInN0YWNrRGVwdGgiXT0wLFsic3RhdHVzIl09ImFjdGl2ZSIsWy - J1c2VyTmFtZSJdPSJlc21mLUMvOC42LjAiLH0sZ2Vvcz17WyJmbiJdPSIvYXBwcy9wcm9kL - 2xtb2R1bGVzL2ludGVsLzE5LjEuMy4zMDQvZ2Vvcy8zLjguMSIsWyJmdWxsTmFtZSJdPSJn - ZW9zLzMuOC4xIixbImxvYWRPcmRlciJdPTEyLHByb3BUPXt9LFsic3RhY2tEZXB0aCJdPTE - sWyJzdGF0dXMiXT0iYWN0aXZlIixbInVz, - LMOD_CMD=/usr/share/lmod/lmod/libexec/lmod, - ESMF_ROOT=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9 - .2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8. - 6.0,CRAY_MPICH_PREFIX=/opt/cray/pe/mpich/8.1.19/ofi/intel/19.0, - CVS_RSH=ssh,LESSOPEN=lessopen.sh %s, - LMOD_DIR=/usr/share/lmod/lmod/libexec,LC_TIME=C.UTF-8, - LMOD_FAMILY_MPI=cray-mpich, - BASH_FUNC_module%%=() { eval $($LMOD_CMD bash \"$@\") && eval $(${LMO - D_SETTARG_CMD:-:} -s sh) - euser = keston.smith - egroup = emc - hashname = 136854537.dbqs01 - queue_rank = 1787597008259882 - queue_type = E - comment = Job run at Mon Aug 24 at 18:49 on (nid003409:ncpus=16:mem=2684354 - 56kb) and terminated by keston.smith@dlogin01.dogwood.wcoss2.ncep.noaa. - gov - etime = Mon Aug 24 18:43:28 2026 - umask = 22 - run_count = 6 - eligible_time = 00:05:58 - accrue_type = 3 - Submit_arguments = -V /lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/ - RWPS/dev/compute_interpolation_weights/sorc/../../..//dev/compute_inter - polation_weights/ecf/compute_interpolation_weights.ecf - project = NWPS-DEV - run_version = 1 - Submit_Host = dlogin01.dogwood.wcoss2.ncep.noaa.gov - server_instance_id = dbqs01.dogwood.wcoss2.ncep.noaa.gov:15001 - - ------------------------------------------------------------------- -Job 136854537.dbqs01 - PBS tracejob output (for parent mom node only): - -Job: 136854537.dbqs01 - -08/24/2026 18:49:19 M update_job_usage: CPU usage: 0.000 secs -08/24/2026 18:49:19 M update_job_usage: cpupercent initialized to zero -08/24/2026 18:49:19 M update_job_usage: Memory usage: mem=0b -08/24/2026 18:49:24 M Started, pid = 560784 -08/24/2026 18:49:50 M update_job_usage: CPU usage: 28.000 secs -08/24/2026 18:49:50 M update_job_usage: 136854537.dbqs01 measured interval cpupercent 93 increased job cpupercent to 93 -08/24/2026 18:49:50 M update_job_usage: Memory usage: mem=622752kb -08/24/2026 18:51:51 M update_job_usage: CPU usage: 158.000 secs -08/24/2026 18:51:51 M update_job_usage: 136854537.dbqs01 measured interval cpupercent 107 increased job cpupercent to 107 -08/24/2026 18:51:51 M update_job_usage: Memory usage: mem=4348868kb -08/24/2026 18:53:52 M update_job_usage: CPU usage: 287.000 secs -08/24/2026 18:53:52 M update_job_usage: Memory usage: mem=7615468kb -08/24/2026 18:54:06 M signal job request received -08/24/2026 18:54:06 M signal job with TermJob -08/24/2026 18:54:06 M kill_job -08/24/2026 18:54:06 M task 00000001 terminated -08/24/2026 18:54:09 M no active process for task 00000001 -08/24/2026 18:54:09 M Terminated -08/24/2026 18:54:09 M task 00000001 cput=00:04:50 -08/24/2026 18:54:09 M kill_job -08/24/2026 18:54:09 M nid003409 cput=00:04:47 mem=7615468kb -08/24/2026 18:54:09 M update_job_usage: CPU usage: 301.000 secs -08/24/2026 18:54:09 M update_job_usage: Memory usage: mem=9381228kb - ------------------------------------------------------------------- -To see full PBS log data, run: /sfs/admin/scripts/tracejob.sh 136854537.dbqs01 - -================================================================== -END - DEBUG INFO -================================================================== - -Job 136854537.dbqs01 - Epilogue DEBUG complete. DEBUG Execution time: 5 seconds -Job 136854537.dbqs01 - Epilogue complete. Execution time: 7 seconds -##### Job 136854537.dbqs01 - PBS Job Script: -(Note: Duplicate #PBS entries are a function how PBS interprets and caches the original job script.) - -#!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=04:00:00 -##PBS -l select=1:ncpus=8:mem=128GB -#PBS -l select=1:ncpus=16:mem=256GB -##PBS -l select=1:ncpus=32:mem=256GB -###PBS -l select=1:ncpus=1:mem=8G -#PBS -l place=excl -#PBS -l debug=true - -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - - -# Compute interpolation weights and distance to boundary for a RWPS mesh. -# Files are created in local RWPS/fix directory. - -pip list -v - -cd $RWPSroot/ush/preprocess - -SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" -date="20260730" -cycl="00" -Nprocs=16 - - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - -rrfs_hi=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.hi.nc -rrfs_pr=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.pr.nc -rrfs_ak=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.ak.nc -rrfs_na=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.na.nc -rrfs_conus=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.conus.nc - -out="../../fix" - -rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" -rrfsDst="$out/DistToBndy.$meshname.rrfs" - -#no extrapolation with rrfs forecasts -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_pr $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 > GenWhts.rrfs.pr.out -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_ak $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 > GenWhts.rrfs.ak.out -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_na $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 > GenWhts.rrfs.na.out -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_conus $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out - -nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc -nbmIntrp="$out/InterpolationWeights.$meshname.nbm" -nbmDst="$out/DistToBndy.$meshname.nbm" -#extrapolate nbm oc wind to all points -python ./compute_gridded_to_rwps_interp_weights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out - -nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc -#do not extrapolate for NBM .ak. domain -python ./compute_gridded_to_rwps_interp_weights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out - -rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc -rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" -rtofsDst="$out/DistToBndy.$meshname.rtofs" - -#extrapolate rtofs .glo. for full ice coverage - -python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out - - -rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc -#do not extrapolate rtofs .glo. currents -python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.current.nc $rtofsDst.current.nc -1 > GenWhts.rtofs.current.out - - - -#Old v2 of stofs -stofs_glo="$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" - -mkdir -p STOFSInterpWeights.$meshname -## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs - -## Now run parallel job script - -qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS - -wait - -#combine text file output of parallel jobs -cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt - -# convert output weights to netcdf file -python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 -cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.v2.nc -cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.v2.nc -mv DistToBndy.$meshname.stofs.nc DistToBndy.$meshname.stofs.v2.nc -mv InterpWeights.$meshname.stofs.nc InterpWeights.$meshname.stofs.v2.nc - -rm -rf STOFSInterpWeights.$meshname -rm InterpWeights.$meshname.stofs.txt -rm *.out -rm ESMPy* - - -mkdir -p STOFSInterpWeights.$meshname -#compute stofs weights for current(v3) stofs mesh -stofs_glo="$SID/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc" - -## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs - -## Now run parallel job script - -qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS - -wait - -#combine text file output of parallel jobs -cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt - -# convert output weights to netcdf file -python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 -cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc -cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc - - -rm -rf STOFSInterpWeights.$meshname -rm InterpWeights.$meshname.stofs.txt -rm *.out -rm ESMPy* - - - - -##### End of job script ------------------------------------------------------------------- - diff --git a/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136857549 b/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136857549 deleted file mode 100644 index 3848f01..0000000 --- a/dev/compute_interpolation_weights/sorc/logs/ESMPy.o136857549 +++ /dev/null @@ -1,1272 +0,0 @@ -PBS: Running prologue on parent mom node: nid002876... -Job 136857549.dbqs01 nodelist: nid002876 -Job 136857549.dbqs01 - Prologue complete. Execution time: 4 seconds -Agent pid 3053904 -Identity added: /u/keston.smith/.ssh/id_ed25519 (keston.smith@noaa.gov) -/u/keston.smith/.bashrc: line 46: alias: eval "$(ssh-agent -s)"; ssh-add ~/.ssh/id_ed25519: not found -Resetting modules to system default. Reseting $MODULEPATH back to system default. All extra directories will be removed from $MODULEPATH. -Package Version Location Installer -------------------------- ----------- ---------------------------------------------------------------------------------- --------- -Cartopy 0.24.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -certifi 2025.1.31 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -cftime 1.6.4.post1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -contourpy 1.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -cycler 0.12.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -esmpy 8.6.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -fonttools 4.55.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -geographiclib 2.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -geopy 2.4.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -Jinja2 3.1.5 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -kiwisolver 1.4.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -MarkupSafe 3.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -matplotlib 3.10.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -netCDF4 1.7.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -numpy 2.2.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -packaging 24.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pandas 2.2.3 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pillow 11.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pip 25.0.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pyparsing 3.2.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pyproj 3.7.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pyshp 2.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -python-dateutil 2.9.0.post0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pytz 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -PyYAML 6.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -scipy 1.15.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -setuptools 75.8.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -setuptools-git-versioning 2.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -shapely 2.0.7 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -six 1.17.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -tzdata 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -xarray 2025.1.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in - iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights - regrid = esmpy.Regrid( - ^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: Regrid.__init__() got an unexpected keyword argument 'overwrite' -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in - iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights - regrid = esmpy.Regrid( - ^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: Regrid.__init__() got an unexpected keyword argument 'overwrite' -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in - iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights - regrid = esmpy.Regrid( - ^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: Regrid.__init__() got an unexpected keyword argument 'overwrite' -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in - iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights - regrid = esmpy.Regrid( - ^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: Regrid.__init__() got an unexpected keyword argument 'overwrite' -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in - iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights - regrid = esmpy.Regrid( - ^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: Regrid.__init__() got an unexpected keyword argument 'overwrite' -rm: cannot remove '../../fix/InterpolationWeights.rwps.oc_5km_100km.nbm.oc.nc': No such file or directory -rm: cannot remove '../../fix/DistToBndy.rwps.oc_5km_100km.nbm.oc.nc': No such file or directory -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in - iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights - regrid = esmpy.Regrid( - ^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: Regrid.__init__() got an unexpected keyword argument 'overwrite' -rm: cannot remove '../../fix/InterpolationWeights.rwps.oc_5km_100km.nbm.ak.nc': No such file or directory -rm: cannot remove '../../fix/DistToBndy.rwps.oc_5km_100km.nbm.ak.nc': No such file or directory -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in - iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights - regrid = esmpy.Regrid( - ^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: Regrid.__init__() got an unexpected keyword argument 'overwrite' -rm: cannot remove '../../fix/InterpolationWeights.rwps.oc_5km_100km.rtofs.ice.nc': No such file or directory -rm: cannot remove '../../fix/DistToBndy.rwps.oc_5km_100km.rtofs.ice.nc': No such file or directory -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in - iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights - regrid = esmpy.Regrid( - ^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: Regrid.__init__() got an unexpected keyword argument 'overwrite' -rm: cannot remove '../../fix/InterpolationWeights.rwps.oc_5km_100km.rtofs.ice.nc': No such file or directory -rm: cannot remove '../../fix/DistToBndy.rwps.oc_5km_100km.rtofs.ice.nc': No such file or directory -Traceback (most recent call last): - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/./compute_gridded_to_rwps_interp_weights.py", line 101, in - iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - File "/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/preprocess/interp_utilities.py", line 337, in CurvilinearGridCreateInterpWeights - regrid = esmpy.Regrid( - ^^^^^^^^^^^^^ - File "/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages/esmpy/util/decorators.py", line 59, in new_func - return func(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^ -TypeError: Regrid.__init__() got an unexpected keyword argument 'overwrite' -directory STOFSInterpWeights.rwps.oc_5km_100km is alread empty -Made parallel jobcards to create interpolation weights with 16 processes. Next step: -sbatch jobcardcompute_unstr_to_rwps_interp_weightsSLURM -136858948[].dbqs01 -mesh file=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/sorc/../../..//fix/rwps.oc_5km_100km.msh -nn = 103333 -number of nodes read: 103333 -ne=195951 -includes boundary nodes -number of open boundary nodes read: 350 -number of elements read: 195601 -n=300402 -n_s=300402 -directory STOFSInterpWeights.rwps.oc_5km_100km is alread empty -Made parallel jobcards to create interpolation weights with 16 processes. Next step: -sbatch jobcardcompute_unstr_to_rwps_interp_weightsSLURM -136859518[].dbqs01 -qsub: wait for job 136859518[].dbqs01 interrupted by signal 15 -Job 136859518[].dbqs01 is being deleted -PBS: Running epilogue on parent mom node: nid002876... -================================================================== -BEGIN - DEBUG INFO -================================================================== -Job 136857549.dbqs01 - Post Job Mem Usage: -nid002876: 2026-08-24.24 1 =========================================== -nid002876: 2026-08-24.24 2 #### Node Memory Usage for nid002876 #### -nid002876: 2026-08-24.24 3 ------------------ -nid002876: 2026-08-24.24 4 Mem: total:526983488 used:14977484 free:513071112 shared:534156 cache:1166980 avail:512006004 -nid002876: 2026-08-24.24 5 4.0K /dev/shm -nid002876: 2026-08-24.24 6 40K /tmp -nid002876: 2026-08-24.24 7 =========================================== -nid002876: 2026-08-24.05 1 =========================================== -nid002876: 2026-08-24.05 2 #### Node Memory Usage for nid002876 #### -nid002876: 2026-08-24.05 3 ------------------ -nid002876: 2026-08-24.05 4 Mem: total:526983488 used:15711556 free:509902084 shared:534420 cache:4147872 avail:511271932 -nid002876: 2026-08-24.05 5 4.0K /dev/shm -nid002876: 2026-08-24.05 6 40K /tmp -nid002876: 2026-08-24.05 7 =========================================== - ------------------------------------------------------------------- ------------------------------------------------------------------- -Job 136857549.dbqs01 - Post Job Mem Usage Profile: -2026-08-24A--:--:--.------+--:-- nid002876 #### nid002876 - Job 136857549.dbqs01 NUMA Node Memory Allocation and Fragmentation Reports -Starting Fragmentation Report for nid002876 -Node Order9 Order10 Score MB_Free %Free State -0 4802 8374 21550 43100 68 OK -1 3062 11098 25258 50516 78 OK -2 2743 11603 25949 51898 80 OK -3 2552 12490 27532 55064 85 OK -4 2436 12825 28086 56172 87 OK -5 1275 14004 29283 58566 90 OK -6 1284 13992 29268 58536 90 OK -7 1766 13502 28770 57540 89 OK - -** nid002876 : node0_score=21550 node0_state=OK uptime=4680314s Overall=OK ** -Ending Fragmentation Report for nid002876 -Node Order9 Order10 Score MB_Free %Free State -0 4793 8382 21557 43114 68 OK -1 3054 11098 25250 50500 78 OK -2 2738 11605 25948 51896 80 OK -3 2551 12490 27531 55062 85 OK -4 2431 12827 28085 56170 87 OK -5 1274 14004 29282 58564 90 OK -6 1284 13992 29268 58536 90 OK -7 1764 13504 28772 57544 89 OK - -** nid002876 : node0_score=21557 node0_state=OK uptime=4680955s Overall=OK ** -2026-08-24A--:--:--.------+--:-- nid002876 #### nid002876 - Job 136857549.dbqs01 VMSTATS Memory Report -**Only Printing Significant Findings - TEST CODE - Results are NOT positive indication of a problem. ** -nid002876 [!] Inactive file cache ballooned: 719336 (threshold: 100000) - ------------------------------------------------------------------- -Job 136857549.dbqs01 - /var/log/messages for job duration: -2026-08-24A--:--:--.------+--:-- nid002876 #### nid002876 - Job 136857549.dbqs01 Runtime Data from /var/log/messages -nid002876: nid002876 #### nid002876 - Job 136857549.dbqs01 Runtime Data from /var/log/messages -nid002876: 2026-08-24T19:14:24.568224+00:00 nid002876 prologue: MARK: Job 136857549.dbqs01 Start -nid002876: 2026-08-24T19:14:24.574814+00:00 nid002876 prologue: Job 136857549.dbqs01 nodelist: nid002876 -nid002876: 2026-08-24T19:14:24.576538+00:00 nid002876 prologue: Job 136857549.dbqs01 - Recording pre-execution stats and counters... -nid002876: 2026-08-24T19:14:24.611232+00:00 nid002876 prologue: Job 136857549.dbqs01 - Killing any stray user processes... -nid002876: 2026-08-24T19:14:24.695594+00:00 nid002876 prologue: Job 136857549.dbqs01 - Clearing /tmp... -nid002876: 2026-08-24T19:14:24.711690+00:00 nid002876 prologue: Job 136857549.dbqs01 - Verifying key post-boot workarounds with warchk... -nid002876: 2026-08-24T19:14:24.742061+00:00 nid002876 WARCHK: root : /sfs/admin/scripts/warchk --batch -nid002876: 2026-08-24T19:14:24.950074+00:00 nid002876 prologue: Job 136857549.dbqs01 - Recording pre-job memory usage... -nid002876: 2026-08-24T19:14:25.029973+00:00 nid002876 prologue: Job 136857549.dbqs01 - FRAG_STATE: ** nid002876 : node0_score=21550 node0_state=OK uptime=4680314s Overall=OK ** -nid002876: 2026-08-24T19:14:25.031210+00:00 nid002876 prologue: Job 136857549.dbqs01 - Recording pre-job HSN counters... -nid002876: 2026-08-24T19:14:25.158228+00:00 nid002876 prologue: Job 136857549.dbqs01 - Recording pre-job Lustre counters... -nid002876: 2026-08-24T19:14:26.235490+00:00 nid002876 prologue: Job 136857549.dbqs01 - Recording initial NFS client statistics... -nid002876: 2026-08-24T19:14:26.247233+00:00 nid002876 prologue: Job 136857549.dbqs01 - Saving a copy of the job script... -nid002876: 2026-08-24T19:14:26.256349+00:00 nid002876 prologue: Job 136857549.dbqs01 - Checking existing ASLR settings... -nid002876: 2026-08-24T19:14:26.261868+00:00 nid002876 prologue: Job 136857549.dbqs01 - Checking palsd open file count... -nid002876: 2026-08-24T19:14:26.350307+00:00 nid002876 PBS_CMD: root : /opt/pbs/bin/qstat -Bf -nid002876: 2026-08-24T19:14:27.365852+00:00 nid002876 prologue: Job 136857549.dbqs01 - Checking one-shot enabled: False -nid002876: 2026-08-24T19:14:27.366963+00:00 nid002876 prologue: Job 136857549.dbqs01 - Enabling turboboost... -nid002876: 2026-08-24T19:14:27.369949+00:00 nid002876 prologue: Job 136857549.dbqs01 - Checking warchk results... -nid002876: 2026-08-24T19:14:27.373110+00:00 nid002876 prologue: Job 136857549.dbqs01 - Warchk Complete -nid002876: 2026-08-24T19:14:27.375936+00:00 nid002876 prologue: Job 136857549.dbqs01 - Prologue complete. Execution time: 4 seconds -nid002876: 2026-08-24T19:14:51.032982+00:00 nid002876 systemd[1]: etc_update.service: Deactivated successfully. -nid002876: 2026-08-24T19:15:14.071090+00:00 nid002876 systemd[1]: session-13761.scope: Deactivated successfully. -nid002876: 2026-08-24T19:17:12.681822+00:00 nid002876 PBS_CMD: keston.smith : /opt/pbs/bin/qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS -nid002876: 2026-08-24T19:18:37.003443+00:00 nid002876 kernel: [4680428.109660][T14054] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid002876: 2026-08-24T19:21:29.624548+00:00 nid002876 PBS_CMD: keston.smith : /opt/pbs/bin/qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS -nid002876: 2026-08-24T19:23:06.024592+00:00 nid002876 systemd[1]: etc_update.service: Deactivated successfully. -nid002876: 2026-08-24T19:23:36.011443+00:00 nid002876 kernel: [4680727.108831][T14054] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid002876: 2026-08-24T19:25:05.414129+00:00 nid002876 epilogue: Job 136857549.dbqs01 complete, running post-job actions. -nid002876: 2026-08-24T19:25:05.434015+00:00 nid002876 epilogue: MARK: Job 136857549.dbqs01 Complete. - ------------------------------------------------------------------- -Job 136857549.dbqs01 - dmesg output for job duration: -2026-08-24A--:--:--.------+--:-- nid002876 #### nid002876 - Job 136857549.dbqs01 Runtime Data from dmesg -nid002876: nid002876 #### nid002876 - Job 136857549.dbqs01 Runtime Data from dmesg -nid002876: [Mon Aug 24 19:12:05 2026] MARK: Job 136857549.dbqs01 Start -nid002876: [Mon Aug 24 19:16:18 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid002876: [Mon Aug 24 19:21:17 2026] LNet: 3 peer NIs in recovery (showing 3): 10.253.126.115@o2ib, 10.253.126.122@o2ib, 10.253.127.25@o2ib -nid002876: [Mon Aug 24 19:22:46 2026] MARK: Job 136857549.dbqs01 Complete. - ------------------------------------------------------------------- -Job 136857549.dbqs01 - Pre/Post job diff on HSN (MLX) Counters: -2026-08-24A--:--:--.------+--:-- nid002876 #### nid002876 - Job 136857549.dbqs01 HSN0 MLX Counter Post-Job Difference -nid002876: multicast:: 7094584 | multicast:: 7094782 | Diff: 198 -nid002876: rx_bytes:: 241632486674 | rx_bytes:: 241633346570 | Diff: 859896 -nid002876: rx_packets:: 46513587 | rx_packets:: 46514368 | Diff: 781 -nid002876: tx_bytes:: 201843908216 | tx_bytes:: 201844112707 | Diff: 204491 -nid002876: tx_packets:: 36400276 | tx_packets:: 36401008 | Diff: 732 -nid002876: port_rcv_data:: 370464178373853 | port_rcv_data:: 370464554478312 | Diff: 376104459 -nid002876: port_rcv_packets:: 645811616901 | port_rcv_packets:: 645812124065 | Diff: 507164 -nid002876: port_xmit_data:: 372155359532312 | port_xmit_data:: 372156227585855 | Diff: 868053543 -nid002876: port_xmit_packets:: 647281723478 | port_xmit_packets:: 647282678683 | Diff: 955205 -nid002876: unicast_rcv_packets:: 645811616901 | unicast_rcv_packets:: 645812124065 | Diff: 507164 -nid002876: unicast_xmit_packets:: 647281723478 | unicast_xmit_packets:: 647282678683 | Diff: 955205 -nid002876: resp_cqe_error:: 56918 | resp_cqe_error:: 56972 | Diff: 54 -nid002876: resp_cqe_flush_error:: 53845 | resp_cqe_flush_error:: 53896 | Diff: 51 -nid002876: rx_write_requests:: 59502696 | rx_write_requests:: 59512855 | Diff: 10159 - ------------------------------------------------------------------- -Job 136857549.dbqs01 - Pre/Post job diff for Lustre Stats: -2026-08-24A--:--:--.------+--:-- nid002876 #### nid002876 - Job 136857549.dbqs01 Lustre Counters Post-Job Difference -nid002876: ### LustreStats: Multi-value diffs correspond to [samples min max total sum_of_squares] ### -nid002876: /lfs/h1 vah1-ffff8f1f9df24800 : -nid002876: h1: snapshot_time: Diffs: [ 640] secs -nid002876: h1: elapsed_time: Diffs: [ 640] secs -nid002876: h1: ioctl: Diffs: [ 2] reqs -nid002876: h1: getattr: Diffs: [ 15 0 0 56 608] Avg_usec : 3.73 -nid002876: h1: inode_permission: Diffs: [ 2 0 0 3 5] Avg_usec : 1.50 -nid002876: h1: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 -nid002876: ---------------- -nid002876: /lfs/h2 vah2-ffff8f1f94b6f800 : -nid002876: h2: snapshot_time: Diffs: [ 640] secs -nid002876: h2: elapsed_time: Diffs: [ 641] secs -nid002876: h2: read_bytes: Diffs: [ 18874 0 0 940406996 15628740124068002] Avg_bytes: 49825.52 -nid002876: h2: write_bytes: Diffs: [ 1056 0 0 3529717378 34619386792483226] Avg_bytes: 3342535.39 -nid002876: h2: read: Diffs: [ 18829 0 0 5012818 471155360550] Avg_usec : 266.22 -nid002876: h2: write: Diffs: [ 1116 0 0 2443271 52936160595] Avg_usec : 2189.31 -nid002876: h2: ioctl: Diffs: [ 713] reqs -nid002876: h2: open: Diffs: [ 249 0 0 30467 13491729] Avg_usec : 122.35 -nid002876: h2: close: Diffs: [ 250 0 0 24597 4954647] Avg_usec : 98.38 -nid002876: h2: seek: Diffs: [ 3991 0 0 554 28328] Avg_usec : .13 -nid002876: h2: readdir: Diffs: [ 73 0 0 10785 4817955] Avg_usec : 147.73 -nid002876: h2: truncate: Diffs: [ 65 0 0 6942233 4648419164967] Avg_usec : 106803.58 -nid002876: h2: flock: Diffs: [ 40 0 0 3370 660684] Avg_usec : 84.25 -nid002876: h2: getattr: Diffs: [ 2613 0 0 120383 1821888757] Avg_usec : 46.07 -nid002876: h2: unlink: Diffs: [ 109 0 0 35061 18585175] Avg_usec : 321.66 -nid002876: h2: mkdir: Diffs: [ 7 0 0 10554 77064914] Avg_usec : 1507.71 -nid002876: h2: rmdir: Diffs: [ 5 0 0 1147 264587] Avg_usec : 229.40 -nid002876: h2: mknod: Diffs: [ 15 0 0 5471 3019099] Avg_usec : 364.73 -nid002876: h2: rename: Diffs: [ 7 0 0 2629 1009901] Avg_usec : 375.57 -nid002876: h2: getxattr: Diffs: [ 107 0 0 3750 520700] Avg_usec : 35.04 -nid002876: h2: getxattr_hits: Diffs: [ 81] reqs -nid002876: h2: inode_permission: Diffs: [ 19339 0 0 8651 46089] Avg_usec : .44 -nid002876: h2: opencount: Diffs: [ 251 0 0 1495 18807] Avg_reqs : 5.95 -nid002876: ---------------- -nid002876: /lfs/f1 vaf1-ffff8f1f9e842800 : -nid002876: f1: snapshot_time: Diffs: [ 640] secs -nid002876: f1: elapsed_time: Diffs: [ 641] secs -nid002876: f1: ioctl: Diffs: [ 2] reqs -nid002876: f1: getattr: Diffs: [ 11 0 0 33 221] Avg_usec : 3.00 -nid002876: f1: inode_permission: Diffs: [ 2 0 0 2 2] Avg_usec : 1.00 -nid002876: f1: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 -nid002876: ---------------- -nid002876: /lfs/f2 vaf2-ffff8f1f94cc7000 : -nid002876: f2: snapshot_time: Diffs: [ 640] secs -nid002876: f2: elapsed_time: Diffs: [ 641] secs -nid002876: f2: read_bytes: Diffs: [ 28 0 0 343662 9367820514] Avg_bytes: 12273.64 -nid002876: f2: write_bytes: Diffs: [ 18 0 0 29778 104071518] Avg_bytes: 1654.33 -nid002876: f2: read: Diffs: [ 28 0 0 379 7887] Avg_usec : 13.53 -nid002876: f2: write: Diffs: [ 478 0 0 8736 4547764] Avg_usec : 18.27 -nid002876: f2: ioctl: Diffs: [ 14] reqs -nid002876: f2: open: Diffs: [ 23 0 0 823 163867] Avg_usec : 35.78 -nid002876: f2: close: Diffs: [ 23 0 0 1557 212089] Avg_usec : 67.69 -nid002876: f2: seek: Diffs: [ 37 0 0 1806 463696] Avg_usec : 48.81 -nid002876: f2: readdir: Diffs: [ 2 0 0 405 164025] Avg_usec : 202.50 -nid002876: f2: getattr: Diffs: [ 38 0 0 4803 1681891] Avg_usec : 126.39 -nid002876: f2: mknod: Diffs: [ 11 0 0 2707 727251] Avg_usec : 246.09 -nid002876: f2: getxattr: Diffs: [ 11 0 0 1298 162422] Avg_usec : 118.00 -nid002876: f2: inode_permission: Diffs: [ 138 0 0 323 6125] Avg_usec : 2.34 -nid002876: f2: opencount: Diffs: [ 25 0 0 56 230] Avg_reqs : 2.24 -nid002876: ---------------- -nid002876: /lfs/h3 vah3-ffff8f1f9e844800 : -nid002876: h3: snapshot_time: Diffs: [ 640] secs -nid002876: h3: elapsed_time: Diffs: [ 641] secs -nid002876: h3: ioctl: Diffs: [ 2] reqs -nid002876: h3: getattr: Diffs: [ 7 0 0 27 185] Avg_usec : 3.85 -nid002876: h3: inode_permission: Diffs: [ 2 0 0 2 2] Avg_usec : 1.00 -nid002876: h3: opencount: Diffs: [ 2 0 0 2 2] Avg_reqs : 1.00 -nid002876: ---------------- -nid002876: /apps vaf2-ffff8f1f94123000 : -nid002876: apps: snapshot_time: Diffs: [ 640] secs -nid002876: apps: elapsed_time: Diffs: [ 641] secs -nid002876: apps: read_bytes: Diffs: [ 14849 0 0 268789368 25164041953450] Avg_bytes: 18101.51 -nid002876: apps: read: Diffs: [ 14849 0 0 710583 223337109] Avg_usec : 47.85 -nid002876: apps: ioctl: Diffs: [ 10836] reqs -nid002876: apps: open: Diffs: [ 17782 0 0 882240 184925836] Avg_usec : 49.61 -nid002876: apps: close: Diffs: [ 17782 0 0 662105 115241959] Avg_usec : 37.23 -nid002876: apps: mmap: Diffs: [ 8104 0 0 47447 711573] Avg_usec : 5.85 -nid002876: apps: page_fault: Diffs: [ 163823 0 0 9240 21376] Avg_usec : .05 -nid002876: apps: seek: Diffs: [ 21508 0 0 26 58] Avg_usec : 0 -nid002876: apps: readdir: Diffs: [ 6944 0 0 421257 362839137] Avg_usec : 60.66 -nid002876: apps: getattr: Diffs: [ 79508 0 0 1354917 201129543] Avg_usec : 17.04 -nid002876: apps: getxattr: Diffs: [ 13 0 0 147 8551] Avg_usec : 11.30 -nid002876: apps: getxattr_hits: Diffs: [ 12] reqs -nid002876: apps: inode_permission: Diffs: [ 1091932 0 0 148769 373879] Avg_usec : .13 -nid002876: apps: opencount: Diffs: [ 17784 0 0 91801 681741] Avg_reqs : 5.16 -nid002876: ---------------- - ------------------------------------------------------------------- -### Job 136857549.dbqs01 - NFS Statistics for job duration: -#### 2026-08-24A--:--:--.------+--:-- nid002876 Job 136857549.dbqs01 - DEBUG-NFS: Unable to find NFS stats file: /lfs/f2/hpc/jobdata/136857549/nfsstats.136857549.nid002876 - ------------------------------------------------------------------- -### Job 136857549.dbqs01 - Lustre evictions (if present): - ------------------------------------------------------------------- -### Job 136857549.dbqs01 - Exit status is 271 - ------------------------------------------------------------------- -Job 136857549.dbqs01 - Job summary: -Job Id: 136857549.dbqs01 - Job_Name = ESMPy - Job_Owner = keston.smith@dlogin01.dogwood.wcoss2.ncep.noaa.gov - resources_used.cpupercent = 108 - resources_used.cput = 00:03:15 - resources_used.mem = 3121144kb - resources_used.ncpus = 16 - resources_used.vmem = 2063040kb - resources_used.walltime = 00:10:37 - job_state = R - queue = dev - server = dbqs01 - Account_Name = NWPS-DEV - Checkpoint = u - ctime = Mon Aug 24 19:08:06 2026 - Error_Path = dlogin01.dogwood.wcoss2.ncep.noaa.gov:/lfs/h2/emc/couple/noscr - ub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/sor - c/ESMPy.e136857549 - exec_host = nid002876/0*16 - exec_vnode = (nid002876:ncpus=16:mem=268435456kb) - Hold_Types = n - Join_Path = oe - Keep_Files = oed - Mail_Points = a - mtime = Mon Aug 24 19:25:08 2026 - Output_Path = dlogin01.dogwood.wcoss2.ncep.noaa.gov:/lfs/h2/emc/couple/nosc - rub/keston.smith/RWPSworkflow/RWPS/dev/compute_interpolation_weights/so - rc/ESMPy.o136857549 - Priority = 0 - qtime = Mon Aug 24 19:08:06 2026 - Rerunable = False - Resource_List.alvl = 2 - Resource_List.aslr = True - Resource_List.debug = True - Resource_List.dfs = False - Resource_List.hyper = True - Resource_List.ldebug = False - Resource_List.mem = 256gb - Resource_List.ncpus = 16 - Resource_List.nodect = 1 - Resource_List.one-shot = False - Resource_List.place = exclhost - Resource_List.select = 1:ncpus=16:mem=256GB - Resource_List.turbo = True - Resource_List.walltime = 04:00:00 - schedselect = 1:ncpus=16:mem=256GB:prepost=False - stime = Mon Aug 24 19:14:23 2026 - session_id = 3051933 - Shell_Path_List = /bin/bash - jobdir = /u/keston.smith - substate = 42 - Variable_List = PBS_O_HOME=/u/keston.smith,PBS_O_LANG=en_US.UTF-8, - PBS_O_LOGNAME=keston.smith, - PBS_O_PATH=/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/bin:/ - apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfatslqmcrzo5kb4raaq - /bin:/apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5lndzgkkqq36y4a2h4y - x3ahdy/bin:/pe/intel/compilers_and_libraries_2020.4.304/linux/bin/intel - 64:/pe/intel/compilers_and_libraries_2020.4.304/linux/bin:/pe/intel/com - pilers_and_libraries_2020.4.304/linux/mpi/intel64/bin:/pe/intel/debugge - r_2020/gdb/intel64/bin:/opt/cray/pe/craype/2.7.17/bin:/opt/cray/bin:/ap - ps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__ - e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6.0/bin:/apps/ - prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8 - .6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9.2/bin:/apps/p - rod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8. - 6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf5/1.14.0/bin:/opt/cray - /pe/mpich/8.1.19/bin:/u/keston.smith/.local/bin:/usr/local/bin:/usr/bin - :/bin:/opt/c3/bin:/opt/pbs/bin:/sbin:/opt/cray/pe/bin, - PBS_O_MAIL=/var/spool/mail/keston.smith,PBS_O_SHELL=/bin/bash, - PBS_O_WORKDIR=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWP - S/dev/compute_interpolation_weights/sorc,PBS_O_SYSTEM=Linux, - CRAY_LMOD_MPI=cray-mpich/8.0,LMOD_FAMILY_CRAYPE_NETWORK_VERSION=false, - meshID=oc_5km_100km, - LD_LIBRARY_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcf - atslqmcrzo5kb4raaq/lib:/apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5 - lndzgkkqq36y4a2h4yx3ahdy/lib:/pe/intel/compilers_and_libraries_2020.4.3 - 04/linux/compiler/lib/intel64_lin:/pe/intel/compilers_and_libraries_202 - 0.4.304/linux/mpi/intel64/lib/release:/pe/intel/compilers_and_libraries - _2020.4.304/linux/mpi/intel64/lib:/pe/intel/compilers_and_libraries_202 - 0.4.304/linux/ipp/lib/intel64:/pe/intel/compilers_and_libraries_2020.4. - 304/linux/mkl/lib/intel64_lin:/pe/intel/compilers_and_libraries_2020.4. - 304/linux/tbb/lib/intel64/gcc4.8:/pe/intel/debugger_2020/python/intel64 - /lib:/pe/intel/debugger_2020/libipt/intel64/lib:/opt/cray/lib64:/apps/p - rod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8. - 6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6.0/lib:/apps/prod - /hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0 - pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9.2/lib:/apps/prod/ - hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0p - netcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf5/1.14.0/lib, - LS_COLORS=no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd= - 40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com - =01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tg - z=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.l - zma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2= - 00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.xz=00;31:*.avi=01;35:*.bmp - =01;35:*.dl=01;35:*.fli=01;35:*.gif=01;35:*.gl=01;35:*.jpg=01;35:*.jpeg - =01;35:*.mkv=01;35:*.mng=01;35:*.mov=01;35:*.mp4=01;35:*.mpg=01;35:*.pc - x=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.svg=01;35:*.t - ga=01;35:*.tif=01;35:*.webm=01;35:*.webp=01;35:*.wmv=01;35:*.xbm=01;35: - *.xcf=01;35:*.xpm=01;35:*.aiff=00;32:*.ape=00;32:*.au=00;32:*.flac=00;3 - 2:*.m4a=00;32:*.mid=00;32:*.mp3=00;32:*.mpc=00;32:*.ogg=00;32:*.voc=00; - 32:*.wav=00;32:*.wma=00;32:*.wv=00;32:,HOSTTYPE=x86_64, - LMOD_CUSTOM_PATHS=COMPILER/apps/ops/prod/nco/modulefiles/compiler/inte - l/19.1.3.304:COMPILER/apps/ops/prod/libs/modulefiles/compiler/intel/19. - 1.3.304:COMPILER/apps/prod/lmodules/intel/19.1.3.304:COMPILER/apps/ops/ - prod/nco/models/modulefiles:CNCM/apps/ops/prod/libs/modulefiles/mpi/int - el/19.1.3.304/cray-mpich/8.1.4:CNCM/apps/prod/lmodules/INTEL_cray_mpich - /19.1.3.304/cray-mpich/8.1.4, - prep=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/com - pute_interpolation_weights/sorc/../../..//PrepInputs, - __LMOD_REF_COUNT_PATH=/apps/prod/ve/intel/19.1.3.304/python/3.12.0/haf - s/2.1/bin:1;/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfatslq - mcrzo5kb4raaq/bin:1;/apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5lnd - zgkkqq36y4a2h4yx3ahdy/bin:1;/pe/intel/compilers_and_libraries_2020.4.30 - 4/linux/bin/intel64:1;/pe/intel/compilers_and_libraries_2020.4.304/linu - x/bin:1;/pe/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/ - bin:1;/pe/intel/debugger_2020/gdb/intel64/bin:1;/opt/cray/pe/craype/2.7 - .17/bin:1;/opt/cray/bin:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__ - h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich - -8.1.12/esmf/8.6.0/bin:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h - -1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich- - 8.1.12/netcdf/4.9.2/bin:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__ - h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich - -8.1.12/hdf5/1.14.0/bin:1;/opt/cray/pe/mpich/8.1.19/bin:1;/u/keston.smi - th/.local/bin:1;/usr/local/bin:1;/usr/bin:1;/bin:2;/opt/c3/bin:1;/opt/p - bs/bin:1;/sbin:1;/opt/cray/pe/bin:1, - _ModuleTable002_=b2FkT3JkZXIiXT0xMCxwcm9wVD17fSxbInN0YWNrRGVwdGgiXT0xL - Fsic3RhdHVzIl09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJdPSJQcmdFbnYtaW50ZWwvOC41LjAi - LH0sWyJjcmF5LW1waWNoIl09e1siZm4iXT0iL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZml - sZXMvY29tbmV0L2ludGVsLzE5LjAvb2ZpLzEuMC9jcmF5LW1waWNoLzguMS4xOS5sdWEiLF - siZnVsbE5hbWUiXT0iY3JheS1tcGljaC84LjEuMTkiLFsibG9hZE9yZGVyIl09MSxwcm9wV - D17fSxbInN0YWNrRGVwdGgiXT0wLFsic3RhdHVzIl09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJd - PSJjcmF5LW1waWNoLzguMS4xOSIsfSxjcmF5cGU9e1siZm4iXT0iL29wdC9jcmF5L3BlL2x - tb2QvbW9kdWxlZmlsZXMvY29yZS9jcmF5, - PE_MPICH_GTL_DIR_amd_gfx90a=-L/opt/cray/pe/mpich/8.1.19/gtl/lib, - SSH_CONNECTION=192.58.153.8 43034 192.58.153.11 22, - mesh=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/com - pute_interpolation_weights/sorc/../../..//fix/rwps.oc_5km_100km.msh, - INCLUDE=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfatslqmcr - zo5kb4raaq/include:/apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5lndz - gkkqq36y4a2h4yx3ahdy/include,XAUTHLOCALHOSTNAME=dlogin01, - LESSCLOSE=lessclose.sh %s %s, - CRAY_LD_LIBRARY_PATH=/opt/cray/pe/mpich/8.1.19/ofi/intel/19.0/lib:/opt - /cray/pe/mpich/8.1.19/gtl/lib, - __LMOD_REF_COUNT_DYLD_LIBRARY_PATH=/apps/prod/hpc-stack/i-19.1.3.304__ - m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/ - cray-mpich-8.1.12/esmf/8.6.0/lib:1;/apps/prod/hpc-stack/i-19.1.3.304__m - -8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/c - ray-mpich-8.1.12/netcdf/4.9.2/lib:1;/apps/prod/hpc-stack/i-19.1.3.304__ - m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/ - cray-mpich-8.1.12/hdf5/1.14.0/lib:1, - XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB,PE_ENV=INTEL, - __LMOD_REF_COUNT_C_INCLUDE_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.30 - 4/cjbmc7tacv5qcfatslqmcrzo5kb4raaq/include:1;/apps/spack/geos/3.8.1/int - el/19.1.3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy/include:1, - __LMOD_REF_COUNT_PE_FORTRAN_PKGCONFIG_LIBS=mpichf90:1, - ESMF_LIB=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9. - 2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6 - .0/lib,LMOD_FAMILY_CRAYPE_CPU=craype-x86-rome, - CRAY_LMOD_COMPILER=intel/19.0, - LMOD_MODULERCFILE=/apps/prod/lmodules/.modulerc.lua, - PE_PRODUCT_LIST=CRAYPE:CRAYPE_X86_ROME,LMOD_IGNORE_CACHE=yes, - LMOD_FAMILY_MPI_VERSION=8.1.19, - PE_PERFTOOLS_MPICH_LIBDIR=/opt/cray/pe/mpich/8.1.19/ofi/intel/19.0/lib - ,PE_MPICH_GTL_DIR_amd_gfx906=-L/opt/cray/pe/mpich/8.1.19/gtl/lib, - LANG=en_US.UTF-8,NetCDF_VERSION=4.9.2, - PE_MPICH_GTL_DIR_amd_gfx908=-L/opt/cray/pe/mpich/8.1.19/gtl/lib, - WINDOWMANAGER=xterm, - _ModuleTable008_=ciJdPTMscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MCxbInN0YXR1c - yJdPSJhY3RpdmUiLFsidXNlck5hbWUiXT0ibmV0Y2RmLUMvNC45LjIiLH0scHJvaj17WyJm - biJdPSIvYXBwcy9wcm9kL2xtb2R1bGVzL2ludGVsLzE5LjEuMy4zMDQvcHJvai83LjEuMCI - sWyJmdWxsTmFtZSJdPSJwcm9qLzcuMS4wIixbImxvYWRPcmRlciJdPTEzLHByb3BUPXt9LF - sic3RhY2tEZXB0aCJdPTEsWyJzdGF0dXMiXT0iYWN0aXZlIixbInVzZXJOYW1lIl09InByb - 2ovNy4xLjAiLH0sWyJ2ZS9oYWZzIl09e1siZm4iXT0iL2FwcHMvcHJvZC9sbW9kdWxlcy9p - bnRlbC8xOS4xLjMuMzA0L3ZlL2hhZnMvMi4xIixbImZ1bGxOYW1lIl09InZlL2hhZnMvMi4 - xIixbImxvYWRPcmRlciJdPTE0LHByb3BU,LESS=-M -I -R, - PE_MPICH_GTL_LIBS_nvidia70=-lmpi_gtl_cuda, - __LMOD_REF_COUNT_INTEL_LICENSE_FILE=/pe/intel/compilers_and_libraries_ - 2020.4.304/linux/licenses:1;/opt/intel/licenses:1;/intel/licenses:1, - DISPLAY=localhost:20.0,HISTTIMEFORMAT=%F %T, - LMOD_FAMILY_COMPILER_VERSION=19.1.3.304,HOSTNAME=dlogin01, - IPPROOT=/pe/intel/compilers_and_libraries_2020.4.304/linux/ipp, - LMOD_SYSTEM_DEFAULT_MODULES=envvar/1.0, - OLDPWD=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/ush/p - reprocess, - __LMOD_REF_COUNT__LMFILES_=/opt/cray/pe/lmod/modulefiles/comnet/intel/ - 19.0/ofi/1.0/cray-mpich/8.1.19.lua:1;/apps/prod/lmodules/INTEL_cray_mpi - ch/19.1.3.304/cray-mpich/8.1.4/hdf5-C/1.14.0.lua:1;/apps/prod/lmodules/ - INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4/netcdf-C/4.9.2.lua:1;/apps - /prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4/esmf-C/8.6. - 0.lua:1;/opt/cray/pe/lmod/modulefiles/craype-targets/default/craype-x86 - -rome.lua:1;/opt/cray/modulefiles/libfabric/1.20.1:1;/opt/cray/pe/lmod/ - modulefiles/craype-targets/default/craype-network-ofi.lua:1;/apps/prod/ - lmodules/sys_core/envvar/1.0:1;/opt/cray/pe/lmod/modulefiles/core/crayp - e/2.7.17.lua:1;/opt/cray/pe/lmod/modulefiles/core/PrgEnv-intel/8.5.0.lu - a:1;/apps/prod/lmodules/core/intel/19.1.3.304.lua:1;/apps/prod/lmodules - /intel/19.1.3.304/geos/3.8.1:1;/apps/prod/lmodules/intel/19.1.3.304/pro - j/7.1.0:1;/apps/prod/lmodules/intel/19.1.3.304/ve/hafs/2.1:1, - CONFIG_SITE=/usr/share/site/x86_64-unknown-linux-gnu,CSHEDIT=emacs, - NETCDF_ROOT=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4 - .9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcd - f/4.9.2, - C_INCLUDE_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfa - tslqmcrzo5kb4raaq/include:/apps/spack/geos/3.8.1/intel/19.1.3.304/5reck - tk5lndzgkkqq36y4a2h4yx3ahdy/include, - HDF5_ROOT=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9 - .2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf5/1. - 14.0, - LMOD_CUSTOM_CNCM_INTEL_19_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX - =/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/apps - /ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4, - NETCDF_VERSION=4.9.2, - LMOD_CUSTOM_COMPILER_GNU_8_0_PREFIX=/apps/prod/lmodules/gcc/11.2.0:/ap - ps/prod/lmodules/gcc/10.2.0,ESMF_VERSION=8.6.0,GPG_TTY=/dev/pts/20, - LESS_ADVANCED_PREPROCESSOR=no, - HDF5_LIBRARIES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__ - n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hd - f5/1.14.0/lib,COLORTERM=1, - frc=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp - ute_interpolation_weights/sorc/../../..//PrepInputs/forcing, - _ModuleTable007_=PTEsWyJzdGF0dXMiXT0iYWN0aXZlIixbInVzZXJOYW1lIl09Imlud - GVsLzE5LjEuMy4zMDQiLH0sbGliZmFicmljPXtbImZuIl09Ii9vcHQvY3JheS9tb2R1bGVm - aWxlcy9saWJmYWJyaWMvMS4yMC4xIixbImZ1bGxOYW1lIl09ImxpYmZhYnJpYy8xLjIwLjE - iLFsibG9hZE9yZGVyIl09Nixwcm9wVD17fSxbInN0YWNrRGVwdGgiXT0zLFsic3RhdHVzIl - 09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJdPSJsaWJmYWJyaWMiLH0sWyJuZXRjZGYtQyJdPXtbI - mZuIl09Ii9hcHBzL3Byb2QvbG1vZHVsZXMvSU5URUxfY3JheV9tcGljaC8xOS4xLjMuMzA0 - L2NyYXktbXBpY2gvOC4xLjQvbmV0Y2RmLUMvNC45LjIubHVhIixbImZ1bGxOYW1lIl09Im5 - ldGNkZi1DLzQuOS4yIixbImxvYWRPcmRl, - ESMF_DIR=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9. - 2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6 - .0, - __LMOD_REF_COUNT_NLSPATH=/pe/intel/compilers_and_libraries_2020.4.304/ - linux/compiler/lib/intel64/locale/%l_%t/%N:1;/pe/intel/compilers_and_li - braries_2020.4.304/linux/mkl/lib/intel64_lin/locale/%l_%t/%N:1;/pe/inte - l/debugger_2020/gdb/intel64/share/locale/%l_%t/%N:1, - __LMOD_REF_COUNT_CPLUS_INCLUDE_PATH=/apps/spack/proj/7.1.0/intel/19.1. - 3.304/cjbmc7tacv5qcfatslqmcrzo5kb4raaq/include:1;/apps/spack/geos/3.8.1 - /intel/19.1.3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy/include:1, - LMOD_FAMILY_CRAYPE_NETWORK=craype-network-ofi, - LMOD_FAMILY_CRAYPE_VERSION=2.7.17, - NetCDF_INCLUDES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0_ - _n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/n - etcdf/4.9.2/include, - __LMOD_REF_COUNT_INCLUDE=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc - 7tacv5qcfatslqmcrzo5kb4raaq/include:1;/apps/spack/geos/3.8.1/intel/19.1 - .3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy/include:1, - DYLD_LIBRARY_PATH=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14. - 0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12 - /esmf/8.6.0/lib:/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__ - n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/ne - tcdf/4.9.2/lib:/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n - -4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf - 5/1.14.0/lib,MACHTYPE=x86_64-suse-linux, - __LMOD_REF_COUNT_LD_LIBRARY_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.3 - 04/cjbmc7tacv5qcfatslqmcrzo5kb4raaq/lib:1;/apps/spack/geos/3.8.1/intel/ - 19.1.3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy/lib:1;/pe/intel/compilers_a - nd_libraries_2020.4.304/linux/compiler/lib/intel64_lin:1;/pe/intel/comp - ilers_and_libraries_2020.4.304/linux/mpi/intel64/lib/release:1;/pe/inte - l/compilers_and_libraries_2020.4.304/linux/mpi/intel64/lib:1;/pe/intel/ - compilers_and_libraries_2020.4.304/linux/ipp/lib/intel64:1;/pe/intel/co - mpilers_and_libraries_2020.4.304/linux/mkl/lib/intel64_lin:1;/pe/intel/ - compilers_and_libraries_2020.4.304/linux/tbb/lib/intel64/gcc4.8:1;/pe/i - ntel/debugger_2020/python/intel64/lib:1;/pe/intel/debugger_2020/libipt/ - intel64/lib:1;/opt/cray/lib64:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8. - 1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray - -mpich-8.1.12/esmf/8.6.0/lib:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1 - .12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray- - mpich-8.1.12/netcdf/4.9.2/lib:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8. - 1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray - -mpich-8.1.12/hdf5/1.14.0/lib:1, - __LMOD_REF_COUNT_PKG_CONFIG_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.3 - 04/cjbmc7tacv5qcfatslqmcrzo5kb4raaq/lib/pkgconfig:1;/pe/intel/compilers - _and_libraries_2020.4.304/linux/mkl/bin/pkgconfig:1;/opt/cray/pe/craype - /2.7.17/pkg-config:1;/opt/cray/lib64/pkgconfig:1, - LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_UCX_1_0_PREFIX=/apps/prod/lmodules/cce - /13.0.0:/apps/prod/lmodules/cce/12.0.3:/apps/prod/lmodules/cce/11.0.4, - PE_PKGCONFIG_PRODUCTS=PE_MPICH, - CRAY_MPICH_BASEDIR=/opt/cray/pe/mpich/8.1.19/ofi, - PE_MPICH_GTL_DIR_nvidia80=-L/opt/cray/pe/mpich/8.1.19/gtl/lib, - tmp=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp - ute_interpolation_weights/sorc/../../..//PrepInputs/tmpfiles, - SSH_AUTH_SOCK=/tmp/ssh-4Jj8NWWunyXC/agent.2417289, - _ModuleTable004_=cm9tZSJdPXtbImZuIl09Ii9vcHQvY3JheS9wZS9sbW9kL21vZHVsZ - WZpbGVzL2NyYXlwZS10YXJnZXRzL2RlZmF1bHQvY3JheXBlLXg4Ni1yb21lLmx1YSIsWyJm - dWxsTmFtZSJdPSJjcmF5cGUteDg2LXJvbWUiLFsibG9hZE9yZGVyIl09NSxwcm9wVD17fSx - bInN0YWNrRGVwdGgiXT0yLFsic3RhdHVzIl09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJdPSJjcm - F5cGUteDg2LXJvbWUiLH0sZW52dmFyPXtbImZuIl09Ii9hcHBzL3Byb2QvbG1vZHVsZXMvc - 3lzX2NvcmUvZW52dmFyLzEuMCIsWyJmdWxsTmFtZSJdPSJlbnZ2YXIvMS4wIixbImxvYWRP - cmRlciJdPTgscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MSxbInN0YXR1cyJdPSJhY3RpdmU - iLFsidXNlck5hbWUiXT0iZW52dmFyLzEu, - VIRTUAL_ENV=/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1, - MINICOM=-c on, - HDF5_INCLUDES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n - -4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf - 5/1.14.0/include, - PE_MPICH_PKGCONFIG_VARIABLES=PE_MPICH_GTL_DIR_@accelerator@:PE_MPICH_G - TL_LIBS_@accelerator@, - ESMFMKFILE=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4. - 9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8 - .6.0/lib/esmf.mk,PE_MPICH_PKGCONFIG_LIBS=mpich, - INTEL_PYTHONHOME=/pe/intel/debugger_2020/python/intel64/, - QT_SYSTEM_DIR=/usr/share/desktop-data,OSTYPE=linux, - NETCDF=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2_ - _p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9 - .2,meshname=rwps.oc_5km_100km, - CLASSPATH=/pe/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel - 64/lib/mpi.jar, - PROJ_LIB=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfatslqmc - rzo5kb4raaq/share/proj/,USER=keston.smith, - ESMF_INC=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9. - 2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6 - .0/include,MODULES_SET_SHELL_STARTUP=0,PAGER=less, - NetCDF_ROOT=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4 - .9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcd - f/4.9.2,PE_MPICH_GENCOMPILERS_INTEL=19.0,MODULE_VERSION=3.2.10, - ESMF_INCLUDES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n - -4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esm - f/8.6.0/include, - LMOD_CUSTOM_CNCM_GNU_8_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX=/a - pps/prod/lmodules/GCC_cray_mpich/10.2.0/cray-mpich/8.1.4, - LMOD_FAMILY_PRGENV_VERSION=8.5.0, - _ModuleTable012_=dWxlcy8kTU9EVUxFX1ZFUlNJT04vbW9kdWxlZmlsZXM6L3Vzci9za - GFyZS9tb2R1bGVzL21vZHVsZWZpbGVzOi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvTGludXg6 - L3Vzci9zaGFyZS9tb2R1bGVmaWxlcy9Db3JlOi91c3Ivc2hhcmUvbG1vZC9sbW9kL21vZHV - sZWZpbGVzL0NvcmU6L29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY29yZTovb3B0L2 - NyYXkvcGUvbG1vZC9tb2R1bGVmaWxlcy9jcmF5cGUtdGFyZ2V0cy9kZWZhdWx0Oi9hcHBzL - 3Byb2QvbG1vZHVsZXMvc3lzX2NvcmU6L2FwcHMvb3BzL3Byb2QvbmNvL21vZHVsZWZpbGVz - L2NvcmU6L2FwcHMvcHJvZC9sbW9kdWxlcy9jb3JlOi9vcHQvY3JheS9tb2R1bGVmaWxlcyI - sfQ==, - ESMF_PATH=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9 - .2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8. - 6.0, - LMOD_CUSTOM_CNCM_GNU_8_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX=/a - pps/prod/lmodules/GCC_cray_mpich/10.2.0/cray-mpich/8.1.4, - CRAY_CPU_TARGET=x86-rome, - LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_UCX_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PR - EFIX=/apps/prod/lmodules/CCE_cray_mpich/11.0.4/cray-mpich/8.1.4, - PKGCONFIG_ENABLED=1, - __LMOD_REF_COUNT_MODULEPATH=/apps/ops/prod/nco/modulefiles/compiler/in - tel/19.1.3.304:1;/apps/ops/prod/libs/modulefiles/compiler/intel/19.1.3. - 304:1;/apps/prod/lmodules/intel/19.1.3.304:1;/apps/ops/prod/nco/models/ - modulefiles:1;/apps/ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray - -mpich/8.1.4:1;/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpi - ch/8.1.4:1;/opt/cray/pe/lmod/modulefiles/comnet/intel/19.0/ofi/1.0:1;/a - pps/prod/lmodules/compiler/intel/19.0:1;/opt/cray/pe/lmod/modulefiles/n - et/ofi/1.0:1;/opt/cray/pe/lmod/modulefiles/cpu/x86-rome/1.0:1;/opt/cray - /pe/lmod/modulefiles/mpi/intel/19.0/ofi/1.0/cray-mpich/8.0:1;/usr/share - /modules:1;/usr/share/Modules/$MODULE_VERSION/modulefiles:1;/usr/share/ - modules/modulefiles:1;/usr/share/modulefiles/Linux:1;/usr/share/modulef - iles/Core:1;/usr/share/lmod/lmod/modulefiles/Core:1;/opt/cray/pe/lmod/m - odulefiles/core:1;/opt/cray/pe/lmod/modulefiles/craype-targets/default: - 1;/apps/prod/lmodules/sys_core:1;/apps/ops/prod/nco/modulefiles/core:1; - /apps/prod/lmodules/core:1;/opt/cray/modulefiles:1, - COMINrrfs=/lfs/h1/ops/prod/com/rrfs/v1.0/rrfs./,MORE=-sl, - PE_FORTRAN_PKGCONFIG_LIBS=mpichf90, - __LMOD_REF_COUNT_LOADEDMODULES=cray-mpich/8.1.19:1;hdf5-C/1.14.0:1;net - cdf-C/4.9.2:1;esmf-C/8.6.0:1;craype-x86-rome:1;libfabric/1.20.1:1;crayp - e-network-ofi:1;envvar/1.0:1;craype/2.7.17:1;PrgEnv-intel/8.5.0:1;intel - /19.1.3.304:1;geos/3.8.1:1;proj/7.1.0:1;ve/hafs/2.1:1, - __LMOD_REF_COUNT_CRAY_LD_LIBRARY_PATH=/opt/cray/pe/mpich/8.1.19/ofi/in - tel/19.0/lib:1;/opt/cray/pe/mpich/8.1.19/gtl/lib:1, - INTEL_MAJOR_VERSION=19.1, - PWD=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp - ute_interpolation_weights/sorc, - ESMF_MOD=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9. - 2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6 - .0/mod,PE_MPICH_GTL_DIR_nvidia70=-L/opt/cray/pe/mpich/8.1.19/gtl/lib, - COMINrtofs=/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs./, - HOME=/u/keston.smith, - COMINnbm=/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.//grib2, - PELOCAL_PRGENV=true, - CMAKE_PREFIX_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5q - cfatslqmcrzo5kb4raaq:/apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5ln - dzgkkqq36y4a2h4yx3ahdy,SSH_AGENT_PID=2417290,HOST=dlogin01, - SSH_CLIENT=192.58.153.8 43034 22,LMOD_VERSION=8.3.1, - XNLSPATH=/usr/share/X11/nls,PE_MPICH_FORTRAN_PKGCONFIG_LIBS=mpichf90, - CPATH=/pe/intel/compilers_and_libraries_2020.4.304/linux/ipp/include:/ - pe/intel/compilers_and_libraries_2020.4.304/linux/mkl/include:/pe/intel - /compilers_and_libraries_2020.4.304/linux/pstl/include:/pe/intel/compil - ers_and_libraries_2020.4.304/linux/pstl/stdlib:/pe/intel/compilers_and_ - libraries_2020.4.304/linux/tbb/include:/apps/prod/hpc-stack/i-19.1.3.30 - 4__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.3 - 04/cray-mpich-8.1.12/esmf/8.6.0/include:/apps/prod/hpc-stack/i-19.1.3.3 - 04__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3. - 304/cray-mpich-8.1.12/netcdf/4.9.2/include:/apps/prod/hpc-stack/i-19.1. - 3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1 - .3.304/cray-mpich-8.1.12/hdf5/1.14.0/include, - __LMOD_REF_COUNT_INFOPATH=/pe/intel/documentation_2020/en/debugger/gdb - -ia/info:1;/apps/docs/info:1,CRAY_LMOD_CPU=x86-rome/1.0, - PE_MPICH_GTL_LIBS_nvidia80=-lmpi_gtl_cuda, - LMOD_FAMILY_CRAYPE_CPU_VERSION=false, - BASH_ENV=/usr/share/lmod/lmod/init/bash,XDG_DATA_DIRS=/usr/share, - __LMOD_REF_COUNT_PE_MPICH_FORTRAN_PKGCONFIG_LIBS=mpichf90:1, - INTEL_MINOR_VERSION=3.304, - LMOD_CUSTOM_CNCM_INTEL_19_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PREFIX - =/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/apps - /ops/prod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4, - CRAY_LMOD_NET=ofi/1.0, - RWPSroot=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev - /compute_interpolation_weights/sorc/../../../, - COMINlocal=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/d - ev/compute_interpolation_weights/sorc/../../..//PrepInputs/tmpfiles, - __LMOD_REF_COUNT_PE_PKGCONFIG_PRODUCTS=PE_MPICH:1, - PE_MPICH_MODULE_NAME=cray-mpich, - __LMOD_REF_COUNT_LMOD_CUSTOM_COMPILER_INTEL_19_0_PREFIX=/apps/ops/prod - /nco/models/modulefiles:10;/apps/prod/lmodules/intel/19.1.3.304:1;/apps - /ops/prod/libs/modulefiles/compiler/intel/19.1.3.304:1;/apps/ops/prod/n - co/modulefiles/compiler/intel/19.1.3.304:1, - NLSPATH=/pe/intel/compilers_and_libraries_2020.4.304/linux/compiler/li - b/intel64/locale/%l_%t/%N:/pe/intel/compilers_and_libraries_2020.4.304/ - linux/mkl/lib/intel64_lin/locale/%l_%t/%N:/pe/intel/debugger_2020/gdb/i - ntel64/share/locale/%l_%t/%N,LIBGL_DEBUG=quiet, - LMOD_CUSTOM_COMPILER_INTEL_19_0_PREFIX=/apps/ops/prod/nco/models/modul - efiles:/apps/prod/lmodules/intel/19.1.3.304:/apps/ops/prod/libs/modulef - iles/compiler/intel/19.1.3.304:/apps/ops/prod/nco/modulefiles/compiler/ - intel/19.1.3.304,__LMOD_REF_COUNT_PE_MPICH_FIXED_PRGENV=INTEL:1, - __LMOD_REF_COUNT_LIBRARY_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/ - cjbmc7tacv5qcfatslqmcrzo5kb4raaq/lib:1;/apps/spack/geos/3.8.1/intel/19. - 1.3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy/lib:1;/pe/intel/compilers_and_ - libraries_2020.4.304/linux/ipp/lib/intel64:1;/pe/intel/compilers_and_li - braries_2020.4.304/linux/compiler/lib/intel64_lin:1;/pe/intel/compilers - _and_libraries_2020.4.304/linux/mkl/lib/intel64_lin:1;/pe/intel/compile - rs_and_libraries_2020.4.304/linux/tbb/lib/intel64/gcc4.8:2;/apps/prod/h - pc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pn - etcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6.0/lib:1, - PROFILEREAD=true, - LIBRARY_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfats - lqmcrzo5kb4raaq/lib:/apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5lnd - zgkkqq36y4a2h4yx3ahdy/lib:/pe/intel/compilers_and_libraries_2020.4.304/ - linux/ipp/lib/intel64:/pe/intel/compilers_and_libraries_2020.4.304/linu - x/compiler/lib/intel64_lin:/pe/intel/compilers_and_libraries_2020.4.304 - /linux/mkl/lib/intel64_lin:/pe/intel/compilers_and_libraries_2020.4.304 - /linux/tbb/lib/intel64/gcc4.8:/apps/prod/hpc-stack/i-19.1.3.304__m-8.1. - 12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-m - pich-8.1.12/esmf/8.6.0/lib, - __LMOD_REF_COUNT_CMAKE_PREFIX_PATH=/apps/spack/proj/7.1.0/intel/19.1.3 - .304/cjbmc7tacv5qcfatslqmcrzo5kb4raaq:1;/apps/spack/geos/3.8.1/intel/19 - .1.3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy:1,LMOD_sys=Linux, - _ModuleTable010_=aWNoLzE5LjEuMy4zMDQvY3JheS1tcGljaC84LjEuNCIsIi9vcHQvY - 3JheS9wZS9sbW9kL21vZHVsZWZpbGVzL2NvbW5ldC9pbnRlbC8xOS4wL29maS8xLjAiLCIv - YXBwcy9wcm9kL2xtb2R1bGVzL2NvbXBpbGVyL2ludGVsLzE5LjAiLCIvb3B0L2NyYXkvcGU - vbG1vZC9tb2R1bGVmaWxlcy9uZXQvb2ZpLzEuMCIsIi9vcHQvY3JheS9wZS9sbW9kL21vZH - VsZWZpbGVzL2NwdS94ODYtcm9tZS8xLjAiLCIvb3B0L2NyYXkvcGUvbG1vZC9tb2R1bGVma - Wxlcy9tcGkvaW50ZWwvMTkuMC9vZmkvMS4wL2NyYXktbXBpY2gvOC4wIiwiL3Vzci9zaGFy - ZS9tb2R1bGVzIiwiL3Vzci9zaGFyZS9Nb2R1bGVzLyRNT0RVTEVfVkVSU0lPTi9tb2R1bGV - maWxlcyIsIi91c3Ivc2hhcmUvbW9kdWxl,PE_PKGCONFIG_LIBS=mpich, - _ModuleTable001_=X01vZHVsZVRhYmxlXz17WyJNVHZlcnNpb24iXT0zLFsiY19yZWJ1a - WxkVGltZSJdPWZhbHNlLFsiY19zaG9ydFRpbWUiXT1mYWxzZSxkZXB0aFQ9e30sZmFtaWx5 - PXtbIlByZ0VudiJdPSJQcmdFbnYtaW50ZWwiLFsiY29tcGlsZXIiXT0iaW50ZWwiLFsiY3J - heXBlIl09ImNyYXlwZSIsWyJjcmF5cGVfY3B1Il09ImNyYXlwZS14ODYtcm9tZSIsWyJjcm - F5cGVfbmV0d29yayJdPSJjcmF5cGUtbmV0d29yay1vZmkiLFsibXBpIl09ImNyYXktbXBpY - 2giLH0sbVQ9e1siUHJnRW52LWludGVsIl09e1siZm4iXT0iL29wdC9jcmF5L3BlL2xtb2Qv - bW9kdWxlZmlsZXMvY29yZS9QcmdFbnYtaW50ZWwvOC41LjAubHVhIixbImZ1bGxOYW1lIl0 - 9IlByZ0Vudi1pbnRlbC84LjUuMCIsWyJs, - LOADEDMODULES=cray-mpich/8.1.19:hdf5-C/1.14.0:netcdf-C/4.9.2:esmf-C/8. - 6.0:craype-x86-rome:libfabric/1.20.1:craype-network-ofi:envvar/1.0:cray - pe/2.7.17:PrgEnv-intel/8.5.0:intel/19.1.3.304:geos/3.8.1:proj/7.1.0:ve/ - hafs/2.1,LMOD_AVAIL_STYLE=en_grouped:system,CRAYPE_NETWORK_TARGET=ofi, - _ModuleTable006_=ZXJOYW1lIl09Imdlb3MvMy44LjEiLH0sWyJoZGY1LUMiXT17WyJmb - iJdPSIvYXBwcy9wcm9kL2xtb2R1bGVzL0lOVEVMX2NyYXlfbXBpY2gvMTkuMS4zLjMwNC9j - cmF5LW1waWNoLzguMS40L2hkZjUtQy8xLjE0LjAubHVhIixbImZ1bGxOYW1lIl09ImhkZjU - tQy8xLjE0LjAiLFsibG9hZE9yZGVyIl09Mixwcm9wVD17fSxbInN0YWNrRGVwdGgiXT0wLF - sic3RhdHVzIl09ImFjdGl2ZSIsWyJ1c2VyTmFtZSJdPSJoZGY1LUMvMS4xNC4wIix9LGlud - GVsPXtbImZuIl09Ii9hcHBzL3Byb2QvbG1vZHVsZXMvY29yZS9pbnRlbC8xOS4xLjMuMzA0 - Lmx1YSIsWyJmdWxsTmFtZSJdPSJpbnRlbC8xOS4xLjMuMzA0IixbImxvYWRPcmRlciJdPTE - xLHByb3BUPXt9LFsic3RhY2tEZXB0aCJd, - __LMOD_REF_COUNT_MANPATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc - 7tacv5qcfatslqmcrzo5kb4raaq/share/man:1;/pe/intel/man/common:1;/pe/inte - l/compilers_and_libraries_2020.4.304/linux/mpi/man:1;/pe/intel/document - ation_2020/en/debugger/gdb-ia/man:1;/opt/cray/pe/craype/2.7.17/man:1;/o - pt/cray/share/man:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14 - .0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.1 - 2/esmf/8.6.0/share/man:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h - -1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich- - 8.1.12/netcdf/4.9.2/share/man:1;/apps/prod/hpc-stack/i-19.1.3.304__m-8. - 1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray - -mpich-8.1.12/hdf5/1.14.0/share/man:1;/opt/cray/pe/mpich/8.1.19/ofi/man - :1;/opt/cray/pe/mpich/8.1.19/man/mpich:1;/usr/share/lmod/lmod/share/man - :1;/usr/share/man:1;/opt/c3/man:1;/opt/pbs/share/man:1, - _ModuleTable003_=cGUvMi43LjE3Lmx1YSIsWyJmdWxsTmFtZSJdPSJjcmF5cGUvMi43L - jE3IixbImxvYWRPcmRlciJdPTkscHJvcFQ9e30sWyJzdGFja0RlcHRoIl09MixbInN0YXR1 - cyJdPSJhY3RpdmUiLFsidXNlck5hbWUiXT0iY3JheXBlIix9LFsiY3JheXBlLW5ldHdvcms - tb2ZpIl09e1siZm4iXT0iL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXMvY3JheXBlLX - RhcmdldHMvZGVmYXVsdC9jcmF5cGUtbmV0d29yay1vZmkubHVhIixbImZ1bGxOYW1lIl09I - mNyYXlwZS1uZXR3b3JrLW9maSIsWyJsb2FkT3JkZXIiXT03LHByb3BUPXt9LFsic3RhY2tE - ZXB0aCJdPTIsWyJzdGF0dXMiXT0iYWN0aXZlIixbInVzZXJOYW1lIl09ImNyYXlwZS1uZXR - 3b3JrLW9maSIsfSxbImNyYXlwZS14ODYt, - INTEL_LICENSE_FILE=/pe/intel/compilers_and_libraries_2020.4.304/linux/ - licenses:/opt/intel/licenses:/intel/licenses,LMOD_ROOT=/usr/share/lmod, - SSH_TTY=/dev/pts/20,FROM_HEADER=, - CRAY_MPICH_ROOTDIR=/opt/cray/pe/mpich/8.1.19, - MAIL=/var/spool/mail/keston.smith, - PE_INTEL_FIXED_PKGCONFIG_PATH=/opt/cray/pe/mpich/8.1.19/ofi/intel/19.0 - /lib/pkgconfig, - COMINstofs=/lfs/h1/ops/prod/com/stofs/v3.1/stofs_2d_glo., - __LMOD_REF_COUNT_PE_MPICH_GENCOMPILERS_INTEL=19.0:1, - LESSKEY=/etc/lesskey.bin, - _ModuleTable009_=PXt9LFsic3RhY2tEZXB0aCJdPTAsWyJzdGF0dXMiXT0iYWN0aXZlI - ixbInVzZXJOYW1lIl09InZlL2hhZnMvMi4xIix9LH0sbXBhdGhBPXsiL2FwcHMvb3BzL3By - b2QvbmNvL21vZHVsZWZpbGVzL2NvbXBpbGVyL2ludGVsLzE5LjEuMy4zMDQiLCIvYXBwcy9 - vcHMvcHJvZC9saWJzL21vZHVsZWZpbGVzL2NvbXBpbGVyL2ludGVsLzE5LjEuMy4zMDQiLC - IvYXBwcy9wcm9kL2xtb2R1bGVzL2ludGVsLzE5LjEuMy4zMDQiLCIvYXBwcy9vcHMvcHJvZ - C9uY28vbW9kZWxzL21vZHVsZWZpbGVzIiwiL2FwcHMvb3BzL3Byb2QvbGlicy9tb2R1bGVm - aWxlcy9tcGkvaW50ZWwvMTkuMS4zLjMwNC9jcmF5LW1waWNoLzguMS40IiwiL2FwcHMvcHJ - vZC9sbW9kdWxlcy9JTlRFTF9jcmF5X21w,TERM=xterm-256color,SHELL=/bin/bash, - ESMF_BIN=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9. - 2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6 - .0/bin,CRAY_MPICH_VER=8.1.19, - LMOD_ADMIN_FILE=/apps/prod/lmodules/admin.list, - LMOD_CUSTOM_COMPILER_GNU_8_0_UCX_1_0_PREFIX=/apps/prod/lmodules/gcc/11 - .2.0:/apps/prod/lmodules/gcc/10.2.0,PE_MPICH_FIXED_PRGENV=INTEL, - outdir=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/c - ompute_interpolation_weights/sorc/../../..//PrepInputs, - lmod_prefix_path=/usr/share, - LMOD_CUSTOM_COMPILER_CRAYCLANG_10_0_PREFIX=/apps/prod/lmodules/cce/13. - 0.0:/apps/prod/lmodules/cce/12.0.3:/apps/prod/lmodules/cce/11.0.4, - LMOD_FAMILY_PRGENV=PrgEnv-intel,_ModuleTable_Sz_=12, - __LMOD_REF_COUNT_CPATH=/pe/intel/compilers_and_libraries_2020.4.304/li - nux/ipp/include:1;/pe/intel/compilers_and_libraries_2020.4.304/linux/mk - l/include:1;/pe/intel/compilers_and_libraries_2020.4.304/linux/pstl/inc - lude:1;/pe/intel/compilers_and_libraries_2020.4.304/linux/pstl/stdlib:1 - ;/pe/intel/compilers_and_libraries_2020.4.304/linux/tbb/include:2;/apps - /prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e- - 8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6.0/include:1;/a - pps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10_ - _e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9.2/include - :1;/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2. - 5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf5/1.14.0/inc - lude:1,LS_OPTIONS=-N --color=tty -T 0, - NetCDF=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2_ - _p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9 - .2,LMOD_FAMILY_COMPILER=intel, - LMOD_CUSTOM_CNCM_CRAYCLANG_10_0_OFI_1_0_X86_ROME_1_0_CRAY_MPICH_8_0_PR - EFIX=/apps/prod/lmodules/CCE_cray_mpich/11.0.4/cray-mpich/8.1.4, - TMOUT=1800,PYTHONSTARTUP=/etc/pythonstart, - NETCDF_INCLUDES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0_ - _n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/n - etcdf/4.9.2/include, - RWPSfix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPS,SHLVL=3, - LANGUAGE=en_US.UTF-8, - PYTHONPATH=/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/p - ython3.10/site-packages,G_FILENAME_ENCODING=@locale\,UTF-8\,ISO-8859-15\, - CP1252, - LMOD_CUSTOM_COMPILER_INTEL_19_0_UCX_1_0_PREFIX=/apps/prod/lmodules/int - el/19.1.3.304:/apps/ops/prod/libs/modulefiles/compiler/intel/19.1.3.304 - :/apps/ops/prod/nco/modulefiles/compiler/intel/19.1.3.304, - HPC_OPT=/apps/ops/prod/libs, - MANPATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfatslqmcr - zo5kb4raaq/share/man:/pe/intel/man/common:/pe/intel/compilers_and_libra - ries_2020.4.304/linux/mpi/man:/pe/intel/documentation_2020/en/debugger/ - gdb-ia/man:/opt/cray/pe/craype/2.7.17/man:/opt/cray/share/man:/apps/pro - d/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6. - 0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6.0/share/man:/apps/ - prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8 - .6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9.2/share/man:/ - apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10 - __e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf5/1.14.0/share/m - an:/opt/cray/pe/mpich/8.1.19/ofi/man:/opt/cray/pe/mpich/8.1.19/man/mpic - h:/usr/share/lmod/lmod/share/man:/usr/share/man:/opt/c3/man:/opt/pbs/sh - are/man, - __LMOD_REF_COUNT_CLASSPATH=/pe/intel/compilers_and_libraries_2020.4.30 - 4/linux/mpi/intel64/lib/mpi.jar:1, - INTEL_PATH=/pe/intel/compilers_and_libraries_2020.4.304, - MPICH_DIR=/opt/cray/pe/mpich/8.1.19/ofi/intel/19.0, - INTEL_VERSION=19.1.3.304,OSCAR_HOME=/opt/oscar, - fix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/RWPS/dev/comp - ute_interpolation_weights/sorc/../../..//fix, - MODULEPATH=/apps/ops/prod/nco/modulefiles/compiler/intel/19.1.3.304:/a - pps/ops/prod/libs/modulefiles/compiler/intel/19.1.3.304:/apps/prod/lmod - ules/intel/19.1.3.304:/apps/ops/prod/nco/models/modulefiles:/apps/ops/p - rod/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4:/apps/prod/l - modules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:/opt/cray/pe/lmod/ - modulefiles/comnet/intel/19.0/ofi/1.0:/apps/prod/lmodules/compiler/inte - l/19.0:/opt/cray/pe/lmod/modulefiles/net/ofi/1.0:/opt/cray/pe/lmod/modu - lefiles/cpu/x86-rome/1.0:/opt/cray/pe/lmod/modulefiles/mpi/intel/19.0/o - fi/1.0/cray-mpich/8.0:/usr/share/modules:/usr/share/Modules/$MODULE_VER - SION/modulefiles:/usr/share/modules/modulefiles:/usr/share/modulefiles/ - Linux:/usr/share/modulefiles/Core:/usr/share/lmod/lmod/modulefiles/Core - :/opt/cray/pe/lmod/modulefiles/core:/opt/cray/pe/lmod/modulefiles/crayp - e-targets/default:/apps/prod/lmodules/sys_core:/apps/ops/prod/nco/modul - efiles/core:/apps/prod/lmodules/core:/opt/cray/modulefiles, - CRAY_MPICH_DIR=/opt/cray/pe/mpich/8.1.19/ofi/intel/19.0, - LMOD_FAMILY_CRAYPE=craype,LOGNAME=keston.smith, - __LMOD_REF_COUNT_LMOD_CUSTOM_PATHS=COMPILER/apps/ops/prod/nco/modulefi - les/compiler/intel/19.1.3.304:1;COMPILER/apps/ops/prod/libs/modulefiles - /compiler/intel/19.1.3.304:1;COMPILER/apps/prod/lmodules/intel/19.1.3.3 - 04:1;COMPILER/apps/ops/prod/nco/models/modulefiles:1;CNCM/apps/ops/prod - /libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.4:1;CNCM/apps/pro - d/lmodules/INTEL_cray_mpich/19.1.3.304/cray-mpich/8.1.4:1, - CRAY_MPICH_VERSION=8.1.19, - CPLUS_INCLUDE_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5 - qcfatslqmcrzo5kb4raaq/include:/apps/spack/geos/3.8.1/intel/19.1.3.304/5 - recktk5lndzgkkqq36y4a2h4yx3ahdy/include, - MKLROOT=/pe/intel/compilers_and_libraries_2020.4.304/linux/mkl, - MODULE_VERSION_STACK=3.2.10,MODULEPATH_ROOT=/usr/share/modulefiles, - LMOD_PACKAGE_PATH=/apps/prod/lmodules, - __LMOD_REF_COUNT_PE_INTEL_FIXED_PKGCONFIG_PATH=/opt/cray/pe/mpich/8.1. - 19/ofi/intel/19.0/lib/pkgconfig:1, - PE_MPICH_GTL_LIBS_amd_gfx906=-lmpi_gtl_hsa, - PSTLROOT=/pe/intel/compilers_and_libraries_2020.4.304/linux/pstl, - XDG_CONFIG_DIRS=/etc/xdg, - PATH=/apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/bin:/apps/s - pack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcfatslqmcrzo5kb4raaq/bin:/ - apps/spack/geos/3.8.1/intel/19.1.3.304/5recktk5lndzgkkqq36y4a2h4yx3ahdy - /bin:/pe/intel/compilers_and_libraries_2020.4.304/linux/bin/intel64:/pe - /intel/compilers_and_libraries_2020.4.304/linux/bin:/pe/intel/compilers - _and_libraries_2020.4.304/linux/mpi/intel64/bin:/pe/intel/debugger_2020 - /gdb/intel64/bin:/opt/cray/pe/craype/2.7.17/bin:/opt/cray/bin:/apps/pro - d/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6. - 0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8.6.0/bin:/apps/prod/h - pc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pn - etcdf/intel-19.1.3.304/cray-mpich-8.1.12/netcdf/4.9.2/bin:/apps/prod/hp - c-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9.2__p-2.5.10__e-8.6.0pne - tcdf/intel-19.1.3.304/cray-mpich-8.1.12/hdf5/1.14.0/bin:/opt/cray/pe/mp - ich/8.1.19/bin:/u/keston.smith/.local/bin:/usr/local/bin:/usr/bin:/bin: - /opt/c3/bin:/opt/pbs/bin:/sbin:/opt/cray/pe/bin, - PE_MPICH_GTL_LIBS_amd_gfx908=-lmpi_gtl_hsa, - TBBROOT=/pe/intel/compilers_and_libraries_2020.4.304/linux/tbb, - ESMF_LIBRARIES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__ - n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/es - mf/8.6.0/lib, - __LMOD_REF_COUNT_PE_PRODUCT_LIST=CRAYPE:1;CRAYPE_X86_ROME:1, - NetCDF_LIBRARIES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0 - __n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/ - netcdf/4.9.2/lib, - _LMFILES_=/opt/cray/pe/lmod/modulefiles/comnet/intel/19.0/ofi/1.0/cray - -mpich/8.1.19.lua:/apps/prod/lmodules/INTEL_cray_mpich/19.1.3.304/cray- - mpich/8.1.4/hdf5-C/1.14.0.lua:/apps/prod/lmodules/INTEL_cray_mpich/19.1 - .3.304/cray-mpich/8.1.4/netcdf-C/4.9.2.lua:/apps/prod/lmodules/INTEL_cr - ay_mpich/19.1.3.304/cray-mpich/8.1.4/esmf-C/8.6.0.lua:/opt/cray/pe/lmod - /modulefiles/craype-targets/default/craype-x86-rome.lua:/opt/cray/modul - efiles/libfabric/1.20.1:/opt/cray/pe/lmod/modulefiles/craype-targets/de - fault/craype-network-ofi.lua:/apps/prod/lmodules/sys_core/envvar/1.0:/o - pt/cray/pe/lmod/modulefiles/core/craype/2.7.17.lua:/opt/cray/pe/lmod/mo - dulefiles/core/PrgEnv-intel/8.5.0.lua:/apps/prod/lmodules/core/intel/19 - .1.3.304.lua:/apps/prod/lmodules/intel/19.1.3.304/geos/3.8.1:/apps/prod - /lmodules/intel/19.1.3.304/proj/7.1.0:/apps/prod/lmodules/intel/19.1.3. - 304/ve/hafs/2.1,HDF5_VERSION=1.14.0,MODULESHOME=/usr/share/lmod/lmod, - PKG_CONFIG_PATH=/apps/spack/proj/7.1.0/intel/19.1.3.304/cjbmc7tacv5qcf - atslqmcrzo5kb4raaq/lib/pkgconfig:/pe/intel/compilers_and_libraries_2020 - .4.304/linux/mkl/bin/pkgconfig:/opt/cray/pe/craype/2.7.17/pkg-config:/o - pt/cray/lib64/pkgconfig,LMOD_SETTARG_FULL_SUPPORT=no, - INFOPATH=/pe/intel/documentation_2020/en/debugger/gdb-ia/info::/apps/d - ocs/info,G_BROKEN_FILENAMES=1, - I_MPI_ROOT=/pe/intel/compilers_and_libraries_2020.4.304/linux/mpi, - _ModuleTable011_=cy9tb2R1bGVmaWxlcyIsIi91c3Ivc2hhcmUvbW9kdWxlZmlsZXMvT - GludXgiLCIvdXNyL3NoYXJlL21vZHVsZWZpbGVzL0NvcmUiLCIvdXNyL3NoYXJlL2xtb2Qv - bG1vZC9tb2R1bGVmaWxlcy9Db3JlIiwiL29wdC9jcmF5L3BlL2xtb2QvbW9kdWxlZmlsZXM - vY29yZSIsIi9vcHQvY3JheS9wZS9sbW9kL21vZHVsZWZpbGVzL2NyYXlwZS10YXJnZXRzL2 - RlZmF1bHQiLCIvYXBwcy9wcm9kL2xtb2R1bGVzL3N5c19jb3JlIiwiL2FwcHMvb3BzL3Byb - 2QvbmNvL21vZHVsZWZpbGVzL2NvcmUiLCIvYXBwcy9wcm9kL2xtb2R1bGVzL2NvcmUiLCIv - b3B0L2NyYXkvbW9kdWxlZmlsZXMiLH0sWyJzeXN0ZW1CYXNlTVBBVEgiXT0iL3Vzci9zaGF - yZS9tb2R1bGVzOi91c3Ivc2hhcmUvTW9k, - PE_MPICH_GTL_LIBS_amd_gfx90a=-lmpi_gtl_hsa,HISTSIZE=10000, - CRAYPE_DIR=/opt/cray/pe/craype/2.7.17,LMOD_PKG=/usr/share/lmod/lmod, - __LMOD_REF_COUNT_PE_MPICH_PKGCONFIG_LIBS=mpich:1, - __LMOD_REF_COUNT_PE_PKGCONFIG_LIBS=mpich:1,CPU=x86_64, - CRAYPE_VERSION=2.7.17, - NETCDF_LIBRARIES=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0 - __n-4.9.2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/ - netcdf/4.9.2/lib, - _ModuleTable005_=MCIsfSxbImVzbWYtQyJdPXtbImZuIl09Ii9hcHBzL3Byb2QvbG1vZ - HVsZXMvSU5URUxfY3JheV9tcGljaC8xOS4xLjMuMzA0L2NyYXktbXBpY2gvOC4xLjQvZXNt - Zi1DLzguNi4wLmx1YSIsWyJmdWxsTmFtZSJdPSJlc21mLUMvOC42LjAiLFsibG9hZE9yZGV - yIl09NCxwcm9wVD17fSxbInN0YWNrRGVwdGgiXT0wLFsic3RhdHVzIl09ImFjdGl2ZSIsWy - J1c2VyTmFtZSJdPSJlc21mLUMvOC42LjAiLH0sZ2Vvcz17WyJmbiJdPSIvYXBwcy9wcm9kL - 2xtb2R1bGVzL2ludGVsLzE5LjEuMy4zMDQvZ2Vvcy8zLjguMSIsWyJmdWxsTmFtZSJdPSJn - ZW9zLzMuOC4xIixbImxvYWRPcmRlciJdPTEyLHByb3BUPXt9LFsic3RhY2tEZXB0aCJdPTE - sWyJzdGF0dXMiXT0iYWN0aXZlIixbInVz, - LMOD_CMD=/usr/share/lmod/lmod/libexec/lmod, - ESMF_ROOT=/apps/prod/hpc-stack/i-19.1.3.304__m-8.1.12__h-1.14.0__n-4.9 - .2__p-2.5.10__e-8.6.0pnetcdf/intel-19.1.3.304/cray-mpich-8.1.12/esmf/8. - 6.0,CRAY_MPICH_PREFIX=/opt/cray/pe/mpich/8.1.19/ofi/intel/19.0, - CVS_RSH=ssh,LESSOPEN=lessopen.sh %s, - LMOD_DIR=/usr/share/lmod/lmod/libexec,LC_TIME=C.UTF-8, - LMOD_FAMILY_MPI=cray-mpich, - BASH_FUNC_module%%=() { eval $($LMOD_CMD bash \"$@\") && eval $(${LMO - D_SETTARG_CMD:-:} -s sh) - euser = keston.smith - egroup = emc - hashname = 136857549.dbqs01 - queue_rank = 1787598486766419 - queue_type = E - comment = Job run at Mon Aug 24 at 19:14 on (nid002876:ncpus=16:mem=2684354 - 56kb) and terminated by keston.smith@dlogin01.dogwood.wcoss2.ncep.noaa. - gov - etime = Mon Aug 24 19:08:06 2026 - umask = 22 - run_count = 6 - eligible_time = 00:06:23 - accrue_type = 3 - Submit_arguments = -V /lfs/h2/emc/couple/noscrub/keston.smith/RWPSworkflow/ - RWPS/dev/compute_interpolation_weights/sorc/../../..//dev/compute_inter - polation_weights/ecf/compute_interpolation_weights.ecf - project = NWPS-DEV - run_version = 1 - Submit_Host = dlogin01.dogwood.wcoss2.ncep.noaa.gov - server_instance_id = dbqs01.dogwood.wcoss2.ncep.noaa.gov:15001 - - ------------------------------------------------------------------- -Job 136857549.dbqs01 - PBS tracejob output (for parent mom node only): - -Job: 136857549.dbqs01 - -08/24/2026 19:14:23 M update_job_usage: CPU usage: 0.000 secs -08/24/2026 19:14:23 M update_job_usage: cpupercent initialized to zero -08/24/2026 19:14:23 M update_job_usage: Memory usage: mem=0b -08/24/2026 19:14:27 M Started, pid = 3051933 -08/24/2026 19:16:15 M update_job_usage: CPU usage: 121.000 secs -08/24/2026 19:16:15 M update_job_usage: 136857549.dbqs01 measured interval cpupercent 108 increased job cpupercent to 108 -08/24/2026 19:16:15 M update_job_usage: Memory usage: mem=2394260kb -08/24/2026 19:18:16 M update_job_usage: CPU usage: 185.000 secs -08/24/2026 19:18:16 M update_job_usage: Memory usage: mem=2773260kb -08/24/2026 19:20:17 M update_job_usage: CPU usage: 185.000 secs -08/24/2026 19:20:17 M update_job_usage: Memory usage: mem=2773260kb -08/24/2026 19:22:19 M update_job_usage: CPU usage: 195.000 secs -08/24/2026 19:22:19 M update_job_usage: Memory usage: mem=3121144kb -08/24/2026 19:24:20 M update_job_usage: CPU usage: 195.000 secs -08/24/2026 19:24:20 M update_job_usage: Memory usage: mem=3121144kb -08/24/2026 19:24:51 M signal job request received -08/24/2026 19:24:51 M signal job with TermJob -08/24/2026 19:24:51 M kill_job -08/24/2026 19:24:51 M task 00000001 terminated -08/24/2026 19:25:04 M no active process for task 00000001 -08/24/2026 19:25:04 M Terminated -08/24/2026 19:25:04 M task 00000001 cput=00:03:18 -08/24/2026 19:25:04 M kill_job -08/24/2026 19:25:04 M nid002876 cput=00:03:15 mem=3121144kb -08/24/2026 19:25:04 M update_job_usage: CPU usage: 195.000 secs -08/24/2026 19:25:04 M update_job_usage: Memory usage: mem=3121144kb - ------------------------------------------------------------------- -To see full PBS log data, run: /sfs/admin/scripts/tracejob.sh 136857549.dbqs01 - -================================================================== -END - DEBUG INFO -================================================================== - -Job 136857549.dbqs01 - Epilogue DEBUG complete. DEBUG Execution time: 6 seconds -Job 136857549.dbqs01 - Epilogue complete. Execution time: 8 seconds -##### Job 136857549.dbqs01 - PBS Job Script: -(Note: Duplicate #PBS entries are a function how PBS interprets and caches the original job script.) - -#!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=04:00:00 -##PBS -l select=1:ncpus=8:mem=128GB -#PBS -l select=1:ncpus=16:mem=256GB -##PBS -l select=1:ncpus=32:mem=256GB -###PBS -l select=1:ncpus=1:mem=8G -#PBS -l place=excl -#PBS -l debug=true - -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - - -# Compute interpolation weights and distance to boundary for a RWPS mesh. -# Files are created in local RWPS/fix directory. - -pip list -v - -cd $RWPSroot/ush/preprocess - -SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" -date="20260730" -cycl="00" -Nprocs=16 - - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - -rrfs_hi=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.hi.nc -rrfs_pr=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.pr.nc -rrfs_ak=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.ak.nc -rrfs_na=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.na.nc -rrfs_conus=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.conus.nc - -out="../../fix" - -rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" -rrfsDst="$out/DistToBndy.$meshname.rrfs" - -#no extrapolation with rrfs forecasts -rm -rf $rrfsIntrp.hi.nc $rrfsDst.hi.nc __pycache__ -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out -rm -rf $rrfsIntrp.pr.nc $rrfsDst.pr.nc __pycache__ -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_pr $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 > GenWhts.rrfs.pr.out -rm -rf $rrfsIntrp.ak.nc $rrfsDst.ak.nc __pycache__ -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_ak $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 > GenWhts.rrfs.ak.out -rm -rf $rrfsIntrp.na.nc $rrfsDst.na.nc __pycache__ -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_na $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 > GenWhts.rrfs.na.out -rm -rf $rrfsIntrp.conus.nc $rrfsDst.conus.nc __pycache__ -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_conus $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out - -nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc -nbmIntrp="$out/InterpolationWeights.$meshname.nbm" -nbmDst="$out/DistToBndy.$meshname.nbm" - -#extrapolate nbm oc wind to all points -rm $nbmIntrp.oc.nc $nbmDst.oc.nc -python ./compute_gridded_to_rwps_interp_weights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out - -nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc -#do not extrapolate for NBM .ak. domain -rm $nbmIntrp.ak.nc $nbmDst.ak.nc -python ./compute_gridded_to_rwps_interp_weights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out - -rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc -rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" -rtofsDst="$out/DistToBndy.$meshname.rtofs" - -#extrapolate rtofs .glo. for full ice coverage -rm $rtofsIntrp.ice.nc $rtofsDst.ice.nc -python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out - - -rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc -#do not extrapolate rtofs .glo. currents -rm $rtofsIntrp.ice.nc $rtofsDst.ice.nc -python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.current.nc $rtofsDst.current.nc -1 > GenWhts.rtofs.current.out - - - -#Old v2 of stofs -stofs_glo="$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" - -mkdir -p STOFSInterpWeights.$meshname -## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs - -## Now run parallel job script - -qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS - -wait - -#combine text file output of parallel jobs -cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt - -# convert output weights to netcdf file -python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 -cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.v2.nc -cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.v2.nc -mv DistToBndy.$meshname.stofs.nc DistToBndy.$meshname.stofs.v2.nc -mv InterpWeights.$meshname.stofs.nc InterpWeights.$meshname.stofs.v2.nc - -rm -rf STOFSInterpWeights.$meshname -rm InterpWeights.$meshname.stofs.txt -rm *.out -rm ESMPy* - - -mkdir -p STOFSInterpWeights.$meshname -#compute stofs weights for current(v3) stofs mesh -stofs_glo="$SID/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc" - -## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs - -## Now run parallel job script - -qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS - -wait - -#combine text file output of parallel jobs -cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt - -# convert output weights to netcdf file -python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 -cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc -cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc - - -rm -rf STOFSInterpWeights.$meshname -rm InterpWeights.$meshname.stofs.txt -rm *.out -rm ESMPy* - - - - -##### End of job script ------------------------------------------------------------------- - From afbbd562c683d621755576ca57a90f3124fba96e Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa Date: Tue, 25 Aug 2026 17:39:31 +0000 Subject: [PATCH 18/39] fixed filename in sorc/prepare_forcing.sh and added minimal readme files for preparing forcing and generating interpolation weights. --- dev/compute_interpolation_weights/README.txt | 25 ++++++++++++++++++++ sorc/prepare_forcing.sh | 2 +- ush/preprocess/README.txt | 6 +++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 dev/compute_interpolation_weights/README.txt create mode 100644 ush/preprocess/README.txt diff --git a/dev/compute_interpolation_weights/README.txt b/dev/compute_interpolation_weights/README.txt new file mode 100644 index 0000000..5692a46 --- /dev/null +++ b/dev/compute_interpolation_weights/README.txt @@ -0,0 +1,25 @@ +Scripts to create interpolation weights and distance to boundary files for interpolating forcing to RWPS mesh. +To run: + +cd RWPS/dev/compute_interpolation_weights/sorc + +dev/compute_interpolation_weights/sorc/compute_interpolation_weights.sh +compute_interpolation_weights.sh oc_1500m_30km + +to generate interpolation files for mesh rwps.oc_1500m_30km.msh. Files will be writen to directory: +RWPS/fix/ + +Interpolation weights are created for: + +nbm oc domain +rrfs hi domain (used for wins) +rrfs pr domain (used for wins) +rrfs ak domain (used for wins) +rrfs na domain (used for wins) +rrfs conus domain (used for wind) +nbm ak domain (used for ice concentration) +rtofs glo domain (used for currents without extrapolation) +rtofs glo domain (used for ice with extrapolation) +stofs domain (used for waterlevel and currents) + +Currently only setup to work on wcoss2. diff --git a/sorc/prepare_forcing.sh b/sorc/prepare_forcing.sh index 27aee42..74297db 100755 --- a/sorc/prepare_forcing.sh +++ b/sorc/prepare_forcing.sh @@ -65,5 +65,5 @@ export meshname="${meshname: 0: -4}" #Retrieve current and process for forecast cycle qsub -V $HOMErwps/ecf/jrwps_prep_current.ecf qsub -V $HOMErwps/ecf/jrwps_prep_ice.ecf -qsub -V $HOMErwps/ecf/jrwps_prep_waterlevel_gws.ecf +qsub -V $HOMErwps/ecf/jrwps_prep_waterlevel.ecf qsub -V $HOMErwps/ecf/jrwps_prep_wind.ecf diff --git a/ush/preprocess/README.txt b/ush/preprocess/README.txt new file mode 100644 index 0000000..0e3763d --- /dev/null +++ b/ush/preprocess/README.txt @@ -0,0 +1,6 @@ +Scripts for preprocessing RWPS forcing for a forecast cycle. To run: + +$cd RWPS/sorc +$../prepare_forcing.sh 20260825 00 oc_1500m_30km + +to prepare forcing for the RWPS forecast. Currently setup to work on wcoss2. From 5f0e7b6eb63a6eb68b3926618b8c6e89a0c9c8f9 Mon Sep 17 00:00:00 2001 From: keston Date: Tue, 25 Aug 2026 14:16:49 -0400 Subject: [PATCH 19/39] removed redundant preprocessing library from dev --- dev/PreProcess/AddErrVarToFile.py | 125 --- dev/PreProcess/AddMeshGeomToFile.py | 73 -- dev/PreProcess/BayesForecastUpdate.py | 111 --- .../ComputeGriddedToRWPSInterpWeights.py | 223 ----- .../ComputeUnstrToRWPSInterpWeights.py | 141 --- .../ComputeUnstrToRWPSInterpWeights.sh | 41 - .../ComputeWindToRWPSInterpWeights.py | 168 ---- dev/PreProcess/ConvertWeights2Netcdf.py | 140 --- .../GenerateInterpolationWeights.jobcard | 98 --- dev/PreProcess/GetAllFocing.jobcard | 62 -- ...GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh | 93 -- dev/PreProcess/GetAllFocing.jobcard.sh | 80 -- dev/PreProcess/GetAllFocing.sh | 62 -- dev/PreProcess/GetCurrents.sh | 10 - dev/PreProcess/GetIce.sh | 10 - dev/PreProcess/GetWaterLevel.sh | 7 - dev/PreProcess/GetWinds.sh | 46 - dev/PreProcess/InterpTime.py | 159 ---- dev/PreProcess/InterpUtilities.py | 800 ------------------ dev/PreProcess/InterpolateWithWeights.py | 262 ------ .../InterpolateWithWeightsAndErrorVariance.py | 336 -------- dev/PreProcess/ProcessCurrents.sh | 104 --- dev/PreProcess/ProcessIce.sh | 113 --- dev/PreProcess/ProcessWaterLevel.sh | 61 -- dev/PreProcess/ProcessWinds.sh | 149 ---- dev/PreProcess/README.md | 1 - dev/PreProcess/SetMeshName | 1 - dev/PreProcess/SpdDir2UVnbm.py | 86 -- dev/PreProcess/nbm/ConvertNBMIcetif2NetCDF.py | 56 -- dev/PreProcess/nbm/GetNBMIce.sh | 36 - dev/PreProcess/nbm/MakeNBMWind.sh | 27 - dev/PreProcess/nbm/MakeNBMWindUV.sh | 55 -- dev/PreProcess/rrfs/MakeEnsRRFSWind.sh | 77 -- dev/PreProcess/rrfs/MakeRRFSWind.sh | 40 - dev/PreProcess/rtofs/GetRTOFS.sh | 34 - dev/PreProcess/rtofs/GetRTOFSIce.sh | 42 - dev/PreProcess/rtofs/GetRTOFSIcefcst.py | 107 --- dev/PreProcess/rtofs/GetRTOFSfcst.py | 96 --- dev/PreProcess/stofs/GetSTOFS.sh | 27 - 39 files changed, 4159 deletions(-) delete mode 100644 dev/PreProcess/AddErrVarToFile.py delete mode 100644 dev/PreProcess/AddMeshGeomToFile.py delete mode 100644 dev/PreProcess/BayesForecastUpdate.py delete mode 100644 dev/PreProcess/ComputeGriddedToRWPSInterpWeights.py delete mode 100644 dev/PreProcess/ComputeUnstrToRWPSInterpWeights.py delete mode 100644 dev/PreProcess/ComputeUnstrToRWPSInterpWeights.sh delete mode 100644 dev/PreProcess/ComputeWindToRWPSInterpWeights.py delete mode 100644 dev/PreProcess/ConvertWeights2Netcdf.py delete mode 100644 dev/PreProcess/GenerateInterpolationWeights.jobcard delete mode 100644 dev/PreProcess/GetAllFocing.jobcard delete mode 100644 dev/PreProcess/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh delete mode 100644 dev/PreProcess/GetAllFocing.jobcard.sh delete mode 100644 dev/PreProcess/GetAllFocing.sh delete mode 100644 dev/PreProcess/GetCurrents.sh delete mode 100644 dev/PreProcess/GetIce.sh delete mode 100644 dev/PreProcess/GetWaterLevel.sh delete mode 100644 dev/PreProcess/GetWinds.sh delete mode 100644 dev/PreProcess/InterpTime.py delete mode 100644 dev/PreProcess/InterpUtilities.py delete mode 100644 dev/PreProcess/InterpolateWithWeights.py delete mode 100644 dev/PreProcess/InterpolateWithWeightsAndErrorVariance.py delete mode 100644 dev/PreProcess/ProcessCurrents.sh delete mode 100644 dev/PreProcess/ProcessIce.sh delete mode 100644 dev/PreProcess/ProcessWaterLevel.sh delete mode 100644 dev/PreProcess/ProcessWinds.sh delete mode 100644 dev/PreProcess/README.md delete mode 100644 dev/PreProcess/SetMeshName delete mode 100644 dev/PreProcess/SpdDir2UVnbm.py delete mode 100644 dev/PreProcess/nbm/ConvertNBMIcetif2NetCDF.py delete mode 100755 dev/PreProcess/nbm/GetNBMIce.sh delete mode 100755 dev/PreProcess/nbm/MakeNBMWind.sh delete mode 100644 dev/PreProcess/nbm/MakeNBMWindUV.sh delete mode 100644 dev/PreProcess/rrfs/MakeEnsRRFSWind.sh delete mode 100755 dev/PreProcess/rrfs/MakeRRFSWind.sh delete mode 100755 dev/PreProcess/rtofs/GetRTOFS.sh delete mode 100755 dev/PreProcess/rtofs/GetRTOFSIce.sh delete mode 100644 dev/PreProcess/rtofs/GetRTOFSIcefcst.py delete mode 100644 dev/PreProcess/rtofs/GetRTOFSfcst.py delete mode 100755 dev/PreProcess/stofs/GetSTOFS.sh diff --git a/dev/PreProcess/AddErrVarToFile.py b/dev/PreProcess/AddErrVarToFile.py deleted file mode 100644 index 8a9f483..0000000 --- a/dev/PreProcess/AddErrVarToFile.py +++ /dev/null @@ -1,125 +0,0 @@ -import numpy as np -import netCDF4 as nc -import sys -import InterpUtilities as iutil -import os -#Add compute and add error variance field to existing file - -UseUnixTime=True -nargin = len(sys.argv) - 1 - -flin=sys.argv[1] -dist2bnd_file=sys.argv[2] - -VarParam0=sys.argv[3] -VarParam=VarParam0.split(":") - -data=nc.Dataset(dist2bnd_file,"r") -dist2bnd=np.array(data["dist2bnd"][:]) -zi=np.array(data["depth"][:]) -nn=len(dist2bnd) -data.close() - - -VariableType="WaterLevel" -if "wind" in flin: - VariableType="Wind" -elif "uv" in flin: - VariableType="Current" -elif "vel" in flin: - VariableType="Current" -elif "ice" in flin: - VariableType="Ice" - - -if VariableType=="Current": - VarShallow=float(VarParam[0]) # variance (m/s)**2 for shallow regions - VarDeep=float(VarParam[1]) # variance (m/s)**2 for deep regions - BatShallow=float(VarParam[2]) # isobath (m) for shallow regions - BatDeep=float(VarParam[3]) # isobath (m) for deep regions - if "stofs" in flin: -# Variance = iutil.VarianceLinearDepth(zi,1.,100.,50.,250.) - Variance = iutil.VarianceLinearDepth (zi, VarShallow, VarDeep, BatShallow, BatDeep) - if "rtofs" in flin: #variance high in shallows and near boundary of coverage -# VarianceDepth = iutil.VarianceLinearDepth(zi,100.,1.,50.,250.) - VarianceDepth = iutil.VarianceLinearDepth(zi,VarShallow,VarDeep,BatShallow,BatDeep) - VarLambda= float(VarParam[4]) # lengthscale (km) for linear transition from bounadry variance(==VarShallow) to interior variance(==VarDeep) - VarianceBnd = iutil.VarianceLinearDistanceToBndy( dist2bnd, VarDeep,VarShallow, VarLambda) - Variance = np.maximum(VarianceDepth, VarianceBnd) - -if VariableType=="WaterLevel": - if "stofs" in flin: -# Variance = 1.+0*zi - VarInterior=float(VarParam[0]) # variance (m)**2 for stofs water level - Variance = VarInterior+0.*zi - -if VariableType=="Wind": - ##LocalFS = [ rwps_pr, rwps_hi, rwps_ak, rwps_conus, rwps_na] # file names - ##VarFS = [ 4. , 4. , 9. , 16. , 25. ] # (m m /s /s) - ##LambdaFS = [ 150. , 200. , 500. , 1000. , 1500. ] # (km) - VarInterior=float(VarParam[0]) # variance (m/s)**2 for interior of forecast - if "nbm" in flin: - Variance = VarInterior + np.zeros(nn) - if "rrfs" in flin: - VarBoundary = float(VarParam[1]) # variance (m/s)**2 for boundary of forecast - VarLambda = float(VarParam[2]) # lengthscale (km) for linear transition from bounadry variance to interior variance - Variance = iutil.VarianceLinearDistanceToBndy( dist2bnd, VarInterior, VarBoundary,VarLambda ) - - -if VariableType=="Ice": - ##LocalFS = [ rwps_pr, rwps_hi, rwps_ak, rwps_conus, rwps_na] # file names - ##VarFS = [ 4. , 4. , 9. , 16. , 25. ] # (m m /s /s) - ##LambdaFS = [ 150. , 200. , 500. , 1000. , 1500. ] # (km) - VarInterior=float(VarParam[0]) # variance (m/s)**2 for interior of forecast - if "rtofs" in flin: - Variance = VarInterior + np.zeros(nn) - if "nbm" in flin: - VarBoundary = float(VarParam[1]) # variance (m/s)**2 for boundary of forecast - VarLambda = float(VarParam[2]) # lengthscale (km) for linear transition from bounadry variance to interior variance - Variance = iutil.VarianceLinearDistanceToBndy( dist2bnd, VarInterior, VarBoundary,VarLambda ) - - - - - - -fltmp=flin+".tmp.nc" -try: - os.remove(fltmp) -except: - print("creating "+fltmp+" temporarily") - -data0 = nc.Dataset(flin,"r") - -with nc.Dataset(fltmp, "w", format="NETCDF4") as ncout: - # 1. Copy Global Attributes - ncout.setncatts({attr: data0.getncattr(attr) for attr in data0.ncattrs()}) - # 2. Copy Dimensions - for name, dimension in data0.dimensions.items(): - # If the dimension is unlimited, pass None to createDimension - dim_len = len(dimension) if not dimension.isunlimited() else None - ncout.createDimension(name, dim_len) - for name, src_var in data0.variables.items(): - dst_var = ncout.createVariable(name, src_var.datatype, src_var.dimensions) - dst_var.setncatts({attr: src_var.getncattr(attr) for attr in src_var.ncattrs()}) - dst_var[:] = src_var[:] - - time=np.asarray(data0["time"][:]) - nt=len(time) - ErrorVariance=np.zeros((nt,nn)) - for k in range(nt): - ErrorVariance[k,:]=Variance[:] - - if not 'node' in ncout.dimensions: - ncadd.createDimension('node' , nn) - if not 'time' in ncout.dimensions: - ncadd.createDimension('time' , nt) - if not 'ErrorVariance' in ncout.variables: - ErrorVariance_var=ncout.createVariable('ErrorVariance', 'f8', ('time','node')) - ErrorVariance_var.long_name = 'forecast error variance' - ErrorVariance_var.units = "(field units)**2" - ErrorVariance_var.standard_name = 'errror variance' - ErrorVariance_var[:]=ErrorVariance - - ncout.close -os.rename(fltmp, flin) diff --git a/dev/PreProcess/AddMeshGeomToFile.py b/dev/PreProcess/AddMeshGeomToFile.py deleted file mode 100644 index e7e7d2a..0000000 --- a/dev/PreProcess/AddMeshGeomToFile.py +++ /dev/null @@ -1,73 +0,0 @@ -import numpy as np -import netCDF4 as nc -import sys -import InterpUtilities as iutil -import os - -UseUnixTime=True -nargin = len(sys.argv) - 1 - -flin=sys.argv[1] -mshfl=sys.argv[2] - -meshslash=mshfl.rfind('/')+1 -meshname=mshfl[meshslash:len(mshfl)-3] - -xi, yi, ei, zi = iutil.loadWW3Mesh(mshfl) -nn=len(xi) -ne=ei.shape[0] - -fltmp=flin+".tmp.nc" -try: - os.remove(fltmp) -except: - print("creating "+fltmp+" temporarily") - -data0 = nc.Dataset(flin,"r") - -with nc.Dataset(fltmp, "w", format="NETCDF4") as ncout: - # 1. Copy Global Attributes - ncout.setncatts({attr: data0.getncattr(attr) for attr in data0.ncattrs()}) - # 2. Copy Dimensions - for name, dimension in data0.dimensions.items(): - # If the dimension is unlimited, pass None to createDimension - dim_len = len(dimension) if not dimension.isunlimited() else None - ncout.createDimension(name, dim_len) - for name, src_var in data0.variables.items(): - dst_var = ncout.createVariable(name, src_var.datatype, src_var.dimensions) - dst_var.setncatts({attr: src_var.getncattr(attr) for attr in src_var.ncattrs()}) - dst_var[:] = src_var[:] - - if not 'node' in data0.dimensions: - ncout.createDimension('node' , nn) - if not 'element' in data0.dimensions: - ncout.createDimension('element' , ne) - if not 'noel' in data0.dimensions: - ncout.createDimension('noel', 3) - ncout.meshname=meshname - ncout.mesh=mshfl - - if not 'longitude' in ncout.variables: - lon_var=ncout.createVariable('longitude', 'f8', ('node',)) - lon_var.units = 'degree_east' - lon_var.long_name = 'longitude' - lon_var.standard_name = 'longitude' - lon_var.axis = 'X' - lon_var[:]=xi[:] - - if not 'latitude' in ncout.variables: - lat_var=ncout.createVariable('latitude', 'f8', ('node',)) - lat_var.units = 'degree_north' - lat_var.long_name = 'latitude' - lat_var.standard_name = 'latitude' - lat_var.axis = 'Y' - lat_var[:]=yi[:] - - if not 'tri' in ncout.variables: - tri_var=ncout.createVariable('tri', 'i4', ('noel','element')) - tri_var.long_name = 'element list' - tri_var.standard_name = 'element list' - tri_var[:]=np.transpose(ei) - - ncout.close -os.rename(fltmp, flin) diff --git a/dev/PreProcess/BayesForecastUpdate.py b/dev/PreProcess/BayesForecastUpdate.py deleted file mode 100644 index 361c283..0000000 --- a/dev/PreProcess/BayesForecastUpdate.py +++ /dev/null @@ -1,111 +0,0 @@ - - -import datetime -import numpy as np -import netCDF4 as nc -import sys -import re -import InterpUtilities as iutil -flin0=sys.argv[1] -flin1=sys.argv[2] -flout=sys.argv[3] - -varname0=sys.argv[4] -varname=varname0.split(":") -nvar=len(varname) - -data0 = nc.Dataset(flin0,"r") -t=np.asarray(data0["time"][:]) -var=np.asarray(data0["ErrorVariance"][:,:]) - -x=np.asarray(data0["longitude"][:]) -y=np.asarray(data0["latitude"][:]) -e=np.asarray(data0["tri"][:,:]) - -nt=len(t) -nn=len(x) -ne=e.shape[1] -noel=e.shape[0] - -nvar=len(varname) -field=np.zeros((nvar,nt,nn)) - -nan=float("nan") -for jv in range(nvar): - tmp=np.asarray(data0[varname[jv]][:,:]) - if "_FillValue" in data0[varname[jv]].ncattrs(): - fill_value0=data0[varname[jv]]._FillValue - tmp[np.where(tmp==fill_value0)]=nan - field[jv,:,:]=tmp - -data1 = nc.Dataset(flin1,"r") -t1=np.asarray(data1["time"][:]) -var1=np.asarray(data1["ErrorVariance"][:,:]) -nt1,nn1=var1.shape -field1=np.zeros((nvar,nt1,nn1)) -for jv in range(nvar): - tmp=np.asarray(data1[varname[jv]][:,:]) - if "_FillValue" in data1[varname[jv]].ncattrs(): - fill_value1=data1[varname[jv]]._FillValue - tmp[np.where(tmp==fill_value1)]=nan - field1[jv,:,:]=tmp - -Inf=float('inf') -um1=field1[0,0,:] -ng1=np.where( um1**2>=0 ) # find points that are valid floats for field1 - -for k in range(nt): - #j=np.where(t[k]==t1) # find common merge point in data - j=np.where(np.abs(t[k]-t1)<120.) # find common merge point in data - j=j[0].tolist() - if len(j)==1: - print("j="+str(j)+" : k="+str(k)) - for jv in range(nvar): - field[jv,k,ng1] = ( field[jv,k,ng1] - + ( var[k,ng1] / ( var[k,ng1] + var1[j,ng1] ) ) - * (field1[jv,j,ng1]-field[jv,k,ng1]) - ) - #update error variance to posterior - var[k,ng1]=var[k,ng1] * ( var1[j,ng1] / ( var[k,ng1]+var1[j,ng1] ) ) - -with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: - ncout.createDimension('level' , 1) - ncout.createDimension('node' , nn) - ncout.createDimension('element' , ne) - ncout.createDimension('time', nt) - ncout.createDimension('noel', 3) - - lon_var=ncout.createVariable('longitude', 'f8', ('node',)) - lon_var.units = 'degree_east' - lon_var.long_name = 'longitude' - lon_var.standard_name = 'longitude' - lon_var.axis = 'X' - lon_var[:]=x[:] - - lat_var=ncout.createVariable('latitude', 'f8', ('node',)) - lat_var.units = 'degree_north' - lat_var.long_name = 'latitude' - lat_var.standard_name = 'latitude' - lat_var.axis = 'Y' - lat_var[:]=y[:] - - time_var=ncout.createVariable('time', 'f4', ('time',)) - iutil.CopyAttributes(data0["time"], time_var) - time_var[:]=t[:] - - tri_var=ncout.createVariable('tri', 'i4', ('noel','element')) - tri_var.long_name = 'element list' - tri_var.standard_name = 'element list' - tri_var[:,:]=e - - #Copy attributes from old file to new - for jv in range(nvar): - f_var=ncout.createVariable(varname[jv], 'f4', ('time','node')) - iutil.CopyAttributes(data0[varname[jv]], f_var) - f_var[:,:]=field[jv,:,:] - - ErrVar0=data0["ErrorVariance"] - ErrVar_var=ncout.createVariable("ErrorVariance", 'f4', ('time','node')) - iutil.CopyAttributes(ErrVar0, ErrVar_var) - ErrVar_var[:,:]=var[:,:] - ncout.close diff --git a/dev/PreProcess/ComputeGriddedToRWPSInterpWeights.py b/dev/PreProcess/ComputeGriddedToRWPSInterpWeights.py deleted file mode 100644 index 93f2a81..0000000 --- a/dev/PreProcess/ComputeGriddedToRWPSInterpWeights.py +++ /dev/null @@ -1,223 +0,0 @@ -# This is a a set of routines that interpolate wind forecasts to an unstructured -# mesh from regular or curvilinear grids (using ESMPY). In addition to interpolation -# field the out file contains a spatially variable error variance estimate based on the -# distance to the forecast boundary. This error variance is used later to update -# dispirate forecasts in a bayesian manner to yield a spatially smooth estimate -# incorporating all forecasts. The understanding is that the more local forecast -# products are of higher accuracy than the coarser broader scale forecasts - -import numpy as np -import os - -import datetime -import netCDF4 as nc -import sys -import re -import InterpUtilities as iutil - -import xarray as xr -import esmpy -import scipy.sparse as sp - -import InterpUtilities as iutil - - -#mshfl="../meshes/RWPS.V0a.small.msh" -#flin="../RWPSWrkFlw/WindBlend/wind.20260507.00X/rrfs.20260507.00.wind10m.ak.nc" - - -# Main program -#AddExtrapolationSupport=False -AddExtrapolationSupport=True - -nargin = len(sys.argv) - 1 - -flin=sys.argv[1] -mshfl=sys.argv[2] -weights_file=sys.argv[3] -dist2bnd_file=sys.argv[4] -# Don't use nearest neighbor interpolation unless 6th positive integer argument present. -# This may be needed on boundary of RWPS mesh if node alignment is outside NBM OC domain -Extrapolate=False -if nargin > 4: - if int(sys.argv[5])>0: - print("using nearest neighbor to extrapolate wind field beyond geometric coverage") - Extrapolate=True - -xi, yi, ei, zi = iutil.loadWW3Mesh(mshfl) -nn=len(xi) -#shift coords to[129,370] -#if np.mean(xi)<0.: - #xi=xi+360. -data = nc.Dataset(flin,"r") -#read spaital dimensions and determine if input mesh is curvilinear or regular -x1=np.asarray(data["longitude"][:]) -y1=np.asarray(data["latitude"][:]) - -# shift to common longitude -#if np.mean(np.mean(x1))<0: -# x1=x1+360. -# rwps :[-231, 11] -# nbm :[129, 370] -# rrfs,pr :[ -75.5000 -62.5087] -# rrfs,hi :[ -161.5250 -153.8690] -# rrfs,ak :[150.2012 266.2886] -# rrfs,na :[67.5721 427.0000] -# rrfs,conus :[ 225.9045 299.0828] -# rtofs,glo :[74.1552,434.0146] -# stofs, glo :[-180,180] -# - -#Shift longitude coordinates to RWPS specs for various files -if "hi" in flin: - x1=x1+360. -if "pr" in flin: - x1=x1+360. - -if "rtofs" in flin: #remove bad geometry edges - x1=x1[1:-1,1:-1] - y1=y1[1:-1,1:-1] - x1=x1-360. - -if (len(x1.shape)==2 and len(y1.shape)==2): - IsCrvLn=True -elif (len(x1.shape)==1 and len(y1.shape)==1): - #represent regular grid as curvilinear grid - IsCrvLn=False - nx=len(x1) - ny=len(y1) - x1 = np.tile(x1,(ny,1)) - y1 = np.tile(y1,(nx,1)).T - IsCrvLn=True -else: - print("input file spatial dimension is not recognized. ending program") - sys.exit() - -####################################### -# === Create weights ===# -####################################### -meshslash=mshfl.rfind('/')+1 -dom=flin.split(".") -dom=dom[len(dom)-2] - -print("interpolation weights will be written to file = "+ weights_file) - -nx=x1.shape[0] -ny=x1.shape[1] -n1=nx*ny - -print("Computing weights and saving to file: "+ weights_file) - -#Use esmpy to construct bilinear interpolation weights -iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - -####################################### -# === read weights and ===# -####################################### -with xr.open_dataset(weights_file) as ds_s: - # Standard sparse storage uses 'row', 'col', and 'S'==weights variables - row = ds_s['row'].values - col = ds_s['col'].values - weights = ds_s['S'].values - Nrows=ds_s.attrs.get('Nrows') - Ncols=ds_s.attrs.get('Ncols') -print("nn = "+str(nn)+": Nrows = "+str(Nrows)) -print("n1 = "+str(n1)+": Ncols = "+str(Ncols)) -if not ((nn==Nrows) and (n1==Ncols)): - print("Wrong matrix weights: number of rows from "+ mshfl +" = "+str(nn)+ - " but number of rows in "+ weights_file +" = "+str(Nrows)+ - ", number of spatial points in "+ flin +" = "+str(n1)+ - " but number of columns in "+ weights_file +" = "+str(Ncols) ) - print(" You probably need to remove file "+ weights_file +" and rerun to generate appropriate weights") -matrix = sp.coo_matrix((weights, (row-1, col-1)), shape=(nn,n1)).tocsr() -print("sparse interpolation matrix") -print(matrix) - -################################################################################## -# START: Extrapolate for nodes not covered by interpolator -################################################################################## -x1v=np.transpose(x1).reshape(n1) # vectorize src nodes, consistant with data to interpolate -y1v=np.transpose(y1).reshape(n1) - -if Extrapolate: - from scipy.interpolate import NearestNDInterpolator - srcp = np.array((x1v,y1v)).T - srcv = 1.+x1v**2 + y1v**2 #dummy input field - #dstv = matrix @ srcv.T - row_sum = matrix.sum(axis=1) - j0=np.where( row_sum==0 ) # destination nodes with no coverage from interpolation matrix - j0=np.array(j0[0]).tolist() - dstp = np.array((xi[j0],yi[j0])).T - interpolator = NearestNDInterpolator(srcp, srcv) - distances, j0src = interpolator.tree.query(dstp) - weightsExtrp=weights.tolist().append([1.0] * len(j0) ) - rowExtrp=np.concatenate( (row, np.array(j0)) ) - colExtrp=np.concatenate( (col, np.array(j0src)) ) - weightsExtrp=np.concatenate( (weights, np.array([1.0] * len(j0))) ) - os.replace(weights_file, "NoExtrap."+weights_file) - iutil.WriteInterpolationWeightsToNetCDF(weights_file,rowExtrp,colExtrp,weightsExtrp,len(xi),len(x1v)) -################################################################################## -# FINISHED: Extrapolate for nodes not covered by interpolator -################################################################################## - -################################################################################## -# START: Extrapolation support for NaN occurances in source field -################################################################################## -if AddExtrapolationSupport: - with nc.Dataset(weights_file, 'r+', format='NETCDF4') as ncadd: - ncadd.createDimension('nn_src' , len(x1v)) - ncadd.createDimension('nn_dst' , len(xi)) - - xsrc_var=ncadd.createVariable('x_src', 'f8', ('nn_src',)) - xsrc_var.long_name = 'interpolation source node longitude' - xsrc_var[:]=x1v[:] - - ysrc_var=ncadd.createVariable('y_src', 'f8', ('nn_src',)) - ysrc_var.long_name = 'interpolation source node latitude' - ysrc_var[:]=y1v[:] - - xdst_var=ncadd.createVariable('x_dst', 'f8', ('nn_dst',)) - xdst_var.long_name = 'interpolation destination node longitude' - xdst_var[:]=xi[:] - - ydst_var=ncadd.createVariable('y_dst', 'f8', ('nn_dst',)) - ydst_var.long_name = 'interpolation destination node latitude' - ydst_var[:]=yi[:] - -################################################################################## -# FINISHED: Extrapolation support for NaN occurances in source field -################################################################################## -with nc.Dataset(weights_file, 'r+', format='NETCDF4') as ncadd: - ncadd.setncattr("SrcFieldType", "gridded") - ncadd.setncattr("InputFile", flin) - ncadd.setncattr("MeshFile", mshfl) - - -################################################################################## -# START: Compute distance to boundary for each node in mesh: -################################################################################## -if Extrapolate: - dist2bnd=np.full(len(xi), np.inf) #all points are inside boundary- No boundary with this type of extrapolation -else: - row_sum = matrix.sum(axis=1) - j0=np.where( row_sum==0 ) # destination nodes with no coverage from interpolation matrix - j0=np.array(j0[0]).tolist() - u0=np.ones(xi.shape) - nan=float("nan") - u0[j0]=nan - dist2bnd=iutil.CalculateDistanceToInterpEnvelope(xi,yi,u0, 1.) - -with nc.Dataset(dist2bnd_file, 'w', format='NETCDF4') as ncout: - ncout.createDimension('node' , nn) - d_var=ncout.createVariable('dist2bnd', 'f4', ('node',)) - d_var.long_name = 'distance to boundary' - d_var.units = 'km' - d_var.standard_name = 'distance to boundary' - d_var[:]=dist2bnd[:] - - z_var=ncout.createVariable('depth', 'f4', ('node',)) - z_var.long_name = 'mesh depth' - z_var.units = 'm' - z_var.standard_name = 'depth' - z_var[:]=zi[:] - diff --git a/dev/PreProcess/ComputeUnstrToRWPSInterpWeights.py b/dev/PreProcess/ComputeUnstrToRWPSInterpWeights.py deleted file mode 100644 index 73b90ee..0000000 --- a/dev/PreProcess/ComputeUnstrToRWPSInterpWeights.py +++ /dev/null @@ -1,141 +0,0 @@ -import numpy as np -import netCDF4 as nc -import sys -from scipy.interpolate import RegularGridInterpolator -#import CalculateSTOFStoRWPSInterpWeightsUtility as mshint -import InterpUtilities as iutil - -import os -nargin = len(sys.argv) - 1 - -flin=sys.argv[1] -mshfl=sys.argv[2] - -meshslash=mshfl.rfind('/')+1 -TmpOutDir="STOFSInterpWeights."+mshfl[meshslash:len(mshfl)-4] - -#if nargin==3 then write the parallel jobcard that carries out the interpolation weight calculation -if nargin ==3 : - Njobs=int(sys.argv[3]) - os.makedirs(TmpOutDir, exist_ok=True) - try: - os.remove(TmpOutDir+"/*.txt") - except: - print("directory "+TmpOutDir+" is alread empty") - iutil.WriteInterpJobscriptPBS("jobcardComputeUnstrToRWPSInterpWeightsPBS",flin,mshfl,Njobs, 1) - iutil.WriteInterpJobscriptSLURM("jobcardComputeUnstrToRWPSInterpWeightsSLURM",flin,mshfl,Njobs, 1) - print("Made parallel jobcards to create interpolation weights with "+str(Njobs)+" processes. Next step:") - print("sbatch jobcardComputeUnstrToRWPSInterpWeightsSLURM") - sys.exit() - -#if nargin==4 then do the part of the mesh for jobID of Njobs -if nargin == 4: - jobID=int(sys.argv[3]) - Njobs=int(sys.argv[4]) - -#if nargin==6 then do the interpolation weight calculation for a specified window -else: - lonW=int(sys.argv[3]) - lonE=int(sys.argv[4]) - latS=int(sys.argv[5]) - latN=int(sys.argv[6]) - -#latS=-40 -#latN=81 - -meshslash=mshfl.rfind('/')+1 -if nargin < 5: - weights_file = TmpOutDir+"/Part.IntrpWghts."+str(jobID)+".txt" -else: - weights_file = TmpOutDir+"/Part.IntrpWghts.W"+str(lonW)+".E"+str(lonE)+".S"+str(latS)+".N"+str(latN)+"."+mshfl[meshslash:len(mshfl)-3]+"txt" - - -print("saving output to:"+weights_file) - -xi, yi, ei, zi = iutil.loadWW3Mesh(mshfl) -nni=len(xi) -j=np.where(xi>90.) # should be empty -xi[j]=xi[j]-360. -#if np.mean(xi)<0.: -# xi=xi+360. - -# divide domain from east west based on job id=0 ... Njobs -# and make North-South window contain the full target domain -# NOTE: for efficiency the sections of the domain should have approximately -# the same number of destination nodes and/or the same number of source elements -# will implement as function shortly - -if nargin < 5: -# balance node load for - xis=np.sort(xi) - mm=round(nni/Njobs) - xil=xis[range(0,nni,mm)] - lonW=xil[jobID] - if jobID==Njobs-1: - lonE=xis[-1]+1. - else: - lonE=xil[jobID+1] - if jobID==0: - lonW=xis[0]-1. - - latS=np.min(yi)-1. - latN=np.max(yi)+1. - -data = nc.Dataset(flin,"r") -#read spaital dimensions and determine if input mesh is curvilinear or regular -x=np.asarray(data["x"][:]) -j=np.where(x>90.) #elements broken here should not effect RWPS interpolation -x[j]=x[j]-360. - -y=np.asarray(data["y"][:]) -e=np.asarray(data["element"][:,:]) - -e0=e-1 -xc = np.mean(x[e0], axis=1) -yc = np.mean(y[e0], axis=1) - -nn=len(x) - -SearchWidth=.5 # search rectangle extended beyond window to this number (degrees lat lon) - -print(e.shape) -ne=e.shape[0] -print(ne) - -xwin=[lonW,lonE] -ywin=[latS,latN] -print("calculating interpolation weights for [W"+str(lonW)+": E "+str(lonE)+": S "+str(latS)+": N "+str(latN)+"]") -#Find target mesh nodes in window -jxUi=np.where( xi <= np.max(xwin))[0].tolist() -jxDi=np.where( xi >= np.min(xwin))[0].tolist() -jyUi=np.where( yi <= np.max(ywin))[0].tolist() -jyDi=np.where( yi >= np.min(ywin))[0].tolist() -ji=list( set(jxUi) & set(jxDi) & set(jyUi) & set(jyDi) ) - -#Find source elements in and near window -SearchWidth=.5 -jxU=np.where( xc < np.max(xwin)+SearchWidth )[0].tolist() -jxD=np.where( xc > np.min(xwin)-SearchWidth )[0].tolist() -jyU=np.where( yc < np.max(ywin)+SearchWidth )[0].tolist() -jyD=np.where( yc > np.min(ywin)-SearchWidth )[0].tolist() -je=list( set(jxU) & set(jxD) & set(jyU) & set(jyD) ) - -weights, nodes, elenum, Dist2EleCenter=iutil.compute_mesh_to_mesh_interp_weights(x, y, e[je,:], xi[ji], yi[ji]) - -#Move back to global index's -for k in range(len(elenum)): - elenum[k]=je[elenum[k]] - ji[k]=ji[k] - -#return to convention numbering from 1 ... -elenum = list(np.array(elenum) + 1) -ji = list(np.array(ji) + 1) -#nodes = np.array(nodes) + 1 # as writen using the correct 1 .. nn node numbering - -# File format -# ["taget node number" "source element number" "source n1" "source n2 "source n3" "distance from target node to element center" "weight1" "weight2" "weight3"] - -Fout=np.vstack((np.array(ji),elenum,nodes[:,0],nodes[:,1],nodes[:,2],Dist2EleCenter,weights[:,0],weights[:,1],weights[:,2])) -np.savetxt(weights_file,Fout.T, fmt='%d %d %d %d %d %.6f %.6f %.6f %.6f') - - diff --git a/dev/PreProcess/ComputeUnstrToRWPSInterpWeights.sh b/dev/PreProcess/ComputeUnstrToRWPSInterpWeights.sh deleted file mode 100644 index 9af1a81..0000000 --- a/dev/PreProcess/ComputeUnstrToRWPSInterpWeights.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=00:05:00 -#PBS -l select=1:ncpus=1:mem=8G -#PBS -l place=excl -#PBS -l debug=true - -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - -pip list -v - -filein=$1 -meshfile=$2 -Nprocs=$3 - -## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python ComputeUnstrToRWPSInterpWeights.py $filein $meshfile $Nprocs - -## Now run parallel job script -## sbatch jobcardComputeUnstrToRWPSInterpWeightsSLURM -qsub jobcardComputeUnstrToRWPSInterpWeightsPBS -wait; - -## Now knit output from parallel job together and write to netcdf format -## The third argument "1" indicates to write (x,y) for destination and source nodes -## to support extrapolation - -python ConvertWeights2Netcdf.py $filein $meshfile 1 - diff --git a/dev/PreProcess/ComputeWindToRWPSInterpWeights.py b/dev/PreProcess/ComputeWindToRWPSInterpWeights.py deleted file mode 100644 index 87c47ac..0000000 --- a/dev/PreProcess/ComputeWindToRWPSInterpWeights.py +++ /dev/null @@ -1,168 +0,0 @@ -# This is a a set of routines that interpolate wind forecasts to an unstructured -# mesh from regular or curvilinear grids (using ESMPY). In addition to interpolation -# field the out file contains a spatially variable error variance estimate based on the -# distance to the forecast boundary. This error variance is used later to update -# dispirate forecasts in a bayesian manner to yield a spatially smooth estimate -# incorporating all forecasts. The understanding is that the more local forecast -# products are of higher accuracy than the coarser broader scale forecasts - -import numpy as np -import os - -import datetime -import netCDF4 as nc -import sys -import re -import InterpUtilities as iutil - -import xarray as xr -import esmpy -import scipy.sparse as sp - -import InterpUtilities as iutil - - -#mshfl="../meshes/RWPS.V0a.small.msh" -#flin="../RWPSWrkFlw/WindBlend/wind.20260507.00X/rrfs.20260507.00.wind10m.ak.nc" - - -# Main program - -nargin = len(sys.argv) - 1 - -flin=sys.argv[1] -mshfl=sys.argv[2] - -# Don't use nearest neighbor interpolation unless 6th positive integer argument present. -# This may be needed on boundary of RWPS mesh if node alignment is outside NBM OC domain -Extrapolate=False -if nargin > 2: - if int(sys.argv[3])>0: - print("using nearest neighbor to extrapolate wind field beyond geometric coverage") - Extrapolate=True - -xi, yi, ei, zi = iutil.loadWW3Mesh(mshfl) -nn=len(xi) - -if np.mean(xi)<0: - xi=xi+360. - -data = nc.Dataset(flin,"r") -#read spaital dimensions and determine if input mesh is curvilinear or regular -x1=np.asarray(data["longitude"][:]) -y1=np.asarray(data["latitude"][:]) -if (len(x1.shape)==2 and len(y1.shape)==2): - IsCrvLn=True -elif (len(x1.shape)==1 and len(y1.shape)==1): - IsCrvLn=False -else: - print("input file spatial dimension is not right. ending program") - sys.exit() -# shift to common longitude -if np.mean(np.mean(x1))<0: - x1=x1+360. - -####################################### -# === Create weights ===# -####################################### - -meshslash=mshfl.rfind('/')+1 -dom=flin.split(".") -dom=dom[len(dom)-2] -weights_file = "InterpolationWeights."+mshfl[meshslash:len(mshfl)-3]+dom+".nc" -print("interpolation weights will be written to file = "+ weights_file) - -if IsCrvLn: - nx=x1.shape[0] - ny=x1.shape[1] -else: - nx=len(x1) - ny=len(y1) -n1=nx*ny - -print("Computing weights and saving to file: "+ weights_file) - -if not IsCrvLn: - x1 = np.tile(x1,(ny,1)) - y1 = np.tile(y1,(nx,1)).T -#Use esmpy to construct bilinear interpolation weights -iutil.CurvilinearGridCreateInterpWeights(xi, yi, x1, y1, weights_file) - -####################################### -# === read weights and ===# -####################################### -with xr.open_dataset(weights_file) as ds_s: - # Standard sparse storage uses 'row', 'col', and 'S'==weights variables - row = ds_s['row'].values - col = ds_s['col'].values - weights = ds_s['S'].values - Nrows=ds_s.attrs.get('Nrows') - Ncols=ds_s.attrs.get('Ncols') -print("nn = "+str(nn)+": Nrows = "+str(Nrows)) -print("n1 = "+str(n1)+": Ncols = "+str(Ncols)) -if not ((nn==Nrows) and (n1==Ncols)): - print("Wrong matrix weights: number of rows from "+ mshfl +" = "+str(nn)+ - " but number of rows in "+ weights_file +" = "+str(Nrows)+ - ", number of spatial points in "+ flin +" = "+str(n1)+ - " but number of columns in "+ weights_file +" = "+str(Ncols) ) - print(" You probably need to remove file "+ weights_file +" and rerun to generate appropriate weights") -matrix = sp.coo_matrix((weights, (row-1, col-1)), shape=(nn,n1)).tocsr() -print("sparse interpolation matrix") -print(matrix) - -################################################################################## -# START: Extrapolate for nodes not covered by interpolator -################################################################################## -if Extrapolate: - from scipy.interpolate import NearestNDInterpolator - if not IsCrvLn: - x1 = np.tile(x1,(ny,1)) - y1 = np.tile(y1,(nx,1)).T - x1v=np.transpose(x1).reshape(n1) # vectorize src nodes, consistant with Up, Vp - y1v=np.transpose(y1).reshape(n1) - srcp = np.array((x1v,y1v)).T - srcv = 1.+x1v**2 + y1v**2 #dummy input field - #dstv = matrix @ srcv.T - row_sum = matrix.sum(axis=1) - j0=np.where( row_sum==0 ) # destination nodes with no coverage from interpolation matrix - j0=np.array(j0[0]).tolist() - dstp = np.array((xi[j0],yi[j0])).T - interpolator = NearestNDInterpolator(srcp, srcv) - distances, j0src = interpolator.tree.query(dstp) - weightsExtrp=weights.tolist().append([1.0] * len(j0) ) - rowExtrp=np.concatenate( (row, np.array(j0)) ) - colExtrp=np.concatenate( (col, np.array(j0src)) ) - weightsExtrp=np.concatenate( (weights, np.array([1.0] * len(j0))) ) - - os.replace(weights_file, "NoExtrap."+weights_file) - iutil.WriteInterpolationWeightsToNetCDF(weights_file,rowExtrp,colExtrp,weightsExtrp,len(xi),len(x1v)) - -################################################################################## -# FINISHED: Extrapolate for nodes not covered by interpolator -################################################################################## - -################################################################################## -# START: Compute distance to boundary for each node in mesh: -################################################################################## -#dist2bnd_file = "DistToBndy."+mshfl[meshslash:len(mshfl)-3]+dom+".txt" -dist2bnd_file = "DistToBndy."+mshfl[meshslash:len(mshfl)-3]+dom+".nc" - -if Extrapolate: - dist2bnd=np.full(len(xi), np.inf) #all points are inside boundary- No boundary with this type of extrapolation -else: - row_sum = matrix.sum(axis=1) - j0=np.where( row_sum==0 ) # destination nodes with no coverage from interpolation matrix - j0=np.array(j0[0]).tolist() - u0=np.ones(xi.shape) - nan=float("nan") - u0[j0]=nan - dist2bnd=iutil.CalculateDistanceToInterpEnvelope(xi,yi,u0, 1.) - -with nc.Dataset(dist2bnd_file, 'w', format='NETCDF4') as ncout: - ncout.createDimension('node' , nn) - d_var=ncout.createVariable('dist2bnd', 'f4', ('node',)) - d_var.long_name = 'distance to boundary' - d_var.units = 'km' - d_var.standard_name = 'distance to boundary' - d_var[:]=dist2bnd[:] - diff --git a/dev/PreProcess/ConvertWeights2Netcdf.py b/dev/PreProcess/ConvertWeights2Netcdf.py deleted file mode 100644 index 0d90d5b..0000000 --- a/dev/PreProcess/ConvertWeights2Netcdf.py +++ /dev/null @@ -1,140 +0,0 @@ -import numpy as np -import netCDF4 as nc -import sys -#import GeoComputeMeshToMeshInterpWeights as mshint -import InterpUtilities as iutil -import scipy.sparse as sp - -nargin = len(sys.argv) - 1 - -flin=sys.argv[1] -mshfl=sys.argv[2] -meshslash=mshfl.rfind('/')+1 - -#AddExtrapolationSupport=False -AddExtrapolationSupport=True - -#TextWeightFl="InterpWeights."+mshfl[meshslash:len(mshfl)-4]+".stofs.txt" - -TextWeightFl=sys.argv[3] - -##flout = "InterpolationWeights."+mshfl[meshslash:len(mshfl)-4]+".stofs.nc" - -flout=TextWeightFl[0:len(TextWeightFl)-4]+".nc" - -xi, yi, ei, zi = iutil.loadWW3Mesh(mshfl) -nn_dst=len(xi) -data = nc.Dataset(flin,"r") -#read spaital dimensions and determine if input mesh is curvilinear or regular -x=np.asarray(data["x"][:]) -#convert to RWPS coordinates -jEast=np.where(x>90) -x[jEast]=x[jEast]=360. - -nn_src=len(x) - -#Read in weights from cat of text output(rows are not in order) -F=np.loadtxt(TextWeightFl) - -node_dst=F[:,0] # row number (destination node) -ele_num_src=F[:,1] # Source element number (not used) -node_src=F[:,2:5] # Source node -DistToCenterKM=F[:,5] # distance of destination node from source element center (not used) -weights=F[:,6:9] # interpolation weights from source nodes to destination node - -node_dst=node_dst.astype(int) -node_src=node_src.astype(int) -ele_num_src=ele_num_src.astype(int) - -nnz=F.shape[0] -n_s=3*nnz -row=np.zeros(n_s,dtype=int) -col=np.zeros(n_s,dtype=int) -val=np.zeros(n_s) - -n=0 -for k in range(nnz): - for j in range(3): - row[n]=node_dst[k] - col[n]=node_src[k,j] - val[n]=weights[k,j] - n=n+1 -print("n="+str(n)) -print("n_s="+str(n_s)) -n_s=n - -with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: - ncout.createDimension('n_s' , n_s) - ncout.setncattr("Nrows", nn_dst) - ncout.setncattr("Ncols", nn_src) - ncout.setncattr("SrcFieldType", "unstructured") - - r_var=ncout.createVariable('row', 'i4', ('n_s',)) - r_var.long_name = 'row index' - r_var[:]=row[:] - - c_var=ncout.createVariable('col', 'i4', ('n_s',)) - c_var.long_name = 'column index' - c_var[:]=col[:] - - s_var=ncout.createVariable('S', 'f8', ('n_s',)) - s_var.long_name = 'matrix value' - s_var[:]=val[:] - -#Consider adding (x,y) destination and (x,y) for source. This is usefull for extrapolation - if AddExtrapolationSupport: - x=np.asarray(data["x"][:]) - y=np.asarray(data["y"][:]) - ncout.createDimension('nn_src' , nn_src) - ncout.createDimension('nn_dst' , nn_dst) - - xsrc_var=ncout.createVariable('x_src', 'f8', ('nn_src',)) - xsrc_var.long_name = 'interpolation source node longitude' - xsrc_var[:]=x[:] - - ysrc_var=ncout.createVariable('y_src', 'f8', ('nn_src',)) - ysrc_var.long_name = 'interpolation source node latitude' - ysrc_var[:]=y[:] - - xdst_var=ncout.createVariable('x_dst', 'f8', ('nn_dst',)) - xdst_var.long_name = 'interpolation destination node longitude' - xdst_var[:]=xi[:] - - ydst_var=ncout.createVariable('y_dst', 'f8', ('nn_dst',)) - ydst_var.long_name = 'interpolation destination node latitude' - ydst_var[:]=yi[:] - - zdst_var=ncout.createVariable('depth_dst', 'f8', ('nn_dst',)) - zdst_var.long_name = 'interpolation destination node latitude' - zdst_var[:]=zi[:] - -#Extrapolate=False -Extrapolate=sys.argv[4] - -if Extrapolate: - dist2bnd=np.full(len(xi), np.inf) #all points are inside boundary- No boundary with this type of extrapolation -else: - matrix = sp.coo_matrix((weights, (row-1, col-1)), shape=(nn_src,nn_dst)).tocsr() - row_sum = matrix.sum(axis=1) - j0=np.where( row_sum==0 ) # destination nodes with no coverage from interpolation matrix - j0=np.array(j0[0]).tolist() - u0=np.ones(xi.shape) - nan=float("nan") - u0[j0]=nan - dist2bnd=iutil.CalculateDistanceToInterpEnvelope(xi,yi,u0, 1.) - -dist2bnd_file = "DistToBndy."+mshfl[meshslash:len(mshfl)-4]+".stofs.nc" -with nc.Dataset(dist2bnd_file, 'w', format='NETCDF4') as ncout: - ncout.createDimension('node' , nn_dst) - d_var=ncout.createVariable('dist2bnd', 'f4', ('node',)) - d_var.long_name = 'distance to boundary' - d_var.units = 'km' - d_var.standard_name = 'distance to boundary' - d_var[:]=dist2bnd[:] - - z_var=ncout.createVariable('depth', 'f4', ('node',)) - z_var.long_name = 'mesh depth' - z_var.units = 'm' - z_var.standard_name = 'depth' - z_var[:]=zi[:] - diff --git a/dev/PreProcess/GenerateInterpolationWeights.jobcard b/dev/PreProcess/GenerateInterpolationWeights.jobcard deleted file mode 100644 index 4e1a876..0000000 --- a/dev/PreProcess/GenerateInterpolationWeights.jobcard +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=04:00:00 -##PBS -l select=1:ncpus=8:mem=128GB -#PBS -l select=1:ncpus=16:mem=256GB -###PBS -l select=1:ncpus=1:mem=8G -#PBS -l place=excl -#PBS -l debug=true - -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - -pip list -v - -cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/dev/PreProcess - -source SetMeshName - -SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" -date="20260730" -cycl="00" -Nprocs=16 - - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - -rrfs_hi=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.hi.nc -rrfs_pr=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.pr.nc -rrfs_ak=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.ak.nc -rrfs_na=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.na.nc -rrfs_conus=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.conus.nc - -out="../../fix" - -rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" -rrfsDst="$out/DistToBndy.$meshname.rrfs" -#no extrapolation with rrfs forecasts -python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out -python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_hi $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 > GenWhts.rrfs.pr.out -python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_hi $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 > GenWhts.rrfs.ak.out -python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_hi $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 > GenWhts.rrfs.na.out -python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_hi $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out - -nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc -nbmIntrp="$out/InterpolationWeights.$meshname.nbm" -nbmDst="$out/DistToBndy.$meshname.nbm" -#extrapolate nbm oc wind to all points -python ./ComputeGriddedToRWPSInterpWeights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out - -nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc -#do not extrapolate for NBM .ak. domain -python ./ComputeGriddedToRWPSInterpWeights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out - - -rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc -rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" -rtofsDst="$out/DistToBndy.$meshname.rtofs" - -#extrapolate rtofs .glo. for full ice coverage -python ./ComputeGriddedToRWPSInterpWeights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out - -rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc -#do not extrapolate rtofs .glo. currents -python ./ComputeGriddedToRWPSInterpWeights.py $rtofs_cur $mesh $rtofsIntrp.currents.nc $rtofsDst.currents.nc -1 > GenWhts.rtofs.currents.out - - -cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/dev/PreProcess - -stofs_glo=$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" - -## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python ComputeUnstrToRWPSInterpWeights.py $stofs_glo $mesh $Nprocs - -## Now run parallel job script - -qsub -W block=true jobcardComputeUnstrToRWPSInterpWeightsPBS - -wait - -#combine text file output of parallel jobs -cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt - -# convert output weights to netcdf file -python ConvertWeights2Netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 -cp InterpWeights.$meshname.stofs.txt $out/ -cp DistToBndy.$meshname.stofs.txt $out/ diff --git a/dev/PreProcess/GetAllFocing.jobcard b/dev/PreProcess/GetAllFocing.jobcard deleted file mode 100644 index caadd45..0000000 --- a/dev/PreProcess/GetAllFocing.jobcard +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/sh -#PBS -q dev -#PBS -l walltime=00:59:00 -#PBS -A GLWU-DEV -#PBS -N ww3_regtest_13 -#PBS -j oe -#PBS -l select=1:ncpus=4:mem=64GB -#PBS -o matrix13.out - -cd /lfs/h2/emc/couple/noscrub/keston.smith/RWPSInterpolationUtilities - -# Setup and load modules -module load PrgEnv-intel/8.1.0 -module load craype/2.7.8 -module load intel/19.1.3.304 -module load cfp/2.0.4 -module load prod_util/2.0.8 -module load prod_envir/2.0.5 - -# 0.a Set necessary variables - -# This script retrieves and processes forcing for a forecast period -#date=$1 -#cycl=$2 -#mesh=$3 - -date=20260709 -cycl=12 -mesh=../meshes/RWPS.V0a.small.msh - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - -echo "retrieving and processing RWPS forcing for $date z$cycl for WW3 mesh $mesh" - -rm FetchWinds.out ProcWinds.out FetchCurrents.out ProcCurrents.out FetchWaterLevel.out ProcWaterLevel.out - -( - sh GetWaterLevel.sh $date $cycl > FetchWaterLevel.out - sh ProcessWaterLevel.sh $date $cycl $mesh > ProcWaterLevel.out -)& -( - sh GetWinds.sh $date $cycl > FetchWinds.out - sh ProcessWinds.sh $date $cycl $mesh > ProcWinds.out -)& -( - sh GetCurrents.sh $date $cycl > FetchCurrents.out - sh ProcessCurrents.sh $date $cycl $mesh > ProcCurrents.out -)& - -wait -echo "Finished preprocessing for $date z$cycl for $mesh" - -cp $meshname.$date.$cycl.vel.stofsxrtofs.nc $meshname.$date.$cycl.current.nc -echo "current forcing file: $meshname.$date.$cycl.current.nc" - -cp $meshname.$date.$cycl.cwl.stofs.nc $meshname.$date.$cycl.waterlevel.nc -echo "water level forcing file: $meshname.$date.$cycl.watterlevel.nc" - -cp rwps_winds.$meshname.$date.$cycl/rwps.est.$meshname.$date.$cycl.wind10m.nc $meshname.$date.$cycl.wind.nc -echo "wind forcing file: $meshname.$date.$cycl.wind.nc" - diff --git a/dev/PreProcess/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh b/dev/PreProcess/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh deleted file mode 100644 index 8982c68..0000000 --- a/dev/PreProcess/GetAllFocing.jobcard.RTOFSICEWORKAROUND.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/sh - -date=$1 -cycl=$2 -mesh=$3 - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - -jobcard="PreProcess.RWPS.$1.$2.jobcard" -outputfile="PreProcess.RWPS.$1.$2.out" - -rm $jobcard - -echo "#!/bin/sh" > $jobcard -echo "#PBS -q dev" >> $jobcard -echo "#PBS -l walltime=00:59:00" >> $jobcard -echo "#PBS -A GLWU-DEV" >> $jobcard -echo "#PBS -N RWPS.PreProc" >> $jobcard -echo "#PBS -j oe" >> $jobcard -echo "#PBS -l select=1:ncpus=4:mem=64GB" >> $jobcard -echo "#PBS -o RWPS.PreProc.out" >> $jobcard -echo " " >> $jobcard -echo "cd /lfs/h2/emc/couple/noscrub/keston.smith/RWPSInterpolationUtilities" >> $jobcard -echo " " >> $jobcard - -# Setup and load modules -echo "module load PrgEnv-intel/8.1.0" >> $jobcard -echo "module load craype/2.7.8" >> $jobcard -echo "module load intel/19.1.3.304" >> $jobcard -echo "module load cfp/2.0.4" >> $jobcard -echo "module load prod_util/2.0.8" >> $jobcard -echo "module load prod_envir/2.0.5" >> $jobcard -echo " " >> $jobcard - -echo "date=$1" >> $jobcard -echo "cycl=$2" >> $jobcard -echo "mesh=$3" >> $jobcard -echo " " >> $jobcard - -echo "meshname=$meshname" >> $jobcard -echo " " >> $jobcard - -echo "rm FetchWinds.out ProcWinds.out FetchCurrents.out ProcCurrents.out FetchWaterLevel.out ProcWaterLevel.out" >> $jobcard -echo " " >> $jobcard - - -# At present RTOFS ice files are missing time information (MT==0) so ProcessIce.sh will fail at the time interpolation step -#echo "(" >> $jobcard -#echo " sh GetIce.sh $date $cycl > FetchIce.out" >> $jobcard -#echo " sh ProcessIce.sh $date $cycl $mesh > ProcIce.out" >> $jobcard -#echo ")&" >> $jobcard -#echo " " >> $jobcard - - - - -echo "(" >> $jobcard -echo " sh GetWaterLevel.sh $date $cycl > FetchWaterLevel.out" >> $jobcard -echo " sh ProcessWaterLevel.sh $date $cycl $mesh > ProcWaterLevel.out" >> $jobcard -echo ")&" >> $jobcard -echo " " >> $jobcard - -echo "(" >> $jobcard -echo " sh GetWinds.sh $date $cycl > FetchWinds.out" >> $jobcard -echo " sh ProcessWinds.sh $date $cycl $mesh > ProcWinds.out" >> $jobcard -echo ")&" >> $jobcard -echo " " >> $jobcard - -echo "(" >> $jobcard -echo " sh GetCurrents.sh $date $cycl > FetchCurrents.out" >> $jobcard -echo " sh ProcessCurrents.sh $date $cycl $mesh > ProcCurrents.out" >> $jobcard - -#ProcessIce Needs Time Variables from rtofs currents files -echo " sh GetIce.sh $date $cycl > FetchIce.out" >> $jobcard -echo " sh ProcessIce.sh $date $cycl $mesh > ProcIce.out" >> $jobcard -echo ")&" >> $jobcard -echo " " >> $jobcard -echo " " >> $jobcard - -echo "wait" >> $jobcard -echo " " >> $jobcard -echo "cp $meshname.$date.$cycl.cwl.stofs.nc $meshname.$date.$cycl.waterlevel.nc" >> $jobcard -echo "cp $meshname.$date.$cycl.vel.stofsxrtofs.nc $meshname.$date.$cycl.current.nc" >> $jobcard -echo "cp rwps_winds.$meshname.$date.$cycl/rwps.est.$meshname.$date.$cycl.wind10m.nc $meshname.$date.$cycl.wind.nc" >> $jobcard -echo "cp $meshname.$date.$cycl.ice.rtofsxnbm.nc $meshname.$date.$cycl.ice.nc" >> $jobcard -echo " " >> $jobcard - -##Below is only needed because of missing rtofs ice time -## remove and move this to GetRTOFS.sh and GetRTOFSIce.sh -## echo "rm -rf tmp.rtofs*.$date" >> $jobcard - -qsub $jobcard > $outputfile diff --git a/dev/PreProcess/GetAllFocing.jobcard.sh b/dev/PreProcess/GetAllFocing.jobcard.sh deleted file mode 100644 index f2786b0..0000000 --- a/dev/PreProcess/GetAllFocing.jobcard.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh - -date=$1 -cycl=$2 -mesh=$3 - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - -jobcard="PreProcess.RWPS.$1.$2.jobcard" -outputfile="PreProcess.RWPS.$1.$2.out" - -rm $jobcard - -echo "#!/bin/sh" > $jobcard -echo "#PBS -q dev" >> $jobcard -echo "#PBS -l walltime=00:59:00" >> $jobcard -echo "#PBS -A GLWU-DEV" >> $jobcard -echo "#PBS -N RWPS.PreProc" >> $jobcard -echo "#PBS -j oe" >> $jobcard -echo "#PBS -l select=1:ncpus=4:mem=64GB" >> $jobcard -echo "#PBS -o RWPS.PreProc.out" >> $jobcard -echo " " >> $jobcard -echo "cd /lfs/h2/emc/couple/noscrub/keston.smith/RWPSInterpolationUtilities" >> $jobcard -echo " " >> $jobcard - -# Setup and load modules -echo "module load PrgEnv-intel/8.1.0" >> $jobcard -echo "module load craype/2.7.8" >> $jobcard -echo "module load intel/19.1.3.304" >> $jobcard -echo "module load cfp/2.0.4" >> $jobcard -echo "module load prod_util/2.0.8" >> $jobcard -echo "module load prod_envir/2.0.5" >> $jobcard -echo " " >> $jobcard - -echo "date=$1" >> $jobcard -echo "cycl=$2" >> $jobcard -echo "mesh=$3" >> $jobcard -echo " " >> $jobcard - -echo "meshname=$meshname" >> $jobcard -echo " " >> $jobcard - -echo "rm FetchWinds.out ProcWinds.out FetchCurrents.out ProcCurrents.out FetchWaterLevel.out ProcWaterLevel.out" >> $jobcard -echo " " >> $jobcard - - -# At present RTOFS ice files are missing time information (MT==0) so ProcessIce.sh will fail at the time interpolation step -echo "(" >> $jobcard -echo " sh GetIce.sh $date $cycl > FetchIce.out" >> $jobcard -echo " sh ProcessIce.sh $date $cycl $mesh > ProcIce.out" >> $jobcard -echo ")&" >> $jobcard -echo " " >> $jobcard - - -echo "(" >> $jobcard -echo " sh GetWaterLevel.sh $date $cycl > FetchWaterLevel.out" >> $jobcard -echo " sh ProcessWaterLevel.sh $date $cycl $mesh > ProcWaterLevel.out" >> $jobcard -echo ")&" >> $jobcard -echo " " >> $jobcard - -echo "(" >> $jobcard -echo " sh GetWinds.sh $date $cycl > FetchWinds.out" >> $jobcard -echo " sh ProcessWinds.sh $date $cycl $mesh > ProcWinds.out" >> $jobcard -echo ")&" >> $jobcard -echo " " >> $jobcard - -echo "(" >> $jobcard -echo " sh GetCurrents.sh $date $cycl > FetchCurrents.out" >> $jobcard -echo " sh ProcessCurrents.sh $date $cycl $mesh > ProcCurrents.out" >> $jobcard -echo ")&" >> $jobcard -echo " " >> $jobcard - -echo "wait" >> $jobcard -echo " " >> $jobcard -echo "cp $meshname.$date.$cycl.cwl.stofs.nc $meshname.$date.$cycl.waterlevel.nc" >> $jobcard -echo "cp $meshname.$date.$cycl.vel.stofsxrtofs.nc $meshname.$date.$cycl.current.nc" >> $jobcard -echo "cp rwps_winds.$meshname.$date.$cycl/rwps.est.$meshname.$date.$cycl.wind10m.nc $meshname.$date.$cycl.wind.nc" >> $jobcard - -qsub $jobcard > $outputfile diff --git a/dev/PreProcess/GetAllFocing.sh b/dev/PreProcess/GetAllFocing.sh deleted file mode 100644 index 0ff36d7..0000000 --- a/dev/PreProcess/GetAllFocing.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -# Setup and load modules -module load PrgEnv-intel/8.1.0 -module load craype/2.7.8 -module load intel/19.1.3.304 -module load cfp/2.0.4 -module load prod_util/2.0.8 -module load prod_envir/2.0.5 - -# 0.a Set necessary variables - -# This script retrieves and processes forcing for a forecast period -date=$1 -cycl=$2 -mesh=$3 - - -##date=20260707 -##cycl=00 -##mesh="../meshes/RWPS.V0a.small.msh" - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - -echo "retrieving and processing RWPS forcing for $date z$cycl for WW3 mesh $mesh" - -rm FetchWinds.out ProcWinds.out FetchCurrents.out ProcCurrents.out FetchWaterLevel.out ProcWaterLevel.out - -( - echo "retrieving nbm and rrfs winds for $date z$cycl" - sh GetWinds.sh $date $cycl > FetchWinds.out - echo "processing winds for $date z$cycl for $mesh" - sh ProcessWinds.sh $date $cycl $mesh > ProcWinds.out -)& - -( - echo "retrieving rtofs and stofs currents for $date z$cycl" - sh GetCurrents.sh $date $cycl > FetchCurrents.out - echo "processing currents for $date z$cycl for $mesh" - sh ProcessCurrents.sh $date $cycl $mesh > ProcCurrents.out -)& - -( - echo "retrieving stofs water level for $date z$cycl" - sh GetWaterLevel.sh $date $cycl > FetchWaterLevel.out - echo "processing water level for $date z$cycl for $mesh" - sh ProcessWaterLevel.sh $date $cycl $mesh > ProcWaterLevel.out -)& - -wait -echo "Finished preprocessing for $date z$cycl for $mesh" - -cp $meshname.$date.$cycl.vel.stofsxrtofs.nc $meshname.$date.$cycl.current.nc -echo "current forcing file: $meshname.$date.$cycl.current.nc" - -cp $meshname.$date.$cycl.cwl.stofs.nc $meshname.$date.$cycl.waterlevel.nc -echo "water level forcing file: $meshname.$date.$cycl.watterlevel.nc" - -cp rwps_winds.$meshname.$date.$cycl/rwps.est.$meshname.$date.$cycl.wind10m.nc $meshname.$date.$cycl.wind.nc -echo "wind forcing file: $meshname.$date.$cycl.wind.nc" - diff --git a/dev/PreProcess/GetCurrents.sh b/dev/PreProcess/GetCurrents.sh deleted file mode 100644 index b93ec1a..0000000 --- a/dev/PreProcess/GetCurrents.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -# This script retrieves rtofs and stofs as netcdf files - - -date=$1 -cycl=$2 -rtofs/GetRTOFS.sh $date & -stofs/GetSTOFS.sh $date $cycl current& -wait; diff --git a/dev/PreProcess/GetIce.sh b/dev/PreProcess/GetIce.sh deleted file mode 100644 index 91678d6..0000000 --- a/dev/PreProcess/GetIce.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -# This script retrieves rtofs and stofs as netcdf files - - -date=$1 -cycl=$2 -rtofs/GetRTOFSIce.sh $date $cycl & -nbm/GetNBMIce.sh $date $cycl & -wait; diff --git a/dev/PreProcess/GetWaterLevel.sh b/dev/PreProcess/GetWaterLevel.sh deleted file mode 100644 index cfa1ac4..0000000 --- a/dev/PreProcess/GetWaterLevel.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -## This script retrieves stofs water level as netcdf file - -date=$1 -cycl=$2 -stofs/GetSTOFS.sh $date $cycl waterlevel diff --git a/dev/PreProcess/GetWinds.sh b/dev/PreProcess/GetWinds.sh deleted file mode 100644 index 46d00a3..0000000 --- a/dev/PreProcess/GetWinds.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -# This script retrieves rrfs and nbm winbds and exports as -# netcdf files - -echo "retrieving winds from rrfs and nbm for rwps wind" -( - echo "sh nbm/MakeNBMWind.sh $1 $2 oc > nbm.oc.out" - nbm/MakeNBMWind.sh $1 $2 oc > nbm.oc.out - echo "retrieved winds from nbm oc domain" - echo "Not retrieving other nbm domain winds" -)& - -( - echo "sh rrfs/MakeRRFSWind.sh $1 $2 na > rrfs.na.out" - rrfs/MakeRRFSWind.sh $1 $2 na > rrfs.na.out - echo "retrieved winds from rrfs na domain" -)& - -( - echo "sh rrfs/MakeRRFSWind.sh $1 $2 ak > rrfs.ak.out" - rrfs/MakeRRFSWind.sh $1 $2 ak > rrfs.ak.out - echo "retrieved winds from rrfs ak domain" -)& - -( - echo "sh rrfs/MakeRRFSWind.sh $1 $2 pr > rrfs.pr.out" - rrfs/MakeRRFSWind.sh $1 $2 pr > rrfs.pr.out - echo "retrieved winds from rrfs pr domain" -)& - -( - echo "sh rrfs/MakeRRFSWind.sh $1 $2 hi > rrfs.hi.out" - rrfs/MakeRRFSWind.sh $1 $2 hi > rrfs.hi.out - echo "retrieved winds from rrfs hi domain" -)& - -( - echo "sh rrfs/MakeRRFSWind.sh $1 $2 conus > rrfs.conus.out" - rrfs/MakeRRFSWind.sh $1 $2 conus > rrfs.conus.out - echo "retrieved winds from rrfs conus domain" -)& -wait - -echo "finished retrieving winds from rrfs and nbm for rwps wind" - diff --git a/dev/PreProcess/InterpTime.py b/dev/PreProcess/InterpTime.py deleted file mode 100644 index d438977..0000000 --- a/dev/PreProcess/InterpTime.py +++ /dev/null @@ -1,159 +0,0 @@ -import os -import argparse -import numpy as np -import netCDF4 as nc -import sys -import math - -from scipy.interpolate import interp1d - -nargin = len(sys.argv) - 1 - -flin=sys.argv[1] -flinNewTimes=sys.argv[2] -flout=sys.argv[3] - -varname0=sys.argv[4] -varname=varname0.split(":") -nvar=len(varname) - -# If InterpSecondFile is True interpolate the values from the second file are interpolated to the common time points -# and extrapolate (via persistance) for all times beyond the range of time from the second file - -InterpSecondFile=False -if nargin>4: - InterpSecondFile=eval(sys.argv[5]) - print("Interpolating fields from second file: "+str(InterpSecondFile)+" and extrapolating via persistance in time") - -#might want to rewrite with an input file to derive full set of times -print("running InterpTime.py: takes a forecast (arg1="+flin+") and interpolates to times ") -print("in another file (arg2="+flinNewTimes+"). The origonal and interpoated values are output to ") -print("a new file(arg3="+flout+") .") -print("interpolating for variables:") -for jv in range(nvar): - print(varname[jv]) - -data0 = nc.Dataset(flin,"r") -t=np.asarray(data0["time"][:]) - -data1 = nc.Dataset(flinNewTimes,"r") -t1=np.asarray(data1["time"][:]) - -#make sorted union of times in both forecasts -tf = np.union1d(t, t1) - -#eliminate times occuring outside the range of arg1 to avoid extrapolation -j=np.where( np.logical_and( tf>=np.min(t) , tf<=np.max(t) ) ) -print(j) -j=j[0].tolist() -tf=tf[j] - -print("Initial times:") -print(t) -print("New times:") -print(tf) - -nt=len(tf) - -x=np.asarray(data0["longitude"][:]) -y=np.asarray(data0["latitude"][:]) -e=np.asarray(data0["tri"][:,:]) -print("e") -print(e) -print(e.shape) -nn=len(x) -ne=e.shape[1] -noel=e.shape[0] - -InterpolatedVariables=np.zeros((nvar,nt,nn)) - -IsExtrap=False -if InterpSecondFile: - t=t1 - data=data1 - IsExtrap=True -else: - data=data0 - -ntt=len(t) -#unique_vals, indices = np.unique(arr, return_index=True) -tu,indx=np.unique(t,return_index=True) -for jv in range(nvar): - u=np.asarray(data[varname[jv]][:,:]) - fill_value0 = data[varname[jv]]._FillValue - nan=float('nan') - jb=np.where(u==fill_value0) - u[jb]=nan - -#set up interpolator for u -# fi = interp1d(t, u, axis=0, kind='linear') -# fi = interp1d(t, u, axis=0, kind='linear',fill_value=np.nan) -# fi = interp1d(tu, u[indx,:], axis=0, kind='linear',fill_value=np.nan) - if IsExtrap: - fi = interp1d(tu, u[indx,:], axis=0, kind='linear',fill_value="extrapolate") #extrapolated values will be overwritten - else: - fi = interp1d(tu, u[indx,:], axis=0, kind='linear') - uf=fi(tf) - - #re-insert initial values at times that match initial time points - print("Interpolation compleate: now re-insert initial values at times that match initial time points") - print("to remove small interpolation artifacts") - for k in range(nt): - j=np.where(tf[k]==t) - j=j[0].tolist() - print("new time index: "+str(k)+" is same as old time index:"+str(j)) - if len(j)>0: - print("mapping exactly back to origonal values at time: "+str(tf[k])) - j=j[0] - uf[k,:]=u[j,:] - - if IsExtrap: - jExtrapEarly=np.where(tft[ntt-1]) - for jxtrp in range(len(jExtrapLate)): - uf[jExtrapLate[jxtrp],:]=u[ntt-1,:] - - InterpolatedVariables[jv,:,:]=uf[:,:] - -import InterpUtilities as iutil -with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: - - ncout.createDimension('level' , 1) - ncout.createDimension('node' , nn) - ncout.createDimension('element' , ne) - ncout.createDimension('time', nt) - ncout.createDimension('noel', 3) - - lon_var=ncout.createVariable('longitude', 'f8', ('node',)) - lon_var.units = 'degree_east' - lon_var.long_name = 'longitude' - lon_var.standard_name = 'longitude' - lon_var.axis = 'X' - lon_var[:]=x[:] - - lat_var=ncout.createVariable('latitude', 'f8', ('node',)) - lat_var.units = 'degree_north' - lat_var.long_name = 'latitude' - lat_var.standard_name = 'latitude' - lat_var.axis = 'Y' - lat_var[:]=y[:] - - time_var0=data0["time"] - time_var=ncout.createVariable('time', 'f8', ('time',)) - iutil.CopyAttributes(time_var0, time_var) - time_var[:]=tf[:] - - tri_var=ncout.createVariable('tri', 'i4', ('noel','element',)) - tri_var.long_name = 'element list' - tri_var.standard_name = 'element list' - tri_var[:,:]=e - - #Copy attributes from old file to new - for jv in range(nvar): - var=data0[varname[jv]] - f_var=ncout.createVariable(varname[jv], 'f4', ('time','node')) - iutil.CopyAttributes(var, f_var) - f_var[:,:]=InterpolatedVariables[jv,:,:] - ncout.close diff --git a/dev/PreProcess/InterpUtilities.py b/dev/PreProcess/InterpUtilities.py deleted file mode 100644 index 30ec0ec..0000000 --- a/dev/PreProcess/InterpUtilities.py +++ /dev/null @@ -1,800 +0,0 @@ -from scipy.interpolate import RegularGridInterpolator -from scipy.sparse import csr_matrix -from scipy.sparse.csgraph import connected_components - -from datetime import datetime -import numpy as np -import netCDF4 as nc -import sys -import re - -#Convert Time to "seconds since 1970-01-01 00:00:00.0" -#eg 'seconds since 2024-04-04 12:00:00 ! NCDASE - BASE_DAT' -def ConvertTimeToUnixTime(flin,TimeVarName = None): - if TimeVarName == None: - TimeVarName="time" - data = nc.Dataset(flin,"r") - #print("TimeVarName = "+TimeVarName) - timevar=data[TimeVarName] - time=np.asarray(data[TimeVarName][:]) - epoch_1970 = datetime(1970, 1, 1, 0, 0, 0) - TimeUnitsString=timevar.units - TimeUnitsStrings=TimeUnitsString.split(" ") - tunits=TimeUnitsStrings[0] - dstr=TimeUnitsStrings[2] - dstr=dstr.split("-") - tstr=TimeUnitsStrings[3] - tstr=tstr.split(":") - print(dstr) - print(tstr) - secstr=tstr[2].rsplit(".", 1)[0] - base_date = datetime(int(dstr[0]),int(dstr[1]),int(dstr[2]),int(tstr[0]),int(tstr[1]),int(secstr)) - #base_date = datetime(int(dstr[0]),int(dstr[1]),int(dstr[2]),int(tstr[0]),int(tstr[1]),int(tstr[2])) - base_offset = int((base_date - epoch_1970).total_seconds()) - if tunits=="seconds": - unix_time = time + base_offset - if tunits=="days": - unix_time = time*24*60*60 + base_offset - if tunits=="hours": - unix_time = time*60*60 + base_offset - return unix_time - -def loadWW3Mesh(fl): - print("mesh file="+fl) - f=open(fl, 'r') - header = f.readline() - header = f.readline() - header = f.readline() - header = f.readline() - header = f.readline() # number of nodes - nn=int(header) - print("nn = "+str(nn)) - xi=np.zeros(nn) - yi=np.zeros(nn) - zi=np.zeros(nn) - k=0 - for i in range(nn): - A = f.readline() - B=A.lstrip() - values = B.split(" ") -# print(values) - if len(values)>5: - xi[k]=values[2] - yi[k]=values[4] - zi[k]=values[6] - else: - xi[k]=values[1] - yi[k]=values[2] - zi[k]=values[3] - k=k+1 - print("number of nodes read: "+str(k)) - header = f.readline() - header = f.readline() - header = f.readline() # number of elements - ne=int(header)#includes boundary nodes and actual elements - print("ne="+str(ne)+" -includes boundary nodes") - nbnd=0 - bnd=[] - eix=np.zeros((ne,3), dtype=int) - k=0 - for i in range(ne): - A = f.readline() - #print(A) - values = A.split(" ") - #print(values) - if len(values) == 6: - if int(values[2])==2: - bnd.append(int(values[5])) - nbnd=nbnd+1 - if len(values)>15: - eix[k,0]=int(values[12]) - eix[k,1]=int(values[14]) - eix[k,2]=int(values[16]) - k=k+1 - elif len(values)>7: - eix[k,0]=int(values[6]) - eix[k,1]=int(values[7]) - eix[k,2]=int(values[8]) - k=k+1 - ei=eix[range(k),:] - print("number of open boundary nodes read: "+str(nbnd)) - print("number of elements read: "+str(k)) - return xi, yi, ei, zi - - -import numpy as np -from scipy.interpolate import griddata -#import matplotlib.pyplot as plt - -def interpolate_curvilinear_to_points(lon_in, lat_in, data_in, lon_out, lat_out): - """ - Performs bilinear-equivalent interpolation from a curvilinear grid to new points. - - Args: - lon_in (np.ndarray): 2D array of input longitudes. - lat_in (np.ndarray): 2D array of input latitudes. - data_in (np.ndarray): 2D array of data values corresponding to (lon_in, lat_in). - lon_out (np.ndarray or list): Longitudes of the target points. - lat_out (np.ndarray or list): Latitudes of the target points. - - Returns: - np.ndarray: Interpolated data values at the target points. - """ - # Flatten the input coordinates and data into 1D arrays - # griddata expects points as a list of (x, y) tuples or a 2D array - points_in = np.vstack((lon_in.flatten(), lat_in.flatten())).T - values_in = data_in.flatten() - - # Define the target points - points_out = np.vstack((lon_out, lat_out)).T - - # Perform the interpolation using scipy.interpolate.griddata with 'linear' method - # The 'linear' method in griddata is the appropriate choice for curvilinear data - # as it uses triangulation. - interpolated_data = griddata(points_in, values_in, points_out, method='linear') - - return interpolated_data - - -def interpolate_curvilinear_to_pointsMD(lon_in, lat_in, data_in, lon_out, lat_out): - """ - Performs bilinear-equivalent interpolation from a curvilinear grid to new points. - - Args: - lon_in (np.ndarray): 2D array of input longitudes. - lat_in (np.ndarray): 2D array of input latitudes. - data_in (np.ndarray): 3D array of data values corresponding to (lon_in, lat_in, ntimes). - lon_out (np.ndarray or list): Longitudes of the target points. - lat_out (np.ndarray or list): Latitudes of the target points. - - Returns: - np.ndarray: Interpolated data values at the target points (length(lon_out/lat_out x ntimes)). - """ - # Flatten the input coordinates and data into 1D arrays - # griddata expects points as a list of (x, y) tuples or a 2D array - points_in = np.vstack((lon_in.flatten(), lat_in.flatten())).T - - shp=data_in.shape - print(shp) - nx=shp[0] - ny=shp[1] - nt=shp[2] - - ns=nx*ny - S=np.zeros((ns,nt)) - s0=np.zeros((nx,ny)) - for k in range(nt): - s0[:,:]=np.transpose(data_in[:,:,k]) - S[:,k] = s0.flatten() - - # Define the target points - points_out = np.vstack((lon_out, lat_out)).T - - # Perform the interpolation using scipy.interpolate.griddata with 'linear' method - # The 'linear' method in griddata is the appropriate choice for curvilinear data - # as it uses triangulation. - interpolated_data = griddata(points_in, S, points_out, method='linear') - - return interpolated_data - - -def interpolate_curvilinear_to_pointsRRFS(lon_in, lat_in, data_in, lon_out, lat_out): - """ - Performs bilinear-equivalent interpolation from a curvilinear grid to new points. - - Args: - lon_in (np.ndarray): 2D array of input longitudes. - lat_in (np.ndarray): 2D array of input latitudes. - data_in (np.ndarray): 3D array of data values corresponding to (lon_in, lat_in, ntimes). - lon_out (np.ndarray or list): Longitudes of the target points. - lat_out (np.ndarray or list): Latitudes of the target points. - - Returns: - np.ndarray: Interpolated data values at the target points (length(lon_out/lat_out x ntimes)). - """ - # Flatten the input coordinates and data into 1D arrays - # griddata expects points as a list of (x, y) tuples or a 2D array - - points_in = np.vstack((lon_in.flatten(), lat_in.flatten())).T - # points_in = np.hstack((lon_in.flatten(), lat_in.flatten())) - - shp=data_in.shape - print(shp) - nx=shp[0] - ny=shp[1] - nt=shp[2] - - ns=nx*ny - S=np.zeros((ns,nt)) - #s0=np.zeros((nx,ny)) - s0=np.zeros((ny,nx)) - for k in range(nt): - s0[:,:]=np.transpose(data_in[:,:,k]) - #s0[:,:]=data_in[:,:,k] - S[:,k] = s0.flatten() - - # Define the target points - points_out = np.vstack((lon_out, lat_out)).T - - # Perform the interpolation using scipy.interpolate.griddata with 'linear' method - # The 'linear' method in griddata is the appropriate choice for curvilinear data - # as it uses triangulation. - print(S.shape) - print(points_in) - print(points_out) - - interpolated_data = griddata(points_in, S, points_out, method='linear') - - return interpolated_data - -def CopyAttributes(VarOld, VarNew): - #Copy attributes from old NetCDF file variable to new NetCDF file variable - att_names = VarOld.ncattrs() - for jatt in range(len(att_names)): - att_name=att_names[jatt] - if (not (att_name=="_FillValue")): - att_value = VarOld.getncattr(att_name) - VarNew.setncattr(att_name, att_value) - return - - -############################################################################################ -# BEGIN WIND TO RWPS INTERP ROUTINES -import esmpy -import scipy.sparse as sp - -def CurvilinearGridCreateInterpWeights(xi,yi,x1,y1, weights_file): -# Compute interpolation weights to interpolate from curvilinear grid (x1,y1) to points (xi,yi) -# and store in netcdf file using ESMPY - nx,ny=x1.shape - nn=len(xi) - n1=nx*ny - src_lon = x1 - src_lat = y1 - dst_lon=np.zeros((1,nn)) - dst_lat=np.zeros((1,nn)) - print("nn="+str(nn)) - dst_lon[0,:] = xi[:] - dst_lat[0,:] = yi[:] - - esmpy.Manager() - - src_grid = esmpy.Grid( - max_index=np.array([src_lon.shape[0], src_lon.shape[1]]), - staggerloc=esmpy.StaggerLoc.CENTER, - coord_sys=esmpy.CoordSys.SPH_DEG - ) - - dst_grid = esmpy.Grid( - max_index=np.array([nn, 1]), - staggerloc=esmpy.StaggerLoc.CENTER, - coord_sys=esmpy.CoordSys.SPH_DEG - ) - - # 4. Populate the coordinate data - src_lon_ptr = src_grid.get_coords(0) - src_lat_ptr = src_grid.get_coords(1) - src_lon_ptr[...] = src_lon - src_lat_ptr[...] = src_lat - - dst_lon_ptr = dst_grid.get_coords(0) - dst_lat_ptr = dst_grid.get_coords(1) - dst_lon_ptr[...] = dst_lon.T - dst_lat_ptr[...] = dst_lat.T - - # 5. Create esmpy Fields - src_field = esmpy.Field(src_grid, name="src_field") - dst_field = esmpy.Field(dst_grid, name="dst_field") - src_field.data[...]=np.sqrt(x1/180)/(90+y1) # arbitrary function of x,y - - np.savetxt('F.txt', src_field.data[...]) - np.savetxt('X.txt', x1) - np.savetxt('Y.txt', y1) - print(f"Creating weights: {weights_file}") - regrid = esmpy.Regrid( - src_field, - dst_field, - filename=weights_file, - regrid_method=esmpy.RegridMethod.BILINEAR, - ignore_degenerate=True, # <--- Add this parameter - unmapped_action=esmpy.UnmappedAction.IGNORE # Optional: Ignores missing/masked points - ) -#Add number of rows and columns to weights file for clarity when constructing sparse matrix for interpolation - with nc.Dataset(weights_file, mode="a") as ds: - ds.Nrows = nn - ds.Ncols = n1 - - np.savetxt('Fi.txt', dst_field.data[...]) - np.savetxt('xi.txt', xi) - np.savetxt('yi.txt', yi) - - return - -def CalculateDistanceToBoundary(xi,yi,x1,y1): -# Distance to boundary calculation for use when interpolation envelope corresponds with -# interior of curvilinear grid boundary. -# -# Inputs: -# xi (nn): longitude of unstructured mesh nodes -# yi (nn): latitude of unstructured mesh nodes -# x1 (nx x ny): longitude for interpoltated field -# y1 (nx x ny): latitude for interpoltated field -# -# Outputs: -# dist2bnd (nn) : distance to edge of interpolation envelope. - nx=x1.shape[0] - ny=x1.shape[1] - xb=np.hstack((x1[1,:],x1[:,ny-1].T,x1[nx-1,:],x1[:,1].T)) - yb=np.hstack((y1[1,:],y1[:,ny-1].T,y1[nx-1,:],y1[:,1].T)) - np.savetxt('xbyb.txt', np.vstack((xb,yb))) - dist2bnd=np.zeros(nn) - for k in range(nn): - dist2bnd[k]=QuickDistance(yi[k],xi[k],yb,xb) - if k%10000==0: - print("calculating distance to boundary, "+str(k)+":"+ str(nn)+":"+str(k/nn) ) - return dist2bnd - -def CalculateDistanceToInterpEnvelope(xi,yi,fi,SearchWidth): -# Alternative distance to boundary calculation for use when interpolation envelope is -# distinctly interior to curvilinear grid boundary as happens for RRFS NA grid -# -# Inputs: -# xi (nn): longitude of unstructured mesh nodes -# yi (nn): latitude of unstructured mesh nodes -# fi (nn): interpolated field on mesh nodes with 'nan' values outside of interpolation envelope -# SearchWidth: Computational speed up to remove extra search points in distance to boundary -# -# Outputs: -# dist2bnd (nn) : distance to edge of interpolation envelope. dist2bnd[k]=0 if (xi[k],yi[k]) is outside -# of the interpolation envelope - nn=len(xi) - #dist2bnd=np.zeros(nn) - dist2bnd=np.full(nn,np.nan) - jin = np.where(~np.isnan(fi))[0].tolist()#points inside interpolation envelope - jout = np.where(np.isnan(fi))[0].tolist() #points outside interpolation envelope - xin=xi[jin] - yin=yi[jin] - xout=xi[jout] - yout=yi[jout] - jxU=np.where( xout < np.max(xin)+SearchWidth )[0].tolist() - jxD=np.where( xout > np.min(xin)-SearchWidth )[0].tolist() - jyU=np.where( yout < np.max(yin)+SearchWidth )[0].tolist() - jyD=np.where( yout > np.min(yin)-SearchWidth )[0].tolist() - j=list( set(jxU) & set(jxD) & set(jyU) & set(jyD) ) - xout=xout[j] - yout=yout[j] - din=np.zeros(len(jin)) - print(len(xin)) - print(len(xout)) - for k in range(len(xin)): - din[k]=QuickDistance(yin[k],xin[k],yout,xout) # distance from node to closest point not interpolated to - if k%10000==0: - print("calculating distance to boundary, "+str(k)+":"+ str(nn)+":"+str(k/nn) ) - dist2bnd[jin]=din - return dist2bnd - -#END WIND TO RWPS Utils - -def QuickDistance(lat1, lon1, lats2, lons2): - deg2kmY=111. - deg2kmX=np.cos( np.pi * lat1 / 180.)*deg2kmY - d= np.min( np.sqrt( ( (lat1-lats2)*deg2kmY)**2 + ((lon1-lons2)*deg2kmX)**2 ) ) - return d - -def VarianceLinearDistanceToBndy(DistanceToBoundary, InteriorVariance, VarianceOnBoundary, LengthScale): - InteriorNodeList=np.where(DistanceToBoundary**2 >= 0 ) - Variance=np.zeros(len(DistanceToBoundary))+np.inf - SpatialFunction=DistanceToBoundary/LengthScale - j=np.where(SpatialFunction>1.) - SpatialFunction[j]=1. - Variance[InteriorNodeList] = VarianceOnBoundary + ( InteriorVariance - VarianceOnBoundary ) * SpatialFunction[InteriorNodeList] - return Variance - -def VarianceInverseDistanceToBndy( DistanceToBoundary, InteriorVariance, LengthScale): - InteriorNodeList=np.where(DistanceToBoundary**2 >= 0 ) - Variance=np.zeros(len(DistanceToBoundary))+np.inf - SpatialFunction=LengthScale / DistanceToBoundary - j=np.where(SpatialFunction>1.) - SpatialFunction[j]=1. - Variance[InteriorNodeList] = InteriorVariance * SpatialFunction[InteriorNodeList] - return Variance - -def VarianceLinearDepth(zi,VarianceShallow,VarianceDeep,Zshallow,Zdeep): - Variance = VarianceShallow + (VarianceDeep-VarianceShallow)*(zi-Zshallow)/(Zdeep-Zshallow) - js=np.where(ziZdeep) - Variance[js]=VarianceShallow - Variance[jd]=VarianceDeep - return Variance - -import numpy as np -import netCDF4 as nc -def WriteInterpolationWeightsToNetCDF(weights_file,row,col,weights,Nrows,Ncols): - #create a esmpy style sparse matrix netcdf file - print(Nrows) - print(Ncols) - print(row) - print(col) - print(weights) - n_s=len(weights) - - if isinstance(row , list): - row = np.array( row ) - if isinstance( col, list): - col = np.array( col ) - if isinstance( weights, list): - weights = np.array( weights ) - - with nc.Dataset(weights_file, 'w', format='NETCDF4') as ncout: - - ncout.createDimension('n_s' , n_s) - ncout.setncattr("Nrows", Nrows) - ncout.setncattr("Ncols", Ncols) - - r_var=ncout.createVariable('row', 'i4', ('n_s',)) - r_var.long_name = 'row index' - r_var[:]=row[:] - - c_var=ncout.createVariable('col', 'i4', ('n_s',)) - c_var.long_name = 'column index' - c_var[:]=col[:] - - s_var=ncout.createVariable('S', 'f4', ('n_s',)) - s_var.long_name = 'matrix value' - s_var[:]=weights[:] - - - -def IsInElement(x,y,xp,yp): - IsIn=False - c1 = (x[1] - x[0]) * (yp - y[0]) - (y[1] - y[0]) * (xp - x[0]) - c2 = (x[2] - x[1]) * (yp - y[1]) - (y[2] - y[1]) * (xp - x[1]) - c3 = (x[0] - x[2]) * (yp - y[2]) - (y[0] - y[2]) * (xp - x[2]) - if ( ( c1 > 0 and c2 > 0 and c3 > 0) or ( c1 < 0 and c2 < 0 and c3 < 0) ): - IsIn=True - if (c1*c2*c3 == 0): # include points on triangle - IsIn=True - return IsIn - -def FindElement(x,y,e,xi,yi): - nd=len(e.shape) - e=np.squeeze(e) - j=-9999 - ne=e.shape[0] - #print(nd) - #print(ne) - #print(e) - if nd > 1: - xc = np.squeeze(np.mean(x[e], axis=1)) - yc = np.squeeze(np.mean(y[e], axis=1)) - DistanceToElements = np.abs((xi + 1j*yi) - (xc + 1j*yc)) - n=0 - while (j < 0 and n < ne) : - n=n+1 - j = np.argmin( DistanceToElements ) - xl = np.squeeze(x[e[j,:]]) - yl = np.squeeze(y[e[j,:]]) - IsIn=IsInElement(xl,yl,xi,yi) - if IsIn : - return j - else: - DistanceToElements[j]=float('inf') - j=-9999 - else: - xl = np.squeeze(x[e]) - yl = np.squeeze(y[e]) - IsIn=IsInElement(xl,yl,xi,yi) - if IsIn: - j=0 - return j - else: - j=-9999 - return j - - return j -""" -import matplotlib.tri as mtri -def compute_mesh_to_mesh_interp_weights(x, y, e, xi, yi, flout): - -# Assume x, y are vertex coords (N,), triangles is (M, 3) connectivity array - e0=e-1 - triang = mtri.Triangulation(x, y, e0) - - # z are the known values at each vertex (N,) - linear_interp = mtri.LinearTriInterpolator(triang, z) - - # Evaluate at new points (callable directly) - z_new = linear_interp(x_new, y_new) - -""" - -def universal_len(obj): - try: - return len(obj) - except TypeError: - return 1 - - -def compute_mesh_to_mesh_interp_weights(x, y, e, xi, yi): - """ - Compute mesh-to-mesh interpolation weights using barycentric coordinates. - - Parameters: - ----------- - x : array-like - X coordinates of source mesh nodes - y : array-like - Y coordinates of source mesh nodes - e : array-like - Element connectivity matrix (n_elements x 3 for triangular elements) - (nodes indexed from 1 to nn) - xi : array-like - X coordinates of target points - yi : array-like - Y coordinates of target points - - Returns: - -------- - weights : ndarray - Interpolation weights (n_points x 3) - nodes : ndarray - Node indices for each point (n_points x 3) - elenum : ndarray - Element number for each point (n_points,) - Dist2EleCenter : ndarray - Distance to element center for each element - """ - - # Convert to numpy arrays - - deg2kmY=111. - UseNearestEle = False #if True just use closest element center - N = 12 # search N nearest elements (nearest by element center to target node distance) - - print(xi) - x = np.asarray(x) - y = np.asarray(y) - e = np.asarray(e) - xi = np.asarray(xi) - yi = np.asarray(yi) - print("e.shape") - print(e.shape) - # convert node indexs to 0 .. nn-1 - e0=e-1 - - -# triangle_indices, weights, valid_mask=compute_and_save_weights(x, y, e0, xi, yi) -# np.savetxt("triangle_indices.txt",triangle_indices) -# np.savetxt("weights.txt",weights) -# np.savetxt("mask.txt",valid_mask) - - xc = np.mean(x[e0], axis=1) - yc = np.mean(y[e0], axis=1) - - # Initialize output arrays - n_points = len(xi) - n_elements = len(e) - weights = np.zeros((n_points, 3)) - nodes = np.zeros((n_points, 3), dtype=int) - elenum = np.zeros(n_points, dtype=int) - Dist2EleCenter = np.zeros(n_points) - -# t0 = time.time() -# UseNearestEle=True - for k in range(n_points): - x0=xi[k] - y0=yi[k] - deg2kmX=np.cos( np.pi * y0 / 180.)*deg2kmY - #distances = np.abs((x0 + 1j*y0) - (xc + 1j*yc)) - distances = np.abs( deg2kmX*(x0 - xc) + 1j*deg2kmY*(y0 - yc)) -# print(x0) -# print(y0) -# print(e0) -# print(xc) -# print(yc) -# print(distances) - if UseNearestEle: - jg=np.argmin(distances) - else: - raw_indices = np.argpartition(distances, N)[:N] - sorted_sub_indices = np.argsort(distances[raw_indices]) - jg = raw_indices[sorted_sub_indices] - if UseNearestEle : - j=jg - else: - j=FindElement(x,y,e0[jg,:],x0,y0) - if j < 0: - print("couldn't find element for point : "+ str(k)) - print(str(x0)+" : "+str(y0)) - if len(jg)>0: - j = jg[0] - else: - j=0 - print("using closest element at distance : "+ str(distances[j])) - else: - j=jg[j] - - elenum[k] = j - Dist2EleCenter[k] = distances[j] - xl = x[e0[j, :]] - yl = y[e0[j, :]] - - # Compute barycentric coordinates using shoelace formula for areas - # Area of triangle formed by vertices 1, 2, and point (a3) - xt = np.array([xl[0], xl[1], x0, xl[0]]) - yt = np.array([yl[0], yl[1], y0, yl[0]]) - a3 = -np.dot(xt[1:4] - xt[0:3], yt[0:3] + yt[1:4]) / 2 - # Area of triangle formed by vertices 3, 1, and point (a2) - xt = np.array([xl[2], xl[0], x0, xl[2]]) - yt = np.array([yl[2], yl[0], y0, yl[2]]) - a2 = -np.dot(xt[1:4] - xt[0:3], yt[0:3] + yt[1:4]) / 2 - # Area of triangle formed by point, vertices 2, 3 (a1) - xt = np.array([x0, xl[1], xl[2], x0]) - yt = np.array([y0, yl[1], yl[2], y0]) - a1 = -np.dot(xt[1:4] - xt[0:3], yt[0:3] + yt[1:4]) / 2 - - # Normalize to get barycentric weights - total_area = a1 + a2 + a3 - weights[k, :] = [a1, a2, a3] / total_area - - nodes[k, :] = e[j, :] #<- indexed 1 .. nn - # Progress reporting every 100 iterations - if (k + 1) % 10 == 0: -# t1 = time.time() -# time_per_iter = (t1 - t0) / (k + 1) -# time_remaining = (n_points - k - 1) * time_per_iter / 60 - print(f"Progress: {k+1}/{n_points}") -# print(f"Time remaining: {time_remaining:.2f} minutes") - return weights, nodes, elenum, Dist2EleCenter - - -def InterpolateField2Nodes(nodes,weights, f): - fi=np.zeros(weights.shape[0]) - for k in range(weights.shape[0]): - fl=f[nodes[k,:]] - wl=weights[k,:] - fi[k]=np.dot(wl,fl) - if (not np.abs(fi[k]) > 0.): - fi[k]=0. - if ( fi[k]>np.max(fl) ): - fi[k]=np.max(fl) - if ( fi[k]cd $PBS_O_WORKDIR -#-->echo "Running on node: $(hostname)" -#--> python my_script.py --task $PBS_ARRAY_INDEX - -import os -def WriteInterpJobscriptPBS(fl,flin,mshfl,Njobs, ComputeNodes): - - meshslash=mshfl.rfind('/')+1 - TmpOutDir="STOFSInterpWeights."+mshfl[meshslash:len(mshfl)-4] - WghtFl="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".txt" - WghtFl="InterpWeights."+mshfl[meshslash:len(mshfl)-4]+".stofs.txt" - WghtFlNetCDF="InterpWeights."+mshfl[meshslash:len(mshfl)-4]+".stofs.nc" -# WghtFlNetCDF="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".nc" - - Njobs=64 #OVERWRITE FOR NOW - with open(fl, 'w') as f: - -#cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt - - -# From rwps.cron -#PBS -A RWPS-DEV -#PBS -l select=1:ncpus=1:mem=100MB -#PBS -l walltime=02:00:00 -#PBS -q dev -#PBS -N rwps.boss.lsf -#PBS -j oe -#PBS -o rwps.MakeUnstrWghts.out -#PBS -e rwps.MakeUnstrWghts.out - -#PBS -l select=2:ncpus=32:mem=128gb - f.write("#PBS -N ESMPy\n") - f.write("#PBS -j oe\n") - f.write("#PBS -S /bin/bash\n") - f.write("#PBS -q dev\n") - f.write("#PBS -A NWPS-DEV\n") - f.write("#PBS -l walltime=01:00:00\n") - f.write("#PBS -J 1-"+str(Njobs)+"\n") - f.write("#PBS -l select=2:ncpus=32:mem=128gb\n") -# f.write("#PBS -l select=1:ncpus=1:mem=8G\n") - f.write("#PBS -l place=excl\n") - f.write("#PBS -l debug=true\n") - f.write("#PBS -r y\n") - - f.write("module reset\n") - f.write("module load PrgEnv-intel/8.5.0\n") - f.write("module load intel/19.1.3.304\n") - f.write("module load craype/2.7.17\n") - f.write("module load cray-mpich/8.1.19\n") - f.write("module load hdf5-C/1.14.0\n") - f.write("module load netcdf-C/4.9.2\n") - f.write("module load esmf-C/8.6.0\n") - f.write("module load ve/hafs/2.1\n") - - f.write("pip list -v\n") - - current_dir = os.getcwd() - f.write("cd "+current_dir+"\n") - - f.write("# calculate interpolation weights in parallel geographically \n") -## f.write("srun python GeoSubsetInterpolateSTOFS.py "+flin+" "+mshfl+" $PBS_ARRAY_INDEX " + str(Njobs)+" > InterpJob.$PBS_ARRAY_INDEX.out \n") -## f.write("srun python ComputeUnstrToRWPSInterpWeights.py "+flin+" "+mshfl+" $PBS_ARRAY_INDEX " + str(Njobs)+" > InterpJob.$PBS_ARRAY_INDEX.out \n") - f.write("python ComputeUnstrToRWPSInterpWeights.py "+flin+" "+mshfl+" $PBS_ARRAY_INDEX " + str(Njobs)+" > InterpJob.$PBS_ARRAY_INDEX.out \n") -# f.write("wait\n") -# f.write("# concatonate different parts of the mesh to common text file \n") -# f.write("cat "+TmpOutDir+"/Part.IntrpWghts.*.txt > "+WghtFl+" \n") -# f.write("# convert output weights to netcdf file \n") -# f.write("python ConvertWeights2Netcdf.py "+flin+" "+mshfl+" \n") -# print("to run $qsub -r y "+fl) - - -def WriteInterpJobscriptSLURM(fl,flin,mshfl,Njobs, ComputeNodes): - - meshslash=mshfl.rfind('/')+1 - TmpOutDir="STOFSInterpWeights."+mshfl[meshslash:len(mshfl)-4] - WghtFl="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".txt" - WghtFlNetCDF="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".nc" - with open(fl, 'w') as f: - #yi[k]=float(values[4]) - f.write("#!/bin/bash \n") - f.write("#SBATCH --job-name=STOFS_interp_masterscript \n") -# f.write("#SBATCH --ntasks="+str(N)+" \n") - f.write("#SBATCH --ntasks=1 \n") # ntasks per interpolation - f.write("#SBATCH --time=08:00:00 \n") - f.write("#SBATCH --output=mpi_test_%j.log \n") - f.write("#SBATCH --error=%j.err \n") - f.write("#SBATCH --account=marine-cpu \n") - f.write("#SBATCH --nodes="+str(ComputeNodes)+" \n") - f.write("#SBATCH --ntasks-per-core=1"+" \n") - f.write("#SBATCH --array=0-"+str(Njobs-1)+" \n") - - f.write(" \n") - - f.write("module purge \n") - f.write("module use /scratch4/NCEPDEV/marine/Ali.Salimi/Hera_Data/HR4-OPT/FromJessica/Keston/ICunstructuredRuns15km-implicit-450s/global-workflow/sorc/ufs_model.fd/modulefiles \n") - f.write("module load ufs_ursa.intel \n") - f.write("module load py-scipy/1.14.1 \n") - f.write("module load py-netcdf4/1.7.1.post2 \n") - f.write("pip list \n") - f.write("# calculate interpolation weights in parallel geographically \n") - f.write("srun python GeoSubsetInterpolateSTOFS.py "+flin+" "+mshfl+" $SLURM_ARRAY_TASK_ID " + str(Njobs)+" > InterpJob.$SLURM_ARRAY_TASK_ID.out \n") - f.write("wait\n") - f.write("# concatonate different parts of the mesh to common text file \n") - f.write("cat "+TmpOutDir+"/Part.IntrpWghts.*.txt > "+WghtFl+" \n") - f.write("# convert output weights to netcdf file \n") - f.write("python ConvertWeights2Netcdf.py "+flin+" "+mshfl+" \n") - - - flintrp="STOFS.to."+mshfl[meshslash:len(mshfl)-4]+".sh" - flout=flin[0:-2]+mshfl[meshslash:len(mshfl)-4]+".nc" - flinuv=flin[0:-3]+".vel.nc" - floutuv=flinuv[0:-2]+mshfl[meshslash:len(mshfl)-4]+".nc" - with open(flintrp, 'w') as f: - f.write("#!/bin/bash \n") - f.write("#SBATCH --job-name=STOFS_interp_masterscript \n") - f.write(" \n") - f.write("module purge \n") - f.write("module use /scratch4/NCEPDEV/marine/Ali.Salimi/Hera_Data/HR4-OPT/FromJessica/Keston/ICunstructuredRuns15km-implicit-450s/global-workflow/sorc/ufs_model.fd/modulefiles \n") - f.write("module load ufs_ursa.intel \n") - f.write("module load py-scipy/1.14.1 \n") - f.write("module load py-netcdf4/1.7.1.post2 \n") - f.write("pip list \n") - f.write("# calculate interpolation weights in parallel geographically \n") - f.write("python InterpolateSTOFS.py "+flin+" "+mshfl+" "+flout+" zeta 2\n") - f.write("python InterpolateSTOFS.py "+flinuv+" "+mshfl+" "+floutuv+" u-vel:v-vel 2\n") - diff --git a/dev/PreProcess/InterpolateWithWeights.py b/dev/PreProcess/InterpolateWithWeights.py deleted file mode 100644 index e696f34..0000000 --- a/dev/PreProcess/InterpolateWithWeights.py +++ /dev/null @@ -1,262 +0,0 @@ -import numpy as np -import netCDF4 as nc -import sys -import InterpUtilities as iutil -import xarray as xr -import scipy.sparse as sp -from scipy.interpolate import NearestNDInterpolator -import datetime - -# Engine for interpolating to WW3 unstructured mesh using precomputed interpolation weights from netcdf files with forecasts -# -# to call: -# python InterpolateSTOFS.py input_file meshpath outputfile variable1:variable2:variable3 ExtrapMethod -# -# example: -# python InterpolateSTOFS.py stofs.20260608.00/stofs.cwl.vel.nc meshes/RWPS.V0a.small.msh tesdtoZ.vel.nc u-vel:v-vel 2 -# or: -# python InterpolateSTOFS.py stofs.20260608.00/stofs.cwl.nc meshes/RWPS.V0a.small.msh tesdtoZ.vel.nc zeta 1 -# -# ExtrapMethod =-1 no extrapolation, NaN's potentially in output where source field is dry -# ExtrapMethod = 0 NaN values in interpolated field replaced with 0.0 -# ExtrapMethod = 1 Nearest Neighbor extrapolation from valid source values -# ExtrapMethod = 2 Nearest Neighbor extrapolation from valid interpolated values -# ExtrapMethod = 3 Nearest Neighbor extrapolation from interpolated nodes which allways have valid values (faster than 2 for larger source mesh) - -UseUnixTime=True -nargin = len(sys.argv) - 1 - -flin=sys.argv[1] -#mshfl=sys.argv[2] -#meshslash=mshfl.rfind('/')+1 - -#weights_file="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".nc" -weights_file=sys.argv[2] - -flout=sys.argv[3] -varname0=sys.argv[4] -varname=varname0.split(":") - -ExtrapMethod=-1 # no extrapolation -if nargin>4: - ExtrapMethod=int(sys.argv[5]) - -if ExtrapMethod==-1: - print("no extrapolation, nan left in place in output") -if ExtrapMethod==0: - print("Fill missing values in interpolated field with value 0") -if ExtrapMethod==1: - print("extrapolation from nearest valid point in source- can be slow if source mesh is much larger than destination mesh") -if ExtrapMethod==2: - print("extrapolation from nearest valid point in destination (interpolated field)") - -with xr.open_dataset(weights_file) as ds_s: - # Standard sparse storage uses 'row', 'col', and 'data' variables - row = ds_s['row'].values - col = ds_s['col'].values - weights = ds_s['S'].values - Nrows=ds_s.attrs.get('Nrows') - Ncols=ds_s.attrs.get('Ncols') - SrcFieldType=ds_s.attrs.get('SrcFieldType') - if ExtrapMethod>0: #these extrapolation methods need the source and destination nodes - x=ds_s['x_src'].values - y=ds_s['y_src'].values - xi=ds_s['x_dst'].values - yi=ds_s['y_dst'].values - -nni=Nrows -n1=Ncols - -matrix = sp.coo_matrix((weights, (row-1, col-1)), shape=(Nrows,Ncols)).tocsr() -print("sparse interpolation matrix") -print(matrix) -row_sum = matrix.sum(axis=1) -j0=np.where( row_sum==0 ) # destination nodes with no coverage from interpolation matrix - -data = nc.Dataset(flin,"r") -if "time" in data.variables: - time=iutil.ConvertTimeToUnixTime(flin,"time") -elif "MT" in data.variables: - time=iutil.ConvertTimeToUnixTime(flin,"MT") -else: - print("No time variable found in "+flin+" EXITING") - sys.exit(1) - -nt=len(time) - -#nt=4 -#time=time[0:nt] - -print(time) - -nvar=len(varname) -vari=np.zeros((nvar,nt,nni)) - -if ExtrapMethod>=0: - IsExtrap=np.zeros((nvar,nt,nni),dtype=int) - -if ExtrapMethod==3: - AnyExtrap=np.zeros((nvar,nni),dtype=int) - -nan=float("nan") -for jv in range(nvar): - fill_value0=data[varname[jv]]._FillValue - print("fill value="+str(fill_value0)) - for k in range(nt): - print("interpolating for time step = "+str(k)+" of "+str(nt)) - vshp = data.variables[varname[jv]].shape -# if SrcFieldType=="unstructured": - if len(vshp)==1: - var=np.asarray(data[varname[jv]][:]) # No time dimension?, just spatial data to interpolate - elif len(vshp)==2: - var=np.asarray(data[varname[jv]][k,:]) - elif len(vshp)==3: # Wind field with dimensions time, x, y - if "wind" in flin: - var0=np.asarray(data[varname[jv]][k,:,:]) - var=np.transpose(var0).reshape(n1) - elif "ice" in flin: - var0=np.asarray(data[varname[jv]][k,:,:]) - if "rtofs" in flin: #remove bad geometry edges - var0=var0[1:-1,1:-1] - var=np.transpose(var0).reshape(n1) - - elif len(vshp)==4: # RTOFS field with 2nd dimensional "Level" and garbage boundries - var0=np.asarray(data[varname[jv]][k,0,:,:]) - if "rtofs" in flin: #remove bad geometry edges - var0=var0[1:-1,1:-1] - var=np.transpose(var0).reshape(n1) - - else: - print(vshp) - print(len(vshp)) - print("unkown data shape for "+varname[jv]+" terminating") - sys.exit() - - #replace fill with nan to avoid interpolating fill - j=np.where(var==fill_value0) - var[j]=nan - if ExtrapMethod==0: - j=np.where(np.isnan(var)) - var[j]=0. - - vari[jv,k,:] = matrix @ var # actual spatial interpolation step - vari[jv,k,j0]=nan # empty rows - if ExtrapMethod==3: # Fast posthoc nearest neighbor extrapolator - jd=np.where(np.isnan(vari[jv,k,:])) - AnyExtrap[jv,jd]=1. - elif ExtrapMethod>0:# and ExtrapMethod<3: - jd=np.where(np.isnan(vari[jv,k,:])) - dstp=np.array((xi[jd],yi[jd])) - if ExtrapMethod==1: - #extrapolate using nearest neighbor of source with valid value - js=np.where(~np.isnan(var)) - srcp=np.array((x[js],y[js])) - srcv=var[js] - if ExtrapMethod==2: - #extrapolate using nearest neighbor of interpolated field with valid value - js=np.where(~np.isnan(vari[jv,k,:])) - srcp=np.array((xi[js],yi[js])) - tmp=vari[jv,k,js] - srcv=tmp.flatten() - interp = NearestNDInterpolator(srcp.T,srcv) - ExtrapVals = interp( dstp.T ) - vari[jv,k,jd]=ExtrapVals - IsExtrap[jv,k,jd]=1 - -if ExtrapMethod==0: - jd=np.where(np.isnan(vari)) - vari[jd]==0. - IsExtrap[jd]=1 - -if ExtrapMethod==3: #posthoc extrapolation from points which are valid at all times - for jv in range(nvar): - jd=np.where(AnyExtrap[jv,:]==1) # nodes that have some "nan" intrepolated values - js=np.where(AnyExtrap[jv,:]==0) # nodes that have no "nan" intrepolated values - srcp = np.array((xi[js],yi[js])).T - srcv = vari[jv,0,js] #dummy input field - dstp = np.array((xi[jd],yi[jd])).T - srcv=srcv[0,:] - interpolator = NearestNDInterpolator(srcp, srcv) - distances, jsrc = interpolator.tree.query(dstp) - jd=jd[0] - for k in range(nt): - jdk=np.where(np.isnan(vari[jv,k,jd])) - jdk=jdk[0] - vari[jv,k,jd[jdk]]=vari[jv,k,jsrc[jdk]] # value of nearest "always valid" destination point - IsExtrap[jv,k,jd[jdk]]=1 - -print("nn(target mesh) = "+str(nni)+": Nrows = "+str(Nrows)) -print("nn(source mesh) = "+str(n1)+": Ncols = "+str(Ncols)) -if not ((nni==Nrows) and (n1==Ncols)): - print("WARNING: Wrong matrix weights: number of rows from "+ mshfl +" = "+str(nni)+ - " but number of rows in "+ weights_file +" = "+str(Nrows)+ - ", number of spatial points in "+ flin +" = "+str(n1)+ - " but number of columns in "+ weights_file +" = "+str(Ncols) ) - print(" You may need to regnerate file "+ weights_file +" with appropriate weights") - -#ne=ei.shape[0] - -with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: - - ncout.createDimension('level' , 1) - ncout.createDimension('node' , nni) - ncout.createDimension('time', nt) - - time_var=ncout.createVariable('time', 'f8', ('time',)) - varin = data["time"] - iutil.CopyAttributes(varin, time_var) - if UseUnixTime: - time_var.units = 'seconds since 1970-01-01 00:00:00.0 0:00' - time_var.standard_name = 'time' - time_var[:]=time[:] - - for jv in range(nvar): - print("writing output for :"+varname[jv]) - varin = data[varname[jv]] - F_var=ncout.createVariable(varname[jv], 'f4', ('time','node'),fill_value = fill_value0) - iutil.CopyAttributes(varin, F_var) - F_var.location = 'node' - F_var[:,:] = vari[jv,:,:] - - if ExtrapMethod >= 0 : - xtrp_var=ncout.createVariable(varname[jv]+'IsExtrap', 'i1', ('time','node')) - xtrp_var.long_name = '==1 if the interpolated value extrapolated. 0 if interpolated' - xtrp_var.standard_name = 'is extrapolated' - xtrp_var.location = 'node' - if ExtrapMethod == 0: - xtrp_var.method = 'Interpolated nan values replaced with 0' - if ExtrapMethod == 1: - xtrp_var.method = 'nearest valid neighbor in source field' - if ExtrapMethod == 2: - xtrp_var.method = 'nearest valid neighbor in interpolated field' - xtrp_var[:,:] = IsExtrap[jv,:,:] - - ncout.close - - -#mesh geometry should be added later -""" - - ncout.createDimension('element' , ne) - ncout.createDimension('noel', 3) - - lon_var=ncout.createVariable('longitude', 'f8', ('node',)) - lon_var.units = 'degree_east' - lon_var.long_name = 'longitude' - lon_var.standard_name = 'longitude' - lon_var.axis = 'X' - lon_var[:]=xi[:] - - lat_var=ncout.createVariable('latitude', 'f8', ('node',)) - lat_var.units = 'degree_north' - lat_var.long_name = 'latitude' - lat_var.standard_name = 'latitude' - lat_var.axis = 'Y' - lat_var[:]=yi[:] - - tri_var=ncout.createVariable('tri', 'i4', ('noel','element')) - tri_var.long_name = 'element list' - tri_var.standard_name = 'element list' - tri_var[:]=np.transpose(ei) -""" - diff --git a/dev/PreProcess/InterpolateWithWeightsAndErrorVariance.py b/dev/PreProcess/InterpolateWithWeightsAndErrorVariance.py deleted file mode 100644 index 1ddc6a2..0000000 --- a/dev/PreProcess/InterpolateWithWeightsAndErrorVariance.py +++ /dev/null @@ -1,336 +0,0 @@ -import numpy as np -import netCDF4 as nc -import sys -import InterpUtilities as iutil -import xarray as xr -import scipy.sparse as sp -from scipy.interpolate import NearestNDInterpolator -import datetime - -# Engine for interpolating to WW3 unstructured mesh using precomputed interpolation weights from netcdf files with forecasts -# -# to call: -# python InterpolateSTOFS.py input_file meshpath outputfile variable1:variable2:variable3 ExtrapMethod -# -# example: -# python InterpolateSTOFS.py stofs.20260608.00/stofs.cwl.vel.nc meshes/RWPS.V0a.small.msh tesdtoZ.vel.nc u-vel:v-vel 2 -# or: -# python InterpolateSTOFS.py stofs.20260608.00/stofs.cwl.nc meshes/RWPS.V0a.small.msh tesdtoZ.vel.nc zeta 1 -# -# ExtrapMethod =-1 no extrapolation, NaN's potentially in output where source field is dry -# ExtrapMethod = 0 NaN values in interpolated field replaced with 0.0 -# ExtrapMethod = 1 Nearest Neighbor extrapolation from valid source values -# ExtrapMethod = 2 Nearest Neighbor extrapolation from valid interpolated values -# ExtrapMethod = 3 Nearest Neighbor extrapolation from interpolated nodes which allways have valid values (faster than 2 for larger source mesh) - -UseUnixTime=True -nargin = len(sys.argv) - 1 - -flin=sys.argv[1] -#mshfl=sys.argv[2] -#meshslash=mshfl.rfind('/')+1 - -#weights_file="STOFS.wght."+mshfl[meshslash:len(mshfl)-4]+".nc" -weights_file=sys.argv[2] - -flout=sys.argv[3] -varname0=sys.argv[4] -varname=varname0.split(":") -if nargin>4: - VarParam0=sys.argv[5] - IncludeErrorVariance=True -else: - print("no variance parameters provided- error variance will not be included in file "+flout) - IncludeErrorVariance=False - -VariableType='Wind' -if "vel" in varname[0]: - VariableType='Current' -if "zeta" in varname[0]: - VariableType='WaterLevel' -if "ice" in varname[0]: - VariableType='Ice' - -ExtrapMethod=-1 # no extrapolation -if nargin>4: - ExtrapMethod=int(sys.argv[5]) - -if ExtrapMethod==-1: - print("no extrapolation, nan left in place in output") -if ExtrapMethod==0: - print("Fill missing values in interpolated field with value 0") -if ExtrapMethod==1: - print("extrapolation from nearest valid point in source- can be slow if source mesh is much larger than destination mesh") -if ExtrapMethod==2: - print("extrapolation from nearest valid point in destination (interpolated field)") - -with xr.open_dataset(weights_file) as ds_s: - # Standard sparse storage uses 'row', 'col', and 'data' variables - row = ds_s['row'].values - col = ds_s['col'].values - weights = ds_s['S'].values - Nrows=ds_s.attrs.get('Nrows') - Ncols=ds_s.attrs.get('Ncols') - SrcFieldType=ds_s.attrs.get('SrcFieldType') - if ExtrapMethod>0: #these extrapolation methods need the source and destination nodes - x=ds_s['x_src'].values - y=ds_s['y_src'].values - xi=ds_s['x_dst'].values - yi=ds_s['y_dst'].values - #shift to RWPS convention - j=np.where(x>90) - x[j]=x[j]-360. - j=np.where(xi>90) - xi[j]=xi[j]-360. - -nni=Nrows -n1=Ncols - -matrix = sp.coo_matrix((weights, (row-1, col-1)), shape=(Nrows,Ncols)).tocsr() -print("sparse interpolation matrix") -print(matrix) - -data = nc.Dataset(flin,"r") -if "time" in data.variables: - time=iutil.ConvertTimeToUnixTime(flin,"time") -elif "MT" in data.variables: - time=iutil.ConvertTimeToUnixTime(flin,"MT") -else: - print("No time variable found in "+flin+" EXITING") - sys.exit(1) - -nt=len(time) - -#nt=4 -#time=time[0:nt] - -print(time) - -nvar=len(varname) -vari=np.zeros((nvar,nt,nni)) - -if ExtrapMethod>=0: - IsExtrap=np.zeros((nvar,nt,nni),dtype=int) - -if ExtrapMethod==3: - AnyExtrap=np.zeros((nvar,nni),dtype=int) - -nan=float("nan") -for jv in range(nvar): - fill_value0=data[varname[jv]]._FillValue - print("fill value="+str(fill_value0)) - for k in range(nt): - print("interpolating for time step = "+str(k)+" of "+str(nt)) - vshp = data.variables[varname[jv]].shape -# if SrcFieldType=="unstructured": - if len(vshp)==1: - var=np.asarray(data[varname[jv]][:]) # No time dimension?, just spatial data to interpolate - if len(vshp)==2: - var=np.asarray(data[varname[jv]][k,:]) - if len(vshp)==3: # Wind field with dimensions time, x, y - var0=np.asarray(data[varname[jv]][k,:,:]) - var=np.transpose(var0).reshape(n1) - if len(vshp)==4: # RTOFS field with 2nd dimensional "Level" and garbage boundries - var0=np.asarray(data[varname[jv]][k,0,:,:]) - if "rtofs" in flin: #remove bad geometry edges - var0=var0[1:-1,1:-1] - var=np.transpose(var0).reshape(n1) - else: - print("unkown data shape for "+varname[jv]+" terminating") - sys.exit() - - #replace fill with nan to avoid interpolating fill - j=np.where(var==fill_value0) - var[j]=nan - - if ExtrapMethod==0: - j=np.where(np.isnan(var)) - var[j]=0. - - vari[jv,k,:] = matrix @ var # actual spatial interpolation step - - if ExtrapMethod==3: # Fast posthoc nearest neighbor extrapolator - jd=np.where(np.isnan(vari[jv,k,:])) - AnyExtrap[jv,jd]=1. - elif ExtrapMethod>0:# and ExtrapMethod<3: - jd=np.where(np.isnan(vari[jv,k,:])) - dstp=np.array((xi[jd],yi[jd])) - if ExtrapMethod==1: - #extrapolate using nearest neighbor of source with valid value - js=np.where(~np.isnan(var)) - srcp=np.array((x[js],y[js])) - srcv=var[js] - if ExtrapMethod==2: - #extrapolate using nearest neighbor of interpolated field with valid value - js=np.where(~np.isnan(vari[jv,k,:])) - srcp=np.array((xi[js],yi[js])) - tmp=vari[jv,k,js] - srcv=tmp.flatten() - interp = NearestNDInterpolator(srcp.T,srcv) - ExtrapVals = interp( dstp.T ) - vari[jv,k,jd]=ExtrapVals - IsExtrap[jv,k,jd]=1 - -if ExtrapMethod==0: - jd=np.where(np.isnan(vari)) - vari[jd]==0. - IsExtrap[jd]=1 - -if ExtrapMethod==3: #posthoc extrapolation from points which are valid at all times - for jv in range(nvar): - jd=np.where(AnyExtrap[jv,:]==1) # nodes that have some "nan" intrepolated values - js=np.where(AnyExtrap[jv,:]==0) # nodes that have no "nan" intrepolated values - srcp = np.array((xi[js],yi[js])).T - srcv = vari[jv,0,js] #dummy input field - dstp = np.array((xi[jd],yi[jd])).T - srcv=srcv[0,:] - interpolator = NearestNDInterpolator(srcp, srcv) - distances, jsrc = interpolator.tree.query(dstp) - jd=jd[0] - for k in range(nt): - jdk=np.where(np.isnan(vari[jv,k,jd])) - jdk=jdk[0] - vari[jv,k,jd[jdk]]=vari[jv,k,jsrc[jdk]] # value of nearest "always valid" destination point - IsExtrap[jv,k,jd[jdk]]=1 - -print("nn(target mesh) = "+str(nni)+": Nrows = "+str(Nrows)) -print("nn(source mesh) = "+str(n1)+": Ncols = "+str(Ncols)) -if not ((nni==Nrows) and (n1==Ncols)): - print("WARNING: Wrong matrix weights: number of rows from "+ mshfl +" = "+str(nni)+ - " but number of rows in "+ weights_file +" = "+str(Nrows)+ - ", number of spatial points in "+ flin +" = "+str(n1)+ - " but number of columns in "+ weights_file +" = "+str(Ncols) ) - print(" You may need to regnerate file "+ weights_file +" with appropriate weights") - -########################################################################################## -# CONSTRUCT PRESCRIBED ERROR COVARIANCE FOR UPDATING ESTIMATE -########################################################################################## -#grab variables for prescribing error variance -if IcludeErrorVariance: - dist2bnd_file=weights_file.replace("InterpolationWeights", "DistToBnd") - with xr.open_dataset(dist2bnd_file) as ds_s: - dist2bnd = ds_s['dist2bnd'].values - zi = ds_s['depth'].values - - if VariableType=="Current": - VarShallow=float(VarParam[0]) # variance (m/s)**2 for shallow regions - VarDeep=float(VarParam[1]) # variance (m/s)**2 for deep regions - BatShallow=float(VarParam[2]) # isobath (m) for shallow regions - BatDeep=float(VarParam[3]) # isobath (m) for deep regions - if "stofs" in flin: -# Variance = iutil.VarianceLinearDepth(zi,1.,100.,50.,250.) - Variance = iutil.VarianceLinearDepth(zi,VarShallow,VarDeep,BatShallow,BatDeep) - if "rtofs" in flin: #variance high in shallows and near boundary of coverage -# VarianceDepth = iutil.VarianceLinearDepth(zi,100.,1.,50.,250.) - VarianceDepth = iutil.VarianceLinearDepth(zi,VarShallow,VarDeep,BatShallow,BatDeep) - VarLambda= float(VarParam[4]) # lengthscale (km) for linear transition from bounadry variance(==VarShallow) to interior variance(==VarDeep) - VarianceBnd = iutil.VarianceLinearDistanceToBndy( dist2bnd, VarDeep,VarShallow, VarLambda) - Variance = np.maximum(VarianceDepth, VarianceBnd) - - if VariableType=="WaterLevel": - if "stofs" in flin: -# Variance = 1.+0*zi - VarInterior=float(VarParam[0]) # variance (m)**2 for stofs water level - Variance = VarInterior+0.*zi - if VariableType=="Wind": - ##LocalFS = [ rwps_pr, rwps_hi, rwps_ak, rwps_conus, rwps_na] # file names - ##VarFS = [ 4. , 4. , 9. , 16. , 25. ] # (m m /s /s) - ##LambdaFS = [ 150. , 200. , 500. , 1000. , 1500. ] # (km) - VarInterior=float(VarParam[0]) # variance (m/s)**2 for interior of forecast - if "nbm" in flin: - Variance = VarInterior + 0.*dist2bnd[:] - if "rrfs" in flin: - VarBoundary = float(VarParam[1]) # variance (m/s)**2 for boundary of forecast - VarLambda = float(VarParam[2]) # lengthscale (km) for linear transition from bounadry variance to interior variance - Variance = iutil.VarianceLinearDistanceToBndy( dist2bnd, VarInterior, VarBoundary,VarLambda ) - - ErrorVariance=np.zeros((nt,nni)) - for k in range(nt): - ErrorVariance[k,:]=Variance[:] -########################################################################################## -# CONSTRUCT PRESCRIBED ERROR COVARIANCE FOR UPDATING ESTIMATE -########################################################################################## - -ne=ei.shape[0] -with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: - - ncout.createDimension('level' , 1) - ncout.createDimension('node' , nni) - ncout.createDimension('element' , ne) - ncout.createDimension('time', nt) - ncout.createDimension('noel', 3) - - lon_var=ncout.createVariable('longitude', 'f8', ('node',)) - lon_var.units = 'degree_east' - lon_var.long_name = 'longitude' - lon_var.standard_name = 'longitude' - lon_var.axis = 'X' - lon_var[:]=xi[:] - - lat_var=ncout.createVariable('latitude', 'f8', ('node',)) - lat_var.units = 'degree_north' - lat_var.long_name = 'latitude' - lat_var.standard_name = 'latitude' - lat_var.axis = 'Y' - lat_var[:]=yi[:] - - if UseUnixTime: - units = 'seconds since 1970-01-01 00:00:00.0 0:00' - long_name = 'verification time generated by wgrib2 function verftime()' - standard_name = 'time' - else: - varin = data["time"] - units = varin.units - standard_name = varin.standard_name - long_name = varin.long_name - - time_var=ncout.createVariable('time', 'f8', ('time',)) - time_var.units = units - time_var.long_name = long_name - time_var.standard_name = standard_name - time_var[:]=time[:] - - tri_var=ncout.createVariable('tri', 'i4', ('noel','element')) - tri_var.long_name = 'element list' - tri_var.standard_name = 'element list' - tri_var[:]=np.transpose(ei) - - for jv in range(nvar): - if varname[jv]=='' - print("writing output for :"+varname[jv]) - varin = data[varname[jv]] - units = varin.units - standard_name = varin.standard_name - long_name = varin.long_name - location = 'node' - - F_var=ncout.createVariable(varname[jv], 'f4', ('time','node'),fill_value = fill_value0) - F_var.long_name = long_name - F_var.units = units - F_var.standard_name = standard_name - F_var.location = location - F_var[:,:] = vari[jv,:,:] - - if ExtrapMethod >= 0 : - xtrp_var=ncout.createVariable(varname[jv]+'IsExtrap', 'i1', ('time','node')) - xtrp_var.long_name = '==1 if the interpolated value extrapolated. 0 if interpolated' - xtrp_var.standard_name = 'is extrapolated' - xtrp_var.location = 'node' - if ExtrapMethod == 0: - xtrp_var.method = 'Interpolated nan values replaced with 0' - if ExtrapMethod == 1: - xtrp_var.method = 'nearest valid neighbor in source field' - if ExtrapMethod == 2: - xtrp_var.method = 'nearest valid neighbor in interpolated field' - xtrp_var[:,:] = IsExtrap[jv,:,:] - - if IcludeErrorVariance: - ErrorVariance_var=ncout.createVariable('ErrorVariance', 'f4', ('time','node'),fill_value = fill_value0) - ErrorVariance_var.long_name = 'forecast error variance' - ErrorVariance_var.units = "("+units+")**2" - ErrorVariance_var.standard_name = 'variance' - ErrorVariance_var[:,:]=ErrorVariance - - ncout.close - - diff --git a/dev/PreProcess/ProcessCurrents.sh b/dev/PreProcess/ProcessCurrents.sh deleted file mode 100644 index 9488b0a..0000000 --- a/dev/PreProcess/ProcessCurrents.sh +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=00:05:00 -#PBS -l select=1:ncpus=1:mem=8G -#PBS -l place=excl -#PBS -l debug=true - -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - -pip list -v - -#date="20260602" -#cycl="00" -#mesh="meshes/RWPS.V0a.small.msh" - -date=$1 -cycl=$2 -mesh=$3 - - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - -stofscur="stofs.$date.$cycl/stofs_2d_glo.t${cycl}z.fields.cwl.vel.nc" -rtofscur="rtofs.$date.nc" - -varnames="u-vel:v-vel" - -combinedcur=$meshname.$date.$cycl.vel.stofsxrtofs.nc - -## STOFS interpolation -stofs_wghts="InterpolationWeights.$meshname.stofs.nc" -stofs_dists="DistToBndy.$meshname.stofs.nc" -stofs_rwps="$meshname.$date.$cycl.vel.cwl.stofs.nc" -stofs_rwps_ti="$meshname.$date.$cycl.vel.cwl.stofs.ti.nc" - -if [ ! -f "$stofs_wghts" ]; then - echo "missing stofs interpolation weights file: $stofs_wghts" - echo "compute with script ComputeUnstrToRWPSInterpWeights.sh" - exit 1 -fi -if [ ! -f "$stofs_dists" ]; then - echo "missing stofs distance to boundary file: $stofs_dists" - echo "compute with script ComputeUnstrToRWPSInterpWeights.sh" - exit 1 -fi - -# extrapolate with zero fill -python InterpolateWithWeights.py $stofscur $stofs_wghts $stofs_rwps $varnames 0 & - - -## RTOFS interpolation -rtofs_rwps="$meshname.$date.vel.rtofs.nc" -rtofs_wghts="InterpolationWeights.$meshname.rtofs.nc" -rtofs_dists="DistToBndy.$meshname.rtofs.nc" -rtofs_rwps_ti="$meshname.$date.$cycl.vel.cwl.rtofs.ti.nc" - -if [ ! -f "$rtofs_wghts" ]; then - echo "missing rtofs interpolation weights file: $stofs_wghts" - echo "compute with script ComputeGridToRWPSInterpWeights.py" - exit 2 -fi -if [ ! -f "$rtofs_dists" ]; then - echo "missing stofs distance to boundary file: $rtofs_dists" - echo "compute with script ComputeUnstrToRWPSInterpWeights.py" - exit 2 -fi -# no extrapolation -python InterpolateWithWeights.py $rtofscur $rtofs_wghts $rtofs_rwps $varnames -1 & - -wait; - -python AddMeshGeomToFile.py $rtofs_rwps $mesh -python AddMeshGeomToFile.py $stofs_rwps $mesh - -#python AddErrVarToFile0.py $rtofs_rwps $rtofs_dists 100.:1.:50.:250.:50. -#python AddErrVarToFile0.py $stofs_rwps $stofs_dists 1.:100.:50.:250. - -#interpolate from stofs to common stofs and rtofs times within range of stofs time -python InterpTime.py $stofs_rwps $rtofs_rwps $stofs_rwps_ti $varnames False & - -#interpolate from rtofs to common stofs and rtofs times within range of stofs time -#values out of range are extrapolated to assuming persistance -python InterpTime.py $stofs_rwps $rtofs_rwps $rtofs_rwps_ti $varnames True & - -wait - -python AddErrVarToFile0.py $rtofs_rwps_ti $rtofs_dists 100.:1.:50.:250.:50. -python AddErrVarToFile0.py $stofs_rwps_ti $stofs_dists 1.:100.:50.:250. - -python BayesForecastUpdate.py $stofs_rwps_ti $rtofs_rwps_ti $combinedcur $varnames - diff --git a/dev/PreProcess/ProcessIce.sh b/dev/PreProcess/ProcessIce.sh deleted file mode 100644 index d558320..0000000 --- a/dev/PreProcess/ProcessIce.sh +++ /dev/null @@ -1,113 +0,0 @@ -#!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=00:05:00 -#PBS -l select=1:ncpus=1:mem=8G -#PBS -l place=excl -#PBS -l debug=true - -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - -pip list -v - -#date="20260602" -#cycl="00" -#mesh="meshes/RWPS.V0a.small.msh" - -date=$1 -cycl=$2 -mesh=$3 - - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - -inpdir=ice.$date.$cycl - -nbmice=$inpdir/nbm.$date.$cycl.ice.ak.nc -rtofsice=$inpdir/rtofs.ice.$date.nc - -varnames="ICEC_surface" - -combinedice=$meshname.$date.$cycl.ice.rtofsxnbm.nc - -## NBM AK domain interpolation -## NOTE WE ARE USING THE RRFS ak WEIGHTS HERE NEED TO RELABEL AND RECOMPUTE FOR NBM AK DOMAIN -## DIFFERENCES ARE SMALL. posional distance ~200m on 3km grid roughly -nbm_ak_wghts="InterpolationWeights.$meshname.ak.nc" -nbm_ak_dists="DistToBndy.$meshname.ak.nc" - -nbm_rwps="$meshname.$date.$cycl.ice.nbm.ak.nc" -nbm_rwps_ti="$meshname.$date.$cycl.ice.nbm.ak.ti.nc" - -if [ ! -f "$nbm_ak_wghts" ]; then - echo "missing nbm ak interpolation weights file: $nbm_ak_wghts" - echo "compute with script ComputeUnstrToRWPSInterpWeights.sh" - exit 1 -fi - -if [ ! -f "$nbm_ak_dists" ]; then - echo "missing nbm ak distance to boundary file: $nbm_ak_dists" - echo "compute with script ComputeUnstrToRWPSInterpWeights.sh" - exit 1 -fi - -# no extrapolation -python InterpolateWithWeights.py $nbmice $nbm_ak_wghts $nbm_rwps $varnames -1 & - -## RTOFS interpolation -rtofs_rwps="$meshname.$date.ice.rtofs.nc" -rtofs_wghts="InterpolationWeights.$meshname.rtofs.nc" -rtofs_dists="DistToBndy.$meshname.rtofs.nc" -rtofs_rwps_ti="$meshname.$date.$cycl.ice.rtofs.ti.nc" - -if [ ! -f "$rtofs_wghts" ]; then - echo "missing rtofs interpolation weights file: $rtofs_wghts" - echo "compute with script ComputeGridToRWPSInterpWeights.py" - exit 2 -fi -if [ ! -f "$rtofs_dists" ]; then - echo "missing stofs distance to boundary file: $rtofs_dists" - echo "compute with script ComputeUnstrToRWPSInterpWeights.py" - exit 2 -fi - -# extrapolate with 0 as fill -echo "$rtofsice" -python InterpolateWithWeights.py $rtofsice $rtofs_wghts $rtofs_rwps $varnames 0 & - -wait; - -python AddMeshGeomToFile.py $rtofs_rwps $mesh -python AddMeshGeomToFile.py $nbm_rwps $mesh - -#python AddErrVarToFile0.py $rtofs_rwps $rtofs_dists 100.:1.:50.:250.:50. -#python AddErrVarToFile0.py $stofs_rwps $stofs_dists 1.:100.:50.:250. - -#interpolate from stofs to common stofs and rtofs times within range of stofs time -python InterpTime.py $rtofs_rwps $nbm_rwps $rtofs_rwps_ti $varnames False & - -#interpolate from rtofs to common stofs and rtofs times within range of stofs time -#values out of range are extrapolated to assuming persistance -python InterpTime.py $rtofs_rwps $nbm_rwps $nbm_rwps_ti $varnames True & - -wait - -#uniform variance of 100. -python AddErrVarToFile0.py $rtofs_rwps_ti $rtofs_dists 100. - -#interior variance of 4., boundary variance fof 400., transition lengthscale 9. km -python AddErrVarToFile0.py $nbm_rwps_ti $nbm_ak_dists 4.:400.:9. - -python BayesForecastUpdate.py $rtofs_rwps_ti $nbm_rwps_ti $combinedice $varnames diff --git a/dev/PreProcess/ProcessWaterLevel.sh b/dev/PreProcess/ProcessWaterLevel.sh deleted file mode 100644 index 42d2b0d..0000000 --- a/dev/PreProcess/ProcessWaterLevel.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=00:05:00 -#PBS -l select=1:ncpus=1:mem=8G -#PBS -l place=excl -#PBS -l debug=true - -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - -pip list -v - -date=$1 -cycl=$2 -mesh=$3 - -curdir=$(pwd) -echo "directory : $curdir" - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - -stofslev="stofs.$date.$cycl/stofs_2d_glo.t${cycl}z.fields.cwl.nc" - -varnames="zeta" - -## STOFS interpolation -stofs_wghts="InterpolationWeights.$meshname.stofs.nc" -stofs_dists="DistToBndy.$meshname.stofs.nc" -stofs_rwps="$meshname.$date.$cycl.cwl.stofs.nc" - -echo "$meshname" -echo "$stofs_wghts" -echo "$stofs_rwps" - -if [ ! -f "$stofs_wghts" ]; then - echo "missing stofs interpolation weights file: $stofs_wghts" - echo "compute with script ComputeUnstrToRWPSInterpWeights.sh" - exit 1 -fi -if [ ! -f "$stofs_dists" ]; then - echo "missing stofs distance to boundary file: $stofs_dists" - echo "compute with script ComputeUnstrToRWPSInterpWeights.sh" - exit 1 -fi - -python InterpolateWithWeights.py $stofslev $stofs_wghts $stofs_rwps $varnames 0 -python AddMeshGeomToFile.py $stofs_rwps $mesh -python AddErrVarToFile0.py $stofs_rwps $stofs_dists 1. - diff --git a/dev/PreProcess/ProcessWinds.sh b/dev/PreProcess/ProcessWinds.sh deleted file mode 100644 index 514616f..0000000 --- a/dev/PreProcess/ProcessWinds.sh +++ /dev/null @@ -1,149 +0,0 @@ -#!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=00:05:00 -#PBS -l select=1:ncpus=1:mem=8G -#PBS -l place=excl -#PBS -l debug=true - -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - -pip list -v - -##date="20260527" -#date=20260602 -#cycl="00" -#mesh=meshes/RWPS.V0a.small.msh - -date=$1 -cycl=$2 -mesh=$3 -#winddir="forecasts/wind.$date.$cycl" -winddir="wind.$date.$cycl" -windvars="UGRD_10maboveground:VGRD_10maboveground" - -# extract mesh name from file path -meshname="${mesh##*/}" -# remove .msh suffix from mesh name -meshname="${meshname: 0: -4}" - -# incorporate meshname date and cycle into output directory name to avoid -# applying winds to wrong mesh -outdir="rwps_winds.$meshname.$date.$cycl" - -echo "outputing files to: $outdir" - -nbm_oc="$winddir/nbm.$date.$cycl.wind10m.oc.nc" -nbm_oc_uv="$winddir/nbm.$date.$cycl.wind10m.oc.uv.nc" - -rrfs_pr="$winddir/rrfs.$date.$cycl.wind10m.pr.nc" -rrfs_hi="$winddir/rrfs.$date.$cycl.wind10m.hi.nc" -rrfs_na="$winddir/rrfs.$date.$cycl.wind10m.na.nc" -rrfs_ak="$winddir/rrfs.$date.$cycl.wind10m.ak.nc" -rrfs_conus="$winddir/rrfs.$date.$cycl.wind10m.conus.nc" - -rwps_oc="$outdir/nbm.$meshname.$date.$cycl.wind10m.oc.nc" -rwps_oc_ti="$outdir/nbm.$meshname.$date.$cycl.wind10m.oc.ti.nc" -rwps_pr="$outdir/rrfs.$meshname.$date.$cycl.wind10m.pr.nc" -rwps_hi="$outdir/rrfs.$meshname.$date.$cycl.wind10m.hi.nc" -rwps_na="$outdir/rrfs.$meshname.$date.$cycl.wind10m.na.nc" -rwps_ak="$outdir/rrfs.$meshname.$date.$cycl.wind10m.ak.nc" -rwps_conus="$outdir/rrfs.$meshname.$date.$cycl.wind10m.conus.nc" -rwps_est="$outdir/rwps.est.$meshname.$date.$cycl.wind10m.nc" - -mkdir $outdir - - -##weights_file = "InterpolationWeights."+mshfl[meshslash:len(mshfl)-3]+dom+".nc" - -##LocalFS = [ rwps_pr, rwps_hi, rwps_ak, rwps_conus, rwps_na] # file names -##VarFS = [ 4. , 4. , 9. , 16. , 25. ] # (m m /s /s) -##LambdaFS = [ 150. , 200. , 500. , 1000. , 1500. ] # (km) -nbm_oc_wghts="InterpolationWeights.$meshname.oc.nc" -rrfs_hi_wghts="InterpolationWeights.$meshname.hi.nc" -rrfs_pr_wghts="InterpolationWeights.$meshname.pr.nc" -rrfs_ak_wghts="InterpolationWeights.$meshname.ak.nc" -rrfs_na_wghts="InterpolationWeights.$meshname.na.nc" -rrfs_conus_wghts="InterpolationWeights.$meshname.conus.nc" - -nbm_oc_dist="DistToBndy.$meshname.oc.nc" -rrfs_hi_dist="DistToBndy.$meshname.hi.nc" -rrfs_pr_dist="DistToBndy.$meshname.pr.nc" -rrfs_ak_dist="DistToBndy.$meshname.ak.nc" -rrfs_na_dist="DistToBndy.$meshname.na.nc" -rrfs_conus_dist="DistToBndy.$meshname.conus.nc" - - -( - #Convert NBM speed and direction to u,v - python SpdDir2UVnbm.py $nbm_oc $nbm_oc_uv - # If the interpolation weights do not already exist for the domains create them - # also creates distance to boundary used in prescribed error covariance specification - [ ! -f "$nbm_oc_wghts" ] && python ComputeGriddedToRWPSInterpWeights.py $nbm_oc_uv $mesh 1 - python InterpolateWithWeights.py $nbm_oc_uv $nbm_oc_wghts $rwps_oc $windvars 3 - python AddMeshGeomToFile.py $rwps_oc $mesh -)& - -( - [ ! -f "$rrfs_hi_wghts" ] && python ComputeGriddedToRWPSInterpWeights.py $rrfs_hi $mesh - python InterpolateWithWeights.py $rrfs_hi $rrfs_hi_wghts $rwps_hi $windvars -1 - #add mesh geometry into interpolated file - python AddMeshGeomToFile.py $rrfs_hi $mesh - # Add error covariance field to files with interpolated fields for bayesian update - # Based on distance to boundary of input field and commant line parameters InternalVariance:BoundaryVariance:LengthScale(km) - python AddErrVarToFile0.py $rwps_hi $rrfs_hi_dist 4.:40.:200. -)& - -( - [ ! -f "$rrfs_pr_wghts" ] && python ComputeGriddedToRWPSInterpWeights.py $rrfs_pr $mesh - python InterpolateWithWeights.py $rrfs_pr $rrfs_pr_wghts $rwps_pr $windvars -1 - python AddMeshGeomToFile.py $rrfs_pr $mesh - python AddErrVarToFile0.py $rwps_pr $rrfs_pr_dist 4.:40.:150. -)& - -( - [ ! -f "$rrfs_ak_wghts" ] && python ComputeGriddedToRWPSInterpWeights.py $rrfs_ak $mesh - python InterpolateWithWeights.py $rrfs_ak $rrfs_ak_wghts $rwps_ak $windvars -1 - python AddMeshGeomToFile.py $rrfs_ak $mesh - python AddErrVarToFile0.py $rwps_ak $rrfs_ak_dist 9.:90.:500. -)& - -( - [ ! -f "$rrfs_conus_wghts" ] && python ComputeGriddedToRWPSInterpWeights.py $rrfs_conus $mesh - python InterpolateWithWeights.py $rrfs_conus $rrfs_conus_wghts $rwps_conus $windvars -1 - python AddMeshGeomToFile.py $rrfs_conus $mesh - python AddErrVarToFile0.py $rwps_conus $rrfs_conus_dist 16.:160.:1000. -)& - -( - [ ! -f "$rrfs_na_wghts" ] && python ComputeGriddedToRWPSInterpWeights.py $rrfs_na $mesh - python InterpolateWithWeights.py $rrfs_na $rrfs_na_wghts $rwps_na $windvars -1 - python AddMeshGeomToFile.py $rrfs_na $mesh - python AddErrVarToFile0.py $rwps_na $rrfs_na_dist 50.:500.:1500. -)& - -wait; -#Interpolate NBM in time to times within the NBM forecast covered by the RRFS forecast -python InterpTime.py $rwps_oc $rwps_pr $rwps_oc_ti $windvars -#add mesh geometry into file -python AddMeshGeomToFile.py $rwps_oc_ti $mesh -#add prescribed error covariance for nbm oc domain (assumed constant 100. (m/s)^2 ) -python AddErrVarToFile0.py $rwps_oc_ti $nbm_oc_dist 100. - -cp $rwps_oc_ti $rwps_est -[ ! -f "$rwps_hi" ] && python BayesForecastUpdate.py $rwps_est $rwps_hi $rwps_est $windvars -[ ! -f "$rwps_pr" ] && python BayesForecastUpdate.py $rwps_est $rwps_pr $rwps_est $windvars -[ ! -f "$rwps_ak" ] && python BayesForecastUpdate.py $rwps_est $rwps_ak $rwps_est $windvars -[ ! -f "$rwps_conus" ] && python BayesForecastUpdate.py $rwps_est $rwps_conus $rwps_est $windvars -[ ! -f "$rwps_na" ] && python BayesForecastUpdate.py $rwps_est $rwps_na $rwps_est $windvars diff --git a/dev/PreProcess/README.md b/dev/PreProcess/README.md deleted file mode 100644 index f8cfff9..0000000 --- a/dev/PreProcess/README.md +++ /dev/null @@ -1 +0,0 @@ -# RWPSInterpolationUtilities diff --git a/dev/PreProcess/SetMeshName b/dev/PreProcess/SetMeshName deleted file mode 100644 index 1308f01..0000000 --- a/dev/PreProcess/SetMeshName +++ /dev/null @@ -1 +0,0 @@ -mesh=/lfs/h2/emc/couple/noscrub/keston.smith/RWPS/fix/oc_5km_100km/20260722/rwps.oc_5km_100km.msh diff --git a/dev/PreProcess/SpdDir2UVnbm.py b/dev/PreProcess/SpdDir2UVnbm.py deleted file mode 100644 index e25aaa1..0000000 --- a/dev/PreProcess/SpdDir2UVnbm.py +++ /dev/null @@ -1,86 +0,0 @@ -import os -import argparse -import numpy as np -import netCDF4 as nc -#import jigsawpy -import sys -import math -flin=sys.argv[1] -flout=sys.argv[2] -#fld="wdir10m.nc" -#fls="wspd10m.nc" -#flout="wind.08.31.WW3.nc" -fcst0 = nc.Dataset(flin,"r") - -x=np.asarray(fcst0["longitude"][:]) -y=np.asarray(fcst0["latitude"][:]) -t=np.asarray(fcst0["time"][:]) -spd=np.asarray(fcst0["WIND_10maboveground"][:,:,:]) -theta=np.asarray(fcst0["WDIR_10maboveground"][:,:,:]) - -spdV=fcst0["WIND_10maboveground"] -fill_value0 = spdV._FillValue - -print("fil val") -print(fill_value0) - -print("spd shape") -print(spd.shape) - -u=-1*spd*np.sin(theta*np.pi/180.) -v=-1*spd*np.cos(theta*np.pi/180.) -u[np.where(spd==fill_value0)]=fill_value0 -v[np.where(spd==fill_value0)]=fill_value0 - -nx=len(x) -ny=len(y) -nt=len(t) - -with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: - # Create dimensions - ncout.createDimension('lon' , nx) # Unlimited dimension - ncout.createDimension('lat' , ny) - ncout.createDimension('time', nt) - - lon_var=ncout.createVariable('longitude', 'f8', ('lon',)) - lon_var.units = 'degree_east' - lon_var.long_name = 'longitude' - lon_var.standard_name = 'longitude' - lon_var.axis = 'lon' - lon_var[:]=x[:] - - lat_var=ncout.createVariable('latitude', 'f8', ('lat',)) - lat_var.units = 'degree_north' - lat_var.long_name = 'latitude' - lat_var.standard_name = 'latitude' - lat_var.axis = 'lat' - lat_var[:]=y[:] - - time_var=ncout.createVariable('time', 'f8', ('time',)) - time_var.units = 'seconds since 1970-01-01 00:00:00.0 0:00' - time_var.long_name = 'verification time generated by wgrib2 function verftime()' - time_var.standard_name = 'time' - time_var.axis = 'time' - time_var[:]=t[:] - -# u_var=ncout.createVariable('UGRD_10maboveground', 'f4', ('lon','lat','time'),fill_value = -99999) - u_var=ncout.createVariable('UGRD_10maboveground', 'f4', ('time','lat','lon'),fill_value = fill_value0) - u_var.long_name = 'U-Component of Wind' - u_var.units = 'm/s' - u_var.standard_name = 'UGRD_10maboveground' - u_var.level = '10 m above ground' - u_var[:,:,:]=u[:,:,:] -# u_var[:,:,:]=np.transpose(u[:,:,:],(2,1,0)) - - v_var=ncout.createVariable('VGRD_10maboveground', 'f4', ('time','lat','lon'),fill_value = fill_value0) - v_var.long_name = 'V-Component of Wind' - v_var.units = 'm/s' - v_var.standard_name = 'VGRD_10maboveground' - v_var.level = '10 m above ground' - v_var[:,:,:]=v[:,:,:] -# v_var[:,:,:]=np.transpose(v[:,:,:],(2,1,0)) - - - ncout.close - - diff --git a/dev/PreProcess/nbm/ConvertNBMIcetif2NetCDF.py b/dev/PreProcess/nbm/ConvertNBMIcetif2NetCDF.py deleted file mode 100644 index 5c4701d..0000000 --- a/dev/PreProcess/nbm/ConvertNBMIcetif2NetCDF.py +++ /dev/null @@ -1,56 +0,0 @@ -#aws s3 ls --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/ | g ice -#aws s3 cp --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/iceconcentration/blendv5.0_alaska_iceconcentration_2026-05-07T00:00_2026-05-08T12:00.tif ./ -#aws s3 cp --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/icethickness/blendv5.0_alaska_icethickness_2026-05-07T00:00_2026-05-08T12:00.tif ./ -#pip install rioxarray xarray pyproj numpy NetCDF4 -#python ConvertNBMIcetif2NetCDF.py iceconcentration/blendv5.0_alaska_iceconcentration_2026-05-07T00:00_2026-05-08T12:00.tif -import numpy as np -import pyproj -import rioxarray as rio -import xarray as xr -import sys - -flin = sys.argv[1] -flout=flin[0:-4]+".nc" -# 1. Load the original GeoTIFF file -# Replace 'input.tif' with your actual file path -da = rio.open_rasterio(flin) - -# 2. Extract the 1D projected X and Y coordinates (in meters) -x_coords = da.x.values -y_coords = da.y.values - -# 3. Create a 2D meshgrid of the projected coordinates -X, Y = np.meshgrid(x_coords, y_coords) - -# 4. Set up the coordinate transformer -# From EPSG:5936 (Polar Stereographic) to EPSG:4326 (Lat/Lon) -transformer = pyproj.Transformer.from_crs( - "EPSG:5936", "EPSG:4326", always_xy=True -) - -# 5. Compute the 2D curvilinear latitude and longitude grids -lon_2d, lat_2d = transformer.transform(X, Y) - -# 6. Restructure the DataArray, dropping old 1D spatial coordinates -# We assume band 0 is your primary data array -data_var = da.isel(band=0).drop_vars(["x", "y", "spatial_ref"]) - -# 7. Build the NetCDF dataset with 2D curvilinear coordinates -ds = xr.Dataset( - data_vars={"variable_name": (["y", "x"], data_var.values)}, -# data_vars={"Band1": (["y", "x"], data_var.values)}, - coords={ - "lon": (["y", "x"], lon_2d), - "lat": (["y", "x"], lat_2d), - }, -) - -# Add standard CF-compliant metadata for curvilinear grids -ds["variable_name"].attrs["coordinates"] = "lon lat" -ds["lon"].attrs["units"] = "degrees_east" -ds["lat"].attrs["units"] = "degrees_north" - -# 8. Export to NetCDF with compression enabled -ds.to_netcdf(flout, encoding={"variable_name": {"zlib": True}}) - -print("Conversion complete: "+flout+" saved.") diff --git a/dev/PreProcess/nbm/GetNBMIce.sh b/dev/PreProcess/nbm/GetNBMIce.sh deleted file mode 100755 index 6195ba6..0000000 --- a/dev/PreProcess/nbm/GetNBMIce.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -# This is just a place holder with notes for the time being. Notes on aws retrieval and processing are below -# This script takes rrfs grib2 forecast files, extracts 10m u and v wind -# components and outputs to netcdf. Comand line arguments are -# with aws- make a -#aws s3 ls --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/ | g ice -#aws s3 cp --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/iceconcentration/blendv5.0_alaska_iceconcentration_2026-05-07T00:00_2026-05-08T12:00.tif ./ -#aws s3 cp --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/icethickness/blendv5.0_alaska_icethickness_2026-05-07T00:00_2026-05-08T12:00.tif ./ -#pip install rioxarray xarray pyproj numpy NetCDF4 -#python ConvertNBMIcetif2NetCDF.py iceconcentration/blendv5.0_alaska_iceconcentration_2026-05-07T00:00_2026-05-08T12:00.tif - -#for all files -#aws s3 cp --no-sign-request s3://noaa-nbm-pds/blendv5.0/alaska/2026/05/07/0000/icethickness/ . --recursive --exclude "*" --include "*alaska_icethickness_*" -# -module load intel-oneapi/2022.2.0.262 -module load wgrib2/2.0.8 - - - -INPUT_DIR="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.$1/$2/grib2" -# /lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.20260729/00/grib2/blend.t00z.icec.ak.grib2 -ICE_FILE="$INPUT_DIR/blend.t$2z.icec.ak.grib2" - -OUTPUT_DIR="ice.$1.$2" -OUTPUT_FILE="$OUTPUT_DIR/nbm.$1.$2.ice.ak.nc" - -mkdir "$OUTPUT_DIR" -# Remove existing output file to avoid mixing old data -rm -f "$OUTPUT_FILE" - -echo "writing ice from $INPUT_DIR to $OUTPUT_FILE" - -wgrib2 "$ICE_FILE" -match ":ICEC:" -netcdf "$OUTPUT_FILE" - -echo "nbm ice processing complete for forecast date $1, cycle $2, domain ak" -echo "output written to: $OUTPUT_FILE" diff --git a/dev/PreProcess/nbm/MakeNBMWind.sh b/dev/PreProcess/nbm/MakeNBMWind.sh deleted file mode 100755 index 9dfed6e..0000000 --- a/dev/PreProcess/nbm/MakeNBMWind.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -# This script takes rrfs grib2 forecast files, extracts 10m u and v wind -# components and outputs to netcdf. Comand line arguments are - -module load intel-oneapi/2022.2.0.262 -module load wgrib2/2.0.8 - -#INPUT_DIR="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.1/blend.$1/$2/grib2" -INPUT_DIR="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.$1/$2/grib2" -WSPD_FILE="$INPUT_DIR/blend.t$2z.wspd.$3.grib2" -WDIR_FILE="$INPUT_DIR/blend.t$2z.wdir.$3.grib2" - -OUTPUT_DIR="wind.$1.$2" -OUTPUT_FILE="$OUTPUT_DIR/nbm.$1.$2.wind10m.$3.nc" - -mkdir "$OUTPUT_DIR" -# Remove existing output file to avoid mixing old data -rm -f "$OUTPUT_FILE" - -echo "writing 10m wind from $INPUT_DIR to $OUTPUT_FILE" - -wgrib2 "$WSPD_FILE" -match ":WIND:10 m" -netcdf "$OUTPUT_FILE" -wgrib2 "$WDIR_FILE" -match ":WDIR:10 m" -append -netcdf "$OUTPUT_FILE" - -echo "nbm processing complete for forecast date $1, cycle $2, domain $3" -echo "output written to: $OUTPUT_FILE" diff --git a/dev/PreProcess/nbm/MakeNBMWindUV.sh b/dev/PreProcess/nbm/MakeNBMWindUV.sh deleted file mode 100644 index 97eeda5..0000000 --- a/dev/PreProcess/nbm/MakeNBMWindUV.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -# This script takes rrfs grib2 forecast files, extracts 10m u and v wind -# components and outputs to netcdf. Comand line arguments are -# forecast time: YYYYMMDD -# forecast cycle: CC -# frecast region: hi,pr,na,ak or conus -# -# For example call as: -# sh MakeRRFSWind.sh 20260428 00 pr -# to produce output file: -# rrfs.20260428.00.wind10m.pr.nc -# -# ensemble(of n=5) output is available: -#/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.20260428/00/m001 -#/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.20260428/00/m002 -#/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.20260428/00/m003 -#/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.20260428/00/m004 -#/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.20260428/00/m005 -# wgrib2 input.grib2 -wind_uv output.grib2 - -INPUT_DIR="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.0/blend.$1/$2/grib2" -WSPD_FILE="$INPUT_DIR/blend.t00z.wspd.$3.grib2" -WDIR_FILE="$INPUT_DIR/blend.t00z.wdir.$3.grib2" - -module load intel-oneapi/2022.2.0.262 -module load wgrib2/2.0.8 - -OUTPUT_FILE="nbm.$1.$2.wind10m.$3.nc" - -# Remove existing output file to avoid mixing old data -rm -f "$OUTPUT_FILE" - -echo "writing 10m wind from $INPUT_DIR to $OUTPUT_FILE" - -# wgrib2 "$WSPD_FILE" -match ":WIND:10 m" -netcdf "$OUTPUT_FILE" -# wgrib2 "$WDIR_FILE" -match ":WDIR:10 m" -append -netcdf "$OUTPUT_FILE" - -wgrib2 "$WSPD_FILE" -match ":WIND:10 m" tmp.grib2 -wgrib2 "$WDIR_FILE" -match ":WDIR:10 m" -append tmp.grib2 - -wgrib2 tmp.grib2 -wind_uv -netcdf "$OUTPUT_FILE" - -# Note: Ensure files are in the correct chronological order (e.g., sorted by name) -#for file in $(ls "$INPUT_DIR"/rrfs.t00z.2dfld.*km.f*.$3.grib2 | sort); do -# echo "Processing: $file" - # Convert and append to the NetCDF file - # -netcdf: specifies the output format and filename - # -append: adds data to the existing netcdf file instead of overwriting -# wgrib2 "$file" -match ":UGRD:10 m" -append -netcdf "$OUTPUT_FILE" -# wgrib2 "$file" -match ":VGRD:10 m" -append -netcdf "$OUTPUT_FILE" -#done - -echo "nbm processing complete for forecast date $1, cycle $2, domain $3" -echo "output written to: $OUTPUT_FILE" diff --git a/dev/PreProcess/rrfs/MakeEnsRRFSWind.sh b/dev/PreProcess/rrfs/MakeEnsRRFSWind.sh deleted file mode 100644 index bac5ef3..0000000 --- a/dev/PreProcess/rrfs/MakeEnsRRFSWind.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/bash - -# This script takes ensemble rrfs grib2 forecast files, extracts 10m u and v wind -# components and outputs to netcdf. Comand line arguments are -# forecast time: YYYYMMDD -# forecast cycle: CC -# frecast region: hi,pr,na,ak or conus -# -# For example call as: -# sh MakeEnsRRFSWind.sh 20260428 00 pr -# to produce output file: -# rrfs.20260428.00.wind10m.pr.nc -# - -module load intel-oneapi/2022.2.0.262 -module load wgrib2/2.0.8 - -#INPUT_DIR="/lfs/h1/ops/para/com/rrfs/v1.0/rrfs.$1/$2" -OUTPUT_FILE="rrfs.ensemble.$1.$2.wind10m.$3.nc" -INPUT_DIR1="/lfs/h1/ops/para/com/rrfs/v1.0/rrfsens.$1/$2/m001/" - -for i in {1..5}; do - echo "Number: $i" - rm varname$i.txt - echo "# variable renaming for ensemble member $i">varname$i.txt - echo "UGRD:10 m above ground:UGRDn$i" >>varname$i.txt - echo "VGRD:10 m above ground:VGRDn$i" >>varname$i.txt -done - - -# Remove existing output file to avoid mixing old data -rm -f "$OUTPUT_FILE" - -echo "writing ensemble 10m wind from $INPUT_DIR1 to $OUTPUT_FILE" - -# Note: Ensure files are in the correct chronological order (e.g., sorted by name) -for file1 in $(ls "$INPUT_DIR1"/rrfs.t$2z.m001.2dfld.*km.f*.$3.grib2 | sort); do - file2="${file1//m001/m002}" - file3="${file1//m001/m003}" - file4="${file1//m001/m004}" - file5="${file1//m001/m005}" - fileN="${file1//m001/m00N}" - - echo "Processing: ensemble $fileN" - wgrib2 $file1 -match ":UGRD:10 m" -nc_table varname1.txt -append -netcdf "$OUTPUT_FILE" - wgrib2 $file1 -match ":VGRD:10 m" -nc_table varname1.txt -append -netcdf "$OUTPUT_FILE" - - wgrib2 $file2 -match ":UGRD:10 m" -nc_table varname2.txt -append -netcdf "$OUTPUT_FILE" - wgrib2 $file2 -match ":VGRD:10 m" -nc_table varname2.txt -append -netcdf "$OUTPUT_FILE" - - wgrib2 $file3 -match ":UGRD:10 m" -nc_table varname3.txt -append -netcdf "$OUTPUT_FILE" - wgrib2 $file3 -match ":VGRD:10 m" -nc_table varname3.txt -append -netcdf "$OUTPUT_FILE" - - wgrib2 $file4 -match ":UGRD:10 m" -nc_table varname4.txt -append -netcdf "$OUTPUT_FILE" - wgrib2 $file4 -match ":VGRD:10 m" -nc_table varname4.txt -append -netcdf "$OUTPUT_FILE" - - wgrib2 $file5 -match ":UGRD:10 m" -nc_table varname5.txt -append -netcdf "$OUTPUT_FILE" - wgrib2 $file5 -match ":VGRD:10 m" -nc_table varname5.txt -append -netcdf "$OUTPUT_FILE" - -# wgrib2 $file2 -nc_table varname2.txt -append -netcdf "$OUTPUT_FILE" -# wgrib2 $file3 -nc_table varname3.txt -append -netcdf "$OUTPUT_FILE" -# wgrib2 $file4 -nc_table varname4.txt -append -netcdf "$OUTPUT_FILE" -# wgrib2 $file5 -nc_table varname5.txt -append -netcdf "$OUTPUT_FILE" - - -# cat $file1 $file2 $file3 $file4 $file5 | wgrib2 - -match ":(UGRD|VGRD):10 m" -append -netcdf "$OUTPUT_FILE" -# equivalent alternates -# cat $file1 $file2 $file3 $file4 $file5 > ensemble.grib2 -# wgrib2 ensemble.grib2 -match ":UGRD:10 m" -append -netcdf "$OUTPUT_FILE" -# wgrib2 ensemble.grib2 -match ":VGRD:10 m" -append -netcdf "$OUTPUT_FILE" -# or -# cat $file1 $file2 $file3 $file4 $file5 | wgrib2 - -match ":UGRD:10 m" -append -netcdf "$OUTPUT_FILE" -# cat $file1 $file2 $file3 $file4 $file5 | wgrib2 - -match ":VGRD:10 m" -append -netcdf "$OUTPUT_FILE" -done - -echo "rrfs ensemble processing complete for forecast date $1, cycle $2, domain $3" -echo "output written to: $OUTPUT_FILE" diff --git a/dev/PreProcess/rrfs/MakeRRFSWind.sh b/dev/PreProcess/rrfs/MakeRRFSWind.sh deleted file mode 100755 index 8a12f56..0000000 --- a/dev/PreProcess/rrfs/MakeRRFSWind.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -# This script takes rrfs grib2 forecast files, extracts 10m u and v wind -# components and outputs to netcdf. Comand line arguments are -# forecast time: YYYYMMDD -# forecast cycle: CC -# frecast region: hi,pr,na,ak or conus -# -# For example call as: -# sh MakeRRFSWind.sh 20260428 00 pr -# to produce output file: -# rrfs.20260428.00.wind10m.pr.nc -# -echo "MakeRRFSWind.sh fetching rrfs : time = $1, cycle = $2, domain = $3" - -module load intel-oneapi/2022.2.0.262 -module load wgrib2/2.0.8 - -INPUT_DIR="/lfs/h1/ops/para/com/rrfs/v1.0/rrfs.$1/$2" -OUTPUT_DIR="wind.$1.$2" -OUTPUT_FILE="$OUTPUT_DIR/rrfs.$1.$2.wind10m.$3.nc" - -mkdir "$OUTPUT_DIR" -# Remove existing output file to avoid mixing old data -rm -f "$OUTPUT_FILE" - -echo "writing 10m wind from $INPUT_DIR to $OUTPUT_FILE" - -# Note: Ensure files are in the correct chronological order (e.g., sorted by name) -for file in $(ls "$INPUT_DIR"/rrfs.t$2z.2dfld.*km.f*.$3.grib2 | sort); do - echo "Processing: $file" - # Convert and append to the NetCDF file - # -netcdf: specifies the output format and filename - # -append: adds data to the existing netcdf file instead of overwriting - wgrib2 "$file" -match ":UGRD:10 m" -append -netcdf "$OUTPUT_FILE" - wgrib2 "$file" -match ":VGRD:10 m" -append -netcdf "$OUTPUT_FILE" -done - -echo "rrfs processing complete for forecast date $1, cycle $2, domain $3" -echo "output written to: $OUTPUT_FILE" diff --git a/dev/PreProcess/rtofs/GetRTOFS.sh b/dev/PreProcess/rtofs/GetRTOFS.sh deleted file mode 100755 index 9f31806..0000000 --- a/dev/PreProcess/rtofs/GetRTOFS.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=00:05:00 -#PBS -l select=1:ncpus=1:mem=8G -#PBS -l place=excl -#PBS -l debug=true - -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - -pip list -v - -date=$1 - -tmpdir="tmp.rtofs.$date" -filesin="/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs.$date/*prog.nc" -flout="rtofs.$date.nc" - -mkdir $tmpdir -cp $filesin $tmpdir/ -python rtofs/GetRTOFSfcst.py $tmpdir $flout - -#rm -rf $tmpdir diff --git a/dev/PreProcess/rtofs/GetRTOFSIce.sh b/dev/PreProcess/rtofs/GetRTOFSIce.sh deleted file mode 100755 index 8e915ce..0000000 --- a/dev/PreProcess/rtofs/GetRTOFSIce.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=00:05:00 -#PBS -l select=1:ncpus=1:mem=8G -#PBS -l place=excl -#PBS -l debug=true - - - -#"rtofs_glo_3dz_n006_6hrly_hvr_alaska.nc" - -#/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs.20260727/rtofs_glo_2ds_f186_ice.nc - -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - -pip list -v - -date=$1 -cycl=$2 - -tmpdir="tmp.rtofsIce.$date" -filesin="/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs.$date/*ice.nc" -dirout=ice.$date.$cycl -flout="$dirout/rtofs.ice.$date.nc" - -mkdir $tmpdir -cp $filesin $tmpdir/ -python rtofs/GetRTOFSIcefcst.py $tmpdir $flout - -## rm -rf $tmpdir diff --git a/dev/PreProcess/rtofs/GetRTOFSIcefcst.py b/dev/PreProcess/rtofs/GetRTOFSIcefcst.py deleted file mode 100644 index 9b7eb8d..0000000 --- a/dev/PreProcess/rtofs/GetRTOFSIcefcst.py +++ /dev/null @@ -1,107 +0,0 @@ -# aws s3 cp --no-sign-request s3://noaa-nws-rtofs-pds/rtofs.20260115/ ./rtofs_jan2026_ice/ --recursive --exclude "*" --include "*ice*" -#Consolidate ice_coverage from RTOFS forecast files -import numpy as np -import os -import netCDF4 as nc -import sys - -# Get the path relative to this file and add to sys.path -#sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'utils'))) -#import helper -sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) -import InterpUtilities as iutil - -dirin=sys.argv[1] -flout=sys.argv[2] - -ncfiles = os.listdir(dirin) -print(ncfiles) -nt=len(ncfiles) -k=0 -flin=dirin+"/"+ncfiles[k] -data=nc.Dataset(flin,"r") -X=data["Longitude"][:,:] -Y=data["Latitude"][:,:] -fill_value0=data["ice_coverage"]._FillValue -nx=X.shape[0] -ny=X.shape[1] -F=np.zeros((nt,nx,ny),dtype=np.float32) -MT=np.zeros(nt) -time=np.zeros(nt) -print("nx = "+str(nx)) -print("ny = "+str(ny)) -print(F.shape) -for k in range(nt): - flin=dirin+"/"+ncfiles[k] - - flinT=flin.replace("Ice","") - flinT=flinT.replace("ice","prog") - - print("ICE: org flin="+flin+" Time flin="+flinT) - - dataT=nc.Dataset(flinT,"r") - - data=nc.Dataset(flin,"r") - F0=data["ice_coverage"][:] -# T0=data["MT"][:] - T0=dataT["MT"][:] - - print(F0.shape) - print(F.shape) - print(str(k)+" of "+ str(nt)) - F[k,:,:]=F0[0,:,:] - MT[k]=T0 -# tmp=iutil.ConvertTimeToUnixTime(flin,"MT") - - tmp=iutil.ConvertTimeToUnixTime(flinT,"MT") - - time[k]=tmp[0] - -#-rw-r--r-- 1 keston.smith couple 64M Jul 29 17:59 tmp.rtofsIce.20260728/rtofs_glo_2ds_f007_ice.nc -#-rw-r--r-- 1 keston.smith couple 64M Jul 29 17:59 tmp.rtofsIce.20260728/rtofs_glo_2ds_n007_ice.nc -#keston.smith@dlogin06:/lfs/h2/emc/couple/noscrub/keston.smith/RWPSInterpolationUtilities> l tmp.rtofs.20260728/*007*nc -#-rw-r--r-- 1 keston.smith couple 149M Jul 29 17:49 tmp.rtofs.20260728/rtofs_glo_2ds_f007_prog.nc -#-rw-r--r-- 1 keston.smith couple 149M Jul 29 17:50 tmp.rtofs.20260728/rtofs_glo_2ds_n007_prog.nc - - - - -tindx = np.argsort(time) -time=time[tindx] -MT=MT[tindx] -F=F[tindx,:,:] - -with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: - - ncout.createDimension('X' , nx) - ncout.createDimension('Y' , ny) - ncout.createDimension('time', nt) - - lon_var=ncout.createVariable('longitude', 'f4', ('X','Y')) - var=data["Longitude"] - iutil.CopyAttributes(var, lon_var) - lon_var[:,:]=X[:,:] - - lat_var=ncout.createVariable('latitude', 'f4', ('X','Y')) - var=data["Latitude"] - iutil.CopyAttributes(var, lat_var) - lat_var[:,:]=Y[:,:] - - # Keep redundent time variables (time and MT) for conviniences - time_var=ncout.createVariable('time', 'f8', ('time',)) - time_var.units = 'seconds since 1970-01-01 00:00:00.0 0:00' - time_var.long_name = 'verification time generated by wgrib2 function verftime()' - time_var.standard_name = 'time' - time_var.axis = 'T' - time_var[:] = time[:] - - MT_var=ncout.createVariable("MT", 'f8', ('time',)) - var=data["MT"] - iutil.CopyAttributes(var, MT_var) - MT_var[:] = MT[:] - -# f_var = ncout.createVariable('ice_coverage', 'f4', ('time','X','Y'),fill_value = fill_value0) - f_var = ncout.createVariable('ICEC_surface', 'f4', ('time','X','Y'),fill_value = fill_value0) - var=data["ice_coverage"] - iutil.CopyAttributes(var, f_var) - f_var[:,:,:] = F[:,:,:] diff --git a/dev/PreProcess/rtofs/GetRTOFSfcst.py b/dev/PreProcess/rtofs/GetRTOFSfcst.py deleted file mode 100644 index 290f7e2..0000000 --- a/dev/PreProcess/rtofs/GetRTOFSfcst.py +++ /dev/null @@ -1,96 +0,0 @@ -# Consolidate u,v surface currents from -import numpy as np -import os -import netCDF4 as nc -import sys - -# Get the path relative to this file and add to sys.path -#sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'utils'))) -#import helper -sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) -import InterpUtilities as iutil - -dirin=sys.argv[1] -flout=sys.argv[2] - -ncfiles = os.listdir(dirin) -print(ncfiles) -nt=len(ncfiles) -k=0 -flin=dirin+"/"+ncfiles[k] -data=nc.Dataset(flin,"r") -X=data["Longitude"][:,:] -Y=data["Latitude"][:,:] -fill_value0=data["u_velocity"]._FillValue -nx=X.shape[0] -ny=X.shape[1] -U=np.zeros((nt,1,nx,ny)) -V=np.zeros((nt,1,nx,ny)) -MT=np.zeros(nt) -time=np.zeros(nt) -print(U.shape) -for k in range(nt): - flin=dirin+"/"+ncfiles[k] - data=nc.Dataset(flin,"r") - U0=data["u_velocity"][:] - V0=data["v_velocity"][:] - T0=data["MT"][:] - print(k) - U[k,0,:,:]=U0[0,0,:,:] - V[k,0,:,:]=V0[0,0,:,:] - MT[k]=T0 - tmp=iutil.ConvertTimeToUnixTime(flin,"MT") - time[k]=tmp[0] - -tindx = np.argsort(time) -time=time[tindx] -MT=MT[tindx] -U=U[tindx,:,:,:] -V=V[tindx,:,:,:] - -Layers=data["Layer"][:] - -with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: - - ncout.createDimension('Layer' , 1) - ncout.createDimension('X' , nx) - ncout.createDimension('Y' , ny) - ncout.createDimension('time', nt) - - lon_var=ncout.createVariable('longitude', 'f4', ('X','Y')) - var=data["Longitude"] - iutil.CopyAttributes(var, lon_var) - lon_var[:,:]=X[:,:] - - lat_var=ncout.createVariable('latitude', 'f4', ('X','Y')) - var=data["Latitude"] - iutil.CopyAttributes(var, lat_var) - lat_var[:,:]=Y[:,:] - - # Keep redundent time variables (time and MT) for conviniences - time_var=ncout.createVariable('time', 'f8', ('time',)) - time_var.units = 'seconds since 1970-01-01 00:00:00.0 0:00' - time_var.long_name = 'verification time generated by wgrib2 function verftime()' - time_var.standard_name = 'time' - time_var.axis = 'T' - time_var[:] = time[:] - - MT_var=ncout.createVariable("MT", 'f8', ('time',)) - var=data["MT"] - iutil.CopyAttributes(var, MT_var) - MT_var[:] = MT[:] - - u_var = ncout.createVariable('u-vel', 'f4', ('time','Layer','X','Y'),fill_value = fill_value0) - var=data["u_velocity"] - iutil.CopyAttributes(var, u_var) - u_var[:,:,:,:] = U - - v_var = ncout.createVariable('v-vel', 'f4', ('time','Layer','X','Y'),fill_value = fill_value0) - var=data["v_velocity"] - iutil.CopyAttributes(var, v_var) - v_var[:,:,:,:] = V - - l_var = ncout.createVariable('Layer', 'i4', ('Layer',)) - var=data["Layer"] - iutil.CopyAttributes(var, l_var) - l_var[:] = Layers[0] diff --git a/dev/PreProcess/stofs/GetSTOFS.sh b/dev/PreProcess/stofs/GetSTOFS.sh deleted file mode 100755 index 04ff98b..0000000 --- a/dev/PreProcess/stofs/GetSTOFS.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -##script for retrieving stofs current and/or water level - -date=$1 -cycl=$2 - -if [ "$#" -lt 3 ]; then - echo "No arguments field argument." - echo "Retrieving both stofs currents and stofs water level." - fields="currents,waterlevel" -else - fields=$3 -fi - -mkdir stofs.$date.$cycl - -if [[ "$fields" == *"current"* ]]; then - echo retrieving stofs current for $date cycle $cycl - cp /lfs/h1/ops/prod/com/stofs/v2.1/stofs_2d_glo.$date/stofs_2d_glo.t"$cycl"z.fields.cwl.vel.nc stofs.$date.$cycl/ -fi - -if [[ "$fields" == *"level"* ]]; then - echo retrieving stofs water level for $date cycle $cycl - cp /lfs/h1/ops/prod/com/stofs/v2.1/stofs_2d_glo.$date/stofs_2d_glo.t"$cycl"z.fields.cwl.nc stofs.$date.$cycl/ -fi - From 976fa8993081a06c5d82c18fcf9dc5f00f4d1971 Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa Date: Wed, 26 Aug 2026 14:32:45 +0000 Subject: [PATCH 20/39] resource allocation set to work for oc_500m_10km on wcoss2. Cleaned up some files --- .../ecf/compute_interpolation_weights.ecf | 40 +++--- .../sorc/ESMPy.o136957101 | 41 ------ ecf/GenerateInterpolationWeights.ecf | 127 ------------------ ecf/jrwps_prep_current.ecf | 2 +- ecf/jrwps_prep_ice.ecf | 2 +- ecf/jrwps_prep_waterlevel.ecf | 2 +- ecf/jrwps_prep_wind.ecf | 4 +- ush/preprocess/STOFS.to.rwps.oc_1500m_30km.sh | 12 -- 8 files changed, 26 insertions(+), 204 deletions(-) delete mode 100644 dev/compute_interpolation_weights/sorc/ESMPy.o136957101 delete mode 100644 ecf/GenerateInterpolationWeights.ecf delete mode 100644 ush/preprocess/STOFS.to.rwps.oc_1500m_30km.sh diff --git a/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf b/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf index 09c63a5..e7f57b8 100644 --- a/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf +++ b/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf @@ -5,10 +5,7 @@ #PBS -q dev #PBS -A NWPS-DEV #PBS -l walltime=04:00:00 -##PBS -l select=1:ncpus=8:mem=128GB -#PBS -l select=1:ncpus=16:mem=256GB -##PBS -l select=1:ncpus=32:mem=256GB -###PBS -l select=1:ncpus=1:mem=8G +#PBS -l select=1:ncpus=16:mem=500GB #PBS -l place=excl #PBS -l debug=true @@ -86,15 +83,16 @@ python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp. rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc #do not extrapolate rtofs .glo. currents -rm $rtofsIntrp.ice.nc $rtofsDst.ice.nc +rm $rtofsIntrp.current.nc $rtofsDst.current.nc python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.current.nc $rtofsDst.current.nc -1 > GenWhts.rtofs.current.out -#Old v2 of stofs -stofs_glo="$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" +#comute interpolation weights for current stofs output +mkdir -p STOFSInterpWeights.$meshname +#compute stofs weights for current(v3) stofs mesh +stofs_glo="$SID/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc" -mkdir -p STOFSInterpWeights.$meshname ## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs @@ -109,10 +107,9 @@ cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname # convert output weights to netcdf file python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 -cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.v2.nc -cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.v2.nc -mv DistToBndy.$meshname.stofs.nc DistToBndy.$meshname.stofs.v2.nc -mv InterpWeights.$meshname.stofs.nc InterpWeights.$meshname.stofs.v2.nc +cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc +cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc + rm -rf STOFSInterpWeights.$meshname rm InterpWeights.$meshname.stofs.txt @@ -120,10 +117,15 @@ rm *.out rm ESMPy* -mkdir -p STOFSInterpWeights.$meshname -#compute stofs weights for current(v3) stofs mesh -stofs_glo="$SID/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc" + +# Old v2 of stofs +# Note: stofs v3 and stofs v2 appear to use the same mesh but file sizes differ. +# There should not be any problem just useing the stofs v3 based weights for v2 output files +# v2 file: +stofs_glo="$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" + +mkdir -p STOFSInterpWeights.$meshname ## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs @@ -138,9 +140,10 @@ cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname # convert output weights to netcdf file python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 -cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc -cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc - +cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.v2.nc +cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.v2.nc +mv DistToBndy.$meshname.stofs.nc DistToBndy.$meshname.stofs.v2.nc +mv InterpWeights.$meshname.stofs.nc InterpWeights.$meshname.stofs.v2.nc rm -rf STOFSInterpWeights.$meshname rm InterpWeights.$meshname.stofs.txt @@ -148,4 +151,3 @@ rm *.out rm ESMPy* - diff --git a/dev/compute_interpolation_weights/sorc/ESMPy.o136957101 b/dev/compute_interpolation_weights/sorc/ESMPy.o136957101 deleted file mode 100644 index fce9ed5..0000000 --- a/dev/compute_interpolation_weights/sorc/ESMPy.o136957101 +++ /dev/null @@ -1,41 +0,0 @@ -PBS: Running prologue on parent mom node: nid001019... -Job 136957101.dbqs01 nodelist: nid001019 -Job 136957101.dbqs01 - Prologue complete. Execution time: 4 seconds -Agent pid 187446 -Identity added: /u/keston.smith/.ssh/id_ed25519 (keston.smith@noaa.gov) -/u/keston.smith/.bashrc: line 46: alias: eval "$(ssh-agent -s)"; ssh-add ~/.ssh/id_ed25519: not found -Resetting modules to system default. Reseting $MODULEPATH back to system default. All extra directories will be removed from $MODULEPATH. -Package Version Location Installer -------------------------- ----------- ---------------------------------------------------------------------------------- --------- -Cartopy 0.24.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -certifi 2025.1.31 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -cftime 1.6.4.post1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -contourpy 1.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -cycler 0.12.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -esmpy 8.6.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -fonttools 4.55.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -geographiclib 2.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -geopy 2.4.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -Jinja2 3.1.5 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -kiwisolver 1.4.8 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -MarkupSafe 3.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -matplotlib 3.10.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -netCDF4 1.7.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -numpy 2.2.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -packaging 24.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pandas 2.2.3 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pillow 11.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pip 25.0.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pyparsing 3.2.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pyproj 3.7.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pyshp 2.3.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -python-dateutil 2.9.0.post0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -pytz 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -PyYAML 6.0.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -scipy 1.15.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -setuptools 75.8.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -setuptools-git-versioning 2.1.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -shapely 2.0.7 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -six 1.17.0 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -tzdata 2025.1 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip -xarray 2025.1.2 /apps/prod/ve/intel/19.1.3.304/python/3.12.0/hafs/2.1/lib/python3.12/site-packages pip diff --git a/ecf/GenerateInterpolationWeights.ecf b/ecf/GenerateInterpolationWeights.ecf deleted file mode 100644 index e57cf71..0000000 --- a/ecf/GenerateInterpolationWeights.ecf +++ /dev/null @@ -1,127 +0,0 @@ -#!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=04:00:00 -##PBS -l select=1:ncpus=8:mem=128GB -#PBS -l select=1:ncpus=16:mem=256GB -###PBS -l select=1:ncpus=1:mem=8G -#PBS -l place=excl -#PBS -l debug=true - -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - -pip list -v - -cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/preprocess - -source SetMeshName - -SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" -date="20260730" -cycl="00" -Nprocs=16 - - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - -rrfs_hi=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.hi.nc -rrfs_pr=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.pr.nc -rrfs_ak=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.ak.nc -rrfs_na=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.na.nc -rrfs_conus=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.conus.nc - -out="../../fix" - - - -rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" -rrfsDst="$out/DistToBndy.$meshname.rrfs" - -#no extrapolation with rrfs forecasts -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_pr $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 > GenWhts.rrfs.pr.out -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_ak $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 > GenWhts.rrfs.ak.out -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_na $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 > GenWhts.rrfs.na.out -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_conus $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out - -nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc -nbmIntrp="$out/InterpolationWeights.$meshname.nbm" -nbmDst="$out/DistToBndy.$meshname.nbm" -#extrapolate nbm oc wind to all points -python ./compute_gridded_to_rwps_interp_weights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out - -nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc -#do not extrapolate for NBM .ak. domain -python ./compute_gridded_to_rwps_interp_weights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out - -rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc -rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" -rtofsDst="$out/DistToBndy.$meshname.rtofs" - -#extrapolate rtofs .glo. for full ice coverage - -python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out - - -rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc -#do not extrapolate rtofs .glo. currents -python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.current.nc $rtofsDst.current.nc -1 > GenWhts.rtofs.current.out - - -cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/dev/preprocess - -stofs_glo="$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" - -## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs - -## Now run parallel job script - -qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS - -wait - -#combine text file output of parallel jobs -cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt - -# convert output weights to netcdf file -python ConvertWeights2Netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 -cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.v2.nc -cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.v2.nc - - -#compute stofs weights for current(v3) stofs mesh -stofs_glo="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc" - -## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs - -## Now run parallel job script - -qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS - -wait - -#combine text file output of parallel jobs -cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt - -# convert output weights to netcdf file -python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 -cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc -cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc - - - - diff --git a/ecf/jrwps_prep_current.ecf b/ecf/jrwps_prep_current.ecf index ab283a2..a9b75be 100644 --- a/ecf/jrwps_prep_current.ecf +++ b/ecf/jrwps_prep_current.ecf @@ -4,7 +4,7 @@ #PBS -A GLWU-DEV #PBS -N RWPS.PreProc.current #PBS -j oe -#PBS -l select=1:ncpus=4:mem=64GB +#PBS -l select=1:ncpus=32:mem=64GB #PBS -o RWPS.PreProc.out cd $HOMErwps/ush/preprocess diff --git a/ecf/jrwps_prep_ice.ecf b/ecf/jrwps_prep_ice.ecf index e26250e..a052ad5 100644 --- a/ecf/jrwps_prep_ice.ecf +++ b/ecf/jrwps_prep_ice.ecf @@ -4,7 +4,7 @@ #PBS -A GLWU-DEV #PBS -N RWPS.PreProc.ice #PBS -j oe -#PBS -l select=1:ncpus=4:mem=64GB +#PBS -l select=1:ncpus=16:mem=64GB #PBS -o RWPS.PreProc.out cd $HOMErwps/ush/preprocess diff --git a/ecf/jrwps_prep_waterlevel.ecf b/ecf/jrwps_prep_waterlevel.ecf index f1110a5..f60a14f 100644 --- a/ecf/jrwps_prep_waterlevel.ecf +++ b/ecf/jrwps_prep_waterlevel.ecf @@ -4,7 +4,7 @@ #PBS -A GLWU-DEV #PBS -N RWPS.PreProc.waterlevel #PBS -j oe -#PBS -l select=1:ncpus=4:mem=64GB +#PBS -l select=1:ncpus=16:mem=64GB #PBS -o RWPS.PreProc.out cd $HOMErwps/ush/preprocess diff --git a/ecf/jrwps_prep_wind.ecf b/ecf/jrwps_prep_wind.ecf index ba97c2f..4d0152f 100644 --- a/ecf/jrwps_prep_wind.ecf +++ b/ecf/jrwps_prep_wind.ecf @@ -1,10 +1,10 @@ #!/bin/sh #PBS -q dev -#PBS -l walltime=00:59:00 +#PBS -l walltime=04:00:00 #PBS -A GLWU-DEV #PBS -N RWPS.PreProc.wind #PBS -j oe -#PBS -l select=1:ncpus=4:mem=64GB +#PBS -l select=1:ncpus=32:mem=64GB #PBS -o RWPS.PreProc.out cd $HOMErwps/ush/preprocess diff --git a/ush/preprocess/STOFS.to.rwps.oc_1500m_30km.sh b/ush/preprocess/STOFS.to.rwps.oc_1500m_30km.sh deleted file mode 100644 index 6738e36..0000000 --- a/ush/preprocess/STOFS.to.rwps.oc_1500m_30km.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -#SBATCH --job-name=STOFS_interp_masterscript - -module purge -module use /scratch4/NCEPDEV/marine/Ali.Salimi/Hera_Data/HR4-OPT/FromJessica/Keston/ICunstructuredRuns15km-implicit-450s/global-workflow/sorc/ufs_model.fd/modulefiles -module load ufs_ursa.intel -module load py-scipy/1.14.1 -module load py-netcdf4/1.7.1.post2 -pip list -# calculate interpolation weights in parallel geographically -python InterpolateSTOFS.py /lfs/h2/emc/couple/noscrub/keston.smith/SampleInput/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/preprocess/../../fix/rwps.oc_1500m_30km.msh /lfs/h2/emc/couple/noscrub/keston.smith/SampleInput/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.rwps.oc_1500m_30km.nc zeta 2 -python InterpolateSTOFS.py /lfs/h2/emc/couple/noscrub/keston.smith/SampleInput/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.vel.nc /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/preprocess/../../fix/rwps.oc_1500m_30km.msh /lfs/h2/emc/couple/noscrub/keston.smith/SampleInput/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.vel.rwps.oc_1500m_30km.nc u-vel:v-vel 2 From 8f21c8faf749728e4c75d2f0ec07288c7c39fd29 Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa Date: Wed, 26 Aug 2026 17:08:22 +0000 Subject: [PATCH 21/39] fixed a failure in dist2bnd calculation when no rwps mesh nodes fall outside of rtofs coverage. occurs only for coarse test meshes. cleaned up weight generation ecf file for clarity --- .../ecf/compute_interpolation_weights.ecf | 87 ++++++++++++++----- .../compute_gridded_to_rwps_interp_weights.py | 6 +- 2 files changed, 68 insertions(+), 25 deletions(-) diff --git a/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf b/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf index e7f57b8..c8c0917 100644 --- a/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf +++ b/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf @@ -19,14 +19,32 @@ module load netcdf-C/4.9.2 module load esmf-C/8.6.0 module load ve/hafs/2.1 - -# Compute interpolation weights and distance to boundary for a RWPS mesh. +###################################################################### +# This job computes interpolation weights and distance to boundary for +# a RWPS mesh. Currently configured for: +# nbm oc domain (wind) +# nbm ak domain (ice) +# rrfs hi domain (wind) +# rrfs pr domain (wind) +# rrfs ak domain (wind) +# rrfs conus domain (wind) +# rrfs na domain (wind) +# rtofs glo domain (surface currents, ice) +# stofs v3 (waterlevel, currents) +# +# Different sets of interpolation weights are created for rtofs ice +# and surface currents so that ice concentration can be extrapolated +# by nearest node while currents are not extrapolated into coastal +# regions outside of rtofs marine domain. +# # Files are created in local RWPS/fix directory. +###################################################################### pip list -v cd $RWPSroot/ush/preprocess +# Sample input directory SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" date="20260730" cycl="00" @@ -36,6 +54,11 @@ Nprocs=16 meshname="${mesh##*/}" meshname="${meshname: 0: -4}" + +###################################################################### +# Compute rrfs interpolation weights for interpolating wind. +# no extrapolation for rrfs forecasts. +###################################################################### rrfs_hi=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.hi.nc rrfs_pr=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.pr.nc rrfs_ak=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.ak.nc @@ -47,7 +70,6 @@ out="../../fix" rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" rrfsDst="$out/DistToBndy.$meshname.rrfs" -#no extrapolation with rrfs forecasts rm -rf $rrfsIntrp.hi.nc $rrfsDst.hi.nc __pycache__ python ./compute_gridded_to_rwps_interp_weights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out rm -rf $rrfsIntrp.pr.nc $rrfsDst.pr.nc __pycache__ @@ -59,6 +81,11 @@ python ./compute_gridded_to_rwps_interp_weights.py $rrfs_na $mesh $rrfsIntrp.na. rm -rf $rrfsIntrp.conus.nc $rrfsDst.conus.nc __pycache__ python ./compute_gridded_to_rwps_interp_weights.py $rrfs_conus $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out + +###################################################################### +# Compute nbm interpolation weights on oc domain for interpolating wind. +# Extrapolate to cover minor edge differences on south and east boundaries. +###################################################################### nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc nbmIntrp="$out/InterpolationWeights.$meshname.nbm" nbmDst="$out/DistToBndy.$meshname.nbm" @@ -67,6 +94,11 @@ nbmDst="$out/DistToBndy.$meshname.nbm" rm $nbmIntrp.oc.nc $nbmDst.oc.nc python ./compute_gridded_to_rwps_interp_weights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out + +###################################################################### +# Compute nbm interpolation weights on ak domain for interpolating ice. +# No extrapolation outside the ak region +###################################################################### nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc #do not extrapolate for NBM .ak. domain rm $nbmIntrp.ak.nc $nbmDst.ak.nc @@ -76,63 +108,69 @@ rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" rtofsDst="$out/DistToBndy.$meshname.rtofs" -#extrapolate rtofs .glo. for full ice coverage +###################################################################### +# Compute rtofs interpolation weights for interpolating ice. +# Do extrapolate rtofs .glo. for full ice coverage in near shore. +###################################################################### rm $rtofsIntrp.ice.nc $rtofsDst.ice.nc python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out +###################################################################### +# Compute rtofs interpolation weights for interpolating currents. +# Do not extrapolate into coastal regions +###################################################################### rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc #do not extrapolate rtofs .glo. currents rm $rtofsIntrp.current.nc $rtofsDst.current.nc python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.current.nc $rtofsDst.current.nc -1 > GenWhts.rtofs.current.out +###################################################################### +# Compute stofs interpolation weights for stofs v3 output +# All dates after ~ August 18 2026 +###################################################################### +stofs_glo="$SID/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc" -#comute interpolation weights for current stofs output mkdir -p STOFSInterpWeights.$meshname -#compute stofs weights for current(v3) stofs mesh -stofs_glo="$SID/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc" -## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +# First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs -## Now run parallel job script - +# Now run the parallel job script qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS - wait -#combine text file output of parallel jobs +# combine text file output of parallel jobs cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt -# convert output weights to netcdf file +# sort order of nodes and convert output weights to netcdf file python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc - +# clean up temporary directory and files rm -rf STOFSInterpWeights.$meshname rm InterpWeights.$meshname.stofs.txt rm *.out rm ESMPy* - - -# Old v2 of stofs +###################################################################### +# Compute stofs interpolation weights for old(v2) stofs output +# All dates before ~ August 18 2026 # Note: stofs v3 and stofs v2 appear to use the same mesh but file sizes differ. -# There should not be any problem just useing the stofs v3 based weights for v2 output files -# v2 file: +# There should not be any problem just useing the stofs v3 based weights for v2 output files +###################################################################### stofs_glo="$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" mkdir -p STOFSInterpWeights.$meshname -## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs -## Now run parallel job script +# First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs +# Now run parallel job script qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS - wait #combine text file output of parallel jobs @@ -142,9 +180,10 @@ cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.v2.nc cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.v2.nc -mv DistToBndy.$meshname.stofs.nc DistToBndy.$meshname.stofs.v2.nc +mv DistToBndy.$meshname.stofs.nc DistToBndy.$meshname.stofs.v2.nc mv InterpWeights.$meshname.stofs.nc InterpWeights.$meshname.stofs.v2.nc +# clean up temporary directory and files rm -rf STOFSInterpWeights.$meshname rm InterpWeights.$meshname.stofs.txt rm *.out diff --git a/ush/preprocess/compute_gridded_to_rwps_interp_weights.py b/ush/preprocess/compute_gridded_to_rwps_interp_weights.py index a7bcb3d..1821ce9 100644 --- a/ush/preprocess/compute_gridded_to_rwps_interp_weights.py +++ b/ush/preprocess/compute_gridded_to_rwps_interp_weights.py @@ -191,7 +191,11 @@ u0=np.ones(xi.shape) nan=float("nan") u0[j0]=nan -dist2bnd=iutil.CalculateDistanceToInterpEnvelope(xi,yi,u0, 1.) + +if not j0: #all points are interpolation envelope + dist2bnd=0.*xi + np.inf +else: + dist2bnd=iutil.CalculateDistanceToInterpEnvelope(xi,yi,u0, 1.) if Extrapolate: dist2bnd=0.*dist2bnd + np.inf #all points are inside boundary- No boundary with this type of extrapolation From 4848eaec83e9a1edd585a35c435712d86a502c04 Mon Sep 17 00:00:00 2001 From: keston Date: Mon, 31 Aug 2026 11:27:02 -0400 Subject: [PATCH 22/39] removed unused file jobs/GenerateInterpolationWeights.jobcard. This is now done in dev/compute_interpolation_weights --- jobs/GenerateInterpolationWeights.jobcard | 102 ---------------------- 1 file changed, 102 deletions(-) delete mode 100644 jobs/GenerateInterpolationWeights.jobcard diff --git a/jobs/GenerateInterpolationWeights.jobcard b/jobs/GenerateInterpolationWeights.jobcard deleted file mode 100644 index e78bf95..0000000 --- a/jobs/GenerateInterpolationWeights.jobcard +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=04:00:00 -##PBS -l select=1:ncpus=8:mem=128GB -#PBS -l select=1:ncpus=16:mem=256GB -###PBS -l select=1:ncpus=1:mem=8G -#PBS -l place=excl -#PBS -l debug=true - -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - -pip list -v - -cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/PreProcess - -source SetMeshName - -SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" -date="20260730" -cycl="00" -Nprocs=16 - - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - -rrfs_hi=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.hi.nc -rrfs_pr=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.pr.nc -rrfs_ak=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.ak.nc -rrfs_na=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.na.nc -rrfs_conus=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.conus.nc - -out="../../fix" - - - -rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" -rrfsDst="$out/DistToBndy.$meshname.rrfs" - -#no extrapolation with rrfs forecasts -python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out -python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_pr $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 > GenWhts.rrfs.pr.out -python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_ak $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 > GenWhts.rrfs.ak.out -python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_na $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 > GenWhts.rrfs.na.out -python ./ComputeGriddedToRWPSInterpWeights.py $rrfs_conus $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out - -nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc -nbmIntrp="$out/InterpolationWeights.$meshname.nbm" -nbmDst="$out/DistToBndy.$meshname.nbm" -#extrapolate nbm oc wind to all points -python ./ComputeGriddedToRWPSInterpWeights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out - -nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc -#do not extrapolate for NBM .ak. domain -python ./ComputeGriddedToRWPSInterpWeights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out - -rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc -rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" -rtofsDst="$out/DistToBndy.$meshname.rtofs" - -#extrapolate rtofs .glo. for full ice coverage - -python ./ComputeGriddedToRWPSInterpWeights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out - - -rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc -#do not extrapolate rtofs .glo. currents -python ./ComputeGriddedToRWPSInterpWeights.py $rtofs_cur $mesh $rtofsIntrp.currents.nc $rtofsDst.currents.nc -1 > GenWhts.rtofs.currents.out - - -cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/dev/PreProcess - -stofs_glo="$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" - -## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python ComputeUnstrToRWPSInterpWeights.py $stofs_glo $mesh $Nprocs - -## Now run parallel job script - -qsub -W block=true jobcardComputeUnstrToRWPSInterpWeightsPBS - -wait - -#combine text file output of parallel jobs -cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt - -# convert output weights to netcdf file -python ConvertWeights2Netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 -cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc -cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc From 10e8b0cfad6e81c9c2368b15e2daf5dddd635945 Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa <107580916+kestonsmith-noaa@users.noreply.github.com> Date: Thu, 3 Sep 2026 16:18:34 -0400 Subject: [PATCH 23/39] Update spd_dir_to_uv_nbm.py Added description of command line arguments --- ush/preprocess/spd_dir_to_uv_nbm.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ush/preprocess/spd_dir_to_uv_nbm.py b/ush/preprocess/spd_dir_to_uv_nbm.py index 18f5795..aa17c49 100644 --- a/ush/preprocess/spd_dir_to_uv_nbm.py +++ b/ush/preprocess/spd_dir_to_uv_nbm.py @@ -6,7 +6,11 @@ import math # Converts NBM direction and magnitude wind variables to U,V - +# Command line inputs: +# argumnent 1 is the netcdf input file name with variables: WIND_10maboveground and WDIR_10maboveground +# argumnent 2 is the netcdf output file name which will have vector wind variables: UGRD_10maboveground and VGRD_10maboveground +# call as: +# python spd_dir_to_uv_nbm.py nbm.20260502.00.wind10m.oc.nc nbm.20260502.00.wind10m.oc.uv.nc flin=sys.argv[1] flout=sys.argv[2] From 88effe37215a14b45966fc407dd9d304248928ed Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa <107580916+kestonsmith-noaa@users.noreply.github.com> Date: Thu, 3 Sep 2026 16:20:28 -0400 Subject: [PATCH 24/39] Update ecf/jrwps_prep_current.ecf Co-authored-by: Jessica Meixner --- ecf/jrwps_prep_current.ecf | 1 - 1 file changed, 1 deletion(-) diff --git a/ecf/jrwps_prep_current.ecf b/ecf/jrwps_prep_current.ecf index a9b75be..eb02cbd 100644 --- a/ecf/jrwps_prep_current.ecf +++ b/ecf/jrwps_prep_current.ecf @@ -33,7 +33,6 @@ module load wgrib2/${wgrib2_ver} module list -rm $tmp/FetchCurrent.out $tmp/ProcCurrent.out sh get_current.sh > $tmp/FetchCurrent.out sh process_current.sh > $tmp/ProcCurrent.out From 76cfdd49292a366ef8b31d08855fdf499cb64531 Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa <107580916+kestonsmith-noaa@users.noreply.github.com> Date: Thu, 3 Sep 2026 16:29:58 -0400 Subject: [PATCH 25/39] Update ecf/jrwps_prep_current.ecf remove unnecessary specific piped output files Co-authored-by: Jessica Meixner --- ecf/jrwps_prep_current.ecf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecf/jrwps_prep_current.ecf b/ecf/jrwps_prep_current.ecf index eb02cbd..3432c00 100644 --- a/ecf/jrwps_prep_current.ecf +++ b/ecf/jrwps_prep_current.ecf @@ -35,6 +35,6 @@ module list sh get_current.sh > $tmp/FetchCurrent.out -sh process_current.sh > $tmp/ProcCurrent.out +sh process_current.sh From e24200edef0019c5d8d794ffc74d1c2821d9118d Mon Sep 17 00:00:00 2001 From: keston Date: Thu, 3 Sep 2026 16:47:46 -0400 Subject: [PATCH 26/39] switched to copying time attributes in ush/preprocess/spd_dir_to_uv_nbm.py. seperated prep tasks from ecf to ecf(load modules) and jobs/JRWPS_PREP_ to execute task --- ecf/jrwps_prep_current.ecf | 8 ++------ ecf/jrwps_prep_ice.ecf | 7 +------ ecf/jrwps_prep_waterlevel.ecf | 7 +------ ecf/jrwps_prep_wind.ecf | 7 +------ jobs/JRWPS_PREP_CURRENT | 6 ++++++ jobs/JRWPS_PREP_ICE | 7 +++++++ jobs/JRWPS_PREP_WATERLEVEL | 5 +++++ jobs/JRWPS_PREP_WIND | 7 +++++++ ush/preprocess/spd_dir_to_uv_nbm.py | 6 ++---- 9 files changed, 32 insertions(+), 28 deletions(-) create mode 100644 jobs/JRWPS_PREP_CURRENT create mode 100644 jobs/JRWPS_PREP_ICE create mode 100644 jobs/JRWPS_PREP_WATERLEVEL create mode 100644 jobs/JRWPS_PREP_WIND diff --git a/ecf/jrwps_prep_current.ecf b/ecf/jrwps_prep_current.ecf index 3432c00..c176f6e 100644 --- a/ecf/jrwps_prep_current.ecf +++ b/ecf/jrwps_prep_current.ecf @@ -31,10 +31,6 @@ module load ve/hafs/${ve_hafs_ver} module load intel-oneapi/${intel_oneapi_ver} module load wgrib2/${wgrib2_ver} -module list - - -sh get_current.sh > $tmp/FetchCurrent.out -sh process_current.sh - +module list +${HOMErwps}/jobs/JRWPS_PREP_CURRENT diff --git a/ecf/jrwps_prep_ice.ecf b/ecf/jrwps_prep_ice.ecf index a052ad5..8a771be 100644 --- a/ecf/jrwps_prep_ice.ecf +++ b/ecf/jrwps_prep_ice.ecf @@ -33,9 +33,4 @@ module load wgrib2/${wgrib2_ver} module list -rm $tmp/FetchIce.out $tmp/ProcIce.out - -sh get_ice.sh > $tmp/FetchIce.out -sh process_ice.sh > $tmp/ProcIce.out - - +${HOMErwps}/jobs/JRWPS_PREP_ICE diff --git a/ecf/jrwps_prep_waterlevel.ecf b/ecf/jrwps_prep_waterlevel.ecf index f60a14f..b4ee30d 100644 --- a/ecf/jrwps_prep_waterlevel.ecf +++ b/ecf/jrwps_prep_waterlevel.ecf @@ -33,9 +33,4 @@ module load wgrib2/${wgrib2_ver} module list -rm $tmp/FetchWaterLevel.out $tmp/ProcWaterLevel.out - -sh get_waterlevel.sh > $tmp/FetchWaterLevel.out -sh process_waterlevel.sh > $tmp/ProcWaterLevel.out - - +${HOMErwps}/jobs/JRWPS_PREP_WATERLEVEL diff --git a/ecf/jrwps_prep_wind.ecf b/ecf/jrwps_prep_wind.ecf index 4d0152f..02c7e4a 100644 --- a/ecf/jrwps_prep_wind.ecf +++ b/ecf/jrwps_prep_wind.ecf @@ -33,9 +33,4 @@ module load wgrib2/${wgrib2_ver} module list -rm $tmp/FetchWind.out $tmp/ProcWind.out - -sh get_wind.sh > $tmp/FetchWind.out -sh process_wind.sh > $tmp/ProcWind.out - - +${HOMErwps}/jobs/JRWPS_PREP_WIND diff --git a/jobs/JRWPS_PREP_CURRENT b/jobs/JRWPS_PREP_CURRENT new file mode 100644 index 0000000..1457d1a --- /dev/null +++ b/jobs/JRWPS_PREP_CURRENT @@ -0,0 +1,6 @@ +#!/bin/sh + +cd $HOMErwps/ush/preprocess +sh get_current.sh +sh process_current.sh + diff --git a/jobs/JRWPS_PREP_ICE b/jobs/JRWPS_PREP_ICE new file mode 100644 index 0000000..31b77cf --- /dev/null +++ b/jobs/JRWPS_PREP_ICE @@ -0,0 +1,7 @@ +#!/bin/sh + +cd $HOMErwps/ush/preprocess +sh get_ice.sh +sh process_ice.sh + + diff --git a/jobs/JRWPS_PREP_WATERLEVEL b/jobs/JRWPS_PREP_WATERLEVEL new file mode 100644 index 0000000..0e1f6ae --- /dev/null +++ b/jobs/JRWPS_PREP_WATERLEVEL @@ -0,0 +1,5 @@ +#!/bin/sh + +cd $HOMErwps/ush/preprocess +sh get_waterlevel.sh +sh process_waterlevel.sh diff --git a/jobs/JRWPS_PREP_WIND b/jobs/JRWPS_PREP_WIND new file mode 100644 index 0000000..dcdcb4c --- /dev/null +++ b/jobs/JRWPS_PREP_WIND @@ -0,0 +1,7 @@ +#!/bin/sh + +cd $HOMErwps/ush/preprocess +sh get_wind.sh +sh process_wind.sh + + diff --git a/ush/preprocess/spd_dir_to_uv_nbm.py b/ush/preprocess/spd_dir_to_uv_nbm.py index aa17c49..72d8e10 100644 --- a/ush/preprocess/spd_dir_to_uv_nbm.py +++ b/ush/preprocess/spd_dir_to_uv_nbm.py @@ -56,10 +56,8 @@ lat_var[:]=y[:] time_var=ncout.createVariable('time', 'f8', ('time',)) - time_var.units = 'seconds since 1970-01-01 00:00:00.0 0:00' - time_var.long_name = 'verification time generated by wgrib2 function verftime()' - time_var.standard_name = 'time' - time_var.axis = 'time' + time_varin=fcst0["time"] + iutil.CopyAttributes(time_varin, time_var) time_var[:]=t[:] u_var=ncout.createVariable('UGRD_10maboveground', 'f4', ('time','lat','lon'),fill_value = fill_value0) From 80e42ee6eec9db41c4807e078c0d8d13c5756df8 Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa Date: Fri, 4 Sep 2026 14:37:01 +0000 Subject: [PATCH 27/39] moved python scripts for computing interpolation weights from ush/preprocess to dev/compute_interpolation_weights/ush. split dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf into module loading portion and dev/compute_interpolation_weights/jobs/COMPUTE_INTERPOLATION_WEIGHTS --- .../ecf/compute_interpolation_weights.ecf | 168 +---------------- .../jobs/COMPUTE_INTERPOLATION_WEIGHTS | 171 ++++++++++++++++++ .../sorc/compute_interpolation_weights.sh | 10 +- .../compute_gridded_to_rwps_interp_weights.py | 3 +- .../compute_unstr_to_rwps_interp_weights.py | 4 +- .../compute_unstr_to_rwps_interp_weights.sh | 0 .../compute_unstr_to_rwps_interp_weights0.sh | 64 ------- 7 files changed, 180 insertions(+), 240 deletions(-) create mode 100755 dev/compute_interpolation_weights/jobs/COMPUTE_INTERPOLATION_WEIGHTS rename {ush/preprocess => dev/compute_interpolation_weights/ush}/compute_gridded_to_rwps_interp_weights.py (98%) rename {ush/preprocess => dev/compute_interpolation_weights/ush}/compute_unstr_to_rwps_interp_weights.py (97%) rename {ush/preprocess => dev/compute_interpolation_weights/ush}/compute_unstr_to_rwps_interp_weights.sh (100%) delete mode 100644 ush/preprocess/compute_unstr_to_rwps_interp_weights0.sh diff --git a/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf b/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf index c8c0917..af2bc7b 100644 --- a/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf +++ b/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf @@ -19,174 +19,8 @@ module load netcdf-C/4.9.2 module load esmf-C/8.6.0 module load ve/hafs/2.1 -###################################################################### -# This job computes interpolation weights and distance to boundary for -# a RWPS mesh. Currently configured for: -# nbm oc domain (wind) -# nbm ak domain (ice) -# rrfs hi domain (wind) -# rrfs pr domain (wind) -# rrfs ak domain (wind) -# rrfs conus domain (wind) -# rrfs na domain (wind) -# rtofs glo domain (surface currents, ice) -# stofs v3 (waterlevel, currents) -# -# Different sets of interpolation weights are created for rtofs ice -# and surface currents so that ice concentration can be extrapolated -# by nearest node while currents are not extrapolated into coastal -# regions outside of rtofs marine domain. -# -# Files are created in local RWPS/fix directory. -###################################################################### - pip list -v -cd $RWPSroot/ush/preprocess - -# Sample input directory -SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" -date="20260730" -cycl="00" -Nprocs=16 - - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - - -###################################################################### -# Compute rrfs interpolation weights for interpolating wind. -# no extrapolation for rrfs forecasts. -###################################################################### -rrfs_hi=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.hi.nc -rrfs_pr=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.pr.nc -rrfs_ak=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.ak.nc -rrfs_na=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.na.nc -rrfs_conus=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.conus.nc - -out="../../fix" - -rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" -rrfsDst="$out/DistToBndy.$meshname.rrfs" - -rm -rf $rrfsIntrp.hi.nc $rrfsDst.hi.nc __pycache__ -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out -rm -rf $rrfsIntrp.pr.nc $rrfsDst.pr.nc __pycache__ -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_pr $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 > GenWhts.rrfs.pr.out -rm -rf $rrfsIntrp.ak.nc $rrfsDst.ak.nc __pycache__ -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_ak $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 > GenWhts.rrfs.ak.out -rm -rf $rrfsIntrp.na.nc $rrfsDst.na.nc __pycache__ -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_na $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 > GenWhts.rrfs.na.out -rm -rf $rrfsIntrp.conus.nc $rrfsDst.conus.nc __pycache__ -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_conus $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out - - -###################################################################### -# Compute nbm interpolation weights on oc domain for interpolating wind. -# Extrapolate to cover minor edge differences on south and east boundaries. -###################################################################### -nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc -nbmIntrp="$out/InterpolationWeights.$meshname.nbm" -nbmDst="$out/DistToBndy.$meshname.nbm" - -#extrapolate nbm oc wind to all points -rm $nbmIntrp.oc.nc $nbmDst.oc.nc -python ./compute_gridded_to_rwps_interp_weights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out - - -###################################################################### -# Compute nbm interpolation weights on ak domain for interpolating ice. -# No extrapolation outside the ak region -###################################################################### -nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc -#do not extrapolate for NBM .ak. domain -rm $nbmIntrp.ak.nc $nbmDst.ak.nc -python ./compute_gridded_to_rwps_interp_weights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out - -rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc -rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" -rtofsDst="$out/DistToBndy.$meshname.rtofs" - -###################################################################### -# Compute rtofs interpolation weights for interpolating ice. -# Do extrapolate rtofs .glo. for full ice coverage in near shore. -###################################################################### -rm $rtofsIntrp.ice.nc $rtofsDst.ice.nc -python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out - - -###################################################################### -# Compute rtofs interpolation weights for interpolating currents. -# Do not extrapolate into coastal regions -###################################################################### -rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc -#do not extrapolate rtofs .glo. currents -rm $rtofsIntrp.current.nc $rtofsDst.current.nc -python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.current.nc $rtofsDst.current.nc -1 > GenWhts.rtofs.current.out - - -###################################################################### -# Compute stofs interpolation weights for stofs v3 output -# All dates after ~ August 18 2026 -###################################################################### -stofs_glo="$SID/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc" - -mkdir -p STOFSInterpWeights.$meshname - -# First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs - -# Now run the parallel job script -qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS -wait - -# combine text file output of parallel jobs -cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt - -# sort order of nodes and convert output weights to netcdf file -python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 -cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc -cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc - -# clean up temporary directory and files -rm -rf STOFSInterpWeights.$meshname -rm InterpWeights.$meshname.stofs.txt -rm *.out -rm ESMPy* - - -###################################################################### -# Compute stofs interpolation weights for old(v2) stofs output -# All dates before ~ August 18 2026 -# Note: stofs v3 and stofs v2 appear to use the same mesh but file sizes differ. -# There should not be any problem just useing the stofs v3 based weights for v2 output files -###################################################################### -stofs_glo="$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" - -mkdir -p STOFSInterpWeights.$meshname - -# First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs - -# Now run parallel job script -qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS -wait - -#combine text file output of parallel jobs -cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt - -# convert output weights to netcdf file -python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 -cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.v2.nc -cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.v2.nc -mv DistToBndy.$meshname.stofs.nc DistToBndy.$meshname.stofs.v2.nc -mv InterpWeights.$meshname.stofs.nc InterpWeights.$meshname.stofs.v2.nc - -# clean up temporary directory and files -rm -rf STOFSInterpWeights.$meshname -rm InterpWeights.$meshname.stofs.txt -rm *.out -rm ESMPy* +$RWPSroot/dev/compute_interpolation_weights/jobs/COMPUTE_INTERPOLATION_WEIGHTS diff --git a/dev/compute_interpolation_weights/jobs/COMPUTE_INTERPOLATION_WEIGHTS b/dev/compute_interpolation_weights/jobs/COMPUTE_INTERPOLATION_WEIGHTS new file mode 100755 index 0000000..a44dd71 --- /dev/null +++ b/dev/compute_interpolation_weights/jobs/COMPUTE_INTERPOLATION_WEIGHTS @@ -0,0 +1,171 @@ +#!/bin/bash + +###################################################################### +# This job computes interpolation weights and distance to boundary for +# a RWPS mesh. Currently configured for: +# nbm oc domain (wind) +# nbm ak domain (ice) +# rrfs hi domain (wind) +# rrfs pr domain (wind) +# rrfs ak domain (wind) +# rrfs conus domain (wind) +# rrfs na domain (wind) +# rtofs glo domain (surface currents, ice) +# stofs v3 (waterlevel, currents) +# +# Different sets of interpolation weights are created for rtofs ice +# and surface currents so that ice concentration can be extrapolated +# by nearest node while currents are not extrapolated into coastal +# regions outside of rtofs marine domain. +# +# Files are created in local RWPS/fix directory. +###################################################################### + +cd $RWPSroot/dev/compute_interpolation_weights/ush + +# Sample input directory +SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" +date="20260730" +cycl="00" +Nprocs=32 + +out=$RWPSroot/fix + +meshname="${mesh##*/}" +meshname="${meshname: 0: -4}" + + +###################################################################### +# Compute rrfs interpolation weights for interpolating wind. +# no extrapolation for rrfs forecasts. +###################################################################### +rrfs_hi=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.hi.nc +rrfs_pr=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.pr.nc +rrfs_ak=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.ak.nc +rrfs_na=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.na.nc +rrfs_conus=$SID/wind.$date.$cycl/rrfs.$date.$cycl.wind10m.conus.nc + + +rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" +rrfsDst="$out/DistToBndy.$meshname.rrfs" + +rm -rf $rrfsIntrp.hi.nc $rrfsDst.hi.nc __pycache__ +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out +rm -rf $rrfsIntrp.pr.nc $rrfsDst.pr.nc __pycache__ +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_pr $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 > GenWhts.rrfs.pr.out +rm -rf $rrfsIntrp.ak.nc $rrfsDst.ak.nc __pycache__ +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_ak $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 > GenWhts.rrfs.ak.out +rm -rf $rrfsIntrp.na.nc $rrfsDst.na.nc __pycache__ +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_na $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 > GenWhts.rrfs.na.out +rm -rf $rrfsIntrp.conus.nc $rrfsDst.conus.nc __pycache__ +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_conus $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out + + +###################################################################### +# Compute nbm interpolation weights on oc domain for interpolating wind. +# Extrapolate to cover minor edge differences on south and east boundaries. +###################################################################### +nbm_oc=$SID/wind.$date.$cycl/nbm.$date.$cycl.wind10m.oc.nc +nbmIntrp="$out/InterpolationWeights.$meshname.nbm" +nbmDst="$out/DistToBndy.$meshname.nbm" + +#extrapolate nbm oc wind to all points +rm $nbmIntrp.oc.nc $nbmDst.oc.nc +python ./compute_gridded_to_rwps_interp_weights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out + + +###################################################################### +# Compute nbm interpolation weights on ak domain for interpolating ice. +# No extrapolation outside the ak region +###################################################################### +nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc +#do not extrapolate for NBM .ak. domain +rm $nbmIntrp.ak.nc $nbmDst.ak.nc +python ./compute_gridded_to_rwps_interp_weights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out + +rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc +rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" +rtofsDst="$out/DistToBndy.$meshname.rtofs" + +###################################################################### +# Compute rtofs interpolation weights for interpolating ice. +# Do extrapolate rtofs .glo. for full ice coverage in near shore. +###################################################################### +rm $rtofsIntrp.ice.nc $rtofsDst.ice.nc +python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out + + +###################################################################### +# Compute rtofs interpolation weights for interpolating currents. +# Do not extrapolate into coastal regions +###################################################################### +rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc +#do not extrapolate rtofs .glo. currents +rm $rtofsIntrp.current.nc $rtofsDst.current.nc +python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.current.nc $rtofsDst.current.nc -1 > GenWhts.rtofs.current.out + + +###################################################################### +# Compute stofs interpolation weights for stofs v3 output +# All dates after ~ August 18 2026 +###################################################################### +stofs_glo="$SID/stofs.v3/stofs.20260819.00/stofs_2d_glo.t00z.fields.cwl.nc" + +mkdir -p STOFSInterpWeights.$meshname + +# First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs + +# Now run the parallel job script +qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS +wait + +# combine text file output of parallel jobs +cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt + +# sort order of nodes and convert output weights to netcdf file +python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 +cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc +cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc + +# clean up temporary directory and files +rm -rf STOFSInterpWeights.$meshname +rm InterpWeights.$meshname.stofs.txt +rm *.out +rm ESMPy* + + +###################################################################### +# Compute stofs interpolation weights for old(v2) stofs output +# All dates before ~ August 18 2026 +# Note: stofs v3 and stofs v2 appear to use the same mesh but file sizes differ. +# There should not be any problem just useing the stofs v3 based weights for v2 output files +###################################################################### +stofs_glo="$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" + +mkdir -p STOFSInterpWeights.$meshname + +# First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) +python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs + +# Now run parallel job script +qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS +wait + +#combine text file output of parallel jobs +cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt + +# convert output weights to netcdf file +python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 +cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.v2.nc +cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.v2.nc +mv DistToBndy.$meshname.stofs.nc DistToBndy.$meshname.stofs.v2.nc +mv InterpWeights.$meshname.stofs.nc InterpWeights.$meshname.stofs.v2.nc + +# clean up temporary directory and files +rm -rf STOFSInterpWeights.$meshname +rm InterpWeights.$meshname.stofs.txt +rm *.out +rm ESMPy* + + diff --git a/dev/compute_interpolation_weights/sorc/compute_interpolation_weights.sh b/dev/compute_interpolation_weights/sorc/compute_interpolation_weights.sh index 598393e..801c7d8 100755 --- a/dev/compute_interpolation_weights/sorc/compute_interpolation_weights.sh +++ b/dev/compute_interpolation_weights/sorc/compute_interpolation_weights.sh @@ -9,7 +9,9 @@ echo 'setting paths...' export meshID=$1 -export RWPSroot="$(pwd)/../../../" + +export RWPSroot=$(cd "$(dirname "$(readlink -f -n "${BASH_SOURCE[0]}")")" && git rev-parse --show-toplevel) + export mesh="$RWPSroot/fix/rwps.$meshID.msh" @@ -19,17 +21,11 @@ export tmp="$prep/tmpfiles" export frc="$prep/forcing" export outdir=$prep -echo $RWPSroot -echo $fix $prep $tmp $outdir mkdir -p $prep mkdir -p $tmp mkdir -p $frc -echo $RWPSroot -echo $fix $prep $tmp $outdir - - #machine dependend path to rtofs, nbm, rrfs, and stofs forecast files export COMINrtofs="/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs.$PDY/" export COMINnbm="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.$PDY/$cyc/grib2" diff --git a/ush/preprocess/compute_gridded_to_rwps_interp_weights.py b/dev/compute_interpolation_weights/ush/compute_gridded_to_rwps_interp_weights.py similarity index 98% rename from ush/preprocess/compute_gridded_to_rwps_interp_weights.py rename to dev/compute_interpolation_weights/ush/compute_gridded_to_rwps_interp_weights.py index 1821ce9..4852594 100644 --- a/ush/preprocess/compute_gridded_to_rwps_interp_weights.py +++ b/dev/compute_interpolation_weights/ush/compute_gridded_to_rwps_interp_weights.py @@ -13,12 +13,13 @@ import netCDF4 as nc import sys import re -import interp_utilities as iutil import xarray as xr import esmpy import scipy.sparse as sp +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../ush/preprocess'))) + import interp_utilities as iutil # Main program diff --git a/ush/preprocess/compute_unstr_to_rwps_interp_weights.py b/dev/compute_interpolation_weights/ush/compute_unstr_to_rwps_interp_weights.py similarity index 97% rename from ush/preprocess/compute_unstr_to_rwps_interp_weights.py rename to dev/compute_interpolation_weights/ush/compute_unstr_to_rwps_interp_weights.py index ca90d7b..dd000e8 100644 --- a/ush/preprocess/compute_unstr_to_rwps_interp_weights.py +++ b/dev/compute_interpolation_weights/ush/compute_unstr_to_rwps_interp_weights.py @@ -2,9 +2,11 @@ import netCDF4 as nc import sys from scipy.interpolate import RegularGridInterpolator +import os + +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../ush/preprocess'))) import interp_utilities as iutil -import os nargin = len(sys.argv) - 1 flin=sys.argv[1] diff --git a/ush/preprocess/compute_unstr_to_rwps_interp_weights.sh b/dev/compute_interpolation_weights/ush/compute_unstr_to_rwps_interp_weights.sh similarity index 100% rename from ush/preprocess/compute_unstr_to_rwps_interp_weights.sh rename to dev/compute_interpolation_weights/ush/compute_unstr_to_rwps_interp_weights.sh diff --git a/ush/preprocess/compute_unstr_to_rwps_interp_weights0.sh b/ush/preprocess/compute_unstr_to_rwps_interp_weights0.sh deleted file mode 100644 index 8adcc4b..0000000 --- a/ush/preprocess/compute_unstr_to_rwps_interp_weights0.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=00:05:00 -#PBS -l select=1:ncpus=8:mem=128G -#PBS -l place=excl -#PBS -l debug=true - -module reset -module load PrgEnv-intel/8.5.0 -module load intel/19.1.3.304 -module load craype/2.7.17 -module load cray-mpich/8.1.19 -module load hdf5-C/1.14.0 -module load netcdf-C/4.9.2 -module load esmf-C/8.6.0 -module load ve/hafs/2.1 - -pip list -v - -##filein=$1 -##meshfile=$2 -##Nprocs=$3 - -cd /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/dev/PreProcess - -filein="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" -#meshfile="/lfs/h2/emc/couple/noscrub/keston.smith/RWPS/fix/oc_1500m_30km/20260722/rwps.oc_1500m_30km.msh" -meshfile="/lfs/h2/emc/couple/noscrub/keston.smith/RWPS/fix/oc_5km_100km/20260722/rwps.oc_5km_100km.msh" -Nprocs=32 - -meshname="${meshfile##*/}" -meshname="${meshname: 0: -4}" - - - -## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python compute_unstr_to_rwps_interp_weights.py $filein $meshfile $Nprocs - -## Now run parallel job script -## sbatch jobcardcompute_unstr_to_rwps_interp_weightsSLURM - -qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS - - -wait - -##cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > STOFS.wght.$meshname.txt -cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt - -# convert output weights to netcdf file - - -##python convert_weights_to_netcdf.py /lfs/h2/emc/couple/noscrub/keston.smith/SampleInput/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc /lfs/h2/emc/couple/noscrub/keston.smith/RWPS/fix/oc_1500m_30km/20260722/rwps.oc_1500m_30km.msh - -## Now knit output from parallel job together and write to netcdf format -## The third argument "1" indicates to write (x,y) for destination and source nodes -## to support extrapolation - -python convert_weights_to_netcdf.py $filein $meshfile 1 - From 56a8ab9ac5e00f72ab7f5abd7fd28c85f08e6f5b Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa Date: Fri, 4 Sep 2026 14:40:28 +0000 Subject: [PATCH 28/39] removed unused file compute_unstr_to_rwps_interp_weights.sh --- .../compute_unstr_to_rwps_interp_weights.sh | 29 ------------------- 1 file changed, 29 deletions(-) delete mode 100644 dev/compute_interpolation_weights/ush/compute_unstr_to_rwps_interp_weights.sh diff --git a/dev/compute_interpolation_weights/ush/compute_unstr_to_rwps_interp_weights.sh b/dev/compute_interpolation_weights/ush/compute_unstr_to_rwps_interp_weights.sh deleted file mode 100644 index ccb3630..0000000 --- a/dev/compute_interpolation_weights/ush/compute_unstr_to_rwps_interp_weights.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -#PBS -N ESMPy -#PBS -j oe -#PBS -S /bin/bash -#PBS -q dev -#PBS -A NWPS-DEV -#PBS -l walltime=00:05:00 -#PBS -l select=1:ncpus=1:mem=8G -#PBS -l place=excl -#PBS -l debug=true - -filein=$1 -meshfile=$2 -Nprocs=$3 - -## First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python compute_unstr_to_rwps_interp_weights.py $filein $meshfile $Nprocs - -## Now run parallel job script -## sbatch jobcardcompute_unstr_to_rwps_interp_weightsSLURM -qsub jobcardcompute_unstr_to_rwps_interp_weightsPBS -wait; - -## Now knit output from parallel job together and write to netcdf format -## The third argument "1" indicates to write (x,y) for destination and source nodes -## to support extrapolation - -python convert_weights_to_netcdf.py $filein $meshfile 1 - From 4aed3c2de990d85fd37279ae39fa485c65d6de06 Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa <107580916+kestonsmith-noaa@users.noreply.github.com> Date: Fri, 4 Sep 2026 10:46:03 -0400 Subject: [PATCH 29/39] Update README.txt fixed typo's in README --- dev/compute_interpolation_weights/README.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dev/compute_interpolation_weights/README.txt b/dev/compute_interpolation_weights/README.txt index 5692a46..59bec56 100644 --- a/dev/compute_interpolation_weights/README.txt +++ b/dev/compute_interpolation_weights/README.txt @@ -12,14 +12,14 @@ RWPS/fix/ Interpolation weights are created for: nbm oc domain -rrfs hi domain (used for wins) -rrfs pr domain (used for wins) -rrfs ak domain (used for wins) -rrfs na domain (used for wins) +rrfs hi domain (used for wind) +rrfs pr domain (used for wind) +rrfs ak domain (used for wind) +rrfs na domain (used for wind) rrfs conus domain (used for wind) nbm ak domain (used for ice concentration) -rtofs glo domain (used for currents without extrapolation) +rtofs glo domain (used for current without extrapolation) rtofs glo domain (used for ice with extrapolation) -stofs domain (used for waterlevel and currents) +stofs domain (used for waterlevel and current) Currently only setup to work on wcoss2. From 8b9f69605b77ff8684671e518ba76be946b7909a Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa Date: Fri, 4 Sep 2026 15:15:09 +0000 Subject: [PATCH 30/39] moved prepare_forcing.sh to ush/. Corrected header for ush/prepare_forcing.sh --- {sorc => ush}/prepare_forcing.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) rename {sorc => ush}/prepare_forcing.sh (77%) diff --git a/sorc/prepare_forcing.sh b/ush/prepare_forcing.sh similarity index 77% rename from sorc/prepare_forcing.sh rename to ush/prepare_forcing.sh index 74297db..e05d3aa 100755 --- a/sorc/prepare_forcing.sh +++ b/ush/prepare_forcing.sh @@ -1,9 +1,16 @@ #!/bin/bash + # --------------------------------------------------------------------------- # # # -# Copy external fix files that are too large to store in repository # +# Launches scripts to retrieve and process wind, currents, ice, and # +# waterlevel for an rwps forecast. Command line inputs are date cyc and # +# meshID. For example, run: # +# # +# $sh prepare_forcing 20260904 00 oc_500m_10km # +# # +# to generate forcing for mesh rwps.oc_500m_10km.msh # # # -# Last Changed : 08-15-2025 Aug 2025 # +# Last Changed : 09-04-2026 Sep 2026 # # --------------------------------------------------------------------------- # echo 'setting paths...' From 5d958497f47966cba768f471f22aba49464010fc Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa <107580916+kestonsmith-noaa@users.noreply.github.com> Date: Fri, 4 Sep 2026 11:21:05 -0400 Subject: [PATCH 31/39] Update compute_interpolation_weights.sh --- .../sorc/compute_interpolation_weights.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dev/compute_interpolation_weights/sorc/compute_interpolation_weights.sh b/dev/compute_interpolation_weights/sorc/compute_interpolation_weights.sh index 801c7d8..6c2afed 100755 --- a/dev/compute_interpolation_weights/sorc/compute_interpolation_weights.sh +++ b/dev/compute_interpolation_weights/sorc/compute_interpolation_weights.sh @@ -1,9 +1,14 @@ !/bin/bash + # --------------------------------------------------------------------------- # +# Launch scripts to compute interpolation weights for an RWPS mesh. To run: # +# # +# $sh ./compute_interpolation_weights.sh oc_500m_10km # # # -# Copy external fix files that are too large to store in repository # +# to generate interpolation weights for unstructured mesh # +# rwps.oc_500m_10km.msh. # # # -# Last Changed : 08-15-2025 Aug 2025 # +# Last Changed : 09-04-2026 # # --------------------------------------------------------------------------- # echo 'setting paths...' From 9363b14f0de15b34f83bbff6995f978347cbec7d Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa <107580916+kestonsmith-noaa@users.noreply.github.com> Date: Fri, 4 Sep 2026 11:23:54 -0400 Subject: [PATCH 32/39] Update README.txt --- dev/compute_interpolation_weights/README.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dev/compute_interpolation_weights/README.txt b/dev/compute_interpolation_weights/README.txt index 59bec56..4b5bf7f 100644 --- a/dev/compute_interpolation_weights/README.txt +++ b/dev/compute_interpolation_weights/README.txt @@ -1,10 +1,8 @@ Scripts to create interpolation weights and distance to boundary files for interpolating forcing to RWPS mesh. To run: -cd RWPS/dev/compute_interpolation_weights/sorc - -dev/compute_interpolation_weights/sorc/compute_interpolation_weights.sh -compute_interpolation_weights.sh oc_1500m_30km +$ cd RWPS/dev/compute_interpolation_weights/sorc +$ sh compute_interpolation_weights.sh oc_1500m_30km to generate interpolation files for mesh rwps.oc_1500m_30km.msh. Files will be writen to directory: RWPS/fix/ From e63f791cb045f1bd8aa4f8909d336ef14c693117 Mon Sep 17 00:00:00 2001 From: keston Date: Fri, 4 Sep 2026 12:13:34 -0400 Subject: [PATCH 33/39] moved dev/compute_interpolation_weights/sorc/compute_interpolation_weights.sh to dev/compute_interpolation_weights/ush/ --- .../{sorc => ush}/compute_interpolation_weights.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename dev/compute_interpolation_weights/{sorc => ush}/compute_interpolation_weights.sh (100%) diff --git a/dev/compute_interpolation_weights/sorc/compute_interpolation_weights.sh b/dev/compute_interpolation_weights/ush/compute_interpolation_weights.sh similarity index 100% rename from dev/compute_interpolation_weights/sorc/compute_interpolation_weights.sh rename to dev/compute_interpolation_weights/ush/compute_interpolation_weights.sh From 7842f94561258d1f5483fe5a434b9da490d5d7f6 Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa Date: Tue, 8 Sep 2026 14:25:14 +0000 Subject: [PATCH 34/39] made new scripts, jobs/JRWPS_PREP_* executeable --- jobs/JRWPS_PREP_CURRENT | 0 jobs/JRWPS_PREP_ICE | 0 jobs/JRWPS_PREP_WATERLEVEL | 0 jobs/JRWPS_PREP_WIND | 0 4 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 jobs/JRWPS_PREP_CURRENT mode change 100644 => 100755 jobs/JRWPS_PREP_ICE mode change 100644 => 100755 jobs/JRWPS_PREP_WATERLEVEL mode change 100644 => 100755 jobs/JRWPS_PREP_WIND diff --git a/jobs/JRWPS_PREP_CURRENT b/jobs/JRWPS_PREP_CURRENT old mode 100644 new mode 100755 diff --git a/jobs/JRWPS_PREP_ICE b/jobs/JRWPS_PREP_ICE old mode 100644 new mode 100755 diff --git a/jobs/JRWPS_PREP_WATERLEVEL b/jobs/JRWPS_PREP_WATERLEVEL old mode 100644 new mode 100755 diff --git a/jobs/JRWPS_PREP_WIND b/jobs/JRWPS_PREP_WIND old mode 100644 new mode 100755 From 95a511f1431dd599c6121eadaf61f7198833a08f Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa Date: Tue, 8 Sep 2026 15:19:28 +0000 Subject: [PATCH 35/39] added missing import statement in ush/preprocess/spd_dir_to_uv_nbm.py. Quieted mkdir statements where missing in preprocessing routines --- ush/preprocess/nbm/get_nbm_ice.sh | 2 +- ush/preprocess/process_wind.sh | 2 +- ush/preprocess/spd_dir_to_uv_nbm.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ush/preprocess/nbm/get_nbm_ice.sh b/ush/preprocess/nbm/get_nbm_ice.sh index ec1aa6c..1bc14ad 100755 --- a/ush/preprocess/nbm/get_nbm_ice.sh +++ b/ush/preprocess/nbm/get_nbm_ice.sh @@ -9,7 +9,7 @@ ICE_FILE="$COMINnbm/blend.t$2z.icec.ak.grib2" OUTPUT_DIR="$COMINlocal/ice.$1.$2" OUTPUT_FILE="$OUTPUT_DIR/nbm.$1.$2.ice.ak.nc" -mkdir "$OUTPUT_DIR" +mkdir -p "$OUTPUT_DIR" # Remove existing output file to avoid mixing old data rm -f "$OUTPUT_FILE" diff --git a/ush/preprocess/process_wind.sh b/ush/preprocess/process_wind.sh index 0384ad8..525cd57 100644 --- a/ush/preprocess/process_wind.sh +++ b/ush/preprocess/process_wind.sh @@ -37,7 +37,7 @@ rwps_ak="$outdir/$meshname.$PDY.$cyc.wind10m.rrfs.ak.nc" rwps_conus="$outdir/$meshname.$PDY.$cyc.wind10m.rrfs.conus.nc" -mkdir $outdir +mkdir -p $outdir ##LocalFS = [ rwps_pr, rwps_hi, rwps_ak, rwps_conus, rwps_na] # file names ##VarFS = [ 4. , 4. , 9. , 16. , 25. ] # (m m /s /s) diff --git a/ush/preprocess/spd_dir_to_uv_nbm.py b/ush/preprocess/spd_dir_to_uv_nbm.py index 72d8e10..91d46c5 100644 --- a/ush/preprocess/spd_dir_to_uv_nbm.py +++ b/ush/preprocess/spd_dir_to_uv_nbm.py @@ -4,7 +4,7 @@ import netCDF4 as nc import sys import math - +import interp_utilities as iutil # Converts NBM direction and magnitude wind variables to U,V # Command line inputs: # argumnent 1 is the netcdf input file name with variables: WIND_10maboveground and WDIR_10maboveground From e57dafc06738808423fb26601c85ceef429ef5b8 Mon Sep 17 00:00:00 2001 From: keston Date: Wed, 9 Sep 2026 15:54:13 -0400 Subject: [PATCH 36/39] seperated out routines used for computing interpolation weights --- dev/compute_interpolation_weights/README.txt | 4 +- .../ecf/compute_interpolation_weights.ecf | 2 +- .../jobs/COMPUTE_INTERPOLATION_WEIGHTS | 4 +- .../compute_gridded_to_rwps_interp_weights.py | 6 +- .../ush/compute_interpolation_weights.sh | 32 +- ...compute_interpolation_weights_utilities.py | 340 +----------------- .../compute_unstr_to_rwps_interp_weights.py | 3 +- .../ush}/convert_weights_to_netcdf.py | 2 +- ush/prepare_forcing.sh | 76 ---- ush/preprocess/README.txt | 6 - ush/preprocess/add_err_var_to_file.py | 134 ------- ush/preprocess/add_mesh_geom_to_file.py | 73 ---- ush/preprocess/bayes_forecast_update.py | 109 ------ ush/preprocess/get_current.sh | 8 - ush/preprocess/get_ice.sh | 9 - ush/preprocess/get_waterlevel.sh | 6 - ush/preprocess/get_wind.sh | 48 --- ush/preprocess/interp_time.py | 156 -------- ush/preprocess/interpolate_with_weights.py | 238 ------------ ...rpolate_with_weights_and_error_variance.py | 329 ----------------- ...interpolate_with_weights_with_fillvalue.py | 233 ------------ ush/preprocess/nbm/get_nbm_ice.sh | 21 -- ush/preprocess/nbm/make_nbm_wind.sh | 25 -- ush/preprocess/process_current.sh | 79 ---- ush/preprocess/process_ice.sh | 93 ----- ush/preprocess/process_waterlevel.sh | 32 -- ush/preprocess/process_wind.sh | 122 ------- ush/preprocess/rrfs/make_rrfs_wind.sh | 37 -- ush/preprocess/rtofs/get_rtofs.sh | 15 - ush/preprocess/rtofs/get_rtofs_fcst.py | 95 ----- ush/preprocess/rtofs/get_rtofs_ice.sh | 18 - ush/preprocess/rtofs/get_rtofs_ice_fcst.py | 127 ------- ush/preprocess/spd_dir_to_uv_nbm.py | 79 ---- ush/preprocess/stofs/get_stofs.sh | 26 -- 34 files changed, 34 insertions(+), 2553 deletions(-) rename ush/preprocess/interp_utilities.py => dev/compute_interpolation_weights/ush/compute_interpolation_weights_utilities.py (55%) rename {ush/preprocess => dev/compute_interpolation_weights/ush}/convert_weights_to_netcdf.py (98%) delete mode 100755 ush/prepare_forcing.sh delete mode 100644 ush/preprocess/README.txt delete mode 100644 ush/preprocess/add_err_var_to_file.py delete mode 100644 ush/preprocess/add_mesh_geom_to_file.py delete mode 100644 ush/preprocess/bayes_forecast_update.py delete mode 100644 ush/preprocess/get_current.sh delete mode 100644 ush/preprocess/get_ice.sh delete mode 100644 ush/preprocess/get_waterlevel.sh delete mode 100644 ush/preprocess/get_wind.sh delete mode 100644 ush/preprocess/interp_time.py delete mode 100644 ush/preprocess/interpolate_with_weights.py delete mode 100644 ush/preprocess/interpolate_with_weights_and_error_variance.py delete mode 100644 ush/preprocess/interpolate_with_weights_with_fillvalue.py delete mode 100755 ush/preprocess/nbm/get_nbm_ice.sh delete mode 100755 ush/preprocess/nbm/make_nbm_wind.sh delete mode 100644 ush/preprocess/process_current.sh delete mode 100644 ush/preprocess/process_ice.sh delete mode 100644 ush/preprocess/process_waterlevel.sh delete mode 100644 ush/preprocess/process_wind.sh delete mode 100755 ush/preprocess/rrfs/make_rrfs_wind.sh delete mode 100755 ush/preprocess/rtofs/get_rtofs.sh delete mode 100644 ush/preprocess/rtofs/get_rtofs_fcst.py delete mode 100755 ush/preprocess/rtofs/get_rtofs_ice.sh delete mode 100644 ush/preprocess/rtofs/get_rtofs_ice_fcst.py delete mode 100644 ush/preprocess/spd_dir_to_uv_nbm.py delete mode 100755 ush/preprocess/stofs/get_stofs.sh diff --git a/dev/compute_interpolation_weights/README.txt b/dev/compute_interpolation_weights/README.txt index 4b5bf7f..0004b0e 100644 --- a/dev/compute_interpolation_weights/README.txt +++ b/dev/compute_interpolation_weights/README.txt @@ -1,11 +1,11 @@ Scripts to create interpolation weights and distance to boundary files for interpolating forcing to RWPS mesh. To run: -$ cd RWPS/dev/compute_interpolation_weights/sorc +$ cd RWPS/dev/compute_interpolation_weights/ush $ sh compute_interpolation_weights.sh oc_1500m_30km to generate interpolation files for mesh rwps.oc_1500m_30km.msh. Files will be writen to directory: -RWPS/fix/ +RWPS/interpolation_weights Interpolation weights are created for: diff --git a/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf b/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf index af2bc7b..b5a8475 100644 --- a/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf +++ b/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf @@ -21,6 +21,6 @@ module load ve/hafs/2.1 pip list -v -$RWPSroot/dev/compute_interpolation_weights/jobs/COMPUTE_INTERPOLATION_WEIGHTS +$HOMErwps/dev/compute_interpolation_weights/jobs/COMPUTE_INTERPOLATION_WEIGHTS diff --git a/dev/compute_interpolation_weights/jobs/COMPUTE_INTERPOLATION_WEIGHTS b/dev/compute_interpolation_weights/jobs/COMPUTE_INTERPOLATION_WEIGHTS index a44dd71..6643c81 100755 --- a/dev/compute_interpolation_weights/jobs/COMPUTE_INTERPOLATION_WEIGHTS +++ b/dev/compute_interpolation_weights/jobs/COMPUTE_INTERPOLATION_WEIGHTS @@ -21,7 +21,7 @@ # Files are created in local RWPS/fix directory. ###################################################################### -cd $RWPSroot/dev/compute_interpolation_weights/ush +cd $HOMErwps/dev/compute_interpolation_weights/ush # Sample input directory SID="/lfs/h2/emc/couple/noscrub/keston.smith/SampleInput" @@ -29,8 +29,6 @@ date="20260730" cycl="00" Nprocs=32 -out=$RWPSroot/fix - meshname="${mesh##*/}" meshname="${meshname: 0: -4}" diff --git a/dev/compute_interpolation_weights/ush/compute_gridded_to_rwps_interp_weights.py b/dev/compute_interpolation_weights/ush/compute_gridded_to_rwps_interp_weights.py index 4852594..60e8320 100644 --- a/dev/compute_interpolation_weights/ush/compute_gridded_to_rwps_interp_weights.py +++ b/dev/compute_interpolation_weights/ush/compute_gridded_to_rwps_interp_weights.py @@ -8,19 +8,15 @@ import numpy as np import os - -import datetime import netCDF4 as nc import sys -import re - import xarray as xr import esmpy import scipy.sparse as sp sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../ush/preprocess'))) -import interp_utilities as iutil +import compute_interpolation_weights_utilities as iutil # Main program AddExtrapolationSupport=True diff --git a/dev/compute_interpolation_weights/ush/compute_interpolation_weights.sh b/dev/compute_interpolation_weights/ush/compute_interpolation_weights.sh index 6c2afed..8f7fc06 100755 --- a/dev/compute_interpolation_weights/ush/compute_interpolation_weights.sh +++ b/dev/compute_interpolation_weights/ush/compute_interpolation_weights.sh @@ -15,39 +15,27 @@ echo 'setting paths...' export meshID=$1 -export RWPSroot=$(cd "$(dirname "$(readlink -f -n "${BASH_SOURCE[0]}")")" && git rev-parse --show-toplevel) +export HOMErwps=$(cd "$(dirname "$(readlink -f -n "${BASH_SOURCE[0]}")")" && git rev-parse --show-toplevel) -export mesh="$RWPSroot/fix/rwps.$meshID.msh" +export mesh="$HOMErwps/fix/rwps.$meshID.msh" +export fix="$HOMErwps/fix" +export out=$HOMErwps/interpolation_weights -export fix="$RWPSroot/fix" -export prep="$RWPSroot/PrepInputs" -export tmp="$prep/tmpfiles" -export frc="$prep/forcing" -export outdir=$prep - -mkdir -p $prep -mkdir -p $tmp -mkdir -p $frc - - -#machine dependend path to rtofs, nbm, rrfs, and stofs forecast files -export COMINrtofs="/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs.$PDY/" -export COMINnbm="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.$PDY/$cyc/grib2" -export COMINrrfs="/lfs/h1/ops/prod/com/rrfs/v1.0/rrfs.$PDY/$cyc" -export COMINstofs="/lfs/h1/ops/prod/com/stofs/v3.1/stofs_2d_glo.$PDY" - -export COMINlocal=$tmp +mkdir -p $out #machine dependend path to RWPS fix files export RWPSfix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPS # copy mesh to local fix directory -cp -p $RWPSfix/fix/$meshID/20260722/rwps.$meshID.msh $RWPSroot/fix/ +#cp -p $RWPSfix/fix/$meshID/20260722/rwps.$meshID.msh $HOMErwps/fix/ +#sh $HOMErwps/get_externals.sh + +$HOMErwps/sorc/link_workflow.sh meshname="${mesh##*/}" export meshname="${meshname: 0: -4}" #Retrieve current and process for forecast cycle -qsub -V $RWPSroot/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf +qsub -V $HOMErwps/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf diff --git a/ush/preprocess/interp_utilities.py b/dev/compute_interpolation_weights/ush/compute_interpolation_weights_utilities.py similarity index 55% rename from ush/preprocess/interp_utilities.py rename to dev/compute_interpolation_weights/ush/compute_interpolation_weights_utilities.py index 909a8f9..c66034a 100644 --- a/ush/preprocess/interp_utilities.py +++ b/dev/compute_interpolation_weights/ush/compute_interpolation_weights_utilities.py @@ -1,88 +1,5 @@ -from scipy.interpolate import RegularGridInterpolator -from scipy.sparse import csr_matrix -from scipy.sparse.csgraph import connected_components - -from datetime import datetime import numpy as np import netCDF4 as nc -import sys -import re - -#Convert Time to "seconds since 1970-01-01 00:00:00.0" -#eg 'seconds since 2024-04-04 12:00:00 ! NCDASE - BASE_DAT' -def ConvertTimeToUnixTime(flin,TimeVarName = None): - if TimeVarName == None: - TimeVarName="time" - data = nc.Dataset(flin,"r") - #print("TimeVarName = "+TimeVarName) - timevar=data[TimeVarName] - time=np.asarray(data[TimeVarName][:]) - epoch_1970 = datetime(1970, 1, 1, 0, 0, 0) - TimeUnitsString=timevar.units - TimeUnitsStrings=TimeUnitsString.split(" ") - tunits=TimeUnitsStrings[0] - dstr=TimeUnitsStrings[2] - dstr=dstr.split("-") - tstr=TimeUnitsStrings[3] - tstr=tstr.split(":") - print(dstr) - print(tstr) - secstr=tstr[2].rsplit(".", 1)[0] - base_date = datetime(int(dstr[0]),int(dstr[1]),int(dstr[2]),int(tstr[0]),int(tstr[1]),int(secstr)) - base_offset = int((base_date - epoch_1970).total_seconds()) - if tunits=="seconds": - unix_time = time + base_offset - if tunits=="days": - unix_time = time*24*60*60 + base_offset - if tunits=="hours": - unix_time = time*60*60 + base_offset - return unix_time - -def FileNameToUnixTime(flin,FcastPDY,FcastCYC): - year0=int(FcastPDY[0:4]) - month0=int(FcastPDY[4:6]) - day0=int(FcastPDY[6:8]) - hr0=int(FcastCYC) - #remove path and file - suffixp = flin.rfind(".") - dirp = flin.rfind("/") - flin=flin[dirp+1:suffixp] - - IsForecast=True - ntimep=flin.find(".f") - ntimeu=flin.find("_f") - ntime=max(ntimep,ntimeu) - print("ntime: "+str(ntime)) - if ntime<1: - IsForecast=False - ntimep=flin.find(".n") - ntimeu=flin.find("_n") - ntime=max(ntimep,ntimeu) - - print("ntime: "+str(ntime)) - ctime=flin[ntime+2:ntime+5] - print(ctime) - ctime=ctime.replace(".", "") #remove trailing "." in some file names - - print("FileNameToUnixTime A:") - print(flin) - print(ctime) - hrf=int(ctime) - epoch_1970 = datetime(1970, 1, 1, 0, 0, 0) - FileTime = datetime(year0,month0,day0, hr0, 0, 0) - base_offset = int((FileTime - epoch_1970).total_seconds()) - if IsForecast: - unix_time = base_offset + abs(hrf)*3600 - else: - unix_time = base_offset - abs(hrf)*3600 - - print("FileNameToUnixTime:") - print(str(year0)+" "+str(month0)+ " " +str(day0) + " " +str(hr0)) - print(flin) - print(ctime) - print(base_offset) - print(hrf) - return unix_time def loadWW3Mesh(fl): print("mesh file="+fl) @@ -124,9 +41,7 @@ def loadWW3Mesh(fl): k=0 for i in range(ne): A = f.readline() - #print(A) values = A.split(" ") - #print(values) if len(values) == 6: if int(values[2])==2: bnd.append(int(values[5])) @@ -146,149 +61,15 @@ def loadWW3Mesh(fl): print("number of elements read: "+str(k)) return xi, yi, ei, zi - -import numpy as np -from scipy.interpolate import griddata -#import matplotlib.pyplot as plt - -def interpolate_curvilinear_to_points(lon_in, lat_in, data_in, lon_out, lat_out): - """ - Performs bilinear-equivalent interpolation from a curvilinear grid to new points. - - Args: - lon_in (np.ndarray): 2D array of input longitudes. - lat_in (np.ndarray): 2D array of input latitudes. - data_in (np.ndarray): 2D array of data values corresponding to (lon_in, lat_in). - lon_out (np.ndarray or list): Longitudes of the target points. - lat_out (np.ndarray or list): Latitudes of the target points. - - Returns: - np.ndarray: Interpolated data values at the target points. - """ - # Flatten the input coordinates and data into 1D arrays - # griddata expects points as a list of (x, y) tuples or a 2D array - points_in = np.vstack((lon_in.flatten(), lat_in.flatten())).T - values_in = data_in.flatten() - - # Define the target points - points_out = np.vstack((lon_out, lat_out)).T - - # Perform the interpolation using scipy.interpolate.griddata with 'linear' method - # The 'linear' method in griddata is the appropriate choice for curvilinear data - # as it uses triangulation. - interpolated_data = griddata(points_in, values_in, points_out, method='linear') - - return interpolated_data - - -def interpolate_curvilinear_to_pointsMD(lon_in, lat_in, data_in, lon_out, lat_out): - """ - Performs bilinear-equivalent interpolation from a curvilinear grid to new points. - - Args: - lon_in (np.ndarray): 2D array of input longitudes. - lat_in (np.ndarray): 2D array of input latitudes. - data_in (np.ndarray): 3D array of data values corresponding to (lon_in, lat_in, ntimes). - lon_out (np.ndarray or list): Longitudes of the target points. - lat_out (np.ndarray or list): Latitudes of the target points. - - Returns: - np.ndarray: Interpolated data values at the target points (length(lon_out/lat_out x ntimes)). - """ - # Flatten the input coordinates and data into 1D arrays - # griddata expects points as a list of (x, y) tuples or a 2D array - points_in = np.vstack((lon_in.flatten(), lat_in.flatten())).T - - shp=data_in.shape - print(shp) - nx=shp[0] - ny=shp[1] - nt=shp[2] - - ns=nx*ny - S=np.zeros((ns,nt)) - s0=np.zeros((nx,ny)) - for k in range(nt): - s0[:,:]=np.transpose(data_in[:,:,k]) - S[:,k] = s0.flatten() - - # Define the target points - points_out = np.vstack((lon_out, lat_out)).T - - # Perform the interpolation using scipy.interpolate.griddata with 'linear' method - # The 'linear' method in griddata is the appropriate choice for curvilinear data - # as it uses triangulation. - interpolated_data = griddata(points_in, S, points_out, method='linear') - - return interpolated_data - - -def interpolate_curvilinear_to_pointsRRFS(lon_in, lat_in, data_in, lon_out, lat_out): - """ - Performs bilinear-equivalent interpolation from a curvilinear grid to new points. - - Args: - lon_in (np.ndarray): 2D array of input longitudes. - lat_in (np.ndarray): 2D array of input latitudes. - data_in (np.ndarray): 3D array of data values corresponding to (lon_in, lat_in, ntimes). - lon_out (np.ndarray or list): Longitudes of the target points. - lat_out (np.ndarray or list): Latitudes of the target points. - - Returns: - np.ndarray: Interpolated data values at the target points (length(lon_out/lat_out x ntimes)). - """ - # Flatten the input coordinates and data into 1D arrays - # griddata expects points as a list of (x, y) tuples or a 2D array - - points_in = np.vstack((lon_in.flatten(), lat_in.flatten())).T - # points_in = np.hstack((lon_in.flatten(), lat_in.flatten())) - - shp=data_in.shape - print(shp) - nx=shp[0] - ny=shp[1] - nt=shp[2] - - ns=nx*ny - S=np.zeros((ns,nt)) - s0=np.zeros((ny,nx)) - for k in range(nt): - s0[:,:]=np.transpose(data_in[:,:,k]) - S[:,k] = s0.flatten() - - # Define the target points - points_out = np.vstack((lon_out, lat_out)).T - - # Perform the interpolation using scipy.interpolate.griddata with 'linear' method - # The 'linear' method in griddata is the appropriate choice for curvilinear data - # as it uses triangulation. - print(S.shape) - print(points_in) - print(points_out) - - interpolated_data = griddata(points_in, S, points_out, method='linear') - - return interpolated_data - -def CopyAttributes(VarOld, VarNew): - #Copy attributes from old NetCDF file variable to new NetCDF file variable - att_names = VarOld.ncattrs() - for jatt in range(len(att_names)): - att_name=att_names[jatt] - if (not (att_name=="_FillValue")): - att_value = VarOld.getncattr(att_name) - VarNew.setncattr(att_name, att_value) - return - - ############################################################################################ # BEGIN WIND TO RWPS INTERP ROUTINES import esmpy -import scipy.sparse as sp def CurvilinearGridCreateInterpWeights(xi,yi,x1,y1, weights_file): # Compute interpolation weights to interpolate from curvilinear grid (x1,y1) to points (xi,yi) # and store in netcdf file using ESMPY + debuging_output=False + nx,ny=x1.shape nn=len(xi) n1=nx*ny @@ -329,10 +110,12 @@ def CurvilinearGridCreateInterpWeights(xi,yi,x1,y1, weights_file): src_field = esmpy.Field(src_grid, name="src_field") dst_field = esmpy.Field(dst_grid, name="dst_field") src_field.data[...]=np.sqrt(np.abs(x1/180))/(90+y1) # arbitrary function of x,y - - np.savetxt('F.txt', src_field.data[...]) - np.savetxt('X.txt', x1) - np.savetxt('Y.txt', y1) + + if debuging_output: + np.savetxt('F.txt', src_field.data[...]) + np.savetxt('X.txt', x1) + np.savetxt('Y.txt', y1) + print(f"Creating weights: {weights_file}") regrid = esmpy.Regrid( src_field, @@ -347,35 +130,13 @@ def CurvilinearGridCreateInterpWeights(xi,yi,x1,y1, weights_file): ds.Nrows = nn ds.Ncols = n1 - np.savetxt('Fi.txt', dst_field.data[...]) - np.savetxt('xi.txt', xi) - np.savetxt('yi.txt', yi) + if debuging_output: + np.savetxt('Fi.txt', dst_field.data[...]) + np.savetxt('xi.txt', xi) + np.savetxt('yi.txt', yi) return -def CalculateDistanceToBoundary(xi,yi,x1,y1): -# Distance to boundary calculation for use when interpolation envelope corresponds with -# interior of curvilinear grid boundary. -# -# Inputs: -# xi (nn): longitude of unstructured mesh nodes -# yi (nn): latitude of unstructured mesh nodes -# x1 (nx x ny): longitude for interpoltated field -# y1 (nx x ny): latitude for interpoltated field -# -# Outputs: -# dist2bnd (nn) : distance to edge of interpolation envelope. - nx=x1.shape[0] - ny=x1.shape[1] - xb=np.hstack((x1[1,:],x1[:,ny-1].T,x1[nx-1,:],x1[:,1].T)) - yb=np.hstack((y1[1,:],y1[:,ny-1].T,y1[nx-1,:],y1[:,1].T)) - np.savetxt('xbyb.txt', np.vstack((xb,yb))) - dist2bnd=np.zeros(nn) - for k in range(nn): - dist2bnd[k]=QuickDistance(yi[k],xi[k],yb,xb) - if k%10000==0: - print("calculating distance to boundary, "+str(k)+":"+ str(nn)+":"+str(k/nn) ) - return dist2bnd def CalculateDistanceToInterpEnvelope(xi,yi,fi,SearchWidth): # Alternative distance to boundary calculation for use when interpolation envelope is @@ -422,34 +183,6 @@ def QuickDistance(lat1, lon1, lats2, lons2): d= np.min( np.sqrt( ( (lat1-lats2)*deg2kmY)**2 + ((lon1-lons2)*deg2kmX)**2 ) ) return d -def VarianceLinearDistanceToBndy(DistanceToBoundary, InteriorVariance, VarianceOnBoundary, LengthScale): - InteriorNodeList=np.where(DistanceToBoundary**2 >= 0 ) - Variance=np.zeros(len(DistanceToBoundary))+np.inf - SpatialFunction=DistanceToBoundary/LengthScale - j=np.where(SpatialFunction>1.) - SpatialFunction[j]=1. - Variance[InteriorNodeList] = VarianceOnBoundary + ( InteriorVariance - VarianceOnBoundary ) * SpatialFunction[InteriorNodeList] - return Variance - -def VarianceInverseDistanceToBndy( DistanceToBoundary, InteriorVariance, LengthScale): - InteriorNodeList=np.where(DistanceToBoundary**2 >= 0 ) - Variance=np.zeros(len(DistanceToBoundary))+np.inf - SpatialFunction=LengthScale / DistanceToBoundary - j=np.where(SpatialFunction>1.) - SpatialFunction[j]=1. - Variance[InteriorNodeList] = InteriorVariance * SpatialFunction[InteriorNodeList] - return Variance - -def VarianceLinearDepth(zi,VarianceShallow,VarianceDeep,Zshallow,Zdeep): - Variance = VarianceShallow + (VarianceDeep-VarianceShallow)*(zi-Zshallow)/(Zdeep-Zshallow) - js=np.where(ziZdeep) - Variance[js]=VarianceShallow - Variance[jd]=VarianceDeep - return Variance - -import numpy as np -import netCDF4 as nc def WriteInterpolationWeightsToNetCDF(weights_file,row,col,weights,Nrows,Ncols): #create a esmpy style sparse matrix netcdf file print(Nrows) @@ -567,15 +300,13 @@ def compute_mesh_to_mesh_interp_weights(x, y, e, xi, yi): deg2kmY=111. UseNearestEle = False #if True just use closest element center N = 12 # search N nearest elements (nearest by element center to target node distance) - - print(xi) + x = np.asarray(x) y = np.asarray(y) e = np.asarray(e) xi = np.asarray(xi) yi = np.asarray(yi) - print("e.shape") - print(e.shape) + # convert node indexs to 0 .. nn-1 e0=e-1 @@ -647,20 +378,6 @@ def compute_mesh_to_mesh_interp_weights(x, y, e, xi, yi): return weights, nodes, elenum, Dist2EleCenter -def InterpolateField2Nodes(nodes,weights, f): - fi=np.zeros(weights.shape[0]) - for k in range(weights.shape[0]): - fl=f[nodes[k,:]] - wl=weights[k,:] - fi[k]=np.dot(wl,fl) - if (not np.abs(fi[k]) > 0.): - fi[k]=0. - if ( fi[k]>np.max(fl) ): - fi[k]=np.max(fl) - if ( fi[k]cd $PBS_O_WORKDIR @@ -685,7 +402,6 @@ def WriteInterpJobscriptPBS(fl,flin,mshfl,Njobs, ComputeNodes): f.write("#PBS -l walltime=01:00:00\n") f.write("#PBS -J 1-"+str(Njobs)+"\n") f.write("#PBS -l select=2:ncpus=32:mem=128gb\n") -# f.write("#PBS -l select=1:ncpus=1:mem=8G\n") f.write("#PBS -l place=excl\n") f.write("#PBS -l debug=true\n") f.write("#PBS -r y\n") @@ -735,30 +451,8 @@ def WriteInterpJobscriptSLURM(fl,flin,mshfl,Njobs, ComputeNodes): f.write("module load py-scipy/1.14.1 \n") f.write("module load py-netcdf4/1.7.1.post2 \n") f.write("pip list \n") - f.write("# calculate interpolation weights in parallel geographically \n") - f.write("srun python GeoSubsetInterpolateSTOFS.py "+flin+" "+mshfl+" $SLURM_ARRAY_TASK_ID " + str(Njobs)+" > InterpJob.$SLURM_ARRAY_TASK_ID.out \n") - f.write("wait\n") - f.write("# concatonate different parts of the mesh to common text file \n") - f.write("cat "+TmpOutDir+"/Part.IntrpWghts.*.txt > "+WghtFl+" \n") - f.write("# convert output weights to netcdf file \n") - f.write("python convert_weights_to_netcdf.py "+flin+" "+mshfl+" \n") + current_dir = os.getcwd() + f.write("cd "+current_dir+"\n") - - flintrp="STOFS.to."+mshfl[meshslash:len(mshfl)-4]+".sh" - flout=flin[0:-2]+mshfl[meshslash:len(mshfl)-4]+".nc" - flinuv=flin[0:-3]+".vel.nc" - floutuv=flinuv[0:-2]+mshfl[meshslash:len(mshfl)-4]+".nc" - with open(flintrp, 'w') as f: - f.write("#!/bin/bash \n") - f.write("#SBATCH --job-name=STOFS_interp_masterscript \n") - f.write(" \n") - f.write("module purge \n") - f.write("module use /scratch4/NCEPDEV/marine/Ali.Salimi/Hera_Data/HR4-OPT/FromJessica/Keston/ICunstructuredRuns15km-implicit-450s/global-workflow/sorc/ufs_model.fd/modulefiles \n") - f.write("module load ufs_ursa.intel \n") - f.write("module load py-scipy/1.14.1 \n") - f.write("module load py-netcdf4/1.7.1.post2 \n") - f.write("pip list \n") f.write("# calculate interpolation weights in parallel geographically \n") - f.write("python InterpolateSTOFS.py "+flin+" "+mshfl+" "+flout+" zeta 2\n") - f.write("python InterpolateSTOFS.py "+flinuv+" "+mshfl+" "+floutuv+" u-vel:v-vel 2\n") - + f.write("python compute_unstr_to_rwps_interp_weights.py "+flin+" "+mshfl+" $SLURM_ARRAY_TASK_ID " + str(Njobs)+" > InterpJob.$SLURM_ARRAY_TASK_ID.out \n") diff --git a/dev/compute_interpolation_weights/ush/compute_unstr_to_rwps_interp_weights.py b/dev/compute_interpolation_weights/ush/compute_unstr_to_rwps_interp_weights.py index dd000e8..c4346b0 100644 --- a/dev/compute_interpolation_weights/ush/compute_unstr_to_rwps_interp_weights.py +++ b/dev/compute_interpolation_weights/ush/compute_unstr_to_rwps_interp_weights.py @@ -1,11 +1,10 @@ import numpy as np import netCDF4 as nc import sys -from scipy.interpolate import RegularGridInterpolator import os sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../ush/preprocess'))) -import interp_utilities as iutil +import compute_interpolation_weights_utilities as iutil nargin = len(sys.argv) - 1 diff --git a/ush/preprocess/convert_weights_to_netcdf.py b/dev/compute_interpolation_weights/ush/convert_weights_to_netcdf.py similarity index 98% rename from ush/preprocess/convert_weights_to_netcdf.py rename to dev/compute_interpolation_weights/ush/convert_weights_to_netcdf.py index 7d1ee50..6d346e6 100644 --- a/ush/preprocess/convert_weights_to_netcdf.py +++ b/dev/compute_interpolation_weights/ush/convert_weights_to_netcdf.py @@ -1,7 +1,7 @@ import numpy as np import netCDF4 as nc import sys -import interp_utilities as iutil +import compute_interpolation_weights_utilities as iutil import scipy.sparse as sp nargin = len(sys.argv) - 1 diff --git a/ush/prepare_forcing.sh b/ush/prepare_forcing.sh deleted file mode 100755 index e05d3aa..0000000 --- a/ush/prepare_forcing.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash - -# --------------------------------------------------------------------------- # -# # -# Launches scripts to retrieve and process wind, currents, ice, and # -# waterlevel for an rwps forecast. Command line inputs are date cyc and # -# meshID. For example, run: # -# # -# $sh prepare_forcing 20260904 00 oc_500m_10km # -# # -# to generate forcing for mesh rwps.oc_500m_10km.msh # -# # -# Last Changed : 09-04-2026 Sep 2026 # -# --------------------------------------------------------------------------- # - -echo 'setting paths...' - -export PDY=$1 -export cyc=$2 -export meshID=$3 - -readonly HOMErwps=$(cd "$(dirname "$(readlink -f -n "${BASH_SOURCE[0]}")")" && git rev-parse --show-toplevel) -cd "${HOMErwps}/sorc" || exit 1 - -source "${HOMErwps}/ush/detect_machine.sh" -source "${HOMErwps}/ush/module-setup.sh" -#source "${HOMErwps}/versions/build.ver" - -export MACHINE_ID -export HOMErwps - -if [[ -z "${MACHINE_ID}" ]]; then - echo "FATAL: Unable to determine target machine" - exit 1 -fi - - -export mesh="$HOMErwps/fix/rwps.$meshID.msh" -export fix="$HOMErwps/fix" -export prep="$HOMErwps/PrepInputs" -export tmp="$prep/tmpfiles" -export frc="$prep/forcing" -export outdir=$prep - -echo $HOMErwps -echo $fix $prep $tmp $outdir -mkdir -p $prep -mkdir -p $tmp -mkdir -p $frc - -#machine dependend path to rtofs, nbm, rrfs, and stofs forecast files -export COMINrtofs="/lfs/h1/ops/prod/com/rtofs/v2.5/rtofs.$PDY/" -export COMINnbm="/lfs/h3/mdl/ptmp/mdl.nbm/blend/v5.2/blend.$PDY/$cyc/grib2" -export COMINrrfs="/lfs/h1/ops/prod/com/rrfs/v1.0/rrfs.$PDY/$cyc" -export COMINstofs="/lfs/h1/ops/prod/com/stofs/v3.1/stofs_2d_glo.$PDY" - -export COMINlocal=$tmp - -#machine dependend path to RWPS fix files -export RWPSfix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPS - -# copy mesh to local fix directory -cp -p $RWPSfix/fix/$meshID/20260722/rwps.$meshID.msh $HOMErwps/fix/ -# copy Interpoplation weights for nbm, rrfs, rtofs and stofs to local fix directory -cp -p $RWPSfix/fix/$meshID/20260722/InterpolationWeights*$meshID*.nc $HOMErwps/fix/ -# copy distance to boundary for nbm, rrfs, rtofs and stofs to local fix directory -cp -p $RWPSfix/fix/$meshID/20260722/DistToBndy*$meshID*.nc $HOMErwps/fix/ - -meshname="${mesh##*/}" -export meshname="${meshname: 0: -4}" - -#Retrieve current and process for forecast cycle -qsub -V $HOMErwps/ecf/jrwps_prep_current.ecf -qsub -V $HOMErwps/ecf/jrwps_prep_ice.ecf -qsub -V $HOMErwps/ecf/jrwps_prep_waterlevel.ecf -qsub -V $HOMErwps/ecf/jrwps_prep_wind.ecf diff --git a/ush/preprocess/README.txt b/ush/preprocess/README.txt deleted file mode 100644 index 0e3763d..0000000 --- a/ush/preprocess/README.txt +++ /dev/null @@ -1,6 +0,0 @@ -Scripts for preprocessing RWPS forcing for a forecast cycle. To run: - -$cd RWPS/sorc -$../prepare_forcing.sh 20260825 00 oc_1500m_30km - -to prepare forcing for the RWPS forecast. Currently setup to work on wcoss2. diff --git a/ush/preprocess/add_err_var_to_file.py b/ush/preprocess/add_err_var_to_file.py deleted file mode 100644 index 0e8545d..0000000 --- a/ush/preprocess/add_err_var_to_file.py +++ /dev/null @@ -1,134 +0,0 @@ -import numpy as np -import netCDF4 as nc -import sys -import interp_utilities as iutil -import os -#Add compute and add error variance field to existing file - -UseUnixTime=True -nargin = len(sys.argv) - 1 - -flin=sys.argv[1] -dist2bnd_file=sys.argv[2] - -VarParam0=sys.argv[3] -VarParam=VarParam0.split(":") - -data=nc.Dataset(dist2bnd_file,"r") -dist2bnd=np.array(data["dist2bnd"][:]) -zi=np.array(data["depth"][:]) -nn=len(dist2bnd) -data.close() - -#remove path and file -suffixp = flin.rfind(".") -dirp = flin.rfind("/") -filename=flin[dirp+1:suffixp] - - -VariableType="WaterLevel" -if "wind" in filename: - VariableType="Wind" -elif "uv" in filename: - VariableType="Current" -elif "vel" in filename: - VariableType="Current" -elif "ice" in filename: - VariableType="Ice" -if "water" in filename: - VariableType="WaterLevel" -if "level" in filename: - VariableType="WaterLevel" - -print("flin = "+flin+ ", VariableType = "+ VariableType) -if VariableType=="Current": - VarShallow=float(VarParam[0]) # variance (m/s)**2 for shallow regions - VarDeep=float(VarParam[1]) # variance (m/s)**2 for deep regions - BatShallow=float(VarParam[2]) # isobath (m) for shallow regions - BatDeep=float(VarParam[3]) # isobath (m) for deep regions - if "stofs" in flin: -# Variance = iutil.VarianceLinearDepth(zi,1.,100.,50.,250.) - Variance = iutil.VarianceLinearDepth (zi, VarShallow, VarDeep, BatShallow, BatDeep) - if "rtofs" in flin: #variance high in shallows and near boundary of coverage -# VarianceDepth = iutil.VarianceLinearDepth(zi,100.,1.,50.,250.) - VarianceDepth = iutil.VarianceLinearDepth(zi,VarShallow,VarDeep,BatShallow,BatDeep) - VarLambda= float(VarParam[4]) # lengthscale (km) for linear transition from bounadry variance(==VarShallow) to interior variance(==VarDeep) - VarianceBnd = iutil.VarianceLinearDistanceToBndy( dist2bnd, VarDeep,VarShallow, VarLambda) - Variance = np.maximum(VarianceDepth, VarianceBnd) - -if VariableType=="WaterLevel": - if (("stofs" in flin) or (True)): -# Variance = 1.+0*zi - VarInterior=float(VarParam[0]) # variance (m)**2 for stofs water level - Variance = VarInterior+0.*zi - -if VariableType=="Wind": - ##LocalFS = [ rwps_pr, rwps_hi, rwps_ak, rwps_conus, rwps_na] # file names - ##VarFS = [ 4. , 4. , 9. , 16. , 25. ] # (m m /s /s) - ##LambdaFS = [ 150. , 200. , 500. , 1000. , 1500. ] # (km) - VarInterior=float(VarParam[0]) # variance (m/s)**2 for interior of forecast - if "nbm" in flin: - Variance = VarInterior + np.zeros(nn) - if "rrfs" in flin: - VarBoundary = float(VarParam[1]) # variance (m/s)**2 for boundary of forecast - VarLambda = float(VarParam[2]) # lengthscale (km) for linear transition from bounadry variance to interior variance - Variance = iutil.VarianceLinearDistanceToBndy( dist2bnd, VarInterior, VarBoundary,VarLambda ) - - -if VariableType=="Ice": - ##LocalFS = [ rwps_pr, rwps_hi, rwps_ak, rwps_conus, rwps_na] # file names - ##VarFS = [ 4. , 4. , 9. , 16. , 25. ] # (m m /s /s) - ##LambdaFS = [ 150. , 200. , 500. , 1000. , 1500. ] # (km) - VarInterior=float(VarParam[0]) # variance (m/s)**2 for interior of forecast - if "rtofs" in flin: - Variance = VarInterior + np.zeros(nn) - if "nbm" in flin: - VarBoundary = float(VarParam[1]) # variance (m/s)**2 for boundary of forecast - VarLambda = float(VarParam[2]) # lengthscale (km) for linear transition from bounadry variance to interior variance - Variance = iutil.VarianceLinearDistanceToBndy( dist2bnd, VarInterior, VarBoundary,VarLambda ) - - - - - - -fltmp=flin+".tmp.nc" -try: - os.remove(fltmp) -except: - print("creating "+fltmp+" temporarily") - -data0 = nc.Dataset(flin,"r") - -with nc.Dataset(fltmp, "w", format="NETCDF4") as ncout: - # 1. Copy Global Attributes - ncout.setncatts({attr: data0.getncattr(attr) for attr in data0.ncattrs()}) - # 2. Copy Dimensions - for name, dimension in data0.dimensions.items(): - # If the dimension is unlimited, pass None to createDimension - dim_len = len(dimension) if not dimension.isunlimited() else None - ncout.createDimension(name, dim_len) - for name, src_var in data0.variables.items(): - dst_var = ncout.createVariable(name, src_var.datatype, src_var.dimensions) - dst_var.setncatts({attr: src_var.getncattr(attr) for attr in src_var.ncattrs()}) - dst_var[:] = src_var[:] - - time=np.asarray(data0["time"][:]) - nt=len(time) - ErrorVariance=np.zeros((nt,nn)) - for k in range(nt): - ErrorVariance[k,:]=Variance[:] - - if not 'node' in ncout.dimensions: - ncadd.createDimension('node' , nn) - if not 'time' in ncout.dimensions: - ncadd.createDimension('time' , nt) - if not 'ErrorVariance' in ncout.variables: - ErrorVariance_var=ncout.createVariable('ErrorVariance', 'f8', ('time','node')) - ErrorVariance_var.long_name = 'forecast error variance' - ErrorVariance_var.units = "(field units)**2" - ErrorVariance_var.standard_name = 'errror variance' - ErrorVariance_var[:]=ErrorVariance - - ncout.close -os.rename(fltmp, flin) diff --git a/ush/preprocess/add_mesh_geom_to_file.py b/ush/preprocess/add_mesh_geom_to_file.py deleted file mode 100644 index c06deda..0000000 --- a/ush/preprocess/add_mesh_geom_to_file.py +++ /dev/null @@ -1,73 +0,0 @@ -import numpy as np -import netCDF4 as nc -import sys -import interp_utilities as iutil -import os - -UseUnixTime=True -nargin = len(sys.argv) - 1 - -flin=sys.argv[1] -mshfl=sys.argv[2] - -meshslash=mshfl.rfind('/')+1 -meshname=mshfl[meshslash:len(mshfl)-3] - -xi, yi, ei, zi = iutil.loadWW3Mesh(mshfl) -nn=len(xi) -ne=ei.shape[0] - -fltmp=flin+".tmp.nc" -try: - os.remove(fltmp) -except: - print("creating "+fltmp+" temporarily") - -data0 = nc.Dataset(flin,"r") - -with nc.Dataset(fltmp, "w", format="NETCDF4") as ncout: - # 1. Copy Global Attributes - ncout.setncatts({attr: data0.getncattr(attr) for attr in data0.ncattrs()}) - # 2. Copy Dimensions - for name, dimension in data0.dimensions.items(): - # If the dimension is unlimited, pass None to createDimension - dim_len = len(dimension) if not dimension.isunlimited() else None - ncout.createDimension(name, dim_len) - for name, src_var in data0.variables.items(): - dst_var = ncout.createVariable(name, src_var.datatype, src_var.dimensions) - dst_var.setncatts({attr: src_var.getncattr(attr) for attr in src_var.ncattrs()}) - dst_var[:] = src_var[:] - - if not 'node' in data0.dimensions: - ncout.createDimension('node' , nn) - if not 'element' in data0.dimensions: - ncout.createDimension('element' , ne) - if not 'noel' in data0.dimensions: - ncout.createDimension('noel', 3) - ncout.meshname=meshname - ncout.mesh=mshfl - - if not 'longitude' in ncout.variables: - lon_var=ncout.createVariable('longitude', 'f8', ('node',)) - lon_var.units = 'degree_east' - lon_var.long_name = 'longitude' - lon_var.standard_name = 'longitude' - lon_var.axis = 'X' - lon_var[:]=xi[:] - - if not 'latitude' in ncout.variables: - lat_var=ncout.createVariable('latitude', 'f8', ('node',)) - lat_var.units = 'degree_north' - lat_var.long_name = 'latitude' - lat_var.standard_name = 'latitude' - lat_var.axis = 'Y' - lat_var[:]=yi[:] - - if not 'tri' in ncout.variables: - tri_var=ncout.createVariable('tri', 'i4', ('noel','element')) - tri_var.long_name = 'element list' - tri_var.standard_name = 'element list' - tri_var[:]=np.transpose(ei) - - ncout.close -os.rename(fltmp, flin) diff --git a/ush/preprocess/bayes_forecast_update.py b/ush/preprocess/bayes_forecast_update.py deleted file mode 100644 index fcc04c7..0000000 --- a/ush/preprocess/bayes_forecast_update.py +++ /dev/null @@ -1,109 +0,0 @@ -import datetime -import numpy as np -import netCDF4 as nc -import sys -import re -import interp_utilities as iutil -flin0=sys.argv[1] -flin1=sys.argv[2] -flout=sys.argv[3] - -varname0=sys.argv[4] -varname=varname0.split(":") -nvar=len(varname) - -data0 = nc.Dataset(flin0,"r") -t=np.asarray(data0["time"][:]) -var=np.asarray(data0["ErrorVariance"][:,:]) - -x=np.asarray(data0["longitude"][:]) -y=np.asarray(data0["latitude"][:]) -e=np.asarray(data0["tri"][:,:]) - -nt=len(t) -nn=len(x) -ne=e.shape[1] -noel=e.shape[0] - -nvar=len(varname) -field=np.zeros((nvar,nt,nn)) - -nan=float("nan") -for jv in range(nvar): - tmp=np.asarray(data0[varname[jv]][:,:]) - if "_FillValue" in data0[varname[jv]].ncattrs(): - fill_value0=data0[varname[jv]]._FillValue - tmp[np.where(tmp==fill_value0)]=nan - field[jv,:,:]=tmp - -data1 = nc.Dataset(flin1,"r") -t1=np.asarray(data1["time"][:]) -var1=np.asarray(data1["ErrorVariance"][:,:]) -nt1,nn1=var1.shape -field1=np.zeros((nvar,nt1,nn1)) -for jv in range(nvar): - tmp=np.asarray(data1[varname[jv]][:,:]) - if "_FillValue" in data1[varname[jv]].ncattrs(): - fill_value1=data1[varname[jv]]._FillValue - tmp[np.where(tmp==fill_value1)]=nan - field1[jv,:,:]=tmp - -Inf=float('inf') -um1=field1[0,0,:] -ng1=np.where( um1**2>=0 ) # find points that are valid floats for field1 - -for k in range(nt): - #j=np.where(t[k]==t1) # find common merge point in data - j=np.where(np.abs(t[k]-t1)<120.) # find common merge point in data - j=j[0].tolist() - if len(j)==1: - print("j="+str(j)+" : k="+str(k)) - for jv in range(nvar): - field[jv,k,ng1] = ( field[jv,k,ng1] - + ( var[k,ng1] / ( var[k,ng1] + var1[j,ng1] ) ) - * (field1[jv,j,ng1]-field[jv,k,ng1]) - ) - #update error variance to posterior - var[k,ng1]=var[k,ng1] * ( var1[j,ng1] / ( var[k,ng1]+var1[j,ng1] ) ) - -with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: - ncout.createDimension('level' , 1) - ncout.createDimension('node' , nn) - ncout.createDimension('element' , ne) - ncout.createDimension('time', nt) - ncout.createDimension('noel', 3) - - lon_var=ncout.createVariable('longitude', 'f8', ('node',)) - lon_var.units = 'degree_east' - lon_var.long_name = 'longitude' - lon_var.standard_name = 'longitude' - lon_var.axis = 'X' - lon_var[:]=x[:] - - lat_var=ncout.createVariable('latitude', 'f8', ('node',)) - lat_var.units = 'degree_north' - lat_var.long_name = 'latitude' - lat_var.standard_name = 'latitude' - lat_var.axis = 'Y' - lat_var[:]=y[:] - - time_var=ncout.createVariable('time', 'f4', ('time',)) - iutil.CopyAttributes(data0["time"], time_var) - time_var[:]=t[:] - - tri_var=ncout.createVariable('tri', 'i4', ('noel','element')) - tri_var.long_name = 'element list' - tri_var.standard_name = 'element list' - tri_var[:,:]=e - - #Copy attributes from old file to new - for jv in range(nvar): - f_var=ncout.createVariable(varname[jv], 'f4', ('time','node')) - iutil.CopyAttributes(data0[varname[jv]], f_var) - f_var[:,:]=field[jv,:,:] - - ErrVar0=data0["ErrorVariance"] - ErrVar_var=ncout.createVariable("ErrorVariance", 'f4', ('time','node')) - iutil.CopyAttributes(ErrVar0, ErrVar_var) - ErrVar_var[:,:]=var[:,:] - ncout.close diff --git a/ush/preprocess/get_current.sh b/ush/preprocess/get_current.sh deleted file mode 100644 index ac51b5d..0000000 --- a/ush/preprocess/get_current.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -# This script retrieves global RTOFS and STOFS as netcdf files -cd $HOMErwps/ush/preprocess - -rtofs/get_rtofs.sh $PDY & -stofs/get_stofs.sh $PDY $cyc current& -wait; diff --git a/ush/preprocess/get_ice.sh b/ush/preprocess/get_ice.sh deleted file mode 100644 index c99dc27..0000000 --- a/ush/preprocess/get_ice.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# This script retrieves ice forecasts for global RTOFS and Alaska NBM as netcdf files - -cd $HOMErwps/ush/preprocess - -sh rtofs/get_rtofs_ice.sh $PDY $cyc & -sh nbm/get_nbm_ice.sh $PDY $cyc & -wait; diff --git a/ush/preprocess/get_waterlevel.sh b/ush/preprocess/get_waterlevel.sh deleted file mode 100644 index 26b099e..0000000 --- a/ush/preprocess/get_waterlevel.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -## This script retrieves global STOFS water level as netcdf file - -cd $HOMErwps/ush/preprocess -stofs/get_stofs.sh $PDY $cyc waterlevel diff --git a/ush/preprocess/get_wind.sh b/ush/preprocess/get_wind.sh deleted file mode 100644 index 056d3c5..0000000 --- a/ush/preprocess/get_wind.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash - -# This script retrieves rrfs and nbm winbds and exports as -# netcdf files - -cd $HOMErwps/ush/preprocess - -echo "retrieving winds from rrfs and nbm for rwps wind" -( - echo "sh nbm/make_nbm_wind.sh $PDY $cyc oc > $tmp/nbm.oc.out" - nbm/make_nbm_wind.sh $PDY $cyc oc > $tmp/nbm.oc.out - echo "retrieved winds from nbm oc domain" - echo "Not retrieving other nbm domain winds" -)& - -( - echo "sh rrfs/make_rrfs_wind.sh $PDY $cyc na > $tmp/rrfs.na.out" - rrfs/make_rrfs_wind.sh $PDY $cyc na > $tmp/rrfs.na.out - echo "retrieved winds from rrfs na domain" -)& - -( - echo "sh rrfs/make_rrfs_wind.sh $PDY $cyc ak > $tmp/rrfs.ak.out" - rrfs/make_rrfs_wind.sh $PDY $cyc ak > $tmp/rrfs.ak.out - echo "retrieved winds from rrfs ak domain" -)& - -( - echo "sh rrfs/make_rrfs_wind.sh $PDY $cyc pr > rrfs.pr.out" - rrfs/make_rrfs_wind.sh $PDY $cyc pr > $tmp/rrfs.pr.out - echo "retrieved winds from rrfs pr domain" -)& - -( - echo "sh rrfs/make_rrfs_wind.sh $PDY $cyc hi > rrfs.hi.out" - rrfs/make_rrfs_wind.sh $PDY $cyc hi > $tmp/rrfs.hi.out - echo "retrieved winds from rrfs hi domain" -)& - -( - echo "sh rrfs/make_rrfs_wind.sh $PDY $cyc conus > rrfs.conus.out" - rrfs/make_rrfs_wind.sh $PDY $cyc conus > $tmp/rrfs.conus.out - echo "retrieved winds from rrfs conus domain" -)& -wait - -echo "finished retrieving winds from rrfs and nbm for rwps wind" - diff --git a/ush/preprocess/interp_time.py b/ush/preprocess/interp_time.py deleted file mode 100644 index e64c4b9..0000000 --- a/ush/preprocess/interp_time.py +++ /dev/null @@ -1,156 +0,0 @@ -import os -import argparse -import numpy as np -import netCDF4 as nc -import sys -import math - -from scipy.interpolate import interp1d - -nargin = len(sys.argv) - 1 - -flin=sys.argv[1] -flinNewTimes=sys.argv[2] -flout=sys.argv[3] - -varname0=sys.argv[4] -varname=varname0.split(":") -nvar=len(varname) - -# If InterpSecondFile is True interpolate the values from the second file are interpolated to the common time points -# and extrapolate (via persistance) for all times beyond the range of time from the second file - -InterpSecondFile=False -if nargin>4: - InterpSecondFile=eval(sys.argv[5]) - print("Interpolating fields from second file: "+str(InterpSecondFile)+" and extrapolating via persistance in time") - -#might want to rewrite with an input file to derive full set of times -print("running interp_time.py: takes a forecast (arg1="+flin+") and interpolates to times ") -print("in another file (arg2="+flinNewTimes+"). The origonal and interpoated values are output to ") -print("a new file(arg3="+flout+") .") -print("interpolating for variables:") -for jv in range(nvar): - print(varname[jv]) - -data0 = nc.Dataset(flin,"r") -t=np.asarray(data0["time"][:]) - -data1 = nc.Dataset(flinNewTimes,"r") -t1=np.asarray(data1["time"][:]) - -#make sorted union of times in both forecasts -tf = np.union1d(t, t1) - -#eliminate times occuring outside the range of arg1 to avoid extrapolation -j=np.where( np.logical_and( tf>=np.min(t) , tf<=np.max(t) ) ) -print(j) -j=j[0].tolist() -tf=tf[j] - -print("Initial times:") -print(t) -print("New times:") -print(tf) - -nt=len(tf) - -x=np.asarray(data0["longitude"][:]) -y=np.asarray(data0["latitude"][:]) -e=np.asarray(data0["tri"][:,:]) -print("e") -print(e) -print(e.shape) -nn=len(x) -ne=e.shape[1] -noel=e.shape[0] - -InterpolatedVariables=np.zeros((nvar,nt,nn)) - -IsExtrap=False -if InterpSecondFile: - t=t1 - data=data1 - IsExtrap=True -else: - data=data0 - -ntt=len(t) -#unique_vals, indices = np.unique(arr, return_index=True) -tu,indx=np.unique(t,return_index=True) -for jv in range(nvar): - u=np.asarray(data[varname[jv]][:,:]) - fill_value0 = data[varname[jv]]._FillValue - nan=float('nan') - jb=np.where(u==fill_value0) - u[jb]=nan - -#set up interpolator for u - if IsExtrap: - fi = interp1d(tu, u[indx,:], axis=0, kind='linear',fill_value="extrapolate") #extrapolated values will be overwritten - else: - fi = interp1d(tu, u[indx,:], axis=0, kind='linear') - uf=fi(tf) - - #re-insert initial values at times that match initial time points - print("Interpolation compleate: now re-insert initial values at times that match initial time points") - print("to remove small interpolation artifacts") - for k in range(nt): - j=np.where(tf[k]==t) - j=j[0].tolist() - print("new time index: "+str(k)+" is same as old time index:"+str(j)) - if len(j)>0: - print("mapping exactly back to origonal values at time: "+str(tf[k])) - j=j[0] - uf[k,:]=u[j,:] - - if IsExtrap: - jExtrapEarly=np.where(tft[ntt-1]) - for jxtrp in range(len(jExtrapLate)): - uf[jExtrapLate[jxtrp],:]=u[ntt-1,:] - - InterpolatedVariables[jv,:,:]=uf[:,:] - -import interp_utilities as iutil -with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: - - ncout.createDimension('level' , 1) - ncout.createDimension('node' , nn) - ncout.createDimension('element' , ne) - ncout.createDimension('time', nt) - ncout.createDimension('noel', 3) - - lon_var=ncout.createVariable('longitude', 'f8', ('node',)) - lon_var.units = 'degree_east' - lon_var.long_name = 'longitude' - lon_var.standard_name = 'longitude' - lon_var.axis = 'X' - lon_var[:]=x[:] - - lat_var=ncout.createVariable('latitude', 'f8', ('node',)) - lat_var.units = 'degree_north' - lat_var.long_name = 'latitude' - lat_var.standard_name = 'latitude' - lat_var.axis = 'Y' - lat_var[:]=y[:] - - time_var0=data0["time"] - time_var=ncout.createVariable('time', 'f8', ('time',)) - iutil.CopyAttributes(time_var0, time_var) - time_var[:]=tf[:] - - tri_var=ncout.createVariable('tri', 'i4', ('noel','element',)) - tri_var.long_name = 'element list' - tri_var.standard_name = 'element list' - tri_var[:,:]=e - - #Copy attributes from old file to new - for jv in range(nvar): - var=data0[varname[jv]] - f_var=ncout.createVariable(varname[jv], 'f4', ('time','node')) - iutil.CopyAttributes(var, f_var) - f_var[:,:]=InterpolatedVariables[jv,:,:] - ncout.close diff --git a/ush/preprocess/interpolate_with_weights.py b/ush/preprocess/interpolate_with_weights.py deleted file mode 100644 index 0c49572..0000000 --- a/ush/preprocess/interpolate_with_weights.py +++ /dev/null @@ -1,238 +0,0 @@ -import numpy as np -import netCDF4 as nc -import sys -import interp_utilities as iutil -import xarray as xr -import scipy.sparse as sp -from scipy.interpolate import NearestNDInterpolator -import datetime - -# Engine for interpolating to WW3 unstructured mesh using precomputed interpolation weights from netcdf files with forecasts -# -# to call: -# python InterpolateSTOFS.py input_file meshpath outputfile variable1:variable2:variable3 ExtrapMethod -# -# example: -# python InterpolateSTOFS.py stofs.20260608.00/stofs.cwl.vel.nc meshes/RWPS.V0a.small.msh tesdtoZ.vel.nc u-vel:v-vel 2 -# or: -# python InterpolateSTOFS.py stofs.20260608.00/stofs.cwl.nc meshes/RWPS.V0a.small.msh tesdtoZ.vel.nc zeta 1 -# -# ExtrapMethod =-1 no extrapolation, NaN's potentially in output where source field is dry -# ExtrapMethod = 0 NaN values in interpolated field replaced with 0.0 -# ExtrapMethod = 1 Nearest Neighbor extrapolation from valid source values -# ExtrapMethod = 2 Nearest Neighbor extrapolation from valid interpolated values -# ExtrapMethod = 3 Nearest Neighbor extrapolation from interpolated nodes which allways have valid values (faster than 2 for larger source mesh) - -UseUnixTime=True -nargin = len(sys.argv) - 1 - -flin=sys.argv[1] - -weights_file=sys.argv[2] - -flout=sys.argv[3] -varname0=sys.argv[4] -varname=varname0.split(":") - -ExtrapMethod=-1 # no extrapolation -if nargin>4: - ExtrapMethod=int(sys.argv[5]) - -if ExtrapMethod==-1: - print("no extrapolation, nan left in place in output") -if ExtrapMethod==0: - print("Fill missing values in interpolated field with value 0") -if ExtrapMethod==1: - print("extrapolation from nearest valid point in source- can be slow if source mesh is much larger than destination mesh") -if ExtrapMethod==2: - print("extrapolation from nearest valid point in destination (interpolated field)") - -with xr.open_dataset(weights_file) as ds_s: - # Standard sparse storage uses 'row', 'col', and 'data' variables - row = ds_s['row'].values - col = ds_s['col'].values - weights = ds_s['S'].values - Nrows=ds_s.attrs.get('Nrows') - Ncols=ds_s.attrs.get('Ncols') - SrcFieldType=ds_s.attrs.get('SrcFieldType') - if ExtrapMethod>0: #these extrapolation methods need the source and destination nodes - x=ds_s['x_src'].values - y=ds_s['y_src'].values - xi=ds_s['x_dst'].values - yi=ds_s['y_dst'].values - -nni=Nrows -n1=Ncols -print("row") -print(row) -print("col") -print(col) - -matrix = sp.coo_matrix((weights, (row-1, col-1)), shape=(Nrows,Ncols)).tocsr() -print("sparse interpolation matrix") -print(matrix) -row_sum = matrix.sum(axis=1) -j0=np.where( row_sum==0 ) # destination nodes with no coverage from interpolation matrix - -data = nc.Dataset(flin,"r") -if "time" in data.variables: - time=iutil.ConvertTimeToUnixTime(flin,"time") -elif "MT" in data.variables: - time=iutil.ConvertTimeToUnixTime(flin,"MT") -else: - print("No time variable found in "+flin+" EXITING") - sys.exit(1) - -nt=len(time) - -print(time) - -nvar=len(varname) -vari=np.zeros((nvar,nt,nni)) - -if ExtrapMethod>=0: - IsExtrap=np.zeros((nvar,nt,nni),dtype=int) - -if ExtrapMethod==3: - AnyExtrap=np.zeros((nvar,nni),dtype=int) - -nan=float("nan") -for jv in range(nvar): - -# fill_value0=data[varname[jv]]._FillValue - try: - fill_value0=data[varname[jv]]._FillValue - except: - fill_value0=-99999 - print("fill value="+str(fill_value0)) - for k in range(nt): - print("interpolating for time step = "+str(k)+" of "+str(nt)) - vshp = data.variables[varname[jv]].shape -# if SrcFieldType=="unstructured": - if len(vshp)==1: - var=np.asarray(data[varname[jv]][:]) # No time dimension?, just spatial data to interpolate - elif len(vshp)==2: - var=np.asarray(data[varname[jv]][k,:]) - elif len(vshp)==3: # Wind field with dimensions time, x, y - if "wind" in flin: - var0=np.asarray(data[varname[jv]][k,:,:]) - print("var0.shape") - print(var0.shape) - print(n1) - var=np.transpose(var0).reshape(n1) - elif "ice" in flin: - var0=np.asarray(data[varname[jv]][k,:,:]) - if "rtofs" in flin: #remove bad geometry edges - var0=var0[1:-1,1:-1] - var=np.transpose(var0).reshape(n1) - - elif len(vshp)==4: # RTOFS field with 2nd dimensional "Level" and garbage boundries - var0=np.asarray(data[varname[jv]][k,0,:,:]) - if "rtofs" in flin: #remove bad geometry edges - var0=var0[1:-1,1:-1] - var=np.transpose(var0).reshape(n1) - - else: - print(vshp) - print(len(vshp)) - print("unkown data shape for "+varname[jv]+" terminating") - sys.exit() - - #replace fill with nan to avoid interpolating fill - j=np.where(var==fill_value0) - var[j]=nan - if ExtrapMethod==0: - j=np.where(np.isnan(var)) - var[j]=0. - - vari[jv,k,:] = matrix @ var # actual spatial interpolation step - vari[jv,k,j0]=nan # empty rows - if ExtrapMethod==3: # Fast posthoc nearest neighbor extrapolator - jd=np.where(np.isnan(vari[jv,k,:])) - AnyExtrap[jv,jd]=1. - elif ExtrapMethod>0:# and ExtrapMethod<3: - jd=np.where(np.isnan(vari[jv,k,:])) - dstp=np.array((xi[jd],yi[jd])) - if ExtrapMethod==1: - #extrapolate using nearest neighbor of source with valid value - js=np.where(~np.isnan(var)) - srcp=np.array((x[js],y[js])) - srcv=var[js] - if ExtrapMethod==2: - #extrapolate using nearest neighbor of interpolated field with valid value - js=np.where(~np.isnan(vari[jv,k,:])) - srcp=np.array((xi[js],yi[js])) - tmp=vari[jv,k,js] - srcv=tmp.flatten() - interp = NearestNDInterpolator(srcp.T,srcv) - ExtrapVals = interp( dstp.T ) - vari[jv,k,jd]=ExtrapVals - IsExtrap[jv,k,jd]=1 - -if ExtrapMethod==0: - jd=np.where(np.isnan(vari)) - vari[jd]==0. - IsExtrap[jd]=1 - -if ExtrapMethod==3: #posthoc extrapolation from points which are valid at all times - for jv in range(nvar): - jd=np.where(AnyExtrap[jv,:]==1) # nodes that have some "nan" intrepolated values - js=np.where(AnyExtrap[jv,:]==0) # nodes that have no "nan" intrepolated values - srcp = np.array((xi[js],yi[js])).T - srcv = vari[jv,0,js] #dummy input field - dstp = np.array((xi[jd],yi[jd])).T - srcv=srcv[0,:] - interpolator = NearestNDInterpolator(srcp, srcv) - distances, jsrc = interpolator.tree.query(dstp) - jd=jd[0] - for k in range(nt): - jdk=np.where(np.isnan(vari[jv,k,jd])) - jdk=jdk[0] - vari[jv,k,jd[jdk]]=vari[jv,k,jsrc[jdk]] # value of nearest "always valid" destination point - IsExtrap[jv,k,jd[jdk]]=1 - -print("nn(target mesh) = "+str(nni)+": Nrows = "+str(Nrows)) -print("nn(source mesh) = "+str(n1)+": Ncols = "+str(Ncols)) -if not ((nni==Nrows) and (n1==Ncols)): - print("WARNING: Wrong matrix weights: number of rows from "+ mshfl +" = "+str(nni)+ - " but number of rows in "+ weights_file +" = "+str(Nrows)+ - ", number of spatial points in "+ flin +" = "+str(n1)+ - " but number of columns in "+ weights_file +" = "+str(Ncols) ) - print(" You may need to regnerate file "+ weights_file +" with appropriate weights") - -with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: - - ncout.createDimension('level' , 1) - ncout.createDimension('node' , nni) - ncout.createDimension('time', nt) - - time_var=ncout.createVariable('time', 'f8', ('time',)) - varin = data["time"] - iutil.CopyAttributes(varin, time_var) - if UseUnixTime: - time_var.units = 'seconds since 1970-01-01 00:00:00.0 0:00' - time_var.standard_name = 'time' - time_var[:]=time[:] - - for jv in range(nvar): - print("writing output for :"+varname[jv]) - varin = data[varname[jv]] - F_var=ncout.createVariable(varname[jv], 'f4', ('time','node'),fill_value = fill_value0) - iutil.CopyAttributes(varin, F_var) - F_var.location = 'node' - F_var[:,:] = vari[jv,:,:] - - if ExtrapMethod >= 0 : - xtrp_var=ncout.createVariable(varname[jv]+'IsExtrap', 'i1', ('time','node')) - xtrp_var.long_name = '==1 if the interpolated value extrapolated. 0 if interpolated' - xtrp_var.standard_name = 'is extrapolated' - xtrp_var.location = 'node' - if ExtrapMethod == 0: - xtrp_var.method = 'Interpolated nan values replaced with 0' - if ExtrapMethod == 1: - xtrp_var.method = 'nearest valid neighbor in source field' - if ExtrapMethod == 2: - xtrp_var.method = 'nearest valid neighbor in interpolated field' - xtrp_var[:,:] = IsExtrap[jv,:,:] - - ncout.close diff --git a/ush/preprocess/interpolate_with_weights_and_error_variance.py b/ush/preprocess/interpolate_with_weights_and_error_variance.py deleted file mode 100644 index cb3c08e..0000000 --- a/ush/preprocess/interpolate_with_weights_and_error_variance.py +++ /dev/null @@ -1,329 +0,0 @@ -import numpy as np -import netCDF4 as nc -import sys -import interp_utilities as iutil -import xarray as xr -import scipy.sparse as sp -from scipy.interpolate import NearestNDInterpolator -import datetime - -# Engine for interpolating to WW3 unstructured mesh using precomputed interpolation weights from netcdf files with forecasts -# -# to call: -# python InterpolateSTOFS.py input_file meshpath outputfile variable1:variable2:variable3 ExtrapMethod -# -# example: -# python InterpolateSTOFS.py stofs.20260608.00/stofs.cwl.vel.nc meshes/RWPS.V0a.small.msh tesdtoZ.vel.nc u-vel:v-vel 2 -# or: -# python InterpolateSTOFS.py stofs.20260608.00/stofs.cwl.nc meshes/RWPS.V0a.small.msh tesdtoZ.vel.nc zeta 1 -# -# ExtrapMethod =-1 no extrapolation, NaN's potentially in output where source field is dry -# ExtrapMethod = 0 NaN values in interpolated field replaced with 0.0 -# ExtrapMethod = 1 Nearest Neighbor extrapolation from valid source values -# ExtrapMethod = 2 Nearest Neighbor extrapolation from valid interpolated values -# ExtrapMethod = 3 Nearest Neighbor extrapolation from interpolated nodes which allways have valid values (faster than 2 for larger source mesh) - -UseUnixTime=True -nargin = len(sys.argv) - 1 - -flin=sys.argv[1] - -weights_file=sys.argv[2] - -flout=sys.argv[3] -varname0=sys.argv[4] -varname=varname0.split(":") -if nargin>4: - VarParam0=sys.argv[5] - IncludeErrorVariance=True -else: - print("no variance parameters provided- error variance will not be included in file "+flout) - IncludeErrorVariance=False - -VariableType='Wind' -if "vel" in varname[0]: - VariableType='Current' -if "zeta" in varname[0]: - VariableType='WaterLevel' -if "ice" in varname[0]: - VariableType='Ice' - -ExtrapMethod=-1 # no extrapolation -if nargin>4: - ExtrapMethod=int(sys.argv[5]) - -if ExtrapMethod==-1: - print("no extrapolation, nan left in place in output") -if ExtrapMethod==0: - print("Fill missing values in interpolated field with value 0") -if ExtrapMethod==1: - print("extrapolation from nearest valid point in source- can be slow if source mesh is much larger than destination mesh") -if ExtrapMethod==2: - print("extrapolation from nearest valid point in destination (interpolated field)") - -with xr.open_dataset(weights_file) as ds_s: - # Standard sparse storage uses 'row', 'col', and 'data' variables - row = ds_s['row'].values - col = ds_s['col'].values - weights = ds_s['S'].values - Nrows=ds_s.attrs.get('Nrows') - Ncols=ds_s.attrs.get('Ncols') - SrcFieldType=ds_s.attrs.get('SrcFieldType') - if ExtrapMethod>0: #these extrapolation methods need the source and destination nodes - x=ds_s['x_src'].values - y=ds_s['y_src'].values - xi=ds_s['x_dst'].values - yi=ds_s['y_dst'].values - #shift to RWPS convention - j=np.where(x>90) - x[j]=x[j]-360. - j=np.where(xi>90) - xi[j]=xi[j]-360. - -nni=Nrows -n1=Ncols - -matrix = sp.coo_matrix((weights, (row-1, col-1)), shape=(Nrows,Ncols)).tocsr() -print("sparse interpolation matrix") -print(matrix) - -data = nc.Dataset(flin,"r") -if "time" in data.variables: - time=iutil.ConvertTimeToUnixTime(flin,"time") -elif "MT" in data.variables: - time=iutil.ConvertTimeToUnixTime(flin,"MT") -else: - print("No time variable found in "+flin+" EXITING") - sys.exit(1) - -nt=len(time) - -print(time) - -nvar=len(varname) -vari=np.zeros((nvar,nt,nni)) - -if ExtrapMethod>=0: - IsExtrap=np.zeros((nvar,nt,nni),dtype=int) - -if ExtrapMethod==3: - AnyExtrap=np.zeros((nvar,nni),dtype=int) - -nan=float("nan") -for jv in range(nvar): - fill_value0=data[varname[jv]]._FillValue - print("fill value="+str(fill_value0)) - for k in range(nt): - print("interpolating for time step = "+str(k)+" of "+str(nt)) - vshp = data.variables[varname[jv]].shape -# if SrcFieldType=="unstructured": - if len(vshp)==1: - var=np.asarray(data[varname[jv]][:]) # No time dimension?, just spatial data to interpolate - if len(vshp)==2: - var=np.asarray(data[varname[jv]][k,:]) - if len(vshp)==3: # Wind field with dimensions time, x, y - var0=np.asarray(data[varname[jv]][k,:,:]) - var=np.transpose(var0).reshape(n1) - if len(vshp)==4: # RTOFS field with 2nd dimensional "Level" and garbage boundries - var0=np.asarray(data[varname[jv]][k,0,:,:]) - if "rtofs" in flin: #remove bad geometry edges - var0=var0[1:-1,1:-1] - var=np.transpose(var0).reshape(n1) - else: - print("unkown data shape for "+varname[jv]+" terminating") - sys.exit() - - #replace fill with nan to avoid interpolating fill - j=np.where(var==fill_value0) - var[j]=nan - - if ExtrapMethod==0: - j=np.where(np.isnan(var)) - var[j]=0. - - vari[jv,k,:] = matrix @ var # actual spatial interpolation step - - if ExtrapMethod==3: # Fast posthoc nearest neighbor extrapolator - jd=np.where(np.isnan(vari[jv,k,:])) - AnyExtrap[jv,jd]=1. - elif ExtrapMethod>0:# and ExtrapMethod<3: - jd=np.where(np.isnan(vari[jv,k,:])) - dstp=np.array((xi[jd],yi[jd])) - if ExtrapMethod==1: - #extrapolate using nearest neighbor of source with valid value - js=np.where(~np.isnan(var)) - srcp=np.array((x[js],y[js])) - srcv=var[js] - if ExtrapMethod==2: - #extrapolate using nearest neighbor of interpolated field with valid value - js=np.where(~np.isnan(vari[jv,k,:])) - srcp=np.array((xi[js],yi[js])) - tmp=vari[jv,k,js] - srcv=tmp.flatten() - interp = NearestNDInterpolator(srcp.T,srcv) - ExtrapVals = interp( dstp.T ) - vari[jv,k,jd]=ExtrapVals - IsExtrap[jv,k,jd]=1 - -if ExtrapMethod==0: - jd=np.where(np.isnan(vari)) - vari[jd]==0. - IsExtrap[jd]=1 - -if ExtrapMethod==3: #posthoc extrapolation from points which are valid at all times - for jv in range(nvar): - jd=np.where(AnyExtrap[jv,:]==1) # nodes that have some "nan" intrepolated values - js=np.where(AnyExtrap[jv,:]==0) # nodes that have no "nan" intrepolated values - srcp = np.array((xi[js],yi[js])).T - srcv = vari[jv,0,js] #dummy input field - dstp = np.array((xi[jd],yi[jd])).T - srcv=srcv[0,:] - interpolator = NearestNDInterpolator(srcp, srcv) - distances, jsrc = interpolator.tree.query(dstp) - jd=jd[0] - for k in range(nt): - jdk=np.where(np.isnan(vari[jv,k,jd])) - jdk=jdk[0] - vari[jv,k,jd[jdk]]=vari[jv,k,jsrc[jdk]] # value of nearest "always valid" destination point - IsExtrap[jv,k,jd[jdk]]=1 - -print("nn(target mesh) = "+str(nni)+": Nrows = "+str(Nrows)) -print("nn(source mesh) = "+str(n1)+": Ncols = "+str(Ncols)) -if not ((nni==Nrows) and (n1==Ncols)): - print("WARNING: Wrong matrix weights: number of rows from "+ mshfl +" = "+str(nni)+ - " but number of rows in "+ weights_file +" = "+str(Nrows)+ - ", number of spatial points in "+ flin +" = "+str(n1)+ - " but number of columns in "+ weights_file +" = "+str(Ncols) ) - print(" You may need to regnerate file "+ weights_file +" with appropriate weights") - -########################################################################################## -# START: CONSTRUCT PRESCRIBED ERROR COVARIANCE FOR UPDATING ESTIMATE -########################################################################################## -#grab variables for prescribing error variance -if IcludeErrorVariance: - dist2bnd_file=weights_file.replace("InterpolationWeights", "DistToBnd") - with xr.open_dataset(dist2bnd_file) as ds_s: - dist2bnd = ds_s['dist2bnd'].values - zi = ds_s['depth'].values - - if VariableType=="Current": - VarShallow=float(VarParam[0]) # variance (m/s)**2 for shallow regions - VarDeep=float(VarParam[1]) # variance (m/s)**2 for deep regions - BatShallow=float(VarParam[2]) # isobath (m) for shallow regions - BatDeep=float(VarParam[3]) # isobath (m) for deep regions - if "stofs" in flin: -# Variance = iutil.VarianceLinearDepth(zi,1.,100.,50.,250.) - Variance = iutil.VarianceLinearDepth(zi,VarShallow,VarDeep,BatShallow,BatDeep) - if "rtofs" in flin: #variance high in shallows and near boundary of coverage -# VarianceDepth = iutil.VarianceLinearDepth(zi,100.,1.,50.,250.) - VarianceDepth = iutil.VarianceLinearDepth(zi,VarShallow,VarDeep,BatShallow,BatDeep) - VarLambda= float(VarParam[4]) # lengthscale (km) for linear transition from bounadry variance(==VarShallow) to interior variance(==VarDeep) - VarianceBnd = iutil.VarianceLinearDistanceToBndy( dist2bnd, VarDeep,VarShallow, VarLambda) - Variance = np.maximum(VarianceDepth, VarianceBnd) - - if VariableType=="WaterLevel": - if "stofs" in flin: -# Variance = 1.+0*zi - VarInterior=float(VarParam[0]) # variance (m)**2 for stofs water level - Variance = VarInterior+0.*zi - if VariableType=="Wind": - ##LocalFS = [ rwps_pr, rwps_hi, rwps_ak, rwps_conus, rwps_na] # file names - ##VarFS = [ 4. , 4. , 9. , 16. , 25. ] # (m m /s /s) - ##LambdaFS = [ 150. , 200. , 500. , 1000. , 1500. ] # (km) - VarInterior=float(VarParam[0]) # variance (m/s)**2 for interior of forecast - if "nbm" in flin: - Variance = VarInterior + 0.*dist2bnd[:] - if "rrfs" in flin: - VarBoundary = float(VarParam[1]) # variance (m/s)**2 for boundary of forecast - VarLambda = float(VarParam[2]) # lengthscale (km) for linear transition from bounadry variance to interior variance - Variance = iutil.VarianceLinearDistanceToBndy( dist2bnd, VarInterior, VarBoundary,VarLambda ) - - ErrorVariance=np.zeros((nt,nni)) - for k in range(nt): - ErrorVariance[k,:]=Variance[:] - -########################################################################################## -# FINISHED: CONSTRUCT PRESCRIBED ERROR COVARIANCE FOR UPDATING ESTIMATE -########################################################################################## - -ne=ei.shape[0] -with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: - - ncout.createDimension('level' , 1) - ncout.createDimension('node' , nni) - ncout.createDimension('element' , ne) - ncout.createDimension('time', nt) - ncout.createDimension('noel', 3) - - lon_var=ncout.createVariable('longitude', 'f8', ('node',)) - lon_var.units = 'degree_east' - lon_var.long_name = 'longitude' - lon_var.standard_name = 'longitude' - lon_var.axis = 'X' - lon_var[:]=xi[:] - - lat_var=ncout.createVariable('latitude', 'f8', ('node',)) - lat_var.units = 'degree_north' - lat_var.long_name = 'latitude' - lat_var.standard_name = 'latitude' - lat_var.axis = 'Y' - lat_var[:]=yi[:] - - if UseUnixTime: - units = 'seconds since 1970-01-01 00:00:00.0 0:00' - long_name = 'verification time generated by wgrib2 function verftime()' - standard_name = 'time' - else: - varin = data["time"] - units = varin.units - standard_name = varin.standard_name - long_name = varin.long_name - - time_var=ncout.createVariable('time', 'f8', ('time',)) - time_var.units = units - time_var.long_name = long_name - time_var.standard_name = standard_name - time_var[:]=time[:] - - tri_var=ncout.createVariable('tri', 'i4', ('noel','element')) - tri_var.long_name = 'element list' - tri_var.standard_name = 'element list' - tri_var[:]=np.transpose(ei) - - for jv in range(nvar): - if varname[jv]=='' - print("writing output for :"+varname[jv]) - varin = data[varname[jv]] - units = varin.units - standard_name = varin.standard_name - long_name = varin.long_name - location = 'node' - - F_var=ncout.createVariable(varname[jv], 'f4', ('time','node'),fill_value = fill_value0) - F_var.long_name = long_name - F_var.units = units - F_var.standard_name = standard_name - F_var.location = location - F_var[:,:] = vari[jv,:,:] - - if ExtrapMethod >= 0 : - xtrp_var=ncout.createVariable(varname[jv]+'IsExtrap', 'i1', ('time','node')) - xtrp_var.long_name = '==1 if the interpolated value extrapolated. 0 if interpolated' - xtrp_var.standard_name = 'is extrapolated' - xtrp_var.location = 'node' - if ExtrapMethod == 0: - xtrp_var.method = 'Interpolated nan values replaced with 0' - if ExtrapMethod == 1: - xtrp_var.method = 'nearest valid neighbor in source field' - if ExtrapMethod == 2: - xtrp_var.method = 'nearest valid neighbor in interpolated field' - xtrp_var[:,:] = IsExtrap[jv,:,:] - - if IcludeErrorVariance: - ErrorVariance_var=ncout.createVariable('ErrorVariance', 'f4', ('time','node'),fill_value = fill_value0) - ErrorVariance_var.long_name = 'forecast error variance' - ErrorVariance_var.units = "("+units+")**2" - ErrorVariance_var.standard_name = 'variance' - ErrorVariance_var[:,:]=ErrorVariance - - ncout.close diff --git a/ush/preprocess/interpolate_with_weights_with_fillvalue.py b/ush/preprocess/interpolate_with_weights_with_fillvalue.py deleted file mode 100644 index fef0007..0000000 --- a/ush/preprocess/interpolate_with_weights_with_fillvalue.py +++ /dev/null @@ -1,233 +0,0 @@ -import numpy as np -import netCDF4 as nc -import sys -import interp_utilities as iutil -import xarray as xr -import scipy.sparse as sp -from scipy.interpolate import NearestNDInterpolator -import datetime - -# Engine for interpolating to WW3 unstructured mesh using precomputed interpolation weights from netcdf files with forecasts -# -# to call: -# python InterpolateSTOFS.py input_file meshpath outputfile variable1:variable2:variable3 ExtrapMethod -# -# example: -# python InterpolateSTOFS.py stofs.20260608.00/stofs.cwl.vel.nc meshes/RWPS.V0a.small.msh tesdtoZ.vel.nc u-vel:v-vel 2 -# or: -# python InterpolateSTOFS.py stofs.20260608.00/stofs.cwl.nc meshes/RWPS.V0a.small.msh tesdtoZ.vel.nc zeta 1 -# -# ExtrapMethod =-1 no extrapolation, NaN's potentially in output where source field is dry -# ExtrapMethod = 0 NaN values in interpolated field replaced with 0.0 -# ExtrapMethod = 1 Nearest Neighbor extrapolation from valid source values -# ExtrapMethod = 2 Nearest Neighbor extrapolation from valid interpolated values -# ExtrapMethod = 3 Nearest Neighbor extrapolation from interpolated nodes which allways have valid values (faster than 2 for larger source mesh) - -UseUnixTime=True -nargin = len(sys.argv) - 1 - -flin=sys.argv[1] - -weights_file=sys.argv[2] - -flout=sys.argv[3] -varname0=sys.argv[4] -varname=varname0.split(":") - -ExtrapMethod=-1 # no extrapolation -if nargin>4: - ExtrapMethod=int(sys.argv[5]) - -if ExtrapMethod==-1: - print("no extrapolation, nan left in place in output") -if ExtrapMethod==0: - print("Fill missing values in interpolated field with value 0") -if ExtrapMethod==1: - print("extrapolation from nearest valid point in source- can be slow if source mesh is much larger than destination mesh") -if ExtrapMethod==2: - print("extrapolation from nearest valid point in destination (interpolated field)") - -with xr.open_dataset(weights_file) as ds_s: - # Standard sparse storage uses 'row', 'col', and 'data' variables - row = ds_s['row'].values - col = ds_s['col'].values - weights = ds_s['S'].values - Nrows=ds_s.attrs.get('Nrows') - Ncols=ds_s.attrs.get('Ncols') - SrcFieldType=ds_s.attrs.get('SrcFieldType') - if ExtrapMethod>0: #these extrapolation methods need the source and destination nodes - x=ds_s['x_src'].values - y=ds_s['y_src'].values - xi=ds_s['x_dst'].values - yi=ds_s['y_dst'].values - -nni=Nrows -n1=Ncols -print("row") -print(row) -print("col") -print(col) - -matrix = sp.coo_matrix((weights, (row-1, col-1)), shape=(Nrows,Ncols)).tocsr() -print("sparse interpolation matrix") -print(matrix) -row_sum = matrix.sum(axis=1) -j0=np.where( row_sum==0 ) # destination nodes with no coverage from interpolation matrix - -data = nc.Dataset(flin,"r") -if "time" in data.variables: - time=iutil.ConvertTimeToUnixTime(flin,"time") -elif "MT" in data.variables: - time=iutil.ConvertTimeToUnixTime(flin,"MT") -else: - print("No time variable found in "+flin+" EXITING") - sys.exit(1) - -nt=len(time) - -print(time) - -nvar=len(varname) -vari=np.zeros((nvar,nt,nni)) - -if ExtrapMethod>=0: - IsExtrap=np.zeros((nvar,nt,nni),dtype=int) - -if ExtrapMethod==3: - AnyExtrap=np.zeros((nvar,nni),dtype=int) - -nan=float("nan") -for jv in range(nvar): - fill_value0=data[varname[jv]]._FillValue - print("fill value="+str(fill_value0)) - for k in range(nt): - print("interpolating for time step = "+str(k)+" of "+str(nt)) - vshp = data.variables[varname[jv]].shape -# if SrcFieldType=="unstructured": - if len(vshp)==1: - var=np.asarray(data[varname[jv]][:]) # No time dimension?, just spatial data to interpolate - elif len(vshp)==2: - var=np.asarray(data[varname[jv]][k,:]) - elif len(vshp)==3: # Wind field with dimensions time, x, y - if "wind" in flin: - var0=np.asarray(data[varname[jv]][k,:,:]) - print("var0.shape") - print(var0.shape) - print(n1) - var=np.transpose(var0).reshape(n1) - elif "ice" in flin: - var0=np.asarray(data[varname[jv]][k,:,:]) - if "rtofs" in flin: #remove bad geometry edges - var0=var0[1:-1,1:-1] - var=np.transpose(var0).reshape(n1) - - elif len(vshp)==4: # RTOFS field with 2nd dimensional "Level" and garbage boundries - var0=np.asarray(data[varname[jv]][k,0,:,:]) - if "rtofs" in flin: #remove bad geometry edges - var0=var0[1:-1,1:-1] - var=np.transpose(var0).reshape(n1) - - else: - print(vshp) - print(len(vshp)) - print("unkown data shape for "+varname[jv]+" terminating") - sys.exit() - - #replace fill with nan to avoid interpolating fill - j=np.where(var==fill_value0) - var[j]=nan - if ExtrapMethod==0: - j=np.where(np.isnan(var)) - var[j]=0. - - vari[jv,k,:] = matrix @ var # actual spatial interpolation step - vari[jv,k,j0]=nan # empty rows - if ExtrapMethod==3: # Fast posthoc nearest neighbor extrapolator - jd=np.where(np.isnan(vari[jv,k,:])) - AnyExtrap[jv,jd]=1. - elif ExtrapMethod>0:# and ExtrapMethod<3: - jd=np.where(np.isnan(vari[jv,k,:])) - dstp=np.array((xi[jd],yi[jd])) - if ExtrapMethod==1: - #extrapolate using nearest neighbor of source with valid value - js=np.where(~np.isnan(var)) - srcp=np.array((x[js],y[js])) - srcv=var[js] - if ExtrapMethod==2: - #extrapolate using nearest neighbor of interpolated field with valid value - js=np.where(~np.isnan(vari[jv,k,:])) - srcp=np.array((xi[js],yi[js])) - tmp=vari[jv,k,js] - srcv=tmp.flatten() - interp = NearestNDInterpolator(srcp.T,srcv) - ExtrapVals = interp( dstp.T ) - vari[jv,k,jd]=ExtrapVals - IsExtrap[jv,k,jd]=1 - -if ExtrapMethod==0: - jd=np.where(np.isnan(vari)) - vari[jd]==0. - IsExtrap[jd]=1 - -if ExtrapMethod==3: #posthoc extrapolation from points which are valid at all times - for jv in range(nvar): - jd=np.where(AnyExtrap[jv,:]==1) # nodes that have some "nan" intrepolated values - js=np.where(AnyExtrap[jv,:]==0) # nodes that have no "nan" intrepolated values - srcp = np.array((xi[js],yi[js])).T - srcv = vari[jv,0,js] #dummy input field - dstp = np.array((xi[jd],yi[jd])).T - srcv=srcv[0,:] - interpolator = NearestNDInterpolator(srcp, srcv) - distances, jsrc = interpolator.tree.query(dstp) - jd=jd[0] - for k in range(nt): - jdk=np.where(np.isnan(vari[jv,k,jd])) - jdk=jdk[0] - vari[jv,k,jd[jdk]]=vari[jv,k,jsrc[jdk]] # value of nearest "always valid" destination point - IsExtrap[jv,k,jd[jdk]]=1 - -print("nn(target mesh) = "+str(nni)+": Nrows = "+str(Nrows)) -print("nn(source mesh) = "+str(n1)+": Ncols = "+str(Ncols)) -if not ((nni==Nrows) and (n1==Ncols)): - print("WARNING: Wrong matrix weights: number of rows from "+ mshfl +" = "+str(nni)+ - " but number of rows in "+ weights_file +" = "+str(Nrows)+ - ", number of spatial points in "+ flin +" = "+str(n1)+ - " but number of columns in "+ weights_file +" = "+str(Ncols) ) - print(" You may need to regnerate file "+ weights_file +" with appropriate weights") - -with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: - - ncout.createDimension('level' , 1) - ncout.createDimension('node' , nni) - ncout.createDimension('time', nt) - - time_var=ncout.createVariable('time', 'f8', ('time',)) - varin = data["time"] - iutil.CopyAttributes(varin, time_var) - if UseUnixTime: - time_var.units = 'seconds since 1970-01-01 00:00:00.0 0:00' - time_var.standard_name = 'time' - time_var[:]=time[:] - - for jv in range(nvar): - print("writing output for :"+varname[jv]) - varin = data[varname[jv]] - F_var=ncout.createVariable(varname[jv], 'f4', ('time','node'),fill_value = fill_value0) - iutil.CopyAttributes(varin, F_var) - F_var.location = 'node' - F_var[:,:] = vari[jv,:,:] - - if ExtrapMethod >= 0 : - xtrp_var=ncout.createVariable(varname[jv]+'IsExtrap', 'i1', ('time','node')) - xtrp_var.long_name = '==1 if the interpolated value extrapolated. 0 if interpolated' - xtrp_var.standard_name = 'is extrapolated' - xtrp_var.location = 'node' - if ExtrapMethod == 0: - xtrp_var.method = 'Interpolated nan values replaced with 0' - if ExtrapMethod == 1: - xtrp_var.method = 'nearest valid neighbor in source field' - if ExtrapMethod == 2: - xtrp_var.method = 'nearest valid neighbor in interpolated field' - xtrp_var[:,:] = IsExtrap[jv,:,:] - - ncout.close diff --git a/ush/preprocess/nbm/get_nbm_ice.sh b/ush/preprocess/nbm/get_nbm_ice.sh deleted file mode 100755 index 1bc14ad..0000000 --- a/ush/preprocess/nbm/get_nbm_ice.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -# This is just a place holder with notes for the time being. Notes on aws retrieval and processing are below -# This script takes rrfs grib2 forecast files, extracts 10m u and v wind -# components and outputs to netcdf. Comand line arguments are - -ICE_FILE="$COMINnbm/blend.t$2z.icec.ak.grib2" - -OUTPUT_DIR="$COMINlocal/ice.$1.$2" -OUTPUT_FILE="$OUTPUT_DIR/nbm.$1.$2.ice.ak.nc" - -mkdir -p "$OUTPUT_DIR" -# Remove existing output file to avoid mixing old data -rm -f "$OUTPUT_FILE" - -echo "writing ice from $INPUT_DIR to $OUTPUT_FILE" - -wgrib2 "$ICE_FILE" -match ":ICEC:" -netcdf "$OUTPUT_FILE" - -echo "nbm ice processing complete for forecast date $1, cycle $2, domain ak" -echo "output written to: $OUTPUT_FILE" diff --git a/ush/preprocess/nbm/make_nbm_wind.sh b/ush/preprocess/nbm/make_nbm_wind.sh deleted file mode 100755 index ca031a0..0000000 --- a/ush/preprocess/nbm/make_nbm_wind.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# This script takes rrfs grib2 forecast files, extracts 10m u and v wind -# components and outputs to netcdf. Comand line arguments are - -WSPD_FILE="$COMINnbm/blend.t$2z.wspd.$3.grib2" -WDIR_FILE="$COMINnbm/blend.t$2z.wdir.$3.grib2" - -OUTPUT_DIR="wind.$1.$2" -OUTPUT_DIR="$COMINlocal/wind.$1.$2" -OUTPUT_FILE="$OUTPUT_DIR/nbm.$1.$2.wind10m.$3.nc" - -mkdir -p "$OUTPUT_DIR" - -# Remove existing output file to avoid mixing old data -rm -f "$OUTPUT_FILE" - -echo "writing 10m wind from $INPUT_DIR to $OUTPUT_FILE" - -wgrib2 "$WSPD_FILE" -match ":WIND:10 m" -netcdf "$OUTPUT_FILE" -wgrib2 "$WDIR_FILE" -match ":WDIR:10 m" -append -netcdf "$OUTPUT_FILE" - -echo "nbm processing complete for forecast date $1, cycle $2, domain $3" -echo "output written to: $OUTPUT_FILE" - diff --git a/ush/preprocess/process_current.sh b/ush/preprocess/process_current.sh deleted file mode 100644 index 242b8e7..0000000 --- a/ush/preprocess/process_current.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/bash - -cd $HOMErwps/ush/preprocess - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - -stofscur="$tmp/stofs.$PDY.$cyc/stofs_2d_glo.t${cyc}z.fields.cwl.vel.nc" -rtofscur="$tmp/rtofs.$PDY.nc" - -varnames="u-vel:v-vel" - -#name of blended wind -rwps_current=$frc/$meshname.$PDY.$cyc.current.nc -#rwps_current=$frc/$meshname.$PDY.$cyc.vel.stofsxrtofs.nc -echo "outputting combined stofs and rtofs currents to $rwps_current" - -## STOFS interpolation -stofs_wghts="$fix/InterpolationWeights.$meshname.stofs.nc" -stofs_dists="$fix/DistToBndy.$meshname.stofs.nc" -stofs_rwps="$tmp/$meshname.$PDY.$cyc.vel.cwl.stofs.nc" -stofs_rwps_ti="$tmp/$meshname.$PDY.$cyc.vel.cwl.stofs.ti.nc" - - - -## RTOFS interpolation -rtofs_wghts="$fix/InterpolationWeights.$meshname.rtofs.current.nc" -rtofs_dists="$fix/DistToBndy.$meshname.rtofs.current.nc" -rtofs_rwps="$tmp/$meshname.$PDY.vel.rtofs.nc" -rtofs_rwps_ti="$tmp/$meshname.$PDY.$cyc.vel.cwl.rtofs.ti.nc" - - - -if [ ! -f "$stofs_wghts" ]; then - echo "missing stofs interpolation weights file: $stofs_wghts" - echo "compute with script compute_unstr_to_rwps_interp_weights.sh" - exit 1 -fi -if [ ! -f "$stofs_dists" ]; then - echo "missing stofs distance to boundary file: $stofs_dists" - echo "compute with script compute_unstr_to_rwps_interp_weights.sh" - exit 1 -fi - -# extrapolate with zero fill -python interpolate_with_weights.py $stofscur $stofs_wghts $stofs_rwps $varnames 0 & - -if [ ! -f "$rtofs_wghts" ]; then - echo "missing rtofs interpolation weights file: $stofs_wghts" - echo "compute with script ComputeGridToRWPSInterpWeights.py" - exit 2 -fi -if [ ! -f "$rtofs_dists" ]; then - echo "missing stofs distance to boundary file: $rtofs_dists" - echo "compute with script compute_unstr_to_rwps_interp_weights.py" - exit 2 -fi - -# no extrapolation -python interpolate_with_weights.py $rtofscur $rtofs_wghts $rtofs_rwps $varnames -1 & - -wait; - -python add_mesh_geom_to_file.py $rtofs_rwps $mesh -python add_mesh_geom_to_file.py $stofs_rwps $mesh - -python interp_time.py $stofs_rwps $rtofs_rwps $stofs_rwps_ti $varnames False & - -#interpolate from rtofs to common stofs and rtofs times within range of stofs time -#values out of range are extrapolated to assuming persistance -python interp_time.py $stofs_rwps $rtofs_rwps $rtofs_rwps_ti $varnames True & - -wait - -python add_err_var_to_file.py $rtofs_rwps_ti $rtofs_dists 100.:1.:50.:250.:50. -python add_err_var_to_file.py $stofs_rwps_ti $stofs_dists 1.:100.:50.:250. - -python bayes_forecast_update.py $stofs_rwps_ti $rtofs_rwps_ti $rwps_current $varnames - diff --git a/ush/preprocess/process_ice.sh b/ush/preprocess/process_ice.sh deleted file mode 100644 index 11394a1..0000000 --- a/ush/preprocess/process_ice.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/bash - -cd $HOMErwps/ush/preprocess - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - - -inpdir=$tmp/ice.$PDY.$cyc - -nbmice=$inpdir/nbm.$PDY.$cyc.ice.ak.nc -rtofsice=$inpdir/rtofs.ice.$PDY.nc - - -rtofs_wghts="$fix/InterpolationWeights.$meshname.rtofs.ice.nc" -rtofs_dists="$fix/DistToBndy.$meshname.rtofs.ice.nc" -nbm_ak_wghts="$fix/InterpolationWeights.$meshname.nbm.ak.nc" -nbm_ak_dists="$fix/DistToBndy.$meshname.nbm.ak.nc" - -rtofs_rwps="$tmp/$meshname.$PDY.ice.rtofs.nc" -rtofs_rwps_ti="$tmp/$meshname.$PDY.$cyc.ice.rtofs.ti.nc" - -nbm_rwps="$tmp/$meshname.$PDY.$cyc.ice.nbm.ak.nc" -nbm_rwps_ti="$tmp/$meshname.$PDY.$cyc.ice.nbm.ak.ti.nc" - -varnames="ICEC_surface" - -#rwps_ice="$frc/$meshname.$PDY.$cyc.ice.rtofsxnbm.nc" -rwps_ice="$frc/$meshname.$PDY.$cyc.ice.nc" - -## NBM AK domain interpolation -## NOTE WE ARE USING THE RRFS ak WEIGHTS HERE NEED TO RELABEL AND RECOMPUTE FOR NBM AK DOMAIN -## DIFFERENCES ARE SMALL. posional distance ~200m on 3km grid roughly - -#../../fix/DistToBndy.rwps.oc_1500m_30km.nbm.ak.nc - - -if [ ! -f "$nbm_ak_wghts" ]; then - echo "missing nbm ak interpolation weights file: $nbm_ak_wghts" - echo "compute with script compute_unstr_to_rwps_interp_weights.sh" - exit 1 -fi - -if [ ! -f "$nbm_ak_dists" ]; then - echo "missing nbm ak distance to boundary file: $nbm_ak_dists" - echo "compute with script compute_unstr_to_rwps_interp_weights.sh" - exit 1 -fi - -# no extrapolation -python interpolate_with_weights.py $nbmice $nbm_ak_wghts $nbm_rwps $varnames -1 & - -## RTOFS interpolation - -if [ ! -f "$rtofs_wghts" ]; then - echo "missing rtofs interpolation weights file: $rtofs_wghts" - echo "compute with script ComputeGridToRWPSInterpWeights.py" - exit 2 -fi -if [ ! -f "$rtofs_dists" ]; then - echo "missing stofs distance to boundary file: $rtofs_dists" - echo "compute with script compute_unstr_to_rwps_interp_weights.py" - exit 2 -fi - -# extrapolate with 0 as fill -echo "$rtofsice" -python interpolate_with_weights.py $rtofsice $rtofs_wghts $rtofs_rwps $varnames 0 & - -wait; - -python add_mesh_geom_to_file.py $rtofs_rwps $mesh -python add_mesh_geom_to_file.py $nbm_rwps $mesh - -#python add_err_var_to_file.py $rtofs_rwps $rtofs_dists 100.:1.:50.:250.:50. -#python add_err_var_to_file.py $stofs_rwps $stofs_dists 1.:100.:50.:250. - -#interpolate from stofs to common stofs and rtofs times within range of stofs time -python interp_time.py $rtofs_rwps $nbm_rwps $rtofs_rwps_ti $varnames False & - -#interpolate from rtofs to common stofs and rtofs times within range of stofs time -#values out of range are extrapolated to assuming persistance -python interp_time.py $rtofs_rwps $nbm_rwps $nbm_rwps_ti $varnames True & - -wait - -#uniform variance of 100. -python add_err_var_to_file.py $rtofs_rwps_ti $rtofs_dists 100. - -#interior variance of 4., boundary variance fof 400., transition lengthscale 9. km -python add_err_var_to_file.py $nbm_rwps_ti $nbm_ak_dists 4.:400.:9. - -python bayes_forecast_update.py $rtofs_rwps_ti $nbm_rwps_ti $rwps_ice $varnames diff --git a/ush/preprocess/process_waterlevel.sh b/ush/preprocess/process_waterlevel.sh deleted file mode 100644 index 4179452..0000000 --- a/ush/preprocess/process_waterlevel.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -cd $HOMErwps/ush/preprocess - -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - -stofslev="$tmp/stofs.$PDY.$cyc/stofs_2d_glo.t${cyc}z.fields.cwl.nc" -stofs_wghts="$fix/InterpolationWeights.$meshname.stofs.nc" -stofs_dists="$fix/DistToBndy.$meshname.stofs.nc" -stofs_rwps="$frc/$meshname.$PDY.$cyc.cwl.waterlevel.nc" - -rwps_waterlevel="$frc/$meshname.$PDY.$cyc.waterlevel.nc" - -varnames="zeta" - -## STOFS interpolation - -if [ ! -f "$stofs_wghts" ]; then - echo "missing stofs interpolation weights file: $stofs_wghts" - echo "compute with script compute_unstr_to_rwps_interp_weights.sh" - exit 1 -fi -if [ ! -f "$stofs_dists" ]; then - echo "missing stofs distance to boundary file: $stofs_dists" - echo "compute with script compute_unstr_to_rwps_interp_weights.sh" - exit 1 -fi - -python interpolate_with_weights.py $stofslev $stofs_wghts $rwps_waterlevel $varnames 0 -python add_mesh_geom_to_file.py $rwps_waterlevel $mesh -python add_err_var_to_file.py $rwps_waterlevel $stofs_dists 1. diff --git a/ush/preprocess/process_wind.sh b/ush/preprocess/process_wind.sh deleted file mode 100644 index 525cd57..0000000 --- a/ush/preprocess/process_wind.sh +++ /dev/null @@ -1,122 +0,0 @@ -#!/bin/bash - -cd $HOMErwps/ush/preprocess - -winddir="$tmp/wind.$PDY.$cyc" -windvars="UGRD_10maboveground:VGRD_10maboveground" - -# extract mesh name from file path -meshname="${mesh##*/}" -# remove .msh suffix from mesh name -meshname="${meshname: 0: -4}" - -# incorporate meshname date and cycle into output directory name to avoid -# applying winds to wrong mesh - -outdir="$tmp/rwps_wind.$meshname.$PDY.$cyc" - -rwps_wind="$frc/$meshname.$PDY.$cyc.wind.nc" - -echo "outputing files to: $outdir" - -nbm_oc="$winddir/nbm.$PDY.$cyc.wind10m.oc.nc" -nbm_oc_uv="$winddir/nbm.$PDY.$cyc.wind10m.oc.uv.nc" - -rrfs_pr="$winddir/rrfs.$PDY.$cyc.wind10m.pr.nc" -rrfs_hi="$winddir/rrfs.$PDY.$cyc.wind10m.hi.nc" -rrfs_na="$winddir/rrfs.$PDY.$cyc.wind10m.na.nc" -rrfs_ak="$winddir/rrfs.$PDY.$cyc.wind10m.ak.nc" -rrfs_conus="$winddir/rrfs.$PDY.$cyc.wind10m.conus.nc" - -rwps_oc="$outdir/$meshname.$PDY.$cyc.wind10m.nbm.oc.nc" -rwps_oc_ti="$outdir/$meshname.$PDY.$cyc.wind10m.nbm.oc.ti.nc" -rwps_pr="$outdir/$meshname.$PDY.$cyc.wind10m.rrfs.pr.nc" -rwps_hi="$outdir/$meshname.$PDY.$cyc.wind10m.rrfs.hi.nc" -rwps_na="$outdir/$meshname.$PDY.$cyc.wind10m.rrfs.na.nc" -rwps_ak="$outdir/$meshname.$PDY.$cyc.wind10m.rrfs.ak.nc" -rwps_conus="$outdir/$meshname.$PDY.$cyc.wind10m.rrfs.conus.nc" - - -mkdir -p $outdir - -##LocalFS = [ rwps_pr, rwps_hi, rwps_ak, rwps_conus, rwps_na] # file names -##VarFS = [ 4. , 4. , 9. , 16. , 25. ] # (m m /s /s) -##LambdaFS = [ 150. , 200. , 500. , 1000. , 1500. ] # (km) -nbm_oc_wghts="$fix/InterpolationWeights.$meshname.nbm.oc.nc" -rrfs_hi_wghts="$fix/InterpolationWeights.$meshname.rrfs.hi.nc" -rrfs_pr_wghts="$fix/InterpolationWeights.$meshname.rrfs.pr.nc" -rrfs_ak_wghts="$fix/InterpolationWeights.$meshname.rrfs.ak.nc" -rrfs_na_wghts="$fix/InterpolationWeights.$meshname.rrfs.na.nc" -rrfs_conus_wghts="$fix/InterpolationWeights.$meshname.rrfs.conus.nc" - -nbm_oc_dist="$fix/DistToBndy.$meshname.nbm.oc.nc" -rrfs_hi_dist="$fix/DistToBndy.$meshname.rrfs.hi.nc" -rrfs_pr_dist="$fix/DistToBndy.$meshname.rrfs.pr.nc" -rrfs_ak_dist="$fix/DistToBndy.$meshname.rrfs.ak.nc" -rrfs_na_dist="$fix/DistToBndy.$meshname.rrfs.na.nc" -rrfs_conus_dist="$fix/DistToBndy.$meshname.rrfs.conus.nc" - - -( - #Convert NBM speed and direction to u,v - python spd_dir_to_uv_nbm.py $nbm_oc $nbm_oc_uv - # If the interpolation weights do not already exist for the domains create them - # also creates distance to boundary used in prescribed error covariance specification - [ ! -f "$nbm_oc_wghts" ] && python compute_gridded_to_rwps_interp_weights.py $nbm_oc_uv $mesh 1 - python interpolate_with_weights.py $nbm_oc_uv $nbm_oc_wghts $rwps_oc $windvars 3 > $tmp/intrp.rrfs.oc.out - python add_mesh_geom_to_file.py $rwps_oc $mesh -)& - -( - [ ! -f "$rrfs_hi_wghts" ] && python compute_gridded_to_rwps_interp_weights.py $rrfs_hi $mesh $rrfs_hi_wghts $rrfs_hi_dist - python interpolate_with_weights.py $rrfs_hi $rrfs_hi_wghts $rwps_hi $windvars -1 > $tmp/intrp.rrfs.hi.out - #add mesh geometry into interpolated file - python add_mesh_geom_to_file.py $rwps_hi $mesh - # Add error covariance field to files with interpolated fields for bayesian update - # Based on distance to boundary of input field and commant line parameters InternalVariance:BoundaryVariance:LengthScale(km) - python add_err_var_to_file.py $rwps_hi $rrfs_hi_dist 4.:40.:200. -)& - -( - [ ! -f "$rrfs_pr_wghts" ] && python compute_gridded_to_rwps_interp_weights.py $rrfs_pr $mesh $rrfs_pr_wghts $rrfs_pr_dist - python interpolate_with_weights.py $rrfs_pr $rrfs_pr_wghts $rwps_pr $windvars -1 > $tmp/intrp.rrfs.pr.out - python add_mesh_geom_to_file.py $rwps_pr $mesh - python add_err_var_to_file.py $rwps_pr $rrfs_pr_dist 4.:40.:150. -)& - -( - [ ! -f "$rrfs_ak_wghts" ] && python compute_gridded_to_rwps_interp_weights.py $rrfs_ak $mesh $rrfs_ak_wghts $rrfs_ak_dist - python interpolate_with_weights.py $rrfs_ak $rrfs_ak_wghts $rwps_ak $windvars -1 > $tmp/intrp.rrfs.ak.out - python add_mesh_geom_to_file.py $rwps_ak $mesh - python add_err_var_to_file.py $rwps_ak $rrfs_ak_dist 9.:90.:500. -)& - -( - [ ! -f "$rrfs_conus_wghts" ] && python compute_gridded_to_rwps_interp_weights.py $rrfs_conus $mesh $rrfs_conus_wghts $rrfs_conus_dist - python interpolate_with_weights.py $rrfs_conus $rrfs_conus_wghts $rwps_conus $windvars -1 > $tmp/intrp.rrfs.conus.out - python add_mesh_geom_to_file.py $rwps_conus $mesh - python add_err_var_to_file.py $rwps_conus $rrfs_conus_dist 16.:160.:1000. -)& - -( - [ ! -f "$rrfs_na_wghts" ] && python compute_gridded_to_rwps_interp_weights.py $rrfs_na $mesh $rrfs_na_wghts $rrfs_na_dist - python interpolate_with_weights.py $rrfs_na $rrfs_na_wghts $rwps_na $windvars -1 > $tmp/intrp.rrfs.na.out - python add_mesh_geom_to_file.py $rwps_na $mesh - python add_err_var_to_file.py $rwps_na $rrfs_na_dist 50.:500.:1500. -)& - -wait; - -#Interpolate NBM in time to times within the NBM forecast covered by the RRFS forecast -python interp_time.py $rwps_oc $rwps_pr $rwps_oc_ti $windvars -#add mesh geometry into file -python add_mesh_geom_to_file.py $rwps_oc_ti $mesh -#add prescribed error covariance for nbm oc domain (assumed constant 100. (m/s)^2 ) -python add_err_var_to_file.py $rwps_oc_ti $nbm_oc_dist 100. - -cp $rwps_oc_ti $rwps_wind -[ ! -f "$rwps_hi" ] && python bayes_forecast_update.py $rwps_wind $rwps_hi $rwps_wind $windvars -[ ! -f "$rwps_pr" ] && python bayes_forecast_update.py $rwps_wind $rwps_pr $rwps_wind $windvars -[ ! -f "$rwps_ak" ] && python bayes_forecast_update.py $rwps_wind $rwps_ak $rwps_wind $windvars -[ ! -f "$rwps_conus" ] && python bayes_forecast_update.py $rwps_wind $rwps_conus $rwps_wind $windvars -[ ! -f "$rwps_na" ] && python bayes_forecast_update.py $rwps_wind $rwps_na $rwps_wind $windvars diff --git a/ush/preprocess/rrfs/make_rrfs_wind.sh b/ush/preprocess/rrfs/make_rrfs_wind.sh deleted file mode 100755 index 337324c..0000000 --- a/ush/preprocess/rrfs/make_rrfs_wind.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -# This script takes rrfs grib2 forecast files, extracts 10m u and v wind -# components and outputs to netcdf. Comand line arguments are -# forecast time: YYYYMMDD -# forecast cycle: CC -# frecast region: hi,pr,na,ak or conus -# -# For example call as: -# sh make_rrfs_wind.sh 20260428 00 pr -# to produce output file: -# rrfs.20260428.00.wind10m.pr.nc -# -echo "make_rrfs_wind.sh fetching rrfs : time = $1, cycle = $2, domain = $3" - -INPUT_DIR="$COMINrrfs" -OUTPUT_DIR="$COMINlocal/wind.$1.$2" -OUTPUT_FILE="$OUTPUT_DIR/rrfs.$1.$2.wind10m.$3.nc" - -mkdir -p "$OUTPUT_DIR" -# Remove existing output file to avoid mixing old data -rm -f "$OUTPUT_FILE" - -echo "writing 10m wind from $INPUT_DIR to $OUTPUT_FILE" - -# Note: Ensure files are in the correct chronological order (e.g., sorted by name) -for file in $(ls "$INPUT_DIR"/rrfs.t$2z.2dfld.*km.f*.$3.grib2 | sort); do - echo "Processing: $file" - # Convert and append to the NetCDF file - # -netcdf: specifies the output format and filename - # -append: adds data to the existing netcdf file instead of overwriting - wgrib2 "$file" -match ":UGRD:10 m" -append -netcdf "$OUTPUT_FILE" - wgrib2 "$file" -match ":VGRD:10 m" -append -netcdf "$OUTPUT_FILE" -done - -echo "rrfs processing complete for forecast date $1, cycle $2, domain $3" -echo "output written to: $OUTPUT_FILE" diff --git a/ush/preprocess/rtofs/get_rtofs.sh b/ush/preprocess/rtofs/get_rtofs.sh deleted file mode 100755 index b68930c..0000000 --- a/ush/preprocess/rtofs/get_rtofs.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -#Retrieve global RTOFS currents and consolidate into a single NetCDF file - -cd $HOMErwps/ush/preprocess - -tmpdir="$COMINlocal/tmp.rtofs.$PDY" -filesin="$COMINrtofs/*prog.nc" -flout="$COMINlocal/rtofs.$PDY.nc" - -mkdir -p $tmpdir -cp $filesin $tmpdir/ -python rtofs/get_rtofs_fcst.py $tmpdir $flout - -#rm -rf $tmpdir diff --git a/ush/preprocess/rtofs/get_rtofs_fcst.py b/ush/preprocess/rtofs/get_rtofs_fcst.py deleted file mode 100644 index 480fc68..0000000 --- a/ush/preprocess/rtofs/get_rtofs_fcst.py +++ /dev/null @@ -1,95 +0,0 @@ -import numpy as np -import os -import netCDF4 as nc -import sys - -sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) -import interp_utilities as iutil - - - -# Consolidate u,v surface currents from global RTOFS into a single NetCDF file. - -dirin=sys.argv[1] -flout=sys.argv[2] - -ncfiles = os.listdir(dirin) -nt=len(ncfiles) -k=0 -flin=dirin+"/"+ncfiles[k] -data=nc.Dataset(flin,"r") -X=data["Longitude"][:,:] -Y=data["Latitude"][:,:] -fill_value0=data["u_velocity"]._FillValue -nx=X.shape[0] -ny=X.shape[1] -U=np.zeros((nt,1,nx,ny)) -V=np.zeros((nt,1,nx,ny)) -MT=np.zeros(nt) -time=np.zeros(nt) -print(U.shape) -for k in range(nt): - flin=dirin+"/"+ncfiles[k] - data=nc.Dataset(flin,"r") - U0=data["u_velocity"][:] - V0=data["v_velocity"][:] - T0=data["MT"][:] - print(k) - U[k,0,:,:]=U0[0,0,:,:] - V[k,0,:,:]=V0[0,0,:,:] - MT[k]=T0 - tmp=iutil.ConvertTimeToUnixTime(flin,"MT") - time[k]=tmp[0] - -tindx = np.argsort(time) -time=time[tindx] -MT=MT[tindx] -U=U[tindx,:,:,:] -V=V[tindx,:,:,:] - -Layers=data["Layer"][:] - -with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: - - ncout.createDimension('Layer' , 1) - ncout.createDimension('X' , nx) - ncout.createDimension('Y' , ny) - ncout.createDimension('time', nt) - - lon_var=ncout.createVariable('longitude', 'f4', ('X','Y')) - var=data["Longitude"] - iutil.CopyAttributes(var, lon_var) - lon_var[:,:]=X[:,:] - - lat_var=ncout.createVariable('latitude', 'f4', ('X','Y')) - var=data["Latitude"] - iutil.CopyAttributes(var, lat_var) - lat_var[:,:]=Y[:,:] - - # Keep redundent time variables (time and MT) for conviniences - time_var=ncout.createVariable('time', 'f8', ('time',)) - time_var.units = 'seconds since 1970-01-01 00:00:00.0 0:00' - time_var.long_name = 'verification time generated by wgrib2 function verftime()' - time_var.standard_name = 'time' - time_var.axis = 'T' - time_var[:] = time[:] - - MT_var=ncout.createVariable("MT", 'f8', ('time',)) - var=data["MT"] - iutil.CopyAttributes(var, MT_var) - MT_var[:] = MT[:] - - u_var = ncout.createVariable('u-vel', 'f4', ('time','Layer','X','Y'),fill_value = fill_value0) - var=data["u_velocity"] - iutil.CopyAttributes(var, u_var) - u_var[:,:,:,:] = U - - v_var = ncout.createVariable('v-vel', 'f4', ('time','Layer','X','Y'),fill_value = fill_value0) - var=data["v_velocity"] - iutil.CopyAttributes(var, v_var) - v_var[:,:,:,:] = V - - l_var = ncout.createVariable('Layer', 'i4', ('Layer',)) - var=data["Layer"] - iutil.CopyAttributes(var, l_var) - l_var[:] = Layers[0] diff --git a/ush/preprocess/rtofs/get_rtofs_ice.sh b/ush/preprocess/rtofs/get_rtofs_ice.sh deleted file mode 100755 index 4621f30..0000000 --- a/ush/preprocess/rtofs/get_rtofs_ice.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -#Retrieve global RTOFS ice forecast and consolidate in single NetCDF filesin - -tmpdir="$COMINlocal/tmp.rtofsIce.$PDY" -filesin="$COMINrtofs/*ice.nc" -dirout="$COMINlocal/ice.$PDY.$cyc" -flout="$dirout/rtofs.ice.$PDY.nc" - -mkdir $tmpdir -cp $filesin $tmpdir/ -echo $tmpdir -echo $flout - -PDYCC="${PDY}${cyc}" -echo $PDYCC -python rtofs/get_rtofs_ice_fcst.py $tmpdir $PDYCC $flout - diff --git a/ush/preprocess/rtofs/get_rtofs_ice_fcst.py b/ush/preprocess/rtofs/get_rtofs_ice_fcst.py deleted file mode 100644 index 8b3e769..0000000 --- a/ush/preprocess/rtofs/get_rtofs_ice_fcst.py +++ /dev/null @@ -1,127 +0,0 @@ -import numpy as np -import os -import netCDF4 as nc -import sys - -import datetime -import re - -def get_rtofs_unix_time(file_path: str) -> int: - """ - Extracts the valid UTC Unix timestamp from a NOAA RTOFS file path. - Example path: '/pub/data/nccf/com/rtofs/prod/rtofs.20260813/rtofs_glo.t12z.f024.archv.nc' - """ - # Regex to find 8-digit date, cycle hour (tXXz), and forecast hour (fXXX) - match = re.search(r'rtofs\.(\d{8}).*?\.t(\d{2})z\.f(\d{3})', file_path) - - if not match: - raise ValueError("Could not parse RTOFS naming convention from path.") - - date_str, cycle_str, forecast_str = match.groups() - - # 1. Parse base model initialization time to a UTC datetime object - base_time_str = f"{date_str} {cycle_str}" - base_dt = datetime.datetime.strptime(base_time_str, "%Y%m%d %H").replace(tzinfo=datetime.timezone.utc) - - # 2. Add the forecast hour offset - forecast_hours = int(forecast_str) - valid_dt = base_dt + datetime.timedelta(hours=forecast_hours) - - # 3. Convert valid UTC datetime to epoch integer - return int(valid_dt.timestamp()) - -# --- Example Usage --- -sample_path = "/pub/data/nccf/com/rtofs/prod/rtofs.20260813/rtofs_glo.t12z.f024.archv.nc" -unix_time = get_rtofs_unix_time(sample_path) - -print(f"Unix Timestamp: {unix_time}") -# Output: 1786708800 (Reflects: 2026-08-14 12:00:00 UTC) - -#Consolidate RTOFS ice forecast files to a single NetCDF file. - -# Get the path relative to this file and add to sys.path -sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) -import interp_utilities as iutil - -dirin=sys.argv[1] -PDYCC=sys.argv[2] -flout=sys.argv[3] -print(PDYCC) -PDY=PDYCC[0:8] -CYC=PDYCC[8:10] -print(PDY) -print(CYC) - - -ncfiles = os.listdir(dirin) -print(ncfiles) -nt=len(ncfiles) - -nt=17 - - -k=0 -flin=dirin+"/"+ncfiles[k] -data=nc.Dataset(flin,"r") -X=data["Longitude"][:,:] -Y=data["Latitude"][:,:] -fill_value0=data["ice_coverage"]._FillValue -nx=X.shape[0] -ny=X.shape[1] -F=np.zeros((nt,nx,ny),dtype=np.float32) -MT=np.zeros(nt) -time=np.zeros(nt) -print("nx = "+str(nx)) -print("ny = "+str(ny)) -print(F.shape) -for k in range(nt): - flin=dirin+"/"+ncfiles[k] - data=nc.Dataset(flin,"r") - F0=data["ice_coverage"][:] - print(F0.shape) - print(F.shape) - print(str(k)+" of "+ str(nt)) - F[k,:,:]=F0[0,:,:] - tmp=iutil.FileNameToUnixTime(flin,PDY,CYC) - time[k]=tmp - print(flin) - print(time[k]) - -tindx = np.argsort(time) -time=time[tindx] -MT=MT[tindx] -F=F[tindx,:,:] - -with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: - - ncout.createDimension('X' , nx) - ncout.createDimension('Y' , ny) - ncout.createDimension('time', nt) - - lon_var=ncout.createVariable('longitude', 'f4', ('X','Y')) - var=data["Longitude"] - iutil.CopyAttributes(var, lon_var) - lon_var[:,:]=X[:,:] - - lat_var=ncout.createVariable('latitude', 'f4', ('X','Y')) - var=data["Latitude"] - iutil.CopyAttributes(var, lat_var) - lat_var[:,:]=Y[:,:] - - # Keep redundent time variables (time and MT) for conviniences - time_var=ncout.createVariable('time', 'f8', ('time',)) - time_var.units = 'seconds since 1970-01-01 00:00:00.0 0:00' - time_var.long_name = 'verification time generated by wgrib2 function verftime()' - time_var.standard_name = 'time' - time_var.axis = 'T' - time_var[:] = time[:] - - MT_var=ncout.createVariable("MT", 'f8', ('time',)) - var=data["MT"] - iutil.CopyAttributes(var, MT_var) - MT_var[:] = MT[:] - - f_var = ncout.createVariable('ICEC_surface', 'f4', ('time','X','Y'),fill_value = fill_value0) - var=data["ice_coverage"] - iutil.CopyAttributes(var, f_var) - f_var[:,:,:] = F[:,:,:] diff --git a/ush/preprocess/spd_dir_to_uv_nbm.py b/ush/preprocess/spd_dir_to_uv_nbm.py deleted file mode 100644 index 91d46c5..0000000 --- a/ush/preprocess/spd_dir_to_uv_nbm.py +++ /dev/null @@ -1,79 +0,0 @@ -import os -import argparse -import numpy as np -import netCDF4 as nc -import sys -import math -import interp_utilities as iutil -# Converts NBM direction and magnitude wind variables to U,V -# Command line inputs: -# argumnent 1 is the netcdf input file name with variables: WIND_10maboveground and WDIR_10maboveground -# argumnent 2 is the netcdf output file name which will have vector wind variables: UGRD_10maboveground and VGRD_10maboveground -# call as: -# python spd_dir_to_uv_nbm.py nbm.20260502.00.wind10m.oc.nc nbm.20260502.00.wind10m.oc.uv.nc - -flin=sys.argv[1] -flout=sys.argv[2] - -fcst0 = nc.Dataset(flin,"r") - -x=np.asarray(fcst0["longitude"][:]) -y=np.asarray(fcst0["latitude"][:]) -t=np.asarray(fcst0["time"][:]) -spd=np.asarray(fcst0["WIND_10maboveground"][:,:,:]) -theta=np.asarray(fcst0["WDIR_10maboveground"][:,:,:]) - -spdV=fcst0["WIND_10maboveground"] -fill_value0 = spdV._FillValue - -u=-1*spd*np.sin(theta*np.pi/180.) -v=-1*spd*np.cos(theta*np.pi/180.) -u[np.where(spd==fill_value0)]=fill_value0 -v[np.where(spd==fill_value0)]=fill_value0 - -nx=len(x) -ny=len(y) -nt=len(t) - -with nc.Dataset(flout, 'w', format='NETCDF4') as ncout: - # Create dimensions - ncout.createDimension('lon' , nx) # Unlimited dimension - ncout.createDimension('lat' , ny) - ncout.createDimension('time', nt) - - lon_var=ncout.createVariable('longitude', 'f8', ('lon',)) - lon_var.units = 'degree_east' - lon_var.long_name = 'longitude' - lon_var.standard_name = 'longitude' - lon_var.axis = 'lon' - lon_var[:]=x[:] - - lat_var=ncout.createVariable('latitude', 'f8', ('lat',)) - lat_var.units = 'degree_north' - lat_var.long_name = 'latitude' - lat_var.standard_name = 'latitude' - lat_var.axis = 'lat' - lat_var[:]=y[:] - - time_var=ncout.createVariable('time', 'f8', ('time',)) - time_varin=fcst0["time"] - iutil.CopyAttributes(time_varin, time_var) - time_var[:]=t[:] - - u_var=ncout.createVariable('UGRD_10maboveground', 'f4', ('time','lat','lon'),fill_value = fill_value0) - u_var.long_name = 'U-Component of Wind' - u_var.units = 'm/s' - u_var.standard_name = 'UGRD_10maboveground' - u_var.level = '10 m above ground' - u_var[:,:,:]=u[:,:,:] - - v_var=ncout.createVariable('VGRD_10maboveground', 'f4', ('time','lat','lon'),fill_value = fill_value0) - v_var.long_name = 'V-Component of Wind' - v_var.units = 'm/s' - v_var.standard_name = 'VGRD_10maboveground' - v_var.level = '10 m above ground' - v_var[:,:,:]=v[:,:,:] - - ncout.close - - diff --git a/ush/preprocess/stofs/get_stofs.sh b/ush/preprocess/stofs/get_stofs.sh deleted file mode 100755 index 7985c6e..0000000 --- a/ush/preprocess/stofs/get_stofs.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -#script for retrieving stofs current and/or water level - -if [ "$#" -lt 3 ]; then - echo "No arguments field argument." - echo "Retrieving both stofs currents and stofs water level." - fields="current, waterlevel" -else - fields=$3 -fi - -outdir=$tmp/stofs.$PDY.$cyc - -mkdir -p $outdir - -if [[ "$fields" == *"current"* ]]; then - echo retrieving stofs current for $PDY cycle $cyc - cp $COMINstofs/stofs_2d_glo.t"$cyc"z.fields.cwl.vel.nc $outdir/ -fi - -if [[ "$fields" == *"level"* ]]; then - echo retrieving stofs water level for $PDY cycle $cyc - cp $COMINstofs/stofs_2d_glo.t"$cyc"z.fields.cwl.nc $outdir/ -fi - From bf468d510c7aa8895f11ea03c3834a69a5ebc9ab Mon Sep 17 00:00:00 2001 From: keston Date: Thu, 10 Sep 2026 10:48:52 -0400 Subject: [PATCH 37/39] fixed indexing issue in unstructure weight calculation as well as extrapolation index issue in gridded weight calculation --- .../compute_gridded_to_rwps_interp_weights.py | 10 +++--- .../compute_unstr_to_rwps_interp_weights.py | 35 ++++++++++++------- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/dev/compute_interpolation_weights/ush/compute_gridded_to_rwps_interp_weights.py b/dev/compute_interpolation_weights/ush/compute_gridded_to_rwps_interp_weights.py index 60e8320..44b6157 100644 --- a/dev/compute_interpolation_weights/ush/compute_gridded_to_rwps_interp_weights.py +++ b/dev/compute_interpolation_weights/ush/compute_gridded_to_rwps_interp_weights.py @@ -11,11 +11,7 @@ import netCDF4 as nc import sys import xarray as xr -import esmpy import scipy.sparse as sp - -sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../ush/preprocess'))) - import compute_interpolation_weights_utilities as iutil # Main program @@ -137,8 +133,10 @@ interpolator = NearestNDInterpolator(srcp, srcv) distances, j0src = interpolator.tree.query(dstp) weightsExtrp=weights.tolist().append([1.0] * len(j0) ) - rowExtrp=np.concatenate( (row, np.array(j0)) ) - colExtrp=np.concatenate( (col, np.array(j0src+1)) ) + j0=np.array(j0) + j0src=np.array(j0src) + rowExtrp=np.concatenate( (row, j0+1 ) ) + colExtrp=np.concatenate( (col, j0src+1 ) ) weightsExtrp=np.concatenate( (weights, np.array([1.0] * len(j0))) ) os.replace(weights_file, weights_file[0:-3]+".NoExtrap.nc") iutil.WriteInterpolationWeightsToNetCDF(weights_file,rowExtrp,colExtrp,weightsExtrp,len(xi),len(x1v)) diff --git a/dev/compute_interpolation_weights/ush/compute_unstr_to_rwps_interp_weights.py b/dev/compute_interpolation_weights/ush/compute_unstr_to_rwps_interp_weights.py index c4346b0..5f9101c 100644 --- a/dev/compute_interpolation_weights/ush/compute_unstr_to_rwps_interp_weights.py +++ b/dev/compute_interpolation_weights/ush/compute_unstr_to_rwps_interp_weights.py @@ -1,13 +1,12 @@ import numpy as np import netCDF4 as nc import sys +import compute_interpolation_weights_utilities as iutil import os -sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../ush/preprocess'))) -import compute_interpolation_weights_utilities as iutil +PBS=True nargin = len(sys.argv) - 1 - flin=sys.argv[1] mshfl=sys.argv[2] @@ -53,8 +52,6 @@ nni=len(xi) j=np.where(xi>90.) # should be empty xi[j]=xi[j]-360. -#if np.mean(xi)<0.: -# xi=xi+360. # divide domain from east west based on job id=0 ... Njobs # and make North-South window contain the full target domain @@ -62,17 +59,29 @@ # the same number of destination nodes and/or the same number of source elements if nargin < 5: -# balance node load for +# balance node load +# on PBS system jobID runs from 1 to Njobs +# on SLURM system jobID runs from 0 to Njobs-1 so this partition scheam needs to be modified xis=np.sort(xi) mm=round(nni/Njobs) - xil=xis[range(0,nni,mm)] - lonW=xil[jobID] - if jobID==Njobs-1: - lonE=xis[-1]+1. + xil=xis[range(0,nni,mm)] # geographic partitions for parallelization + + if PBS: + lonW=xil[jobID-1] + if jobID==Njobs: + lonE=xis[-1]+1. + else: + lonE=xil[jobID] + if jobID==1: + lonW=xis[0]-1. else: - lonE=xil[jobID+1] - if jobID==0: - lonW=xis[0]-1. + lonW=xil[jobID] + if jobID==Njobs-1: + lonE=xis[-1]+1. + else: + lonE=xil[jobID+1] + if jobID==0: + lonW=xis[0]-1. latS=np.min(yi)-1. latN=np.max(yi)+1. From 390b86063dd7305c1f6d5331dc1a64c2d8f385e2 Mon Sep 17 00:00:00 2001 From: kestonsmith-noaa Date: Thu, 10 Sep 2026 17:50:15 +0000 Subject: [PATCH 38/39] fixed problem with mesh nodes falling on boundary between regions in unstructuerd interpolation weight generation --- .../ecf/compute_interpolation_weights.ecf | 4 +- .../jobs/COMPUTE_INTERPOLATION_WEIGHTS | 68 +++++-------------- .../ush/compute_interpolation_weights.sh | 11 ++- .../compute_unstr_to_rwps_interp_weights.py | 2 +- ecf/jrwps_prep_current.ecf | 36 ---------- ecf/jrwps_prep_ice.ecf | 36 ---------- ecf/jrwps_prep_waterlevel.ecf | 36 ---------- ecf/jrwps_prep_wind.ecf | 36 ---------- 8 files changed, 24 insertions(+), 205 deletions(-) delete mode 100644 ecf/jrwps_prep_current.ecf delete mode 100644 ecf/jrwps_prep_ice.ecf delete mode 100644 ecf/jrwps_prep_waterlevel.ecf delete mode 100644 ecf/jrwps_prep_wind.ecf diff --git a/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf b/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf index b5a8475..a257891 100644 --- a/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf +++ b/dev/compute_interpolation_weights/ecf/compute_interpolation_weights.ecf @@ -1,11 +1,11 @@ #!/bin/bash -#PBS -N ESMPy +#PBS -N compute_interpolation_weights #PBS -j oe #PBS -S /bin/bash #PBS -q dev #PBS -A NWPS-DEV #PBS -l walltime=04:00:00 -#PBS -l select=1:ncpus=16:mem=500GB +#PBS -l select=1:ncpus=32:mem=500GB #PBS -l place=excl #PBS -l debug=true diff --git a/dev/compute_interpolation_weights/jobs/COMPUTE_INTERPOLATION_WEIGHTS b/dev/compute_interpolation_weights/jobs/COMPUTE_INTERPOLATION_WEIGHTS index 6643c81..b9a65e1 100755 --- a/dev/compute_interpolation_weights/jobs/COMPUTE_INTERPOLATION_WEIGHTS +++ b/dev/compute_interpolation_weights/jobs/COMPUTE_INTERPOLATION_WEIGHTS @@ -29,10 +29,6 @@ date="20260730" cycl="00" Nprocs=32 -meshname="${mesh##*/}" -meshname="${meshname: 0: -4}" - - ###################################################################### # Compute rrfs interpolation weights for interpolating wind. # no extrapolation for rrfs forecasts. @@ -48,16 +44,19 @@ rrfsIntrp="$out/InterpolationWeights.$meshname.rrfs" rrfsDst="$out/DistToBndy.$meshname.rrfs" rm -rf $rrfsIntrp.hi.nc $rrfsDst.hi.nc __pycache__ -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 > GenWhts.rrfs.hi.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_hi $mesh $rrfsIntrp.hi.nc $rrfsDst.hi.nc -1 + rm -rf $rrfsIntrp.pr.nc $rrfsDst.pr.nc __pycache__ -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_pr $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 > GenWhts.rrfs.pr.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_pr $mesh $rrfsIntrp.pr.nc $rrfsDst.pr.nc -1 + rm -rf $rrfsIntrp.ak.nc $rrfsDst.ak.nc __pycache__ -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_ak $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 > GenWhts.rrfs.ak.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_ak $mesh $rrfsIntrp.ak.nc $rrfsDst.ak.nc -1 + rm -rf $rrfsIntrp.na.nc $rrfsDst.na.nc __pycache__ -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_na $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 > GenWhts.rrfs.na.out -rm -rf $rrfsIntrp.conus.nc $rrfsDst.conus.nc __pycache__ -python ./compute_gridded_to_rwps_interp_weights.py $rrfs_conus $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 > GenWhts.rrfs.conus.out +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_na $mesh $rrfsIntrp.na.nc $rrfsDst.na.nc -1 +rm -rf $rrfsIntrp.conus.nc $rrfsDst.conus.nc __pycache__ +python ./compute_gridded_to_rwps_interp_weights.py $rrfs_conus $mesh $rrfsIntrp.conus.nc $rrfsDst.conus.nc -1 ###################################################################### # Compute nbm interpolation weights on oc domain for interpolating wind. @@ -69,7 +68,7 @@ nbmDst="$out/DistToBndy.$meshname.nbm" #extrapolate nbm oc wind to all points rm $nbmIntrp.oc.nc $nbmDst.oc.nc -python ./compute_gridded_to_rwps_interp_weights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 > GenWhts.nbm.oc.out +python ./compute_gridded_to_rwps_interp_weights.py $nbm_oc $mesh $nbmIntrp.oc.nc $nbmDst.oc.nc 1 ###################################################################### @@ -79,7 +78,7 @@ python ./compute_gridded_to_rwps_interp_weights.py $nbm_oc $mesh $nbmIntrp.oc.nc nbm_ak=$SID/ice.$date.$cycl/nbm.$date.$cycl.ice.ak.nc #do not extrapolate for NBM .ak. domain rm $nbmIntrp.ak.nc $nbmDst.ak.nc -python ./compute_gridded_to_rwps_interp_weights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 > GenWhts.nbm.ak.out +python ./compute_gridded_to_rwps_interp_weights.py $nbm_ak $mesh $nbmIntrp.ak.nc $nbmDst.ak.nc -1 rtofs_ice=$SID/ice.$date.$cycl/rtofs.ice.$date.nc rtofsIntrp="$out/InterpolationWeights.$meshname.rtofs" @@ -90,7 +89,7 @@ rtofsDst="$out/DistToBndy.$meshname.rtofs" # Do extrapolate rtofs .glo. for full ice coverage in near shore. ###################################################################### rm $rtofsIntrp.ice.nc $rtofsDst.ice.nc -python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 > GenWhts.rtofs.ice.out +python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp.ice.nc $rtofsDst.ice.nc 1 ###################################################################### @@ -100,7 +99,7 @@ python ./compute_gridded_to_rwps_interp_weights.py $rtofs_ice $mesh $rtofsIntrp. rtofs_cur=$SID/rtofs.$date/currents.$date.rtofs.nc #do not extrapolate rtofs .glo. currents rm $rtofsIntrp.current.nc $rtofsDst.current.nc -python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.current.nc $rtofsDst.current.nc -1 > GenWhts.rtofs.current.out +python ./compute_gridded_to_rwps_interp_weights.py $rtofs_cur $mesh $rtofsIntrp.current.nc $rtofsDst.current.nc -1 ###################################################################### @@ -123,47 +122,14 @@ cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname # sort order of nodes and convert output weights to netcdf file python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 -cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc -cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc +mv InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.nc +mv DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.nc # clean up temporary directory and files rm -rf STOFSInterpWeights.$meshname rm InterpWeights.$meshname.stofs.txt rm *.out rm ESMPy* - - -###################################################################### -# Compute stofs interpolation weights for old(v2) stofs output -# All dates before ~ August 18 2026 -# Note: stofs v3 and stofs v2 appear to use the same mesh but file sizes differ. -# There should not be any problem just useing the stofs v3 based weights for v2 output files -###################################################################### -stofs_glo="$SID/stofs.20260730.00/stofs_2d_glo.t00z.fields.cwl.nc" - -mkdir -p STOFSInterpWeights.$meshname - -# First construct parallel jobscript to compute weights using Nprocs division of destination domain(meshfile) -python compute_unstr_to_rwps_interp_weights.py $stofs_glo $mesh $Nprocs - -# Now run parallel job script -qsub -W block=true jobcardcompute_unstr_to_rwps_interp_weightsPBS -wait - -#combine text file output of parallel jobs -cat STOFSInterpWeights.$meshname/Part.IntrpWghts.*.txt > InterpWeights.$meshname.stofs.txt - -# convert output weights to netcdf file -python convert_weights_to_netcdf.py $stofs_glo $mesh InterpWeights.$meshname.stofs.txt 1 -cp InterpWeights.$meshname.stofs.nc $out/InterpolationWeights.$meshname.stofs.v2.nc -cp DistToBndy.$meshname.stofs.nc $out/DistToBndy.$meshname.stofs.v2.nc -mv DistToBndy.$meshname.stofs.nc DistToBndy.$meshname.stofs.v2.nc -mv InterpWeights.$meshname.stofs.nc InterpWeights.$meshname.stofs.v2.nc - -# clean up temporary directory and files -rm -rf STOFSInterpWeights.$meshname -rm InterpWeights.$meshname.stofs.txt -rm *.out -rm ESMPy* - +rm jobcardcompute_unstr_to_rwps* +rm -rf __pycache__ diff --git a/dev/compute_interpolation_weights/ush/compute_interpolation_weights.sh b/dev/compute_interpolation_weights/ush/compute_interpolation_weights.sh index 8f7fc06..37c8517 100755 --- a/dev/compute_interpolation_weights/ush/compute_interpolation_weights.sh +++ b/dev/compute_interpolation_weights/ush/compute_interpolation_weights.sh @@ -1,4 +1,4 @@ -!/bin/bash +#!/bin/bash # --------------------------------------------------------------------------- # # Launch scripts to compute interpolation weights for an RWPS mesh. To run: # @@ -8,7 +8,7 @@ # to generate interpolation weights for unstructured mesh # # rwps.oc_500m_10km.msh. # # # -# Last Changed : 09-04-2026 # +# Last Changed : 09-09-2026 # # --------------------------------------------------------------------------- # echo 'setting paths...' @@ -17,7 +17,6 @@ export meshID=$1 export HOMErwps=$(cd "$(dirname "$(readlink -f -n "${BASH_SOURCE[0]}")")" && git rev-parse --show-toplevel) -export mesh="$HOMErwps/fix/rwps.$meshID.msh" export fix="$HOMErwps/fix" export out=$HOMErwps/interpolation_weights @@ -27,11 +26,9 @@ mkdir -p $out #machine dependend path to RWPS fix files export RWPSfix=/lfs/h2/emc/couple/noscrub/keston.smith/RWPS -# copy mesh to local fix directory -#cp -p $RWPSfix/fix/$meshID/20260722/rwps.$meshID.msh $HOMErwps/fix/ -#sh $HOMErwps/get_externals.sh - +# link mesh corresponding to meshID to local fix directory $HOMErwps/sorc/link_workflow.sh +export mesh="$HOMErwps/fix/$meshID/rwps.$meshID.msh" meshname="${mesh##*/}" export meshname="${meshname: 0: -4}" diff --git a/dev/compute_interpolation_weights/ush/compute_unstr_to_rwps_interp_weights.py b/dev/compute_interpolation_weights/ush/compute_unstr_to_rwps_interp_weights.py index 5f9101c..356fccd 100644 --- a/dev/compute_interpolation_weights/ush/compute_unstr_to_rwps_interp_weights.py +++ b/dev/compute_interpolation_weights/ush/compute_unstr_to_rwps_interp_weights.py @@ -111,7 +111,7 @@ ywin=[latS,latN] print("calculating interpolation weights for [W"+str(lonW)+": E "+str(lonE)+": S "+str(latS)+": N "+str(latN)+"]") #Find target mesh nodes in window -jxUi=np.where( xi <= np.max(xwin))[0].tolist() +jxUi=np.where( xi < np.max(xwin))[0].tolist() jxDi=np.where( xi >= np.min(xwin))[0].tolist() jyUi=np.where( yi <= np.max(ywin))[0].tolist() jyDi=np.where( yi >= np.min(ywin))[0].tolist() diff --git a/ecf/jrwps_prep_current.ecf b/ecf/jrwps_prep_current.ecf deleted file mode 100644 index c176f6e..0000000 --- a/ecf/jrwps_prep_current.ecf +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -#PBS -q dev -#PBS -l walltime=00:59:00 -#PBS -A GLWU-DEV -#PBS -N RWPS.PreProc.current -#PBS -j oe -#PBS -l select=1:ncpus=32:mem=64GB -#PBS -o RWPS.PreProc.out - -cd $HOMErwps/ush/preprocess - -module use ${HOMErwps}/modulefiles - -############################################################ -# Load modules -############################################################ -source $HOMErwps/versions/preproc.${MACHINE_ID}.ver - -#modules for esmf -module reset -module load PrgEnv-intel/${PrgEnv_intel_ver} -module load craype/${craype_ver} -module load intel/${intel_ver} -module load cray-mpich/${cray_mpich_ver} -module load hdf5-C/${hdf5_C_ver} -module load netcdf-C/${netcdf_C_ver} -module load esmf-C/${esmf_C_ver} -module load ve/hafs/${ve_hafs_ver} - -#modules for wgrib2 -module load intel-oneapi/${intel_oneapi_ver} -module load wgrib2/${wgrib2_ver} - -module list - -${HOMErwps}/jobs/JRWPS_PREP_CURRENT diff --git a/ecf/jrwps_prep_ice.ecf b/ecf/jrwps_prep_ice.ecf deleted file mode 100644 index 8a771be..0000000 --- a/ecf/jrwps_prep_ice.ecf +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -#PBS -q dev -#PBS -l walltime=00:59:00 -#PBS -A GLWU-DEV -#PBS -N RWPS.PreProc.ice -#PBS -j oe -#PBS -l select=1:ncpus=16:mem=64GB -#PBS -o RWPS.PreProc.out - -cd $HOMErwps/ush/preprocess - -module use ${HOMErwps}/modulefiles - -############################################################ -# Load modules -############################################################ -source $HOMErwps/versions/preproc.${MACHINE_ID}.ver - -#modules for esmf -module reset -module load PrgEnv-intel/${PrgEnv_intel_ver} -module load craype/${craype_ver} -module load intel/${intel_ver} -module load cray-mpich/${cray_mpich_ver} -module load hdf5-C/${hdf5_C_ver} -module load netcdf-C/${netcdf_C_ver} -module load esmf-C/${esmf_C_ver} -module load ve/hafs/${ve_hafs_ver} - -#modules for wgrib2 -module load intel-oneapi/${intel_oneapi_ver} -module load wgrib2/${wgrib2_ver} - -module list - -${HOMErwps}/jobs/JRWPS_PREP_ICE diff --git a/ecf/jrwps_prep_waterlevel.ecf b/ecf/jrwps_prep_waterlevel.ecf deleted file mode 100644 index b4ee30d..0000000 --- a/ecf/jrwps_prep_waterlevel.ecf +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -#PBS -q dev -#PBS -l walltime=00:59:00 -#PBS -A GLWU-DEV -#PBS -N RWPS.PreProc.waterlevel -#PBS -j oe -#PBS -l select=1:ncpus=16:mem=64GB -#PBS -o RWPS.PreProc.out - -cd $HOMErwps/ush/preprocess - -module use ${HOMErwps}/modulefiles - -############################################################ -# Load modules -############################################################ -source $HOMErwps/versions/preproc.${MACHINE_ID}.ver - -#modules for esmf -module reset -module load PrgEnv-intel/${PrgEnv_intel_ver} -module load craype/${craype_ver} -module load intel/${intel_ver} -module load cray-mpich/${cray_mpich_ver} -module load hdf5-C/${hdf5_C_ver} -module load netcdf-C/${netcdf_C_ver} -module load esmf-C/${esmf_C_ver} -module load ve/hafs/${ve_hafs_ver} - -#modules for wgrib2 -module load intel-oneapi/${intel_oneapi_ver} -module load wgrib2/${wgrib2_ver} - -module list - -${HOMErwps}/jobs/JRWPS_PREP_WATERLEVEL diff --git a/ecf/jrwps_prep_wind.ecf b/ecf/jrwps_prep_wind.ecf deleted file mode 100644 index 02c7e4a..0000000 --- a/ecf/jrwps_prep_wind.ecf +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -#PBS -q dev -#PBS -l walltime=04:00:00 -#PBS -A GLWU-DEV -#PBS -N RWPS.PreProc.wind -#PBS -j oe -#PBS -l select=1:ncpus=32:mem=64GB -#PBS -o RWPS.PreProc.out - -cd $HOMErwps/ush/preprocess - -module use ${HOMErwps}/modulefiles - -############################################################ -# Load modules -############################################################ -source $HOMErwps/versions/preproc.${MACHINE_ID}.ver - -#modules for esmf -module reset -module load PrgEnv-intel/${PrgEnv_intel_ver} -module load craype/${craype_ver} -module load intel/${intel_ver} -module load cray-mpich/${cray_mpich_ver} -module load hdf5-C/${hdf5_C_ver} -module load netcdf-C/${netcdf_C_ver} -module load esmf-C/${esmf_C_ver} -module load ve/hafs/${ve_hafs_ver} - -#modules for wgrib2 -module load intel-oneapi/${intel_oneapi_ver} -module load wgrib2/${wgrib2_ver} - -module list - -${HOMErwps}/jobs/JRWPS_PREP_WIND From 6ee7506f8b62523b73e3888dca36801964850b7e Mon Sep 17 00:00:00 2001 From: keston Date: Thu, 10 Sep 2026 15:26:48 -0400 Subject: [PATCH 39/39] removed jobs/JRWPS_PREP_* no related to computing interpolation weights --- jobs/JRWPS_PREP_CURRENT | 6 ------ jobs/JRWPS_PREP_ICE | 7 ------- jobs/JRWPS_PREP_WATERLEVEL | 5 ----- jobs/JRWPS_PREP_WIND | 7 ------- 4 files changed, 25 deletions(-) delete mode 100755 jobs/JRWPS_PREP_CURRENT delete mode 100755 jobs/JRWPS_PREP_ICE delete mode 100755 jobs/JRWPS_PREP_WATERLEVEL delete mode 100755 jobs/JRWPS_PREP_WIND diff --git a/jobs/JRWPS_PREP_CURRENT b/jobs/JRWPS_PREP_CURRENT deleted file mode 100755 index 1457d1a..0000000 --- a/jobs/JRWPS_PREP_CURRENT +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -cd $HOMErwps/ush/preprocess -sh get_current.sh -sh process_current.sh - diff --git a/jobs/JRWPS_PREP_ICE b/jobs/JRWPS_PREP_ICE deleted file mode 100755 index 31b77cf..0000000 --- a/jobs/JRWPS_PREP_ICE +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -cd $HOMErwps/ush/preprocess -sh get_ice.sh -sh process_ice.sh - - diff --git a/jobs/JRWPS_PREP_WATERLEVEL b/jobs/JRWPS_PREP_WATERLEVEL deleted file mode 100755 index 0e1f6ae..0000000 --- a/jobs/JRWPS_PREP_WATERLEVEL +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -cd $HOMErwps/ush/preprocess -sh get_waterlevel.sh -sh process_waterlevel.sh diff --git a/jobs/JRWPS_PREP_WIND b/jobs/JRWPS_PREP_WIND deleted file mode 100755 index dcdcb4c..0000000 --- a/jobs/JRWPS_PREP_WIND +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -cd $HOMErwps/ush/preprocess -sh get_wind.sh -sh process_wind.sh - -