NOAA-EMC / WW3

WAVEWATCH III
Other
267 stars 545 forks source link

Exporting radiation stress components through new NUOPC cap #1110

Open uturuncoglu opened 1 year ago

uturuncoglu commented 1 year ago

Is your feature request related to a problem? Please describe. The WW3+SCHSIM coupling requires following fields to be exported from WW3.

and at this point the fields are not available through the new cap (or mesh cap provided by CESM). The missing fldlist_add() calls preventing to export those fields even if wiring with the internal data structures (such as wavsuu to sxxn) done in model/src/wav_import_export.F90. Maybe I am missing something but it seems that if I add fldlist_add() call, I could able to pass those fields to SCHSIM.

Describe the solution you'd like Required modification can be done in the new cap to provide those fields.

Describe alternatives you've considered The old cap can be used but there are some feature in the new cap that is used in UFS Coastal (DATM+WW3 configuration).

Additional context N/A

DeniseWorthen commented 1 year ago

Hi @uturuncoglu I think this is exactly right. You could add the needed fields where we have the Sw_z0 field added, so it won't impact CESM. Then there will be something on the CMEPS side for the SCHISM model requesting those fields, so it should have no impact on UFS if you're running MOM6 or HYCOM.

      call fldlist_add(fldsFrWav_num, fldsFrWav, 'Sw_z0')
uturuncoglu commented 1 year ago

@DeniseWorthen Testing now. I have already wiring for those fields in the CMEPS side. I am using different coupling mode for coastal application at this point but once everything work without any issue, I think those can be ported to nems coupling mode. Anyway, I'll keep you updated.

uturuncoglu commented 1 year ago

@DeniseWorthen It seems it is working with following changes,

diff --git a/model/src/wav_import_export.F90 b/model/src/wav_import_export.F90
index 025edb6..40e9814 100644
--- a/model/src/wav_import_export.F90
+++ b/model/src/wav_import_export.F90
@@ -145,6 +145,9 @@ contains
       !call fldlist_add(fldsFrWav_num, fldsFrWav, 'Sw_hstokes')
     else
       call fldlist_add(fldsFrWav_num, fldsFrWav, 'Sw_z0')
+      call fldlist_add(fldsFrWav_num, fldsFrWav, 'Sw_wavsuu')
+      call fldlist_add(fldsFrWav_num, fldsFrWav, 'Sw_wavsuv')
+      call fldlist_add(fldsFrWav_num, fldsFrWav, 'Sw_wavsvv')
     end if
     call fldlist_add(fldsFrWav_num, fldsFrWav, 'Sw_pstokes_x', ungridded_lbound=1, ungridded_ubound=3)
     call fldlist_add(fldsFrWav_num, fldsFrWav, 'Sw_pstokes_y', ungridded_lbound=1, ungridded_ubound=3)
@@ -717,14 +720,14 @@ contains
       call CalcBotcur( va, wbcuru, wbcurv, wbcurp)
     end if

-    if ( state_fldchk(exportState, 'wavsuu') .and. &
-         state_fldchk(exportState, 'wavsuv') .and. &
-         state_fldchk(exportState, 'wavsvv')) then
-      call state_getfldptr(exportState, 'sxxn', sxxn, rc=rc)
+    if ( state_fldchk(exportState, 'Sw_wavsuu') .and. &
+         state_fldchk(exportState, 'Sw_wavsuv') .and. &
+         state_fldchk(exportState, 'Sw_wavsvv')) then
+      call state_getfldptr(exportState, 'Sw_wavsuu', sxxn, rc=rc)
       if (ChkErr(rc,__LINE__,u_FILE_u)) return
-      call state_getfldptr(exportState, 'sxyn', sxyn, rc=rc)
+      call state_getfldptr(exportState, 'Sw_wavsuv', sxyn, rc=rc)
       if (ChkErr(rc,__LINE__,u_FILE_u)) return
