-
Notifications
You must be signed in to change notification settings - Fork 2
Adding mre terms #242
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 mre terms #242
Changes from all commits
3bd70cd
735f304
fb3e462
d75fb21
9e5b40a
ed29f9e
05650ce
9e6b8b0
6193d11
442c9fe
53d1fe0
461253e
120ea66
1e46f43
4f9ca23
782dd6b
db18f63
c55977f
f0090e1
c98d017
1265199
9f2a524
325f04b
47385ea
7689bb3
eb31534
341bbe0
793c74f
aa5f53b
a5549d0
91cfd0e
177924e
c929bad
72b0a0c
0ce6b6f
5e92fa7
68120fd
d51e7c6
571f2b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -57,16 +57,15 @@ SUBROUTINE rdcon_netcdf_out(wp,wv,wt,wt0,ep,ev,et) | |||||||||||||||||||
|
|
||||||||||||||||||||
| INTEGER :: i, ncid, | ||||||||||||||||||||
| $ i_dim, m_dim, mo_dim, p_dim, i_id, m_id, mo_id, p_id, | ||||||||||||||||||||
| $ f_id, q_id, dv_id, mu_id, di_id, dr_id, ca_id, | ||||||||||||||||||||
| $ f_id, q_id, dv_id, mu_id, di_id, dr_id, h_id, ca_id, | ||||||||||||||||||||
| $ wp_id, wpv_id, wv_id, wvv_id, wt_id, wtv_id, wt0_id, | ||||||||||||||||||||
| $ l_dim, l_id, coil_dim, coil_id, dpc_id, dc_id, | ||||||||||||||||||||
| $ lp_dim, lp_id, r_dim, r_id, rp_dim, rp_id, pr_id, qr_id, | ||||||||||||||||||||
| $ dp_id, ap_id, bp_id, gp_id, dpp_id, lrc_dim, lrc_id | ||||||||||||||||||||
| INTEGER :: hbs_id, ta_id, tr_id, ftr_id, muf_id, jbs_id, dnc_id, | ||||||||||||||||||||
| INTEGER :: hbs_id, ta_id, tr_id, ftr_id, muf_id, dnc_id, | ||||||||||||||||||||
| $ wc_id, jp_id, b_id, bt_id, bpo_id, mir_id, mar_id, mair_id, | ||||||||||||||||||||
| $ obr_id, ars_id, a1_id, a2_id, a3_id, a4_id, a5_id, | ||||||||||||||||||||
| $ a6_id, a7_id, a14_id, a15_id, a16_id, a17_id, a18_id, a19_id | ||||||||||||||||||||
|
|
||||||||||||||||||||
| $ obr_id, ars_id, a1_id, a2_id, a3_id, a4_id, a5_id, a6_id, | ||||||||||||||||||||
| $ a7_id, a14_id, a15_id, a16_id, a17_id, a18_id, a19_id, npsi_id | ||||||||||||||||||||
| REAL(r4) :: cpusec, wallsec | ||||||||||||||||||||
| CHARACTER(2) :: sn | ||||||||||||||||||||
| CHARACTER(64) :: ncfile | ||||||||||||||||||||
|
|
@@ -129,6 +128,9 @@ SUBROUTINE rdcon_netcdf_out(wp,wv,wt,wt0,ep,ev,et) | |||||||||||||||||||
| CALL check( nf90_put_att(ncid,nf90_global,'betap3', betap3)) | ||||||||||||||||||||
| CALL check( nf90_put_att(ncid,nf90_global,'betat', betat)) | ||||||||||||||||||||
| CALL check( nf90_put_att(ncid,nf90_global,'betan', betan)) | ||||||||||||||||||||
| CALL check( nf90_put_att(ncid,nf90_global,'volume', volume)) | ||||||||||||||||||||
| CALL check( nf90_put_att(ncid,nf90_global,'Zeff', Zeff)) | ||||||||||||||||||||
| CALL check( nf90_put_att(ncid,nf90_global,'bwall', bwall)) | ||||||||||||||||||||
| CALL check( nf90_put_att(ncid,nf90_global,'bt0', bt0)) | ||||||||||||||||||||
| CALL check( nf90_put_att(ncid,nf90_global,'q0', q0)) | ||||||||||||||||||||
| CALL check( nf90_put_att(ncid,nf90_global,'qmin', qmin)) | ||||||||||||||||||||
|
|
@@ -217,10 +219,11 @@ SUBROUTINE rdcon_netcdf_out(wp,wv,wt,wt0,ep,ev,et) | |||||||||||||||||||
| $ "Safety Factor") ) | ||||||||||||||||||||
| CALL check( nf90_def_var(ncid, "di", nf90_double, p_dim, di_id) ) | ||||||||||||||||||||
| CALL check( nf90_def_var(ncid, "dr", nf90_double, p_dim, dr_id) ) | ||||||||||||||||||||
| CALL check( nf90_def_var(ncid, "h", nf90_double, p_dim, h_id) ) | ||||||||||||||||||||
| CALL check( nf90_def_var(ncid, "ca1", nf90_double, p_dim, ca_id)) | ||||||||||||||||||||
| IF(MRE_flag)THEN | ||||||||||||||||||||
| CALL check( nf90_def_var(ncid, | ||||||||||||||||||||
| $ "Hbs", nf90_double, p_dim, hbs_id)) | ||||||||||||||||||||
| $ "Hbs_prefac", nf90_double, p_dim, hbs_id)) | ||||||||||||||||||||
| CALL check( nf90_def_var(ncid, | ||||||||||||||||||||
| $ "tau_a", nf90_double, p_dim, ta_id)) | ||||||||||||||||||||
| CALL check( nf90_def_var(ncid, | ||||||||||||||||||||
|
|
@@ -230,8 +233,6 @@ SUBROUTINE rdcon_netcdf_out(wp,wv,wt,wt0,ep,ev,et) | |||||||||||||||||||
| CALL check( nf90_def_var(ncid, | ||||||||||||||||||||
| $ "mufrac", nf90_double, p_dim, muf_id)) | ||||||||||||||||||||
| CALL check( nf90_def_var(ncid, | ||||||||||||||||||||
| $ "avg_mu0Jbs_dot_B", nf90_double, p_dim, jbs_id)) | ||||||||||||||||||||
| CALL check( nf90_def_var(ncid, | ||||||||||||||||||||
| $ "Dnc", nf90_double, p_dim, dnc_id)) | ||||||||||||||||||||
| CALL check( nf90_def_var(ncid, | ||||||||||||||||||||
| $ "Wc", nf90_double, p_dim, wc_id)) | ||||||||||||||||||||
|
||||||||||||||||||||
| $ "Wc", nf90_double, p_dim, wc_id)) | |
| $ "Wc", nf90_double, p_dim, wc_id)) | |
| c | |
| c NOTE: The MRE terms layout (e.g., mreterms%fs(:,6)) still reserves | |
| c an index for the deprecated quantity avg_mu0Jbs_dot_B. That term | |
| c is intentionally no longer written to this NetCDF file, so no | |
| c nf90_def_var call appears here for it. The sequence of variables | |
| c defined below therefore skips that index by design. | |
| c |
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.
This is overly verbose. We should just remove the index from being declared and add a one-line annotation wherever mreterms%fs(:,6) is actually calculated saying it comes from [citation] but gives suspect results and is thus not output for now
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.
This copilot comment is out of date and should be ignored -> mreterms%fs(:,6) now stores avg(|nabla psi|) which is correctly calculated, and printed on lines 284, 285, and 417
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.
Global NetCDF attributes in this file consistently use lowercase names (e.g.,
betan,bwall,volume), but this adds'Zeff'with mixed case. Consider renaming the attribute tozeff(or otherwise matching the established casing) to avoid surprising downstream readers that treat attribute names as case-sensitive.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.
The capitalization is ok here. It follows standard annotations in the field