The OASIS Coupler Forum

  HOME

Unphysical values with 1st order conservative remapping. OpenIFS+NEMO

Up to Transformations and interpolations

Posted by Anonymous at September 13 2023

Good morning

I've been running a coupled model with OpenIFS (Tco95, approx 100km) and NEMO 3.6 (ORCA05, approx 50km) with GAUSWGT for almost all OASIS remappings. I'm using OASIS3-MCT5, and it's been working fine. 

I wanted to test 1st order conservative remapping as well. I've got all the corner points defined for all grids. 
But during the first coupling step I end up with unphysical values in SST (remapped ORCA05 -> L096) and heat flux, Qns (remapped A096 -> ORCA05). 
I've set the follwing for remapping SST from NEMO to OpenIFS:
CONSERV LR SCALAR LATITUDE 1 FRACNNEI FIRST

The bad values are all located along the periodic points on the NEMO grid, i.e. in the Indian Ocean along 73°E. 
OpenIFS is a reduced Gaussian grid with no periodic points, so I'm guessing something goes wrong during this remapping.  

I've noticed that the bad values happen at the last NEMO column (i=722) but not the first (i=1). 

Does someone with experience with CONSERV have some ideas what the problem could be? 

The namcouple settings are below. 
The full namcouple file is here: https://drive.google.com/file/d/1WhHS1FnAZfzt47KBYyzUBWSd9NbLpPRg/view?usp=drive_link
Plot of SST: https://drive.google.com/file/d/1t3hK97y6j9kUcKuEjlxFUGyZiMxXDmqW/view?usp=drive_link 
Plot of heat flux (zoomed in over Indian Ocean): https://drive.google.com/file/d/1LD2RkpeJRu__MXp8gU7KMve0N_B1kavS/view?usp=drive_link

Many thanks
Joakim



My setting for remapping SST is 

OIceFrac:O_SSTSST:O_TepIce:O_IceTck:O_SnwTck:O_OCurx1:O_OCury1 AIceFrac:A_SSTSST:A_TepIce:A_IceTck:A_SnwTck:A_OCurx1:A_OCury1 14 3600 3 sstocean EXPOUT
722 511 40320 1 opat L096 LAG=1800
P 2 P 0
LOCTRANS SCRIPR MAPPING
AVERAGE
CONSERV LR SCALAR LATITUDE 1 FRACNNEI FIRST
rmp_opat_to_L096_CONSERV_ORCA05.nc 

The "P 2 P 0" should inform OASIS that the NEMO grid has periodic points but that OpenIFS does not. 

For Qns (heat flux)

A_QsrMix:A_QnsMix:ATotRain:ATotSnow:AIceEvap:ATotEvap O_QsrMix:O_QnsMix:OTotRain:OTotSnow:OIceEvap:OTotEvap 8 3600 4 atmflx EXPOUT
40320 1 722 511 A096 opac LAG=1800
P 0 P 2
LOCTRANS SCRIPR MAPPING CONSERV
AVERAGE
CONSERV D SCALAR LATITUDE 1 FRACNNEI FIRST
rmp_A096_to_opac_CONSERV_ORCA05.nc 
GLBPOS

Some explanation: The "L096" and "A096" grids are identical except that A096 does not include land lakes. The "opat" and "opac" grids are identical except that "opac" has the periodic NEMO points (i=0 and i=722) masked. 

Posted by Anonymous at September 13 2023

Hi Joakin,

not sure that I can help you, but I am also working in a 1st order conservative remaping with Nemo, and one point that I think is quite delicate is the correct determination of the corner coordinates in the ORCA grids.
I think it would be helpful if you can share your oasis grid definition files (grids.nc, areas.nc and masks.nc), as well as the resulting remapping weight files (rmp_*.nc).
Best,
Chema

Posted by Anonymous at September 13 2023

Hi Joakim,
For the calculation of weights with SCRIPR/CONSERV, redundant cells have to be masked. In our ORCA1 configuration, for example, we mask the "column" i=1 and i=imax=362, and the line with j=jmax=332.
  Hoping this helps?
   Sophie

Posted by Anonymous at September 13 2023

Hi Chema and Sophie

I already had i=1 and i=imax=722 masked out. I also masked out j=jmax=511. 
Masking out j=jmax solved my bad values along j=jmax, but the ones at i=imax still remain despite both i=1 and i=imax being masked. 

