ESCOMP / ESCOMP/atmospheric_physics

Add constituent tendencies to diagnostics scheme

Open
#125 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Fortran
Stars
12
Forks
38
Avg merge
11h 16m
Merged PRs (30d)
5

Description

Once https://github.com/ESCOMP/atmospheric_physics/pull/111 has been merged, we should add all the constituent tendencies to `src/sima_diagnostics/sima_tend_diagnostics.F90` (and `.meta`)

The logic should be similar to the constituent logic in `sima_state_diagnostics.F90` (loop over the constituent properties object and add the possible fields if the constituent is present):

**init logic**
```
! Add constituent fields
const_num_found = 0
do const_idx = 1, size(const_props)
call const_props(const_idx)%standard_name(standard_name, errflg, errmsg)
do name_idx = 1, size(const_std_names)
if (trim(standard_name) == trim(const_std_names(name_idx))) then
call history_add_field(trim(const_tend_diag_names(name_idx)), trim(const_std_names(name_idx)), 'lev', 'avg', 'kg kg-1', mixing_ratio='wet')
const_num_found = const_num_found + 1
end if
end do
if (const_num_found == size(const_std_names)) then
exit
end if
end do
```
**run logic**
```
! Capture constituent fields
const_num_found = 0
do const_idx = 1, size(const_props)
call const_props(const_idx)%standard_name(standard_name, errflg, errmsg)
do name_idx = 1, size(const_std_names)
if (trim(standard_name) == trim(const_std_names(name_idx))) then
call history_out_field(trim(const_tend_diag_names(name_idx)), const_tend_array(:,:,const_idx))
const_num_found = const_num_found + 1
end if
end do
if (const_num_found == size(const_std_names)) then
exit
end if
end do
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.