determine output units (see table 1 in Stohl et al., ACP 2005
write metadata to netCDF file
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public, | parameter | :: | deflate_level | = | 5 | |
logical, | public, | parameter | :: | min_size | = | .false. | |
integer, | public | :: | tpointer | = | 0 | ||
integer, | public | :: | tpointer_part | = | 0 | ||
integer, | public | :: | ppointer_part | = | 0 | ||
integer, | public | :: | partinitpointer | = | 0 | ||
integer, | public | :: | partinitpointer1 | = | 0 | ||
character(len=255), | public | :: | ncfname | ||||
character(len=255), | public | :: | ncfnamen | ||||
character(len=255), | public | :: | ncfname_part | ||||
character(len=255), | public | :: | ncfname_partinit | ||||
character(len=255), | public | :: | ncfname_part_end | ||||
integer, | public, | allocatable, dimension(:) | :: | specID | |||
integer, | public, | allocatable, dimension(:) | :: | specIDppt | |||
integer, | public, | allocatable, dimension(:) | :: | wdspecID | |||
integer, | public, | allocatable, dimension(:) | :: | ddspecID | |||
integer, | public, | allocatable, dimension(:) | :: | specIDn | |||
integer, | public, | allocatable, dimension(:) | :: | specIDnppt | |||
integer, | public, | allocatable, dimension(:) | :: | wdspecIDn | |||
integer, | public, | allocatable, dimension(:) | :: | ddspecIDn | |||
integer, | public, | allocatable, dimension(:) | :: | recconcID | |||
integer, | public, | allocatable, dimension(:) | :: | recpptvID | |||
integer, | public | :: | timeID | ||||
integer, | public | :: | timeIDn | ||||
integer, | public | :: | timeIDpart | ||||
integer, | public, | dimension(6) | :: | dimids | |||
integer, | public, | dimension(6) | :: | dimidsn | |||
integer, | public, | dimension(5) | :: | depdimids | |||
integer, | public, | dimension(5) | :: | depdimidsn | |||
integer, | public | :: | partIDi | ||||
integer, | public | :: | tIDi | ||||
integer, | public | :: | lonIDi | ||||
integer, | public | :: | latIDi | ||||
integer, | public | :: | levIDi | ||||
integer, | public | :: | relIDi | ||||
integer, | public | :: | pvIDi | ||||
integer, | public | :: | prIDi | ||||
integer, | public | :: | qvIDi | ||||
integer, | public | :: | rhoIDi | ||||
integer, | public | :: | ttIDi | ||||
integer, | public | :: | uIDi | ||||
integer, | public | :: | vIDi | ||||
integer, | public | :: | wIDi | ||||
integer, | public | :: | topoIDi | ||||
integer, | public | :: | trIDi | ||||
integer, | public | :: | hmixIDi | ||||
integer, | public, | allocatable, dimension(:) | :: | massIDi | |||
real, | public | :: | eps | ||||
logical, | public, | parameter | :: | write_releases | = | .true. | |
logical, | public, | parameter | :: | write_vol | = | .false. | |
logical, | public, | parameter | :: | write_area | = | .false. | |
logical, | public | :: | topo_written | = | .false. | ||
logical, | public | :: | mass_written | = | .false. | ||
logical, | public | :: | massav_written | = | .false. | ||
real, | public | :: | xp1 | ||||
real, | public | :: | yp1 | ||||
real, | public | :: | xp2 | ||||
real, | public | :: | yp2 |
netcdf error message handling
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | status |
Create netcdf file and write header/metadata information lnest = .false. : Create main output file lnest = .true. : Create nested output file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | lnest |
Variables: * outnum number of samples * ncells number of cells with non-zero concentrations * sparse .true. if in sparse matrix format, else .false. * tot_mu 1 for forward, initial mass mixing ration for backw. runs * *
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | itime | |||
real, | intent(in) | :: | outnum | |||
real, | intent(out) | :: | gridtotalunc | |||
real(kind=dep_prec), | intent(out) | :: | wetgridtotalunc | |||
real(kind=dep_prec), | intent(out) | :: | drygridtotalunc |
Variables: * itime current simulation time * outnum number of samples * *
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | itime | |||
real, | intent(in) | :: | outnum |
This subroutine creates an initial particle positions and properties * NetCDF file: partinit_xxx.nc * The release time, release number and positions, together with all fields * specified in the PARTOPTIONS option file will saved. * * Author: L. Bakels 2022 * *
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | itime | |||
integer, | intent(in) | :: | idate | |||
integer, | intent(in) | :: | itime_start | |||
integer, | intent(in) | :: | idate_start |
This subroutine saves initial particle positions, release time and * releasenumber to a NetCDF file created in create_particles_initialoutput * evertime a new particle is spawned. * * Author: L. Bakels 2022 * *
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | itime | |||
integer, | intent(in) | :: | istart | |||
integer, | intent(in) | :: | iend |
This subroutine saves properties chosen by the user in PARTOPTIONS * to a NetCDF file created in create_particles_initialoutput. * This happens whenever a new particle is spawned. * * Author: L. Bakels 2022 * *
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | field(:) | |||
character(len=2), | intent(in) | :: | fieldname | |||
integer, | intent(in) | :: | imass | |||
integer | :: | ncid |
This subroutine creates a file (partoutput_xxx.nc), where every time * interval particle properties specified in the PARTOPTIONS option file * are saved to. Running options are saved as header informtion to this * file as well. * * Author: L. Bakels 2021 * *
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | itime | |||
integer, | intent(in) | :: | idate | |||
integer, | intent(in) | :: | itime_start | |||
integer, | intent(in) | :: | idate_start |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out) | :: | ncid | |||
integer, | intent(in), | optional | :: | np |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer | :: | ncid |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(inout) | :: | ncid |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | itime | |||
integer, | intent(in), | optional | :: | ncid |
Writing a field from PARTOPTIONS to partoutput_xxx.nc created in *
writeheader_partoutput *
*
Author: L. Bakels 2021 *
*
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | itime | |||
real, | intent(in) | :: | field(:) | |||
integer, | intent(in) | :: | np | |||
integer, | intent(in) | :: | imass | |||
integer, | intent(in) | :: | ncid |
IPIN=2: restarting from a partoutput_xxx.nc file written by a previous * run, depending on what PARTOPTIONS the user has chosen, this * option might not be possible to use * * Author: L. Bakels 2022 * *
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ibtime | |||
integer, | intent(in) | :: | ibdate |
IPIN=3: starting a run from a user defined initial particle conditions, * more on how to create such a file can be found in the manual * IPIN=4: restarting a run, while also reading in the initial particle * conditions * * Author: L. Bakels 2022 * *