Repository: NOAA-EMC/EVS
Pull request #713: feature/EVSv2-RTOFS_plotdate_corrupted_data
Author: login: SamiraArdani-NOAA
Labels: name: cleanup
name: Known Issue
description: Not an NCO Bugzilla, but needs to be fixed
Created: 2025-04-29T16:44:51Z | Merged: 2025-05-09T16:42:00Z

<b>Note to developers: You must use this PR template!</b>

## Description of Changes

> Please include a summary of the changes and the related GitHub issue(s). Please also include relevant motivation and context.

This PR addresses two items from fixes and additions document: 
 1- Updated the file checks to ensure that /dcom data is not corrupted before using them. This new approach uses ncdump (added a script in /ush directory: rtofs_check_nc.py) instead of checking the file size. In addition, the WARNING messages for corrupted files were updated accordingly. Two tests are performed for this item.
2- Adjusted the end on RTOFS plots with the date in .tar files (ush/settings.py).

## Developer Questions and Checklist
* Is this a high priority PR? If so, why and is there a date it needs to be merged by?
No.
* Do you have any planned upcoming annual leave/PTO?
No.
* Are there any changes needed in the times when the jobs are supposed to run/kick-off?
For **item 1, Test 1:**
There is no change for testing prep. prep usually runs with INITDATE=pdym2.
To test stats, run for VDATE=pdym3 for the comparison with outputs in emc.vpppg.
 **For item 1, Test 2:**
Please follow the instructions for Test 2.
**For item 2:** 
To test plots, run for VDATE=pdym3 for the comparison with outputs in emc.vpppg.
- [x] The code changes follow [NCO's EE2 Standards](https://www.nco.ncep.noaa.gov/idsb/implementation_standards/ImplementationStandards.v11.0.0.pdf).
- [x] Developer's name is removed throughout the code and have used `${USER}` where necessary throughout the code.
- [x] References the feature branch for `HOMEevs` are removed from the code.
- [x] J-Job environment variables, COMIN and COMOUT directories, and output follow what has been [defined](https://docs.google.com/document/d/1JWg_4q80aYmmAoD21GFjp9R9y5-3w7WGM3-0HJk0Pjs/edit#heading=h.7ysbr191vzu4) for EVS.
- [x] Jobs over 15 minutes in runtime have restart capability.
- [x] If applicable, changes in the `dev/drivers/scripts` or `dev/modulefiles` have been made in the corresponding `ecf/scripts` and `ecf/defs/evs-nco.def`? 
- [x] Jobs contain the appropriate file checking and don't run METplus for any missing data.
- [x] Code is using METplus wrappers structure and not calling MET executables directly.
- [x] Log is free of any ERRORs or WARNINGs.

## Testing Instructions

> Please include testing instructions for the PR assignee. Include all relevant input datasets needed to run the tests.

1- To test this PR, you need to run the driver scripts for all three steps: **prep**, **stats** and **plots**.
2- Clone my fork in your local and checkout branch `feature/EVSv2-RTOFS_plotdate_corrupted_data`.
3- ln -sf fix directory.
4- For all driver script that you are testing:
  4-1- set your HOME directory to your testing directory.
  4-2- In COMIN, replace the `${USER}` with `emc.vpppg`.
  4-3- Set `KEEPDATE=YES`
  4-4- Set `SENDMAIL=NO`
5- Test this PR two times two address item 1: Test 1: Healthy data Test 2: Corrupted data.

✅ **Test1- Healthy data:**
Run the driver scripts for **prep** and **stats** steps (grid2grid scripts only) located at: 
```
EVS/dev/drivers/scripts/prep/rtofs/jevs_rtofs_prep.sh
EVS/dev/drivers/scripts/stats/rtofs/jevs_rtofs_smap_grid2grid_stats.sh
EVS/dev/drivers/scripts/plots/rtofs/jevs_rtofs_smos_grid2grid_stats.sh
EVS/dev/drivers/scripts/plots/rtofs/jevs_rtofs_ghrsst_grid2grid_stats.sh
EVS/dev/drivers/scripts/plots/rtofs/jevs_rtofs_aviso_grid2grid_stats.sh
EVS/dev/drivers/scripts/plots/rtofs/jevs_rtofs_osisaf_grid2grid_stats.sh
```
✅ **Test 2- Corrupted data:**
Add these lines to the **prep** and **stats** job (`$DCOMROOT` is pointing to a prepared corrupted files for this test):
`export DCOMROOT=/lfs/h2/emc/ptmp/samira.ardani/test`  (for both prep and stats)
`export INITDATE=20250504`  (for prep only) 
`export VDATE=20250504`  (for stats only)

6- To address item 2, run all plots driver scripts located at:  EVS/dev/drivers/scripts/plots/rtofs/*. Please run them for VDATE=pdym3.





Diff:
diff --git a/scripts/prep/rtofs/exevs_rtofs_prep.sh b/scripts/prep/rtofs/exevs_rtofs_prep.sh
index 72d1fab853..0d65737050 100755
--- a/scripts/prep/rtofs/exevs_rtofs_prep.sh
+++ b/scripts/prep/rtofs/exevs_rtofs_prep.sh
@@ -18,6 +18,12 @@
 # 03/2025: 
 # 1- $COMOUT name changes and the adjustment to other scripts in stats scripts, ush, parm, etc.
 # 2- Updated the ecf scripts names and adjustments in defs. 
+# 04/2025:
+# 1- Updated the file checks to ensure that dcom files are not corrupted before using them. 
+# New approach uses ncdump (added script in ush directory: rtofs_check_nc.py) instead of checking the file size.
+# 2- Updated the WARNING messages for corrupted files.
+# 3- Adjusted the end on RTOFS plots with the date in .tar files (ush/settings.py).
+
 #############################################################################################
 
 set -x
@@ -47,11 +53,10 @@ for lead in ${leads}; do
 			fi
                 fi
             else
-                echo "WARNING: ${input_rtofs_file} does not exist"
+                echo "WARNING: ${input_rtofs_file} does not exist. The missing file is ${input_rtofs_file}. METplus will not run."
                 if [ $SENDMAIL = YES ] ; then
                     export subject="${lead} RTOFS Forecast Data Missing for EVS ${COMPONENT}"
-                    echo "Warning: No RTOFS forecast was available for ${INITDATE}${lead}" > mailmsg
-                    echo "Missing file is ${input_rtofs_file}" >> mailmsg
+                    echo "WARNING: No RTOFS forecast was available for ${INITDATE}${lead}. Missing file is: ${input_rtofs_file}. METplus will not run." > mailmsg
                     echo "Job ID: $jobid" >> mailmsg
                     cat mailmsg | mail -s "$subject" $MAILTO
                 fi
@@ -76,11 +81,10 @@ for lead in ${leads}; do
 			fi
                 fi
             else
-                echo "WARNING: ${input_rtofs_file} does not exist"
+                echo "WARNING: ${input_rtofs_file} does not exist. Missing file is: ${input_rtofs_file}. METplus will not run."
                 if [ $SENDMAIL = YES ] ; then
                     export subject="${lead} RTOFS Forecast Data Missing for EVS ${COMPONENT}"
-                    echo "Warning: No RTOFS forecast was available for ${INITDATE}${lead}" > mailmsg
-                    echo "Missing file is ${input_rtofs_file}" >> mailmsg
+                    echo "WARNING: No RTOFS forecast was available for ${INITDATE}${lead}. Missing file is: ${input_rtofs_file}. METplus will not run." > mailmsg
                     echo "Job ID: $jobid" >> mailmsg
                     cat mailmsg | mail -s "$subject" $MAILTO
                 fi
@@ -162,7 +166,6 @@ done
 ##########################
 #  process obs data
 ##########################
-min_size=2404
 # convert OSI-SAF data into lat-lon grid
 export OBTYPE=osisaf
 if [ ! -d $COMOUTprep/$RUN.$INITDATE/$OBTYPE ]; then
@@ -175,19 +178,33 @@ for ftype in nh sh; do
 	tmp_osisaf_file=$DATA/$RUN.$INITDATE/$OBTYPE/ice_conc_${ftype}_polstere-100_multi_${INITDATE}1200.nc
 	output_osisaf_file=$COMOUTprep/$RUN.$INITDATE/$OBTYPE/ice_conc_${ftype}_polstere-100_multi_${INITDATE}1200.nc
 	if [ -s $input_osisaf_file ]; then
-    		actual_size_osisaf=$(wc -c <"$DCOMROOT/$INITDATE/seaice/osisaf/ice_conc_${ftype}_polstere-100_multi_${INITDATE}1200.nc")
+		python $USHevs/${COMPONENT}/rtofs_check_nc.py "$input_osisaf_file"
+		export err=$?; err_chk
+		file_check=$(python3 $USHevs/${COMPONENT}/rtofs_check_nc.py "$input_osisaf_file")
+		echo "$file_check"
+		if [ "$file_check" -eq 0 ]; then
+			echo "$input_osisaf_file is valid."
+		elif [ "$file_check" -eq 1 ]; then
+			echo "WARNING:  Corrupted validation file: OSI-SAF ${ftype} is corrupted for valid date $INITDATE. METplus will skip ${input_osisaf_file} and not run."
+			if [ $SENDMAIL = YES ] ; then
+				export subject="OSI-SAF Data is corrupted for EVS RTOFS"
+		    		echo "WARNING: No OSI-SAF ${ftype} data was available for valid date $INITDATE. Corrupted file is $input_osisaf_file. METplus will not run." > mailmsg
+		    		cat mailmsg | mail -s "$subject" $MAILTO
+	    	fi
+		fi
     	fi
-    	if [[ ! -s $input_osisaf_file || $actual_size_osisaf -lt $min_size ]]; then
-	    	echo "WARNING: No OSI-SAF ${ftype} data was available for valid date $INITDATE."
-	    	if [ $SENDMAIL = YES ] ; then
+	if [ ! -s $input_osisaf_file ]; then
+		echo "WARNING: No OSI-SAF ${ftype} data was available for valid date $INITDATE. $input_osisaf_file does not exist. METplus will not run."
+		if [ $SENDMAIL = YES ] ; then
 			export subject="OSI-SAF Data Missing for EVS RTOFS"
-		    	echo "Warning: No OSI-SAF ${ftype} data was available for valid date $INITDATE." > mailmsg
-		    	echo "Missing file is $input_osisaf_file" >> mailmsg
+		    	echo "WARNING: No OSI-SAF ${ftype} data was available for valid date $INITDATE. Missing file is: $input_osisaf_file. METplus will not run." > mailmsg
 		    	cat mailmsg | mail -s "$subject" $MAILTO
 	    	fi
     	fi
+
+
     	if [ ! -s $output_osisaf_file ]; then
-        	if [ -s $input_osisaf_file ]; then
+        	if [[ -s $input_osisaf_file && $file_check -eq 0 ]]; then
             		cdo remapbil,$osi_saf_grid_file $input_osisaf_file $tmp_osisaf_file
             		export err=$?; err_chk
             		if [ $SENDCOM = "YES" ]; then
@@ -196,11 +213,10 @@ for ftype in nh sh; do
 				fi
             		fi
         	else
-			echo "WARNING: No OSI-SAF ${ftype} data was available for valid date $INITDATE."
+			echo "WARNING: No OSI-SAF ${ftype} data was available for valid date $INITDATE. $input_osisaf_file can be missing or corrupted. METplus will not run."
             		if [ $SENDMAIL = YES ] ; then
                 		export subject="OSI-SAF Data Missing for EVS RTOFS"
-                		echo "Warning: No OSI-SAF ${ftype} data was available for valid date $INITDATE." > mailmsg
-                		echo "Missing file is $input_osisaf_file" >> mailmsg
+                		echo "WARNING: No OSI-SAF ${ftype} data was available for valid date $INITDATE. Missing file is $input_osisaf_file. METplus will not run." > mailmsg
                 		cat mailmsg | mail -s "$subject" $MAILTO
             		fi
         	fi
@@ -242,11 +258,10 @@ if [ $ndbc_txt_ncount -gt 0 ]; then
 
    	 fi
 else
-	echo "WARNING: No NDBC data was available for valid date $INITDATE."	
+	echo "WARNING: No NDBC data was available for valid date $INITDATE. $DCOMROOT/$INITDATE/validation_data/marine/buoy/ is empty or does not exist. METplus will not run. "	
   	if [ $SENDMAIL = YES ] ; then
     		export subject="NDBC Data Missing for EVS RTOFS"
-    		echo "Warning: No NDBC data was available for valid date $INITDATE." > mailmsg
-    		echo "Missing files are located at $DCOMROOT/$INITDATE/validation_data/marine/buoy" >> mailmsg
+    		echo "WARNING: No NDBC data was available for valid date $INITDATE. Missing file is $DCOMROOT/$INITDATE/validation_data/marine/buoy. METplus will not run." > mailmsg
     		cat mailmsg | mail -s "$subject" $MAILTO
   	fi
 fi
@@ -257,10 +272,42 @@ if [ ! -d $COMOUTprep/$RUN.$INITDATE/$OBTYPE ]; then
 fi
 mkdir -p $DATA/$RUN.$INITDATE/$OBTYPE
 if [ -s $DCOMROOT/$INITDATE/validation_data/marine/argo/atlantic_ocean/${INITDATE}_prof.nc ] && [ -s $DCOMROOT/$INITDATE/validation_data/marine/argo/indian_ocean/${INITDATE}_prof.nc ] && [ -s $DCOMROOT/$INITDATE/validation_data/marine/argo/pacific_ocean/${INITDATE}_prof.nc ]; then
-	actual_size_argo_atlantic=$(wc -c <"$DCOMROOT/$INITDATE/validation_data/marine/argo/atlantic_ocean/${INITDATE}_prof.nc")
-	actual_size_argo_indian=$(wc -c <"$DCOMROOT/$INITDATE/validation_data/marine/argo/indian_ocean/${INITDATE}_prof.nc")
-	actual_size_argo_pacific=$(wc -c <"$DCOMROOT/$INITDATE/validation_data/marine/argo/pacific_ocean/${INITDATE}_prof.nc")
-	if [ $actual_size_argo_atlantic -gt $min_size ] && [ $actual_size_argo_indian -gt $min_size ] && [ $actual_size_argo_pacific -gt $min_size ] ; then
+	
+	# check atlantic:
+	python $USHevs/${COMPONENT}/rtofs_check_nc.py "$DCOMROOT/$INITDATE/validation_data/marine/argo/atlantic_ocean/${INITDATE}_prof.nc"
+	export err=$?; err_chk
+	file_check_atlantic=$(python3 $USHevs/${COMPONENT}/rtofs_check_nc.py "$DCOMROOT/$INITDATE/validation_data/marine/argo/atlantic_ocean/${INITDATE}_prof.nc")
+	echo "$file_check_atlantic"
+	if [ "$file_check_atlantic" -eq 0 ]; then
+		echo "$DCOMROOT/$INITDATE/validation_data/marine/argo/atlantic_ocean/${INITDATE}_prof.nc is valid."
+	elif [ "$file_check_atlantic" -eq 1 ]; then
+		echo "WARNING: Corrupted validation file: $DCOMROOT/$INITDATE/validation_data/marine/argo/atlantic_ocean/${INITDATE}_prof.nc is corrupted for valid date ${INITDATE}. METplus will skip $DCOMROOT/$INITDATE/validation_data/marine/argo/atlantic_ocean/${INITDATE}_prof.nc and not run"
+	fi
+
+        # check indian
+	python $USHevs/${COMPONENT}/rtofs_check_nc.py "$DCOMROOT/$INITDATE/validation_data/marine/argo/indian_ocean/${INITDATE}_prof.nc"
+	export err=$?; err_chk
+	file_check_indian=$(python3 $USHevs/${COMPONENT}/rtofs_check_nc.py "$DCOMROOT/$INITDATE/validation_data/marine/argo/indian_ocean/${INITDATE}_prof.nc")
+	echo "$file_check_indian"
+	if [ "$file_check_indian" -eq 0 ]; then
+		echo "$DCOMROOT/$INITDATE/validation_data/marine/argo/indian_ocean/${INITDATE}_prof.nc is valid."
+	elif [ "$file_check_atlantic" -eq 1 ]; then
+		echo "WARNING: Corrupted validation file: $DCOMROOT/$INITDATE/validation_data/marine/argo/indian_ocean/${INITDATE}_prof.nc is corrupted for valid date ${INITDATE}. METplus will skip $DCOMROOT/$INITDATE/validation_data/marine/argo/indian_ocean/${INITDATE}_prof.nc and not run."
+	fi
+	
+	# check pacific
+	python $USHevs/${COMPONENT}/rtofs_check_nc.py "$DCOMROOT/$INITDATE/validation_data/marine/argo/pacific_ocean/${INITDATE}_prof.nc"
+	export err=$?; err_chk
+	file_check_pacific=$(python3 $USHevs/${COMPONENT}/rtofs_check_nc.py "$DCOMROOT/$INITDATE/validation_data/marine/argo/pacific_ocean/${INITDATE}_prof.nc")
+	echo "$file_check_pacific"
+	if [ "$file_check_pacific" -eq 0 ]; then
+		echo "$DCOMROOT/$INITDATE/validation_data/marine/argo/pacific_ocean/${INITDATE}_prof.nc is valid."
+	elif [ "$file_check_atlantic" -eq 1 ]; then
+		echo "WARNING: Corrupted validation file: $DCOMROOT/$INITDATE/validation_data/marine/argo/pacific_ocean/${INITDATE}_prof.nc is corrupted for valid date ${INITDATE}. METplus will skip $DCOMROOT/$INITDATE/validation_data/marine/argo/pacific_ocean/${INITDATE}_prof.nc and not run."
+
+	fi
+
+	if [ $file_check_atlantic -eq 0 ] && [ $file_check_indian -eq 0 ] && [ $file_check_pacific -eq 0 ] ; then
 		tmp_argo_file=$DATA/$RUN.$INITDATE/$OBTYPE/argo.${INITDATE}.nc
 		output_argo_file=$COMOUTprep/$RUN.$INITDATE/$OBTYPE/argo.${INITDATE}.nc
 		if [ ! -s $output_argo_file ]; then
@@ -277,18 +324,19 @@ if [ -s $DCOMROOT/$INITDATE/validation_data/marine/argo/atlantic_ocean/${INITDAT
 			cp -v $output_argo_file $tmp_argo_file
 		fi
 	else
+		echo "WARNING:  Corrupted validation file: ARGO ${ftype} is corrupted for valid date $INITDATE. METplus will skip $DCOMROOT/$INITDATE/validation_data/marine/argo/atlantic_ocean/${INITDATE}_prof.nc and $DCOMROOT/$INITDATE/validation_data/marine/argo/$DCOMROOT/$INITDATE/validation_data/marine/argo/indian_ocean/${INITDATE}_prof.nc and $DCOMROOT/$INITDATE/validation_data/marine/argo/pacific_ocean/${INITDATE}_prof.nc and not run."
 		if [ $SENDMAIL = YES ] ; then
-			export subject="Argo Data Missing for EVS RTOFS"
-			echo "Warning: No Argo data was available for valid date $INITDATE." > mailmsg
-			echo "Missing file is $DCOMROOT/$INITDATE/validation_data/marine/argo/atlantic_ocean/${INITDATE}_prof.nc, $DCOMROOT/$INITDATE/validation_data/marine/argo/indian_ocean/${INITDATE}_prof.nc, and/or $DCOMROOT/$INITDATE/validation_data/marine/argo/pacific_ocean/${INITDATE}_prof.nc" >> mailmsg
+			export subject="Argo Data is corrupted for EVS RTOFS"
+			echo "WARNING: No Argo data was available for valid date $INITDATE." > mailmsg
+			echo "Corrupted file is $DCOMROOT/$INITDATE/validation_data/marine/argo/atlantic_ocean/${INITDATE}_prof.nc, $DCOMROOT/$INITDATE/validation_data/marine/argo/indian_ocean/${INITDATE}_prof.nc, and/or $DCOMROOT/$INITDATE/validation_data/marine/argo/pacific_ocean/${INITDATE}_prof.nc" >> mailmsg
 			cat mailmsg | mail -s "$subject" $MAILTO
 		fi
 	fi
 else
-	echo "WARNING: No Argo data was available for valid date $INITDATE."
+	echo "WARNING: No Argo data was available for valid date $INITDATE. $DCOMROOT/$INITDATE/validation_data/marine/argo/atlantic_ocean/${INITDATE}_prof.nc and $DCOMROOT/$INITDATE/validation_data/marine/argo/indian_ocean/${INITDATE}_prof.nc and $DCOMROOT/$INITDATE/validation_data/marine/argo/pacific_ocean/${INITDATE}_prof.nc do not exist. METplus will not run. "
 	if [ $SENDMAIL = YES ] ; then
 		export subject="Argo Data Missing for EVS RTOFS"
-		echo "Warning: No Argo data was available for valid date $INITDATE." > mailmsg
+		echo "WARNING: No Argo data was available for valid date $INITDATE." > mailmsg
 		echo "Missing file is $DCOMROOT/$INITDATE/validation_data/marine/argo/atlantic_ocean/${INITDATE}_prof.nc, $DCOMROOT/$INITDATE/validation_data/marine/argo/indian_ocean/${INITDATE}_prof.nc, and/or $DCOMROOT/$INITDATE/validation_data/marine/argo/pacific_ocean/${INITDATE}_prof.nc" >> mailmsg
 		cat mailmsg | mail -s "$subject" $MAILTO
 	fi
diff --git a/scripts/stats/rtofs/exevs_rtofs_grid2grid_stats.sh b/scripts/stats/rtofs/exevs_rtofs_grid2grid_stats.sh
index 8d2e4008d2..543a3e8351 100755
--- a/scripts/stats/rtofs/exevs_rtofs_grid2grid_stats.sh
+++ b/scripts/stats/rtofs/exevs_rtofs_grid2grid_stats.sh
@@ -15,6 +15,12 @@
 # 03/2025: 
 # 1- Appplied adjustments based on the changes for $COMOUT in prep scripts, 
 # 2- Updated the ecf scripts names and adjustments in defs.
+# 04/2025:
+# 1- Updated the file checks to ensure that dcom files are not corrupted before using them. 
+# New approach uses ncdump (added script in ush directory: rtofs_check_nc.py) instead of checking the file size.
+# 2- Updated the WARNING messages for corrupted files.
+# 3- Adjusted the end on RTOFS plots with the date in .tar files (ush/settings.py).
+
 ###############################################################################
 
 set -x
@@ -46,7 +52,6 @@ else
 fi
 
 export JDATE=$(date2jday.sh $VDATE)
-min_size=2404
 
 #########################################################################################
 # GridStat
@@ -127,10 +132,18 @@ else
 	fi
 
 	if [ -s $DCOMINrtofsfilename ] ; then
-	actual_size=$(wc -c <"$DCOMINrtofsfilename")
-		if [ $actual_size -ge $min_size ]; then
-     			if [ -s $COMINicefilename ] ; then
-      				for fday in 0 1 2 3 4 5 6 7 8; do
+		python $USHevs/${COMPONENT}/rtofs_check_nc.py "$DCOMINrtofsfilename"
+		export err=$?; err_chk
+		file_check=$(python3 $USHevs/${COMPONENT}/rtofs_check_nc.py "$DCOMINrtofsfilename")
+		echo "$file_check"
+		if [ $file_check -eq 0 ]; then
+			echo "$DCOMINrtofsfilename is valid."
+		elif [ "$file_check" -eq 1 ]; then
+			echo "$DCOMINrtofsfilename is corrupted for valid date $VDATE. METplus will skip $DCOMINrtofsfilename and not run."
+		fi
+     		if [ -s $COMINicefilename ] ; then
+      			if [ $file_check -eq 0 ]; then
+				for fday in 0 1 2 3 4 5 6 7 8; do
         				fhr=$(($fday * 24))
         				fhr2=$(printf "%02d" "${fhr}")
         				export fhr3=$(printf "%03d" "${fhr}")
@@ -159,24 +172,23 @@ else
           					echo "WARNING: Missing RTOFS f${fhr3} file for $VDATE: $COMINrtofsfilename"
         				fi
       				done
-   			else
-     				echo "WARNING: Missing RTOFS f000 ice file for $VDATE: $COMINicefilename"
-   			fi
+  			else
+				echo "WARNING: Corrupted validation file: ${OBTYPEupper} is corrupted for valid date $VDATE. METplus will skip $DCOMINrtofsfilename and not run."
+				
+   				if [ $SENDMAIL = YES ] ; then
+       					export subject="${OBTYPEupper} Data is corrupted for EVS RTOFS"
+       					echo "WARNING: No ${OBTYPEupper} data was available for valid date $VDATE. Corrupted file is ${DCOMINrtofsfilename}. METplus will skip ${DCOMINrtofsfilename} and not run." > mailmsg
+       					cat mailmsg | mail -s "$subject" $MAILTO
+   				fi
+			fi
 		else
-   			echo "WARNING:  Missing SMOS data file for $VDATE: $DCOMINrtofsfilename"
-   			if [ $SENDMAIL = YES ] ; then
-       				export subject="${OBTYPEupper} Data Missing for EVS RTOFS"
-       				echo "Warning: No ${OBTYPEupper} data was available for valid date $VDATE." > mailmsg
-       				echo "Missing file is ${DCOMINrtofsfilename}." >> mailmsg
-       				cat mailmsg | mail -s "$subject" $MAILTO
-   			fi
-		fi
+     			echo "WARNING: Missing validation f000 ice file: $COMINicefilename is missing for valid date $VDATE. METplus wil not run."
+   		fi
 	else
-		echo "WARNING:  Missing ${OBTYPEupper} data file for $VDATE: $DCOMINrtofsfilename"
+		echo "WARNING:  Missing ${OBTYPEupper} data file for $VDATE: $DCOMINrtofsfilename. $DCOMINrtofsfilename does not exist. METplus will not run."
 		if [ $SENDMAIL = YES ] ; then
 			export subject="${OBTYPEupper} Data Missing for EVS RTOFS"
-			echo "Warning: No ${OBTYPEupper} data was available for valid date $VDATE." > mailmsg
-			echo "Missing file is ${DCOMINrtofsfilename}." >> mailmsg
+			echo "WARNING: No ${OBTYPEupper} data was available for valid date $VDATE. Missing file is ${DCOMINrtofsfilename}. METplus will not run." > mailmsg
 			cat mailmsg | mail -s "$subject" $MAILTO
 		fi
 	fi
@@ -203,7 +215,7 @@ for vari in ${VARS}; do
 	    fi
     fi
   else
-     echo "WARNING: Missing RTOFS_${OBTYPEupper}_$VARupper stat files for $VDATE in $STATSDIR/${RUN}.$VDATE/$OBTYPE/${VERIF_CASE}/$VAR/*.stat" 
+	  echo "DEBUG: Missing RTOFS_${OBTYPEupper}_$VARupper stat files for $VDATE in $STATSDIR/${RUN}.$VDATE/$OBTYPE/${VERIF_CASE}/$VAR/*.stat. METplus will not run to generate the final stat file." 
   fi
 done
 
diff --git a/scripts/stats/rtofs/exevs_rtofs_grid2obs_stats.sh b/scripts/stats/rtofs/exevs_rtofs_grid2obs_stats.sh
index 2417c8d5b5..458f92fb0c 100755
--- a/scripts/stats/rtofs/exevs_rtofs_grid2obs_stats.sh
+++ b/scripts/stats/rtofs/exevs_rtofs_grid2obs_stats.sh
@@ -118,14 +118,14 @@ if [ $OBTYPE = argo ]; then
 							fi
 						done
 					else
-						echo "WARNING: Missing RTOFS f${fhr3} 3dz file for $VDATE: ${COMINrtofsfilename}"
+						echo "WARNING: Missing validation file: RTOFS f${fhr3} 3dz. ${COMINrtofsfilename} is missing for valid date $VDATE. METplus will not run."
 					fi
 				done
 			else
-				echo "WARNING: Missing RTOFS f000 ice file for $VDATE: ${COMINicefilename}"
+				echo "WARNING: Missing RTOFS f000 ice file: ${COMINicefilename} is missing for valid date $VDATE. METplus will not run."
 			fi
 		else
-			echo "WARNING: Missing ARGO data file for $VDATE: $EVSINfilename"
+			echo "WARNING: Missing ARGO data file: $EVSINfilename is missing for valid date $VDATE. METplus will not run."
 		fi
 	done
 
@@ -162,14 +162,14 @@ elif [ $OBTYPE = ndbc ]; then
 						fi
 					done
 				else
-					echo "WARNING: Missing RTOFS f${fhr3} prog file for $VDATE: $COMINrtofsfilename"
+					echo "WARNING: Missing RTOFS f${fhr3} prog file. $COMINrtofsfilename is missing for valid date $VDATE. METplus will not run."
 				fi
 			done
 		else
-			echo "WARNING: Missing RTOFS f000 ice file for $VDATE: $COMINicefilename"
+			echo "WARNING: Missing RTOFS f000 ice file. $COMINicefilename is missing for valid date $VDATE. METplus will not run."
 		fi
 	else
-		echo "WARNING: Missing NDBC data file for $VDATE: $EVSINfilename"
+		echo "WARNING: Missing NDBC data file: $EVSINfilename is missing for valid date $VDATE. METplus will not run."
 	fi
 fi
 
@@ -192,7 +192,7 @@ if [ $OBTYPE = argo ]; then
       				fi
     			fi
   		else
-     			echo "WARNING: Missing RTOFS_${OBTYPEupper}_$VAR stat files for $VDATE in $STATSDIR/${RUN}.$VDATE/$OBTYPE/${VERIF_CASE}/$VAR/*.stat" 
+     			echo "DEBUG: Missing RTOFS_${OBTYPEupper}_$VAR stat files for $VDATE in $STATSDIR/${RUN}.$VDATE/$OBTYPE/${VERIF_CASE}/$VAR/*.stat" 
   		fi
 	done
 elif [ $OBTYPE = ndbc ]; then
@@ -212,7 +212,7 @@ elif [ $OBTYPE = ndbc ]; then
       				fi
     			fi
   		else
-     			echo "WARNING: Missing RTOFS_${OBTYPEupper}_$VAR stat files for $VDATE in $STATSDIR/${RUN}.$VDATE/$OBTYPE/${VERIF_CASE}/$VAR/*.stat" 
+     			echo "DEBUG: Missing RTOFS_${OBTYPEupper}_$VAR stat files for $VDATE in $STATSDIR/${RUN}.$VDATE/$OBTYPE/${VERIF_CASE}/$VAR/*.stat" 
   		fi
 	done
 fi
diff --git a/ush/rtofs/rtofs_check_nc.py b/ush/rtofs/rtofs_check_nc.py
new file mode 100755
index 0000000000..8f9b01aa54
--- /dev/null
+++ b/ush/rtofs/rtofs_check_nc.py
@@ -0,0 +1,37 @@
+#!/usr/bin/env python3
+###############################################################################
+#
+# Name:          rtofs_check_nc.py
+# Developed:     APR. 18, 2025 by Samira Ardani
+# Title:         Checking the netcdf observational inputs
+#                
+# Abstract:      This script adds a file check before files to be used in METplus and discards the corrupted netcdf files.
+#                
+#
+###############################################################################
+import sys
+import subprocess
+
+def rtofs_check_nc(filepath):
+        try:
+            result = subprocess.run(
+                 ['ncdump', '-h', filepath],
+                 check=True,
+                 stdout=subprocess.DEVNULL,
+                 stderr=subprocess.DEVNULL
+                 )
+            if result.returncode == 0:
+                status = 0  # file is not corrupted.
+                print (status)
+        except subprocess.CalledProcessError:
+            status = 1      # file is corrupted. 
+            print (status)
+        return status
+
+if __name__ == "__main__":
+    if len(sys.argv) != 2:
+        sys.exit(1)
+
+    filename = sys.argv[1]
+    status = rtofs_check_nc(filename)
+
diff --git a/ush/rtofs/settings.py b/ush/rtofs/settings.py
index 23d936bdf6..37783747de 100755
--- a/ush/rtofs/settings.py
+++ b/ush/rtofs/settings.py
@@ -105,9 +105,9 @@ def __init__(self):
             },
             'last60days': {
                 'valid_beg': (datetime.now()-td(days=60)).strftime('%Y%m%d'),
-                'valid_end': (datetime.now()-td(days=1)).strftime('%Y%m%d'),
+                'valid_end': (datetime.now()-td(days=3)).strftime('%Y%m%d'),
                 'init_beg': (datetime.now()-td(days=60)).strftime('%Y%m%d'),
-                'init_end': (datetime.now()-td(days=1)).strftime('%Y%m%d')
+                'init_end': (datetime.now()-td(days=3)).strftime('%Y%m%d')
             },
             'last30days': {
                 'valid_beg': (datetime.now()-td(days=30)).strftime('%Y%m%d'),


Reviews:
user: login: AliciaBentley-NOAA
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T18:21:34Z
user: login: AliciaBentley-NOAA
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T18:22:57Z
user: login: AliciaBentley-NOAA
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T18:24:35Z
user: login: AliciaBentley-NOAA
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T18:24:40Z
user: login: AliciaBentley-NOAA
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T18:26:21Z
user: login: AliciaBentley-NOAA
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T18:26:26Z
user: login: SamiraArdani-NOAA
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T18:55:08Z
user: login: SamiraArdani-NOAA
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T19:00:20Z
user: login: SamiraArdani-NOAA
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T19:01:11Z
user: login: SamiraArdani-NOAA
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T19:07:27Z
user: login: SamiraArdani-NOAA
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T19:12:19Z
user: login: AliciaBentley-NOAA
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T20:17:11Z
user: login: AliciaBentley-NOAA
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T20:18:16Z
user: login: AliciaBentley-NOAA
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T20:19:10Z
user: login: AliciaBentley-NOAA
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T20:20:50Z
user: login: AliciaBentley-NOAA
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T20:21:37Z
user: login: AliciaBentley-NOAA
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T20:22:47Z
user: login: ShannonShields-NOAA
body: @SamiraArdani-NOAA and @AliciaBentley-NOAA I have reviewed the code changes, including the various WARNING or DEBUG statements, and followed along with the conversation for this PR testing. I approve this PR to be merged.
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-09T16:31:34Z
user: login: AliciaBentley-NOAA
body: I have reviewed the code changes and log files associated with this PR. WARNINGs were updated to include the path to the missing or corrupted file and what METplus would do about it. The plots also now end of the end date in the image title and the date in the .tar file name. I approve this PR to be merged. 

@SamiraArdani-NOAA Please sync your fork. Marcel's PR was just merged. Thanks!
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-09T16:36:30Z

Review comments:
diff_hunk: @@ -159,23 +172,24 @@ else
           					echo "WARNING: Missing RTOFS f${fhr3} file for $VDATE: $COMINrtofsfilename"
         				fi
       				done
-   			else
-     				echo "WARNING: Missing RTOFS f000 ice file for $VDATE: $COMINicefilename"
-   			fi
+  			else
+				echo "WARNING: Corrupted validation file: ${OBTYPEupper} is corrupted for valid date $VDATE. METplus will skip $DCOMINrtofsfilename and not run."
path: scripts/stats/rtofs/exevs_rtofs_grid2grid_stats.sh
user: login: AliciaBentley-NOAA
body: @SamiraArdani-NOAA Should this WARNING have to do with a corrupted ice file like `$COMINicefilename` instead?
created_at: 2025-05-08T18:21:34Z
author_association: CONTRIBUTOR
diff_hunk: @@ -159,23 +172,24 @@ else
           					echo "WARNING: Missing RTOFS f${fhr3} file for $VDATE: $COMINrtofsfilename"
         				fi
       				done
-   			else
-     				echo "WARNING: Missing RTOFS f000 ice file for $VDATE: $COMINicefilename"
-   			fi
+  			else
+				echo "WARNING: Corrupted validation file: ${OBTYPEupper} is corrupted for valid date $VDATE. METplus will skip $DCOMINrtofsfilename and not run."
+				
+   				if [ $SENDMAIL = YES ] ; then
+       					export subject="${OBTYPEupper} Data is corrupted for EVS RTOFS"
+       					echo "WARNING: No ${OBTYPEupper} data was available for valid date $VDATE." > mailmsg
+       					echo "Corrupted file is ${DCOMINrtofsfilename}." >> mailmsg
+       					cat mailmsg | mail -s "$subject" $MAILTO
+   				fi
+			fi
 		else
-   			echo "WARNING:  Missing SMOS data file for $VDATE: $DCOMINrtofsfilename"
-   			if [ $SENDMAIL = YES ] ; then
-       				export subject="${OBTYPEupper} Data Missing for EVS RTOFS"
-       				echo "Warning: No ${OBTYPEupper} data was available for valid date $VDATE." > mailmsg
-       				echo "Missing file is ${DCOMINrtofsfilename}." >> mailmsg
-       				cat mailmsg | mail -s "$subject" $MAILTO
-   			fi
-		fi
+     			echo "WARNING: Missing RTOFS f000 ice file for $VDATE: $COMINicefilename"
path: scripts/stats/rtofs/exevs_rtofs_grid2grid_stats.sh
user: login: AliciaBentley-NOAA
body: @SamiraArdani-NOAA Can this WARNING be updated to say what METplus will do without the missing RTOFS f000 file and be more consistent with other WARNINGs? Perhaps something like:

echo "WARNING: Missing validation file: $COMINicefilename is missing for valid date $VDATE. METplus will skip $COMINicefilename and not run."
created_at: 2025-05-08T18:22:57Z
author_association: CONTRIBUTOR
diff_hunk: @@ -50,7 +56,7 @@ for lead in ${leads}; do
                 echo "WARNING: ${input_rtofs_file} does not exist"
                 if [ $SENDMAIL = YES ] ; then
                     export subject="${lead} RTOFS Forecast Data Missing for EVS ${COMPONENT}"
-                    echo "Warning: No RTOFS forecast was available for ${INITDATE}${lead}" > mailmsg
+                    echo "WARNING: No RTOFS forecast was available for ${INITDATE}${lead}" > mailmsg
path: scripts/prep/rtofs/exevs_rtofs_prep.sh
user: login: AliciaBentley-NOAA
body: @SamiraArdani-NOAA  Can this WARNING include the path to the missing file `${input_rtofs_file}` and what METplus will do? 
created_at: 2025-05-08T18:24:35Z
author_association: CONTRIBUTOR
diff_hunk: @@ -50,7 +56,7 @@ for lead in ${leads}; do
                 echo "WARNING: ${input_rtofs_file} does not exist"
path: scripts/prep/rtofs/exevs_rtofs_prep.sh
user: login: AliciaBentley-NOAA
body: @SamiraArdani-NOAA  Can this WARNING include the path to the missing file `${input_rtofs_file}` and what METplus will do? 
created_at: 2025-05-08T18:24:40Z
author_association: CONTRIBUTOR
diff_hunk: @@ -79,7 +85,7 @@ for lead in ${leads}; do
                 echo "WARNING: ${input_rtofs_file} does not exist"
path: scripts/prep/rtofs/exevs_rtofs_prep.sh
user: login: AliciaBentley-NOAA
body: @SamiraArdani-NOAA  Can this WARNING include the path to the missing file `${input_rtofs_file}` and what METplus will do? Also, please check that this isn't an exact repeat of above. 
created_at: 2025-05-08T18:26:20Z
author_association: CONTRIBUTOR
diff_hunk: @@ -79,7 +85,7 @@ for lead in ${leads}; do
                 echo "WARNING: ${input_rtofs_file} does not exist"
                 if [ $SENDMAIL = YES ] ; then
                     export subject="${lead} RTOFS Forecast Data Missing for EVS ${COMPONENT}"
-                    echo "Warning: No RTOFS forecast was available for ${INITDATE}${lead}" > mailmsg
+                    echo "WARNING: No RTOFS forecast was available for ${INITDATE}${lead}" > mailmsg
path: scripts/prep/rtofs/exevs_rtofs_prep.sh
user: login: AliciaBentley-NOAA
body: @SamiraArdani-NOAA  Can this WARNING include the path to the missing file `${input_rtofs_file}` and what METplus will do? Also, please check that this isn't an exact repeat of above. 
created_at: 2025-05-08T18:26:26Z
author_association: CONTRIBUTOR
diff_hunk: @@ -159,23 +172,24 @@ else
           					echo "WARNING: Missing RTOFS f${fhr3} file for $VDATE: $COMINrtofsfilename"
         				fi
       				done
-   			else
-     				echo "WARNING: Missing RTOFS f000 ice file for $VDATE: $COMINicefilename"
-   			fi
+  			else
+				echo "WARNING: Corrupted validation file: ${OBTYPEupper} is corrupted for valid date $VDATE. METplus will skip $DCOMINrtofsfilename and not run."
path: scripts/stats/rtofs/exevs_rtofs_grid2grid_stats.sh
user: login: SamiraArdani-NOAA
body: @AliciaBentley-NOAA, No, these are different from corrupted /dcom files. These are for the ice files created in prep step.
created_at: 2025-05-08T18:55:08Z
author_association: CONTRIBUTOR
diff_hunk: @@ -159,23 +172,24 @@ else
           					echo "WARNING: Missing RTOFS f${fhr3} file for $VDATE: $COMINrtofsfilename"
         				fi
       				done
-   			else
-     				echo "WARNING: Missing RTOFS f000 ice file for $VDATE: $COMINicefilename"
-   			fi
+  			else
+				echo "WARNING: Corrupted validation file: ${OBTYPEupper} is corrupted for valid date $VDATE. METplus will skip $DCOMINrtofsfilename and not run."
+				
+   				if [ $SENDMAIL = YES ] ; then
+       					export subject="${OBTYPEupper} Data is corrupted for EVS RTOFS"
+       					echo "WARNING: No ${OBTYPEupper} data was available for valid date $VDATE." > mailmsg
+       					echo "Corrupted file is ${DCOMINrtofsfilename}." >> mailmsg
+       					cat mailmsg | mail -s "$subject" $MAILTO
+   				fi
+			fi
 		else
-   			echo "WARNING:  Missing SMOS data file for $VDATE: $DCOMINrtofsfilename"
-   			if [ $SENDMAIL = YES ] ; then
-       				export subject="${OBTYPEupper} Data Missing for EVS RTOFS"
-       				echo "Warning: No ${OBTYPEupper} data was available for valid date $VDATE." > mailmsg
-       				echo "Missing file is ${DCOMINrtofsfilename}." >> mailmsg
-       				cat mailmsg | mail -s "$subject" $MAILTO
-   			fi
-		fi
+     			echo "WARNING: Missing RTOFS f000 ice file for $VDATE: $COMINicefilename"
path: scripts/stats/rtofs/exevs_rtofs_grid2grid_stats.sh
user: login: SamiraArdani-NOAA
body: @AliciaBentley-NOAA , is this message ok? WARNING: Missing validation f000 ice file: $COMINicefilename is missing for valid date $VDATE. Metplus wil not run. I think would be good to have "f000 ice file"
created_at: 2025-05-08T19:00:20Z
author_association: CONTRIBUTOR
diff_hunk: @@ -159,23 +172,24 @@ else
           					echo "WARNING: Missing RTOFS f${fhr3} file for $VDATE: $COMINrtofsfilename"
         				fi
       				done
-   			else
-     				echo "WARNING: Missing RTOFS f000 ice file for $VDATE: $COMINicefilename"
-   			fi
+  			else
+				echo "WARNING: Corrupted validation file: ${OBTYPEupper} is corrupted for valid date $VDATE. METplus will skip $DCOMINrtofsfilename and not run."
+				
+   				if [ $SENDMAIL = YES ] ; then
+       					export subject="${OBTYPEupper} Data is corrupted for EVS RTOFS"
+       					echo "WARNING: No ${OBTYPEupper} data was available for valid date $VDATE." > mailmsg
+       					echo "Corrupted file is ${DCOMINrtofsfilename}." >> mailmsg
+       					cat mailmsg | mail -s "$subject" $MAILTO
+   				fi
+			fi
 		else
-   			echo "WARNING:  Missing SMOS data file for $VDATE: $DCOMINrtofsfilename"
-   			if [ $SENDMAIL = YES ] ; then
-       				export subject="${OBTYPEupper} Data Missing for EVS RTOFS"
-       				echo "Warning: No ${OBTYPEupper} data was available for valid date $VDATE." > mailmsg
-       				echo "Missing file is ${DCOMINrtofsfilename}." >> mailmsg
-       				cat mailmsg | mail -s "$subject" $MAILTO
-   			fi
-		fi
+     			echo "WARNING: Missing RTOFS f000 ice file for $VDATE: $COMINicefilename"
path: scripts/stats/rtofs/exevs_rtofs_grid2grid_stats.sh
user: login: SamiraArdani-NOAA
body: @AliciaBentley-NOAA , If this message is ok, I have modified the message.
created_at: 2025-05-08T19:01:10Z
author_association: CONTRIBUTOR
diff_hunk: @@ -50,7 +56,7 @@ for lead in ${leads}; do
                 echo "WARNING: ${input_rtofs_file} does not exist"
                 if [ $SENDMAIL = YES ] ; then
                     export subject="${lead} RTOFS Forecast Data Missing for EVS ${COMPONENT}"
-                    echo "Warning: No RTOFS forecast was available for ${INITDATE}${lead}" > mailmsg
+                    echo "WARNING: No RTOFS forecast was available for ${INITDATE}${lead}" > mailmsg
path: scripts/prep/rtofs/exevs_rtofs_prep.sh
user: login: SamiraArdani-NOAA
body: @AliciaBentley-NOAA , Just to confirm, these are the RTOFS model data (not /dcom data). Do we still need to change the messages for them.
created_at: 2025-05-08T19:07:27Z
author_association: CONTRIBUTOR
diff_hunk: @@ -50,7 +56,7 @@ for lead in ${leads}; do
                 echo "WARNING: ${input_rtofs_file} does not exist"
                 if [ $SENDMAIL = YES ] ; then
                     export subject="${lead} RTOFS Forecast Data Missing for EVS ${COMPONENT}"
-                    echo "Warning: No RTOFS forecast was available for ${INITDATE}${lead}" > mailmsg
+                    echo "WARNING: No RTOFS forecast was available for ${INITDATE}${lead}" > mailmsg
path: scripts/prep/rtofs/exevs_rtofs_prep.sh
user: login: SamiraArdani-NOAA
body: @AliciaBentley-NOAA, I have change it to:  WARNING: No RTOFS forecast was available for ${INITDATE}${lead}. Missing file is: ${input_rtofs_file}. METplus will not run.
created_at: 2025-05-08T19:12:19Z
author_association: CONTRIBUTOR
diff_hunk: @@ -175,19 +178,35 @@ for ftype in nh sh; do
 	tmp_osisaf_file=$DATA/$RUN.$INITDATE/$OBTYPE/ice_conc_${ftype}_polstere-100_multi_${INITDATE}1200.nc
 	output_osisaf_file=$COMOUTprep/$RUN.$INITDATE/$OBTYPE/ice_conc_${ftype}_polstere-100_multi_${INITDATE}1200.nc
 	if [ -s $input_osisaf_file ]; then
-    		actual_size_osisaf=$(wc -c <"$DCOMROOT/$INITDATE/seaice/osisaf/ice_conc_${ftype}_polstere-100_multi_${INITDATE}1200.nc")
+		python $USHevs/${COMPONENT}/rtofs_check_nc.py "$input_osisaf_file"
+		export err=$?; err_chk
+		file_check=$(python3 $USHevs/${COMPONENT}/rtofs_check_nc.py "$input_osisaf_file")
+		echo "$file_check"
+		if [ "$file_check" -eq 0 ]; then
+			echo "$input_osisaf_file is valid."
+		elif [ "$file_check" -eq 1 ]; then
+			echo "WARNING:  Corrupted validation file: OSI-SAF ${ftype} is corrupted for valid date $INITDATE. METplus will skip ${input_osisaf_file} and not run."
+			if [ $SENDMAIL = YES ] ; then
+				export subject="OSI-SAF Data is corrupted for EVS RTOFS"
+		    		echo "WARNING: No OSI-SAF ${ftype} data was available for valid date $INITDATE." > mailmsg
+		    		echo "Corrupted file is $input_osisaf_file" >> mailmsg
+		    		cat mailmsg | mail -s "$subject" $MAILTO
+	    	fi
+		fi
     	fi
-    	if [[ ! -s $input_osisaf_file || $actual_size_osisaf -lt $min_size ]]; then
-	    	echo "WARNING: No OSI-SAF ${ftype} data was available for valid date $INITDATE."
-	    	if [ $SENDMAIL = YES ] ; then
+	if [ ! -s $input_osisaf_file ]; then
+		echo "WARNING: No OSI-SAF ${ftype} data was available for valid date $INITDATE. $input_osisaf_file does not exist. METplus will not run."
+		if [ $SENDMAIL = YES ] ; then
 			export subject="OSI-SAF Data Missing for EVS RTOFS"
-		    	echo "Warning: No OSI-SAF ${ftype} data was available for valid date $INITDATE." > mailmsg
+		    	echo "WARNING: No OSI-SAF ${ftype} data was available for valid date $INITDATE." > mailmsg
 		    	echo "Missing file is $input_osisaf_file" >> mailmsg
path: scripts/prep/rtofs/exevs_rtofs_prep.sh
user: login: AliciaBentley-NOAA
body: @SamiraArdani-NOAA For consistency with other recent changes, and so the missing file path is on the same line as the WARNING, consider changing this to:

`echo "WARNING: No OSI-SAF ${ftype} data was available for valid date $INITDATE. Missing file is: $input_osisaf_file. METplus will not run." > mailmsg`
created_at: 2025-05-08T20:17:11Z
author_association: CONTRIBUTOR
diff_hunk: @@ -196,10 +215,10 @@ for ftype in nh sh; do
 				fi
             		fi
         	else
-			echo "WARNING: No OSI-SAF ${ftype} data was available for valid date $INITDATE."
+			echo "WARNING: No OSI-SAF ${ftype} data was available for valid date $INITDATE. $input_osisaf_file can be missing or corrupted. METplus will not run."
             		if [ $SENDMAIL = YES ] ; then
                 		export subject="OSI-SAF Data Missing for EVS RTOFS"
-                		echo "Warning: No OSI-SAF ${ftype} data was available for valid date $INITDATE." > mailmsg
+                		echo "WARNING: No OSI-SAF ${ftype} data was available for valid date $INITDATE." > mailmsg
                 		echo "Missing file is $input_osisaf_file" >> mailmsg
path: scripts/prep/rtofs/exevs_rtofs_prep.sh
user: login: AliciaBentley-NOAA
body: Very similar comment to above:

@SamiraArdani-NOAA For consistency with other recent changes, and so the missing file path is on the same line as the WARNING, consider changing this to:

`echo "WARNING: No OSI-SAF ${ftype} data was available for valid date $INITDATE. Missing file is: $input_osisaf_file. METplus will not run." > mailmsg`
created_at: 2025-05-08T20:18:15Z
author_association: CONTRIBUTOR
diff_hunk: @@ -242,10 +261,10 @@ if [ $ndbc_txt_ncount -gt 0 ]; then
 
    	 fi
 else
-	echo "WARNING: No NDBC data was available for valid date $INITDATE."	
+	echo "WARNING: No NDBC data was available for valid date $INITDATE. $DCOMROOT/$INITDATE/validation_data/marine/buoy/ is empty or does not exist. METplus will not run. "	
   	if [ $SENDMAIL = YES ] ; then
     		export subject="NDBC Data Missing for EVS RTOFS"
-    		echo "Warning: No NDBC data was available for valid date $INITDATE." > mailmsg
+    		echo "WARNING: No NDBC data was available for valid date $INITDATE." > mailmsg
     		echo "Missing files are located at $DCOMROOT/$INITDATE/validation_data/marine/buoy" >> mailmsg
path: scripts/prep/rtofs/exevs_rtofs_prep.sh
user: login: AliciaBentley-NOAA
body: @SamiraArdani-NOAA For consistency with other recent changes, and so the missing file path is on the same line as the WARNING, consider changing this to:

`echo "WARNING: No NDBC data was available for valid date $INITDATE. Missing file is: $DCOMROOT/$INITDATE/validation_data/marine/buoy. METplus will not run." > mailmsg`
created_at: 2025-05-08T20:19:10Z
author_association: CONTRIBUTOR
diff_hunk: @@ -159,23 +172,24 @@ else
           					echo "WARNING: Missing RTOFS f${fhr3} file for $VDATE: $COMINrtofsfilename"
         				fi
       				done
-   			else
-     				echo "WARNING: Missing RTOFS f000 ice file for $VDATE: $COMINicefilename"
-   			fi
+  			else
+				echo "WARNING: Corrupted validation file: ${OBTYPEupper} is corrupted for valid date $VDATE. METplus will skip $DCOMINrtofsfilename and not run."
+				
+   				if [ $SENDMAIL = YES ] ; then
+       					export subject="${OBTYPEupper} Data is corrupted for EVS RTOFS"
+       					echo "WARNING: No ${OBTYPEupper} data was available for valid date $VDATE." > mailmsg
+       					echo "Corrupted file is ${DCOMINrtofsfilename}." >> mailmsg
path: scripts/stats/rtofs/exevs_rtofs_grid2grid_stats.sh
user: login: AliciaBentley-NOAA
body: @SamiraArdani-NOAA For consistency with other recent changes, and so the missing file path is on the same line as the WARNING, consider changing this to:

`echo "WARNING: No ${OBTYPEupper} data was available for valid date $VDATE. Corrupted file is ${DCOMINrtofsfilename}. METplus will skip $DCOMINrtofsfilename and not run." > mailmsg`
created_at: 2025-05-08T20:20:50Z
author_association: CONTRIBUTOR
diff_hunk: @@ -159,23 +172,24 @@ else
           					echo "WARNING: Missing RTOFS f${fhr3} file for $VDATE: $COMINrtofsfilename"
         				fi
       				done
-   			else
-     				echo "WARNING: Missing RTOFS f000 ice file for $VDATE: $COMINicefilename"
-   			fi
+  			else
+				echo "WARNING: Corrupted validation file: ${OBTYPEupper} is corrupted for valid date $VDATE. METplus will skip $DCOMINrtofsfilename and not run."
+				
+   				if [ $SENDMAIL = YES ] ; then
+       					export subject="${OBTYPEupper} Data is corrupted for EVS RTOFS"
+       					echo "WARNING: No ${OBTYPEupper} data was available for valid date $VDATE." > mailmsg
+       					echo "Corrupted file is ${DCOMINrtofsfilename}." >> mailmsg
+       					cat mailmsg | mail -s "$subject" $MAILTO
+   				fi
+			fi
 		else
-   			echo "WARNING:  Missing SMOS data file for $VDATE: $DCOMINrtofsfilename"
-   			if [ $SENDMAIL = YES ] ; then
-       				export subject="${OBTYPEupper} Data Missing for EVS RTOFS"
-       				echo "Warning: No ${OBTYPEupper} data was available for valid date $VDATE." > mailmsg
-       				echo "Missing file is ${DCOMINrtofsfilename}." >> mailmsg
-       				cat mailmsg | mail -s "$subject" $MAILTO
-   			fi
-		fi
+     			echo "WARNING: Missing validation f000 ice file: $COMINicefilename is missing for valid date $VDATE. Metplus wil not run."
path: scripts/stats/rtofs/exevs_rtofs_grid2grid_stats.sh
user: login: AliciaBentley-NOAA
body: @SamiraArdani-NOAA Please change the last sentence to fix some typos:

`METplus will not run.`
created_at: 2025-05-08T20:21:37Z
author_association: CONTRIBUTOR
diff_hunk: @@ -159,23 +172,24 @@ else
           					echo "WARNING: Missing RTOFS f${fhr3} file for $VDATE: $COMINrtofsfilename"
         				fi
       				done
-   			else
-     				echo "WARNING: Missing RTOFS f000 ice file for $VDATE: $COMINicefilename"
-   			fi
+  			else
+				echo "WARNING: Corrupted validation file: ${OBTYPEupper} is corrupted for valid date $VDATE. METplus will skip $DCOMINrtofsfilename and not run."
+				
+   				if [ $SENDMAIL = YES ] ; then
+       					export subject="${OBTYPEupper} Data is corrupted for EVS RTOFS"
+       					echo "WARNING: No ${OBTYPEupper} data was available for valid date $VDATE." > mailmsg
+       					echo "Corrupted file is ${DCOMINrtofsfilename}." >> mailmsg
+       					cat mailmsg | mail -s "$subject" $MAILTO
+   				fi
+			fi
 		else
-   			echo "WARNING:  Missing SMOS data file for $VDATE: $DCOMINrtofsfilename"
-   			if [ $SENDMAIL = YES ] ; then
-       				export subject="${OBTYPEupper} Data Missing for EVS RTOFS"
-       				echo "Warning: No ${OBTYPEupper} data was available for valid date $VDATE." > mailmsg
-       				echo "Missing file is ${DCOMINrtofsfilename}." >> mailmsg
-       				cat mailmsg | mail -s "$subject" $MAILTO
-   			fi
-		fi
+     			echo "WARNING: Missing validation f000 ice file: $COMINicefilename is missing for valid date $VDATE. Metplus wil not run."
+   		fi
 	else
-		echo "WARNING:  Missing ${OBTYPEupper} data file for $VDATE: $DCOMINrtofsfilename"
+		echo "WARNING:  Missing ${OBTYPEupper} data file for $VDATE: $DCOMINrtofsfilename. $DCOMINrtofsfilename does not exist. METplus will not run."
 		if [ $SENDMAIL = YES ] ; then
 			export subject="${OBTYPEupper} Data Missing for EVS RTOFS"
-			echo "Warning: No ${OBTYPEupper} data was available for valid date $VDATE." > mailmsg
+			echo "WARNING: No ${OBTYPEupper} data was available for valid date $VDATE." > mailmsg
 			echo "Missing file is ${DCOMINrtofsfilename}." >> mailmsg
path: scripts/stats/rtofs/exevs_rtofs_grid2grid_stats.sh
user: login: AliciaBentley-NOAA
body: @SamiraArdani-NOAA For consistency with other recent changes, and so the missing file path is on the same line as the WARNING, consider changing this to:

`echo "WARNING: No ${OBTYPEupper} data was available for valid date $VDATE. Missing file is ${DCOMINrtofsfilename}. METplus will not run." > mailmsg`
created_at: 2025-05-08T20:22:46Z
author_association: CONTRIBUTOR

PR comments:
user: login: AliciaBentley-NOAA
created_at: 2025-05-02T18:32:53Z
body: @SamiraArdani-NOAA I finished my CLC course early, so I'm starting on your PR. I've kicked off the RTOFS prep job so far for Test 1. Here is the information. The job is 6 minutes in.

### jevs_rtofs_prep.sh
**Log file:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/pr713test/EVS/dev/drivers/scripts/prep/rtofs/jevs_rtofs_prep.o194753994
**DATA:** /lfs/h2/emc/stmp/alicia.bentley/evs_test/prod/tmp/jevs_rtofs_prep.194753994.cbqs01/
**Output:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/evs/v2.0/prep/rtofs
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-02T18:41:57Z
body: Thanks, @AliciaBentley-NOAA for starting this step today. prep usually takes around 3.5 hours to finish. So, I can take a look at results hopefully before my work day ends today.  
author_association: CONTRIBUTOR
user: login: AliciaBentley-NOAA
created_at: 2025-05-02T18:44:42Z
body: @SamiraArdani-NOAA I've also kicked off the RTOFS grid2grid stats jobs for Test 1. You can find their information here. Only one job is still running. 

### jevs_rtofs_smap_grid2grid_stats.sh
**Log file:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/pr713test/EVS/dev/drivers/scripts/stats/rtofs/jevs_rtofs_smap_grid2grid_stats.o194754480
**DATA:** /lfs/h2/emc/stmp/alicia.bentley/evs_test/prod/tmp/jevs_rtofs_smap_grid2grid_stats.194754480.cbqs01/
**Output:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/evs/v2.0/stats/rtofs/

### jevs_rtofs_smos_grid2grid_stats.sh
**Log file:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/pr713test/EVS/dev/drivers/scripts/stats/rtofs/jevs_rtofs_smos_grid2grid_stats.o194754542
**DATA:** /lfs/h2/emc/stmp/alicia.bentley/evs_test/prod/tmp/jevs_rtofs_smos_grid2grid_stats.194754542.cbqs01/
**Output:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/evs/v2.0/stats/rtofs/

### jevs_rtofs_ghrsst_grid2grid_stats.sh
**Log file:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/pr713test/EVS/dev/drivers/scripts/stats/rtofs/jevs_rtofs_ghrsst_grid2grid_stats.o194754695
**DATA:** /lfs/h2/emc/stmp/alicia.bentley/evs_test/prod/tmp/jevs_rtofs_ghrsst_grid2grid_stats.194754695.cbqs01/
**Output:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/evs/v2.0/stats/rtofs/

### jevs_rtofs_aviso_grid2grid_stats.sh
**Log file:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/pr713test/EVS/dev/drivers/scripts/stats/rtofs/jevs_rtofs_aviso_grid2grid_stats.o194754759
**DATA:** /lfs/h2/emc/stmp/alicia.bentley/evs_test/prod/tmp/jevs_rtofs_aviso_grid2grid_stats.194754759.cbqs01/
**Output:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/evs/v2.0/stats/rtofs/

### jevs_rtofs_osisaf_grid2grid_stats.sh
**Log file:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/pr713test/EVS/dev/drivers/scripts/stats/rtofs/jevs_rtofs_osisaf_grid2grid_stats.o194754850
**DATA:** /lfs/h2/emc/stmp/alicia.bentley/evs_test/prod/tmp/jevs_rtofs_osisaf_grid2grid_stats.194754850.cbqs01/
**Output:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/evs/v2.0/stats/rtofs/
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-02T18:49:58Z
body: @AliciaBentley-NOAA, I can check the stats for ERRORs, WARNINGs, etc. today but the emc.vpppg does not have the outputs for VDATE=20250430 yet. So, the comparison with outputs in emc.vpppg can be done on next working day (let's say Monday). 
author_association: CONTRIBUTOR
user: login: AliciaBentley-NOAA
created_at: 2025-05-02T18:52:11Z
body: No rush on this, Samira! I just didn't want to leave your PR hanging all week. We can definitely review the output on Monday. Thanks!
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-05T12:27:32Z
body: @AliciaBentley-NOAA, I checked the outputs for both prep and stats steps for test 1 and compared with those in emc.vpppg and they look as expected. I did not find any ERRORs or WARNINGs in log files. They all show that the /dcom data is passed as "valid". 
author_association: CONTRIBUTOR
user: login: AliciaBentley-NOAA
created_at: 2025-05-06T14:51:31Z
body: @SamiraArdani-NOAA Thank you! I think the log files look clean! Can we move onto Test 2?
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-06T14:54:05Z
body: > @SamiraArdani-NOAA Thank you! I think the log files look clean! Can we move onto Test 2?

@AliciaBentley-NOAA, yes, you can start test 2. I have also just updated my fork.
author_association: CONTRIBUTOR
user: login: AliciaBentley-NOAA
created_at: 2025-05-06T14:59:47Z
body: @SamiraArdani-NOAA Test 2 has been started, but I'm off to a 11am meeting! I'll send you the paths afterward, but I wanted you to know!
author_association: CONTRIBUTOR
user: login: AliciaBentley-NOAA
created_at: 2025-05-06T17:26:04Z
body: @SamiraArdani-NOAA I've also kicked off the RTOFS grid2grid stats jobs for Test 2. You can find their information here. Only one job (prep) is still running. **Do I need to test the argo job as well?**

### jevs_rtofs_prep.sh
**Log file:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/pr713test/EVS/dev/drivers/scripts/prep/rtofs/jevs_rtofs_prep.o195150004
**DATA:** /lfs/h2/emc/stmp/alicia.bentley/evs_test/prod/tmp/jevs_rtofs_prep.195150004.cbqs01/
**Output:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/evs/v2.0/prep/rtofs/

### jevs_rtofs_smap_grid2grid_stats.sh
**Log file:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/pr713test/EVS/dev/drivers/scripts/stats/rtofs/jevs_rtofs_smap_grid2grid_stats.o195150221
**DATA:** /lfs/h2/emc/stmp/alicia.bentley/evs_test/prod/tmp/jevs_rtofs_smap_grid2grid_stats.195150221.cbqs01/
**Output:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/evs/v2.0/stats/rtofs/

### jevs_rtofs_smos_grid2grid_stats.sh
**Log file:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/pr713test/EVS/dev/drivers/scripts/stats/rtofs/jevs_rtofs_smos_grid2grid_stats.o195150229
**DATA:** /lfs/h2/emc/stmp/alicia.bentley/evs_test/prod/tmp/jevs_rtofs_smos_grid2grid_stats.195150229.cbqs01/
**Output:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/evs/v2.0/stats/rtofs/

### jevs_rtofs_ghrsst_grid2grid_stats.sh
**Log file:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/pr713test/EVS/dev/drivers/scripts/stats/rtofs/jevs_rtofs_ghrsst_grid2grid_stats.o195150107
**DATA:** /lfs/h2/emc/stmp/alicia.bentley/evs_test/prod/tmp/jevs_rtofs_ghrsst_grid2grid_stats.195150107.cbqs01/
**Output:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/evs/v2.0/stats/rtofs/

### jevs_rtofs_aviso_grid2grid_stats.sh
**Log file:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/pr713test/EVS/dev/drivers/scripts/stats/rtofs/jevs_rtofs_aviso_grid2grid_stats.o195150075
**DATA:** /lfs/h2/emc/stmp/alicia.bentley/evs_test/prod/tmp/jevs_rtofs_aviso_grid2grid_stats.195150075.cbqs01/
**Output:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/evs/v2.0/stats/rtofs/

### jevs_rtofs_osisaf_grid2grid_stats.sh
**Log file:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/pr713test/EVS/dev/drivers/scripts/stats/rtofs/jevs_rtofs_osisaf_grid2grid_stats.o195150121
**DATA:** /lfs/h2/emc/stmp/alicia.bentley/evs_test/prod/tmp/jevs_rtofs_osisaf_grid2grid_stats.195150121.cbqs01/
**Output:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/evs/v2.0/stats/rtofs/
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-06T17:50:39Z
body: @AliciaBentley-NOAA, No need to test the grid2obs stats jobs (ndbc, argo). Data from DCOM for argo and ndbc cases is checked in prep step that you have already started testing it. 
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-06T17:53:34Z
body: @AliciaBentley-NOAA , I have checked the .o files for grid2grid stats jobs with corrupted /DCOM data. I search in .o file for "corrupt" and the code can detect them. Stats jobs all look good.
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-06T17:54:59Z
body: @AliciaBentley-NOAA, for osi-saf case, the data is checked in prep. So, I will wait till the prep run is done and will check the argo and osi-saf togetther.
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-06T18:52:57Z
body: @AliciaBentley-NOAA, the prep job was finished, So, I checked the .o file for the correpted files. Both osi-saf and argo data were detected as "corrupt" for this test. The results look as expected. Thanks!
author_association: CONTRIBUTOR
user: login: AliciaBentley-NOAA
created_at: 2025-05-06T19:00:19Z
body: @SamiraArdani-NOAA I'm sorry for not doing the code review sooner. I would have saved us a little effort. My apologies. 

Can you please add a little more information to the various WARNING lines being written to the log files? Ho-Chun did in his recent PR as well. Specifically, can you please add what EVS is doing to avoid the corrupted file? Is the corrupted file being skipped? Is the corrupted file being trimmed and used? Adding that information at the end of the WARNING line in the log file will help NCO know that the corrupted data isn't hurting EVS. Thanks for making these refinements!
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-06T19:10:55Z
body: @AliciaBentley-NOAA, No worries. I can update the WARNING messages. When the /dcom file is corrupted, the code does not run METplus. The WARNING message is appeared that says the file is corrupted. The same thing happens when the file from /dcom is missing. I have separated those messages so NCO knows which one is happening. 
Now, to extend the message to something more informative, Do you like: WARNING: Corrupted validation file: SMAP is corrupted for valid date 20250430'. **Running Metplus is discarded**?
author_association: CONTRIBUTOR
user: login: AliciaBentley-NOAA
created_at: 2025-05-06T19:15:18Z
body: Good question. We should include a description of what EVS will do about the corrupted file and also the path to the corrupted file. 

WARNING: Corrupted validation file: SMAP is corrupted for valid date 20250430. METplus will skip [path_to_file_here] and not run.**
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-06T19:17:41Z
body: > Good question. We should include a description of what EVS will do about the corrupted file and also the path to the corrupted file.
> 
> WARNING: Corrupted validation file: SMAP is corrupted for valid date 20250430. METplus will skip [path_to_file_here] and not run.**

@AliciaBentley-NOAA, Ok, great! I will update the scripts to reflect the new WARNING message in case of corrupted files.
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-06T19:50:03Z
body: @AliciaBentley-NOAA, I have updated the WARNING messages. You can re-run Test 2 at your convenient time.
author_association: CONTRIBUTOR
user: login: AliciaBentley-NOAA
created_at: 2025-05-06T20:16:18Z
body: Thanks, @SamiraArdani-NOAA! I'm going to head home now, but I will rerun Test 2 in the morning after pulling in your updates!
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-06T21:10:48Z
body: @AliciaBentley-NOAA, in case if you want to re-run test 2, I have updated the PR instructions to run test 2 for **20250504** because I anticipate the rtofs data for 20250430 is not available in /com anymore (moves to HPSS). So, you need to add these line to j-jobs:
```
export INITDATE=20250504 (for prep only)
export VDATE=20250504 (for stats only)
```
author_association: CONTRIBUTOR
user: login: AliciaBentley-NOAA
created_at: 2025-05-07T12:50:07Z
body: @SamiraArdani-NOAA I've also kicked off the RTOFS prep and grid2grid stats jobs for Test 2 using the new date. You can find the job information at the paths below.

### jevs_rtofs_prep.sh
**Log file:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/pr713test/EVS/dev/drivers/scripts/prep/rtofs/jevs_rtofs_prep.o195263067
**DATA:** /lfs/h2/emc/stmp/alicia.bentley/evs_test/prod/tmp/jevs_rtofs_prep.195263067.cbqs01/
**Output:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/evs/v2.0/prep/rtofs/

------------------------------------------------------------

### jevs_rtofs_smap_grid2grid_stats.sh
**Log file:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/pr713test/EVS/dev/drivers/scripts/stats/rtofs/jevs_rtofs_smap_grid2grid_stats.o195263395
**DATA:** /lfs/h2/emc/stmp/alicia.bentley/evs_test/prod/tmp/jevs_rtofs_smap_grid2grid_stats.195263395.cbqs01/
**Output:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/evs/v2.0/stats/rtofs/

### jevs_rtofs_smos_grid2grid_stats.sh
**Log file:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/pr713test/EVS/dev/drivers/scripts/stats/rtofs/jevs_rtofs_smos_grid2grid_stats.o195263400
**DATA:** /lfs/h2/emc/stmp/alicia.bentley/evs_test/prod/tmp/jevs_rtofs_smos_grid2grid_stats.195263400.cbqs01/
**Output:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/evs/v2.0/stats/rtofs/

### jevs_rtofs_ghrsst_grid2grid_stats.sh
**Log file:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/pr713test/EVS/dev/drivers/scripts/stats/rtofs/jevs_rtofs_ghrsst_grid2grid_stats.o195263193
**DATA:** /lfs/h2/emc/stmp/alicia.bentley/evs_test/prod/tmp/jevs_rtofs_ghrsst_grid2grid_stats.195263193.cbqs01/
**Output:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/evs/v2.0/stats/rtofs/

### jevs_rtofs_aviso_grid2grid_stats.sh
**Log file:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/pr713test/EVS/dev/drivers/scripts/stats/rtofs/jevs_rtofs_aviso_grid2grid_stats.o195263173
**DATA:** /lfs/h2/emc/stmp/alicia.bentley/evs_test/prod/tmp/jevs_rtofs_aviso_grid2grid_stats.195263173.cbqs01/
**Output:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/evs/v2.0/stats/rtofs/

### jevs_rtofs_osisaf_grid2grid_stats.sh
**Log file:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/pr713test/EVS/dev/drivers/scripts/stats/rtofs/jevs_rtofs_osisaf_grid2grid_stats.o195263372
**DATA:** /lfs/h2/emc/stmp/alicia.bentley/evs_test/prod/tmp/jevs_rtofs_osisaf_grid2grid_stats.195263372.cbqs01/
**Output:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/evs/v2.0/stats/rtofs/
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-07T13:48:16Z
body: @AliciaBentley-NOAA, Thanks for running the jobs. I will take a look shortly.
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-07T15:33:16Z
body: @AliciaBentley-NOAA, I checked the o. files for grid2grid stats jobs and I see that the corrupted file has been detected for each job and the WARNING message is displayed. I am still waiting for prep job to be done so I can check the WARNING messages for osi-saf and argo corrupted obs data.
author_association: CONTRIBUTOR
user: login: AliciaBentley-NOAA
created_at: 2025-05-07T16:09:36Z
body: @SamiraArdani-NOAA The RTOFS prep job is complete!
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-07T16:21:20Z
body: @AliciaBentley-NOAA, I checked the prep log file and it displays the expected WARNING messages for osi-saf and argo.  
author_association: CONTRIBUTOR
user: login: AliciaBentley-NOAA
created_at: 2025-05-07T17:03:17Z
body: @SamiraArdani-NOAA Do I need to change anything in your code to get the RTOFS plots scripts to run at PDYm3?
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-07T17:10:56Z
body: > @SamiraArdani-NOAA Do I need to change anything in your code to get the RTOFS plots scripts to run at PDYm3?

@AliciaBentley-NOAA, you just need to set your $HOMEevs to the location of your test directory in driver scripts, in $COMIN, point to emc.vpppg and set $KEEPDATA to YES. Please run for VDATE=20250504 (pdym3)
author_association: CONTRIBUTOR
user: login: AliciaBentley-NOAA
created_at: 2025-05-07T17:21:28Z
body: @SamiraArdani-NOAA I have kicked off all the plot jobs with VDATE=20250504! Please push these plots to a webpage when they are finished so that we can take a look at the y-axes and the end dates in the plots. Thanks!

**Log files:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/pr713test/EVS/dev/drivers/scripts/plots/rtofs/
**DATA:** /lfs/h2/emc/stmp/alicia.bentley/evs_test/prod/tmp/
**Plots:** /lfs/h2/emc/ptmp/alicia.bentley/evs/v2.0/plots/rtofs/
author_association: CONTRIBUTOR
user: login: AliciaBentley-NOAA
created_at: 2025-05-07T17:26:10Z
body: @SamiraArdani-NOAA Going back to the log file for the prep job quickly, I see lines like this:

```
WARNING: No OSI-SAF nh data was available for valid date 20250504.
WARNING: No OSI-SAF sh data was available for valid date 20250504.
WARNING: No OSI-SAF sh data was available for valid date 20250504.
WARNING: No NDBC data was available for valid date 20250504.
```

Can these lines please have a little more information in them? If the file doesn't exist and that is why there is no NH or SH data, can the end of these lines say that the file doesn't exist (with the path to the file and the filename)? If there is no data because the file is corrupted, can the line say that instead? And can we say what we are going in EVS about the missing/corrupted data?

author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-07T19:46:33Z
body: @AliciaBentley-NOAA, I have sent the images into a /test directory. please visit this [link](https://www.emc.ncep.noaa.gov/users/verification/ocean_lake/rtofs/test/grid2grid/sss/).
author_association: CONTRIBUTOR
user: login: AliciaBentley-NOAA
created_at: 2025-05-08T12:04:34Z
body: @SamiraArdani-NOAA Thank you for sending a link to the plots! I agree that the line now ends on the last day listed in the title. Can you please confirm that this is also the YYYYMMDD date listed in the .tar file name?
author_association: CONTRIBUTOR
user: login: AliciaBentley-NOAA
created_at: 2025-05-08T12:08:38Z
body: @SamiraArdani-NOAA Should I pull in your recent changes and rerun 1) rtofs prep and 2) one rtofs stats job? What dates should I use? The same dates as yesterday?
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-08T13:14:51Z
body: @AliciaBentley-NOAA, I can confirm that the .tar files dates show the same date. comparing the dates on tar file with what the end date on plots say (05/04) and the .tar files dates for /lfs/h2/emc/ptmp/alicia.bentley/evs/v2.0/plots/rtofs/* (20250504).
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-08T13:19:21Z
body: > @SamiraArdani-NOAA Should I pull in your recent changes and rerun 1) rtofs prep and 2) one rtofs stats job? What dates should I use? The same dates as yesterday?

Yes, Please pull the changes and use 20250504 for the test. You can run prep, there is one missing file (intentionally) for osi-saf. Also, I have removed data for ghrsst to test missing files for stats.
author_association: CONTRIBUTOR
user: login: AliciaBentley-NOAA
created_at: 2025-05-08T13:43:23Z
body: @SamiraArdani-NOAA Thanks! Should I test one stats job (ghrsst)?
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-08T13:44:49Z
body: @AliciaBentley-NOAA, Sounds good to me. You can just check ghrsst case.
author_association: CONTRIBUTOR
user: login: AliciaBentley-NOAA
created_at: 2025-05-08T15:11:22Z
body: @SamiraArdani-NOAA I have pulled in your changes and submitted the two jobs that we discussed (prep and grid2grid ghrsst) for 20250504. Please examine the output when they complete! If things look good in this test, I think that your PR will be ready for final code review and merger. 

### jevs_rtofs_prep.sh
**Log file:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/pr713test/EVS/dev/drivers/scripts/prep/rtofs/jevs_rtofs_prep.o195380380
**DATA:** /lfs/h2/emc/stmp/alicia.bentley/evs_test/prod/tmp/jevs_rtofs_prep.195380380.cbqs01/
**Output:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/evs/v2.0/prep/rtofs/

### jevs_rtofs_ghrsst_grid2grid_stats.sh
**Log file:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/pr713test/EVS/dev/drivers/scripts/stats/rtofs/jevs_rtofs_ghrsst_grid2grid_stats.o195380654
**DATA:** /lfs/h2/emc/stmp/alicia.bentley/evs_test/prod/tmp/jevs_rtofs_ghrsst_grid2grid_stats.195380654.cbqs01/
**Output:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/evs/v2.0/stats/rtofs/

author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-08T15:26:12Z
body: @AliciaBentley-NOAA, ghrsst case was checked and the log file shows WARNING message due to missing files as we expected. The file check for stats jobs is working. For prep, I am still waiting for the job to be done.
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-08T18:10:22Z
body: @AliciaBentley-NOAA, I have just checked the prep job and found the expected WARNING messages for both cases of missing and corrupted data for osi-saf. Everything looks fine to me.
author_association: CONTRIBUTOR
user: login: AliciaBentley-NOAA
created_at: 2025-05-08T18:34:30Z
body: @SamiraArdani-NOAA In the GHRSST stat log file, I found a WARNING for a missing GHRSST RTOFS stat file. Why would a .stat file be an  input for a stats job? Can we confirm why we need file checks for stats files in a stats job? If we do want to keep this, can you add what METplus will do without this missing stats file?

`WARNING: Missing RTOFS_GHRSST_SST stat files for 20250504 in /lfs/h2/emc/stmp/arid_stats.195380654.cbqs01/stats/ocean.20250504/ghrsst/grid2grid/sst/*.stat`

author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-08T19:22:20Z
body: > @SamiraArdani-NOAA In the GHRSST stat log file, I found a WARNING for a missing GHRSST RTOFS stat file. Why would a .stat file be an input for a stats job? Can we confirm why we need file checks for stats files in a stats job? If we do want to keep this, can you add what METplus will do without this missing stats file?
> 
> `WARNING: Missing RTOFS_GHRSST_SST stat files for 20250504 in /lfs/h2/emc/stmp/arid_stats.195380654.cbqs01/stats/ocean.20250504/ghrsst/grid2grid/sst/*.stat`

@AliciaBentley-NOAA , This message is required for when the code is going to run the final stat analysis and it is looking for the small stats in that folder. if those small stats are not available this means that the final stats cannot be generated. 
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-08T19:24:15Z
body: @AliciaBentley-NOAA , in the case of ghrsst, there was an intentional missing file situation for testing. So, no small stats were generated and consequently, ne final stats will be generated and this message is for that purpose. I believe we need that file check. I have updated to this:
WARNING: Missing RTOFS_${OBTYPEupper}_$VARupper stat files for $VDATE in $STATSDIR/${RUN}.$VDATE/$OBTYPE/${VERIF_CASE}/$VAR/*.stat. METplus will not run to generate the final stat file.
author_association: CONTRIBUTOR
user: login: AliciaBentley-NOAA
created_at: 2025-05-08T19:28:34Z
body: @SamiraArdani-NOAA I think we have too many SENDMAIL sections in RTOFS. We shouldn't be emailing about missing stat files in a stats script. Maybe in a plots script, but not in a stats script. NCO says it's OK to check for missing input files in /com and /dcom. Please change any WARNINGs about missing stat files to DEBUG and make sure that they are not sending emails. 
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-08T19:31:29Z
body: @AliciaBentley-NOAA , give me a sec to update again. I just pushed some changes before I saw your last message.
author_association: CONTRIBUTOR
user: login: AliciaBentley-NOAA
created_at: 2025-05-08T19:35:04Z
body: @SamiraArdani-NOAA No problem. We just need to send fewer emails and we want all of the WARNINGs to be very informative. Please let me know when I can review the code again. 
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-08T19:47:13Z
body: @AliciaBentley-NOAA, I added the changes you requested. Please review and if you are happy with those changes pull them.
author_association: CONTRIBUTOR
user: login: AliciaBentley-NOAA
created_at: 2025-05-09T12:02:29Z
body: Thank you, @SamiraArdani-NOAA! These changes look great. I'm going to run everything again quickly, just to be sure. I think we can merge this PR later today. I'll give you the job information when I have it!
author_association: CONTRIBUTOR
user: login: AliciaBentley-NOAA
created_at: 2025-05-09T12:56:37Z
body: @SamiraArdani-NOAA I have cleaned out the log files and DATA files from previous tests, pulled in your updates, and started all of the jobs again. Two jobs (likely prep and something else) haven't completed yet, but are about ~15 minutes in. Please review the log files and output when the jobs complete. I don't anticipate major issues!

### jevs_rtofs_prep.sh
**Log file:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/pr713test/EVS/dev/drivers/scripts/prep/rtofs/jevs_rtofs_prep.o195477322
**DATA:** /lfs/h2/emc/stmp/alicia.bentley/evs_test/prod/tmp/jevs_rtofs_prep.195477322.cbqs01/
**Prep:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/evs/v2.0/prep/rtofs/

--------------------------------------------------

### Stats jobs:
**Log files:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/pr713test/EVS/dev/drivers/scripts/stats/rtofs/
**DATA:** /lfs/h2/emc/stmp/alicia.bentley/evs_test/prod/tmp/
**Stats:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/evs/v2.0/stats/rtofs/

 --------------------------------------------------

### Plots jobs:
**Log files:** /lfs/h2/emc/vpppg/noscrub/alicia.bentley/pr713test/EVS/dev/drivers/scripts/plots/rtofs/
**DATA:** /lfs/h2/emc/stmp/alicia.bentley/evs_test/prod/tmp/
**Plots:** /lfs/h2/emc/ptmp/alicia.bentley/evs/v2.0/plots/rtofs
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-09T15:55:18Z
body: @AliciaBentley-NOAA , All Log files were checked. The WARNING messages look as expected.
author_association: CONTRIBUTOR
user: login: ShannonShields-NOAA
created_at: 2025-05-09T16:35:28Z
body: @SamiraArdani-NOAA I just merged Marcel's CAM PR so please be sure to sync your branch before we merge this PR.
author_association: CONTRIBUTOR
user: login: SamiraArdani-NOAA
created_at: 2025-05-09T16:36:54Z
body: > @SamiraArdani-NOAA I just merged Marcel's CAM PR so please be sure to sync your branch before we merge this PR.

@ShannonShields-NOAA, I sync'd my fork and it is up-to-date now. Thanks!
author_association: CONTRIBUTOR