Skip to content

qpantc/EDsupport

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tutorial for ED2 at Ugent HPC

Step 1: Compile ED2

  1. download the model

    git clone [email protected]:EDmodel/ED2.git
    
  2. change the makefile in ED2/ED/build/make

    cd ED2/ED/build/make
    cp include.mk.intel include.mk.intel_hpc
  3. Edit include.mk.intel_hpc: input and output lib

    mainly for input and output lib

    HDF5_INCS=-I/apps/gent/CO7/skylake-ib/software/HDF5/1.12.1-iimpi-2021b/include
    HDF5_LIBS=-lm -lz -L/apps/gent/CO7/skylake-ib/software/HDF5/1.12.1-iimpi-2021b/bin -lhdf5 -lhdf5_fortran -lhdf5_hl
  4. load the module to complie

    ml purge; ml intel-compilers/2021.4.0 HDF5/1.12.1-iimpi-2021b UDUNITS/2.2.28-GCCcore-11.2.0; ui
  5. cd to the build dir and compile

    #-k E fast and efficiently run/ -k A will give some clue when it broken.

    cd .. 
    ./install.sh -k E -p intel_hpc
    
  6. see what you get

Step 2: Preparing the driving data

  1. download data prepare tool

    git clone [email protected]:qpantc/ED2support.git
    
  2. load R module, cd to script dir and run R

    ml av R see module suitable for R

    ml purge; ml R-bundle-Bioconductor/3.15-foss-2021b-R-4.2.0 
    
    cd ED2support/R
    R
  3. run the data download and convert script

    source("download.and.convert.input.ED2.R")

Step 3: Running model

ED2IN file

the ED2IN file may can just generated by PEcAn

  1. ED2IN for site with

    cordination of the simulated sites

    NL%N_POI = 1
    NL%POI_LAT = 9.25
    NL%POI_LON = -79.75
    NL%POI_RES = 1
  2. start and end date for the simulation

    start date of the simulation

    NL%IMONTHA = 1
    NL%IDATEA = 1
    NL%IYEARA = 1901
    NL%ITIMEA = 0

    end date of the simulation

    NL%IMONTHZ = 1
    NL%IDATEZ = 1
    NL%IYEARZ = 1903
    NL%ITIMEZ = 0
  3. output dir

    NL%FFILOUT = '/scratch/gent/vo/000/gvo00074/vsc44253/ED_results/BCI/analy/analysis'
    NL%SFILOUT = '/scratch/gent/vo/000/gvo00074/vsc44253/ED_results/BCI/hist/history'
  4. input database

    NL%VEG_DATABASE = '/user/data/gent/gvo000/gvo00074/ED_common_data/veg_oge/OGE2_'
    NL%SOIL_DATABASE = '/user/data/gent/gvo000/gvo00074/ED_common_data/soils/FAO/FAO_'
    NL%LU_DATABASE = ''
    NL%PLANTATION_FILE = ''
    NL%THSUMS_DATABASE = '/user/data/gent/gvo000/gvo00074/ED_common_data/ed_inputs/'
    NL%ED_MET_DRIVER_DB = '/data/gent/vo/000/gvo00074/vsc44253/R/climate.site/site.lat9.25N.lon79.75W/ED2/ED_MET_DRIVER_HEADER'
    NL%SOILSTATE_DB = ''
    NL%SOILDEPTH_DB = ''
    • VEG_DATABASE: land/water mask

      vegetation database, used only to determine the land/water mask. Fill with the path and the prefix.

    • SOIL_DATABASE: soil type data

      soil database, used to determine the soil type. Fill with the path and the prefix.

    • LU_DATABASE: land-use change disturbance rates

      land-use change disturbance rates database, used only when IANTH_DISTURB is set to 1. Fill with the path and the prefix.

    • PLANTATION_FILE: forest plantation fraction

      Character string for the path to the forest plantation fraction file. This is used only when IANTH_DISTURB is set to 1 and the user wants to simulate forest plantations. Otherwise, leave it empty (PLANTATION_FILE='')

    • THSUMS_DATABASE: phenology about chilling-degree and growing-degree days

      input directory with dataset to initialise chilling-degree and growing-degree days, which is used to drive the cold-deciduous phenology (you must always provide this, even when your PFTs are not cold deciduous).

    • ED_MET_DRIVER_DB: meteorological driver instructions

      File containing information for meteorological driver instructions (the "header" file).

    • OBSTIME_DB:

      File containing times of desired IOOUTPUT Reference file: /ED/run/obstime_template.time

    • SOILSTATE_DB: soil moisture and temperature infromation if ISOILSTATEINIT=1

      If ISOILSTATEINIT=1, this variable specifies the full path of the file that contains soil moisture and temperature information.

    • SOILDEPTH_DB: soil moisture and temperature information if ISOILDEPTHFLG=1

      If ISOILDEPTHFLG=1, this variable specifies the full path of the file that contains soil moisture and temperature information.

  5. Empty the IEDCNFGF config

    config and events

    NL%IEDCNFGF   = '/mypath/config.xml'
    NL%EVENT_FILE = '/mypath/event.xml'

    SFILIN

    NL%SFILIN = ''
  6. set included PFTs

    NL%INCLUDE_THESE_PFT = 1,2,3,4,16

Step 4: Run and postprocess model

  1. run the model

    Job.sh file Or inside an interactive job After load the needed modules

    ../build/ed_2.2-opt-master-8d4c3aff -f ED2IN
    
  2. postprocess model on hpc

    source("post.process.ED2.outputs.R")

Step 5: Plot model outputs

load("./outputs/analysis.RData")
matplot(datum$szpft$gpp[,12,c(2,3,4,18)],type = "l")

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 96.0%
  • Fortran 3.5%
  • Other 0.5%