-      call state_getfldptr(exportState, 'syyn', syyn, rc=rc)
+      call state_getfldptr(exportState, 'Sw_wavsvv', syyn, rc=rc)
       if (ChkErr(rc,__LINE__,u_FILE_u)) return
       call CalcRadstr2D( va, sxxn, sxyn, syyn)
     end if

but I did not check the output of individual model components. I'll do it as a next step.

uturuncoglu commented 1 year ago

@DeniseWorthen I add SXY to the namelist file as output and it is all zero. I also check SCHSIM import state and all the received fields are zero. Maybe we need to activate some switch in WW3 side to provide radiation stresses or maybe there is a bug in the code. I am not sure what is the issue at this point.

uturuncoglu commented 1 year ago

@DeniseWorthen I am also checking similar code such as sxxn in WW3/model/src/wmesmfmd.F90. It seems that in some case it calculates with similar way that is done in mesh cap and some time it assigns to following (when USE_W3OUTG_FOR_EXPORT is activated. this is Macro for enabling using W3OUTG to calculate export fields and by default it is disabled or based on the value of LPDLIB like if ( LPDLIB .EQV. .FALSE. ) then),

          sxxn(jsea) = sxx(jsea)
          sxyn(jsea) = sxy(jsea)
          syyn(jsea) = syy(jsea)

I am not sure but maybe this part of code is not ready to use. I'll try to do the same in mesh cap to see what happens.

DeniseWorthen commented 1 year ago

@uturuncoglu You shouldn't need the macro to export the field and the pdlib option should work automatically via the use of nseal_cpl and call init_get_isea(isea, jsea).

uturuncoglu commented 1 year ago

@DeniseWorthen I checked the call CalcRadstr2D( va, sxxn, sxyn, syyn) call and the input value of va. It is all zero. Maybe we need to activate a switch etc.

DeniseWorthen commented 1 year ago

@uturuncoglu I ran the S2SW case (cpld_control_noaero_p8_intel), which is not unstructured, and I get non-zero output fields from mediator history files. This is a a single location over the 24hrs

Screenshot 2023-10-26 at 8 29 43 AM

I don't see anything that should be switch dependent to get output. I'll try the pdlib case too.

uturuncoglu commented 1 year ago

@DeniseWorthen Okay. It is good to know. I could try to run that case and compare the namelists. In my case, I am using PDLIB. So, it would be nice to confirm that it is also working. Thanks for your help.

DeniseWorthen commented 1 year ago

@uturuncoglu I tried the cpld_control_pdlib_p8 case and also got non-zero fields for the exported fields.

uturuncoglu commented 1 year ago

@DeniseWorthen Okay let me check in my side. I think you already applied my changes to see those fields in the mediator history and you are using mesh cap. Right?

DeniseWorthen commented 1 year ago

Yes, I added your changes and then in CMEPS I just allowed them to be advertised so I could see them in the history file.

       call addfld_from(compwav, 'Sw_wavsuu')
       call addfld_from(compwav, 'Sw_wavsuv')
       call addfld_from(compwav, 'Sw_wavsvv')
uturuncoglu commented 1 year ago

@DeniseWorthen I could run and reproduce your results. So, they are not zero in cpld_control_pdlib_p8. At this point, I wonder if there are some difference in mod_def.ww3. Maybe cpld_control_pdlib_p8 is configured with different options than my case or maybe it is just because of mesh. Is it possible to see those options? Is this application with unstructured mesh - may be not since it is global? Maybe this issue specific to unstructured mesh. Not sure. Any idea?

DeniseWorthen commented 1 year ago

@uturuncoglu The pdlib case I tried runs an unstructured global mesh. I can't think of why this would be mesh dependent. You can see the options used to create the mod_def on orion here:

/work/noaa/epic/UFS-WM_RT/NEMSfv3gfs/input-data-20221101/WW3_input_data_20220624/createmoddefs/ww3_grid.inp.exp.global_270k
uturuncoglu commented 1 year ago

@DeniseWorthen That is really helpful. Thanks. I see some difference in the namelist section if I compare the files. For me it is hard to understand those options. Maybe something in the SWITCH definition. Not sure? Is there anyone that has more experience about understanding ww3_grid.inp and its potential difference.

