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

Shallow water and Barotropic Vorticity equation code #227

Open
wants to merge 37 commits into
base: master
Choose a base branch
from

Conversation

sit23
Copy link
Contributor

@sit23 sit23 commented Oct 17, 2021

To complement the 3D-dynamics models already available in Isca, I have added the shallow-water and barotropic vorticity equation solvers. The fortran code for these came directly from GFDL, and was downloaded from ftp://ftp.gfdl.noaa.gov/perm/GFDL_pubrelease/Spectral_Idealized_Atmospheric_Models/spectral_idealized_public_release.tar.gz on 14/05/19.

These two new configurations are run in much the same way as a standard Isca configuration, but import the ShallowCodeBase or BarotropicCodeBase rather than the standard IscaCodebase or SocratesCodebase. They come with options to include stirring or not, which in the shallow-water case is an enhancement of the GFDL shallow-water code. In addition, I have added to the shallow-water code the ability to setup the model with 1.5-layers, thus representing some deep flow beneath the active layer. This feature was used in https://rmets.onlinelibrary.wiley.com/doi/full/10.1002/qj.3755 .

In addition to these two new configurations, I have added a stirred and non-stirred test case for each of the barotropic vorticity and shallow-water models, and have added these to the trip tests to preserve their functionality in future releases. This required some modifications of the trip tests to import the new codebases and to add custom output files for these cases.

I have tested the modifications with the intel fortran compiler and the gfortran compiler. I will post the results of the trip-tests below.

sit23 added 30 commits May 14, 2019 16:15
… options in shallow water to get in line with Isca modifications.
… it defining grid for output. This should make it possible to use stirring in the shallow water model.
…irring, we can output stirring variables from within shallow water framework.
…cs and in PV definition, which I previously modified incorrectly.
Conflicts:
	.gitignore
	src/extra/python/isca/__init__.py
…-rad variable is supplied as a float when it should be an integrer. Intel accepts this, but gfortran does not. Changing input to an integer fixes the problem.
…t cases. This prevents the code from compiling each time a different trip test is run, thus making the trip tests much faster.
…trip tests. Requires the tests to be more specific about which codebase each test case is using, and also requires a new simple diag table for the 2D cases.
@sit23
Copy link
Contributor Author

sit23 commented Oct 17, 2021

I have run the trip-tests separately for the intel and gfortran compilers. Under gfortran, I get the following results:

Results for all of the test cases ran comparing 403f230 and a9610f5 are as follows...
axisymmetric : pass
bucket_model : pass
frierson : pass
giant_planet : pass
held_suarez : pass
MiMA : pass
realistic_continents_fixed_sst : pass
realistic_continents_variable_qflux : pass
socrates_aquaplanet : fail
socrates_aquaplanet_cloud : fail
top_down_test : fail
variable_co2_grey : pass
variable_co2_rrtm : pass
ape_aquaplanet : fail
barotropic_vort_eq_stirring : fail
shallow_water_stirring : fail
Nightmare, some tests have failed

There are 6 fails here. 4 of them are because the current state of the master (403f230) has some issues running with gfortran, which are fixed by #222. These are the 3 socrates cases (socrates_aquaplanet, socrates_aquaplanet_cloud and ape_aquaplanet), and the top_down_test. The other 2 fails are for the new test cases added in this p/r (barotropic_vort_eq_stirring and shallow_water_stirring). These fail because the current master doesn't have the code to run them. I am therefore satisfied that this code runs as expected under gfortran.

@sit23
Copy link
Contributor Author

sit23 commented Oct 17, 2021

When running the same trip-tests under intel, I get the following:

Results for all of the test cases ran comparing 403f230 and a9610f5 are as follows...
axisymmetric : pass
bucket_model : pass
frierson : pass
giant_planet : pass
held_suarez : pass
MiMA : pass
realistic_continents_fixed_sst : pass
realistic_continents_variable_qflux : pass
socrates_aquaplanet : pass
socrates_aquaplanet_cloud : pass
top_down_test : pass
variable_co2_grey : pass
variable_co2_rrtm : pass
ape_aquaplanet : pass
barotropic_vort_eq_stirring : fail
shallow_water_stirring : fail
Nightmare, some tests have failed

All the tests pass (including the socrates and top-down tests that were understood fails under gfortran) apart from the 2 new cases (shallow_water and barotropic_vort), which fail because the current master doesn't have the necessary code to run them.

I am therefore happy that these are safe modifications, and can be safely merged into the master.

@sit23
Copy link
Contributor Author

sit23 commented Oct 17, 2021

It is also to be noted that I have made some edits to most of the existing test cases in this p/r. These changes are simply to move the cb.compile() statement to the main body of each test case. This means that the code is not unnecessarily compiled when the trip tests import the namelists from these scripts, thus making the trip tests much faster.

@sit23
Copy link
Contributor Author

sit23 commented Apr 6, 2022

Overlap with #197 is noted and will be checked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants