pecan icon indicating copy to clipboard operation
pecan copied to clipboard

Add FATES

Open mdietze opened this issue 9 years ago • 10 comments

First question is whether this should be it's own package, or a flag/option within the CLM package?

General game plan, at least initially, is to follow the standard set of steps (below) using the approach discussed in #352 (CLM)

  • [x] Download, compile, and test run
  • [x] jobs.sh existing test run
  • [x] Database record: model_type, model, formats, test run's inputs, test PFT
  • [x] write.configs existing test run
  • [ ] standard output
  • [x] test run through web interface
  • [x] met2model
  • [x] parameters in write.configs
  • [ ] extend list of PFTs, priors
  • [ ] initial conditions
  • [ ] read/write restart
  • [ ] non-met inputs
  • [ ] add model to gitbook

With the help of @rgknox I think step 1 (download, compile, run) is working, but I'm going to have to bug him a lot to better understand how to give PEcAn control of various settings and parameters.

mdietze avatar Sep 09 '16 06:09 mdietze

Here's what worked so far on the v1.4.8 VM running Ubunutu 14.04. Just discussed with @robkooper upgrading to Ubuntu 16.04 for PEcAn v1.4.9 to alleviate a bunch of the upgrading

  • Install a bunch of packages
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gfortran-4.9
sudo rm /usr/bin/gfortran
sudo ln -s /usr/bin/gfortran-4.9 /usr/bin/gfortran

sudo apt-get upgrade libnetcdf-dev  ## upgrades a bunch of other stuff

sudo apt-get install subversion
sudo apt-get install csh
sudo apt-get install cmake
sudo ln -s /usr/bin/make /usr/bin/gmake

sudo rm /bin/sh
sudo ln -s /bin/bash /bin/sh

apt-get source libnetcdf-dev
cd  netcdf-4.1.3
./configure
make
sudo make install
  • Get code (currently a private repo)
git clone https://github.com/mdietze/ed-clm.git
cd /home/carya/ed-clm/cime/scripts
  • Copy Ryan Knox's create_1x1br_eddi.sh script into the cime/scripts directory and modify:
    • Set CROOT to the run directory
    • Set DIN_LOC_ROOT to the input directory
    • Add export NETCDF_HOME=/usr/local/ near the top
  • Change create_1x1br_eddi.sh to executable and run from cime/scripts directory
  • Change to CROOT directory and run ./case.run
  • Remember that this is an ED variant, so go do something else for the next 3-4 hrs while you wait for it to finish :beer:. Output is in the run subfolder

mdietze avatar Sep 09 '16 14:09 mdietze

Possibly outdated, but I finally found a reference that seems to explain how to format CLM met. http://www.cesm.ucar.edu/models/cesm1.2/clm/models/lnd/clm/doc/UsersGuide/x12979.html Posting it so I / others can find it later. It also seems that, like with ED2, we need to generate both a header file and the met files.

mdietze avatar Sep 20 '16 20:09 mdietze

Updates to fates to reflect new ACME restructuring:

Update create ref case file (done) Update clm and fates param files in fates/inst/ (in process)

  • These are the new files (from an example test refcase run):
paramfile = /data/Model_Data/cesm_input_datasets/lnd/clm2/paramdata/clm_params.c170317.nc
fates_paramfile = /data/Model_Data/cesm_input_datasets/lnd/clm2/paramdata/fates_params.c170331.nc

For now the domain file can stay this same for the basic PEcAn ref case

fatmlndfrc = /data/Model_Data/cesm_input_datasets/share/domains/domain.clm/domain.lnd.1x1pt-brazil_navy.090715.nc

Also, can we add these? Do we need to add these?

stream_fldfilename_urbantv = /data/Model_Data/cesm_input_datasets/lnd/clm2/urbandata/CLM45_tbuildmax_Oleson_2016_0.9x1.25_simyr1849-2106_c160923.nc
fsurdat = /data/Model_Data/cesm_input_datasets/lnd/clm2/surfdata_map/surfdata_1x1_brazil_16pfts_simyr2000_c160127.nc

Need to update: write.configs, model2netcdf, and template.job

serbinsh avatar May 09 '17 12:05 serbinsh

Following FATES refactoring we still need the following three PRs:

  1. Enable cloning of ref-case rather than building new for each ensemble member (priority 1)
  2. Enable running with PEcAn met files. May need to identify any FATES met or otherwise format changes (priority 2)
  3. Enable FATES init from new inventory css/pss files (priority 3)

serbinsh avatar Jun 29 '17 13:06 serbinsh

@serbinsh and I have been interacting on item 3.
It looks like item 2 doesn't require code modification to FATES, CLM/ALM or CIME, just requires a system to format met files and get them in the right place (true?) Item 1 is pecan code right?

rgknox avatar Jun 29 '17 20:06 rgknox

Updated near-term task list from Shawn based on chat with myself, Tony, and Ryan on 8/28/17

  1. confirm parameters
  2. Met parsing, specifically how to format the file that defines met for FATES (i can't recall that file name right now but will look and report)
  3. Priors, Mike is presently working on this?
  4. PFTs (Ryan just responded about that)
  5. IC and inventory startup
  6. clone runs rather than rebuilding

mdietze avatar Aug 31 '17 14:08 mdietze

Update TODO: update code to read param files (CLM and FATES) out of the refcase directory, not the PEcAn package

TODO: update to allow it to pick between CLM4.5 and CLM5 parameter set based on refcase, user selection

serbinsh avatar Mar 14 '18 15:03 serbinsh

Additional TODO or continuing this discussion. It would be good if we could enable all of these options in FATES:

     use_fates_planthydro =  F
     use_fates_ed_st3 =  F
     use_fates_ed_prescribed_phys =  F
     use_fates_inventory_init =  F
     fates_inventory_ctrl_filename =

That is use FATES-Hydro, prescribed phys mode, and as mentioned above, measured inventory / prescribed inventory startup.

Additionally I am testing defining different output variables with different output timesteps, for now thinking hourly fluxes and other relevant outputs as well as daily/monthly for those outputs where a hourly timestep doesn't really make sense. This will then required the model2netCDF.FATES to combine all into PEcAn standard and provide multiple time and time_bounds variables as needed.

Notes from Rosie: https://github.com/NGEET/fates/issues/364#issuecomment-393644260

serbinsh avatar Sep 21 '18 21:09 serbinsh

This issue is stale because it has been open 365 days with no activity.

github-actions[bot] avatar Apr 25 '20 00:04 github-actions[bot]

@Hhh-hyc (Yucong) is planning to work on this issue. Getting a run through FATES docker version at FI-Sod is the first step.

istfer avatar Apr 21 '23 11:04 istfer