MOM6
|
Down sample a field.
Definition at line 75 of file MOM_diag_mediator.F90.
Private functions | |
subroutine | downsample_field_2d (field_in, field_out, dl, method, mask, diag_cs, diag, isv_o, jsv_o, isv_d, iev_d, jsv_d, jev_d) |
This subroutine allocates and computes a down sampled 2d array given an input array The down sample method is based on the "cell_methods" for the diagnostics as explained in the above table. More... | |
subroutine | downsample_field_3d (field_in, field_out, dl, method, mask, diag_cs, diag, isv_o, jsv_o, isv_d, iev_d, jsv_d, jev_d) |
This subroutine allocates and computes a down sampled 3d array given an input array The down sample method is based on the "cell_methods" for the diagnostics as explained in the above table. More... | |
|
private |
This subroutine allocates and computes a down sampled 2d array given an input array The down sample method is based on the "cell_methods" for the diagnostics as explained in the above table.
field_in | Original field to be down sampled | |
field_out | Down sampled field | |
[in] | dl | Level of down sampling |
[in] | method | Sampling method |
mask | Mask for field | |
[in] | diag_cs | Structure used to regulate diagnostic output |
[in] | diag | A structure describing the diagnostic to post |
[in] | isv_o | Original i-start index |
[in] | jsv_o | Original j-start index |
[in] | isv_d | i-start index of down sampled data |
[in] | iev_d | i-end index of down sampled data |
[in] | jsv_d | j-start index of down sampled data |
[in] | jev_d | j-end index of down sampled data |
Definition at line 4005 of file MOM_diag_mediator.F90.
|
private |
This subroutine allocates and computes a down sampled 3d array given an input array The down sample method is based on the "cell_methods" for the diagnostics as explained in the above table.
The down sample method could be deduced (before send_data call) from the diagx_cell_method, diagy_cell_method and diagv_cell_method
This is the summary of the down sample algoritm for a diagnostic field f:
\[ f(Id,Jd) = \sum_{i,j} f(Id+i,Jd+j) * weight(Id+i,Jd+j) / [ \sum_{i,j} weight(Id+i,Jd+j)] \]
Here, i and j run from 0 to dl-1 (dl being the down sample level). Id,Jd are the down sampled (coarse grid) indices run over the coarsened compute grid, if and jf are the original (fine grid) indices.
Example x_cell y_cell v_cell algorithm_id implemented weight(if,jf) --------------------------------------------------------------------------------------- theta mean mean mean MMM =222 G%areaT(if,jf)*h(if,jf) u point mean mean PMM =022 dyCu(if,jf)*h(if,jf)*delta(if,Id) v mean point mean MPM =202 dxCv(if,jf)*h(if,jf)*delta(jf,Jd) ? point sum mean PSM =012 h(if,jf)*delta(if,Id) volcello sum sum sum SSS =111 1 T_dfxy_co sum sum point SSP =110 1 umo point sum sum PSS =011 1*delta(if,Id) vmo sum point sum SPS =101 1*delta(jf,Jd) umo_2d point sum point PSP =010 1*delta(if,Id) vmo_2d sum point point SPP =100 1*delta(jf,Jd) ? point mean point PMP =020 dyCu(if,jf)*delta(if,Id) ? mean point point MPP =200 dxCv(if,jf)*delta(jf,Jd) w mean mean point MMP =220 G%areaT(if,jf) h*theta mean mean sum MMS =221 G%areaT(if,jf) delta is the Kronecker delta
field_in | Original field to be down sampled | |
field_out | down sampled field | |
[in] | dl | Level of down sampling |
[in] | method | Sampling method |
mask | Mask for field | |
[in] | diag_cs | Structure used to regulate diagnostic output |
[in] | diag | A structure describing the diagnostic to post |
[in] | isv_o | Original i-start index |
[in] | jsv_o | Original j-start index |
[in] | isv_d | i-start index of down sampled data |
[in] | iev_d | i-end index of down sampled data |
[in] | jsv_d | j-start index of down sampled data |
[in] | jev_d | j-end index of down sampled data |
Definition at line 3849 of file MOM_diag_mediator.F90.