I am having issues with adding a new 3D diagnostic, Atm(n)%new_var, for output. I registered the variable in atmos_cubed_sphere/tools/fv_diagnostics.F90 using register_diag_field as follows (where "id_new" and "new_variable" are just generic names for that new diagnostic):
1. Within the fv_diag_init subroutine:
idiag%id_new = register_diag_field("dynamics", 'new_variable', axes(1:3), Time, 'new variable', 'K', missing_value=missing_value)
2. Within the subroutine fv_diag, I added:
if (idiag%id_new > 0) used=send_data(idiag%id_new, Atm(n)%new_var(isc:iec,jsc:jec,:), Time)
3. I also declared the new integer variable "id_new" in fv_arrays.F90.
4. I added the appropriate line to output this new diagnostic in the diag_table file.
I'm getting an error message that says it's still not properly registered:
"WARNING from PE 0: diag_util_mod::opening_file: module/field_name (dynamics/new_variable) NOT registered"
Am I doing this correctly? Am I missing something here? Thanks in advance for any pointers!
- 101 views