Skip to content

SH2O had two appearances in call to ssttep routine#833

Merged
davegill merged 1 commit intowrf-model:developfrom
davegill:sh2o_in_out
Mar 26, 2019
Merged

SH2O had two appearances in call to ssttep routine#833
davegill merged 1 commit intowrf-model:developfrom
davegill:sh2o_in_out

Conversation

@davegill
Copy link
Contributor

@davegill davegill commented Mar 22, 2019

TYPE: bug fix

KEYWORDS: Noah LSM sh2o unified MPAS

SOURCE: internal

DESCRIPTION OF CHANGES:
Problem:
A single variable was used as two calling arguments in a subroutine. Inside the subroutine, the
separate names were pointing to the same memory and were treated differently.

Solution:
Since the two instances of the array were treated as IN and OUT, a copy of the array was made and
passed in as separately named input field. There were two locations to fix.

LIST OF MODIFIED FILES:
M phys/module_sf_noahlsm.F

TESTS CONDUCTED:

  1. Comparing the results before vs after show no bit-for-bit differences (what we wanted).
../../external/io_netcdf/diffwrf INIT_develop/wrfout_d01_2000-01-24_12:00:00 INIT_FIX_dev/wrfout_d01_2000-01-24_12:00:00 
 Just plot  F
Diffing INIT_develop/wrfout_d01_2000-01-24_12:00:00 INIT_FIX_dev/wrfout_d01_2000-01-24_12:00:00
 Next Time 2000-01-24_12:00:00
     Field   Ndifs    Dims       RMS (1)            RMS (2)     DIGITS    RMSE     pntwise max
 Next Time 2000-01-24_12:03:00
     Field   Ndifs    Dims       RMS (1)            RMS (2)     DIGITS    RMSE     pntwise max
 Next Time 2000-01-24_12:06:00
     Field   Ndifs    Dims       RMS (1)            RMS (2)     DIGITS    RMSE     pntwise max
 Next Time 2000-01-24_12:09:00
     Field   Ndifs    Dims       RMS (1)            RMS (2)     DIGITS    RMSE     pntwise max
 Next Time 2000-01-24_12:12:00
     Field   Ndifs    Dims       RMS (1)            RMS (2)     DIGITS    RMSE     pntwise max
  1. When the code was instrumented, the only differences were diagnostic only. No differences in any other WRF output fields. See Checking intent (inout) vs (out) for shared version of WRF-MPAS Noah LSM davegill/WRF#5

@davegill davegill requested a review from a team as a code owner March 22, 2019 22:50
@weiwangncar
Copy link
Collaborator

I'm ok with the change.

@davegill
Copy link
Contributor Author

@mgduda
Michael,
This is an email so that you can easily find this Noah LSM change.
The purpose is to see if the intent(out) -> intent(inout) mods can be removed.

@davegill davegill merged commit aa947dd into wrf-model:develop Mar 26, 2019
@davegill davegill deleted the sh2o_in_out branch April 15, 2019 21:28
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.

4 participants