DeniseWorthen commented 1 year ago

@uturuncoglu These are the switch files we use to compile the meshcap code (this should be set automatically when you ask for -DPDLIB)

NCO PDLIB SCOTCH NOGRB DIST MPI PR3 UQ FLX0 SEED ST4 STAB0 NL1 BT1 DB1 MLIM FLD2 TR0 BS0 RWND WNX1 WNT1 CRX1 CRT1 O0 O1 O2 O3 O4 O5 O6 O7 O14 O15 IC0 IS0 REF0

Maybe one of your collaborators at Coastal or @MatthewMasarik-NOAA or @JessicaMeixner-NOAA could provide additional insight.

uturuncoglu commented 1 year ago

@DeniseWorthen Okay. Then it is not an issue of switch since I am compiling WW3 code with -DPDLIB. So, they will have same options. There must be some option in the ww3_grid.inp that leads to the difference.

DeniseWorthen commented 1 year ago

@uturuncoglu It might be helpful if you could post your grid_inp file also. And perhaps @aliabdolali is someone else who might have insight.

uturuncoglu commented 1 year ago

@DeniseWorthen I think @aliabdolali created this configuration in coastal app. Here is the content of the file,

$ -------------------------------------------------------------------- $
$ WAVEWATCH III Grid preprocessor input file                           $
$ -------------------------------------------------------------------- $
$ Grid name (C*30, in quotes)
$
  'Inlet'
$
$ Frequency increment factor and first frequency (Hz) ---------------- $
$ number of frequencies (wavenumbers) and directions, relative offset
$ of first direction in terms of the directional increment [-0.5,0.5].
$ In versions 1.18 and 2.22 of the model this value was by definiton 0,
$ it is added to mitigate the GSE for a first order scheme. Note that
$ this factor is IGNORED in the print plots in ww3_outp.
$
 1.10 0.05 32 36 0.
$
$ Set model flags ---------------------------------------------------- $
$  - FLDRY         Dry run (input/output only, no calculation).
$  - FLCX, FLCY    Activate X and Y component of propagation.
$  - FLCTH, FLCK   Activate direction and wavenumber shifts.
$  - FLSOU         Activate source terms.
$
   F T T T T T
$
$ Set time steps ----------------------------------------------------- $
$ - Time step information (this information is always read)
$     maximum global time step, maximum CFL time step for x-y and 
$     k-theta, minimum source term time step (all in seconds).
$
$
   100. 100. 100. 100.                              
