Skip to content

Adding scale_factor and add_offset for horiz_interp_and_extrap_tracer_record#960

Merged
adcroft merged 1 commit into
mom-ocean:dev/gfdlfrom
breichl:user/bgr/Init_from_Z_add_scale_offset
Jul 23, 2019
Merged

Adding scale_factor and add_offset for horiz_interp_and_extrap_tracer_record#960
adcroft merged 1 commit into
mom-ocean:dev/gfdlfrom
breichl:user/bgr/Init_from_Z_add_scale_offset

Conversation

@breichl
Copy link
Copy Markdown
Collaborator

@breichl breichl commented Jul 23, 2019

  • In MOM_horizontal_regridding.F90 when reading from NetCDF in subroutine horiz_interp_and_extrap_tracer_record we do not currently check for offset and scale factors. This adds the capability to read and use each factor, defaulting to 0 and 1 respectively if they are absent.

  • These adjustments are not applied to values that have the value of _FillValue.

  • Tested 1 case initializing temperature and salinity from a file that does not include these factors and got the same answers with this code change. Tested another case that does include these factors for the temperature and salinity files and now successfully initialize with the correct values.

…netCDF inputs in horiz_interp_and_extrap_tracer_record
Copy link
Copy Markdown
Collaborator

@adcroft adcroft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Collaborator

@adcroft adcroft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correct to me.

Testing at https://gitlab.gfdl.noaa.gov/ogrp/MOM6/pipelines/8520

Passed

@adcroft adcroft merged commit 9bd3f00 into mom-ocean:dev/gfdl Jul 23, 2019
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.

2 participants