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

Update NEMS for CDEPS component #92

Merged
merged 7 commits into from
May 5, 2021

Conversation

binli2337
Copy link
Contributor

@binli2337 binli2337 commented Mar 11, 2021

  1. The existing data atmosphere model component will be renamed "nems_data".
  2. The CDEPS data atmosphere model component will be added to module_EARTH_GRID_COMP.F90. The name of the CDEPS data atmosphere model component will be "datm".

fixes: #99

@@ -3596,8 +3599,9 @@ subroutine SetModelServices(driver, rc)
file=__FILE__, rcToReturn=rc)
return ! bail out
#endif
elseif (trim(model) == "datm") then
#ifdef FRONT_DATM
elseif (trim(model) == "datm" .or. trim(model) == "datm_cfsr" .or. &
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these CDEPS data atmosphere? I think this implementation is not flexible enough because you need to add a line for each specific datm stream. At this level model only need to know the datm not the stream used in CDEPS. So, only datm is enough for driver at this point. Please refer to following version of the file found in hafs-community#3

Choose a reason for hiding this comment

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

Yes, we need to remove datm_cfsr and datm_gefs because the way to configure the DATM input data is via its namelist. Moreover, the driver does not need to know what the source of the data is. Also, this approach means we'd need to change the driver to add a new data source to CDEPS. All good reasons why we only need DATM at the driver level. This is important to get right.

Copy link
Contributor

Choose a reason for hiding this comment

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

@rsdunlapiv So you're saying that nems.configure will have the atm model either datm (=nemsdatm), datm_cfsr (=cdeps,cfsr source) or datm_gefs (cdeps,gefs source). There is nothing in the driver it self that is needed to distinguish those options.

elseif (trim(model) == "datm") then
#ifdef FRONT_DATM
elseif (trim(model) == "datm" .or. trim(model) == "datm_cfsr" .or. &
trim(model) == "datm_gefs") then
Copy link
Contributor

Choose a reason for hiding this comment

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

This is same with the previous one.

@junwang-noaa
Copy link
Collaborator

junwang-noaa commented Mar 18, 2021 via email

@uturuncoglu
Copy link
Contributor

uturuncoglu commented Mar 18, 2021 via email

@rsdunlapiv
Copy link

@junwang-noaa @DeniseWorthen yes, I think @junwang-noaa has this right. The driver just knows that there is a data atmopshere component that must be included and the run sequence says where to call it. At a lower level in the configuration is where DATM is actually configured with some specific input data streams.

@DeniseWorthen
Copy link
Contributor

OK, thanks. I think we're all on the same page here? Do we actually need any changes to module_EARTH_GRID_COMP.F90?

@binli2337
Copy link
Contributor Author

binli2337 commented Mar 18, 2021

The NEMS_datm and CDEPS_DATM (here datm_cfsr or datm_gefs) use different land-sea masks. Once NEMS_datm is removed, this temporary fix can also be removed. Please also see the temporary fix in med_map_mod.F90 in CMEPS.

@DeniseWorthen
Copy link
Contributor

@binli2337 I think I understand your point. But if you used

if (model(1:4) == "datm") then 

Then no change would be required to this routine when we drop the nemsDATM. Is that right?

@junwang-noaa
Copy link
Collaborator

junwang-noaa commented Mar 18, 2021 via email

@binli2337
Copy link
Contributor Author

@junwang-noaa , The current CMEPS version works for other CDEPS sources only under "hafs" coupling mode.

* The name of the NEMS data atmosphere model is changed to nems_datm.
* The name of the CDEPS atmosphere model will be datm.
@uturuncoglu
Copy link
Contributor

uturuncoglu commented Mar 22, 2021

@binli2337 I think that the masking of the data component can be modified by changing mask variable in ESMF Mesh file but the only important point is that the masking of the components are handled in the CMEPS in the following line https://github.com/ESCOMP/CMEPS/blob/ad106b0208739b819dba98a88225edfd6e093773/mediator/med_map_mod.F90#L279 and currently we set it as 1 for datm (ERA5). So, you might want to be consistent with that. This part of code needs to be more generic and requires work in CMEPS side.

@binli2337
Copy link
Contributor Author

@DeniseWorthen @junwang-noaa @rsdunlapiv @uturuncoglu
I have revised module_EARTH_GRID_COMP.F90 to separate "nems_datm" and "datm" (used for CDEPS). Please take a look to see if the changes are OK.

In the past, when CICE5 and MOM5 were removed, the parts related to cice5 and mom5 remained in the module_EARTH_GRID.COM.F90 file.

When nems_datm is removed in the future, the nems_datm related parts can also remain in the module_EARTH_GRID_COM.F90 file.

@junwang-noaa
Copy link
Collaborator

junwang-noaa commented Mar 22, 2021 via email

elseif (trim(model) == "datm") then
#ifdef FRONT_DATM
elseif (trim(model) == "nems_datm") then
#ifdef FRONT_NEMS_DATM
Copy link
Contributor

Choose a reason for hiding this comment

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

@binli2337 @junwang-noaa I think we don't need to have same code twice in here. You could use #if defined FRONT_NEMS_DATM || defined FRONT_CDEPS_DATM and remove extra if statement in here. This is already working under HAFS fork.

@binli2337 binli2337 changed the title Revised module_EARTH_GRID_COMP.F90 for datm_cfsr and datm_gefs compon… Update NEMS for CDEPS component Apr 21, 2021
@MinsukJi-NOAA MinsukJi-NOAA merged commit b593c6c into NOAA-EMC:develop May 5, 2021
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.

Update NEMS to include CDEPS component
6 participants