Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/update cesm driver namelist defaults #800

28 changes: 16 additions & 12 deletions docs/Development/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,55 +54,59 @@ This is a minor update from VIC 5.0.1. The VIC 5.1.0 includes new features, such
- Fixed bug that prevented using the correct local domain grid cells in `cesm_put_data.c`
- Changed reference temperature units from Celsius to Kelvin in `cesm_put_data.c`

1. [GH#695](https://github.com/UW-Hydro/VIC/pull/695)
2. [GH#695](https://github.com/UW-Hydro/VIC/pull/695)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

markdown automatically numbers this so the 1. was intentional here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @jhamman says. Leave the 1 for all the numbered entries. The 1 just indicates that markdown should format this as an enumerated list and will take care of the actual numbering. It is much easier to leave that to markdown in case the list ever gets updated.


- Fix sign for latent heat fluxes passed from VIC to the coupler
- Fix sign for longwave radiation passed from VIC to the coupler

1. [GH#696](https://github.com/UW-Hydro/VIC/pull/696)
3. [GH#696](https://github.com/UW-Hydro/VIC/pull/696)

- Changes names of CESM driver functions `trim` and `advance_time` to `trimstr` and `advance_vic_time`, respectively, to avoid conflicts with WRF functions with the same names when compiling RFR case.

1. [GH#702](https://github.com/UW-Hydro/VIC/pull/702)
4. [GH#702](https://github.com/UW-Hydro/VIC/pull/702)

- Fixes Julian day for the first timestep in the dmy struct for the CESM driver.

1. [GH#710](https://github.com/UW-Hydro/VIC/pull/710)
5. [GH#710](https://github.com/UW-Hydro/VIC/pull/710)

- Refactor the cesm_put_data.c routine in the CESM driver to use values from out_data directly, rather than computing them separately in cesm_put_data.c.

1. [GH#716](https://github.com/UW-Hydro/VIC/pull/716)
6. [GH#716](https://github.com/UW-Hydro/VIC/pull/716)

- Fixes initialization of coupler fields and calculates temperature and upwelling longwave to pass to WRF during initialization.

1. [GH#718](https://github.com/UW-Hydro/VIC/pull/718)
7. [GH#718](https://github.com/UW-Hydro/VIC/pull/718)

- Updates the cesm_put_data.c routine in the CESM driver to pass gridcell-averaged albedo to the coupler.

1. [GH#726](https://github.com/UW-Hydro/VIC/pull/726)
8. [GH#726](https://github.com/UW-Hydro/VIC/pull/726)

- Updates the cesm_put_data.c routine in the CESM driver to include the correct units for evap passed to the coupler.

1. [GH#732](https://github.com/UW-Hydro/VIC/pull/732)
9. [GH#732](https://github.com/UW-Hydro/VIC/pull/732)

- Updates the cesm_put_data.c routine in the CESM driver to include the correct units for sensible heat flux and updates the rofliq calculation to be correct (previously only OUT_BASEFLOW was being divided by global_param.dt).

1. [GH#734](https://github.com/UW-Hydro/VIC/pull/734)
10. [GH#734](https://github.com/UW-Hydro/VIC/pull/734)

- Updates the cesm_put_data.c routine in the CESM driver to include the correct signs for turbulent heat fluxes and evaporation. Previously we had switched the signs to agree with the image driver and they should instead be in accordance with the sign conventions for coupled models, which differ from those of land surface models. Also, eliminate populating the `l2x_Sl_ram1` field with aero_resist to agree with the VIC 4 implementation in RASM.

1. [GH#739](https://github.com/UW-Hydro/VIC/pull/739)
11. [GH#739](https://github.com/UW-Hydro/VIC/pull/739)

- Updates the cesm_put_data.c routine in the CESM driver to include the correct signs for the wind stresses and fixes a bug in calculating friction velocity (previously it was missing a square root).

1. [GH#744](https://github.com/UW-Hydro/VIC/pull/744)
12. [GH#744](https://github.com/UW-Hydro/VIC/pull/744)

- Updates the cesm_interface_c.c routine to include missing timers and the VIC RUN timer in the CESM driver.

1. [GH#746](https://github.com/UW-Hydro/VIC/pull/746)
13. [GH#746](https://github.com/UW-Hydro/VIC/pull/746)

- Updates the cesm_interface_c.c routine in the CESM driver to populate the nrecs, endyear, endmonth and endday fields in the global_param struct to make them available to vic_finalize for timing tables (specifically the secs/day columns).

14. [GH#800](https://github.com/UW-Hydro/VIC/pull/800)

- Updates the default namelist settings for the CESM driver to include output filenames consistent with the RASM naming conventions, default thermal nodes to 10, `FULL_ENERGY` to `TRUE`, and sets defaults for daily and monthly mean output.

3. Speed up NetCDF operations in the image/CESM drivers ([GH#684](https://github.com/UW-Hydro/VIC/pull/684))

These changes speed up image driver initialization, forcing reads, and history writes by only opening and closing each input netCDF file once.
Expand Down
3 changes: 2 additions & 1 deletion vic/drivers/cesm/bld/build_vic_namelist
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ def copy_to_rundir(grid_config, caseid, rundir, casedocs):

# copy file
copy_clean_vic_config(grid_config[filekey], dst_file,
header=header, rundir=rundir, **grid_config)
header=header, rundir=rundir,
caseid=caseid, **grid_config)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation error here.


# update the grid config
grid_config[filekey] = dst_file
Expand Down
24 changes: 21 additions & 3 deletions vic/drivers/cesm/bld/vic.globalconfig.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# VIC Global Configuration File

NODES 50
NODES 10
OUT_TIME_UNITS DAYS

# Soil Temperature Options
FULL_ENERGY TRUE
FROZEN_SOIL TRUE
QUICK_FLUX FALSE
QUICK_SOLVE FALSE
Expand Down Expand Up @@ -54,10 +55,19 @@ DOMAIN_TYPE FRAC frac
DOMAIN_TYPE YDIM nj
DOMAIN_TYPE XDIM ni

OUTFILE fluxes
OUTFILE {caseid}.vic.ha
AGGFREQ NDAYS 1
HISTFREQ END
OUTVAR OUT_RUNOFF
OUTVAR OUT_BASEFLOW
OUTVAR OUT_SWE
OUTVAR OUT_EVAP

OUTFILE {caseid}.vic.hmm
AGGFREQ NMONTHS 1
OUT_FORMAT NETCDF4_CLASSIC
OUTVAR OUT_PREC
HISTFREQ END
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for both of these streams, I think you probably want the HISTFREQ frequency to be nmonths 1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would HISTFREQ END do?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Write one file with all history timesteps in it at the final timestep. This is probably not what you want.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated as suggested

OUTVAR OUT_PREC
OUTVAR OUT_RAINF
OUTVAR OUT_SNOWF
OUTVAR OUT_AIR_TEMP
Expand All @@ -77,3 +87,11 @@ OUTVAR OUT_SWE
OUTVAR OUT_SOIL_MOIST
OUTVAR OUT_ALBEDO
OUTVAR OUT_SOIL_TEMP
OUTVAR OUT_R_NET
OUTVAR OUT_LATENT
OUTVAR OUT_SENSIBLE
OUTVAR OUT_RAD_TEMP
OUTVAR OUT_SURF_TEMP
OUTVAR OUT_SWNET
OUTVAR OUT_LWNET
OUTVAR OUT_GRND_FLUX
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest adding frozen soil variables. You and @bartnijssen should probably iterate together on which variables you think would be potentially useful.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having something that let's us identify active layer depth would be useful, but now sure whether that would be part of every run. Same for all these met variables. Can we split out the radiation variables (down and up rather than just net).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what I was thinking too. From knowing how much outputting data for 10 thermal nodes increases the size of the output files, I think we should add that when we need it and not make it the default. I'll split out the radiation variables and remove some of the met ones

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember this is just a monthly output file so the cost of writing out 3d vars is much less than it would otherwise be. My thought is that you should write out more variables, unless you have reason to think the data volumes will be out of control or that it is negatively impacting runtimes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added soil node temperature to the monthly output files as well as eliminating some of the met vars and splitting out the radiation vars. @bartnijssen and @jhamman - what do you think of the updated ones?