Skip to content

Takeaways and Suggestions from creating NRW namelists with WFE #18

@jjokella

Description

@jjokella
  1. Fork (SimExp) of WFE for NRW-testcase: https://github.com/HPSCTerrSys/simexp_eCLM_bgcmode-NRW

  2. Repo of namelists for NRW-testcase as used in FallSchool2025: https://github.com/HPSCTerrSys/namelist_eCLM_bgcmode-NRW

Goal of the exercise

Reproduce the namlists from 2. with the WFE in 1.

Suggestions

Loading TSMP2 environment file

Is sourcing the TSMP2 environment needed in sim.job?

source ${tsmp2_env}

For only generating namelists, I do not have to have a TSMP2 build ready. This leads to No such file or directory error. Also, I saw that the environment is additionally loaded specifically for the sim_run step.

Forcing files

NRW case runs the first 30 days of the year. In WFE, this loads forcing files until March.

# calculation for automated adjustment of clm forcing
# forcedate=$(date '+%s' -d "${datep1} + 1 month - 1 day")
forcedate=$(date '+%s' -d "${datep1} + 1 month - 2 day")
ldate="${startdate}"
forcdatelist=""
while [[ $(date +%s -d $ldate) -le $forcedate ]]; do
forcdatelist+=$(echo "${ldate%-*}.nc\n")
ldate=$(date '+%Y-%m-%d' -d "$ldate +1 month")
done
forcdatelist=${forcdatelist::-2} # delete last new line command

Streamfile TPQW

Different variable names

WFE:

    <variableNames>
      TBOT tbot
        WIND wind
        TDEW tdew
        FLDS lwdn
    </variableNames>

Namelist repo

    <variableNames>
      TBOT tbot
        WIND wind
        QBOT shum
        PSRF pbot
    </variableNames>

Input file directories

  • common subdirectory replaced by input-file specific aero, emis, topo etc

datm_in differences

  • dtlimit, mapalgo, tintalgo

drv_in differences

  • model_version, username
  • rof_cpl_dt
  • addition of stop_tod

lnd_in differences

  • maxpatch_pft: make input?
  • use_crop

mosart_in differences

  • frivinp_rtm

Formatting useful for comparison (maybe candidate for CI!?)

XML files

prettier --plugin=@prettier/plugin-xml --parser xml --xml-whitespace-sensitivity=ignore --xml-quote-attributes=single --write $xmlfile

Installation

npm install --save-dev --save-exact prettier
npm install -g prettier @prettier/plugin-xml

f90nml files

f90nml $nmlfile > temp.nml && mv temp.nml $nmlfile

Installation

pip install f90nml

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions