-
Notifications
You must be signed in to change notification settings - Fork 210
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
Adding a wind gustiness parameterization #1105
Comments
The key issue that I am concerned about is that cesm never use the
gustiness parameterization - not that its values happen to be 0 by default.
…On Sat, Feb 4, 2017 at 2:48 PM, Robert Jacob ***@***.***> wrote:
The merge of PR #1065 <#1065> proposed
to introduce a gustiness parameterization. This issue discusses how its
currently done and how best to do it.
In seq_flux_init_mct: allocate prec_gust and set it to 0.
In
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1105>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHlxEw2RytucuK1ZqxAwLLkJv3pO8CQ3ks5rZPIXgaJpZM4L3S97>
.
|
I feel that since this is a new parameterization that ACME has introduced into share science code that also happens to be a key to CESM coupling, there should be an if-block that ensures that CESM does not use it. The way to do this is to pass cime_model to shr_flux_mct.F90 and have the following type of if-block
|
Since this is a new issue, I will reiterate my concern with the proposed solution and my suggestion: Every other science option is bracketed by logic, I do not see why this one is different. If folks do not like having model names (e.g., cesm & acme), then come up with a namelist parameter which indicates the scientific reason for the change and use that. For instance, following usage in physics packages, introduce an XML variable, This makes the science choices explicit, just like other parameterization choices in the models. |
There already is logic to turn this off; if gust_fac is 0, its off. gust_fac=0 will make the ugust function evaluate to 0. So it functions as both a DO_GUSTNISS logical and a value in the parameterization. |
@rljacob, why are you insisting on changing how parameterizations have always been introduced? To take just one example, in the atmosphere physics package, the CLUBB SGS parameterization is bracketed by |
If you're choosing between two large blocks of code or calling a different subroutine, then yes something like if(do_gustiness) would be appropriate. But this is just one term in one line so gust_fac=0 or not is the more elegant and better solution. We can clarify with some inline documentation and the documentation for gust_fac. |
Elegance is in the eye of the beholder and is not a software-engineering principle. |
Here is another summary of my understanding: ugust in shr_flux_atmOcn is the following function:
By default gust_fac is hug(1._r8) - int value in shr_infodata_mod.F90). However, it is zero by default in the namelist input for ugust_fac. The issue I am concerned about is whether CESM can accept a non-default value that a user could set other than zero in a CESM release. |
I agree setting the initial value to HUGE(1.0) can be removed. That seems like an overly cautious way to make sure the namelist setting is taking effect. |
"flux_dirunal" is different because that logical controls if a completely different subroutine is called, one that has dozens of lines different from the non-diurnal version. This is one term in one line of code. |
Go ahead and merge it as-is. @mvertens will then do a PR with an implementation for CESM. |
It would help if just the following two minor changes were made to this PR.
This would ensure that gust_fac is always being initialized as zero.
I think that for the purposes of this PR all that needs to be done is:
1) Change line 486 of seq_infodata_mod.F90
gust_fac = huge(1.0_SHR_KIND_R8) <==== current
gust_fac = 0._r8 <==== new
at line 486 of seq_infodata_mod.F90.
2) Change line 910 of seq_flux_mct.F90:
real(r8) :: gust_fac = huge(1.0_r8) !wind gust factor <====
current
real(r8) :: gust_fac <==== new
since you are obtaining gust_fac from seq_infodata in line 910 of
seq_flux_mct.F90.
call seq_infodata_GetData(infodata, &
read_restart=read_restart, &
dead_comps=dead_comps, &
atm_nx=atm_nx, atm_ny=atm_ny, &
ocn_nx=ocn_nx, ocn_ny=ocn_ny, &
ocn_prognostic=ocn_prognostic, &
flux_diurnal=flux_diurnal, &
gust_fac = gust_fac )
Moving forwards, we will be getting input from CESM scientists as to how
they want to see this science change implemented to satisfy CESM
requirements. However, that can be put into a upcoming PR.
…On Mon, Feb 6, 2017 at 11:50 AM, Robert Jacob ***@***.***> wrote:
Go ahead and merge it as-is. @mvertens <https://github.com/mvertens> will
then do a PR with an implementation for CESM.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1105 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AHlxE1vnZ0CG6V_jGBtamohPsMh1g56Vks5rZ2t_gaJpZM4L3S97>
.
|
Sure I'll make those changes. |
Sorry, just saw this conversation. Implementation is not complete yet as currently I don't know a way to turn this on based on a particular compset. Originally, I wanted to turn this on (gust_fac>0) only for a new compset but at that time, I couldn't quite figure out how to do it. I think I talked with @rljacob at that time but I don't remember if we were able to find a solution. This was my first time to make changes in the coupler codes and it sounds like I might have broken some existing rules. I will try to answer based on how I understand it works.
Rest of the code is just to read gust_fac from the namelist and pass it along so that it can be used in shr_flux_atmOcn. I can re-organize the code if it doesn't fit the current way of adding code to the coupler. After implementing this code, I ran tests to make sure the code stays BFB with the old code. |
@mvertens what do you about not initializing gust_fac at all in the declaration? As @singhbalwinder said, that gives it an implied "save" attribute. |
@jacob - given all of these questions - lets just proceed with this PR as
and clarify the best approach in a following PR.
…On Mon, Feb 6, 2017 at 1:38 PM, Robert Jacob ***@***.***> wrote:
@mvertens <https://github.com/mvertens> what do you about not
initializing gust_fac at all in the declaration? As @singhbalwinder
<https://github.com/singhbalwinder> said, that gives it an implied "save"
attribute.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1105 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AHlxE8wnU7AG0IT1yBDzujoaFldvxR42ks5rZ4TMgaJpZM4L3S97>
.
|
Merge the maint-cime5.1 branch along with ACME's changes to 5.1 XML changes: ACME compset additions, ACME PEs changes, ACME grids ACME build system updates (Depends files, Makefiles) ACME config changes (batch, compilers, machines) Minor modifications to config_component to split out entry ids that are not the same between ACME and CESM Lots of additions to config_component_acme CPL/DRV changes: Addition of gust_fac into driver Addition of cron_script, cron equivalent of jenkins_script Python changes: Remove obsolete ACME env_mach_specific files If model is ACME, auto-add compiler to baseline name (impacts create_test, bless_test_results, and compare_test_results) Fix HOMME test, Updates to ACME performance archiving Raise exception if batch job-id fails to match pattern Bug fix for point calculation in pes.py Changes to build.py because clm is not a shared lib in ACME ACME now supports recommended test timings based on test-suite Test suite: scripts_regression_tests.py Test baseline: none Test namelist changes: Test status: bit for bit Closes #1105 Fixes #834 User interface changes?: See above Code review: Mariana Vertenstein, Jim Edwards, Steve Goldhaber, Rob Jacob Conflicts: cime_config/acme/machines/config_compilers.xml - took ACME version and made modes to add -DCPR cime_config/acme/machines/config_machines.xml - took branch version driver_cpl/shr/seq_infodata_mod.F90 - took ESMCI version and re-added declarations for gust_fac
Merge the maint-cime5.1 branch along with ACME's changes to 5.1 XML changes: ACME compset additions, ACME PEs changes ACME grids ACME build system updates (Depends files, Makefiles) ACME config changes (batch, compilers, machines) Minor modifications to config_component to split out entry ids that are not the same between ACME and CESM Lots of additions to config_component_acme CPL/DRV changes: Addition of gust_fac into driver Addition of cron_script, cron equivalent of jenkins_script Python changes: Remove obsolete ACME env_mach_specific files If model is ACME, auto-add compiler to baseline name (impacts create_test, bless_test_results, and compare_test_results) Fix HOMME test, Updates to ACME performance archiving Raise exception if batch job-id fails to match pattern Bug fix for point calculation in pes.py Changes to build.py because clm is not a shared lib in ACME ACME now supports recommended test timings based on test-suite Test suite: scripts_regression_tests.py Test baseline: none Test namelist changes: Test status: bit for bit Closes #1105 Fixes #834 User interface changes?: See above Code review: Mariana Vertenstein, Jim Edwards, Steve Goldhaber, Rob Jacob Conflicts: cime_config/acme/machines/config_compilers.xml - took ACME version cime_config/acme/machines/config_machines.xml - took branch version driver_cpl/shr/seq_infodata_mod.F90 - took ESMCI version with gust_fac added back
Bring in new versions of MPAS framework and components. This PR will bring in new versions of the MPAS framework and all three MPAS components. This PR fulfills the following Pull Requests: * Enable threaded ocean and ice tests (1038) * Ensures MPAS AM write/compute startup steps are performed (1191) * Open streams to redirect per-process stream output to /dev/null (ACME/MPAS 5) * Fix slow compilation of threaded MPAS-CICE on Mira (ACME/MPAS 6) * Fix slow compilation of threaded MPAS-O on Mira (ACME/MPAS 7) This PR fixes the following issues: * Restore threading tests for MPAS when threading working (828) * PET_Ln9.T62_oEC60to30.CMPASO-NYF Fails without baseline comparisons (1088) * write to stderr in MPAS framework file generating redundant output (1105) * option to build mpas-o without checking that using the correct cvmix (1111) * issues with MPAS components writing from all ranks (1133) * water cycle benchmark not deterministic when using threading in MPAS-O (1137) * Build issue in mpas-o with Intel v17 on cori (1176) Fixes #828, Fixes #1088, Fixes #1105, Fixes #1111, Fixes #1133, Fixes #1137, Fixes #1176 [BFB] [NML]
The merge of PR #1065 proposed to introduce a gustiness parameterization. This issue discusses how its currently done and how best to do it.
In module seq_flux_mct:
In seq_flux_init_mct: allocate prec_gust and set it to 0.
In seq_flux_atmocnexch_mct: define gust_fac, set it to HUGE(1.0) and then overwrite with seq_infodata_GetData. pass prec_gust and gust_fac to shr_flux_atmocn;
In seq_flux_atmocn_mct: set prec_gust to a2x%rAttr(index_a2x_Faxa_rainc,n); define gust_fac, set it to HUGE(1.0) and then overwrite with seq_infodata_GetData (from drv_in). pass prec_gust and gust_fac to shr_flux_atmocn
In module seq_infodata_mod
Add gust_fac to seq_infodata_type
In seq_infodata_Init, declare gust_fac and add to /seq_infodata_inparm/ namelist block. Set initial value to huge(1.0_SHR_KIND_R8), read value from seq_infodata_inparm namelist; copy value to infodata%gust_fac,
In seq_infodata_GetData_explicit: If present, gust_fac = infodata%gust_fac
In seq_infodata_PutData_explicit: if present, infodata%gust_fac = gust_fac
In seq_infodata_bcast: broadcast infodata%gust_fac
In seq_infodata_print: print out gust_fac value.
In module shr_flux_mod
In shr_flux_atmOcn: Add gust_fac and prec_gust to arguments.
Define new function:
ugust(gprec) = gust_faclog(1._R8+57801.6_R8gprec-3.55332096e7_R8*(gprec**2.0_R8))
Alter vmag calculation to include gustiness:
vmag = max(umin, sqrt( (ubot(n)-us(n))**2 + (vbot(n)-vs(n))**2) + ugust(min(prec_gust(n),6.94444e-4_R8)))
The text was updated successfully, but these errors were encountered: