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

lots of duplicated code in mksurfdata_map #7

Closed
billsacks opened this issue Dec 16, 2017 · 5 comments
Closed

lots of duplicated code in mksurfdata_map #7

billsacks opened this issue Dec 16, 2017 · 5 comments
Labels
closed: wontfix We won't fix this issue, because it would be too difficult and/or isn't important enough to fix code health improving internal code structure to make easier to maintain (sustainability) priority: low Background task that doesn't need to be done right away.

Comments

@billsacks
Copy link
Member

Bill Sacks < sacks@ucar.edu > - 2013-02-27 11:37:02 -0700
Bugzilla Id: 1633
Bugzilla CC: erik@ucar.edu, mvertens@ucar.edu, rfisher@ucar.edu,

There is a lot of duplicated code in mksurfdata_map. There is duplication between files (fields that are regridded in a simple way have modules that duplicate nearly all code from other modules), as well as within certain files (e.g., mkfileMod).

This tool is due for a refactoring to remove some of this duplication.

@billsacks billsacks added this to the future milestone Dec 16, 2017
@billsacks billsacks added enhancement new capability or improved behavior of existing capability priority: low Background task that doesn't need to be done right away. labels Dec 16, 2017
@billsacks
Copy link
Member Author

Bill Sacks < sacks@ucar.edu > - 2013-02-28 08:58:39 -0700

I had been thinking about making something like a mkgenericMod, so we don't have to create a new module (with lots of duplicated code) for each new field. (And this could potentially have an array of derived types in its argument list so that it could create multiple fields at once if there are multiple fields on the same raw data file.)

But upon further reflection, I'm not sure this makes sense: this would make it easy to map a generic field that doesn't require any special handling, but then it would be less clear later what would need to be done if a field needs special handling (e.g., changing all missing values to a certain other value).

So instead, I think it makes sense to maintain the design of having a separate module for each raw data file. But I'll try to pull out some of this duplicated code (e.g., the error checking code) into a shared module.

@billsacks
Copy link
Member Author

Bill Sacks < sacks@ucar.edu > - 2013-03-04 16:14:09 -0700

In my branch for changes to clm4.5 mksurfdata_map, which should come to the trunk in a week or so, I have improved things somewhat, but there's still a lot to do.

The main thing I have done is to pull out the shared error-checking code and diagnostics that are printed to the .log file into shared subroutines. Also, for the new variables I'm adding, I'm reorganizing the routines in a way that makes more sense when there are multiple variables in a single raw data file.

However, I have NOT retrofitted old routines with calls to my new shared routines.

In addition, I have NOT made a common routine to do diagnostic output for an integer-valued field.

In addition, I have NOT done anything about the fact that adding a new variable requires changes in a number of different places throughout the code (and the namelist generation utilities).

@billsacks
Copy link
Member Author

billsacks commented Dec 16, 2017

Bill Sacks < sacks@ucar.edu > - 2013-06-27 11:30:29 -0600

See also the similar bug 1281

Edit: 1281 is now #80

@billsacks billsacks added code health improving internal code structure to make easier to maintain (sustainability) and removed enhancement new capability or improved behavior of existing capability labels Feb 8, 2018
@billsacks billsacks removed this from the future milestone Nov 5, 2018
@ekluzek ekluzek mentioned this issue Aug 21, 2019
mariuslam pushed a commit to NordicESMhub/ctsm that referenced this issue Aug 26, 2019
mariuslam pushed a commit to NordicESMhub/ctsm that referenced this issue Aug 26, 2019
Bring in changes from FATES sci 1.40 to 1.4.1
mariuslam pushed a commit to NordicESMhub/ctsm that referenced this issue Aug 26, 2019
merge logging experiments up to master
mariuslam pushed a commit to NordicESMhub/ctsm that referenced this issue Aug 26, 2019
disaggregate max mort rate params and some updates to ncvarsort.py
mariuslam pushed a commit to NordicESMhub/ctsm that referenced this issue Aug 26, 2019
mariuslam pushed a commit to NordicESMhub/ctsm that referenced this issue Aug 26, 2019
billsacks pushed a commit to billsacks/ctsm that referenced this issue Nov 11, 2019
@ekluzek ekluzek mentioned this issue Mar 12, 2020
slevis-lmwg referenced this issue in slevis-lmwg/ctsm Aug 1, 2023
@ekluzek
Copy link
Collaborator

ekluzek commented Aug 8, 2023

Is this still an issue with mksurfdata_esmf on the ctsm5.2 branch?

@billsacks
Copy link
Member Author

I'm not sure, but I think this issue could safely be closed - we can always reopen it or something else later if wanted.

@ekluzek ekluzek added the closed: wontfix We won't fix this issue, because it would be too difficult and/or isn't important enough to fix label Aug 8, 2023
@ekluzek ekluzek closed this as completed Aug 8, 2023
slevis-lmwg pushed a commit that referenced this issue Apr 19, 2024
update year_start for actual year
samsrabin referenced this issue in samsrabin/CTSM Apr 19, 2024
Update for ERA5 data atmosphere
glemieux pushed a commit to glemieux/ctsm that referenced this issue Jun 11, 2024
Fix `PVT` system test and avoid getting `fluh_timeseries` when `use_fates_potentialveg = .true.`
AGonzalezNicolas pushed a commit to HPSCTerrSys/clm5_0 that referenced this issue Jun 27, 2024
Commit summary:

- 8577cfa Standardized location of version string to `clm5nl/_version.py`. Bumped to v0.5.
- a700656 Don't set default flanduse_timeseries if not specified in model params file; also fixed incorrect parsing of stream types in datm_in
- 52be297 Auto create folders required by drv_in and modelio; also fixed pio_stride not being updated in modelio
AGonzalezNicolas added a commit to HPSCTerrSys/clm5_0 that referenced this issue Jun 27, 2024
gdicker1 added a commit to gdicker1/CTSM that referenced this issue Aug 20, 2024
Update EarthWorksOrg/CTSM with upstream work from
ESCOMP/CESM/cesm2_3_beta17
gdicker1 added a commit to gdicker1/CTSM that referenced this issue Aug 20, 2024
Update EarthWorksOrg/CTSM with upstream work from
ESCOMP/CESM/cesm2_3_beta17
slevis-lmwg added a commit that referenced this issue Sep 5, 2024
Update default fire_emis_factors_file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed: wontfix We won't fix this issue, because it would be too difficult and/or isn't important enough to fix code health improving internal code structure to make easier to maintain (sustainability) priority: low Background task that doesn't need to be done right away.
Projects
None yet
Development

No branches or pull requests

2 participants