Added routines for Preprocessing forcing on WCOSS2 t forecast peri… - #64
Added routines for Preprocessing forcing on WCOSS2 t forecast peri…#64kestonsmith-noaa wants to merge 37 commits into
Conversation
…ods), interpolating fields to RWPS mesh, interpolating to common time frame, and blending forcing in bayesian manner
…eight and distance files to cl inputs of ComputeGriddedToRWPSInterpWeights.py
…RWPS into AddPreProcessRoutines
…XXX.sh and GetXXX.sh. Moved working program to ush/PreProcess
JessicaMeixner-NOAA
left a comment
There was a problem hiding this comment.
Not sure where you are in the process of things but wanted to make comments on some things I saw and noticed.
| @@ -0,0 +1,102 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
jobs names should follow the JRWPS_JOBNAME where JOBNAME is something specific.
Also, would we create interpolation weights each forecast cycle? If not, this should move to dev/jobs/ and then the name is not as important.
There was a problem hiding this comment.
@kestonsmith-noaa - This will need to be addressed. Also I believe this should be moved to dev/
| set -x | ||
|
|
||
| ww3switch=model/bin/switch_NCEP_rwps | ||
| ww3switch=model/bin/switch_NWS_rwps |
There was a problem hiding this comment.
I want to say this change was made in another PR, perhaps your branch needs to have the develop merged into it?
There was a problem hiding this comment.
@kestonsmith-noaa - Your branch needs the develop branch merged into it still.
| @@ -0,0 +1,97 @@ | |||
| #!/bin/sh | |||
There was a problem hiding this comment.
Job cards do not belong in ush.
| @@ -0,0 +1,80 @@ | |||
| #!/bin/sh | |||
There was a problem hiding this comment.
job cards do not belong in ush
| @@ -0,0 +1,11 @@ | |||
| date=20260803 | |||
There was a problem hiding this comment.
Make sure this file has an extension (.sh, .py, etc).
| date=20260803 | ||
| cycl=00 | ||
| rootdir=$(pwd) | ||
| mesh="$rootdir/../../fix/rwps.oc_1500m_30km.msh" |
There was a problem hiding this comment.
the fix file directory would be ${FIXrwps}
So mesh would be:
mesh="${FIXrwps}/rwps.oc_1500m_30km.msh"
Also, you can use the path ${FIXrwps} within other scripts.
Also I think with the reorg of the fix, there's another folder inbetween fix and the mesh file?
| cycl=00 | ||
| rootdir=$(pwd) | ||
| mesh="$rootdir/../../fix/rwps.oc_1500m_30km.msh" | ||
| fix="$rootdir/../../fix" |
There was a problem hiding this comment.
use FIXrwps instead of fix see: https://nws-hpc-standards.readthedocs.io/en/stable/standards.html#a-standard-environment-variables
| rootdir=$(pwd) | ||
| mesh="$rootdir/../../fix/rwps.oc_1500m_30km.msh" | ||
| fix="$rootdir/../../fix" | ||
| prep="$rootdir/../../PrepInputs" |
There was a problem hiding this comment.
Curious about this folder because it seems like it would be ${HOMErwps}/PrepInputs with HOMErwps being your clone and the same level as fix, and I'm not sure that we should have a "PrepInputs" there.
| @@ -0,0 +1,11 @@ | |||
| date=20260803 | |||
| cycl=00 | |||
| rootdir=$(pwd) | |||
There was a problem hiding this comment.
Is this supposed to be ${HOMErwps}? Ie where your git clone is?
| import math | ||
| flin=sys.argv[1] | ||
| flout=sys.argv[2] | ||
| #fld="wdir10m.nc" |
There was a problem hiding this comment.
remove commented out code.
|
will do |
…). fixed paths for some variables and simplified envvar names
| @@ -0,0 +1,102 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
@kestonsmith-noaa - Will interpolation weights be calculated for every cycle or just once and stored as fix files?
If for every cycle, then let's move this to a jrwps_*.ecf file.
If not, then let's move this to dev/ecf.
| #cycl=00 | ||
| #mesh=../../fix/rwps.oc_1500m_30km.msh | ||
|
|
||
| source /lfs/h2/emc/couple/noscrub/keston.smith/TestRWPS/RWPS/ush/PreProcess/rwpsenv |
There was a problem hiding this comment.
The stuff below this line, particularly the sh .sh files should be all contained in jobs/JRWPS_prep_currents.job
|
FYI - All scripts and ush files need to be all lowercase names: https://nws-hpc-standards.readthedocs.io/en/stable/standards.html#c-interpreted-code-bash-ksh-perl-or-python-scripts |
|
|
||
| rm $prep/FetchCurrents.out $prep/ProcCurrents.out | ||
|
|
||
| sh GetCurrents.sh $prep > $tmp/FetchCurrents.out |
There was a problem hiding this comment.
ecf scripts should call a JJOB
| set -x | ||
|
|
||
| ww3switch=model/bin/switch_NCEP_rwps | ||
| ww3switch=model/bin/switch_NWS_rwps |
There was a problem hiding this comment.
@kestonsmith-noaa - Your branch needs the develop branch merged into it still.
…preprocessing on wcoss2. Added scripts to dev for computing interpolation weights
…les for preparing forcing and generating interpolation weights.
|
Pre-processing routines have been changed to more closely follow global workflow. Currently only set to work on wcoss2. Weights are confirmed in a mirror fix location under my noscrub directory for mesh oc_1500m_30km. Others should be added shortly and then will be copied to the group RWPS fix location when these are all prepared and tested. |
…outside of rtofs coverage. occurs only for coarse test meshes. cleaned up weight generation ecf file for clarity
|
|
||
|
|
||
| # copy mesh to local fix directory | ||
| cp -p $RWPSfix/fix/$meshname/20260722/rwps.$meshname.msh ../fix/ |
There was a problem hiding this comment.
meshname or RWPSfix are not defined.
I believe this is actually done in link_workflow.sh -
I have not removed get_externals.sh but we should move things to link_workflow.sh if possible.
…s now done in dev/compute_interpolation_weights
|
|
||
| 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()' |
There was a problem hiding this comment.
Is it a verification time or valid time?
There was a problem hiding this comment.
- This is unnecessarily specific. I am going to copy time attributes from the input file rather than explicitly re-specifying. Will update shortly
|
|
||
| rm $tmp/FetchCurrent.out $tmp/ProcCurrent.out | ||
|
|
||
| sh get_current.sh > $tmp/FetchCurrent.out |
There was a problem hiding this comment.
Each ecf script should be calling a JJOB, so for example, at this point of the script, I would expect:
${HOMErwps}/jobs/JRWPS_PREP_CURRENT
Then the
${HOMErwps}/jobs/JRWPS_PREP_CURRENT
would call a script:
${SCRrwps}/exrwps_prep_current.sh , which is either what process_current.sh should be renamed to, or then it would be calling the ush/process_current script.
|
|
||
| module list | ||
|
|
||
| rm $tmp/FetchIce.out $tmp/ProcIce.out |
There was a problem hiding this comment.
All the comments from the above ecf script are valid here.
|
|
||
|
|
||
| # Consolidate u,v surface currents from global RTOFS into a single NetCDF file. | ||
|
|
There was a problem hiding this comment.
Can you add a comment about what the two sys argument inputs are?
Added description of command line arguments
Co-authored-by: Jessica Meixner <jessica.meixner@noaa.gov>
remove unnecessary specific piped output files Co-authored-by: Jessica Meixner <jessica.meixner@noaa.gov>
…bm.py. seperated prep tasks from ecf to ecf(load modules) and jobs/JRWPS_PREP_ to execute task
| @@ -0,0 +1,64 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
Is this file supposed to be here?
There was a problem hiding this comment.
removed unused file
| @@ -0,0 +1,29 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
This is not an ush script, should this move somewhere else?
There was a problem hiding this comment.
removed unused file
| !/bin/bash | ||
| # --------------------------------------------------------------------------- # | ||
| # # | ||
| # Copy external fix files that are too large to store in repository # |
There was a problem hiding this comment.
I think this description needs updated//removed along with the "last changed" date.
There was a problem hiding this comment.
changed- I will go through the rest to make sure there aren't other bad headers
…process 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
fixed typo's in README
|
|
||
| cd RWPS/dev/compute_interpolation_weights/sorc | ||
|
|
||
| dev/compute_interpolation_weights/sorc/compute_interpolation_weights.sh |
There was a problem hiding this comment.
Where does the ecf script play in this?
If I wanted to run this would I try to run
qsub compute_interpolation_weights.ecf
are there things I should change or update when I do?
There was a problem hiding this comment.
clarified in README
$ cd RWPS/dev/compute_interpolation_weights/sorc
$ sh compute_interpolation_weights.sh oc_1500m_30km
...
…ights.sh to dev/compute_interpolation_weights/ush/
…. Quieted mkdir statements where missing in preprocessing routines
|
|
||
| #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" |
There was a problem hiding this comment.
Remove variables that are not used or needed.
Added routines for pre-processing forcing [wind water level currents ice], on WCOSS2 (for recent forecast periods). These routines
(A) retrieve the necessary forecast files
(B) interpolate fields to an RWPS mesh
(C) interpolate disparate forecasts to a common time frame
(D) Combine disparate forecasts in a bayesian manner.
Note: I will mark this as draft while we discuss code organization