-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make --closedcontourcmd resolution specific #824
Conversation
GenerateVolumetricMesh --in ${result_dir}outCSne$res.g --out ${result_dir}outCSne$res.g --np 2 --uniform | ||
# For v2 and v3 production simulation with pg2 grids: | ||
GenerateCSMesh --res $res --alt --file ${result_dir}outCSMeshne$res.g | ||
GenerateVolumetricMesh --in ${result_dir}outCSMeshne$res.g --out ${result_dir}outCSne$res.g --np 2 --uniform |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--in
and --out
file names were the same before, which I suspect caused the intermittent issue when mesh file can't be written on cfs
.
DetectNodes --verbosity 0 --in_connect ${result_dir}connect_CSne${res}_v2.dat --closedcontourcmd "PSL,300.0,4.0,0;_AVG(T200,T500),-0.6,4,0.30" --mergedist 6.0 --searchbymin PSL --outputcmd "PSL,min,0;_VECMAG(UBOT,VBOT),max,2" --timestride 1 --in_data_list ${result_dir}inputfile_${file_name}.txt --out ${result_dir}out.dat | ||
|
||
# --closedcontourcmd threshold is resolution depended. | ||
if [ $res == 120 ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines onward set DetectNodes
command line resolution depended with the last parameter in --closedcontourcmd
HistogramNodes --in ${result_dir}cyclones_stitch_${file_name}.dat --iloncol 2 --ilatcol 3 --out ${result_dir}cyclones_hist_${file_name}.nc | ||
|
||
# Calculate relative vorticity | ||
sed -i 's/.nc/_vorticity.nc/' ${result_dir}outputfile_${file_name}.txt | ||
#/global/homes/p/paullric/tempestextremes/bin/VariableProcessor --in_data_list ${result_dir}inputfile_${file_name}.txt --out_data_list ${result_dir}outputfile_${file_name}.txt --var "_CURL{4,0.5}(U850,V850)" --varout "VORT" --in_connect ${result_dir}connect_CSne${res}_v2.dat | ||
sed -i 's/\.nc/_vorticity.nc/' ${result_dir}outputfile_${file_name}.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update sed
command line to recognize special character .
, this bug was discovered when nc
is included in the case name in addition as the format name at the end.
@forsyth2 Just a heads-up that I updated the pre-processing script for TC detection, so that the detection is model resolution specific. Also the bug that the mesh generation file can't be written to |
@chengzhuzhang How would you like me to review this PR?
|
Visual inspection would be nice. Mostly, it is a heads-up that we should propagate this change to zppy, and hopefully can resolve some recent issues with the tc_analysis in zppy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good from visual inspection thanks. I'll make/test the corresponding changes in zppy
too (which might even help with E3SM-Project/zppy#180 & E3SM-Project/zppy#622)
# Warning: because somehow tempest-remap only can writes grid file on SCRATCH space. The resulted files will be moved to another path at the end. | ||
result_dir_fin=/global/cfs/cdirs/e3sm/e3sm_diags/postprocessed_e3sm_v2_data_for_e3sm_diags/${caseid}/ | ||
mkdir -p $result_dir_fin | ||
result_dir=$SCRATCH/tests/tc-analysis/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With Perlmutter, we don't need to use $SCRATCH
anymore? For zppy
, we were using it for all machines:
# Warning: tempest-remap can only write grid file on SCRATCH space.
# The result files will be moved to another path at the end.
result_dir_fin={{ output }}/post/atm # Directory will be {{ output }}/post/atm/tc-analysis_${Y1}_${Y2}
mkdir -p $result_dir_fin
y1={{ year1 }}
y2={{ year2 }}
Y1="{{ '%04d' % (year1) }}"
Y2="{{ '%04d' % (year2) }}"
result_dir={{ scratch }}/tc-analysis_${Y1}_${Y2}/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I believe we don't need to use scratch any more, with fixing over-writing mesh file. At least, my tests worked okay.
Thanks! @forsyth2 |
Description
TC detection threshold should be model data resolution depended, currently the pre-processing script is using a threshold for ne120, resulted small number of detected TC events in ne30 simulations. Now update to add resolution specific thresholds.
Note: this fix should bring into cdat migration branch, and zppy implementation.
The original closed contour criteria (--closedcontourcmd "PSL,300.0,4.0,0;_AVG(T200,T500),-0.6,4,0.30"):
requiring an increase in PSL of at least 300 Pa (3 hPa) within 4 Degree of the candidate node,
and a decrease in 200 and 500 hPa average air temperature of 0.6 K within 4 Degree of the node within 0.3 degree of the candidate with maximum air temperature.
Checklist
If applicable: