NOAA-EMC / EVS

12 stars 24 forks source link

feature/EVS-GLWU_stats _initialized #544

Closed SamiraArdani-NOAA closed 3 weeks ago

SamiraArdani-NOAA commented 3 weeks ago

Note to developers: You must use this PR template!

Description of Changes

This PR initializes the stats step by running the Point-Stat analysis and aggregated StatAnalysis for GLWU using NDBC data. In addition, this PR addresses some items in Fixes and Additions in EVS v2.0 document for EVS-GLWU prep step.

Please include a summary of the changes and the related GitHub issue(s). Please also include relevant motivation and context.

Here are the list of changes: 1- OBS_VAR(n)_LEVELS were updated in METplus point_stat config file. By applying this change, the METplus was successfully run by finding the matched pairs. This item has a GitHub discussion #2677 (https://github.com/dtcenter/METplus/discussions/2677#) 2- evs-nco.def for ecf prep script was updated to 1430Z. 3- The files check for existence of .txt files from NDBC for Great Lakes region was added before running the METplus. 4- The location of final .nc file from NDBC data changed to ndbc directory. There are two motivations for this PR: First, to store some data (at least for 30 days) for future stats and plots steps in the desired directory Due to the removing of the buoys in cold seasons, it would be good to store some data in emc.vpppg for future use. Second, to initialize the stats step.

Developer Questions and Checklist

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 "prep" and "stats" step. 2- Clone my fork in your local and checkout branch feature/EVS-GLWU_stats _initialized. 3- ln -s fix directory. 4- Run the driver scripts for: prep step: EVS/dev/drivers/scripts/prep/glwu/jevs_glwu_wave_grid2obs_prep.sh. stats step: EVS/dev/drivers/scripts/stats/glwu/jevs_glwu_wave_grid2obs_stats.sh.

malloryprow commented 3 weeks ago

Initial review of the code looks good. When we get to 1430Z, I'll run the prep job.

malloryprow commented 3 weeks ago

jevs_glwu_wave_grid2obs_prep.sh

Log File: /lfs/h2/emc/vpppg/noscrub/mallory.row/verification/EVS_PRs/pr544/EVS/dev/drivers/scripts/prep/glwu/jevs_glwu_wave_grid2obs_prep.o188887314 DATA: /lfs/h2/emc/stmp/mallory.row/evs_test/prod/tmp/jevs_glwu_wave_grid2obs_prep.188887314.dbqs01 COMOUT: /lfs/h2/emc/vpppg/noscrub/mallory.row/verification/EVS_PRs/pr544/evs/v2.0/prep/glwu/wave

SamiraArdani-NOAA commented 3 weeks ago

@malloryprow, the .o file is free from ERRORs and WARNINGs. The output results in $COMOUT were located at the desired directory (e.g. the .nc file from NDBC is located in ndbc directory).

malloryprow commented 3 weeks ago

I started testing the stats but the dev driver needs updating

In dev/drivers/scripts/stats/glwu/jevs_glwu_wave_grid2obs_stats.sh, please change

#PBS -l walltime=00:15:00 #PBS -l select=1:ncpus=1:mem=10GB

to

#PBS -l walltime=00:10:00 #PBS -l place=vscatter:shared,select=1:ncpus=36:mem=40G

This is what is in ecf/scripts/stats/glwu/jevs_glwu_wave_grid2obs_stats.ecf.

malloryprow commented 3 weeks ago

jevs_glwu_wave_grid2obs_stats.sh

Log File: /lfs/h2/emc/vpppg/noscrub/mallory.row/verification/EVS_PRs/pr544/EVS/dev/drivers/scripts/stats/glwu/jevs_glwu_wave_grid2obs_stats.o188904718 DATA: /lfs/h2/emc/stmp/mallory.row/evs_test/prod/tmp/jevs_glwu_wave_grid2obs_stats.188904718.dbqs01 COMOUT: /lfs/h2/emc/vpppg/noscrub/mallory.row/verification/EVS_PRs/pr544/evs/v2.0/stats/glwu

I'm seeing

WARNING: Config variable OMP_NUM_THREADS (1) will be overridden by the environment variable OMP_NUM_THREADS (36) in the log.

If you add export OMP_NUM_THREADS=1 in dev/drivers/scripts/stats/glwu/jevs_glwu_wave_grid2obs_stats.sh and ecf/scripts/stats/glwu/jevs_glwu_wave_grid2obs_stats.ecf. That will remove the WARNING.

malloryprow commented 3 weeks ago

jevs_glwu_wave_grid2obs_stats.sh

Log File: /lfs/h2/emc/vpppg/noscrub/mallory.row/verification/EVS_PRs/pr544/EVS/dev/drivers/scripts/stats/glwu/jevs_glwu_wave_grid2obs_stats.o188906575 DATA: /lfs/h2/emc/stmp/mallory.row/evs_test/prod/tmp/jevs_glwu_wave_grid2obs_stats.188906575.dbqs01 COMOUT: /lfs/h2/emc/vpppg/noscrub/mallory.row/verification/EVS_PRs/pr544/evs/v2.0/stats/glwu

I moved the COMOUT directories from the last run to try1.*

SamiraArdani-NOAA commented 3 weeks ago

@malloryprow, ✔️ No WARNING was observed in .o file. COMOUT for individual Point-Stat was generated. It looks like for VDATE=20240909 there is only matched pair for WSPD wave field and not for WVHT or APD. Would be good to run one more case for VDATE=20240908 to see the Point-Stats results for WVHT. Thanks!

malloryprow commented 3 weeks ago

I can do that. I was point COMIN to /lfs/h2/emc/vpppg/noscrub/mallory.row/verification/EVS_PRs/pr544/evs/v2.0 and linking previous days directories from emc.vpppg. Do you have a directory I can point COMIN to or is what I am doing okay?

SamiraArdani-NOAA commented 3 weeks ago

@malloryprow, Yes. For INITDATE=20240908, I have this: /lfs/h2/emc/vpppg/noscrub/samira.ardani/evs/v2.0/prep/glwu/wave.20240908. Just wanted to point out since the directory structure for COMOUT has changed in this PR, we cannot use emc.vpppg prep for this test.

malloryprow commented 3 weeks ago

jevs_glwu_wave_grid2obs_stats.sh with VDATE=20240908

Log File: /lfs/h2/emc/vpppg/noscrub/mallory.row/verification/EVS_PRs/pr544/EVS/dev/drivers/scripts/stats/glwu/jevs_glwu_wave_grid2obs_stats.o188911565 DATA: /lfs/h2/emc/stmp/mallory.row/evs_test/prod/tmp/jevs_glwu_wave_grid2obs_stats.188911565.dbqs01 COMOUT: /lfs/h2/emc/vpppg/noscrub/mallory.row/verification/EVS_PRs/pr544/evs/v2.0/stats/glwu

SamiraArdani-NOAA commented 3 weeks ago

@malloryprow, Thanks! I see the .stats for VDATE=20240908 has the WVHT wave field and the results look as expected.

malloryprow commented 3 weeks ago

Great! I know you said the final stat file creation will be in another PR, but is there a reason it is not in this one?

SamiraArdani-NOAA commented 3 weeks ago

@malloryprow, I still need to work on that. I need to review the config file for StatAnalysis because it generates the empty file right now.

malloryprow commented 3 weeks ago

Okay! I saw something in the log that may be the cause. I see the stat_analysis is looking for OBTYPE = GLWU

DEBUG 2: Processing Job 1: -job filter -model GLWU -obtype GLWU -line_type CTC -line_type CTS -line_type CNT -line_type SL1L2 -line_type SAL1L2 -dump_row /lfs/h2/emc/stmp/mallory.row/evs_test/prod/tmp/jevs_glwu_wave_grid2obs_stats.188911565.dbqs01/stats/evs.stats.glwu.wave.grid2obs.v20240908.stat

In your StatAnalysis config file if you add STAT_ANALYSIS_MET_CONFIG_OVERRIDES = obtype = []; that should fix it. This setting will include all OBTYPEs in the final stat file. Do you want to test this? I think it be good to get a complete stats process in this PR.

SamiraArdani-NOAA commented 3 weeks ago

@malloryprow, Thanks! Let me test this.

SamiraArdani-NOAA commented 3 weeks ago

@malloryprow, I used your suggestion and it was fixed. Thanks!

malloryprow commented 3 weeks ago

🎉 Great! Would you like me to re-run for VDATE=20240908 again?

SamiraArdani-NOAA commented 3 weeks ago

@malloryprow, Yes, please.

malloryprow commented 3 weeks ago

jevs_glwu_wave_grid2obs_stats.sh with VDATE=20240908

Log File: /lfs/h2/emc/vpppg/noscrub/mallory.row/verification/EVS_PRs/pr544/EVS/dev/drivers/scripts/stats/glwu/jevs_glwu_wave_grid2obs_stats.o189011624 DATA: /lfs/h2/emc/stmp/mallory.row/evs_test/prod/tmp/jevs_glwu_wave_grid2obs_stats.189011624.dbqs01 COMOUT: /lfs/h2/emc/vpppg/noscrub/mallory.row/verification/EVS_PRs/pr544/evs/v2.0/stats/glwu

SamiraArdani-NOAA commented 3 weeks ago

@malloryprow, No ERROR or WARNING was found in the .o file. The output files for both point_stat and aggregated stat look good.

malloryprow commented 3 weeks ago

Great!! Last thing for me, could ecf/defs/evs-nco.def be updated to include information on when the stats job should run? Like you did for prep? It should include a time requirement and that the prep job is completed. Like how there is for rtofs.

      family rtofs
        task jevs_rtofs_ndbc_stats
          trigger :TIME >= 2200 and ../../../../06/evs/prep/rtofs == complete
malloryprow commented 3 weeks ago

Thanks for the PR, Samira! Don't forget to check any items off the Fixes and Additions document!

malloryprow commented 3 weeks ago

BTW, just updated para. Tomorrow at 1500Z the glwu stats job. Just missed getting it in place for it to run today!

SamiraArdani-NOAA commented 3 weeks ago

@malloryprow, Thanks a lot for testing this PR. This is great that we will have stats files for EVS-GLWU for some weeks (or maybe months) before the buoys are taken out of the water.