$
$ Start of namelist input section ------------------------------------ $
$   Starting with WAVEWATCH III version 2.00, the tunable parameters
$   for source terms, propagation schemes, and numerics are read using
$   namelists. Any namelist found in the folowing sections up to the
$   end-of-section identifier string (see below) is temporarily written
$   to ww3_grid.scratch, and read from there if necessary. Namelists
$   not needed for the given switch settings will be skipped
$   automatically, and the order of the namelists is immaterial.
$
$ This is TEST405
$
&SIN4 BETAMAX = 1.55, ZALP=0.006, ZWND = 5.,
Z0MAX = 0.0020, SINTHP=2.0, SWELLFPAR = 3, SWELLF = 0.80,
TAUWSHELTER = 0.0, SWELLF2=-0.018, SWELLF3= 0.015, Z0RAT = 0.04,
SWELLF4 = 100000, SWELLF5 = 1.2 /
$&SDS4 SDSBCHOICE = 1.0, SDSC2 = -0.2200E-04, SDSCUM = -0.40, 
$      SDSC4 =  1.00, SDSC5 =  0.0000E+00, SDSC6 =  0.3000E+00,
$      WNMEANP =0.50, FXPM3 =4.00, FXFM3 = 2.5, FXFMAGE = 0.000, 
$      SDSBINT =  0.3000E+00, SDSBCK =  0.0000E+00, SDSABK = 1.500, SDSPBK = 4.000, 
$      SDSHCK = 1.50, SDSBR =   0.9000E-03, SDSSTRAIN =  0.0, SDSSTRAINA =15.0, SDSSTRAIN2 =  0.0, 
$      SDSBT = 0.00, SDSP = 2.00, SDSISO = 2, SDSCOS =2.0, SDSDTH = 80.0, 
$      SDSBRF1 =  0.50, SDSBRFDF = 0, 
$      SDSBM0 =  1.00, SDSBM1 = 0.00, SDSBM2 = 0.00, SDSBM3 = 0.00, SDSBM4 = 0.00, 
$      SPMSS =  0.50, SDKOF = 3.00, SDSMWD = 0.90, SDSFACMTF =400.0, 
$      SDSMWPOW =1.5, SDSNMTF = 1.00, SDSCUMP =2.0, SDSNUW =.000E+00, 
$      WHITECAPWIDTH = 0.30 WHITECAPDUR = 0.56 /
$
&OUTS E3D = 1, TH1MF = 1, STH1MF = 1 /
&UNST UGOBCAUTO = F,
  UGOBCDEPTH= -10.,
  EXPFSN = F,
  EXPFSPSI = F,
  EXPFSFCT = F,
  IMPFSN = F,
  EXPTOTAL = F,
  IMPTOTAL = T,
  IMPREFRACTION = T,
  IMPFREQSHIFT = T,
  IMPSOURCE = T,
  SETUP_APPLY_WLV = F,
  SOLVERTHR_SETUP=1E-14,
  CRIT_DEP_SETUP=0.1,
  JGS_USE_JACOBI = T,
  JGS_BLOCK_GAUSS_SEIDEL = T,
  JGS_TERMINATE_MAXITER = T,
  JGS_MAXITER = 1000,
  JGS_TERMINATE_NORM = F,
  JGS_TERMINATE_DIFFERENCE = T,
  JGS_DIFF_THR = 1.E-8,
  JGS_PMIN = 3.0,
  JGS_LIMITER = F,
  JGS_NORM_THR = 1.E-20 /
$
$ Bottom friction  - - - - - - - - - - - - - - - - - - - - - - - - - -
$   JONSWAP             : Namelist SBT1
$                           GAMMA   : As it says.
$  &SBT1 GAMMA = 0.15 /
$
$ Propagation schemes ------------------------------------------------ $
$   First order         : Namelist PRO1
$                           CFLTM  : Maximum CFL number for refraction.
$
$   UQ with diffusion   : Namelist PRO2
$                           CFLTM  : Maximum CFL number for refraction.
$                           FLSOFT : Flag for 'soft' land boundaries.
$                           DTIME  : Swell age (s) in garden sprinkler
$                                    correction. If 0., all diffusion
$                                    switched off. If small non-zero
$                                    (DEFAULT !!!) only wave growth
$                                    diffusion.
$                           LATMIN : Maximum latitude used in calc. of
$                                    strength of diffusion for prop.
$
$   UQ with averaging   : Namelist PRO3
$                           CFLTM  : Maximum CFL number for refraction.
$                           FLSOFT : Flag for 'soft' land boundaries.
$                           WDTHCG : Tuning factor propag. direction.
$                           WDTHTH : Tuning factor normal direction.
$
$   UQ with divergence  : Namelist PRO4
$                           CFLTM  : Maximum CFL number for refraction.
$                           FLSOFT : Flag for 'soft' land boundaries.
$                           QTFAC  : Tuning factor Eq. (3.41).
$                           RSFAC  : Tuning factor Eq. (3.42).
$                           RNFAC  : Tuning factor Eq. (3.43).
$
$ Miscellaneous ------------------------------------------------------ $
$   Misc. parameters    : Namelist MISC
$                           CICE0  : Ice concentration cut-off.
$                           CICEN  : Ice concentration cut-off.
$                           XSEED  : Xseed in seeding alg. (!/SEED).
$                           FLAGTR : Indicating presence and type of
$                                    subgrid information :
$                                     0 : No subgrid information.
$                                     1 : Transparancies at cell boun-
$                                         daries between grid points.
$                                     2 : Transp. at cell centers.
$                                     3 : Like 1 with cont. ice.
$                                     4 : Like 2 with cont. ice.
$                           XP, XR, XFILT
$                                    Xp, Xr and Xf for the dynamic
$                                    integration scheme.
&REF1 REFCOAST=0.1  /
$
$ In the 'Out of the box' test setup we run with sub-grid obstacles 
$ and with continuous ice treatment.
$
$
$ Mandatory string to identify end of namelist input section.
$
END OF NAMELISTS
$
$ FLAG for grid features
$ 1 Type of grid 'UNST' 'RECT' 'CURV'
$ 2 Flag for geographical coordinates (LLG)
$ 3 Flag for periodic grid
$                        
$ Define grid -------------------------------------------------------- $
$ Four records containing :
$  1 NX, NY. As the outer grid lines are always defined as land
$    points, the minimum size is 3x3.
$  2 Grid increments SX, SY (degr.or m) and scaling (division) factor.
$    If NX*SX is 360., latitudinal closure is applied.
$  3 Coordinates of (1,1) (degr.) and scaling (division) factor.
$  4 Limiting bottom depth (m) to discriminate between land and sea
$    points, minimum water depth (m) as allowed in model, unit number
$    of file with bottom depths, scale factor for bottom depths (mult.),
$    IDLA, IDFM, format for formatted read, FROM and filename.
$      IDLA : Layout indicator :
$                  1   : Read line-by-line bottom to top.
$                  2   : Like 1, single read statement.
$                  3   : Read line-by-line top to bottom.
$                  4   : Like 3, single read statement.
$      IDFM : format indicator :
$                  1   : Free format.
$                  2   : Fixed format with above format descriptor.
$                  3   : Unformatted.
$      FROM : file type parameter
$               'UNIT' : open file by unit number only.
$               'NAME' : open file by name and assign to unit.
$
$ Example for longitude-latitude grid (switch !/LLG), for Cartesian
$ grid the unit is meters (NOT km).
$
$ 
 'UNST' T F 
$
    4.0 0.30  20  -1. 4 1 '(20f10.2)'  'NAME' 'inlet.msh'
$
$ If the above unit number equals 10, the bottom data is read from 
$ this file and follows below (no intermediate comment lines allowed).
$
$   1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
$
$ If sub-grid information is avalaible as indicated by FLAGTR above,
$ additional input to define this is needed below. In such cases a
$ field of fractional obstructions at or between grid points needs to 
$ be supplied.  First the location and format of the data is defined
$ by (as above) :
$  - Unit number of file (can be 10, and/or identical to bottem depth
$    unit), scale factor for fractional obstruction, IDLA, IDFM,
$    format for formatted read, FROM and filename
$
$   10 0.2  3 1 '(....)' 'NAME' 'obstr.inp'
$
$ *** NOTE if this unit number is the same as the previous bottom
$     depth unit number, it is assumed that this is the same file
$     without further checks.                                      ***
$
$ If the above unit number equals 10, the bottom data is read from 
$ this file and follows below (no intermediate comment lines allowed,
$ except between the two fields).
$
$  0 0 0 0 0 0 0 0 0 0 0 0
$  0 0 0 0 0 0 0 0 0 0 0 0
$  0 0 0 0 0 0 0 0 0 0 0 0
$  0 0 0 0 0 0 0 0 0 0 0 0
$  0 0 0 0 0 0 0 0 0 0 0 0
$  0 0 0 0 0 0 5 0 0 0 0 0
$  0 0 0 0 0 0 5 0 0 0 0 0
$  0 0 0 0 0 0 4 0 0 0 0 0
$  0 0 0 0 0 0 4 0 0 0 0 0
$  0 0 0 0 0 0 5 0 0 0 0 0
$  0 0 0 0 0 0 5 0 0 0 0 0
$  0 0 0 0 0 0 0 0 0 0 0 0
$
$  0 0 0 0 0 0 0 0 0 0 0 0
$  0 0 0 0 0 0 0 0 0 0 0 0
$  0 0 0 0 0 0 0 0 0 0 0 0
$  0 0 0 0 0 0 0 0 0 0 0 0
$  0 0 0 0 0 0 0 0 5 5 5 0
$  0 0 0 0 0 0 0 0 0 0 0 0
$  0 0 0 0 0 0 0 0 0 0 0 0
$  0 0 0 0 0 0 0 0 0 0 0 0
$  0 0 0 0 0 0 0 0 0 0 0 0
$  0 0 0 0 0 0 0 0 0 0 0 0
$  0 0 0 0 0 0 0 0 0 0 0 0
$  0 0 0 0 0 0 0 0 0 0 0 0
$
$ *** NOTE size of fields is always NX * NY                        ***
$
   10 3 1 '(....)' 'PART' 'mapsta.inp'
$ Input boundary points ---------------------------------------------- $
$   An unlimited number of lines identifying points at which input 
$   boundary conditions are to be defined. If the actual input data is
$   not defined in the actual wave model run, the initial conditions
$   will be applied as constant boundary conditions. Each line contains:
$     Discrete grid counters (IX,IY) of the active point and a
$     connect flag. If this flag is true, and the present and previous
$     point are on a grid line or diagonal, all intermediate points
$     are also defined as boundary points.
$
   1     1  F
   75    1   T
$
$  Close list by defining point (0,0) (mandatory)
$
      0   0   F
$
$
$
$ Excluded grid points from segment data ( FROM != PART )
$   First defined as lines, identical to the definition of the input
$   boundary points, and closed the same way.
$
      0   0   F
$
$   Second, define a point in a closed body of sea points to remove
$   the entire body os sea points. Also close by point (0,0)
$
      0   0
$
$ Output boundary points --------------------------------------------- $
$ Output boundary points are defined as a number of straight lines, 
$ defined by its starting point (X0,Y0), increments (DX,DY) and number
$ of points. A negative number of points starts a new output file.
$ Note that this data is only generated if requested by the actual
$ program. Example again for spherical grid in degrees.
$
$    -2.5312  48.5  0.00  0.008738  102
$    -2.5312 49.3850 0.013554  0.00  51 
$
$  Close list by defining line with 0 points (mandatory)
$
       0.    0.    0.    0.       0   
$
$ -------------------------------------------------------------------- $
$ End of input file                                                    $
$ -------------------------------------------------------------------- $
DeniseWorthen commented 1 year ago

For others, the calculation in wav_import_export is here

https://github.com/NOAA-EMC/WW3/blob/02693d837f2cd99d20ed08515878c2b5e9525e64/model/src/wav_import_export.F90#L1155

uturuncoglu commented 1 year ago

@aliabdolali @JessicaMeixner-NOAA Any suggestion? I am not sure why we have all zero in radiation stresses.

DeniseWorthen commented 1 year ago

I just want to be clear here that we've both confirmed that the current structured and non-structured (pdlib) global cases in the UWM do export non-zero stresses. But there seems to be something different about the setup for the inlet case you're testing for the coastal app.

JessicaMeixner-NOAA commented 1 year ago

Interesting, I was going to ask if you had an IC and perhaps you were just seeing 0 values at initialization but the fact that you have it for the global and not the regional domain is a bit odd. Here's the code section in the wmesmf cap: https://github.com/NOAA-EMC/WW3/blob/02693d837f2cd99d20ed08515878c2b5e9525e64/model/src/wmesmfmd.F90#L6939-L7215 although not sure that's really helpful either...

I don't see anything obvious, particularly in light that you are getting non-zero values in the global set-up.

uturuncoglu commented 1 year ago

@JessicaMeixner-NOAA There is a similar code in the new cap. It seems that input is zero a variable in the code. I am trying to track the source of that variable but it is hard. Do you know where that variable is defined or calculated.

uturuncoglu commented 1 year ago

I think that is Input spectra.

DeniseWorthen commented 1 year ago

@uturuncoglu Do you have a run directory ?

