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

Remove snet from Noah LSM #669

Closed
climbfuji opened this issue May 28, 2021 · 17 comments · Fixed by #673 or #702
Closed

Remove snet from Noah LSM #669

climbfuji opened this issue May 28, 2021 · 17 comments · Fixed by #673 or #702
Assignees

Comments

@climbfuji
Copy link
Collaborator

Description

In PR, #627 a commit was made to remove snet (net solar radiation is computed from the incoming SW and albedo), but only from sfc_drv_ruc.F90. sfc_drv.f should also be modified for Noah LSM.

Solution

Remove snet from Noah LSM (check if it can be removed altogether) and compute it there from the radiation output.

Alternatives (optional)

No alternatives.

Related to (optional)

#627

@HelinWei-NOAA
Copy link
Collaborator

I modified radiation_surface.f, so the four albedo components over land will be outputted to GFS_radiation_surface.F90 with ialb=1 and then passed to lsm_drv.f. I added the following lines to radiation_surface.f:

        lsmalbdnir(i) = min(0.99,max(0.01,alndnb))
        lsmalbinir(i) = min(0.99,max(0.01,alndnd))
        lsmalbdvis(i) = min(0.99,max(0.01,alndvb))
        lsmalbivis(i) = min(0.99,max(0.01,alndvd))

and changed these four to intent(inout). But the model always crashed on these lines with the error (forrtl: severe (174): SIGSEGV, segmentation fault occurred). Dom, do you have any idea? Thanks.

@climbfuji
Copy link
Collaborator Author

These arrays may not be allocated for Noah LSM, can you check GFS_typedefs.F90?

@HelinWei-NOAA
Copy link
Collaborator

You are absolutely right. Nice catch. Thanks.

@HelinWei-NOAA
Copy link
Collaborator

So all three land surface models have these four common variables. Should I move them together? This will require more changes. Maybe we can do them later. For simplicity's sake, I can redefine them for Noah LSM. What is your suggestion?

@climbfuji
Copy link
Collaborator Author

climbfuji commented Jun 1, 2021 via email

@HelinWei-NOAA
Copy link
Collaborator

HelinWei-NOAA commented Jun 1, 2021 via email

@climbfuji
Copy link
Collaborator Author

climbfuji commented Jun 1, 2021 via email

@HelinWei-NOAA
Copy link
Collaborator

HelinWei-NOAA commented Jun 1, 2021 via email

@HelinWei-NOAA
Copy link
Collaborator

I am trying to make them optional for restart to see if it is working.

@HelinWei-NOAA
Copy link
Collaborator

With the change shown below, it is still not working and I got the same error (FATAL from PE 86: fms_io(restore_state_all): unable to find mandatory variable albivis_lnd in restart file sfc_data.tile3.nc)

!--- register the 2D fields
do num = 1,nvar_s2m
var2_p => sfc_var2(:,:,num)
if (trim(sfc_name2(num)) == 'sncovr'.or. trim(sfc_name2(num)) == 'tsfcl' .or. trim(sfc_name2(num)) == 'zorll' &
.or. trim(sfc_name2(num)) == 'zorli' .or. trim(sfc_name2(num)) == 'zorlwav'&
.or.trim(sfc_name2(num)) == 'albdvis_lnd' .or. trim(sfc_name2(num)) == 'albdnir_lnd' &
.or.trim(sfc_name2(num)) == 'albvis_lnd' .or. trim(sfc_name2(num)) == 'albnir_lnd') then
id_restart = register_restart_field(Sfc_restart, fn_srf, sfc_name2(num), var2_p, domain=fv_domain, mandatory=.false.)
else
id_restart = register_restart_field(Sfc_restart, fn_srf, sfc_name2(num), var2_p, domain=fv_domain)
endif
enddo

@climbfuji
Copy link
Collaborator Author

climbfuji commented Jun 1, 2021 via email

@HelinWei-NOAA
Copy link
Collaborator

@climbfuji
Copy link
Collaborator Author

We need PRs for ccpp-physics, fv3atm (and ufs-weather-model, even if it only is the update of the fv3atm submodule pointer). The submodule pointers and .gitmodules need to temporarily point to your branches so that

git clone -b your_branch_name --recursive https://github.com/HelinWei-NOAA/ufs-weather-model

will give exactly the same code that is in your different branches.

@HelinWei-NOAA
Copy link
Collaborator

Okay. I created a branch under my ufs-weather-model fork. This modification will also change all baseline runs with Noah LSM. Do I need to recreate those by myself?

@climbfuji
Copy link
Collaborator Author

Okay. I created a branch under my ufs-weather-model fork. This modification will also change all baseline runs with Noah LSM. Do I need to recreate those by myself?

It would be good to create baselines on hera with Intel and GNU (using rt.sh -c ...) and then verify against them (using rt.sh -m). This will make sure that all tests run to completion and are run-to-run reproducible. Since other PRs will be merged before your PR that may change the baseline, too, the code managers will assist with creating the final baselines on all platforms when it is time to commit.

@HelinWei-NOAA
Copy link
Collaborator

I used git clone -b remove_snet_from_noah_lsm --recursive https://github.com/HelinWei-NOAA/ufs-weather-model to check out the code, but I didn't get the right branch for both FV3 and ccpp-physics. Can you please take a look at .gitmodules in /scratch1/NCEPDEV/global/Helin.Wei/save/git/sync/snet/ufs-weather-model? Thanks.

@climbfuji
Copy link
Collaborator Author

I checked your directories, I see that both fv3atm and ccpp-physics point to your branches. What is the problem?

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