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

Add option to read ocean _data_ using ExtData #562

Merged
merged 21 commits into from
Mar 17, 2022

Conversation

sanAkel
Copy link
Contributor

@sanAkel sanAkel commented Mar 11, 2022

This PR adds an optional capability to read in ocean boundary conditions:

  • From netcdf formatted files, currently only binary formatted files are supported. The netcdf files are read via ExtData.
  • This PR retains the current binary inputs as default, whereas the netcdf inputs are optional, turned ON by setting: OCEAN_EXT_DATA:.TRUE in AGCM.rc, in which case the user is expected to provide an .rc file with the correct format (see below for an example).

Reg. input netcdf files:

The changes in this PR are zero-diff in default mode (binary inputs), and for the netcdf inputs, the differences are within the expected range (accounting for differences in ExtData and MAP_ReadForcing, as per @bena-nasa). This was checked in:

  • uncoupled mode.
  • coupled mode.

Example .rc file:

PrimaryExports%%
# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------|
#  Import      |       |       | Regrid |        Refresh       | OffSet | Scale  | Variable On |   File   |
#  Name        | Units | Clim  | Method |     Time Template    | Factor | Factor |     File    | Template |
# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------|

DATA_ICE         '1'    N         N               0               none   none FRSEAICE /discover/nobackup/sakella/extData_uncoupled/scratch_orig/extData_uncoupled.geosgcm_surf.%y4%m2%d2_%h230z.nc4
DATA_SST         'K'    N         N               0               none   none TS       /discover/nobackup/sakella/extData_uncoupled/scratch_orig/extData_uncoupled.geosgcm_surf.%y4%m2%d2_%h230z.nc4
DATA_KPAR        'm-1'  Y         N               0               none   none KPAR     /discover/nobackup/sakella/BCs/test_ocean_ext/prepare_ocnExtData/clim_kpar_GMAO2022.nc4
%%

bena-nasa and others added 18 commits February 9, 2022 17:13
… GEOS_OradBioGridComp/GEOS_OradBioGridComp.F90 hence using DO_OBIO and/or DO_ORAD logic is best to be kept out of this. Simply sticking to whether it is coupled to ocean or not; ocean biology is left to be _data_.
…ntroduce logic to switch between binary and ExtData (netcdf) format- defaulting to binary, so as to get SAME answers; for now, 3. fix indentation
… data SSS feature will be via ExtData-ONLY. Default case sets SSS=30 as before to obtain SAME answers.
…used. @bena-nasa please check syntax for: MAPL_TerminateImport on line 786. Thank you!
…nary file, that is read by MAPL_ReadForcing
…nary file, that is read by MAPL_ReadForcing. Nullify pointers at declaration.
…ry data, replaced character strings with simpler logical variables.
@sanAkel sanAkel added enhancement New feature or request 0 diff The changes in this pull request have verified to be zero-diff with the target branch. labels Mar 11, 2022
@sanAkel sanAkel requested a review from a team as a code owner March 11, 2022 00:08
@sanAkel sanAkel self-assigned this Mar 11, 2022
@sanAkel
Copy link
Contributor Author

sanAkel commented Mar 11, 2022

@sdrabenh please consider merging this PR BEFORE #551
🙇‍♂️

bena-nasa
bena-nasa previously approved these changes Mar 11, 2022
yvikhlya
yvikhlya previously approved these changes Mar 11, 2022
@sdrabenh
Copy link
Collaborator

@mathomp4 it looks like gfortran is complaining about a type cast. @sanAkel would you mind fixing so both compilers are happy? Thanks

@mathomp4
Copy link
Member

@mathomp4 it looks like gfortran is complaining about a type cast. @sanAkel would you mind fixing so both compilers are happy? Thanks

I can fix it. it's something I recognize.

@mathomp4 mathomp4 dismissed stale reviews from yvikhlya and bena-nasa via 1b30b53 March 17, 2022 19:35
@mathomp4 mathomp4 requested review from yvikhlya and bena-nasa March 17, 2022 19:45
@sanAkel
Copy link
Contributor Author

sanAkel commented Mar 17, 2022

@mathomp4 🙏 for the quick fix

@sdrabenh
Copy link
Collaborator

@mathomp4 thanks! I don't know how you spot these things so easily

@sanAkel
Copy link
Contributor Author

sanAkel commented Mar 17, 2022

@mathomp4 thanks! I don't know how you spot these things so easily

yeah! Especially those spaces: " " 😮

@sdrabenh sdrabenh merged commit 29e454e into develop Mar 17, 2022
@sdrabenh sdrabenh deleted the feature/bmauer/extdata_ocean_forcing branch March 17, 2022 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 diff The changes in this pull request have verified to be zero-diff with the target branch. enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants