|
ocnice_prep 1.14.0
|
Define utility procedures. More...
Go to the source code of this file.
Data Types | |
| interface | utils_mod::dumpnc |
| interface | utils_mod::getfield |
| interface | utils_mod::getvecpair |
| interface | utils_mod::packarrays |
| interface | utils_mod::remap |
Functions/Subroutines | |
| subroutine | utils_mod::dumpnc1d (fname, vname, dims, field) |
| Write a bare netcdf file of a unpacked 2D field. | |
| subroutine | utils_mod::dumpnc2d (fname, vname, dims, nflds, field) |
| Write a bare netcdf file of a 2D packed field. | |
| subroutine | utils_mod::dumpnc3d (fname, vname, dims, nk, nflds, field) |
| Write a bare netcdf file of a packed 3D field. | |
| subroutine | utils_mod::dumpnc3dk (fname, vname, dims, field) |
| Write a bare netcdf file of an unpacked 3D field. | |
| subroutine | utils_mod::getfield2d (fname, vname, dims, field, wgts) |
| Obtain a 2D field and return a 1-D vector array. | |
| subroutine | utils_mod::getfield3d (fname, vname, dims, field, wgts) |
| Obtain a 3D field and return a 2-D vector array. | |
| subroutine | utils_mod::getvecpair2d (fname, wdir, cosrot, sinrot, vname1, vgrid1, vname2, vgrid2, dims, vecpair) |
| Obtain 2D vector pairs mapped to Ct and rotated to EN. | |
| subroutine | utils_mod::getvecpair3d (fname, wdir, cosrot, sinrot, vname1, vgrid1, vname2, vgrid2, dims, vecpair) |
| Obtain 3D vector pairs mapped to Ct and rotated to EN. | |
| subroutine, public | utils_mod::nf90_err (ierr, string) |
| Handle netcdf errors. | |
| subroutine | utils_mod::packarrays2d (filesrc, wgtsdir, cosrot, sinrot, vars, dims, nflds, fields) |
| Pack 2D fields into arrays by mapping type. | |
| subroutine | utils_mod::packarrays3d (filesrc, wgtsdir, cosrot, sinrot, vars, dims, nflds, fields) |
| Pack 3D fields into arrays by mapping type. | |
| subroutine | utils_mod::remap1d (fname, src_field, dst_field) |
| Remap a 1-D vector array from source to destination. | |
| subroutine | utils_mod::remap2d (fname, dim2, src_field, dst_field) |
| Remap a 2-D vector array of nflds or nlevs from source to destination. | |
| subroutine | utils_mod::remap3d (fname, nk, nflds, src_field, dst_field) |
| Remap a field packed array of nk levels and nflds fields. | |
| subroutine, public | utils_mod::zero_out_land_ice (mask, fout, icnt) |
| Reset field values to zero on land. | |
| subroutine, public | utils_mod::zero_out_phantom_ice (fin, fout, icnt) |
| Ensure that when fin contains zeros for all ncat, fout will also contain zeros for all ncat. | |
Define utility procedures.
This module defines a set of utility procedures
Definition in file utils_mod.F90.
|
private |
Write a bare netcdf file of a unpacked 2D field.
| [in] | fname | the file containing ESMF regridding weights |
| [in] | vname | the name of the variable |
| [in] | dims | the variable spatial dimensions |
| [in] | field | the field to write |
Definition at line 674 of file utils_mod.F90.
|
private |
Write a bare netcdf file of a 2D packed field.
| [in] | fname | the file containing ESMF regridding weights |
| [in] | vname | the name of the variable |
| [in] | dims | the variable spatial dimensions |
| [in] | nflds | the number of fields |
| [in] | field | the field to write |
Definition at line 546 of file utils_mod.F90.
|
private |
Write a bare netcdf file of a packed 3D field.
| [in] | fname | the file containing ESMF regridding weights |
| [in] | vname | the name of the variable |
| [in] | dims | the variable spatial dimensions |
| [in] | nk | the number of levels |
| [in] | nflds | the number of fields |
| [in] | field | the field to write |
Definition at line 589 of file utils_mod.F90.
|
private |
Write a bare netcdf file of an unpacked 3D field.
| [in] | fname | the file containing ESMF regridding weights |
| [in] | vname | the name of the variable |
| [in] | dims | the variable spatial dimensions |
| [in] | field | the field to write |
Definition at line 633 of file utils_mod.F90.
|
private |
Obtain a 2D field and return a 1-D vector array.
| [in] | fname | the file containing the fields to retrieve |
| [in] | vname | the variable to retrieve |
| [in] | dims | the dimensions of the fields |
| [out] | field | the field |
| [in] | wgts | the optional ESMF regridding weights |
Definition at line 287 of file utils_mod.F90.
|
private |
Obtain a 3D field and return a 2-D vector array.
| [in] | fname | the file containing the fields to retrieve |
| [in] | vname | the variable to retrieve |
| [in] | dims | the dimensions of the fields |
| [out] | field | the field |
| [in] | wgts | the optional ESMF regridding weights |
Definition at line 332 of file utils_mod.F90.
|
private |
Obtain 2D vector pairs mapped to Ct and rotated to EN.
| [in] | fname | the file containing the fields to retrieve |
| [in] | wdir | the path to the required ESMF regridding weights |
| [in] | cosrot | the cosine of the rotation angle |
| [in] | sinrot | the sine of the rotation angle |
| [in] | vname1 | the variable name of the first vector |
| [in] | vgrid1 | the grid location of the first vector |
| [in] | vname2 | the variable name of the second vector |
| [in] | vgrid2 | the grid location of the second vector |
| [in] | dims | the dimensions of the fields |
| [out] | vecpair | the vector pair array |
Definition at line 192 of file utils_mod.F90.
|
private |
Obtain 3D vector pairs mapped to Ct and rotated to EN.
| [in] | fname | the file containing the fields to retrieve |
| [in] | wdir | the path to the required ESMF regridding weights |
| [in] | cosrot | the cosine of the rotation angle |
| [in] | sinrot | the sine of the rotation angle |
| [in] | vname1 | the variable name of the first vector |
| [in] | vgrid1 | the grid location of the first vector |
| [in] | vname2 | the variable name of the second vector |
| [in] | vgrid2 | the grid location of the second vector |
| [in] | dims | the dimensions of the fields |
| [out] | vecpair | the vector pair array |
Definition at line 242 of file utils_mod.F90.
| subroutine, public utils_mod::nf90_err | ( | integer, intent(in) | ierr, |
| character(len=*), intent(in) | string ) |
Handle netcdf errors.
| [in] | ierr | the error code |
| [in] | string | the error message |
Definition at line 763 of file utils_mod.F90.
|
private |
Pack 2D fields into arrays by mapping type.
| [in] | filesrc | the file containing the fields to retrieve |
| [in] | wgtsdir | the path to the required ESMF regridding weights |
| [in] | cosrot | the cosine of the rotation angle |
| [in] | sinrot | the sine of the rotation angle |
| [in] | vars | the typedefs for this packed array |
| [in] | dims | the dimensions of the fields in the packed array |
| [in] | nflds | the number of fields in the packed array |
| [out] | fields | the packed array |
Definition at line 66 of file utils_mod.F90.
|
private |
Pack 3D fields into arrays by mapping type.
| [in] | filesrc | the file containing the fields to retrieve |
| [in] | wgtsdir | the path to the required ESMF regridding weights |
| [in] | cosrot | the cosine of the rotation angle |
| [in] | sinrot | the sine of the rotation angle |
| [in] | vars | the typedefs for this packed array |
| [in] | dims | the dimensions of the fields in the packed array |
| [in] | nflds | the number of fields in the packed array |
| [out] | fields | the packed array |
Definition at line 128 of file utils_mod.F90.
|
private |
Remap a 1-D vector array from source to destination.
| [in] | fname | the file containing ESMF regridding weights |
| [in] | src_field | the source field |
| [out] | dst_field | the destination field |
Definition at line 377 of file utils_mod.F90.
|
private |
Remap a 2-D vector array of nflds or nlevs from source to destination.
| [in] | fname | the file containing ESMF regridding weights |
| [in] | dim2 | the number of fields or levels |
| [in] | src_field | the source field |
| [out] | dst_field | the destination field |
Definition at line 432 of file utils_mod.F90.
|
private |
Remap a field packed array of nk levels and nflds fields.
| [in] | fname | the file containing ESMF regridding weights |
| [in] | nk | the number of levels |
| [in] | nflds | the number of fields |
| [in] | src_field | the source field |
| [out] | dst_field | the destination field |
Definition at line 489 of file utils_mod.F90.
| subroutine, public utils_mod::zero_out_land_ice | ( | integer(kind=4), dimension(:), intent(in) | mask, |
| real(kind=8), dimension(:,:), intent(inout) | fout, | ||
| integer, intent(out) | icnt ) |
Reset field values to zero on land.
| [in] | mask | the land mask |
| [in,out] | fout | the field value |
| [out] | icnt | the number spatial points reset |
Definition at line 711 of file utils_mod.F90.
| subroutine, public utils_mod::zero_out_phantom_ice | ( | real(kind=8), dimension(:,:), intent(in) | fin, |
| real(kind=8), dimension(:,:), intent(inout) | fout, | ||
| integer, intent(out) | icnt ) |
Ensure that when fin contains zeros for all ncat, fout will also contain zeros for all ncat.
| [in] | fin | the field to test against |
| [in,out] | fout | the field tested |
| [out] | icnt | the number spatial points reset |
Definition at line 738 of file utils_mod.F90.