TreeMig Code
Loading...
Searching...
No Matches
netcdftmmodule Module Reference

Functions/Subroutines

subroutine preparenetcdfoutput (nspc)
 PrepareNetcdfOutput

 
subroutine initncvar (var, numdims, ncdims, limits)
 

Function/Subroutine Documentation

◆ initncvar()

subroutine netcdftmmodule::initncvar ( type(ncvar), intent(inout) var,
integer, intent(in) numdims,
integer, dimension(:), intent(in) ncdims,
integer, dimension(:), intent(in) limits )

Defines a Netcdf variable, allocates the array for it and fills it with a standard fillvalue.

  • USE: FileListModule, netcdf, LoggerModule, iso_fortran_env, ieee_arithmetic
  • IN:
    • Parameters
      varvariable to be inititalized
      numDimsnumber of dimensions of this variable
      NCDimsdimensions of this variable
      limitson each dimension of this variable
  • CALLS support routines:
  • CALLED from:

Definition at line 290 of file PrepareNetcdfOutput.f90.

◆ preparenetcdfoutput()

subroutine netcdftmmodule::preparenetcdfoutput ( integer, intent(in) nspc)

PrepareNetcdfOutput


prepares a netcdf file for output

  1. the file is created
  2. global attributes of the file are defined
  3. time, x,y, species "axis" are defined with their attributes
  4. the different output variables are defined,allocated and initialized
  5. the x, y and year (and maybe also height and light class) values are added to the corresponding variables for netcdf lib see https://docs.unidata.ucar.edu/netcdf-fortran/current/f90-use-of-the-netcdf-library.html.
  • USE: FileListModule, netcdf, All_par
  • IN:
    • Parameters
      nspc: number of species
    • FROM All_par:
      • experimentID :character(len=:), allocatable: identifier for output of experiment
      • unitOfSpatialData : REAL : unit of bioclim and stockability data in meters
      • latRealStart, lonRealStart : REAL : coordinates of corner of simulation rectangle in REAL coordinates
      • maxlat, maxlon : INTEGER : chosen number of rows, columns of simulation area; relative coordinates
      • cellSideLength : REAL : Side-lenght of grid cell [=..] !>DSP
      • numyrs : INTEGER : number of years to be simulated
      • simustartyear : INTEGER : start year of simulation in real years
      • writeOutput : TYPE(wrOutp) : structure of logicals for the different output variables, to be set true or false
      • maxhc, maxlc : INTEGER : max. number of height classes (0-maxhc) and light classes (1-maxlc)
      • reportIntervals : INTEGER, dimension (10, 3) : report intervals (col 1), their start (col2) and end (col3) (years)
      • nReportIntervals : INTEGER : number of report intervals
      • spec(maxspc) : TYPE(SpecProperties) : species properties; here a.o. all species parameters are put to spec
    • FROM FileListModule:
      • NC_FILE_NAME: character(len=:), allocatable : name of netcdf file
  • OUT:
    • via FileListModule:
      • NC_FILE_ID: INTEGER : id of netcdf file
      • BioDiv_NC,Biomass_NC, & Number_NC, Seed_NC, Ingrowth_NC, NPP_NC, BasalArea_NC,& Antagonist_NC, Pollen_NC, LAI_NC, Light_NC : TYPE(NCVar) : output variables in netcdf format
  • CALLS support routines:
  • CALLED from:

Definition at line 51 of file PrepareNetcdfOutput.f90.