My masks, grids, areas and rmp_opat_L096_CONSERV are here:
areas: https://drive.google.com/file/d/1UTT-tdxgQitc-A7OzxJPFwKTLweFUiXS/view?usp=drive_link
grids: https://drive.google.com/file/d/1zibKdZFKcoZjwEvZS5adMgalieh6PdsZ/view?usp=drive_link
masks: https://drive.google.com/file/d/1MoVCIDSMBeND08rDanUJVNaMNzqqHAtR/view?usp=drive_link
rmp: https://drive.google.com/file/d/1Tjir9k5VIsZz6axb0HSUN42_oak2FS-w/view?usp=drive_link

I activated the lp_debug_grid_corners=.true. in lib/scrip/src/grids.f90, and now I'm getting a few warnings of this kind: 

 WARNING : masked cell  351615 from dst grid opac does not contain its center
         grid_center lon and lat (deg)     72.85    49.78
         grid_corner   1 lon and lat (deg)     73.00    49.77
         grid_corner   2 lon and lat (deg)     72.71    49.80
         grid_corner   3 lon and lat (deg)     72.70    49.79
         grid_corner   4 lon and lat (deg)     73.00    49.76

So my corner points are not always correct. In the above example, the center is actually inside the corner points, but OASIS doesn't seem to understand it. 
This seems to happen a lot at lon=72.75 (NEMO periodic point) and at high latitudes (likely the north fold on the ORCA grid). 

None of the warnings are in the Indian Ocean around 73E,0N, so I don't think this is the problem actually. 

Thanks!
/Joakim

Posted by Anonymous at September 14 2023

So, it looks like you have the redundant cells that Sophie mentioned masked in the opac grid, but not in opat, which you are using as the source grid for the SCRIPR/CONSERV regrid. Could that be a problem?

Posted by Anonymous at September 14 2023

Good morning

No, I changed the namcouple file so that all interpolations are done to the "opac" grid where i=1, i=imax, j=1, j=jmax are all masked out. 
Forgot to update this, but now the new namcouple is here
https://drive.google.com/file/d/1WhHS1FnAZfzt47KBYyzUBWSd9NbLpPRg/view?usp=drive_link

The problem can be seen for QnsMix (heat flux) here: https://drive.google.com/file/d/1LD2RkpeJRu__MXp8gU7KMve0N_B1kavS/view?usp=drive_link
It's a zoom-in close to i=imax. It's clear that the last column is masked, but the bad values are at i=imax-1. 

I could mask out i=imax-1 as well, but then this longitude would never be represented as its "twin" i=1 is also masked. 

Best 
Joakim

Posted by Anonymous at September 14 2023

Hi all

An update: I think I may have solved the problem by masking out i=imax-1 and i=imax, but leaving i=1 unmasked. 

The mask files I used came from an old model version where we used SCIPR/CONSERV with OASIS3-MCT2.8. 

Perhaps something has changed since then so that with OASIS3-MCT5 it is necessary to mask i=imax-1 and i=imax instead. 

I will continue the run to check how it behaves, but the bad values are gone for now. 

Best wishes
Joakim

Posted by Anonymous at September 14 2023

Godd morning,
there is one thing about the updated namcouple, in this section:

OIceFrac:O_SSTSST:O_TepIce:O_IceTck:O_SnwTck:O_OCurx1:O_OCury1 AIceFrac:A_SSTSST:A_TepIce:A_IceTck:A_SnwTck:A_OCurx1:A_OCury1 14 3600 3 sstocean EXPOUT
722 511 40320 1 opac L096 LAG=1800
P 2 P 0
LOCTRANS SCRIPR MAPPING
AVERAGE
CONSERV LR SCALAR LATITUDE 1 DESTAREA FIRST
rmp_opat_to_L096_CONSERV_FRACAREA_ORCA05.nc dst
#CONSERV LR SCALAR LATITUDE 1 FRACNNEI FIRST
#rmp_opat_to_L096_CONSERV_ORCA05.nc dst 
#GAUSWGT LR SCALAR LATITUDE 1 9 2
#rmp_opat_to_L096_GAUSWGT_ORCA05.nc dst

The file with weights that you are using for the MAPPING transformation is rmp_opat_to_L096_CONSERV_FRACAREA_ORCA05.nc, which could have been generated previously from the opat grid definition. Also, the name of the file does not seem to correspond to the options in the CONSERV operation (DESTAREA vs. FRACAREA).

Best,
Chema
Reply to this