JessicaMeixner-NOAA commented 1 year ago

Is it just the first time snap where it's zero or all time snaps? What switch file are you building with?

uturuncoglu commented 1 year ago

@DeniseWorthen It is on Orion: /work/noaa/stmp/tufuk/stmp/tufuk/FV3_RT/rt_332482/coastal_ike_shinnecock_atm2sch2ww3_intel Please let me know if you have permission issue.

@JessicaMeixner-NOAA It is zero in all steps. The grid file is in this thread and I am using -DAPP=CSTLSW -DUSE_ATMOS=ON -DUSE_WW3=ON -DNO_PARMETIS=OFF -DOLDIO=ON -DPDLIB=ON switched to build it. So, probably I am using same switches used by pdlib cases.

JessicaMeixner-NOAA commented 1 year ago

Hmm.. Have you plotted the wave model output? Are you getting any waves?

uturuncoglu commented 1 year ago

@JessicaMeixner-NOAA Let me double check. The datm+wave with same configuration was working.

uturuncoglu commented 1 year ago

@JessicaMeixner-NOAA Good point. In fact, HS is all zero too. I also checked the input forcing like UAX and UAY but they are not zero. So, it seem that the forcing WW3 is receiving forcing. I'll run datm+wave configuration and check the output to be sure it is working and then, maybe I could compare the configuration files. I'll update you about it. Thanks for your help.

DeniseWorthen commented 1 year ago

@uturuncoglu I just looked at some of your wave output fields (20080824.000000.out_grd.ww3.nc) and the hs field is zero everywhere.

uturuncoglu commented 1 year ago

@DeniseWorthen Thanks for checking. Yes. I saw it too. I am doing more test in my side. I'll update you soon.

DeniseWorthen commented 1 year ago

You could also set dbug_flag=6 in the nems.configure, which should turn on the field diagnose output to the logs (min,max etc on the import and export states).

uturuncoglu commented 1 year ago

@DeniseWorthen Is it for mediator or WW3?

DeniseWorthen commented 1 year ago

You can set it in the med attributes, it works for both mediator and ww3.

uturuncoglu commented 1 year ago

@JessicaMeixner-NOAA @DeniseWorthen I confirmed that datm+wave is working fine and HS is not zero. I also found some configuration issue related with the forcing. I have just realized that datm+schsim+wave configuration,on starts from different data and atmospheric forcing (datm) has zero wind in that time. I am trying to fix it by communicating with coastal app developers. I have a feeling that if I fix those issues, I think I could get non zero values from radiation stresses. I'll update you when I hear anything back. Thanks again to both of you for digging the issue with me. I hope I did not get your time too much.

uturuncoglu commented 1 year ago

@JessicaMeixner-NOAA @DeniseWorthen First of all, Thanks to both of you for all your help. It was impossible for me to make it without your help but i think I fixed all the issues. I could get radiation stresses without any issue now. The only thing is to add those fields to WW3 cap and make available. I also fixed the SCHISM cap to provide current components to WW3. That is also working.

@JessicaMeixner-NOAA please let me know if you would like to have PR for WW3 cap fix to provide radiation stress components.

Another question is for rotation. As I see from the global application, MOM6 ocean model applying rotation before sending currents to WW3 (I think it is rotating to earth relative coordinates) but if you are using same grid in both component there won't be any affect. Right? We might need to do the same for SCHISM but not sure at this point since we are using same grid (I think) in both component.

JessicaMeixner-NOAA commented 1 year ago

@uturuncoglu - That sounds like something we should definitely get updated in WW3 and we'll look forward to your PR to dev/ufs-weather-model adding radiation stress exports.

My understanding is that MOM6 rotates from tripolar/grid relative u/v to earth relative, as you state and WW3 is using Earth relative. WW3 will want the currents in earth relative format by default. I don't know SCHISM to comment on their coordinate system.

uturuncoglu commented 1 year ago

@JessicaMeixner-NOAA Thanks. Based on the developers we don't need rotation for SCHISM coupling.