ESCOMP / SimpleLand

Simple Land Model for CESM --- *** IN DEVELOPMENT *** --- please contact for more info. See supplemental information of https://journals.ametsoc.org/doi/abs/10.1175/JCLI-D-18-0812.1 for a description of SLIM physics. Implementation of SLIM into the main CESM trunk is ongoing. SLIM currently works with the CESM2.1 release, but must be downloaded from this repository until we finish implementing it properly into the main CESM code.
Other
12 stars 7 forks source link

Develop surdat modifier tool #69

Closed slevis-lmwg closed 1 year ago

slevis-lmwg commented 1 year ago

Fixes #55

Used ctsm's fsurdat_modifier as template and as my starting point.

As of opening this PR the tool runs, and just opens/reads a surdat file and outputs a new copy of the same file.

slevis-lmwg commented 1 year ago

@ekluzek recommends test-driven development. I understand and appreciate the reasoning, but I expect test-driven development to take me longer to complete, and I worry about running out of my limited contract hours to complete this PR.

slevis-lmwg commented 1 year ago

List of variables in mml_surdat files

@marysa would you edit this post with your preferred default value for each variable? When users run the surdat modifier tool with idealized = True, they will get these default values in the output surdat file in a region that they select. Users will have the option to overwrite each default value with another value if they wish. (If they set idealized = False, users will set individual variables to values of their choice and other variables will remain unchanged, again in the region that they've selected.)

double glc_mask(time, lsmlat, lsmlon) double alb_gvd(time, lsmlat, lsmlon) double alb_svd(time, lsmlat, lsmlon) double alb_gnd(time, lsmlat, lsmlon) double alb_snd(time, lsmlat, lsmlon) double alb_gvf(time, lsmlat, lsmlon) double alb_svf(time, lsmlat, lsmlon) double alb_gnf(time, lsmlat, lsmlon) double alb_snf(time, lsmlat, lsmlon) double bucketdepth(time, lsmlat, lsmlon) double emissivity(time, lsmlat, lsmlon) double snowmask(time, lsmlat, lsmlon) double roughness(time, lsmlat, lsmlon) double evap_res(time, lsmlat, lsmlon) double l2xavg_Fall_flxdst1(time, lsmlat, lsmlon) double l2xavg_Fall_flxdst2(time, lsmlat, lsmlon) double l2xavg_Fall_flxdst3(time, lsmlat, lsmlon) double l2xavg_Fall_flxdst4(time, lsmlat, lsmlon) double soil_type(time, lsmlat, lsmlon) double soil_tk_1d(time, lsmlat, lsmlon) double soil_cv_1d(time, lsmlat, lsmlon) double glc_tk_1d(time, lsmlat, lsmlon) double glc_cv_1d(time, lsmlat, lsmlon)

slevis-lmwg commented 1 year ago

@marysa I will send you a review request, not for a code review, but for a response to my previous post when you have a chance. Thanks :-)

Update: I will mark my request as resolved, though the default values that I selected can also be updated any time.

slevis-lmwg commented 1 year ago

List of variables in mml_surdat files

@marysa would you edit this post with your preferred default value for each variable? [...]

@ekluzek and @slevisconsulting are considering as a source of the default values for this tool the global_uniform surdat file.

marysa commented 1 year ago

Yes, those values all look good to me! (Sorry for the delay on my end).

Just to be sure, we're talking about the values in python/slim/modify_input_files/modify_surdat.py , where it says ""alb_gvd": [0.2] * self.months" etc., correct?

slevis-lmwg commented 1 year ago

Yes, those values all look good to me!

Thanks, @marysa

slevis-lmwg commented 1 year ago

At last Friday's Stand-up we agreed that @ekluzek would merge and tag his PRs before we merged and tagged this one.

slevis-lmwg commented 1 year ago

from 5/12 stand-up with @ekluzek:

In the meeting I mentioned a warning from running make lint. This is the warning: slim/test/test_sys_surdat_modifier.py:28:0: R0902: Too many instance attributes (12/7) (too-many-instance-attributes) ...which means that I'm setting too many self. variables in the class TestSysSurdatModifier. Correcting this warning would require a refactor that I do not have the time to do, so I suggest that we ignore this.

slevis-lmwg commented 1 year ago

This work got merged as part of #71