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/flexible init conds #73

Merged
merged 17 commits into from
May 14, 2019
Merged

Feature/flexible init conds #73

merged 17 commits into from
May 14, 2019

Conversation

nbren12
Copy link
Owner

@nbren12 nbren12 commented Apr 29, 2019

No description provided.

* add a new parameters file
* use the master run_sam_ic_nn.py script and delete old process_ngaqua.py
  script. This simplifies the SAM running pipeline
Xarray is faster than NCO because it can use multithreading.
Conflicts:
	Snakefile
	src/criticism/run_sam_ic_nn.py
	src/sam/process_ngaqua.py
Compiling SAM to run at different resolutions required manually editing the
domain.f90 file, which is not good.

This commit improves this by using the cpp preprocessor, which allows
specifying the grid size on compile time. For now, the resolution is specified
in the ./Build file with

setenv NX ...
setenv NY ...
setenv NZ ...
setenv NSUBX ...
setenv NSUBY ...

the built SAM executable is availabe in the folder named like:

OBJ/512x256x34/
Previously this path was inferred from the sam source root. However, the new
resolution specific compiling required specificng the sam root as
OBJ/<resolution spec>. Because RUNDATA is not located at this path, we need to
provide a new option to specify its location.
Previously, the halo communication was disabled.

This commit performs communication with periodic(4) and adds flags for
disabling hyper-diffusion altogether.
The meridional boundary region where the NN is not applied is computed from the
edge of each processors subdomain. For parallel jobs, this should only be done
in the northernmost or southernmost subdomains.

I also removed some unnessary logging information and time the different stages
of the python code.
The commit changing the resolution and location of the paths broke
this test.
Unfortunately, the 40 km run does not rain more/less in the tropics than the
160 km one.
@nbren12 nbren12 merged commit b139f2b into master May 14, 2019
@nbren12 nbren12 deleted the feature/flexible-init-conds branch May 14, 2019 20:59
nbren12 added a commit that referenced this pull request Nov 13, 2020
By running SAM at 40 km resolution, but with the 160km-trained NN, we hope to see if this scheme produces more precipitation. It does not, and the simulation looks very similar to a control.

- compile and run SAM with two different resolutions: 160km and 40km
- works in docker and on olympus

Contains the following squashed commits:

* Reprocess data using SAM

* add a new parameters file
* use the master run_sam_ic_nn.py script and delete old process_ngaqua.py
  script. This simplifies the SAM running pipeline

* Use a xarray for zonal+time_mean

Xarray is faster than NCO because it can use multithreading.

* Implement flexible initial conditions

* Specify grid size at compile time using macros

Compiling SAM to run at different resolutions required manually editing the
domain.f90 file, which is not good.

This commit improves this by using the cpp preprocessor, which allows
specifying the grid size on compile time. For now, the resolution is specified
in the ./Build file with

setenv NX ...
setenv NY ...
setenv NZ ...
setenv NSUBX ...
setenv NSUBY ...

the built SAM executable is availabe in the folder named like:

OBJ/512x256x34/

* Add Peter's alias to environment

* Read netCDF file in parallel

* Specify path to RUNDATA in create_case.py

Previously this path was inferred from the sam source root. However, the new
resolution specific compiling required specificng the sam root as
OBJ/<resolution spec>. Because RUNDATA is not located at this path, we need to
provide a new option to specify its location.

* Make hyperdiffusion work with mpi

Previously, the halo communication was disabled.

This commit performs communication with periodic(4) and adds flags for
disabling hyper-diffusion altogether.

* Correct boundary handling for NN+GCM+NPI

The meridional boundary region where the NN is not applied is computed from the
edge of each processors subdomain. For parallel jobs, this should only be done
in the northernmost or southernmost subdomains.

I also removed some unnessary logging information and time the different stages
of the python code.

* Compile different resolutions in docker image

* Update sam integration test to work with resolution

The commit changing the resolution and location of the paths broke
this test.

* Add configurations for sam high resolutions

* Add "enter" target to makefile to start docker

* Compare the 40 km and 160 km simulations

Unfortunately, the 40 km run does not rain more/less in the tropics than the
160 km one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant