Skip to content

Commit

Permalink
Merge branch 'main' into sanAkel/feature/oceanBCs_clim_anom
Browse files Browse the repository at this point in the history
  • Loading branch information
sdrabenh authored Jan 24, 2024
2 parents 7f64f4f + 61009d5 commit 8f5b1f4
Show file tree
Hide file tree
Showing 18 changed files with 572 additions and 336 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Addition of SST and FRACI forecast (ocean) boundary conditions generation capability in `pre/prepare_ocnExtData`
- Added EASE grid option for remapping of land restarts in remap_restarts.py package (facilitates use of package in GEOSldas setup script)
- Added support for SLES15, NAS site and log for remap_lake_landice_saltwater in remap_restarts.py package
- Added "land_only" option for remapping of restarts

### Changed

Expand Down
13 changes: 10 additions & 3 deletions pre/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ add_subdirectory(NSIDC-OSTIA_SST-ICE_blend)
add_subdirectory(prepare_ocnExtData)

file(GLOB pythonscripts CONFIGURE_DEPENDS ./remap_restart/remap* ./remap_restart/bin2nc_merra2* ./remap_restart/tests/*.*)
install(
PROGRAMS ${pythonscripts}
DESTINATION bin)

list(FILTER pythonscripts EXCLUDE REGEX "remap_utils.py")

foreach (file ${pythonscripts})
install(PROGRAMS ${file} DESTINATION bin)
endforeach()

set(file ./remap_restart/remap_utils.py)
configure_file(${file} ${file} @ONLY)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${file} DESTINATION bin)

install(
PROGRAMS regrid.pl
Expand Down
7 changes: 2 additions & 5 deletions pre/remap_restart/remap_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,14 @@
import ruamel.yaml
import shutil
import subprocess
from remap_utils import *

class remap_base(object):
def __init__(self, **configs):
for key, value in configs.items():
if (key == 'params_file'):
print( "use Config yaml file: " + value)
yaml = ruamel.yaml.YAML()
stream =''
with open(value, 'r') as f:
stream = f.read()
self.config = yaml.load(stream)
self.config = get_config_from_file(value)
out_dir = self.config['output']['shared']['out_dir']
if not os.path.exists(out_dir) : os.makedirs(out_dir)
f = os.path.basename(value)
Expand Down
Loading

0 comments on commit 8f5b1f4

Please sign in to comment.