Closed rmontuoro closed 4 years ago
I have made a change to swio.wam.rc file to assign the missing values to -9999. Everything looks good and behaves as expected. I am going to approve it.
I need the response from Raffaele to my concern issue in my email.
The following is the content of my email.
I checked the SWIO code just now, aiming to change the missing value of SWIO and the output at the two pole-points.
It looks quite straightforward to do it by changing the 'outputCount' value in the source code. we only need to initialize the value of the variable 'outputCount' into integer '-99999999' instead of '0' in swio.F90; in swio_methods.F90, for Line 1225, if (this % outputCount == 0) then, we need to change the value 0 into -99999999.
I already pushed a new branch on GSMWAM-IPE repository, which named 'swio_missing_value', please have a look at it. Here I would like to state a concern about the code design in swio.F90, hope it is just due to my unfamilitarity on the codes. 🙂
my concern is that on Line 820 in swio.F90, there is only code
! initialize I/O layer ! line 819
if (this % outputCount > 0) then ! Line 820
for case of 'outputCount> 0',
in 'else' case of this 'if' block, I saw the following,
if (btest(verbosity,8)) then
call ESMF_LogWrite(trim(name)//": "//rName//": I/O not initialized"&
//" - No fields present", ESMF_LOGMSG_INFO, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=LINE, &
file=FILE)) &
return ! bail out
endif
endif
Does that mean the code can only deal with the 'postive' value case of the variable? Hope you don't mind if it is a silly question since I haven't got time to go through this code and the other related code very much.
With Tzu-Wei's response below, now I understand that the revise of the code isn't necessary, The current method Raffaele applied is to find the locations where neutral temperature equal to 0 to mark it as -9999 (since temperature shouldn’t be zero). These locations found in temperature field are applied to all the variables with the same missing value in gsm file. I need the comments on my concern above now. Is there still the same variable of Temerature using as a target variable? most likely it is, while I need confirmation.
Excuse me for not reading the related codes for several hours before this.
Tzu-Wei & Adam, could you please confirm my concern issue?
outputCount is not used as a blanket value for anything, nor does it have to do with the value of any particular fields. If that were true, wind values which can be positive or negative would not work with SWIO.
adam@topaz:~/work/GSMWAM-IPE/SWIO$ git grep outputCount
src/swio.F90: this % outputCount = 0
src/swio.F90: if (this % outputCount > 0) then
src/swio_calculator.F90: this % outputCount = this % outputCount + item
src/swio_data.F90: integer :: outputCount
src/swio_methods.F90: if (this % outputCount == 0) then
src/swio_methods.F90: this % outputCount = this % outputCount + item
item
is essentially just a count of the valid output fields as defined in the SWIO resource file associated with each component. As far as I can tell, this PR introduces a method by which to assign a default value for unfilled fields on a per-field basis, addressing your concerns without need for further code changes (which we can't see because you haven't pushed the SWIO changes associated with your GSMWAM-IPE branch). If I'm missing something, please let me know.
oops, seems you are right, Adam. I didn't check #4 before my revise. Also didn't commit the revised code correctly, maybe too rush at that moment. The good thing is that we don't need the revised code anymore. going to delete it, thanks.
I merged the code to develop.
This PR introduces updates described in SWIO PR #4.